diff --git a/decompiler/IR2/Env.cpp b/decompiler/IR2/Env.cpp index ce60f6fe35..d8b4fd1fc8 100644 --- a/decompiler/IR2/Env.cpp +++ b/decompiler/IR2/Env.cpp @@ -562,6 +562,18 @@ FunctionVariableDefinitions Env::local_var_type_list(const Form* top_level_form, std::vector elts; elts.push_back(pretty_print::to_symbol("local-vars")); int count = 0; + std::unordered_map emitted_local_types; + + // A user may deliberately give an argument and its saved stack copy the same preferred name. + // Treat the argument as the existing lexical binding so the spill is not emitted as a second + // local with the same name. + for (int i = 0; i < nargs_to_ignore; i++) { + auto remapped = m_var_remap.find(get_reg_name(i)); + if (remapped != m_var_remap.end() && func && i < func->type.arg_count() - 1) { + emitted_local_types.emplace(remapped->second, func->type.get_arg(i).print()); + } + } + for (auto& x : vars) { if (x.reg_id.reg.get_kind() == Reg::GPR && x.reg_id.reg.get_gpr() < Reg::A0 + nargs_to_ignore && x.reg_id.reg.get_gpr() >= Reg::A0 && x.reg_id.id == 0) { @@ -579,12 +591,27 @@ FunctionVariableDefinitions Env::local_var_type_list(const Form* top_level_form, lookup_name = remapped->second; } - if (m_vars_defined_in_let.find(lookup_name) != m_vars_defined_in_let.end()) { + if (m_vars_defined_in_let.find(x.name()) != m_vars_defined_in_let.end() || + m_vars_defined_in_let.find(lookup_name) != m_vars_defined_in_let.end()) { + continue; + } + + auto type_name = x.type.typespec().print(); + auto retype = m_var_retype.find(x.name()); + if (retype != m_var_retype.end()) { + type_name = retype->second.print(); + } + const auto [existing, inserted] = emitted_local_types.emplace(lookup_name, type_name); + if (!inserted) { + if (existing->second != type_name) { + lg::warn("Local variable {} has conflicting remapped types {} and {}", lookup_name, + existing->second, type_name); + } continue; } count++; - elts.push_back(pretty_print::build_list(lookup_name, x.type.typespec().print())); + elts.push_back(pretty_print::build_list(lookup_name, type_name)); } // sort in increasing offset. @@ -602,7 +629,20 @@ FunctionVariableDefinitions Env::local_var_type_list(const Form* top_level_form, if (m_vars_defined_in_let.find(x.name()) != m_vars_defined_in_let.end()) { continue; } - elts.push_back(pretty_print::build_list(x.name(), x.typespec.print())); + auto type_name = x.typespec.print(); + auto retype = m_var_retype.find(x.name()); + if (retype != m_var_retype.end()) { + type_name = retype->second.print(); + } + const auto [existing, inserted] = emitted_local_types.emplace(x.name(), type_name); + if (!inserted) { + if (existing->second != type_name) { + lg::warn("Local variable {} has conflicting remapped types {} and {}", x.name(), + existing->second, type_name); + } + continue; + } + elts.push_back(pretty_print::build_list(x.name(), type_name)); count++; } diff --git a/decompiler/IR2/ExpressionHelpers.cpp b/decompiler/IR2/ExpressionHelpers.cpp index 745bb1b40f..1961472582 100644 --- a/decompiler/IR2/ExpressionHelpers.cpp +++ b/decompiler/IR2/ExpressionHelpers.cpp @@ -131,11 +131,13 @@ FormElement* handle_get_property_data_or_structure(const std::vector& for time = nullptr; } - // get the default value. It must be (the-as pointer #f) + // get the default value. The ordinary macro default can be omitted. Form* default_value = forms.at(4); - // but let's see if it's 0, because that's the default in the macro - if (default_value->to_string(env) != expcted_default) { - lg::error("fail data: bad default {}", default_value->to_string(env)); + if (default_value->to_string(env) == expcted_default) { + default_value = nullptr; + } else if (kind != ResLumpMacroElement::Kind::STRUCT || + env.version != GameVersion::Jak1) { + // Only Jak 1's res-lump-struct macro currently exposes a custom default. return nullptr; } @@ -153,7 +155,7 @@ FormElement* handle_get_property_data_or_structure(const std::vector& for } return pool.alloc_element(kind, lump_object, property_name, - nullptr, // default, must be #f + default_value, tag_pointer, time, default_type); } } // namespace diff --git a/decompiler/IR2/Form.h b/decompiler/IR2/Form.h index b7d004a1d5..c362957f17 100644 --- a/decompiler/IR2/Form.h +++ b/decompiler/IR2/Form.h @@ -1555,6 +1555,7 @@ class StackSpillStoreElement : public FormElement { void push_to_stack(const Env& env, FormPool& pool, FormStack& stack) override; const std::optional& cast_type() const { return m_cast_type; } const RegisterAccess& access() const { return m_access; } + const SimpleAtom& value() const { return m_value; } int stack_offset() const { return m_stack_offset; } private: diff --git a/decompiler/IR2/FormExpressionAnalysis.cpp b/decompiler/IR2/FormExpressionAnalysis.cpp index 16815edbd9..93abfe6884 100644 --- a/decompiler/IR2/FormExpressionAnalysis.cpp +++ b/decompiler/IR2/FormExpressionAnalysis.cpp @@ -2746,13 +2746,19 @@ void SetVarElement::push_to_stack(const Env& env, FormPool& pool, FormStack& sta if (src_as_se) { if (src_as_se->expr().kind() == SimpleExpression::Kind::IDENTITY && src_as_se->expr().get_arg(0).is_var()) { - // this can happen late in the case of coloring moves which are also gpr -> fpr's - // so they don't get caught by SetVarOp::get_as_form's check. - if (env.op_id_is_eliminated_coloring_move(src_as_se->expr().get_arg(0).var().idx())) { + const auto src_var = src_as_se->expr().get_arg(0).var(); + if (env.get_variable_name(m_dst) == env.get_variable_name(src_var) && + env.get_variable_type(m_dst, true) == env.get_variable_type(src_var, true)) { m_var_info.is_eliminated_coloring_move = true; } - auto var = src_as_se->expr().get_arg(0).var(); + // this can happen late in the case of coloring moves which are also gpr -> fpr's + // so they don't get caught by SetVarOp::get_as_form's check. + if (env.op_id_is_eliminated_coloring_move(src_var.idx())) { + m_var_info.is_eliminated_coloring_move = true; + } + + auto var = src_var; bool is_consumed_reg_move = false; if (is_stack_slot_access(var)) { auto& use_def = env.get_use_def_info(var); @@ -2793,7 +2799,12 @@ void SetVarElement::push_to_stack(const Env& env, FormPool& pool, FormStack& sta // stripped off by update_children_from_stack. if (src_as_se->expr().kind() == SimpleExpression::Kind::IDENTITY && src_as_se->expr().get_arg(0).is_var()) { - if (env.op_id_is_eliminated_coloring_move(src_as_se->expr().get_arg(0).var().idx())) { + const auto src_var = src_as_se->expr().get_arg(0).var(); + if (env.get_variable_name(m_dst) == env.get_variable_name(src_var) && + env.get_variable_type(m_dst, true) == env.get_variable_type(src_var, true)) { + m_var_info.is_eliminated_coloring_move = true; + } + if (env.op_id_is_eliminated_coloring_move(src_var.idx())) { m_var_info.is_eliminated_coloring_move = true; } } diff --git a/decompiler/ObjectFile/ObjectFileDB.h b/decompiler/ObjectFile/ObjectFileDB.h index 948492b807..ff337917da 100644 --- a/decompiler/ObjectFile/ObjectFileDB.h +++ b/decompiler/ObjectFile/ObjectFileDB.h @@ -64,6 +64,7 @@ struct LetRewriteStats { int abs2 = 0; int unused = 0; int ja = 0; + int ja_play = 0; int case_no_else = 0; int case_with_else = 0; int set_vector = 0; @@ -85,7 +86,7 @@ struct LetRewriteStats { int light_trail_tracker_spawn = 0; int total() const { - return dotimes + countdown + abs + abs2 + unused + ja + case_no_else + case_with_else + + return dotimes + countdown + abs + abs2 + unused + ja + ja_play + case_no_else + case_with_else + set_vector + set_vector2 + send_event + font_context_meth + proc_new + attack_info + vector_dot + rand_float_gen + set_let + with_dma_buf_add_bucket + dma_buffer_add_gs_set + launch_particles + call_parent_state_handler + suspend_for + font_method + @@ -100,6 +101,7 @@ struct LetRewriteStats { out += fmt::format(" abs: {}\n", abs); out += fmt::format(" abs2: {}\n", abs2); out += fmt::format(" ja: {}\n", ja); + out += fmt::format(" ja-play: {}\n", ja_play); out += fmt::format(" set_vector: {}\n", set_vector); out += fmt::format(" set_vector2: {}\n", set_vector2); out += fmt::format(" set_vector3: {}\n", set_vector3); @@ -130,6 +132,7 @@ struct LetRewriteStats { result.abs = abs + other.abs; result.abs2 = abs2 + other.abs2; result.ja = ja + other.ja; + result.ja_play = ja_play + other.ja_play; result.set_vector = set_vector + other.set_vector; result.set_vector2 = set_vector2 + other.set_vector2; result.case_no_else = case_no_else + other.case_no_else; @@ -156,6 +159,7 @@ struct LetRewriteStats { abs += other.abs; abs2 += other.abs2; ja += other.ja; + ja_play += other.ja_play; set_vector += other.set_vector; set_vector2 += other.set_vector2; case_no_else += other.case_no_else; diff --git a/decompiler/ObjectFile/ObjectFileDB_IR2.cpp b/decompiler/ObjectFile/ObjectFileDB_IR2.cpp index c25e42562c..02d984988d 100644 --- a/decompiler/ObjectFile/ObjectFileDB_IR2.cpp +++ b/decompiler/ObjectFile/ObjectFileDB_IR2.cpp @@ -791,6 +791,11 @@ void ObjectFileDB::ir2_build_expressions(int seg, const Config& config, ObjectFi func.ir2.env.types_succeeded) { auto name = func.name(); auto arg_config = config.function_arg_names.find(name); + if (arg_config == config.function_arg_names.end() && + func.guessed_name.kind == FunctionName::FunctionKind::UNIDENTIFIED) { + arg_config = config.function_arg_names.find( + fmt::format("(anon-function * {})", func.guessed_name.object_name)); + } auto var_config = config.function_var_overrides.find(name); if (convert_to_expressions(func.ir2.top_form, *func.ir2.form_pool, func, arg_config != config.function_arg_names.end() diff --git a/decompiler/analysis/atomic_op_builder.cpp b/decompiler/analysis/atomic_op_builder.cpp index 418484677c..4eea06afc2 100644 --- a/decompiler/analysis/atomic_op_builder.cpp +++ b/decompiler/analysis/atomic_op_builder.cpp @@ -1171,12 +1171,9 @@ std::unique_ptr convert_slt_2(const Instruction& i0, auto temp = i0.get_dst(0).get_reg(); auto left = i0.get_src(0).get_reg(); auto right = i0.get_src(1).get_reg(); - if (temp == left) { + if (temp == left || temp == right || left == right) { return nullptr; } - ASSERT(temp != left); - ASSERT(temp != right); - ASSERT(left != right); std::unique_ptr result; SimpleExpression::Kind kind; if (is_gpr_3(i1, InstructionKind::MOVZ, left, right, temp)) { @@ -1338,12 +1335,12 @@ std::unique_ptr convert_dsubu_3(const Instruction& i0, auto a = i0.get_src(0).get_reg(); auto b = i0.get_src(1).get_reg(); auto dest = i1.get_dst(0).get_reg(); - ASSERT(i1.get_src(0).is_reg(rs7())); - ASSERT(i1.get_src(1).is_imm(true_symbol_offset(version))); - ASSERT(i2.get_dst(0).get_reg() == dest); - ASSERT(i2.get_src(0).is_reg(rs7())); - ASSERT(i2.get_src(1).get_reg() == temp); - ASSERT(temp != dest); + if (!i1.get_src(0).is_reg(rs7()) || + !i1.get_src(1).is_imm(true_symbol_offset(version)) || + i2.get_dst(0).get_reg() != dest || !i2.get_src(0).is_reg(rs7()) || + i2.get_src(1).get_reg() != temp || temp == dest) { + return nullptr; + } auto kind = i2.kind == InstructionKind::MOVN ? IR2_Condition::Kind::EQUAL : IR2_Condition::Kind::NOT_EQUAL; std::unique_ptr result; @@ -1397,8 +1394,9 @@ std::unique_ptr convert_slt_3(const Instruction& i0, // delay slot auto temp = i0.get_dst(0).get_reg(); auto dest = i1.get_src(2).get_label(); - ASSERT(i1.get_src(0).get_reg() == temp); - ASSERT(i1.get_src(1).is_reg(rr0())); + if (i1.get_src(0).get_reg() != temp || !i1.get_src(1).is_reg(rr0())) { + return nullptr; + } IR2_Condition condition; if (s1 == rr0()) { @@ -1430,12 +1428,12 @@ std::unique_ptr convert_slt_3(const Instruction& i0, // movz dest, s7, temp auto temp = i0.get_dst(0).get_reg(); auto dest = i1.get_dst(0).get_reg(); - ASSERT(i1.get_src(0).is_reg(rs7())); - ASSERT(i1.get_src(1).is_imm(true_symbol_offset(version))); - ASSERT(i2.get_dst(0).get_reg() == dest); - ASSERT(i2.get_src(0).is_reg(rs7())); - ASSERT(i2.get_src(1).get_reg() == temp); - ASSERT(temp != dest); + if (!i1.get_src(0).is_reg(rs7()) || + !i1.get_src(1).is_imm(true_symbol_offset(version)) || + i2.get_dst(0).get_reg() != dest || !i2.get_src(0).is_reg(rs7()) || + i2.get_src(1).get_reg() != temp || temp == dest) { + return nullptr; + } IR2_Condition condition; if (s1 == rr0()) { auto kind = is_signed ? IR2_Condition::Kind::LESS_THAN_ZERO_SIGNED @@ -1477,8 +1475,9 @@ std::unique_ptr convert_slti_3(const Instruction& i0, // delay slot auto temp = i0.get_dst(0).get_reg(); auto dest = i1.get_src(2).get_label(); - ASSERT(i1.get_src(0).get_reg() == temp); - ASSERT(i1.get_src(1).is_reg(rr0())); + if (i1.get_src(0).get_reg() != temp || !i1.get_src(1).is_reg(rr0())) { + return nullptr; + } auto kind = is_signed ? IR2_Condition::Kind::LESS_THAN_SIGNED : IR2_Condition::Kind::LESS_THAN_UNSIGNED; auto condition = IR2_Condition(kind, make_src_atom(s0, idx), s1); @@ -1496,12 +1495,12 @@ std::unique_ptr convert_slti_3(const Instruction& i0, // movz dest, s7, temp auto temp = i0.get_dst(0).get_reg(); auto dest = i1.get_dst(0).get_reg(); - ASSERT(i1.get_src(0).is_reg(rs7())); - ASSERT(i1.get_src(1).is_imm(true_symbol_offset(version))); - ASSERT(i2.get_dst(0).get_reg() == dest); - ASSERT(i2.get_src(0).is_reg(rs7())); - ASSERT(i2.get_src(1).get_reg() == temp); - ASSERT(temp != dest); + if (!i1.get_src(0).is_reg(rs7()) || + !i1.get_src(1).is_imm(true_symbol_offset(version)) || + i2.get_dst(0).get_reg() != dest || !i2.get_src(0).is_reg(rs7()) || + i2.get_src(1).get_reg() != temp || temp == dest) { + return nullptr; + } IR2_Condition condition; auto kind = diff --git a/decompiler/analysis/expression_build.cpp b/decompiler/analysis/expression_build.cpp index 711e67558b..a6296a9f34 100644 --- a/decompiler/analysis/expression_build.cpp +++ b/decompiler/analysis/expression_build.cpp @@ -1,5 +1,7 @@ #include "expression_build.h" +#include + #include "common/goos/PrettyPrinter.h" #include "common/log/log.h" @@ -151,6 +153,34 @@ bool convert_to_expressions( } } + // A saved argument may intentionally share its preferred name with the argument itself. Once + // both accesses print as the same, the prologue spill assignment is a lexical self-assignment; + // subsequent spill loads already name the argument binding. Drop only exact, same-typed + // top-level aliases so independent same-named variables in nested scopes remain untouched. + new_entries.erase( + std::remove_if(new_entries.begin(), new_entries.end(), [&](FormElement* entry) { + auto* spill = dynamic_cast(entry); + if (spill && spill->value().is_var()) { + const auto& source = spill->value().var(); + const auto slot = f.ir2.env.stack_slot_entries.find(spill->stack_offset()); + return slot != f.ir2.env.stack_slot_entries.end() && + slot->second.name() == f.ir2.env.get_variable_name(source) && + slot->second.typespec == f.ir2.env.get_variable_type(source, true); + } + + auto* set = dynamic_cast(entry); + if (!set) { + return false; + } + const auto source = form_element_as_atom(set->src()->try_as_single_element()); + return source && source->is_var() && + f.ir2.env.get_variable_name(set->dst()) == + f.ir2.env.get_variable_name(source->var()) && + f.ir2.env.get_variable_type(set->dst(), true) == + f.ir2.env.get_variable_type(source->var(), true); + }), + new_entries.end()); + // if we are a totally empty function, insert a placeholder so we don't have to handle // the zero element case ever. if (new_entries.empty()) { diff --git a/decompiler/analysis/final_output.cpp b/decompiler/analysis/final_output.cpp index 4be6c69daf..78f7f6ddbb 100644 --- a/decompiler/analysis/final_output.cpp +++ b/decompiler/analysis/final_output.cpp @@ -41,6 +41,15 @@ std::string fix_docstring_indent(const std::string& input) { return result; } +void set_metadata_docstring(std::vector* body, const std::string& docstring) { + auto replacement = pretty_print::new_string(docstring); + if (!body->empty() && body->front().is_string()) { + body->front() = replacement; + } else { + body->insert(body->begin(), replacement); + } +} + void append_body_to_function_definition(goos::Object* top_form, const std::vector& inline_body, const FunctionVariableDefinitions& var_dec, @@ -106,6 +115,7 @@ goos::Object final_output_lambda(const Function& func, GameVersion version) { goos::Object final_output_defstate_anonymous_behavior(const Function& func, const DecompilerTypeSystem& dts) { std::vector inline_body; + std::optional metadata_docstring; // docstring if available - lookup the appropriate info const auto& type_name = func.guessed_name.type_name; @@ -116,22 +126,23 @@ goos::Object final_output_defstate_anonymous_behavior(const Function& func, if (dts.virtual_state_metadata.count(type_name) != 0 && dts.virtual_state_metadata.at(type_name).count(state_name) != 0 && dts.virtual_state_metadata.at(type_name).at(state_name).count(handler_name) != 0) { - inline_body.insert(inline_body.begin(), - pretty_print::new_string(dts.virtual_state_metadata.at(type_name) - .at(state_name) - .at(handler_name) - .docstring.value())); + metadata_docstring = dts.virtual_state_metadata.at(type_name) + .at(state_name) + .at(handler_name) + .docstring.value(); } } else if (func.guessed_name.kind == FunctionName::FunctionKind::NV_STATE) { if (dts.state_metadata.count(state_name) != 0 && dts.state_metadata.at(state_name).count(handler_name) != 0) { - inline_body.insert(inline_body.begin(), - pretty_print::new_string( - dts.state_metadata.at(state_name).at(handler_name).docstring.value())); + metadata_docstring = + dts.state_metadata.at(state_name).at(handler_name).docstring.value(); } } func.ir2.top_form->inline_forms(inline_body, func.ir2.env); + if (metadata_docstring) { + set_metadata_docstring(&inline_body, *metadata_docstring); + } auto var_dec = func.ir2.env.local_var_type_list(func.ir2.top_form, func.type.arg_count() - 1); auto result = pretty_print::build_list("behavior", get_arg_list_for_function(func, func.ir2.env)); @@ -183,7 +194,7 @@ std::string final_defun_out(const Function& func, if (dts.symbol_metadata_map.count(func.name()) != 0) { auto& meta = dts.symbol_metadata_map.at(func.name()); if (meta.docstring) { - inline_body.insert(inline_body.begin(), pretty_print::new_string(meta.docstring.value())); + set_metadata_docstring(&inline_body, meta.docstring.value()); } } @@ -205,8 +216,7 @@ std::string final_defun_out(const Function& func, auto top_form = pretty_print::build_list(top); if (method_info.docstring) { - inline_body.insert(inline_body.begin(), - pretty_print::new_string(method_info.docstring.value())); + set_metadata_docstring(&inline_body, method_info.docstring.value()); } append_body_to_function_definition(&top_form, inline_body, var_dec, method_info.type, dts.version()); diff --git a/decompiler/analysis/insert_lets.cpp b/decompiler/analysis/insert_lets.cpp index db32dcbf20..4a14fc9000 100644 --- a/decompiler/analysis/insert_lets.cpp +++ b/decompiler/analysis/insert_lets.cpp @@ -124,7 +124,6 @@ FormElement* rewrite_as_dotimes(LetElement* in, const Env& env, FormPool& pool) // look for setting a var to zero. auto ra = in->entries().at(0).dest; - auto var = env.get_variable_name(ra); if (!is_constant_int(in->entries().at(0).src, 0)) { return nullptr; } @@ -143,7 +142,7 @@ FormElement* rewrite_as_dotimes(LetElement* in, const Env& env, FormPool& pool) // check the lt operation: auto lt_var = mr.maps.regs.at(0); ASSERT(lt_var); - if (env.get_variable_name(*lt_var) != var) { + if (env.get_program_var_id(*lt_var) != env.get_program_var_id(ra)) { return nullptr; // wrong variable checked } @@ -161,7 +160,7 @@ FormElement* rewrite_as_dotimes(LetElement* in, const Env& env, FormPool& pool) auto inc_var = int_mr.maps.regs.at(0); ASSERT(inc_var); - if (env.get_variable_name(*inc_var) != var) { + if (env.get_program_var_id(*inc_var) != env.get_program_var_id(ra)) { return nullptr; // wrong variable incremented } @@ -630,8 +629,6 @@ FormElement* rewrite_as_countdown(LetElement* in, const Env& env, FormPool& pool // look for setting a var to the initial value. auto ra = in->entries().at(0).dest; - auto idx_var = env.get_variable_name(ra); - // still have to check body for the increment and have to check that the lt operates on the right // thing. Matcher while_matcher = Matcher::while_loop( @@ -646,7 +643,7 @@ FormElement* rewrite_as_countdown(LetElement* in, const Env& env, FormPool& pool // check the zero operation: auto lt_var = mr.maps.regs.at(0); ASSERT(lt_var); - if (env.get_variable_name(*lt_var) != idx_var) { + if (env.get_program_var_id(*lt_var) != env.get_program_var_id(ra)) { return nullptr; // wrong variable checked } @@ -664,7 +661,7 @@ FormElement* rewrite_as_countdown(LetElement* in, const Env& env, FormPool& pool auto inc_var = int_mr.maps.regs.at(0); ASSERT(inc_var); - if (env.get_variable_name(*inc_var) != idx_var) { + if (env.get_program_var_id(*inc_var) != env.get_program_var_id(ra)) { return nullptr; // wrong variable incremented } @@ -3912,6 +3909,79 @@ FormElement* rewrite_let_sequence(const std::vector& in, return nullptr; } +FormElement* rewrite_ja_play_sequence(FormElement* setup, + FormElement* wait, + const Env& env, + FormPool& pool) { + auto setup_call = dynamic_cast(setup); + if (!setup_call || !setup_call->op().is_func() || + !setup_call->op().func()->to_form(env).is_symbol("ja-no-eval")) { + return nullptr; + } + + auto wait_loop = dynamic_cast(wait); + if (!wait_loop || wait_loop->body->size() < 2) { + return nullptr; + } + + auto find_keyword_arg = [&](const GenericElement* call, const std::string& keyword) -> Form* { + const auto& args = call->elts(); + for (size_t i = 0; i + 1 < args.size(); i++) { + if (args.at(i)->to_form(env).is_symbol(keyword)) { + return args.at(i + 1); + } + } + return nullptr; + }; + + auto setup_num = find_keyword_arg(setup_call, ":num!"); + if (!setup_num) { + return nullptr; + } + + auto setup_chan = find_keyword_arg(setup_call, ":chan"); + const auto setup_chan_text = setup_chan ? setup_chan->to_form(env).print() : "0"; + + if (wait_loop->condition->to_string(env) != + fmt::format("(ja-done? {})", setup_chan_text)) { + return nullptr; + } + + const auto& wait_body = wait_loop->body->elts(); + auto suspend_op = dynamic_cast(wait_body.at(wait_body.size() - 2)); + if (!suspend_op || !suspend_op->op() || !dynamic_cast(suspend_op->op()) || + dynamic_cast(suspend_op->op())->kind() != SpecialOp::Kind::SUSPEND) { + return nullptr; + } + + auto advance_call = dynamic_cast(wait_body.back()); + if (!advance_call || !advance_call->op().is_func() || + !advance_call->op().func()->to_form(env).is_symbol("ja")) { + return nullptr; + } + + auto advance_num = find_keyword_arg(advance_call, ":num!"); + auto advance_chan = find_keyword_arg(advance_call, ":chan"); + const auto advance_chan_text = advance_chan ? advance_chan->to_form(env).print() : "0"; + if (!advance_num || advance_num->to_form(env).print() != setup_num->to_form(env).print() || + advance_chan_text != setup_chan_text) { + return nullptr; + } + + size_t expected_advance_args = advance_chan ? 4 : 2; + if (advance_call->elts().size() != expected_advance_args) { + return nullptr; + } + + std::vector macro_args = setup_call->elts(); + for (size_t i = 0; i + 2 < wait_body.size(); i++) { + macro_args.push_back(pool.alloc_single_form(nullptr, wait_body.at(i))); + } + + return pool.alloc_element( + GenericOperator::make_function(pool.form("ja-play")), macro_args); +} + Form* insert_cast_for_let(RegisterAccess dst, const TypeSpec& src_type, Form* src, @@ -3968,7 +4038,7 @@ LetStats insert_lets(const Function& func, // Stored per variable. struct PerVarInfo { - std::string var_name; // name used to uniquely identify + std::string unique_name; // displayed name used to join deliberately co-named SSA variables RegisterAccess access; std::unordered_set elts_using_var; // all FormElements using var Form* lca_form = nullptr; // the lowest common form that contains all the above elts @@ -4001,10 +4071,10 @@ LetStats insert_lets(const Function& func, // and add it. for (auto& access : reg_accesses) { if (register_can_hold_var(access.reg())) { - auto name = env.get_variable_name(access); - var_info[name].elts_using_var.insert(elt); - var_info[name].var_name = name; - var_info[name].access = access; + auto unique_name = env.get_variable_name(access); + var_info[unique_name].elts_using_var.insert(elt); + var_info[unique_name].unique_name = unique_name; + var_info[unique_name].access = access; } } }); @@ -4036,7 +4106,7 @@ LetStats insert_lets(const Function& func, bool uses = false; for (auto& ra : ras) { if ((ra.reg().get_kind() == Reg::FPR || ra.reg().get_kind() == Reg::GPR) && - env.get_variable_name(ra) == kv.second.var_name) { + env.get_variable_name(ra) == kv.second.unique_name) { uses = true; } } @@ -4082,7 +4152,8 @@ LetStats insert_lets(const Function& func, auto first_form = info.lca_form->at(info.start_idx); auto first_form_as_set = dynamic_cast(first_form); if (first_form_as_set && register_can_hold_var(first_form_as_set->dst().reg()) && - env.get_variable_name(first_form_as_set->dst()) == env.get_variable_name(info.access) && + env.get_variable_name(first_form_as_set->dst()) == + env.get_variable_name(info.access) && !first_form_as_set->info().is_eliminated_coloring_move) { bool allowed = true; @@ -4105,7 +4176,7 @@ LetStats insert_lets(const Function& func, li.start_elt = info.start_idx; li.end_elt = info.end_idx; li.set_form = first_form_as_set; - li.name = info.var_name; + li.name = info.unique_name; possible_insertions[li.form].push_back(li); stats.vars_in_lets++; } @@ -4291,6 +4362,21 @@ LetStats insert_lets(const Function& func, } }); + // Part 11: recover the animation-play convenience macro after individual JA setup/eval forms + // have been recognized. + top_level_form->apply_form([&](Form* f) { + auto& form_elts = f->elts(); + for (size_t i = 0; i + 1 < form_elts.size(); ++i) { + auto rewritten = rewrite_ja_play_sequence(form_elts.at(i), form_elts.at(i + 1), env, pool); + if (rewritten) { + form_elts.erase(form_elts.begin() + i + 1); + form_elts.at(i) = rewritten; + rewritten->parent_form = f; + let_rewrite_stats.ja_play++; + } + } + }); + return stats; } diff --git a/decompiler/config/jak1/all-types.gc b/decompiler/config/jak1/all-types.gc index 1d84f48932..3fbe410f12 100644 --- a/decompiler/config/jak1/all-types.gc +++ b/decompiler/config/jak1/all-types.gc @@ -32,7 +32,9 @@ ;; children of inline-array-class should define their own data which overlays this one. (_data uint8 :score -50 :dynamic :offset 16) ) - (:methods (new (symbol type int) _type_) ;; 0 + (:methods (new "Allocate an inline array with count elements." (symbol type int) _type_) ;; 0 + (length :override-doc "Return the active element count, not the allocated capacity.") + (asize-of :override-doc "Return the header size plus the allocated capacity at this array type's element stride.") ) :method-count-assert 9 :size-assert #x10 @@ -41,61 +43,61 @@ ;; - Functions -(define-extern format (function _varargs_ object)) -(define-extern valid? (function object type basic basic object symbol)) -(define-extern type-type? (function type type symbol)) -(define-extern fact (function int int)) -(define-extern delete-car! (function object object object)) -(define-extern nmember (function basic object object)) -(define-extern name= (function basic basic symbol)) -(define-extern nothing (function none)) -(define-extern identity (function object object)) -(define-extern 1/ (function float float)) -(define-extern + (function int int int)) -(define-extern - (function int int int)) -(define-extern * (function int int int)) -(define-extern / (function int int int)) -(define-extern ash (function int int int)) -(define-extern mod (function int int int)) -(define-extern rem (function int int int)) -(define-extern abs (function int int)) -(define-extern min (function int int int)) -(define-extern max (function int int int)) -(define-extern logior (function int int int)) -(define-extern logand (function int int int)) -(define-extern lognor (function int int int)) -(define-extern logxor (function int int int)) -(define-extern lognot (function int int)) -(define-extern false-func (function symbol)) -(define-extern true-func (function symbol)) -(define-extern _format (function _varargs_ object)) -(define-extern method-set! (function type int object none)) ;; may actually return function. -(define-extern basic-type? (function basic type symbol)) -(define-extern find-parent-method (function type int function)) -(define-extern ref (function object int object)) -(define-extern last (function object object)) -(define-extern member (function object object object)) -(define-extern assoc (function object object object)) -(define-extern assoce (function object object object)) -(define-extern nassoc (function string object object)) -(define-extern nassoce (function string object object)) -(define-extern append! (function object object object)) -(define-extern delete! (function object object pair)) -(define-extern insert-cons! (function object object pair)) -(define-extern sort (function pair (function object object object) pair)) -(define-extern mem-copy! (function pointer pointer int pointer)) -(define-extern qmem-copy<-! (function pointer pointer int pointer)) -(define-extern qmem-copy->! (function pointer pointer int pointer)) -(define-extern mem-set32! (function pointer int int pointer)) -(define-extern mem-or! (function pointer pointer int pointer)) -(define-extern print (function object object)) -(define-extern printl (function object object)) -(define-extern inspect (function object object)) -(define-extern mem-print (function (pointer uint32) int symbol)) -(define-extern print-tree-bitmask (function int int symbol)) -(define-extern quad-copy! (function pointer pointer int none)) +(define-extern format "Format values to a destination." (function _varargs_ object)) +(define-extern valid? "Check whether object is a valid GOAL object of expected-type. Passing #f as expected-type only checks for a four-byte-aligned address in GOAL memory. Pass structure for a structure, which also requires 16-byte alignment; packed inline structures therefore do not pass. More specific expected types accept their subtypes. allow-false accepts #f as a null reference. name is used in error output, and a false name suppresses errors." (function object type basic basic object symbol)) +(define-extern type-type? "Return true when child-type is parent-type or derives from it. Incomplete types safely return false." (function type type symbol)) +(define-extern fact "Return x factorial." (function int int)) +(define-extern delete-car! "Remove the first list element whose car is item." (function object object object)) +(define-extern nmember "Return the list tail whose first item has the same name." (function basic object object)) +(define-extern name= "Compare two objects by name." (function basic basic symbol)) +(define-extern nothing "Do nothing." (function none)) +(define-extern identity "Return value unchanged. This is the first function loaded by the game. The upper 64 bits of a 128-bit value are not preserved." (function object object)) +(define-extern 1/ "Return the reciprocal of x." (function float float)) +(define-extern + "Add two integers." (function int int int)) +(define-extern - "Subtract the second integer from the first." (function int int int)) +(define-extern * "Multiply two integers." (function int int int)) +(define-extern / "Divide the first integer by the second." (function int int int)) +(define-extern ash "Arithmetically shift value left for a positive shift-amount and right for a negative shift-amount." (function int int int)) +(define-extern mod "Return the signed 32-bit division remainder. Negative operands follow the machine's signed-division behavior." (function int int int)) +(define-extern rem "Return the signed 32-bit division remainder; this is identical to mod." (function int int int)) +(define-extern abs "Return the absolute value of an integer." (function int int)) +(define-extern min "Return the smaller integer." (function int int int)) +(define-extern max "Return the larger integer." (function int int int)) +(define-extern logior "Compute the bitwise inclusive-or." (function int int int)) +(define-extern logand "Compute the bitwise and." (function int int int)) +(define-extern lognor "Compute the bitwise complement of the inclusive-or." (function int int int)) +(define-extern logxor "Compute the bitwise exclusive-or." (function int int int)) +(define-extern lognot "Compute the bitwise complement." (function int int)) +(define-extern false-func "Return false." (function symbol)) +(define-extern true-func "Return true." (function symbol)) +(define-extern _format "Format values to a destination." (function _varargs_ object)) +(define-extern method-set! "Install a method in a type's method table." (function type int object none)) ;; may actually return function. +(define-extern basic-type? "Return true when this basic object derives from parent-type. This requires a fully defined type and intentionally returns false for object." (function basic type symbol)) +(define-extern find-parent-method "Walk the parent chain until method-id has a different implementation than child-type. Only call this for a known method slot: there are no method-table bounds checks." (function type int function)) +(define-extern ref "Return the list element at index." (function object int object)) +(define-extern last "Return the last pair in a proper list." (function object object)) +(define-extern member "Return the list tail whose car is item, or false when item is absent." (function object object object)) +(define-extern assoc "Return the key-value pair for key in an association list, or false when absent." (function object object object)) +(define-extern assoce "Return the key-value pair for key in an association list. An else key acts as a fallback." (function object object object)) +(define-extern nassoc "Return the named key-value pair from an association list. A key may be a single named object or a list of aliases." (function string object object)) +(define-extern nassoce "Return the named key-value pair from an association list. Keys may be alias lists, and a single else key acts as a fallback." (function string object object)) +(define-extern append! "Destructively attach back to the final pair of front and return the combined list. If front is empty, return back directly." (function object object object)) +(define-extern delete! "Remove the first list element equal to item and return the possibly changed list head." (function object object pair)) +(define-extern insert-cons! "Insert a key-value pair into an association list, replacing an existing entry. This allocates one pair on the global heap." (function object object pair)) +(define-extern sort "Destructively bubble-sort a list by swapping adjacent out-of-order cars until a pass makes no swaps. An integer comparator returns a positive value when the first item should follow the second, so (sort list -) is ascending. A boolean comparator must return exactly #t for an in-order pair; another truthy value can be mistaken for a positive integer." (function pair (function object object object) pair)) +(define-extern mem-copy! "Copy byte-count bytes in ascending address order." (function pointer pointer int pointer)) +(define-extern qmem-copy<-! "Copy in ascending address order using quadwords. Source and destination must be 16-byte aligned; byte-count is rounded up to 16 bytes." (function pointer pointer int pointer)) +(define-extern qmem-copy->! "Copy in descending address order using quadwords. Source and destination must be 16-byte aligned; byte-count is rounded up to 16 bytes." (function pointer pointer int pointer)) +(define-extern mem-set32! "Fill word-count 32-bit words with value. The count precedes the fill value." (function pointer int int pointer)) +(define-extern mem-or! "Bitwise-or byte-count bytes from src into dst." (function pointer pointer int pointer)) +(define-extern print "Print a boxed object without a trailing newline." (function object object)) +(define-extern printl "Print a boxed object followed by a newline." (function object object)) +(define-extern inspect "Print a detailed representation of a boxed object." (function object object)) +(define-extern mem-print "Print word-count 32-bit words to the runtime output in groups of four." (function (pointer uint32) int symbol)) +(define-extern print-tree-bitmask "Print one indentation row for a process-tree diagram from the active-column bitmask." (function int int symbol)) +(define-extern quad-copy! "Copy qwc aligned quadwords from src to dst." (function pointer pointer int none)) ;; has issues: -(define-extern breakpoint-range-set! (function uint uint uint int)) +(define-extern breakpoint-range-set! "Configure the EE data-address breakpoint registers." (function uint uint uint int)) ;; - Symbols @@ -419,7 +421,6 @@ ((lo int32 :offset 0) (hi int32 :offset 32) ) - ;; made-up type ) (defenum pat-material @@ -491,6 +492,22 @@ (invalid 666) ) +(defenum str-play-command + :type uint16 + :bitfield #f + (play 0) + (stop 1) + (queue 2) + ) + +(defenum ramdisk-rpc-function + :type uint32 + :bitfield #f + (get-data 0) + (reset-and-load 1) + (bypass-load-file 4) + ) + (defenum bucket-id :type int32 :bitfield #f @@ -696,54 +713,56 @@ (player) ) +;; Persistent actor state carried between births. A try reset clears #x26f, a full game reset +;; clears #x77f, and force-birth survives both. (defenum entity-perm-status :bitfield #t :type uint16 - (bit-0 0) - (bit-1 1) + (birth-blocked 0) ;; permanently prevent this actor from being born + (error 1) ;; actor art or navigation setup failed (dead 2) - (bit-3 3) - (bit-4 4) + (no-kill 3) ;; do not distance- or visibility-cull the live process + (respawn-on-reload 4) ;; clear death and birth suppression when the level reloads (user-set-from-cstage 5) (complete 6) ;; wrong! - (bit-7 7) + (force-birth 7) ;; birth even when the actor is offscreen (real-complete 8) - (bit-9 9) - (bit-10 10) + (suppress-birth 9) ;; temporarily keep the actor from being born + (suppress-birth-2 10) ;; second birth-suppression bit ) (defenum path-control-flag :bitfield #t :type uint32 (display 0) - (draw-line 1) ;; TODO - only seen it used to control debug drawing so far - (draw-point 2) ;; TODO - only seen it used to control debug drawing so far - (draw-text 3) ;; TODO - only seen it used to control debug drawing so far - (not-found 4) + (draw-line 1) ;; draw the path or spline + (draw-point 2) ;; draw each control vertex + (draw-text 3) ;; label each control vertex with its index + (not-found 4) ;; the requested vertex or knot resource was unavailable ) (defenum nav-control-flags :bitfield #t :type uint32 - (display-marks 0) - (navcf1 1) ;; TODO - nav-control::9 - (navcf2 2) ;; TODO - nav-control::9 - (navcf3 3) ;; TODO - nav-enemy::45 | nav-control::9 - (navcf4 4) ;; TODO - nav-control::9 - (navcf5 5) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9 - (navcf6 6) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9 - (navcf7 7) ;; TODO - nav-enemy::45 | ;; TODO - nav-control::9 - (navcf8 8) - (navcf9 9) ;; TODO - nav-control::14 | 11 - (navcf10 10) ;; TODO - nav-enemy::nav-enemy-patrol-post - (navcf11 11) ;; TODO - nav-control::28 - (navcf12 12) ;; TODO - rolling-lightning-mole::(enter nav-enemy-chase fleeing-nav-enemy) - (navcf13 13) - (navcf17 17) ;; TODO - nav-control::11 - (navcf18 18) ;; TODO - nav-control::11 - (navcf19 19) ;; TODO - nav-control::11 | 17 - (navcf20 20) ;; TODO - nav-mesh::28 - (navcf21 21) ;; TODO - nav-control::19 + (display-marks 0) ;; master debug-display enable + (display-bounds-sphere 1) + (display-vertices 2) + (display-polys 3) + (display-poly-ids 4) + (display-active-polys 5) + (display-travel 6) + (display-spheres 7) + (enable-sphere-avoidance 8) + (current-poly-set 9) + (gradual-turn-to-target 10) + (avoid-player 11) + (stop-at-boundary 12) + (avoid-static-spheres 13) + (blocked 17) + (navcf18 18) ;; cleared each update + (reached-destination 19) + (point-inside-mesh 20) + (heading-aligned 21) ) (defenum task-status @@ -1048,7 +1067,7 @@ (sidekick-hint-rounddoor #x23c) (sidekick-hint-lurkerm #x23d) (sidekick-hint-tower #x23e) - + (sidekick-reminder-fish #x240) (firecanyon-need-cells #x24f) @@ -1726,6 +1745,10 @@ ) (:methods (new (symbol type basic) _type_) ;; 0 + (mem-usage :override-doc + "Name and optionally count the process dead pools, then account for every active process and + its heap header, thread, drawable controllers, and other major heap-owned allocations. + flags bit #x20 also counts objects currently resident in the dead pools.") (activate (_type_ process-tree basic pointer) process-tree) ;; 9 (deactivate (_type_) none) ;; 10 (init-from-entity! (_type_ entity-actor) none) ;; 11 @@ -1798,6 +1821,8 @@ ) (:methods (new (symbol type process symbol int pointer) _type_) ;; 0 + (relocate :override-doc + "Adjust this thread's owning-process pointer after the process allocation moves.") (thread-suspend (_type_) none) ;; 10 (thread-resume (_type_) none) ;; 11 ) @@ -1972,6 +1997,10 @@ ) (:methods (new (symbol type basic int) _type_) ;; 0 + (relocate :override-doc + "Move this process allocation by offset. Patch internal pointers, connections, heap objects, + threads, and heap bounds, copy the complete allocation in an overlap-safe direction, and + return its new address.") ) (:states dead-state @@ -1983,8 +2012,11 @@ ;; - Functions -(define-extern entity-deactivate-handler (function process entity-actor none)) -(define-extern process-disconnect (function process int)) +(define-extern entity-deactivate-handler + "When proc is still actor's live process, clear its error and no-kill status and disconnect it + from the entity." + (function process entity-actor none)) +(define-extern process-disconnect "Move every connection owned by proc back to its engine's dead list." (function process int)) (define-extern throw (function symbol object int)) (define-extern set-to-run-bootstrap (function none)) (define-extern change-parent (function process-tree process-tree process-tree)) @@ -2095,22 +2127,22 @@ ;; - Functions -(define-extern deinstall-debug-handlers (function none)) -(define-extern return-from-exception (function object none)) -(define-extern kernel-set-exception-vector (function none)) -(define-extern kernel-write (function none)) +(define-extern deinstall-debug-handlers "Restore the default kernel handler for every exception class used by the debug monitor." (function none)) +(define-extern return-from-exception "Restore an EE register image and return from the exception with eret." (function (pointer uint128) none)) +(define-extern kernel-set-exception-vector "Install a handler for an EE exception class." (function int object none)) +(define-extern kernel-write "Invoke the private syscall-102 kernel word-write service." (function object pointer uint32 none)) (define-extern install-debug-handler (function int object symbol)) -(define-extern kernel-copy-function (function object object object object none)) -(define-extern kernel-copy-to-kernel-ram (function none)) -(define-extern kernel-write-function (function object object object none)) -(define-extern kernel-read-function (function object object none)) -(define-extern kernel-read (function none)) -(define-extern kernel-check-hardwired-addresses (function none)) -(define-extern install-default-debug-handler (function object none)) -(define-extern kernel-set-interrupt-vector (function none)) -(define-extern kernel-set-level2-vector (function none)) -(define-extern deinstall-debug-handler (function none)) -(define-extern resend-exception (function none)) +(define-extern kernel-copy-function "Copy word-count 32-bit words from source to dest for the private kernel syscall. The first ABI argument is unused." (function object pointer pointer int none)) +(define-extern kernel-copy-to-kernel-ram "Invoke the private syscall-102 kernel copy service." (function object pointer pointer int none)) +(define-extern kernel-write-function "Write value to a kernel address for the private kernel syscall. The first ABI argument is unused." (function object pointer uint32 none)) +(define-extern kernel-read-function "Read a signed word from a kernel address for the private kernel syscall. The first ABI argument is unused." (function object pointer int)) +(define-extern kernel-read "Invoke the private syscall-102 kernel word-read service." (function object pointer int)) +(define-extern kernel-check-hardwired-addresses "Verify that the running PS2 kernel matches the hardwired debug-monitor memory layout." (function none)) +(define-extern install-default-debug-handler "Install one debug handler for the supported EE exception classes." (function object none)) +(define-extern kernel-set-interrupt-vector "Install an EE interrupt handler through syscall 15." (function int object none)) +(define-extern kernel-set-level2-vector "Install a KSEG0 handler for one of the two level-two vectors." (function int uint symbol)) +(define-extern deinstall-debug-handler "Restore the default kernel handler for one exception class." (function int none)) +(define-extern resend-exception "Remove the debug handlers, restore the saved COP0 exception state, and resume through the supplied register image." (function uint uint uint uint uint (pointer uint128) none)) ;; ---------------------- @@ -2121,37 +2153,36 @@ ;; - Functions -(define-extern string-get-arg!! (function string string symbol)) -(define-extern string= (function string string symbol)) -(define-extern string->float (function string float)) -(define-extern string->int (function string int)) -(define-extern string-skip-whitespace (function (pointer uint8) (pointer uint8))) -(define-extern copyn-string<-charp (function string (pointer uint8) int string)) -(define-extern string-suck-up! (function string (pointer uint8) symbol)) -(define-extern string-strip-trailing-whitespace! (function string symbol)) -(define-extern string-strip-leading-whitespace! (function string symbol)) -(define-extern string-skip-to-char (function (pointer uint8) uint (pointer uint8))) -(define-extern cat-string<-string_to_charp (function string string (pointer uint8) (pointer uint8))) -(define-extern copy-string<-string (function string string string)) -(define-extern string-charp= (function string (pointer uint8) symbol)) -(define-extern string<-charp (function string (pointer uint8) string)) -(define-extern charp<-string (function (pointer uint8) string int)) -(define-extern copy-charp<-charp (function (pointer uint8) (pointer uint8) (pointer uint8))) -(define-extern cat-string<-string (function string string string)) -(define-extern catn-string<-charp (function string (pointer uint8) int string)) -(define-extern append-character-to-string (function string uint8 int)) -(define-extern charp-basename (function (pointer uint8) (pointer uint8))) -(define-extern clear (function string string)) -(define-extern string? (function string string symbol)) -(define-extern string<=? (function string string symbol)) -(define-extern string>=? (function string string symbol)) -;; this one might be wrong -(define-extern string-cat-to-last-char (function string string uint (pointer uint8))) -(define-extern string-strip-whitespace! (function string symbol)) -(define-extern string-get-int32!! (function (pointer int32) string symbol)) -(define-extern string-get-float!! (function (pointer float) string symbol)) -(define-extern string-get-flag!! (function (pointer symbol) string string string symbol)) +(define-extern string-get-arg!! "Remove and copy the first whitespace-delimited argument. Quoted arguments may contain whitespace." (function string string symbol)) +(define-extern string= "Return true when two non-null GOAL strings contain the same bytes." (function string string symbol)) +(define-extern string->float "Report that float conversion is unimplemented and return 0.0." (function string float)) +(define-extern string->int "Parse a decimal, #x hexadecimal, or #b binary integer. Parsing stops at the first invalid digit." (function string int)) +(define-extern string-skip-whitespace "Return the first byte not containing space, tab, carriage return, or newline." (function (pointer uint8) (pointer uint8))) +(define-extern copyn-string<-charp "Copy exactly len bytes from a C string and append a null terminator." (function string (pointer uint8) int string)) +(define-extern string-suck-up! "Remove every byte before location by moving the remaining suffix to the start of str." (function string (pointer uint8) symbol)) +(define-extern string-strip-trailing-whitespace! "Remove spaces, tabs, carriage returns, and newlines from the end of a string." (function string symbol)) +(define-extern string-strip-leading-whitespace! "Remove spaces, tabs, carriage returns, and newlines from the start of a string." (function string symbol)) +(define-extern string-skip-to-char "Return the first occurrence of char, or the null terminator when it is absent." (function (pointer uint8) uint (pointer uint8))) +(define-extern cat-string<-string_to_charp "Append bytes from b through end-ptr inclusive, stopping earlier at b's null terminator. Return the new terminator." (function string string (pointer uint8) (pointer uint8))) +(define-extern copy-string<-string "Copy src and its null terminator into dst without checking capacity." (function string string string)) +(define-extern string-charp= "Return true when a GOAL string and null-terminated byte string contain the same bytes." (function string (pointer uint8) symbol)) +(define-extern string<-charp "Copy a null-terminated byte string into a GOAL string without checking capacity." (function string (pointer uint8) string)) +(define-extern charp<-string "Copy a GOAL string and its null terminator into a byte buffer." (function (pointer uint8) string int)) +(define-extern copy-charp<-charp "Copy a null-terminated byte string and return its destination terminator." (function (pointer uint8) (pointer uint8) (pointer uint8))) +(define-extern cat-string<-string "Append b to a without checking capacity." (function string string string)) +(define-extern catn-string<-charp "Append exactly len bytes from b to a and add a null terminator." (function string (pointer uint8) int string)) +(define-extern append-character-to-string "Append one byte and a new null terminator without checking capacity." (function string uint8 int)) +(define-extern charp-basename "Return the bytes after the final slash or backslash, or the original pointer when neither occurs." (function (pointer uint8) (pointer uint8))) +(define-extern clear "Make a string empty and return it." (function string string)) +(define-extern string? "Compare the shared prefix bytewise and return true when a first differing byte in a is larger. A strict prefix is not considered larger." (function string string symbol)) +(define-extern string<=? "Compare the shared prefix bytewise and return false only when a first differing byte in a is larger." (function string string symbol)) +(define-extern string>=? "Compare the shared prefix bytewise and return false only when a first differing byte in a is smaller." (function string string symbol)) +(define-extern string-cat-to-last-char "Append append-str through its final occurrence of char, or append nothing when char is absent." (function string string uint (pointer uint8))) +(define-extern string-strip-whitespace! "Remove spaces, tabs, carriage returns, and newlines from both ends of a string." (function string symbol)) +(define-extern string-get-int32!! "Consume the next argument, parse it as an integer, and store it in result." (function (pointer int32) string symbol)) +(define-extern string-get-float!! "Consume the next argument, parse it as a float, and store it in result." (function (pointer float) string symbol)) +(define-extern string-get-flag!! "Consume the next argument when it matches either flag; store true for first-flag and false for second-flag." (function (pointer symbol) string string string symbol)) ;; - Symbols @@ -2266,23 +2297,57 @@ ;; - Functions -(define-extern rand-vu (function float)) -(define-extern rand-vu-float-range (function float float float)) -(define-extern truncate (function float float)) -(define-extern integral? (function float symbol)) -(define-extern fractional-part (function float float)) -(define-extern log2 (function int int)) -(define-extern seek (function float float float float)) -(define-extern lerp (function float float float float)) -(define-extern lerp-scale (function float float float float float float)) -(define-extern lerp-clamp (function float float float float)) -(define-extern seekl (function int int int int)) -(define-extern rand-vu-init (function float float)) -(define-extern rand-vu-nostep (function float)) -(define-extern rand-vu-percent? (function float symbol)) -(define-extern rand-vu-int-range (function int int int)) -(define-extern rand-vu-int-count (function int int)) -(define-extern rand-uint31-gen (function random-generator uint)) +(define-extern rand-vu + "Advance the VU0 random state and return a sample in [0, 1)." + (function float)) +(define-extern rand-vu-float-range + "Return minimum + u * (maximum - minimum), where u is a VU0 random sample in [0, 1)." + (function float float float)) +(define-extern truncate + "Truncate x toward zero and return the integral value as a float." + (function float float)) +(define-extern integral? + "Return true when x has no fractional part." + (function float symbol)) +(define-extern fractional-part + "Return x minus its truncation toward zero; negative inputs produce a negative fraction." + (function float float)) +(define-extern log2 + "Extract the unbiased IEEE-754 exponent of x converted to float. For positive x, this is floor(log2(x))." + (function int int)) +(define-extern seek + "Move x toward target by at most nonnegative diff without overshooting." + (function float float float float)) +(define-extern lerp + "Linearly interpolate from minimum to maximum by the unclamped amount." + (function float float float float)) +(define-extern lerp-scale + "Map input from [min-in, max-in] to [min-out, max-out], clamping the normalized input to [0, 1]." + (function float float float float float float)) +(define-extern lerp-clamp + "Linearly interpolate from minimum to maximum after clamping amount to [0, 1]." + (function float float float float)) +(define-extern seekl + "Move integer x toward target by at most nonnegative diff without overshooting." + (function int int int int)) +(define-extern rand-vu-init + "Seed the VU0 random register and return its canonical [1, 2) float representation." + (function float float)) +(define-extern rand-vu-nostep + "Return the current VU0 random sample in [0, 1) without advancing the state." + (function float)) +(define-extern rand-vu-percent? + "Return true when the next VU0 random sample is less than or equal to probability." + (function float symbol)) +(define-extern rand-vu-int-range + "Return an integer between first and second inclusive, accepting either endpoint order." + (function int int int)) +(define-extern rand-vu-int-count + "Return a random integer in [0, maximum) for positive maximum." + (function int int)) +(define-extern rand-uint31-gen + "Multiply the generator state by 16807, fold the signed high product bits into the low word, and store a 31-bit result." + (function random-generator uint)) ;; - Symbols @@ -2307,11 +2372,13 @@ :size-assert #xd :flag-assert #xd0000000d (:methods - (new (symbol type int) _type_) ;; 0 - (get-bit (_type_ int) symbol) ;; 9 - (clear-bit (_type_ int) int) ;; 10 - (set-bit (_type_ int) int) ;; 11 - (clear-all! (_type_) _type_) ;; 12 + (new "Allocate a bit-array for length addressable bits." (symbol type int) _type_) ;; 0 + (length :override-doc "Return the active length in bits.") + (asize-of :override-doc "Return the nominal type size plus the rounded byte capacity. Because the dynamic bytes overlay _pad, this is one byte larger than the allocation.") + (get-bit "Return true when the bit at unchecked index i is set." (_type_ int) symbol) ;; 9 + (clear-bit "Clear the bit at unchecked index i and return zero." (_type_ int) int) ;; 10 + (set-bit "Set the bit at unchecked index i and return zero." (_type_ int) int) ;; 11 + (clear-all! "Clear every storage byte, including unused bits in the final byte, and return this array." (_type_) _type_) ;; 12 ) ) @@ -2570,8 +2637,14 @@ :size-assert #x28 :flag-assert #xb00000028 (:methods - (debug-draw (_type_ vector4w) none) ;; 9 - (ray-capsule-intersect (_type_ vector vector) float) ;; 10 + (debug-draw + "Draw a 16-sided wireframe capsule in color. Build one 24-point longitudinal strip, rotate +it around the capsule axis, and submit each connecting segment individually." + (_type_ vector4w) none) ;; 9 + (ray-capsule-intersect + "Test the finite probe origin + fraction * displacement against the cylindrical wall and both +hemispherical ends. Return the earliest zero-to-one fraction, or COLLISION_MISS." + (_type_ vector vector) float) ;; 10 ) ) @@ -2585,8 +2658,15 @@ :size-assert #x28 :flag-assert #xb00000028 (:methods - (debug-draw (_type_ vector4w) none) ;; 9 - (ray-flat-cyl-intersect (_type_ vector vector) float) ;; 10 + (debug-draw + "Draw a 16-sided wireframe flat-ended cylinder in color. Build one longitudinal strip from +the two cap centers and eight wall points, rotate it around the axis, and submit each connecting +segment individually." + (_type_ vector4w) none) ;; 9 + (ray-flat-cyl-intersect + "Test the finite probe origin + fraction * displacement against the cylindrical wall and both +filled end caps. Return the earliest zero-to-one fraction, or COLLISION_MISS." + (_type_ vector vector) float) ;; 10 ) ) @@ -2636,15 +2716,33 @@ ;; - Functions -(define-extern vector-dot (function vector vector float)) -(define-extern vector-dot-vu (function vector vector float)) -(define-extern vector4-dot (function vector vector float)) -(define-extern vector4-dot-vu (function vector vector float)) -(define-extern vector+! (function vector vector vector vector)) -(define-extern vector-! (function vector vector vector vector)) -(define-extern vector-zero! (function vector vector)) -(define-extern vector-reset! (function vector vector)) -(define-extern vector-copy! (function vector vector vector)) +(define-extern vector-dot + "Return the xyz dot product using the EE scalar floating-point accumulator." + (function vector vector float)) +(define-extern vector-dot-vu + "Return the xyz dot product using VU0 packed arithmetic." + (function vector vector float)) +(define-extern vector4-dot + "Return the xyzw dot product using the EE scalar floating-point accumulator." + (function vector vector float)) +(define-extern vector4-dot-vu + "Return the xyzw dot product using VU0 packed arithmetic." + (function vector vector float)) +(define-extern vector+! + "Set dst.xyz to a.xyz + b.xyz, set dst.w to 1.0, and return dst." + (function vector vector vector vector)) +(define-extern vector-! + "Set dst.xyz to a.xyz - b.xyz, set dst.w to 1.0, and return dst." + (function vector vector vector vector)) +(define-extern vector-zero! + "Set all four components of dst to zero and return dst." + (function vector vector)) +(define-extern vector-reset! + "Set dst to (0, 0, 0, 1) and return dst." + (function vector vector)) +(define-extern vector-copy! + "Copy all four components from src to dst as one aligned quadword and return dst." + (function vector vector vector)) ;; - Symbols @@ -2745,7 +2843,9 @@ ;; - Functions -(define-extern matrix-copy! (function matrix matrix matrix)) +(define-extern matrix-copy! + "Copy all four aligned rows from src to dst and return dst." + (function matrix matrix matrix)) ;; ---------------------- @@ -2859,8 +2959,12 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (debug-draw! (_type_) none) ;; 9 - (point-past-plane? (_type_ vector) symbol) ;; 10 + (debug-draw! + "Draw this plane's name, origin, and normal, using green for a load action and red otherwise." + (_type_) none) ;; 9 + (point-past-plane? + "Return whether point lies on the plane or on the side toward its normal." + (_type_ vector) symbol) ;; 10 ) ) @@ -2903,31 +3007,71 @@ :size-assert #x8c :flag-assert #x1c0000008c (:methods - (seek-toward-heading-vec! (_type_ vector float time-frame) quaternion) ;; 9 - (set-heading-vec! (_type_ vector) quaternion) ;; 10 - (seek-to-point-toward-point! (_type_ vector float time-frame) quaternion) ;; 11 - (point-toward-point! (_type_ vector) quaternion) ;; 12 - (seek-toward-yaw-angle! (_type_ float float time-frame) quaternion) ;; 13 - (set-yaw-angle-clear-roll-pitch! (_type_ float) quaternion) ;; 14 - (set-roll-to-grav! (_type_ float) quaternion) ;; 15 - (set-roll-to-grav-2! (_type_ float) quaternion) ;; 16 - (rotate-toward-orientation! (_type_ quaternion float float) quaternion) ;; 17 - (set-quaternion! (_type_ quaternion) quaternion) ;; 18 - (set-heading-vec-clear-roll-pitch! (_type_ vector) quaternion) ;; 19 - (point-toward-point-clear-roll-pitch! (_type_ vector) quaternion) ;; 20 - (rot->dir-targ! (_type_) quaternion) ;; 21 - (y-angle (_type_) float) ;; 22 - (global-y-angle-to-point (_type_ vector) float) ;; 23 - (relative-y-angle-to-point (_type_ vector) float) ;; 24 - (roll-relative-to-gravity (_type_) float) ;; 25 - (set-and-limit-velocity (_type_ int vector float) trsqv) ;; 26 - (get-quaternion (_type_) quaternion) ;; 27 + (seek-toward-heading-vec! + "Turn about world Y toward heading's XZ yaw. Clamp each frame's step by max-yaw-rate and +response-time. A fresh reversal requires one confirming frame unless no full turn has been accepted +for 0.2 seconds." + (_type_ vector float time-frame) quaternion) ;; 9 + (set-heading-vec! + "Immediately turn toward heading within the plane perpendicular to the current up direction, +preserving that up direction." + (_type_ vector) quaternion) ;; 10 + (seek-to-point-toward-point! + "Turn about world Y toward target-point from this position using max-yaw-rate and +response-time." + (_type_ vector float time-frame) quaternion) ;; 11 + (point-toward-point! + "Immediately turn toward target-point within the plane perpendicular to the current up +direction." + (_type_ vector) quaternion) ;; 12 + (seek-toward-yaw-angle! + "Turn toward yaw using max-yaw-rate and response-time." + (_type_ float float time-frame) quaternion) ;; 13 + (set-yaw-angle-clear-roll-pitch! + "Set yaw immediately with a horizontal forward direction and world +Y up." + (_type_ float) quaternion) ;; 14 + (set-roll-to-grav! + "Align local up with standard world up while retaining forward, then apply roll-offset." + (_type_ float) quaternion) ;; 15 + (set-roll-to-grav-2! + "Align local up with standard world up projected perpendicular to forward, rebuild the right +axis, then apply roll-offset about local Z." + (_type_ float) quaternion) ;; 16 + (rotate-toward-orientation! + "Rotate the current local Y axis toward target's Y axis at z-rate, then the resulting local Z +axis toward target's Z axis at y-rate. Each rate is converted to a per-frame maximum." + (_type_ quaternion float float) quaternion) ;; 17 + (set-quaternion! "Copy rotation into this transform." (_type_ quaternion) quaternion) ;; 18 + (set-heading-vec-clear-roll-pitch! + "Build an orientation from normalized heading and world +Y. This removes roll; a horizontal +heading also removes pitch." + (_type_ vector) quaternion) ;; 19 + (point-toward-point-clear-roll-pitch! + "Build an orientation toward target-point using world +Y. This removes roll; a target at the +same height also removes pitch." + (_type_ vector) quaternion) ;; 20 + (rot->dir-targ! "Copy the current rotation into dir-targ." (_type_) quaternion) ;; 21 + (y-angle "Return the current quaternion's yaw." (_type_) float) ;; 22 + (global-y-angle-to-point "Return the world yaw from this position to point." + (_type_ vector) float) ;; 23 + (relative-y-angle-to-point "Return the shortest yaw from this orientation toward point." + (_type_ vector) float) ;; 24 + (roll-relative-to-gravity + "Return signed roll relative to standard world up after projecting world up perpendicular to +the current forward axis." + (_type_) float) ;; 25 + (set-and-limit-velocity + "When flags includes bit four, copy desired-travel's XZ direction into this transform's +velocity and set its speed to the smaller of desired-travel's length converted to per-second speed +and max-speed. Leave the velocity unchanged otherwise." + (_type_ int vector float) trsqv) ;; 26 + (get-quaternion "Return the transform's quaternion storage." (_type_) quaternion) ;; 27 ) ) ;; - Functions -(define-extern deg-diff (function float float float)) +(define-extern deg-diff "Return the shortest signed rotation-unit difference from the first angle to the second." (function float float float)) (define-extern vector-y-angle (function vector float)) @@ -2951,17 +3095,23 @@ ;; - Functions -(define-extern atan (function float float float)) +(define-extern atan "Return atan2(y, x) in signed rotation units." (function float float float)) (define-extern matrix-4x4-determinant (function matrix float)) (define-extern matrix-3x3-determinant (function matrix float)) (define-extern matrix-axis-sin-cos! (function matrix vector float float matrix)) -(define-extern sin (function float float)) -(define-extern cos (function float float)) -(define-extern matrix-rotate-y! (function matrix float matrix)) -(define-extern matrix-rotate-x! (function matrix float matrix)) +(define-extern sin "Return sine for an angle in rotation units after wrapping it to a signed half-turn." (function float float)) +(define-extern cos "Return cosine for an angle in rotation units." (function float float)) +(define-extern matrix-rotate-y! + "Set dst to a homogeneous rotation about Y by angle in 65,536-units-per-turn rotation units." + (function matrix float matrix)) +(define-extern matrix-rotate-x! + "Set dst to a homogeneous rotation about X by angle in 65,536-units-per-turn rotation units." + (function matrix float matrix)) (define-extern matrix*! (function matrix matrix matrix matrix)) -(define-extern vector-sincos! (function vector vector vector int)) -(define-extern matrix-rotate-z! (function matrix float matrix)) +(define-extern vector-sincos! "Compute per-lane sine and cosine for angles in rotation units." (function vector vector vector int)) +(define-extern matrix-rotate-z! + "Set dst to a homogeneous rotation about Z by angle in 65,536-units-per-turn rotation units." + (function matrix float matrix)) (define-extern matrix-identity! (function matrix matrix)) (define-extern matrix-transpose! (function matrix matrix matrix)) (define-extern vector-rotate*! (function vector vector matrix vector)) @@ -3010,7 +3160,7 @@ ;; - Functions (define-extern transform-matrix-calc! (function transform matrix matrix)) -(define-extern vector-identity! (function vector vector)) +(define-extern vector-identity! "Set all four lanes of value to 1." (function vector vector)) (define-extern transform-matrix-parent-calc! (function transform matrix vector matrix)) (define-extern trs-matrix-calc! (function trs matrix matrix)) @@ -3025,27 +3175,27 @@ (define-extern quaternion->matrix (function matrix quaternion matrix)) (define-extern quaternion-vector-angle! (function quaternion vector float quaternion)) -(define-extern vector-xz-length (function vector float)) -(define-extern vector-xz-normalize! (function vector float vector)) -(define-extern quaternion-from-two-vectors-max-angle! (function quaternion vector vector float quaternion)) +(define-extern vector-xz-length "Return the Euclidean length of value.xz." (function vector float)) +(define-extern vector-xz-normalize! "Scale value.xz in place to the requested length when its current xz length is nonzero." (function vector float vector)) +(define-extern quaternion-from-two-vectors-max-angle! "Build the shortest-arc quaternion between two unit vectors, capped at max-angle." (function quaternion vector vector float quaternion)) (define-extern vector-z-quaternion! (function vector quaternion vector)) (define-extern quaternion-normalize! (function quaternion quaternion)) (define-extern quaternion*! (function quaternion quaternion quaternion quaternion)) -(define-extern acos (function float float)) +(define-extern acos "Return inverse cosine in rotation units." (function float float)) (define-extern vector-x-quaternion! (function vector quaternion vector)) (define-extern quaternion-y-angle (function quaternion float)) -(define-extern vector-rad<-vector-deg/2! (function vector vector int)) -(define-extern vector-sincos-rad! (function vector vector vector int)) +(define-extern vector-rad<-vector-deg/2! "Halve and wrap four rotation-unit angles, then convert them to radians." (function vector vector int)) +(define-extern vector-sincos-rad! "Compute per-lane sine and cosine for radian inputs in the supported polynomial interval." (function vector vector vector int)) (define-extern quaternion-dot (function quaternion quaternion float)) -(define-extern atan-series-rad (function float float)) -(define-extern vector-sin-rad! (function vector vector vector)) -(define-extern vector-length (function vector float)) -(define-extern sincos-rad! (function (pointer float) float int)) +(define-extern atan-series-rad "Evaluate atan in radians from reduced = (x-1)/(x+1), with pi/4 supplied by the polynomial's constant term." (function float float)) +(define-extern vector-sin-rad! "Compute per-lane sine for radian inputs in the supported polynomial interval." (function vector vector vector)) +(define-extern vector-length "Return the Euclidean length of value.xyz." (function vector float)) +(define-extern sincos-rad! "Write sine and cosine for a radian angle with the shared scalar polynomial." (function (pointer float) float int)) (define-extern quaternion-vector-len (function quaternion float)) -(define-extern atan2-rad (function float float float)) +(define-extern atan2-rad "Return atan2(y, x) in radians." (function float float float)) (define-extern matrix->quaternion (function quaternion matrix quaternion)) (define-extern quaternion-float*! (function quaternion quaternion float quaternion)) -(define-extern acos-rad (function float float)) +(define-extern acos-rad "Return inverse cosine in radians." (function float float)) (define-extern quaternion-norm (function quaternion float)) (define-extern quaternion-axis-angle! (function quaternion float float float float quaternion)) (define-extern vector-angle<-quaternion! (function vector quaternion vector)) @@ -3080,7 +3230,7 @@ (define-extern quaternion-rotate-x! (function quaternion quaternion float quaternion)) (define-extern quaternion-rotate-z! (function quaternion quaternion float quaternion)) (define-extern quaternion-delta-y (function quaternion quaternion float)) -(define-extern quaternion-rotate-y-to-vector! (function quaternion quaternion quaternion float quaternion)) +(define-extern quaternion-rotate-y-to-vector! (function quaternion quaternion vector float quaternion)) (define-extern vector-rotate-y! (function vector vector float vector)) (define-extern vector-x-angle (function vector float)) (define-extern quaterion<-rotate-y-vector (function quaternion vector quaternion)) @@ -3096,11 +3246,11 @@ ;; - Functions -(define-extern matrix->eul (function euler-angles matrix int euler-angles)) -(define-extern eul->matrix (function matrix euler-angles matrix)) -(define-extern set-eul! (function euler-angles float float float int euler-angles)) -(define-extern eul->quat (function quaternion euler-angles quaternion)) -(define-extern quat->eul (function euler-angles quaternion int euler-angles)) +(define-extern matrix->eul "Convert src-mat to the convention selected by packed Shoemake order. Repeated-axis and three-distinct-axis orders use separate formulas; near a coordinate singularity the underdetermined final angle is set to zero." (function euler-angles matrix int euler-angles)) +(define-extern eul->matrix "Convert src to a rotation matrix using its packed Shoemake Euler order. The order selects the initial axis, parity, whether the first axis repeats, and static- or rotating-frame interpretation." (function matrix euler-angles matrix)) +(define-extern set-eul! "Store three ordered Euler angles and their packed Shoemake order code." (function euler-angles float float float int euler-angles)) +(define-extern eul->quat "Convert src from its Euler convention to a quaternion." (function quaternion euler-angles quaternion)) +(define-extern quat->eul "Convert src to the Euler convention selected by order." (function euler-angles quaternion int euler-angles)) ;; ---------------------- @@ -3113,60 +3263,60 @@ -(define-extern vector-vector-distance-squared (function vector vector float)) +(define-extern vector-vector-distance-squared "Return the squared Euclidean distance between a.xyz and b.xyz." (function vector vector float)) -(define-extern vector-vector-distance (function vector vector float)) +(define-extern vector-vector-distance "Return the Euclidean distance between a.xyz and b.xyz." (function vector vector float)) (define-extern circle-circle-xz-intersect (function sphere sphere vector vector int)) -(define-extern vector-normalize-copy! (function vector vector float vector)) -(define-extern forward-up->quaternion (function quaternion vector vector quaternion)) -(define-extern matrix-from-two-vectors-partial-linear! (function matrix vector vector float matrix)) -(define-extern matrix-from-two-vectors-max-angle! (function matrix vector vector float matrix)) -(define-extern vector-negate! (function vector vector vector)) -(define-extern vector-normalize-ret-len! (function vector float float)) -(define-extern vector-flatten! (function vector vector vector vector)) -(define-extern vector-normalize! (function vector float vector)) -(define-extern vector-cross! (function vector vector vector vector)) -(define-extern forward-down->inv-matrix (function matrix vector vector matrix)) -(define-extern forward-up-nopitch->inv-matrix (function matrix vector vector matrix)) -(define-extern forward-down-nopitch->inv-matrix (function matrix vector vector matrix)) -(define-extern vector-float*! (function vector vector float vector)) -(define-extern vector+float*! (function vector vector vector float vector)) -(define-extern vector-reflect! (function vector vector vector vector)) -(define-extern vector-reflect-flat! (function vector vector vector vector)) -(define-extern vector-reflect-true-flat! (function vector vector vector vector)) -(define-extern vector-reflect-flat-above! (function vector vector vector vector)) -(define-extern vector-segment-distance-point! (function vector vector vector vector float)) -(define-extern vector-line-distance (function vector vector vector float)) -(define-extern vector-line-distance-point! (function vector vector vector vector float)) -(define-extern vector-orient-by-quat! (function vector vector quaternion vector)) -(define-extern forward-up-nopitch->quaternion (function quaternion vector vector quaternion)) -(define-extern quaternion-from-two-vectors! (function quaternion vector vector quaternion)) -(define-extern matrix-from-two-vectors! (function matrix vector vector matrix)) -(define-extern matrix-from-two-vectors-max-angle-partial! (function matrix vector vector float float matrix)) -(define-extern matrix-remove-z-rot (function matrix matrix matrix)) -(define-extern matrix-rot-diff! (function vector matrix matrix float)) -(define-extern quaternion-seek (function quaternion quaternion quaternion float float quaternion)) -(define-extern vector-deg-seek (function vector vector vector float vector)) -(define-extern vector-deg-slerp (function vector vector vector float vector)) -(define-extern vector-vector-deg-slerp! (function vector vector vector float vector vector)) ;; stack spills! -(define-extern normal-of-plane (function vector vector vector vector vector)) -(define-extern vector-3pt-cross! (function vector vector vector vector vector)) -(define-extern closest-pt-in-triangle (function vector vector matrix vector none)) ;; asm branches -(define-extern point-in-triangle-cross (function vector vector vector vector vector symbol)) -(define-extern point-in-plane-<-point+normal! (function vector vector vector vector)) -(define-extern circle-test (function none)) -(define-extern vector-circle-tangent-new (function vector vector vector vector none)) -(define-extern vector-circle-tangent (function vector vector vector vector none)) -(define-extern find-knot-span (function int int float (inline-array vector) int)) -(define-extern calculate-basis-functions-vector! (function vector int float (pointer float) vector)) +(define-extern vector-normalize-copy! "Scale value.xyz to the requested length into out, copy zero vectors unchanged, and set out.w to 1." (function vector vector float vector)) +(define-extern forward-up->quaternion "Build a quaternion from forward and up while retaining the pitch in forward." (function quaternion vector vector quaternion)) +(define-extern matrix-from-two-vectors-partial-linear! "Build a fractional shortest-arc rotation between two unit vectors by scaling the angle." (function matrix vector vector float matrix)) +(define-extern matrix-from-two-vectors-max-angle! "Build the shortest-arc rotation between two unit vectors, capped at max-angle." (function matrix vector vector float matrix)) +(define-extern vector-negate! "Negate value.xyz into out, set out.w to 1, and return out." (function vector vector vector)) +(define-extern vector-normalize-ret-len! "Scale value.xyz in place to the requested length and return its original length." (function vector float float)) +(define-extern vector-flatten! "Project src onto the plane through the origin with the given unit normal." (function vector vector vector vector)) +(define-extern vector-normalize! "Scale value.xyz in place to the requested length without changing w." (function vector float vector)) +(define-extern vector-cross! "Write the xyz cross product of a and b to out; w is unspecified." (function vector vector vector vector)) +(define-extern forward-down->inv-matrix "Build an inverse rotation matrix whose +z axis follows forward and -y points toward down." (function matrix vector vector matrix)) +(define-extern forward-up-nopitch->inv-matrix "Build an inverse rotation matrix from forward and up, taking pitch from up." (function matrix vector vector matrix)) +(define-extern forward-down-nopitch->inv-matrix "Build an inverse rotation matrix from forward and down, taking pitch from down." (function matrix vector vector matrix)) +(define-extern vector-float*! "Multiply value.xyz by scale, set out.w to 1, and return out." (function vector vector float vector)) +(define-extern vector+float*! "Set out.xyz to base.xyz + value.xyz * scale, set out.w to 1, and return out." (function vector vector vector float vector)) +(define-extern vector-reflect! "Reflect src across the plane through the origin with the given unit normal." (function vector vector vector vector)) +(define-extern vector-reflect-flat! "Replace src's component normal to the plane with the supplied unit normal." (function vector vector vector vector)) +(define-extern vector-reflect-true-flat! "Project src onto the plane through the origin with the given unit normal." (function vector vector vector vector)) +(define-extern vector-reflect-flat-above! "Apply a softened, capped collision response relative to the given plane normal." (function vector vector vector vector)) +(define-extern vector-segment-distance-point! "Return the distance from a point to a segment and optionally write the closest point." (function vector vector vector vector float)) +(define-extern vector-line-distance "Return the distance from a point to an infinite line through two points." (function vector vector vector float)) +(define-extern vector-line-distance-point! "Return the distance to an infinite line and optionally write the closest point." (function vector vector vector vector float)) +(define-extern vector-orient-by-quat! "Rotate src by a quaternion and write the result to dst." (function vector vector quaternion vector)) +(define-extern forward-up-nopitch->quaternion "Build a quaternion from forward and up, taking pitch from up." (function quaternion vector vector quaternion)) +(define-extern quaternion-from-two-vectors! "Build the shortest-arc quaternion rotating one unit vector onto another." (function quaternion vector vector quaternion)) +(define-extern matrix-from-two-vectors! "Build the shortest-arc rotation matrix between two unit vectors." (function matrix vector vector matrix)) +(define-extern matrix-from-two-vectors-max-angle-partial! "Build a fractional shortest-arc rotation capped at max-angle." (function matrix vector vector float float matrix)) +(define-extern matrix-remove-z-rot "Remove a matrix's twist about its local z axis relative to a reference matrix." (function matrix matrix matrix)) +(define-extern matrix-rot-diff! "Return the angular difference between two matrices and write its unit rotation axis." (function vector matrix matrix float)) +(define-extern quaternion-seek "Rotate a quaternion toward a target by a capped forward-axis correction." (function quaternion quaternion quaternion float float quaternion)) +(define-extern vector-deg-seek "Rotate one vector direction toward another by at most max-angle." (function vector vector vector float vector)) +(define-extern vector-deg-slerp "Spherically interpolate between two vector directions while preserving the first magnitude." (function vector vector vector float vector)) +(define-extern vector-vector-deg-slerp! "Interpolate direction around a shared up vector while linearly blending magnitude." (function vector vector vector float vector vector)) ;; stack spills! +(define-extern normal-of-plane "Compute a unit normal for the plane through three points." (function vector vector vector vector vector)) +(define-extern vector-3pt-cross! "Cross the two displacements from origin to point-a and point-b." (function vector vector vector vector vector)) +(define-extern closest-pt-in-triangle "Write the closest point on a triangle to the supplied point." (function vector vector matrix vector none)) ;; asm branches +(define-extern point-in-triangle-cross "Test whether a coplanar point lies inside a triangle using consistently oriented edge crosses." (function vector vector vector vector vector symbol)) +(define-extern point-in-plane-<-point+normal! "Construct a second point in a plane defined by one point and its normal." (function vector vector vector vector)) +(define-extern circle-test "Print a diagnostic example of xz circle intersection." (function none)) +(define-extern vector-circle-tangent-new "Write the two external tangent contact points for a pair of xz circles." (function vector vector vector vector none)) +(define-extern vector-circle-tangent "Write the two xz tangent points from an external point to a circle." (function vector vector vector vector none)) +(define-extern find-knot-span "Find the knot span containing a clamped parameter value." (function int int float (inline-array vector) int)) +(define-extern calculate-basis-functions-vector! "Compute the four nonzero cubic B-spline basis weights for a knot span." (function vector int float (pointer float) vector)) -(define-extern curve-closest-point (function curve vector float float int float float)) -(define-extern vector-plane-distance (function vector plane vector float)) +(define-extern curve-closest-point "Refine a normalized cubic B-spline parameter toward the point nearest a target." (function curve vector float float int float float)) +(define-extern vector-plane-distance "Return the signed distance from a point to a plane and write the plane normal." (function vector plane vector float)) -(define-extern curve-get-pos! (function vector float curve vector)) -(define-extern curve-evaluate! (function vector float (inline-array vector) int (pointer float) int vector)) -(define-extern curve-length (function curve float)) -(define-extern curve-copy! (function curve curve curve)) +(define-extern curve-get-pos! "Evaluate a curve at normalized input and write its position." (function vector float curve vector)) +(define-extern curve-evaluate! "Evaluate a clamped cubic nonuniform B-spline at normalized input." (function vector float (inline-array vector) int (pointer float) int vector)) +(define-extern curve-length "Estimate a curve's total length by uniform parameter sampling." (function curve float)) +(define-extern curve-copy! "Shallow-copy a curve descriptor, retaining its control-point and knot references." (function curve curve curve)) ;; ---------------------- @@ -3183,30 +3333,30 @@ ;; - Functions -(define-extern coserp180 (function float float float float)) -(define-extern coserp (function float float float float)) -(define-extern sinerp (function float float float float)) -(define-extern asin (function float float)) -(define-extern atan0 (function float float float)) -(define-extern sign (function float float)) -(define-extern vector-rad<-vector-deg! (function vector vector none)) -(define-extern deg- (function float float float)) -(define-extern radmod (function float float)) -(define-extern deg-seek (function float float float float)) -(define-extern deg-seek-smooth (function float float float float float)) -(define-extern deg-lerp-clamp (function float float float float)) -(define-extern sin-rad (function float float)) -(define-extern cos-rad (function float float)) -(define-extern vector-cos-rad! (function vector vector vector)) -(define-extern sincos! (function (pointer float) float int)) -(define-extern tan-rad (function float float)) -(define-extern tan (function float float)) -(define-extern atan-rad (function float float)) -(define-extern exp (function float float)) -(define-extern sinerp-clamp (function float float float float)) -(define-extern coserp-clamp (function float float float float)) -(define-extern coserp180-clamp (function float float float float)) -(define-extern ease-in-out (function int int float)) +(define-extern coserp180 "Interpolate with a half-cosine ease-in/ease-out curve." (function float float float float)) +(define-extern coserp "Interpolate with a quarter-cosine ease-in curve." (function float float float float)) +(define-extern sinerp "Interpolate with a quarter-sine ease-out curve." (function float float float float)) +(define-extern asin "Return inverse sine in rotation units." (function float float)) +(define-extern atan0 "Approximate atan(y/x) in rotation units after reducing about 45 degrees with (y-x)/(y+x); the caller handles signs and quadrants." (function float float float)) +(define-extern sign "Return -1, 0, or 1 according to a float's sign." (function float float)) +(define-extern vector-rad<-vector-deg! "Wrap four rotation-unit angles and convert them to radians." (function vector vector none)) +(define-extern deg- "Return the shortest signed rotation-unit difference angle minus reference." (function float float float)) +(define-extern radmod "Wrap a radian angle into the signed pi interval." (function float float)) +(define-extern deg-seek "Move a rotation-unit angle toward a target by at most max-diff along the shortest direction." (function float float float float)) +(define-extern deg-seek-smooth "Move a fraction toward a rotation-unit target, capped by max-diff." (function float float float float float)) +(define-extern deg-lerp-clamp "Interpolate along the shortest wrapped rotation-unit arc with a clamped amount." (function float float float float)) +(define-extern sin-rad "Return sine for a radian angle in the supported interval with a degree-nine odd minimax polynomial." (function float float)) +(define-extern cos-rad "Return cosine for a radian angle in the supported interval with a degree-eight even minimax polynomial." (function float float)) +(define-extern vector-cos-rad! "Compute per-lane cosine for radian inputs in the supported polynomial interval." (function vector vector vector)) +(define-extern sincos! "Write sine and cosine for a wrapped rotation-unit angle." (function (pointer float) float int)) +(define-extern tan-rad "Return sine divided by cosine using rotation units despite the historical name." (function float float)) +(define-extern tan "Return tangent for an angle in rotation units." (function float float)) +(define-extern atan-rad "Return inverse tangent in radians." (function float float)) +(define-extern exp "Approximate e^value with Tang-style range reduction. Saturate very large magnitudes, use 1+value for tiny inputs, and otherwise combine a split 2^(j/32) table, cubic residual, and directly constructed power-of-two exponent." (function float float)) +(define-extern sinerp-clamp "Apply quarter-sine interpolation with amount clamped to the endpoints." (function float float float float)) +(define-extern coserp-clamp "Apply quarter-cosine interpolation with amount clamped to the endpoints." (function float float float float)) +(define-extern coserp180-clamp "Apply half-cosine interpolation with amount clamped to the endpoints." (function float float float float)) +(define-extern ease-in-out "Map integer progress to a smooth zero-to-one sine/cosine ease." (function int int float)) ;; - Symbols @@ -3587,6 +3737,8 @@ (declare-type res-lump basic) (declare-type entity res-lump) (deftype ambient-sound (basic) + "A positioned background sound configured from a sound name, sound-spec, or entity resource. It +can update one continuous sound or schedule repeated one-shots with a base and random delay." ((spec sound-spec :offset-assert 4) (playing-id sound-id :offset-assert 8) (trans vector :inline :offset-assert 16) @@ -3608,12 +3760,20 @@ :size-assert #x6c :flag-assert #xe0000006c (:methods - (new (symbol type basic vector) _type_) ;; 0 - (update! (_type_) int) ;; 9 - (change-sound! (_type_ sound-name) int) ;; 10 - (update-trans! (_type_ vector) int) ;; 11 - (update-vol! (_type_ int) int) ;; 12 - (stop! (_type_) int) ;; 13 + (new "Create a positioned background sound from a name, sound-spec, or entity sound resource. +Entity cycle-speed supplies base and random delays in seconds, and effect-param supplies optional +playback parameters. Return zero when src does not identify a sound." + (symbol type basic vector) _type_) ;; 0 + (update! "Update continuous playback or start a scheduled one-shot when its timer expires. +Entity-backed sounds rebuild their shared specification and skip playback outside the far falloff +distance." (_type_) int) ;; 9 + (change-sound! "Stop playback and allocate a fresh sound ID when name changes." + (_type_ sound-name) int) ;; 10 + (update-trans! "Store a new position and queue a position update for the active sound." + (_type_ vector) int) ;; 11 + (update-vol! "Store volume-percent and queue the corresponding 0-to-1024 volume for the active +sound." (_type_ int) int) ;; 12 + (stop! "Queue a stop command for this background sound's current playback ID." (_type_) int) ;; 13 ) ) @@ -3704,16 +3864,16 @@ (:methods (new (symbol type) _type_) (get-last-frame-time-stamp (_type_) uint) ;; 9 - (reset (_type_) _type_) ;; 10 - (add-frame (_type_ symbol rgba) profile-frame) ;; 11 - (add-end-frame (_type_ symbol rgba) profile-frame) ;; 12 - (draw (_type_ dma-buffer int) float) ;; 13 + (reset "Clear the profile blocks and record the start of a new frame." (_type_) _type_) ;; 10 + (add-frame "Append a debug profile block stamped with the current EE timer count." (_type_ symbol rgba) profile-frame) ;; 11 + (add-end-frame "Append the final profile block at the frame's tick budget." (_type_ symbol rgba) profile-frame) ;; 12 + (draw "Draw the frame's timed profile blocks and return the cached worst duration as ticks or percent." (_type_ dma-buffer int) float) ;; 13 ) ) ;; - Functions -(define-extern timer-init (function timer-bank timer-mode int)) +(define-extern timer-init "Configure an EE hardware timer and clear its count." (function timer-bank timer-mode int)) ;; - Symbols @@ -3728,18 +3888,18 @@ ;; - Functions -(define-extern stopwatch-elapsed-ticks (function stopwatch time-frame)) -(define-extern timer-reset (function timer-bank none)) -(define-extern timer-count (function timer-bank uint)) -(define-extern disable-irq (function none)) -(define-extern enable-irq (function none)) -(define-extern stopwatch-init (function stopwatch int)) -(define-extern stopwatch-reset (function stopwatch int)) -(define-extern stopwatch-start (function stopwatch int)) -(define-extern stopwatch-stop (function stopwatch none)) -(define-extern stopwatch-begin (function stopwatch int)) -(define-extern stopwatch-end (function stopwatch none)) -(define-extern stopwatch-elapsed-seconds (function stopwatch float)) +(define-extern stopwatch-elapsed-ticks "Return accumulated CPU cycles, including the current running interval." (function stopwatch time-frame)) +(define-extern timer-reset "Clear an EE hardware timer counter." (function timer-bank none)) +(define-extern timer-count "Read an EE hardware timer counter." (function timer-bank uint)) +(define-extern disable-irq "Clear the global interrupt-enable bit." (function none)) +(define-extern enable-irq "Set the global interrupt-enable bit." (function none)) +(define-extern stopwatch-init "Initialize an idle stopwatch with no accumulated time." (function stopwatch int)) +(define-extern stopwatch-reset "Clear accumulated time and restart the current interval when running." (function stopwatch int)) +(define-extern stopwatch-start "Start an idle stopwatch from zero." (function stopwatch int)) +(define-extern stopwatch-stop "Stop a running stopwatch and accumulate its current interval." (function stopwatch none)) +(define-extern stopwatch-begin "Enter a nested timed region, starting the stopwatch at the outermost level." (function stopwatch int)) +(define-extern stopwatch-end "Leave a nested timed region, accumulating time when the outermost level ends." (function stopwatch none)) +(define-extern stopwatch-elapsed-seconds "Return the stopwatch's elapsed CPU time in seconds." (function stopwatch float)) ;; ---------------------- @@ -4008,11 +4168,11 @@ ;; - Functions -(define-extern dma-sync-fast (function dma-bank none)) -(define-extern dma-send-no-scratch (function dma-bank uint32 uint32 none)) -(define-extern dma-sync-with-count (function dma-bank (pointer int32) int)) +(define-extern dma-sync-fast "Wait for a DMA channel's start bit to clear. The EE polling loop deliberately leaves time between register reads so it does not contend with the transfer for the main bus." (function dma-bank none)) +(define-extern dma-send-no-scratch "Wait for a DMA channel, flush the cache, and start a normal-mode transfer from main memory. All channel-control fields except the start bit are cleared. This function is unused." (function dma-bank uint32 uint32 none)) +(define-extern dma-sync-with-count "If a DMA channel is active, wait for it to finish and increment the caller's polling count once per sample. This function is unused." (function dma-bank (pointer int32) int)) ; -(define-extern dma-count-until-done (function dma-bank (pointer int32) int)) +(define-extern dma-count-until-done "Wait for a DMA channel to finish and increment the caller's polling count for every sample, including the final inactive sample. This function is unused." (function dma-bank (pointer int32) int)) ;; - Symbols @@ -4124,8 +4284,8 @@ (sprite 16) (shadow 17) (depth-cue 18) - (nineteen 19) - (twenty 20) + (reserved-19 19) + (reserved-20 20) ) (define-extern *vu1-enable-user-menu* vu1-renderer-mask) @@ -4144,25 +4304,25 @@ (define-extern dma-sync (function pointer int int int)) (define-extern reset-path (function none)) (define-extern reset-graph (function int int int int none)) -(define-extern dma-sync-hang (function dma-bank none)) -(define-extern dma-sync-crash (function dma-bank none)) -(define-extern dma-send (function dma-bank uint uint none)) -(define-extern dma-send-chain (function dma-bank-source uint none)) -(define-extern dma-send-chain-no-tte (function dma-bank-source uint none)) -(define-extern dma-send-chain-no-flush (function dma-bank-source uint none)) -(define-extern dma-send-to-spr (function uint uint uint symbol none)) -(define-extern dma-send-to-spr-no-flush (function uint uint uint symbol none)) -(define-extern dma-send-from-spr (function uint uint uint symbol none)) -(define-extern dma-send-from-spr-no-flush (function uint uint uint symbol none)) -(define-extern dma-initialize (function none)) -(define-extern clear-vu0-mem (function none)) -(define-extern clear-vu1-mem (function none)) -(define-extern dump-vu1-mem (function none)) -(define-extern dump-vu1-range (function uint uint symbol)) -(define-extern reset-vif1-path (function none)) -(define-extern ultimate-memcpy (function pointer pointer uint none)) -(define-extern symlink2 (function none)) -(define-extern symlink3 (function none)) +(define-extern dma-sync-hang "Wait indefinitely for a DMA channel to finish. This tight polling loop is slower than dma-sync-fast because its register reads contend with the transfer for the main bus. This function is unused." (function dma-bank none)) +(define-extern dma-sync-crash "Wait up to five million polls for a DMA channel to finish, then crash. This function is unused." (function dma-bank none)) +(define-extern dma-send "Wait for a channel, flush the cache, and start a normal-mode DMA transfer. The source may be in main memory or scratchpad." (function dma-bank uint uint none)) +(define-extern dma-send-chain "Wait for a channel, flush the cache, and start a source-chain DMA with tag transfer enabled." (function dma-bank-source uint none)) +(define-extern dma-send-chain-no-tte "Wait for a channel, flush the cache, and start a source-chain DMA without transferring its tags. This function is unused." (function dma-bank-source uint none)) +(define-extern dma-send-chain-no-flush "Wait for a channel and start a source-chain DMA with tag transfer enabled without first flushing the data cache." (function dma-bank-source uint none)) +(define-extern dma-send-to-spr "Transfer quadwords from main memory to scratchpad, optionally waiting for completion." (function uint uint uint symbol none)) +(define-extern dma-send-to-spr-no-flush "Transfer quadwords from main memory to scratchpad without flushing the data cache, optionally waiting for completion." (function uint uint uint symbol none)) +(define-extern dma-send-from-spr "Transfer quadwords from scratchpad to main memory, optionally waiting for completion." (function uint uint uint symbol none)) +(define-extern dma-send-from-spr-no-flush "Transfer quadwords from scratchpad to main memory without flushing the data cache, optionally waiting for completion." (function uint uint uint symbol none)) +(define-extern dma-initialize "Mask the VIF0 and VIF1 DMAtag mismatch error required by the EE hardware workaround." (function none)) +(define-extern clear-vu0-mem "Fill all 4 KiB of VU0 data memory with #xabadbeef through the EE memory map." (function none)) +(define-extern clear-vu1-mem "Fill all 16 KiB of VU1 data memory with #xabadbeef through the EE memory map." (function none)) +(define-extern dump-vu1-mem "Print all 1024 quadwords of VU1 data memory as hexadecimal words and floats." (function none)) +(define-extern dump-vu1-range "Print a range of VU1 data-memory quadwords as hexadecimal words and floats." (function uint uint symbol)) +(define-extern reset-vif1-path "Print the VIF1 register state and reset the VIF1 and GS paths after a stalled transfer." (function none)) +(define-extern ultimate-memcpy "Copy a multiple of sixteen bytes in ascending order using the 4 KiB scratchpad as a DMA staging buffer." (function pointer pointer uint none)) +(define-extern symlink2 "Apply one version-2 symbol-relocation run to object data and return the next relocation-table byte." (function pointer pointer (pointer uint8) (pointer uint8))) +(define-extern symlink3 "Apply one version-3 symbol-relocation run to object data and return the next relocation-table byte." (function pointer pointer (pointer uint8) (pointer uint8))) ;; - Symbols @@ -4195,12 +4355,9 @@ :flag-assert #x900000010 ) -;; change this type when you want the decompiler to output nice gif-tags, -;; change it back when you're done or other stuff breaks. -;; ND did something REALLY strange with these and now we have to suffer from it (deftype dma-gif-packet (structure) ((dma-vif dma-packet :inline :offset-assert 0) - (gif uint64 2 :offset-assert 16) ;; guess + (gif uint64 2 :offset-assert 16) (gif0 uint64 :offset 16 :score 1) (gif1 uint64 :offset 24 :score 1) (quad uint128 2 :offset 0) @@ -4214,11 +4371,13 @@ ((allocated-length int32 :offset-assert 4) (base pointer :offset-assert 8) (end pointer :offset-assert 12) - (data uint64 1 :offset-assert 16) ;; weird, I guess this aligns the data? - (data-buffer uint8 :dynamic :offset 16) + (data uint64 1 :offset-assert 16) ;; payload begins here + (data-buffer uint8 :dynamic :offset 16) ;; byte overlay for dynamic payload access ) (:methods - (new (symbol type int) _type_) ;; 0 + (new "Allocate a dma-buffer with byte-capacity bytes of payload storage." (symbol type int) _type_) ;; 0 + (length :override-doc "Return the payload capacity in bytes.") + (asize-of :override-doc "Return the complete allocation size, including the dma-buffer header and payload.") ) :method-count-assert 9 :size-assert #x18 @@ -4227,12 +4386,12 @@ ;; - Functions -(define-extern dma-buffer-length (function dma-buffer int)) -(define-extern dma-buffer-inplace-new (function dma-buffer int dma-buffer)) -(define-extern dma-buffer-free (function dma-buffer int)) -(define-extern dma-buffer-add-vu-function (function dma-buffer vu-function int symbol)) -(define-extern dma-buffer-send (function dma-bank dma-buffer none)) -(define-extern dma-buffer-send-chain (function dma-bank-source dma-buffer none)) +(define-extern dma-buffer-length "Return the number of occupied quadwords, rounding a partial final quadword up." (function dma-buffer int)) +(define-extern dma-buffer-inplace-new "Initialize dma-buffer storage in place with byte-capacity bytes. The caller is responsible for the object's type and end pointer." (function dma-buffer int dma-buffer)) +(define-extern dma-buffer-free "Return the number of quadwords between the write cursor and end pointer, rounding a partial final quadword up." (function dma-buffer int)) +(define-extern dma-buffer-add-vu-function "Append reference packets that upload a VU microprogram in chunks of at most 127 quadwords." (function dma-buffer vu-function int symbol)) +(define-extern dma-buffer-send "Validate and send the occupied buffer as a normal DMA transfer without interpreting tags." (function dma-bank dma-buffer none)) +(define-extern dma-buffer-send-chain "Validate and send the buffer as a DMA source chain." (function dma-bank-source dma-buffer none)) ;; ---------------------- @@ -4243,9 +4402,9 @@ ;; - Functions -(define-extern dma-buffer-add-buckets (function dma-buffer int (inline-array dma-bucket))) -(define-extern dma-buffer-patch-buckets (function (inline-array dma-bucket) int (inline-array dma-bucket))) -(define-extern dma-bucket-insert-tag (function (inline-array dma-bucket) bucket-id pointer (pointer dma-tag) pointer)) +(define-extern dma-buffer-add-buckets "Reserve and initialize count consecutive DMA bucket headers at the buffer's write cursor." (function dma-buffer int (inline-array dma-bucket))) +(define-extern dma-buffer-patch-buckets "Splice each bucket tail to the following bucket header and return the address just after the patched headers." (function (inline-array dma-bucket) int (inline-array dma-bucket))) +(define-extern dma-bucket-insert-tag "Append a DMA chain to one bucket by patching its previous tail and recording the new tail." (function (inline-array dma-bucket) bucket-id pointer (pointer dma-tag) pointer)) ;; ---------------------- @@ -4271,10 +4430,10 @@ ;; - Functions -(define-extern disasm-dma-tag (function dma-tag symbol none)) -(define-extern disasm-vif-tag (function (pointer vif-tag) int symbol symbol int)) -(define-extern disasm-vif-details (function symbol (pointer uint8) vif-cmd int symbol)) -(define-extern disasm-dma-list (function dma-packet symbol symbol symbol int symbol)) +(define-extern disasm-dma-tag "Print one DMA tag in constructor-style notation, omitting zero-valued optional fields." (function dma-tag symbol none)) +(define-extern disasm-vif-tag "Decode VIF commands from word-count words, optionally print supported payload formats, and return the number of bytes consumed past the requested boundary." (function (pointer vif-tag) int symbol symbol int)) +(define-extern disasm-vif-details "Print element data for the supported VIF UNPACK formats." (function symbol (pointer uint8) vif-cmd int symbol)) +(define-extern disasm-dma-list "Validate and print a DMA source chain, optionally decoding its VIF commands. Return false after an invalid pointer, reserved tag bits, unknown command, or self-loop." (function dma-packet symbol symbol symbol int symbol)) ;; - Symbols @@ -4325,7 +4484,7 @@ (change-time time-frame :offset-assert 128) ) (:methods - (new (symbol type int) _type_) ;; 0 + (new "Allocate one controller record, open pad-index through the kernel, and reset its input state." (symbol type int) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x88 @@ -4337,7 +4496,7 @@ (cpads cpad-info 4 :offset-assert 8) ;; guess, modified from 2->4 for PC 4-pad support ) (:methods - (new (symbol type) _type_) ;; 0 + (new "Allocate the controller list and construct each configured controller record." (symbol type) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x18 @@ -4346,16 +4505,16 @@ ;; - Functions -(define-extern cpad-set-buzz! (function cpad-info int int time-frame none)) +(define-extern cpad-set-buzz! "Request one vibration motor at amount for duration. Zero stops immediately, an equal amount extends its deadline, a stronger amount replaces it, and a weaker request is ignored." (function cpad-info int int time-frame none)) (define-extern cpad-get-data (function cpad-info cpad-info)) -(define-extern get-current-time (function time-frame)) -(define-extern get-integral-current-time (function time-frame)) -(define-extern cpad-invalid! (function cpad-info cpad-info)) +(define-extern get-current-time "Return the 300-Hz gameplay clock, which advances with unpaused game time independently of video mode and missed frames." (function time-frame)) +(define-extern get-integral-current-time "Return the integral display-frame clock, including vertical blanks missed while a frame was late." (function time-frame)) +(define-extern cpad-invalid! "Mark a controller invalid and reset its buttons, sticks, pressure values, and vibration controls to neutral defaults." (function cpad-info cpad-info)) ;; in the kernel. (define-extern cpad-open (function cpad-info int cpad-info)) -(define-extern analog-input (function int float float float float float)) -(define-extern service-cpads (function cpad-list)) -(define-extern buzz-stop! (function int none)) +(define-extern analog-input "Center a raw axis, remove its dead zone, clamp its magnitude at full-scale, and map it to the signed output range." (function int float float float float float)) +(define-extern service-cpads "Poll every controller, update vibration, button edges, left-stick polar state, and the last-input time, then return the controller list." (function cpad-list)) +(define-extern buzz-stop! "Stop both vibration motors on pad-index." (function int none)) ;; - Symbols @@ -4961,7 +5120,7 @@ (args uint64 1 :offset-assert 32) ) (:methods - (new (symbol type int) _type_) ;; 0 + (new "Allocate a register-list GIF packet with capacity for register-count 64-bit values." (symbol type int) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x28 @@ -4977,7 +5136,7 @@ (color rgba 4 :offset-assert 24) ) (:methods - (new (symbol type int int int int rgba) _type_) ;; 0 + (new "Allocate a drawing context, scale its vertical origin and height for the video mode, and set its initial color." (symbol type int int int int rgba) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x28 @@ -4986,14 +5145,14 @@ ;; - Functions -(define-extern psm-size (function gs-psm int)) -(define-extern psm-page-height (function gs-psm int)) -(define-extern psm->string (function gs-psm string)) -(define-extern default-buffer-init (function dma-buffer none)) -(define-extern open-gif-packet (function gif-packet gif-packet)) -(define-extern add-reg-gif-packet (function gif-packet int int none)) -(define-extern close-gif-packet (function gif-packet int gif-packet)) -(define-extern draw-context-set-xy (function draw-context int int none)) +(define-extern psm-size "Return the GS storage scale for texture-format: 32 for 4-bit, 64 for 8-bit, 128 for 16-bit, and 256 otherwise." (function gs-psm int)) +(define-extern psm-page-height "Return the GS page height in pixels for texture-format." (function gs-psm int)) +(define-extern psm->string "Return the symbolic name of texture-format." (function gs-psm string)) +(define-extern default-buffer-init "Reset buffer and fill it with a FLUSHA/DIRECT packet that restores the default GS drawing registers, followed by a RET tag." (function dma-buffer none)) +(define-extern open-gif-packet "Reset packet to an empty register-list packet." (function gif-packet gif-packet)) +(define-extern add-reg-gif-packet "Append one GS register identifier and 64-bit value to packet." (function gif-packet int int none)) +(define-extern close-gif-packet "Finish packet's GIF tag with its accumulated register count and the requested end-of-packet bit." (function gif-packet int gif-packet)) +(define-extern draw-context-set-xy "Set a drawing context's origin, scaling y for the current video mode." (function draw-context int int none)) ;; - Symbols @@ -5057,7 +5216,7 @@ (run-time int64 :offset 56) ) (:methods - (new (symbol type) _type_) ;; 0 + (new "Allocate one renderer workspace and initialize its DMA buffers and optional debug profile bars." (symbol type) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x40 @@ -5117,15 +5276,15 @@ :size-assert #x39c :flag-assert #xa0000039c (:methods - (new (symbol type int int int int int) _type_) ;; 0 - (set-time-ratios (_type_ float) float) ;; 9 + (new "Allocate the display state, configure its framebuffer formats and dimensions, and bind the three GS environments to two renderer workspaces over a six-slot cycle." (symbol type int int int int int) _type_) ;; 0 + (set-time-ratios "Set the display timing conversions for slowdown, clamping the effective slowdown to four." (_type_ float) float) ;; 9 ) ) ;; - Functions -(define-extern set-display (function display int int int int int display)) -(define-extern put-draw-env (function (pointer gif-tag) none)) +(define-extern set-display "Initialize the display and draw environments, bind the two framebuffers, and seed the frame counters." (function display int int int int int display)) +(define-extern put-draw-env "Send the GIF packet beginning at packet as a direct GS draw-environment transfer." (function (pointer gif-tag) none)) (define-extern *pre-draw-hook* (function object none)) (define-extern *post-draw-hook* (function dma-buffer none)) @@ -5138,61 +5297,61 @@ ;; - Functions -(define-extern vector+float! (function vector vector float vector)) -(define-extern vector*! (function vector vector vector vector)) -(define-extern vector+*! (function vector vector vector float vector)) -(define-extern vector-*! (function vector vector vector float vector)) -(define-extern vector/! (function vector vector vector vector)) -(define-extern vector-average! (function vector vector vector vector)) -(define-extern vector--float*! (function vector vector vector float vector)) -(define-extern vector-float/! (function vector vector float vector)) -(define-extern vector-negate-in-place! (function vector vector)) -(define-extern vector= (function vector vector symbol)) -(define-extern vector-delta (function vector vector float)) -(define-extern vector-seek! (function vector vector float vector)) -(define-extern vector-seek-2d-xz-smooth! (function vector vector float float vector)) -(define-extern vector-seek-2d-yz-smooth! (function vector vector float float vector)) -(define-extern vector-seek-3d-smooth! (function vector vector float float vector)) -(define-extern seek-with-smooth (function float float float float float float)) -(define-extern vector-seconds (function vector vector vector)) -(define-extern vector-seconds! (function vector vector)) -(define-extern vector-v! (function vector vector)) -(define-extern vector-v+! (function vector vector vector vector)) -(define-extern vector-v*float+! (function vector vector vector float vector)) -(define-extern vector-v++! (function vector vector vector)) -(define-extern vector-v*float! (function vector vector float vector)) -(define-extern vector-v*float++! (function vector vector float vector)) -(define-extern vector-to-ups! (function vector vector vector)) -(define-extern vector-from-ups! (function vector vector vector)) -(define-extern vector-length-squared (function vector float)) -(define-extern vector-xz-length-squared (function vector float)) -(define-extern vector-vector-xz-distance (function vector vector float)) -(define-extern vector-vector-xz-distance-squared (function vector vector float)) -(define-extern vector-length-max! (function vector float vector)) -(define-extern vector-xz-length-max! (function vector float vector)) -(define-extern vector-rotate-around-y! (function vector vector float vector)) -(define-extern rotate-y<-vector+vector (function vector vector float)) -(define-extern vector-cvt.w.s! (function vector vector vector)) -(define-extern vector-cvt.s.w! (function vector vector vector)) -(define-extern rot-zxy-from-vector! (function vector vector vector)) -(define-extern rot-zyx-from-vector! (function vector vector vector)) -(define-extern vector-lerp! (function vector vector vector float vector)) -(define-extern vector-lerp-clamp! (function vector vector vector float vector)) -(define-extern vector4-lerp! (function vector vector vector float vector)) -(define-extern vector4-lerp-clamp! (function vector vector vector float vector)) -(define-extern vector-degi (function vector vector vector)) -(define-extern vector-degf (function vector vector vector)) -(define-extern vector-degmod (function vector vector vector)) -(define-extern vector-deg-diff (function vector vector vector none)) -(define-extern vector-deg-lerp-clamp! (function vector vector vector float vector)) ;; todo -(define-extern vector3s-copy! (function vector vector vector)) -(define-extern vector3s+! (function vector vector vector vector)) -(define-extern vector3s*float! (function vector vector float vector)) -(define-extern vector3s-! (function vector vector vector vector)) -(define-extern spheres-overlap? (function sphere sphere symbol)) -(define-extern sphere<-vector! (function sphere vector sphere)) -(define-extern sphere<-vector+r! (function sphere vector float sphere)) -(define-extern rand-vu-sphere-point! (function vector float vector)) ;; todo +(define-extern vector+float! "Add one scalar to value.xyz, write out.w as 1, and return out." (function vector vector float vector)) +(define-extern vector*! "Multiply a.xyz and b.xyz componentwise, write out.w as 1, and return out." (function vector vector vector vector)) +(define-extern vector+*! "Set out.xyz to base.xyz + value.xyz * scale, set out.w to 1, and return out." (function vector vector vector float vector)) +(define-extern vector-*! "Set out.xyz to base.xyz - value.xyz * scale, set out.w to 1, and return out." (function vector vector vector float vector)) +(define-extern vector/! "Divide numerator.xyz by denominator.xyz, overlap the EE and VU divides, set out.w to 1, and return out." (function vector vector vector vector)) +(define-extern vector-average! "Average a.xyz and b.xyz, set out.w to 1, and return out." (function vector vector vector vector)) +(define-extern vector--float*! "Set out.xyz to base.xyz - value.xyz * scale, set out.w to 1, and return out." (function vector vector vector float vector)) +(define-extern vector-float/! "Divide value.xyz by divisor, set out.w to 1, and return out." (function vector vector float vector)) +(define-extern vector-negate-in-place! "Negate value.xyz in place without changing w." (function vector vector)) +(define-extern vector= "Return true when the bit patterns of a.xyz and b.xyz match; w is ignored." (function vector vector symbol)) +(define-extern vector-delta "Return the Manhattan distance between a.xyz and b.xyz." (function vector vector float)) +(define-extern vector-seek! "Move each component of value.xyz toward target.xyz by at most max-step and set w to 1." (function vector vector float vector)) +(define-extern vector-seek-2d-xz-smooth! "Move vec toward target in xz by alpha times the error, limiting the step length to max-step." (function vector vector float float vector)) +(define-extern vector-seek-2d-yz-smooth! "Move vec toward target in yz by alpha times the error, limiting the step length to max-step." (function vector vector float float vector)) +(define-extern vector-seek-3d-smooth! "Move vec toward target in xyz by alpha times the error, limiting the step length to max-step." (function vector vector float float vector)) +(define-extern seek-with-smooth "Move value toward target by alpha times the error, snap inside deadband, and clamp the step to max-step." (function float float float float float float)) +(define-extern vector-seconds "Convert seconds.xyz to the engine's time units and write out.xyz." (function vector vector vector)) +(define-extern vector-seconds! "Convert seconds.xyz to the engine's time units in place." (function vector vector)) +(define-extern vector-v! "Convert a per-second velocity to displacement per frame in place." (function vector vector)) +(define-extern vector-v+! "Advance position by one frame of velocity and write result." (function vector vector vector vector)) +(define-extern vector-v*float+! "Advance position by one frame of scaled velocity and write result." (function vector vector vector float vector)) +(define-extern vector-v++! "Advance position in place by two frame displacements of velocity." (function vector vector vector)) +(define-extern vector-v*float! "Convert velocity to a scaled displacement per frame and write delta-p." (function vector vector float vector)) +(define-extern vector-v*float++! "Advance position in place by one frame of scaled velocity." (function vector vector float vector)) +(define-extern vector-to-ups! "Convert per-frame.xyz to units per second, set out.w to 1, and return out." (function vector vector vector)) +(define-extern vector-from-ups! "Convert per-second.xyz to units per frame, set out.w to 1, and return out." (function vector vector vector)) +(define-extern vector-length-squared "Return the squared Euclidean length of value.xyz." (function vector float)) +(define-extern vector-xz-length-squared "Return the squared Euclidean length of value.xz." (function vector float)) +(define-extern vector-vector-xz-distance "Return the Euclidean distance between a and b in the xz plane." (function vector vector float)) +(define-extern vector-vector-xz-distance-squared "Return the squared distance between a and b in the xz plane." (function vector vector float)) +(define-extern vector-length-max! "Limit value.xyz to maximum length without changing its direction or w." (function vector float vector)) +(define-extern vector-xz-length-max! "Limit value.xz to maximum length without changing its direction, y, or w." (function vector float vector)) +(define-extern vector-rotate-around-y! "Rotate value around the y axis by angle and write out." (function vector vector float vector)) +(define-extern rotate-y<-vector+vector "Return the signed y rotation from the first vector to the second." (function vector vector float)) +(define-extern vector-cvt.w.s! "Truncate four floating-point lanes to signed 32-bit integers." (function vector vector vector)) +(define-extern vector-cvt.s.w! "Convert four signed 32-bit integer lanes to floating point." (function vector vector vector)) +(define-extern rot-zxy-from-vector! "Compute yaw and pitch that orient a forward vector along forward using ZXY rotation order; roll is zero." (function vector vector vector)) +(define-extern rot-zyx-from-vector! "Compute pitch and yaw that orient a forward vector along forward using ZYX rotation order; roll is zero." (function vector vector vector)) +(define-extern vector-lerp! "Interpolate a.xyz toward b.xyz by unclamped alpha, set out.w to 1, and return out." (function vector vector vector float vector)) +(define-extern vector-lerp-clamp! "Interpolate a.xyz toward b.xyz by alpha clamped to [0, 1], set out.w to 1, and return out." (function vector vector vector float vector)) +(define-extern vector4-lerp! "Interpolate all four lanes from a to b by unclamped alpha." (function vector vector vector float vector)) +(define-extern vector4-lerp-clamp! "Interpolate all four lanes from a to b by alpha clamped to [0, 1]." (function vector vector vector float vector)) +(define-extern vector-degi "Truncate rotation-unit floats, shift each packed word left 16 bits, and write the uncommon integer angle form." (function vector vector vector)) +(define-extern vector-degf "Arithmetic-shift packed angle words right 16 bits and convert them to rotation-unit floats." (function vector vector vector)) +(define-extern vector-degmod "Wrap four rotation-unit floats to signed 16-bit angular range." (function vector vector vector)) +(define-extern vector-deg-diff "Write the signed wrapped 16-bit angular difference a - b for all four lanes." (function vector vector vector none)) +(define-extern vector-deg-lerp-clamp! "Apply clamped shortest-angle interpolation to three lanes and set out.w to 1." (function vector vector vector float vector)) +(define-extern vector3s-copy! "Copy value.xyz to out without changing out.w." (function vector vector vector)) +(define-extern vector3s+! "Add a.xyz and b.xyz into out without changing out.w." (function vector vector vector vector)) +(define-extern vector3s*float! "Multiply value.xyz by scale into out without changing out.w." (function vector vector float vector)) +(define-extern vector3s-! "Subtract b.xyz from a.xyz into out without changing out.w." (function vector vector vector vector)) +(define-extern spheres-overlap? "Return true when the center distance is no greater than the sum of the radii." (function sphere sphere symbol)) +(define-extern sphere<-vector! "Copy center.xyz into out while preserving its radius." (function sphere vector sphere)) +(define-extern sphere<-vector+r! "Copy center.xyz and radius into out." (function sphere vector float sphere)) +(define-extern rand-vu-sphere-point! "Choose a cube-sampled direction, normalize it to a random length in [0, radius], and write out." (function vector float vector)) ;; - Symbols @@ -5212,9 +5371,9 @@ (mode symbol :offset-assert 8) (name string :offset-assert 12) (file uint32 :offset-assert 16) - ) + ) (:methods - (new (symbol type string symbol) _type_) + (new "Allocate and open a file stream with the requested name and mode." (symbol type string symbol) _type_) ) :method-count-assert 9 :size-assert #x14 @@ -5240,10 +5399,10 @@ (define-extern file-stream-read (function file-stream pointer int int)) (define-extern file-stream-open (function file-stream basic basic file-stream)) (define-extern file-stream-length (function file-stream int)) -(define-extern file-stream-read-string (function file-stream string string)) -(define-extern make-file-name (function file-kind string int symbol string)) -(define-extern make-vfile-name (function file-kind string string)) -(define-extern file-info-correct-version? (function file-info file-kind int symbol)) +(define-extern file-stream-read-string "Read stream data into destination and return it; this legacy helper does not update the string length." (function file-stream string string)) +(define-extern make-file-name "Build the path for a versioned game-data file in the shared temporary string. A positive art-group-version overrides the default art-group version. The final argument is unused." (function file-kind string int symbol string)) +(define-extern make-vfile-name "Build a kernel virtual path for a level or art-group file in the shared temporary string." (function file-kind string string)) +(define-extern file-info-correct-version? "Return true when a file header has the expected kind and major version, printing an error otherwise." (function file-info file-kind int symbol)) ;; - Symbols @@ -5267,10 +5426,20 @@ ) :flag-assert #xb00000010 (:methods - (new (symbol type int level) _type_) ;; 0 + (new "Allocate a load directory and its parallel name and data arrays with capacity for length entries." (symbol type int level) _type_) ;; 0 + (mem-usage :override-doc + "Account for the directory and both parallel arrays in the array memory category, then add +the memory owned by every loaded data object. Pass flags through to each child.") ;; these methods dont exist for this type - (load-to-heap-by-name (_type_ string symbol kheap int) art-group) ;; 9 - (set-loaded-art (_type_ art-group) art-group) ;; 10 + (load-to-heap-by-name + "Return the art group named art-name from this directory. If it is already present, reload +and replace it only when do-reload is true and the new debug load succeeds. Otherwise load, +validate, and append a new entry. Return #f when a new load fails." + (_type_ string symbol kheap int) art-group) ;; 9 + (set-loaded-art + "Insert an already loaded group. Replace the group with the same name when present; +otherwise append its name and pointer to the parallel arrays." + (_type_ art-group) art-group) ;; 10 ) ) @@ -5280,7 +5449,7 @@ ) :flag-assert #xb00000010 (:methods - (new (symbol type int level) _type_) ;; 0 + (new "Allocate a load directory whose data array contains art groups." (symbol type int level) _type_) ;; 0 ) ) @@ -5307,22 +5476,41 @@ :size-assert #x68 :flag-assert #x1000000068 (:methods - (new (symbol type int) _type_) ;; 0 - (set-pending-file (_type_ string int handle float) int) ;; 9 - (update (_type_) int) ;; 10 - (inactive? (_type_) symbol) ;; 11 - (file-status (_type_ string int) symbol) ;; 12 - (link-file (_type_ art-group) art-group) ;; 13 - (unlink-file (_type_ art-group) int) ;; 14 - (unlock! (_type_) symbol) ;; 15 + (new "Allocate an external art buffer in its initialized, empty state." (symbol type int) _type_) ;; 0 + (set-pending-file + "Set the file part, owning process handle, and priority that this buffer should service on +its next update." + (_type_ string int handle float) int) ;; 9 + (update + "Advance this buffer's streaming state. Adopt changed pending requests, cancel displaced +loads, initialize the fixed spool heap, start and poll the aligned STR transfer, link and validate +the resulting art group, serialize activation with the other buffer, and unload data whose request +was cleared. Requests whose owner no longer exists are discarded." + (_type_) int) ;; 10 + (inactive? + "Return true unless this buffer currently has an active, linked art group." + (_type_) symbol) ;; 11 + (file-status + "Return this buffer's state for the requested name and part. Return pending when it is queued +but not yet the current load, and #f when it is not requested by this buffer." + (_type_ string int) symbol) ;; 12 + (link-file + "Link group's joint animations into their resident master groups and make it this buffer's +active art group." + (_type_ art-group) art-group) ;; 13 + (unlink-file + "Unlink group's joint animations and clear this buffer's active art-group pointer." + (_type_ art-group) int) ;; 14 + (unlock! "Clear the inter-buffer activation lock." (_type_) symbol) ;; 15 ) ) (deftype spool-anim (basic) - ((name string :offset 16) ;; why? - (buf1 external-art-buffer :offset 16) ;; custom + ;; Queued requests use name/index. During buffer assignment those words are viewed as buf1/buf2. + ((name string :offset 16) + (buf1 external-art-buffer :offset 16) (index int32 :score 100 :offset 20) - (buf2 external-art-buffer :offset 20) ;; custom (also what?) + (buf2 external-art-buffer :offset 20) (parts int32 :offset-assert 24) (priority float :offset-assert 28) (owner handle :offset-assert 32) @@ -5349,15 +5537,41 @@ :size-assert #x118 :flag-assert #x1100000118 (:methods - (new (symbol type) _type_) ;; 0 - (update (_type_ symbol) int) ;; 9 - (clear-rec (_type_) int) ;; 10 - (spool-push (_type_ string int process float) int) ;; 11 - (file-status (_type_ string int) symbol) ;; 12 - (reserve-alloc (_type_) kheap) ;; 13 - (reserve-free (_type_ kheap) int) ;; 14 - (none-reserved? (_type_) symbol) ;; 15 - (try-preload-stream (_type_ string int process float) int) ;; 16 + (new "Allocate the streaming controller, cross-link its two buffers, and initialize its request records." (symbol type) _type_) ;; 0 + (update + "Assign the two streaming buffers to the highest-priority eligible requests, retain buffers +already serving those requests, advance both buffer state machines, and queue the best animation +stream for audio preloading. Print request and buffer state when debug-print is true and loader +display is enabled." + (_type_ symbol) int) ;; 9 + (clear-rec + "Clear streaming requests. In game mode clear all three ranked requests and the preload +candidate; outside game mode remove only the reserved pseudo-request and compact later records." + (_type_) int) ;; 10 + (spool-push + "Insert a file-part request into the three-entry priority list. Lower values are more +important; SPOOL_PRIORITY_RECALC uses the requester's distance from the target. An existing request +is replaced only by a better priority, and requests below the top three are dropped." + (_type_ string int process float) int) ;; 11 + (file-status + "Return the first buffer state for name and part, or #f when neither buffer is servicing the +request." + (_type_ string int) symbol) ;; 12 + (reserve-alloc + "Request one streaming buffer for general heap use. Return its heap after update has activated +the reserved pseudo-file; return #f while the reservation is pending." + (_type_) kheap) ;; 13 + (reserve-free + "Release the reservation backed by heap. Clear the reserved buffer's pending request and +advance it immediately; print an error when no reservation exists or heap is not the reserved one." + (_type_ kheap) int) ;; 14 + (none-reserved? + "Return true when no general-use buffer reservation has been requested." + (_type_) symbol) ;; 15 + (try-preload-stream + "Make name and part the single speculative audio preload candidate when its priority is +better than the current candidate. SPOOL_PRIORITY_RECALC derives priority from requester distance." + (_type_ string int process float) int) ;; 16 ) ) @@ -5408,21 +5622,21 @@ :size-assert #x2b0 :flag-assert #x17000002b0 (:methods - (new (symbol type) _type_) ;; 0 - (initialize! (_type_) _type_) ;; 9 - (print-usage (_type_) _type_) ;; 10 - (setup-font-texture! (_type_) none) ;; 11 - (allocate-defaults! (_type_) none) ;; 12 - (login-level-textures (_type_ level int (pointer texture-id)) none) ;; 13 ;; loading level... - (add-tex-to-dma! (_type_ level int) none) ;; 14 ;; very mysterious arg types. - (allocate-vram-words! (_type_ int) int) ;; 15 - (allocate-segment! (_type_ texture-pool-segment int) texture-pool-segment) ;; 16 + (new "Allocate and initialize the global VRAM texture pool." (symbol type) _type_) ;; 0 + (initialize! "Reset the VRAM allocator, reserve the fixed regions, and clear the common-page upload cache." (_type_) _type_) ;; 9 + (print-usage "Print the texture pool's allocated range and remaining VRAM." (_type_) _type_) ;; 10 + (setup-font-texture! "Allocate and relocate the font textures and palette, then build the main font texture descriptor." (_type_) none) ;; 11 + (allocate-defaults! "Reserve the common, near, sky, eye, ocean, and depth-cue VRAM regions." (_type_) none) ;; 12 + (login-level-textures "Resolve a level's texture-page IDs, install its allocator, and report segment overflow bits." (_type_ level int (pointer texture-id)) none) ;; 13 ;; loading level... + (add-tex-to-dma! "Add the requested level texture-page uploads to their rendering buckets." (_type_ level int) none) ;; 14 + (allocate-vram-words! "Reserve consecutive VRAM words and return the first word index." (_type_ int) int) ;; 15 + (allocate-segment! "Allocate a texture-pool segment and fill in its destination and size." (_type_ texture-pool-segment int) texture-pool-segment) ;; 16 (unused-17 () none) ;; 17 (unused-18 () none) ;; 18 (unused-19 () none) ;; 19 - (unload! (_type_ texture-page) int) ;; 20 - (upload-one-common! (_type_ level) symbol) ;; 21 - (lookup-boot-common-id (_type_ int) int) ;; 22 + (unload! "Remove a texture page and its shader-link table from the directory." (_type_ texture-page) int) ;; 20 + (upload-one-common! "Upload the first common texture page used by a level that is not already resident." (_type_ level) symbol) ;; 21 + (lookup-boot-common-id "Map a boot-common texture-page ID to its fixed common-page slot, or return -1." (_type_ int) int) ;; 22 ) ) @@ -5475,13 +5689,13 @@ :size-assert #x80 :flag-assert #xf00000080 (:methods - (relocate (_type_ kheap (pointer uint8)) none :replace) ;; 7 - (remove-from-heap (_type_ kheap) _type_) ;; 9 - (get-leftover-block-count (_type_ int int) int) ;; 10 + (relocate "Relocate a linked texture page, its texture records, and its segment data pointers." (_type_ kheap (pointer uint8)) none :replace) ;; 7 + (remove-from-heap "Discard this page's texture data while retaining its linked texture records." (_type_ kheap) _type_) ;; 9 + (get-leftover-block-count "Return the number of 256-byte blocks used in the final 16 KiB pool chunk." (_type_ int int) int) ;; 10 (unused-11 () none) ;; 11 - (relocate-dests! (_type_ int int) none) ;; 12 - (add-to-dma-buffer (_type_ dma-buffer int) int) ;; 13 - (upload-now! (_type_ int) none) ;; 14 + (relocate-dests! "Offset every texture destination in one page segment to its allocated VRAM base." (_type_ int int) none) ;; 12 + (add-to-dma-buffer "Append an immediate upload of the selected page segments and return their size in VRAM words." (_type_ dma-buffer int) int) ;; 13 + (upload-now! "Upload the selected page segments immediately and wait for completion." (_type_ int) none) ;; 14 ) ) @@ -5517,8 +5731,8 @@ (entries texture-page-dir-entry 1 :inline) ) (:methods - (relocate (_type_ kheap (pointer uint8)) none :replace) ;; 7 - (unlink-textures-in-heap! (_type_ kheap) int) ;; 9 + (relocate "Relocate the directory and rebuild every texture shader link from its serialized offset." (_type_ kheap (pointer uint8)) none :replace) ;; 7 + (unlink-textures-in-heap! "Remove shader links belonging to heap and return the number removed." (_type_ kheap) int) ;; 9 ) :flag-assert #xa00000014 ) @@ -5572,7 +5786,7 @@ ;; - Functions -(define-extern texture-mip->segment (function int int int)) +(define-extern texture-mip->segment "Return the texture-page segment for mip-level among mip-count levels. Segment 0 holds the coarsest levels; up to two higher-detail levels occupy segments 1 and 2." (function int int int)) ;; - Symbols @@ -5603,10 +5817,29 @@ ;; - Types (declare-type bsp-header basic) +(defenum vis-info-flag + :bitfield #t + :type uint32 + (from-vis-file 29) + (waiting-for-iop-to-ee 30) + (using-this-as-only-vis 31) + ) + +;; Bits 0 through 28 of level-vis-info.flags contain successive three-bit selectors. Each +;; decompressor consumes the previous pass's output and shifting by three selects the next pass. +(defenum vis-decompressor + :type uint32 + :bitfield #f + (drawable-tree 1) + (run-length 2) + (huffman 3) + ) + (deftype level-vis-info (basic) ((level symbol :offset-assert 4) (from-level symbol :offset-assert 8) (from-bsp bsp-header :offset-assert 12) + ;; High bits use vis-info-flag; bits 0 through 28 pack vis-decompressor selectors. (flags uint32 :offset-assert 16) (length uint32 :offset-assert 20) (allocated-length uint32 :offset-assert 24) @@ -5618,6 +5851,9 @@ (current-vis-string uint32 :offset-assert 48) (vis-string uint32 :dynamic :offset-assert 52) ) + (:methods + (asize-of :override-doc "Return the fixed level-vis-info header size plus its variable dictionary storage.") + ) :method-count-assert 9 :size-assert #x34 :flag-assert #x900000034 @@ -5724,26 +5960,92 @@ :size-assert #xa30 :flag-assert #x1d00000a30 (:methods - (deactivate (_type_) _type_) ;; 9 - (is-object-visible? (_type_ int) symbol) ;; 10 + (mem-usage :override-doc + "Account for this active level's entity and ambient links, art, code, texture pages, + visibility records, and BSP data.") + (deactivate "Save permanent entity state, remove this level from drawing, deactivate its + entities and particles, clear inside and visibility state, and leave its data + loaded." + (_type_) + _type_) ;; 9 + (is-object-visible? "Return whether drawable-index's bit is set in this level's current + visibility string. Return false when the bit is clear; the PC actor + visibility setting may bypass this test." + (_type_ int) + symbol) ;; 10 (add-irq-to-tex-buckets! (_type_) none) ;; 11 - (unload! (_type_) _type_) ;; 12 - (bsp-name (_type_) symbol) ;; 13 - (compute-memory-usage (_type_ object) memory-usage-block) ;; 14 - (point-in-boxes? (_type_ vector) symbol) ;; 15 - (update-vis! (_type_ level-vis-info uint uint) symbol) ;; 16 - (load-continue (_type_) _type_) ;; 17 - (load-begin (_type_) _type_) ;; 18 - (login-begin (_type_) _type_) ;; 19 - (vis-load (_type_) uint) ;; 20 + (unload! "Deactivate this level, unlink its art, textures, particle groups, packages, and + pending art loads, reset its heap and visibility state, and make its slot inactive." + (_type_) + _type_) ;; 12 + (bsp-name "Return the loaded BSP name when available, otherwise return this level's requested + name." + (_type_) + symbol) ;; 13 + (compute-memory-usage + "Return this level's cached category breakdown. Allocate it when needed and recalculate both + the categories and cached total when force? is true or the block is empty." + (_type_ object) memory-usage-block) ;; 14 + (point-in-boxes? "Return true when position lies inside one of this level's half-open BSP boxes. + force-inside? bypasses the geometric test." + (_type_ vector) + symbol) ;; 15 + (update-vis! "Update this level's visibility bits for vis-info's current camera leaf. Reuse a + completed string when possible, wait for an outstanding IOP transfer, or fetch + the self-level string from its VIS file. Neighbor visibility comes from + bsp-vis-base. Apply the packed decompression passes, mask nonexistent drawable + bits, and return false while data is still loading. The third argument is + unused." + (_type_ level-vis-info uint uint) + symbol) ;; 16 + (load-continue "Advance this level's asynchronous DGO load, deferred texture relocation, + linking, final BSP-object load, or incremental login according to its current + status." + (_type_) + _type_) ;; 17 + (load-begin "Reserve this level slot, clear its previous state, select the level texture + allocator, build the DGO filename, allocate two 2 MiB streaming buffers, and begin + the asynchronous load." + (_type_) + _type_) ;; 18 + (login-begin "Restore the default texture allocator, log in the BSP's texture pages and ADGIF + shaders, initialize the incremental login state, and enter login status. An + absent BSP unloads the level." + (_type_) + _type_) ;; 19 + (vis-load "Ensure this level's self VIS file owns an IOP ramdisk slot, evicting the other + level's slot when necessary, and return the assigned ramdisk ID." + (_type_) + uint) ;; 20 (unused-21 (_type_) none) ;; 21 - (birth (_type_) _type_) ;; 22 - (level-status-set! (_type_ symbol) _type_) ;; 23 - (load-required-packages (_type_) _type_) ;; 24 - (init-vis (_type_) int) ;; 25 - (vis-clear (_type_) int) ;; 26 - (debug-print-splitbox (_type_ vector string) none) ;; 27 - (art-group-get-by-name (_type_ string) art-group) ;; 28 + (birth "Birth a loaded BSP, restore its saved permanent entity state, mark the level alive, and + notify the camera and target." + (_type_) + _type_) ;; 22 + (level-status-set! "Move this level toward want-status through the legal load, login, birth, + activation, deactivation, and unload transitions. Loading states may only + advance in order." + (_type_ symbol) + _type_) ;; 23 + (load-required-packages "Load the common package requested by a non-debug BSP when its level + package list is nonempty." + (_type_) + _type_) ;; 24 + (init-vis "Attach the BSP's self and neighboring level-vis-info records, initialize their + owners, output buffers, packed flags, and ramdisk state, and enable visibility-aware + actor-memory warnings." + (_type_) + int) ;; 25 + (vis-clear "Clear this level's eight VIS descriptors and 2048-byte visibility bit string, then + mark visibility as loading." + (_type_) + int) ;; 26 + (debug-print-splitbox "Print the split-box identifier for every BSP box containing position." + (_type_ vector string) + none) ;; 27 + (art-group-get-by-name "Return this level's art group whose name matches name, or false." + (_type_ string) + art-group) ;; 28 ) ) @@ -5774,24 +6076,82 @@ :size-assert #x1ef4 :flag-assert #x1b00001ef4 (:methods - (level-get (_type_ symbol) level) ;; 9 - (level-get-with-status (_type_ symbol) level) ;; 10 - (level-get-for-use (_type_ symbol symbol) level) ;; 11 - (activate-levels! (_type_) int) ;; 12 - (debug-print-entities (_type_ symbol type) none) ;; 13 - (debug-draw-actors (_type_ symbol) none) ;; 14 - (actors-update (_type_) object) ;; 15 - (level-update (_type_) int) ;; 16 - (level-get-target-inside (_type_) level) ;; 17 - (alloc-levels! (_type_ symbol) int) ;; 18 - (load-commands-set! (_type_ pair) pair) ;; 19 - (art-group-get-by-name (_type_ string) art-group) ;; 20 - (load-command-get-index (_type_ symbol int) pair) ;; 21 - (update-vis-volumes (_type_) none) ;; 22 - (update-vis-volumes-from-nav-mesh (_type_) none) ;; 23 - (print-volume-sizes (_type_) none) ;; 24 - (level-status (_type_ symbol) symbol) ;; 25 - (level-get-most-disposable (_type_) level) ;; 26 + (mem-usage :override-doc "Account for every allocated level slot.") + (level-get "Return the non-inactive level whose requested or remapped load name matches name, or + false." + (_type_ symbol) + level) ;; 9 + (level-get-with-status "Return the first level slot with status, or false." + (_type_ symbol) + level) ;; 10 + (level-get-for-use "Return a slot for name at want-status. Reuse a matching level when possible; + otherwise dispose of the safest slot, initialize its level-info and mood + state, and begin loading." + (_type_ symbol symbol) + level) ;; 11 + (activate-levels! "Request active status for every allocated level slot." + (_type_) + int) ;; 12 + (debug-print-entities + "Print a table of active-level entities, optionally restricted to expected-type. mode selects + the ordinary table, meter-formatted positions, permanent-state details, or art-group names." + (_type_ symbol type) none) ;; 13 + (debug-draw-actors + "Draw the enabled entity, process, visibility-volume, animation, navigation, path, and volume + diagnostics for active levels. mode selects process-only markers, all entities, or the + ordinary live-entity display." + (_type_ symbol) none) ;; 14 + (actors-update + "Compact actor process pools, adapt the pause distance and per-frame birth budget to frame + time, then birth or kill active-level actors according to each level's display mode, + visibility, distance, permanent status, and available actor memory." + (_type_) object) ;; 15 + (level-update "Advance settings, art and DGO loading, inside-box and checkpoint state, + load-state requests, neighboring VIS selection and ownership, and level debug + displays for this frame. Publish both displayed BSP names to the PC renderer." + (_type_) + int) ;; 16 + (level-get-target-inside "Choose an active level for the target. Prefer the current continue's + level, then the first inside-box level, then the first remembered + meta-inside level, and finally the first active level. The distance + accumulators are never updated, so they do not rank later candidates." + (_type_) + level) ;; 17 + (alloc-levels! "Load the shared art packages and allocate three level heaps. compact-level-heaps + selects the smaller heap size and loads common explicitly." + (_type_ symbol) + int) ;; 18 + (load-commands-set! "Replace the level group's pending load-command list and return it." + (_type_ pair) + pair) ;; 19 + (art-group-get-by-name "Search all three level slots for an art group whose name matches name, + or return false." + (_type_ string) + art-group) ;; 20 + (load-command-get-index "Return command-index from level-name's alternate load-command list." + (_type_ symbol int) + pair) ;; 21 + (update-vis-volumes + "Expand each active entity's editable visibility box around the draw bounds of its live + process and drawable child processes. This development-only function contains a compiler + spill anomaly immediately before assigning the intended process." + (_type_) none) ;; 22 + (update-vis-volumes-from-nav-mesh + "Rebuild each active actor's editable visibility box from its navigation mesh, using a linked + nav-mesh actor when supplied and a six-meter box around the entity when no mesh is available." + (_type_) none) ;; 23 + (print-volume-sizes + "Print each ordinary active actor's visibility distance and box extents relative to its + origin, excluding money, crates, fuel cells, and springboxes." + (_type_) none) ;; 24 + (level-status "Return the status of the loaded level matching level-name, or false." + (_type_ symbol) + symbol) ;; 25 + (level-get-most-disposable "Choose a slot for a new load. Prefer inactive, loading, or merely + loaded slots; otherwise choose the lowest-priority active level + whose boxes do not contain the camera." + (_type_) + level) ;; 26 ) ) @@ -5894,7 +6254,7 @@ (fov-correction-factor float :offset-assert 1056) ) (:methods - (new (symbol type) _type_) ;; 0 + (new "Allocate a math camera with the default NTSC projection, fog range, and identity camera rotation." (symbol type) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x424 @@ -5921,15 +6281,20 @@ ;; - Functions -(define-extern update-math-camera (function math-camera symbol symbol math-camera)) -(define-extern fog-corrector-setup (function fog-corrector math-camera none)) -(define-extern sprite-distorter-generate-tables (function none)) -(define-extern math-cam-start-smoothing (function float float quaternion)) -(define-extern move-target-from-pad (function transform int transform)) -(define-extern transform-point-vector! (function vector vector symbol)) -(define-extern transform-point-qword! (function vector4w vector symbol)) -(define-extern transform-point-vector-scale! (function vector vector float)) -(define-extern init-for-transform (function matrix none)) +(define-extern update-math-camera "Rebuild the camera's projection and culling constants. The projection maps positive camera-space depth d..f nonlinearly onto the reversed 24-bit GS depth interval 16760631..100, while its undivided fourth lane carries linear fog. video-mode is retained but unused." (function math-camera symbol symbol math-camera)) +(define-extern fog-corrector-setup "Scale the camera's fog endpoints by its field-of-view correction factor." (function fog-corrector math-camera none)) +(define-extern sprite-distorter-generate-tables + "Rebuild the radial warp direction tables for the current projection. For each turn count from + 3 through 11, store one screen-space direction and one framebuffer-texture offset per segment; + adjacent tables share the angle-zero closing pair. These values are generated at runtime because + both the on-screen directions and framebuffer sampling offsets depend on the active projection." + (function none)) +(define-extern math-cam-start-smoothing "Begin inverse-camera-rotation smoothing over duration, starting at interpolation value start-t." (function float float quaternion)) +(define-extern move-target-from-pad "Adjust a legacy Euler camera transform from the selected controller's held buttons." (function transform int transform)) +(define-extern transform-point-vector! "Transform point to floating-point GS horizontal, vertical, depth, and fog coordinates in out; return true when it is inside all six clip planes." (function vector vector symbol)) +(define-extern transform-point-qword! "Transform point to signed 28.4 GS horizontal, vertical, depth, and fog coordinates in out; return true when it is inside all six clip planes." (function vector4w vector symbol)) +(define-extern transform-point-vector-scale! "Transform point to floating-point GS coordinates in out and return the homogeneous perspective-divide scale." (function vector vector float)) +(define-extern init-for-transform "Populate the persistent VU0 transform-register convention for object-matrix and the current camera." (function matrix none)) ;; - Symbols @@ -6035,18 +6400,18 @@ :size-assert #x58 :flag-assert #x1400000058 (:methods - (new (symbol type matrix int int float font-color font-flags) _type_) ;; 0 - (set-mat! (font-context matrix) font-context) ;; 9 - (set-origin! (font-context int int) font-context) ;; 10 - (set-depth! (font-context int) font-context) ;; 11 - (set-w! (font-context float) font-context) ;; 12 - (set-width! (font-context int) font-context) ;; 13 - (set-height! (font-context int) font-context) ;; 14 - (set-projection! (font-context float) font-context) ;; 15 - (set-color! (font-context font-color) font-context) ;; 16 - (set-flags! (font-context font-flags) font-context) ;; 17 - (set-start-line! (font-context uint) font-context) ;; 18 - (set-scale! (font-context float) font-context) ;; 19 + (new "Allocate a font context with the requested transform, origin, color, and flags. A zero depth selects the isometric depth from the current math camera." (symbol type matrix int int float font-color font-flags) _type_) ;; 0 + (set-mat! "Set the character transform matrix." (font-context matrix) font-context) ;; 9 + (set-origin! "Set the integer screen-space origin." (font-context int int) font-context) ;; 10 + (set-depth! "Set the integer depth coordinate." (font-context int) font-context) ;; 11 + (set-w! "Set the homogeneous origin coordinate." (font-context float) font-context) ;; 12 + (set-width! "Set the text layout width in pixels." (font-context int) font-context) ;; 13 + (set-height! "Set the text layout height in pixels." (font-context int) font-context) ;; 14 + (set-projection! "Set the font projection scale." (font-context float) font-context) ;; 15 + (set-color! "Select the font color-table entry." (font-context font-color) font-context) ;; 16 + (set-flags! "Replace the font rendering flags." (font-context font-flags) font-context) ;; 17 + (set-start-line! "Set the first line used for multiline drawing." (font-context uint) font-context) ;; 18 + (set-scale! "Set the glyph scale." (font-context float) font-context) ;; 19 ) ) @@ -6097,7 +6462,7 @@ ;; - Functions -(define-extern font-set-tex0 (function (pointer gs-tex0) texture uint uint uint none)) +(define-extern font-set-tex0 "Build a GS TEX0 register for tex, converting tex-addr from VRAM words to 64-word GS blocks. clut-addr is already in the GS CBP address unit." (function (pointer gs-tex0) texture uint uint uint none)) ;; - Symbols @@ -6107,7 +6472,7 @@ ;; ---------------------- ;; File - decomp-h -;; Source Path - engine/gfx/decomp-h.gc +;; Source Path - engine/load/decomp-h.gc ;; Containing DGOs - ['GAME', 'ENGINE'] ;; Version - 3 @@ -6135,24 +6500,29 @@ ;; - Functions -(define-extern draw-quad2d (function dma-buffer draw-context none)) -(define-extern set-display-env (function display-env int int int int int int display-env)) -(define-extern set-draw-env (function draw-env int int int int int int draw-env)) -(define-extern get-video-mode (function symbol)) -(define-extern draw-string-xy (function string dma-buffer int int font-color font-flags float)) -(define-extern set-draw-env-offset (function draw-env int int int draw-env)) -(define-extern put-display-alpha-env (function display-env none)) -(define-extern set-display2 (function display int int int int int display)) -(define-extern allocate-dma-buffers (function display display)) -(define-extern draw-sprite2d-xy (function dma-buffer int int int int rgba none)) -(define-extern screen-gradient (function dma-buffer rgba rgba rgba rgba none)) -(define-extern vif1-handler-debug (function none)) -(define-extern vif1-handler (function none)) +(define-extern draw-quad2d "Append a clipped, independently colored screen-space quad to dma-buf." (function dma-buffer draw-context none)) +(define-extern set-display-env "Configure the privileged GS display registers for one framebuffer and output window." (function display-env int int int int int int display-env)) +(define-extern set-draw-env "Build the A+D register packet that establishes a framebuffer, depth buffer, tests, origin, and scissor." (function draw-env int int int int int int draw-env)) +(define-extern get-video-mode + "Return the currently selected NTSC, PAL, or custom video mode." + (function symbol)) +(define-extern draw-string-xy + "Draw str at x,y with a temporary context initialized from the default font matrix, color, and + flags, append its glyph packets to buf, and return the horizontal advance." + (function string dma-buffer int int font-color font-flags float)) +(define-extern set-draw-env-offset "Recenter a draw environment's window-coordinate origin, adding the odd-field half-pixel offset when requested." (function draw-env int int int draw-env)) +(define-extern put-display-alpha-env "Write DISPFB1 and DISPLAY1 immediately from env." (function display-env none)) +(define-extern set-display2 "Refresh both display and draw environments without resetting frame counters." (function display int int int int int display)) +(define-extern allocate-dma-buffers "Lazily allocate both frames' calculation, global drawing, and optional debug DMA buffers." (function display display)) +(define-extern draw-sprite2d-xy "Append a clipped, solid-color screen-space sprite to dma-buf." (function dma-buffer int int int int rgba none)) +(define-extern screen-gradient "Fill the 512 by 224 screen with a four-corner color gradient." (function dma-buffer rgba rgba rgba rgba none)) +(define-extern vif1-handler-debug "Record an end-calc profile marker, acknowledge the VIF1 interrupt, and resume VIF1." (function none)) +(define-extern vif1-handler "Acknowledge the VIF1 interrupt and resume VIF1 without profiling." (function none)) (define-extern install-handler (function int function int)) ;; GOAL thinks it returns something. -(define-extern vblank-handler (function int)) -(define-extern set-display-gs-state (function dma-buffer int int int int int dma-buffer)) -(define-extern set-display-gs-state-offset (function dma-buffer int int int int int int int dma-buffer)) -(define-extern reset-display-gs-state (function display dma-buffer int display)) +(define-extern vblank-handler "Increment the vertical-blank counter from the disabled legacy interrupt path." (function int)) +(define-extern set-display-gs-state "Append GS state for drawing to a framebuffer with a zero window-coordinate offset and disabled depth writes." (function dma-buffer int int int int int dma-buffer)) +(define-extern set-display-gs-state-offset "Append GS state for drawing to a framebuffer with the requested window-coordinate offset and disabled depth writes." (function dma-buffer int int int int int int int dma-buffer)) +(define-extern reset-display-gs-state "Restore the normal game framebuffer, scissor, field offset, alpha test, and reversed depth-test state." (function display dma-buffer int display)) ;; - Symbols @@ -6203,11 +6573,11 @@ ;; field param1 is a basic loaded with a signed load field param2 is a basic loaded with a signed load field param3 is a basic loaded with a signed load (:methods (print (connection) _type_) ;; 2 - (get-engine (connection) engine) ;; 9 - (get-process (connection) process) ;; 10 - (belongs-to-engine? (connection engine) symbol) ;; 11 - (belongs-to-process? (connection process) symbol) ;; 12 - (move-to-dead (connection) connection) ;; 13 + (get-engine "Walk the live-list predecessors to recover the engine that owns this live connection." (connection) engine) ;; 9 + (get-process "Walk the process-list predecessors to recover the process that owns this live connection." (connection) process) ;; 10 + (belongs-to-engine? "Check whether this connection's address lies in engine's fixed-capacity data array." (connection engine) symbol) ;; 11 + (belongs-to-process? "Check whether this live connection belongs to proc." (connection process) symbol) ;; 12 + (move-to-dead "Unlink this live connection from its engine and process lists and return it to the engine's dead list." (connection) connection) ;; 13 ) ) @@ -6228,28 +6598,28 @@ :size-assert #x80 :flag-assert #x1800000080 (:methods - (new (symbol type basic int) _type_) ;; 0 - (inspect-all-connections (engine) engine) ;; 9 - (apply-to-connections (engine (function connectable none)) int) ;; 10 - (apply-to-connections-reverse (engine (function connectable none)) int) ;; 11 - (execute-connections (engine object) int) ;; 12 - (execute-connections-and-move-to-dead (engine object) int) ;; 13 - (execute-connections-if-needed (engine object) int) ;; 14 - (add-connection (engine process object object object object) connection) ;; 15 - (remove-from-process (engine process) int) ;; 16 - (remove-matching (engine (function connection engine symbol)) int) ;; 17 - (remove-all (engine) int) ;; 18 - (remove-by-param1 (engine object) int) ;; 19 - (remove-by-param2 (engine int) int) ;; 20 - (get-first-connectable (engine) connectable) ;; 21 - (get-last-connectable (engine) connectable) ;; 22 - (unknown-1 (engine (pointer uint32)) uint) ;; 23 + (new "Allocate a fixed-capacity engine and link every connection slot into its dead list." (symbol type basic int) _type_) ;; 0 + (inspect-all-connections "Inspect every live connection." (engine) engine) ;; 9 + (apply-to-connections "Apply f to every live connection in forward order, caching the next node so f may remove the current one." (engine (function connectable none)) int) ;; 10 + (apply-to-connections-reverse "Apply f to every live connection in reverse order. f must not remove the current node." (engine (function connectable none)) int) ;; 11 + (execute-connections "Stamp this engine with the current real frame and invoke every live connection in reverse order." (engine object) int) ;; 12 + (execute-connections-and-move-to-dead "Invoke every live connection in reverse order and move connections returning dead to the dead list." (engine object) int) ;; 13 + (execute-connections-if-needed "Execute this engine only if it has not run during the current real frame." (engine object) int) ;; 14 + (add-connection "Take one dead slot, initialize its parameters, and link it into both this engine and proc." (engine process object object object object) connection) ;; 15 + (remove-from-process "Remove this engine's connections owned by proc." (engine process) int) ;; 16 + (remove-matching "Move every live connection for which predicate returns true to the dead list." (engine (function connection engine symbol)) int) ;; 17 + (remove-all "Move every live connection to the dead list." (engine) int) ;; 18 + (remove-by-param1 "Move every live connection whose param1 equals value to the dead list." (engine object) int) ;; 19 + (remove-by-param2 "Move every live connection whose param2 equals value to the dead list." (engine int) int) ;; 20 + (get-first-connectable "Return the first live node, or the exclusive end sentinel when the list is empty." (engine) connectable) ;; 21 + (get-last-connectable "Return the live list's exclusive end sentinel." (engine) connectable) ;; 22 + (get-next-connectable "Return node's next link in an engine list." (engine connectable) connectable) ;; 23 ) ) ;; - Functions -(define-extern connection-process-apply (function process (function object none) symbol)) +(define-extern connection-process-apply "Apply func to every connection in proc's process-owned list." (function process (function object none) symbol)) ;; ---------------------- @@ -6280,7 +6650,16 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (lookup-text! (_type_ text-id symbol) string) ;; 9 + (length :override-doc "Return the number of translated-text records.") + (asize-of :override-doc + "Return the fixed header size plus eight bytes for each translated-text record.") + (mem-usage :override-doc + "Account for the game-text-info allocation and every string owned by its records.") + (lookup-text! + "Binary-search the sorted records for id. Return its string; when id is absent, return #f if +return-false? is true, otherwise return a temporary `UNKNOWN ID n` string. On PC, a missing +translation can be looked up in the English fallback text first." + (_type_ text-id symbol) string) ;; 9 ) ) @@ -6330,6 +6709,7 @@ (ambient (pointer process) :offset-assert 64) ;; special print (video-mode symbol :offset-assert 68) (aspect-ratio symbol :offset-assert 72) + ;; A requested music-flava event until settings update resolves it to the active bank's variation. (sound-flava uint8 :offset-assert 76) (auto-save symbol :offset-assert 80) (music-volume-movie float :offset-assert 84) @@ -6355,7 +6735,17 @@ :size-assert #xc4 :flag-assert #xa000000c4 (:methods - (update-from-engine (_type_ engine) setting-data) ;; 9 + (update-from-engine + "Resolve the live requests in settings-engine into this snapshot, from oldest to newest so + newer requests override older ones. Request parameters are setting-specific: param1 carries + a symbol or pointer, param2 carries a numeric value or sound-flava priority, and param3 + carries mask bits, a language, or a music-flava event. Relative volumes are percentages of + the value already resolved; process-mask requests set, clear, or replace bits, while + common-page requests set or clear them. The highest sound-flava priority wins, with a newer + request winning a tie. An sfx-volume request outside the progress process is ignored while + progress is prevented from running." + (_type_ engine) + setting-data) ;; 9 ) ) @@ -6369,12 +6759,36 @@ :size-assert #x278 :flag-assert #xe00000278 (:methods - (new (symbol type int) _type_) ;; 0 - (add-setting (_type_ process symbol object object object) none) ;; 9 - (set-setting (_type_ process symbol object object object) none) ;; 10 - (remove-setting (_type_ process symbol) none) ;; 11 - (apply-settings (_type_) setting-data) ;; 12 - (update (_type_) setting-data) ;; 13 + (new "Allocate a setting controller with room for max-connections process-owned requests." (symbol type int) _type_) ;; 0 + (add-setting + "Add a setting request owned by owner. setting-name selects the setting, and request-param1 + through request-param3 carry its setting-specific mode, value, priority, pointer, or bits. + The request is withdrawn automatically when owner is destroyed." + (_type_ process symbol object object object) + none) ;; 9 + (set-setting + "Replace owner's existing request for setting-name, then add the new request-param1 through + request-param3 payload. Other settings owned by the process are left alone." + (_type_ process symbol object object object) + none) ;; 10 + (remove-setting + "Remove setting-name from owner. Passing #t as setting-name removes every setting request + owned by that process." + (_type_ process symbol) + none) ;; 11 + (apply-settings + "Rebuild the desired settings from the defaults and live requests, then copy fields without + gradual transitions or external side effects into current. The default ambient volume is a + percentage of the default sfx volume. Also installs the resolved process mask immediately." + (_type_) + setting-data) ;; 12 + (update + "Resolve and apply the settings for this frame. Volumes and background alpha approach their + desired values over time; language, music, sound flava, video, background, border, common + texture pages, vibration, and ocean controls are sent to their owning systems as needed. + Music changes wait until the sound RPC is idle and both music banks are available." + (_type_) + setting-data) ;; 13 ) ) @@ -6422,12 +6836,16 @@ ;; - Functions -(define-extern gs-set-default-store-image (function gs-store-image-packet int int int int int int int int)) +(define-extern gs-set-default-store-image + "Build the seven-quadword VIF/GIF packet that reads a GS VRAM rectangle into EE memory." + (function gs-store-image-packet int int gs-psm int int int int int)) (define-extern gs-store-image (function object object object)) (define-extern sync-path (function int int int)) (define-extern file-stream-write (function file-stream pointer uint uint)) (define-extern file-stream-close (function file-stream file-stream)) -(define-extern store-image (function int int)) +(define-extern store-image + "Capture both interlaced framebuffers and write their scanlines to image.raw in the requested field order." + (function int int)) ;; ---------------------- @@ -6458,9 +6876,17 @@ :size-assert #x6e0 :flag-assert #xc000006e0 (:methods - (reset! (_type_) _type_) ;; 9 - (calculate-total (_type_) int) ;; 10 - (print-mem-usage (_type_ level object) none) ;; 11 + (reset! + "Clear all 109 category counters and mark the block empty." + (_type_) _type_) ;; 9 + (calculate-total + "Return the sum of the aligned total bytes in every active category." + (_type_) int) ;; 10 + (print-mem-usage + "Print a compact level-heap, actor-heap, and current/peak DMA line to destination. In short + mode also print actor-heap compaction statistics; otherwise print grouped level-memory and + DMA categories, the IOP visibility allocation, and level code, all in KiB." + (_type_ level object) none) ;; 11 ) ) @@ -6479,47 +6905,51 @@ ;; - Functions -(define-extern adgif-shader<-texture! (function adgif-shader texture adgif-shader)) -(define-extern adgif-shader<-texture-with-update! (function adgif-shader texture adgif-shader)) -(define-extern level-remap-texture (function texture-id texture-id)) -(define-extern link-texture-by-id (function texture-id adgif-shader texture-page-dir-entry)) -(define-extern lookup-texture-by-id (function texture-id texture)) -(define-extern texture-page-login (function texture-id (function texture-pool texture-page kheap int texture-page) kheap texture-page-dir-entry)) -;; arg2 in these is not an int, but something else. Not sure what it is yet. -;; all these texture-page-segment might actually be texture-relocate-later! -(define-extern texture-page-default-allocate (function texture-pool texture-page kheap int texture-page)) +(define-extern adgif-shader<-texture! "Fill a shader's texture registers from a relocated texture while preserving the shader's sampling controls." (function adgif-shader texture adgif-shader)) +(define-extern adgif-shader<-texture-with-update! "Bind a relocated texture to a shader and derive TEX1.K from the texture's uv-dist." (function adgif-shader texture adgif-shader)) +(define-extern level-remap-texture + "Binary-search the active level's sorted texture-remap table using the texture ID's upper 24 +bits. Return the original ID when no level BSP or matching entry exists; otherwise return the +entry's remapped ID with the canonical #x14 low-byte tag." + (function texture-id texture-id)) +(define-extern link-texture-by-id "Link a shader into a texture directory entry so later page relocation can update it." (function texture-id adgif-shader texture-page-dir-entry)) +(define-extern lookup-texture-by-id "Resolve an encoded texture ID to its loaded texture, or return false." (function texture-id texture)) +(define-extern texture-page-login "Load and link a texture page, using alloc-func to assign its VRAM destinations." (function texture-id (function texture-pool texture-page kheap int texture-page) kheap texture-page-dir-entry)) +(define-extern texture-page-default-allocate "Permanently allocate and upload all segments of a texture page, then release its source image data." (function texture-pool texture-page kheap int texture-page)) (define-extern loado (function string kheap object)) -(define-extern texture-relocate (function dma-buffer texture int gs-psm int dma-buffer)) -(define-extern dma-buffer-add-ref-texture (function dma-buffer pointer int int gs-psm none)) -(define-extern upload-vram-pages (function texture-pool texture-pool-segment texture-page int bucket-id int)) -(define-extern upload-vram-pages-pris (function texture-pool texture-pool-segment texture-page bucket-id int int)) -(define-extern movie? (function symbol)) -(define-extern texture-page-near-allocate-1 (function texture-pool texture-page kheap int texture-page)) -(define-extern texture-page-near-allocate-0 (function texture-pool texture-page kheap int texture-page)) -(define-extern texture-page-common-allocate (function texture-pool texture-page kheap int texture-page)) -(define-extern texture-page-size-check (function texture-pool level symbol int)) -(define-extern update-vram-pages (function texture-pool texture-pool-segment texture-page int int)) ;; todo -(define-extern upload-vram-data (function dma-buffer int pointer int none)) -(define-extern gs-page-width (function gs-psm int)) -(define-extern gs-page-height (function gs-psm int)) -(define-extern gs-largest-block (function int int gs-psm int)) -(define-extern gs-block-width (function gs-psm int)) -(define-extern gs-block-height (function gs-psm int)) -(define-extern gs-find-block (function int int gs-psm int)) -(define-extern physical-address (function pointer pointer)) -(define-extern texture-qwc (function int int gs-psm int)) -(define-extern texture-bpp (function gs-psm int)) -(define-extern texture-page-dir-inspect (function texture-page-dir symbol none)) -(define-extern gs-blocks-used (function int int gs-psm int)) -(define-extern texture-page-common-boot-allocate (function texture-pool texture-page kheap int texture-page)) -(define-extern texture-page-level-allocate (function texture-pool texture-page kheap int texture-page)) -(define-extern relocate-later (function symbol)) -(define-extern adgif-shader-update! (function adgif-shader texture none)) ;; todo - unconfirmed -(define-extern adgif-shader-login (function adgif-shader texture)) -(define-extern adgif-shader-login-no-remap (function adgif-shader texture)) -(define-extern adgif-shader-login-fast (function adgif-shader texture)) -(define-extern adgif-shader-login-no-remap-fast (function adgif-shader texture)) -(define-extern adgif-shader<-texture-simple! (function adgif-shader texture adgif-shader)) +(define-extern texture-relocate "Relocate one texture to a new VRAM destination and append the GS transfer setup for its mip levels and palette." (function dma-buffer texture int gs-psm int dma-buffer)) +(define-extern dma-buffer-add-ref-texture "Append IMAGE-mode reference transfers for texture data, splitting transfers at the DMA tag QWC limit." (function dma-buffer pointer int int gs-psm none)) +(define-extern upload-vram-pages "Append only the nonresident 16 KiB runs of selected page segments to a rendering bucket and update the residency cache." (function texture-pool texture-pool-segment texture-page int bucket-id int)) +(define-extern upload-vram-pages-pris "Append the requested nonresident 16 KiB PRIS chunks to a rendering bucket and update the residency cache." (function texture-pool texture-pool-segment texture-page bucket-id int int)) +(define-extern movie? + "Return true while the game is in movie playback mode." + (function symbol)) +(define-extern texture-page-near-allocate-1 "Allocate level slot 1's TFRAG near segment from the high end, upload its private data, and retain only shared data in RAM." (function texture-pool texture-page kheap int texture-page)) +(define-extern texture-page-near-allocate-0 "Allocate level slot 0's TFRAG near segment from the low end, upload its private data, and schedule compaction of shared data." (function texture-pool texture-page kheap int texture-page)) +(define-extern texture-page-common-allocate "Relocate all page segments onto the reusable common VRAM segment without uploading them yet." (function texture-pool texture-page kheap int texture-page)) +(define-extern texture-page-size-check "Return a bitfield identifying texture-page kinds that exceed their assigned common or near VRAM regions." (function texture-pool level symbol int)) +(define-extern update-vram-pages "Mark the 16 KiB VRAM chunks affected by an upload performed outside the cached upload helpers." (function texture-pool texture-pool-segment texture-page int int)) +(define-extern upload-vram-data "Append GS transfer setup and IMAGE data references for a pre-swizzled 128-pixel-wide texture strip." (function dma-buffer int pointer int none)) +(define-extern gs-page-width "Return the GS page width in pixels for a texture format." (function gs-psm int)) +(define-extern gs-page-height "Return the GS page height in pixels for a texture format." (function gs-psm int)) +(define-extern gs-largest-block "Return the greatest swizzled GS block index touched by a texture rounded up to block dimensions." (function int int gs-psm int)) +(define-extern gs-block-width "Return the GS block width in pixels for a texture format." (function gs-psm int)) +(define-extern gs-block-height "Return the GS block height in pixels for a texture format." (function gs-psm int)) +(define-extern gs-find-block "Map a block coordinate to its swizzled block index within a GS page." (function int int gs-psm int)) +(define-extern physical-address "Mask a cached EE pointer into the physical address used by DMA." (function pointer pointer)) +(define-extern texture-qwc "Return the quadword count needed for an image of the given dimensions and format, rounded up." (function int int gs-psm int)) +(define-extern texture-bpp "Return the bits per pixel for a GS texture format." (function gs-psm int)) +(define-extern texture-page-dir-inspect "Print loaded texture pages and, in verbose mode, the shader-link count for every texture." (function texture-page-dir symbol none)) +(define-extern gs-blocks-used "Return the number of GS blocks occupied by a texture, accounting for its partially filled final page." (function int int gs-psm int)) +(define-extern texture-page-common-boot-allocate "Place recognized boot-common pages in reusable VRAM and switch to permanent allocation at the first ordinary page." (function texture-pool texture-page kheap int texture-page)) +(define-extern texture-page-level-allocate "Dispatch a level's first ordinary page to the near allocator for its active level slot." (function texture-pool texture-page kheap int texture-page)) +(define-extern relocate-later "Finish a deferred near-texture memory move and then publish its directory entry." (function symbol)) +(define-extern adgif-shader-update! "Update TEX1.K after the texture's authored uv-dist tuning value changes." (function adgif-shader texture none)) +(define-extern adgif-shader-login "Apply level remapping, resolve a shader's texture, and link the shader for relocation updates." (function adgif-shader texture)) +(define-extern adgif-shader-login-no-remap "Resolve a shader's texture without level remapping and link the shader for relocation updates." (function adgif-shader texture)) +(define-extern adgif-shader-login-fast "Resolve and link a shader using the directory entry cached in its encoded texture ID." (function adgif-shader texture)) +(define-extern adgif-shader-login-no-remap-fast "Resolve and link a shader without level remapping or debug-network loading." (function adgif-shader texture)) +(define-extern adgif-shader<-texture-simple! "Initialize a simple clamped texture shader, optionally filling its texture registers." (function adgif-shader texture adgif-shader)) ;; - Symbols @@ -6565,7 +6995,8 @@ :size-assert #xc :flag-assert #xa0000000c (:methods - (draw (_type_) none) ;; 9 + (draw "Append a full-screen quad in this filter's color to the final no-depth-test bucket." + (_type_) none) ;; 9 ) ) @@ -6574,7 +7005,8 @@ (define-extern *draw-hook* (function none)) (define-extern *debug-hook* (function none)) (declare-type debug-menu-context basic) -(define-extern *menu-hook* (function debug-menu-context)) +(define-extern *menu-hook* + "Per-frame entry point for both debug menu contexts." (function debug-menu-context)) (define-extern *progress-hook* (function none)) (define-extern *dma-timeout-hook* (function none)) @@ -6735,8 +7167,8 @@ :flag-assert #xa00000020 ;; field param1 is a basic loaded with a signed load field param2 is a basic loaded with a signed load (:methods - (new (symbol type basic) _type_) ;; 0 - (reset-and-assign-geo! (_type_ basic) _type_) ;; 9 + (new "Allocate an empty cspace node and assign its optional geometry." (symbol type basic) _type_) ;; 0 + (reset-and-assign-geo! "Clear a cspace node's hierarchy and controller state and assign its optional geometry." (_type_ basic) _type_) ;; 9 ) ) @@ -6747,6 +7179,11 @@ :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 + (:methods + (relocate :override-doc + "Adjust each node's parent and bone pointers after its process heap moves, together with + param1 and param2 when they point inside that heap.") + ) ) @@ -6769,21 +7206,28 @@ :size-assert #x20 :flag-assert #x1200000020 (:methods - (login (_type_) _type_) ;; 9 ;; probably login or init. - (draw (_type_ _type_ display-frame) none) ;; 10 - (collide-with-box (_type_ int collide-list) none) ;; 11 - (collide-y-probe (_type_ int collide-list) none) ;; 12 - (collide-ray (_type_ int collide-list) none) ;; 13 - (collect-stats (_type_) none) ;; 14 - (debug-draw (_type_ drawable display-frame) none) ;; 15 - (unpack-vis (_type_ (pointer int8) (pointer int8)) (pointer int8)) ;; 16 - (collect-ambients (_type_ sphere int ambient-list) none) ;; 17 + (login "Initialize a drawable after its linked data has been loaded." (_type_) _type_) ;; 9 + (draw "Submit this drawable's work for the current display frame." (_type_ _type_ display-frame) none) ;; 10 + (collide-with-box "Traverse count contiguous siblings beginning at this and append collision +geometry intersecting the active collision box to result." (_type_ int collide-list) none) ;; 11 + (collide-y-probe "Traverse count contiguous siblings beginning at this and append collision +geometry intersecting the active vertical probe to result." (_type_ int collide-list) none) ;; 12 + (collide-ray "Traverse count contiguous siblings beginning at this and append collision geometry +intersecting the active swept-sphere ray to result." (_type_ int collide-list) none) ;; 13 + (collect-stats "Accumulate this drawable's renderer statistics." (_type_) none) ;; 14 + (debug-draw "Submit debug geometry for this drawable." (_type_ drawable display-frame) none) ;; 15 + (unpack-vis "Decode this drawable's visibility bytes into destination and return the advanced source pointer." (_type_ (pointer int8) (pointer int8)) (pointer int8)) ;; 16 + (collect-ambients "Traverse count contiguous siblings beginning at this and append ambient +objects overlapping query-sphere to result." (_type_ sphere int ambient-list) none) ;; 17 ) ) (deftype drawable-error (drawable) ((name string :offset-assert 32) ) + (:methods + (draw :override-doc "Draw item's labeled error sphere for frame.") + ) :method-count-assert 18 :size-assert #x24 :flag-assert #x1200000024 @@ -6803,7 +7247,32 @@ (data drawable 1 :offset-assert 32) ) (:methods - (new (symbol type int) _type_) + (new "Allocate a variable-sized drawable group with room for length child references." (symbol type int) _type_) + (length :override-doc "Return the number of child drawable references in this group.") + (asize-of :override-doc "Return the allocation size of this variable-length drawable group.") + (mem-usage + :override-doc + "Record this group's allocation in usage, then recursively collect memory use from every +child. flags is forwarded unchanged to each child.") + (login + :override-doc + "Initialize every child drawable after this group has been loaded.") + (draw + :override-doc + "When this group passes visibility and frustum culling, submit each child together with the +corresponding child in draw-data for frame.") + (collect-stats + :override-doc + "When this group passes visibility and frustum culling, collect renderer statistics from +every child.") + (debug-draw + :override-doc + "When this group passes visibility and frustum culling, submit debug geometry for each child +and its corresponding draw-data child.") + (unpack-vis + :override-doc + "Pass destination and the advancing visibility source through every child, then return the +source position after the final child.") ) :flag-assert #x1200000024 ) @@ -6824,6 +7293,13 @@ (deftype drawable-inline-array (drawable) ((length int16 :offset 6) ;; this is kinda weird. ) + (:methods + (length :override-doc "Return the active number of inline elements.") + (login :override-doc "Base inline arrays have no linked resources to initialize.") + (draw :override-doc "Base inline arrays submit no draw work; concrete array types override this method.") + (collect-stats :override-doc "Base inline arrays contribute no renderer statistics.") + (debug-draw :override-doc "Base inline arrays submit no debug geometry.") + ) :method-count-assert 18 :size-assert #x20 :flag-assert #x1200000020 @@ -6838,15 +7314,36 @@ ;; - Types +(defenum draw-node-flags + :type uint8 + :bitfield #t + ;; child points to another contiguous draw-node span instead of renderer leaves. + (children-are-draw-nodes 0) + ) + (deftype draw-node (drawable) ((child-count uint8 :offset 6) - (flags uint8 :offset 7) + (flags draw-node-flags :offset 7) (child drawable :offset 8) (distance float :offset 12) ) :method-count-assert 18 :size-assert #x20 :flag-assert #x1200000020 + (:methods + (collide-with-box :override-doc + "For count contiguous draw nodes beginning at this, reject each bounding sphere outside the +active collision box and delegate surviving child spans to result.") + (collide-y-probe :override-doc + "For count contiguous draw nodes beginning at this, reject each bounding sphere outside the +active vertical probe and delegate surviving child spans to result.") + (collide-ray :override-doc + "For count contiguous draw nodes beginning at this, reject each bounding sphere outside the +active swept-sphere ray and delegate surviving child spans to result.") + (collect-ambients :override-doc + "For count contiguous draw nodes beginning at this, delegate child spans whose bounding +spheres overlap query-sphere and append matching ambient objects to result.") + ) ;; field distance is a float printed as hex? ) @@ -6857,6 +7354,25 @@ :method-count-assert 18 :size-assert #x44 :flag-assert #x1200000044 + (:methods + (mem-usage :override-doc + "Account for this inline array's draw-node storage without counting memory owned by the +nodes' children.") + (asize-of :override-doc + "Return the drawable-inline-array-node header size plus storage for its active draw nodes.") + (collide-with-box :override-doc + "Ignore count and forward the active collision-box query across every draw node in this +inline array, appending geometry to result.") + (collide-y-probe :override-doc + "Ignore count and forward the active vertical-probe query across every draw node in this +inline array, appending geometry to result.") + (collide-ray :override-doc + "Ignore count and forward the active swept-sphere ray query across every draw node in this +inline array, appending geometry to result.") + (collect-ambients :override-doc + "Ignore count and forward query-sphere across every draw node in this inline array, +appending matching ambient objects to result.") + ) ;; too many basic blocks ) @@ -6880,11 +7396,28 @@ (deftype drawable-tree (drawable-group) () + (:methods + (unpack-vis + :override-doc + "Expand this tree's sparse hierarchical VIS stream into destination. Copy the top masks +directly, then consume one child-mask byte only for each visible parent at every lower depth. +Return the source position after the final consumed byte.") + ) :flag-assert #x1200000024 ) (deftype drawable-tree-array (drawable-group) ((trees drawable-tree 1 :offset 32 :score 100)) + (:methods + (draw + :override-doc + "Submit each tree with its corresponding tree in draw-data for frame, unless the current +level is hidden or uses the special or special-vis rendering path.") + (collect-stats :override-doc "Collect renderer statistics from every drawable tree.") + (debug-draw + :override-doc + "Submit debug geometry for every tree together with its corresponding draw-data tree.") + ) :flag-assert #x1200000024 ) @@ -6904,6 +7437,10 @@ :method-count-assert 18 :size-assert #x20 :flag-assert #x1200000020 + (:methods + (mem-usage :override-doc + "Account for this drawable wrapper and delegate to its entity actor in the entity category.") + ) ) (deftype drawable-tree-actor (drawable-tree) @@ -6915,6 +7452,10 @@ ((data drawable-actor 1 :inline) (pad uint8 4)) :flag-assert #x1200000044 + (:methods + (mem-usage :override-doc + "Account for the drawable-group header and every active inline actor wrapper.") + ) ) @@ -6934,7 +7475,9 @@ :size-assert #x20 :flag-assert #x1300000020 (:methods - (execute-ambient (_type_ vector) none) ;; 18 + (mem-usage :override-doc + "Account for this wrapper and its referenced ambient entity in the ambient memory category.") + (execute-ambient "Invoke the referenced ambient entity's handler at query-position." (_type_ vector) none) ;; 18 ) ) @@ -6947,6 +7490,10 @@ ((data drawable-ambient 1 :inline) (pad uint32)) :flag-assert #x1200000044 + (:methods + (mem-usage :override-doc + "Account for this array header and each inline ambient wrapper it contains.") + ) ) (deftype level-hint (process) @@ -6966,8 +7513,8 @@ :flag-assert #x10004000a8 ;; inherited inspect of process (:methods - (print-text (_type_) none) ;; 14 - (appeared-for-long-enough? (_type_) symbol) ;; 15 + (print-text "Draw this hint's localized text in the bottom-center hint region." (_type_) none) ;; 14 + (appeared-for-long-enough? "Return true after a non-sidekick hint has remained active for more than five seconds." (_type_) symbol) ;; 15 ) (:states (level-hint-sidekick string) @@ -7421,6 +7968,10 @@ :flag-assert #x900000020 ) +;; Input record for render-ocean-quad, four per quad, 48 bytes each. pos w is the homogeneous +;; weight of the camera matrix's translation row: 1.0 is an ordinary world position, and 0.0 places +;; the vertex at infinity along its own direction, which is how the far quads reach the horizon. +;; stq z and w are always 1.0, and the far passes put whole texture repeat counts in s and t. (deftype ocean-vertex (structure) ((pos vector :inline :offset-assert 0) (stq vector :inline :offset-assert 16) @@ -7431,6 +7982,10 @@ :flag-assert #x900000030 ) +;; 36 world-space bounding spheres, one per 768 m culling tile, indexed 6 * z-tile + x-tile. Centres +;; sit half a tile in from ocean-map start-corner and every radius is 2224365.5, the tile's half +;; diagonal. The centres carry y = 0 rather than start-corner y; the radius covers the plane's whole +;; vertical travel, so the cull is still conservative. (deftype ocean-spheres (structure) ((spheres sphere 36 :inline :offset-assert 0) ) @@ -7439,6 +7994,10 @@ :flag-assert #x900000240 ) +;; 2548 rgba entries: a 49x49 grid of mid-cell corner colors padded to a row stride of 52 so each +;; row is 13 quadwords. Addressed as colors[52 * z + x]. Columns 49..51 of every row are padding and +;; are all zero in both shipped placements (147 entries). Real entries all carry a = 128, the GS +;; unit alpha. (deftype ocean-colors (structure) ((colors rgba 2548 :offset-assert 0) ) @@ -7447,6 +8006,11 @@ :flag-assert #x9000027d0 ) +;; One eight-byte suppression record out of a shared, deduplicated pool. A set bit means do not +;; draw. The mid pass reads all 64 bits as the 8x8 mid cells of a 768 m tile, the near pass reads +;; all 64 bits as the 8x8 quads of 3 m inside a 24 m near cell, and the transition pass reads only +;; bits 0..3 of bytes 0..3, as the 4x4 quads of 24 m inside a mid cell. One record can serve several +;; roles, so bits a given consumer ignores may be meaningful to another. (deftype ocean-mid-mask (structure) ((mask uint8 8 :offset-assert 0) ;; avoid huge arrays. (this causes an ocean-transition function to not decompile!) (dword uint64 :offset 0) @@ -7457,6 +8021,9 @@ :flag-assert #x900000008 ) +;; One uint16 per 768 m culling tile selecting that tile's suppression record in ocean-mid-masks. +;; Read as int16, so #xffff is -1 and skips the tile; 0 selects the all-zero record and draws all 64 +;; of its cells. (deftype ocean-mid-indices (basic) ((data uint16 36 :offset-assert 4) ) @@ -7474,8 +8041,13 @@ :flag-assert #x900000008 ) +;; Suppression bits for the 4x4 near cells of one mid cell: mask[sub-z] bit sub-x. The uint64 +;; overlay makes the type eight bytes even though only four are used, so code that walks the array +;; as flat bytes through element zero steps by eight. (deftype ocean-trans-mask (structure) + ;; One row of four near cells; only bits 0..3 are meaningful. ((mask uint8 4 :offset-assert 0) + ;; All four rows at once, for clearing and copying. (word uint64 :offset 0) ) :pack-me @@ -7484,8 +8056,13 @@ :flag-assert #x900000008 ) +;; Per mid cell: parent selects the ocean-mid-masks record holding the cell's four transition strip +;; masks, child selects the ocean-near-index record for its 4x4 near cells. A negative parent means +;; the cell has no transition geometry. (deftype ocean-trans-index (structure) + ;; Index into ocean-mid-masks data, or -1. ((parent int16 :offset-assert 0) + ;; Index into ocean-near-indices data, or -1. (child int16 :offset-assert 2) ) :pack-me @@ -7502,6 +8079,8 @@ :flag-assert #x900002404 ) +;; Sixteen ocean-mid-masks indices for the 4x4 near cells of one transition cell, in the order 4 * +;; sub-z + sub-x. #xffff means the near cell has no water and the near pass skips it. (deftype ocean-near-index (structure) ((data uint16 16 :offset-assert 0) ) @@ -7529,8 +8108,15 @@ :flag-assert #x900000040 ) +;; Authored topology, visibility, and vertex-color data for one ocean placement. start-corner is +;; the minimum corner of the 48x48 mid grid. Its y is the surface height and is rewritten by draw- +;; ocean every frame, so that component is live state rather than authored data. far-color is the +;; single flat color of the far skirt and its corners. (deftype ocean-map (basic) + ;; Minimum corner of the mid grid. y is the live surface height, rewritten every frame by draw- + ;; ocean. ((start-corner vector :inline :offset-assert 16) + ;; Flat color of the far skirt strips and their corner quads. (far-color vector :inline :offset-assert 32) (ocean-spheres ocean-spheres :offset-assert 48) (ocean-colors ocean-colors :offset-assert 52) @@ -7560,6 +8146,9 @@ :flag-assert #x900000280 ) +;; One animation frame of the wave field: 32 rows of 32 signed bytes, x running fastest, matching +;; the [32 * z + x] addressing ocean-get-height uses on the interpolated field. Shipped samples span +;; -32..+31, six signed bits. (deftype ocean-wave-data (structure) ((data uint8 1024 :offset-assert 0) ) @@ -7568,6 +8157,9 @@ :flag-assert #x900000400 ) +;; 64 frames of the wave field, 64 KiB total. ocean-interp-wave selects frame (phase >> 5) & 63 and +;; blends it toward the next frame by (phase & 31) / 32, so both indices wrap and the animation +;; loops. (deftype ocean-wave-frames (structure) ((frame ocean-wave-data 64 :inline :offset-assert 0) ) @@ -7589,6 +8181,9 @@ (trans-mask-ptrs (pointer int32) 64 :offset-assert 2592) (trans-camera-masks ocean-trans-mask 16 :inline :offset-assert 2848) (trans-temp-masks ocean-trans-mask 16 :inline :offset-assert 2976) + ;; One entry per cell of the 4x4 mid window, holding the ocean-trans-index child that selects the + ;; cell's near mask table. ocean-transition stores -1 for a cell with no near child, and both + ;; ocean-transition and ocean-near read the entries as int16 to see that. (near-mask-indices uint16 16 :offset-assert 3104) (mid-minx uint8 :offset-assert 3136) (mid-maxx uint8 :offset-assert 3137) @@ -7608,11 +8203,20 @@ :flag-assert #x900000c4c ) +;; Working set for ocean-interp-wave, ocean-generate-verts and the VU0 program they share. (deftype ocean-vu0-work (structure) + ;; x and z convert the height difference between neighboring wave samples into the surface + ;; normal's tilt along that axis; they are negative because a height field's normal is (-dh/dx, 1, + ;; -dh/dz). y is the ceiling the lit vertex color is clamped to. w is unused. ((scales vector :inline :offset-assert 0) + ;; High halfword of each packed word. (mask-hi vector4w :inline :offset-assert 16) + ;; Low halfword of each packed word. (mask-lo vector4w :inline :offset-assert 32) + ;; Filled from the current time-of-day light group each time ocean-generate-verts runs, then + ;; uploaded to VU0. (lights vu-lights :inline :offset-assert 48) + ;; Scratch word upload-vu0-program uses to wait for the microprogram transfer. (wait-to-vu0 uint32 :offset-assert 160) ) :method-count-assert 9 @@ -7620,13 +8224,26 @@ :flag-assert #x9000000a4 ) +;; Constants for the pass that renders the wave lattice into the 128x128 ocean texture. Seven +;; quadwords at VU1 address 985. (deftype ocean-texture-constants (structure) + ;; The 66-vertex textured tri-strip that one row pair of the page becomes; 32 of them fill it. ((giftag gs-gif-tag :inline :offset-assert 0) + ;; The pair of 199-quadword VU1 output buffers, at 384 and 583, alternated per strip. (buffers vector4w :inline :offset-assert 16) + ;; The pair of 99-quadword VU1 row buffers, at 782 and 881. A row is 33 vertices of three + ;; quadwords. (dests vector4w :inline :offset-assert 32) + ;; Origin of the destination grid in the render target, with the constant depth the sprites are + ;; drawn at in z. (start vector :inline :offset-assert 48) + ;; The four-, eight-, twelve- and sixteen-texel steps between the four vertices of a group and + ;; between rows. (offsets vector :inline :offset-assert 64) + ;; 0.5 scale and 0.5 bias that map a signed reflection direction onto environment-map ST. (constants vector :inline :offset-assert 80) + ;; The camera's forward axis negated, so it points from the surface toward the eye. Makes the + ;; texture view-dependent, which is why it is rebuilt every frame. (cam-nrm vector :inline :offset-assert 96) ) :method-count-assert 9 @@ -7634,9 +8251,14 @@ :flag-assert #x900000070 ) +;; Prebuilt DMA/GIF headers for the ocean texture passes. Each begins with a DMA tag and a VIF1 +;; DIRECT of the right length, so a caller copies the header and appends its own data quadwords. (deftype ocean-texture-work (structure) + ;; One textured sprite from a UV/XYZ pair; used by the mip-chain pass. ((sprite-tmpl dma-gif-packet :inline :offset-assert 0) + ;; One untextured, blended sprite. (sprite-tmpl2 dma-gif-packet :inline :offset-assert 32) + ;; The five A+D registers of an adgif-shader. (adgif-tmpl dma-gif-packet :inline :offset-assert 64) ) :method-count-assert 9 @@ -7726,13 +8348,21 @@ :flag-assert #x900000160 ) +;; VU1 transform and packet templates for the near grid. Uploaded once per frame as 36 quadwords +;; ending at VU1 address 986. Three GIF tag / adgif pairs because a cell is drawn up to three +;; times: drw is the lit textured water, drw2/drw3 write only the framebuffer alpha, env adds the +;; environment map. (deftype ocean-near-constants (structure) ((hmge-scale vector :inline :offset-assert 0) (inv-hmge-scale vector :inline :offset-assert 16) (hvdf-offset vector :inline :offset-assert 32) (fog vector :inline :offset-assert 48) + ;; 0.5, 0.5, 0, 1/(meters 24): the reciprocal turns a cell-relative position into a fraction of + ;; the cell. (constants vector :inline :offset-assert 64) (constants2 vector :inline :offset-assert 80) + ;; (meters 3), 1/8, 2, 1/32: the wave-sample spacing, then one sample as a fraction of a near + ;; cell and of the whole 32x32 field. (constants3 vector :inline :offset-assert 96) (constants4 vector :inline :offset-assert 112) (drw-fan gs-gif-tag :inline :offset-assert 128) ;; was qword @@ -7746,11 +8376,17 @@ (env-strip gs-gif-tag :inline :offset-assert 384) (env-color vector :inline :offset-assert 400) (drw2-adgif gs-gif-tag :inline :offset-assert 416) + ;; Raw A+D qword: TEX0_1 for the alpha-only pass. Same 128x128 base level as drw-texture but + ;; with TCC set. (drw2-tex0 qword :inline :offset-assert 432) + ;; Raw A+D qword: FRAME_1 with FBMSK #xffffff, so the second pass writes only destination alpha. (drw2-frame qword :inline :offset-assert 448) (drw2-strip gs-gif-tag :inline :offset-assert 464) (drw3-adgif gs-gif-tag :inline :offset-assert 480) + ;; Raw A+D qword: the same FRAME_1 with the color mask cleared again. (drw3-frame qword :inline :offset-assert 496) + ;; Four pairs of VU1 vertex-row addresses. A cell row is nine vertices of three quadwords, so + ;; rows are 27 quadwords apart; x is one row and y the row four further on. (index-table vector4w 4 :inline :offset-assert 512) ) :method-count-assert 9 @@ -7758,11 +8394,21 @@ :flag-assert #x900000240 ) +;; Per-cell data for one 24-metre near cell: the camera-space rotation with the cell origin in its +;; translation row, that matrix times perspective, the authored 8x8 suppression mask spread over two +;; quadwords, the height-field quadword offsets of the cell's four corners, the ocean-texture ST +;; origin, and four bilinearly interpolated corner colors. (deftype ocean-near-upload (structure) ((rot matrix :inline :offset-assert 0) (matrix matrix :inline :offset-assert 64) + ;; The eight rows of an ocean-mid-mask, one row per 32-bit lane. A set bit drops one three-metre + ;; quad. (masks uint128 2 :offset-assert 128) + ;; Quadword offsets of the cell's four corners in the uploaded wave field: 64 per sub-cell row, 2 + ;; per sub-cell column, wrapped inside the mid cell. (start-height vector4w :inline :offset-assert 160) + ;; Ocean-texture ST origin for this sub-cell; the texture spans one whole mid cell, so the step + ;; is 0.25. (start-st vector :inline :offset-assert 176) (near-colors ocean-near-colors :inline :offset-assert 192) ) @@ -7878,6 +8524,19 @@ ;; - Types +(defenum sky-sun-index + :type int32 + (sun 0) + (green-sun 1) + ) + +(defenum sky-orbit-index + :type int32 + (sun 0) + (green-sun 1) + (moon 2) + ) + (deftype sky-color-hour (structure) ((snapshot1 int32 :offset-assert 0) (snapshot2 int32 :offset-assert 4) @@ -7968,7 +8627,7 @@ (default-vu-lights vu-lights :inline :offset-assert 1136) ) (:methods - (new (symbol type) _type_) ;; 0 + (new "Allocate the shared sky parameters and initialize the embedded upload-data type." (symbol type) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x4e0 @@ -8110,7 +8769,7 @@ (some-byte uint8 :offset 1939) ;; cant cast on update-mood-lavatube ) (:methods - (new (symbol type) _type_) ;; 0 + (new "Allocate a mood context and initialize its eight palette-weight vectors." (symbol type) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x794 @@ -8143,8 +8802,11 @@ :size-assert #x110 :flag-assert #xb00000110 (:methods - (reset! (_type_) symbol) ;; 9 - (set-fade! (_type_ int float float vector) object) ;; 10 ; returns float or error string + (reset! "Clear all eight fade requests and restore their nearest-actor distances." (_type_) symbol) ;; 9 + (set-fade! "Submit fade for slot index. Keep it only when actor-distance is nearer than the + request already stored this frame; clamp fade to 0 through 1.993 and optionally + copy trans for distance falloff." + (_type_ int float float vector) object) ;; 10 ; returns float or error string ) ) @@ -8173,6 +8835,10 @@ :method-count-assert 14 :size-assert #xb8 :flag-assert #xe005000b8 + (:methods + (relocate :override-doc + "Adjust the four optional celestial particle controls, then relocate the process allocation.") + ) (:states time-of-day-tick) ) @@ -8186,6 +8852,9 @@ :method-count-assert 9 :size-assert #x14 :flag-assert #x900000014 + (:methods + (asize-of :override-doc "Return the palette header plus width times height packed RGBA entries.") + ) ) (deftype time-of-day-context (basic) @@ -8286,20 +8955,27 @@ (deftype joint-anim-frame (structure) ((matrices matrix 2 :inline :offset-assert 0) - (data matrix :inline :dynamic :offset-assert 128) + (data transformq :inline :dynamic :offset-assert 128) ) :method-count-assert 9 :size-assert #x80 :flag-assert #x900000080 (:methods - (new (symbol type int) _type_) ;; 0 + (new "Allocate a joint-animation frame for joint-count skeleton entries." (symbol type int) _type_) ;; 0 ) ) +(defenum joint-anim-matrix-flags + :type uint32 + :bitfield #t + (matrix-0-animated 0) + (matrix-1-animated 1) + ) + (deftype joint-anim-compressed-hdr (structure) ((control-bits uint32 14 :offset-assert 0) (num-joints uint32 :offset-assert 56) - (matrix-bits uint32 :offset-assert 60) + (matrix-bits joint-anim-matrix-flags :offset-assert 60) ) :method-count-assert 9 :size-assert #x40 @@ -8353,10 +9029,15 @@ :size-assert #x14 :flag-assert #xd00000014 (:methods - (login (_type_) _type_) ;; 9 - (lookup-art (_type_ string type) joint) ;; 10 ;; can also be art-joint-anim - (lookup-idx-of-art (_type_ string type) int) ;; 11 - (needs-link? (_type_) symbol) ;; 12 + (login "Prepare this art object's optional resource lump for use." (_type_) _type_) ;; 9 + (lookup-art + "Return the named nested art of expected-type, or false when this object has no nested arts." + (_type_ string type) joint) ;; 10 ;; can also be art-joint-anim + (lookup-idx-of-art + "Return the index of the named nested art of expected-type, or false when this object has no +nested arts." + (_type_ string type) int) ;; 11 + (needs-link? "Return true when this art must be linked into a resident master art group." (_type_) symbol) ;; 12 ) ) @@ -8400,9 +9081,19 @@ :size-assert #x20 :flag-assert #xf00000020 (:methods - (relocate (_type_ kheap (pointer uint8)) none :replace) ;; 7 - (link-art! (_type_) art-group) ;; 13 - (unlink-art! (_type_) int) ;; 14 + (relocate + "Validate a loaded art group, log it in immediately outside a level load, or attach it to the +level currently loading." + (_type_ kheap (pointer uint8)) none :replace) ;; 7 + (link-art! + "Install every joint animation in this group into a resident master art group. Search level +slots 2 through 0, prefer the animation's authored index when it is valid and empty, and otherwise +use an empty slot. Print an error for an animation that cannot be linked." + (_type_) art-group) ;; 13 + (unlink-art! + "Remove this group's joint animations from matching resident master art groups in level slots +2 through 0. Print an error for an animation that was not linked anywhere." + (_type_) int) ;; 14 ) ) @@ -8463,7 +9154,11 @@ :size-assert #x21 :flag-assert #xa00000021 (:methods - (setup-lods! (_type_ skeleton-group art-group entity) _type_) ;; 9 + (setup-lods! + "Resolve the skeleton group's mesh indices into the art group's merc geometry, copy each LOD +distance, and apply entity or joint-geometry distance overrides. Return #f if any mesh index or +type is invalid." + (_type_ skeleton-group art-group entity) _type_) ;; 9 ) ) @@ -8542,10 +9237,22 @@ :size-assert #xbc :flag-assert #xc000000bc (:methods - (new (symbol type process art-joint-geo) _type_) ;; 0 + (new + "Allocate draw control for owner-process and retain the joint geometry used to construct its +skeleton." + (symbol type process art-joint-geo) _type_) ;; 0 + (relocate :override-doc + "Adjust the skeleton, owner process, ripple state, and any heap-local shadow control after + the owning process moves.") (get-skeleton-origin (_type_) vector) ;; 9 - (lod-set! (_type_ int) none) ;; 10 - (lods-assign! (_type_ lod-set) none) ;; 11 + (lod-set! + "Clamp desired-lod to the available range and switch the current merc geometry when the +selected level changes." + (_type_ int) none) ;; 10 + (lods-assign! + "Copy a complete LOD set into this draw control, then reselect the nearest valid current LOD +so its geometry pointer agrees with the new table." + (_type_ lod-set) none) ;; 11 ) ) @@ -8650,13 +9357,21 @@ (deftype merc-fragment (structure) ((header merc-byte-header :inline :offset-assert 0) + ;; Variable packed fragment data continues past the nominal type boundary. The header's + ;; mm-quadword-size field gives the complete allocation size. (rest uint8 1 :offset-assert 23) ) :method-count-assert 10 :size-assert #x18 :flag-assert #xa00000018 (:methods - (login-adgifs (_type_) none) ;; 9 + (asize-of :override-doc + "Return the complete qword-aligned fragment size, including packed data beyond the nominal +header.") + (login-adgifs + "Log in the fragment's shaders, bind reserved eye shaders to the current runtime eye +textures, and accumulate ordinary shader texture masks in the active MERC header." + (_type_) none) ;; 9 ) ) @@ -8713,6 +9428,10 @@ :method-count-assert 9 :size-assert #x4 :flag-assert #x900000004 + (:methods + (asize-of :override-doc + "Return the four-byte control header plus one two-byte destination record per matrix +transfer.")) ) (deftype merc-blend-ctrl (structure) @@ -8728,7 +9447,7 @@ (deftype mei-envmap-tint (structure) ((fade0 float :offset-assert 0) (fade1 float :offset-assert 4) - (tint uint32 :offset-assert 8) + (tint rgba :offset-assert 8) (dummy int32 :offset-assert 12) ) :method-count-assert 9 @@ -8776,10 +9495,20 @@ :flag-assert #x900000010 ) -;;effect-bits: -;; 0 - texture scroll -;; 1 - swap with last effect, -;; 2 - ripple +;; Per-effect features. Translucent geometry is moved to the final effect slot during login and its +;; bit is copied into the working header's use-translucent byte before drawing. +(defenum effect-bits + :type uint8 + :bitfield #t + (texscroll 0) + (translucent 1) + (ripple 2) + (effect-bit3 3) + (effect-bit4 4) + (effect-bit5 5) + (effect-bit6 6) + (effect-bit7 7) + ) (deftype merc-effect (structure) ((frag-geo merc-fragment :offset-assert 0) ;; ? @@ -8787,7 +9516,7 @@ (blend-data merc-blend-data :offset-assert 8) (blend-ctrl merc-blend-ctrl :offset-assert 12) (dummy0 uint8 :offset-assert 16) - (effect-bits uint8 :offset-assert 17) + (effect-bits effect-bits :offset-assert 17) (frag-count uint16 :offset-assert 18) (blend-frag-count uint16 :offset-assert 20) (tri-count uint16 :offset-assert 22) @@ -8803,7 +9532,10 @@ :size-assert #x20 :flag-assert #xa00000020 (:methods - (login-adgifs (_type_) none) ;; 9 + (login-adgifs + "Log in the effect's optional attached shader and every variable-size fragment, accumulating +their texture masks in the active MERC header." + (_type_) none) ;; 9 ) ) @@ -8901,6 +9633,13 @@ :method-count-assert 13 :size-assert #x70 :flag-assert #xd00000070 + (:methods + (mem-usage :override-doc + "Account for the base art data, packed fragment control and geometry, blend targets, and eye +animation owned by this MERC asset.") + (login :override-doc + "Log in every effect and eye shader, collect texture masks, and move the effect marked +translucent to the final effect slot. Discard an unrelocated low-address eye-control value.")) ) (deftype merc-vu1-low-mem (structure) @@ -8955,7 +9694,7 @@ (query ripple-merc-query :offset-assert 36) ) (:methods - (new (symbol type) _type_) ;; 0 + (new "Allocate disabled ripple state with distant default fade limits." (symbol type) _type_) ;; 0 ) :method-count-assert 9 :size-assert #x28 @@ -8964,7 +9703,7 @@ ;; - Functions -(define-extern merc-fragment-fp-data (function merc-fragment merc-fp-header)) +(define-extern merc-fragment-fp-data "Return the floating-point header inside fragment." (function merc-fragment merc-fp-header)) ;; ---------------------- @@ -9446,12 +10185,12 @@ (defenum shadow-flags :bitfield #t :type int32 - (shdf00) ;; unused - (disable-fade) - (shdf02) ;; only set, never used. - (shdf03) - (shdf04) ;; unused - (disable-draw) + (camera-cull) ;; skip when the camera is behind the bottom clip plane + (disable-fade) ;; ignore the fade-distance cull + (world-space-planes) ;; use clip planes directly instead of offsetting them by the shadow center + (scissor-top) ;; clip the volume against top-plane + (shdf04) ;; unused + (disable-draw) ;; master off switch ) (deftype shadow-settings (structure) @@ -9465,7 +10204,7 @@ (fade-start float :offset-assert 68) (dummy-2 int32 :offset-assert 72) (dummy-3 int32 :offset-assert 76) - (fade-vec vector :inline :offset 64) ;; added + (fade-vec vector :inline :offset 64) ) :method-count-assert 9 :size-assert #x50 @@ -9479,14 +10218,20 @@ :size-assert #x60 :flag-assert #x1000000060 (:methods - (new (symbol type float float float float float) _type_) ;; 0 - (clear-offset-bit (shadow-control) int) ;; 9 - (set-offset-bit (shadow-control) int) ;; 10 - (set-top-plane-offset (shadow-control float) int) ;; 11 - (set-bottom-plane-offset (shadow-control float) int) ;; 12 + (new "Allocate shadow controls with horizontal clipping planes, a downward projection direction, packed flags, and a fade distance." (symbol type float float float float float) _type_) ;; 0 + (clear-offset-bit "Clear the disable-draw flag." (shadow-control) int) ;; 9 + (set-offset-bit "Set the disable-draw flag." (shadow-control) int) ;; 10 + (set-top-plane-offset "Set the horizontal top clipping plane to the given Y coordinate." (shadow-control float) int) ;; 11 + (set-bottom-plane-offset "Set the horizontal bottom clipping plane to the given Y coordinate." (shadow-control float) int) ;; 12 (unused-13 (_type_) none) ;; 13 - (update-direction-from-time-of-day (_type_) none) ;; 14 - (collide-to-find-planes (_type_ vector float float float) none) ;; 15 + (update-direction-from-time-of-day + "Copy the current time-of-day shadow direction into this control." + (_type_) none) ;; 14 + (collide-to-find-planes + "Probe downward from origin and place the bottom and top clipping planes at the hit height plus + their respective offsets. Disable drawing when no background surface is found within + cast-length." + (_type_ vector float float float) none) ;; 15 ) ) @@ -9614,8 +10359,8 @@ ;; - Functions -(define-extern shadow-queue-append (function shadow-queue uint)) -(define-extern shadow-queue-reset (function shadow-queue int)) +(define-extern shadow-queue-append "Advance to the next shadow run and return its index." (function shadow-queue uint)) +(define-extern shadow-queue-reset "Select the first shadow run." (function shadow-queue int)) ;; - Symbols @@ -9684,8 +10429,10 @@ (define-extern mc-get-slot-info (function int mc-slot-info none)) (define-extern mc-run (function none)) (define-extern mc-check-result (function int)) -(define-extern mc-sync (function int)) -(define-extern show-mc-info (function dma-buffer none)) +(define-extern mc-sync "Wait for the current memory-card read or write to finish by advancing the memory-card + state machine until it reports a result. Return that result. This blocks the entire game, so it is + intended only for debugging." (function int)) +(define-extern show-mc-info "Draw the current status of both memory-card slots." (function dma-buffer none)) ;; - Symbols @@ -9732,29 +10479,76 @@ ) (deftype load-state (basic) + ;; object-name/object-status pair entity names with four-byte permanent-status snapshots so + ;; temporary birth and kill commands can be undone. ((want level-buffer-state 2 :inline :offset-assert 4) (vis-nick symbol :offset-assert 36) (command-list pair :offset-assert 40) - (object-name symbol 256 :offset-assert 44) ;; TODO string - (object-status basic 256 :offset-assert 1068) + (object-name string 256 :offset-assert 44) + ;; Four-byte slots holding entity-perm-status snapshots. + (object-status basic 256 :offset-assert 1068) ) :method-count-assert 21 :size-assert #x82c :flag-assert #x150000082c (:methods - (new (symbol type) _type_) ;; 0 - (reset! (_type_) _type_) ;; 9 - (update! (_type_) int) ;; 10 - (want-levels (_type_ symbol symbol) int) ;; 11 - (want-display-level (_type_ symbol symbol) int) ;; 12 - (want-vis (_type_ symbol) int) ;; 13 - (want-force-vis (_type_ symbol symbol) int) ;; 14 - (execute-command (_type_ pair) none) ;; 15 - (execute-commands-up-to (_type_ float) int) ;; 16 - (backup-load-state-and-set-cmds (_type_ pair) int) ;; 17 - (restore-load-state-and-cleanup (_type_) int) ;; 18 - (restore-load-state (_type_) int) ;; 19 - (set-force-inside! (_type_ symbol symbol) none) ;; 20 + (new "Allocate and reset a load-state." (symbol type) _type_) ;; 0 + (reset! "Clear both requested-level slots, the pending command list, and all 256 temporary + entity-state records, then return this." + (_type_) + _type_) ;; 9 + (update! "Advance requested level loading, display, forced-visibility, and forced-inside state. + Discard unrequested levels before starting another load, wait synchronously only when + both ordinary slots were empty and the requested display mode requires it, then + switch the active VIS file after entering the requested level's boxes." + (_type_) + int) ;; 10 + (want-levels "Make the two request slots contain level0 and level1 while preserving matching + slots and their display/visibility options. Clear unmatched slots and reset the + options of newly assigned slots." + (_type_ symbol symbol) + int) ;; 11 + (want-display-level "Set display-mode for a requested level. Enabling display for a level not + present in either request slot reports an error; disabling an absent level + is silent." + (_type_ symbol symbol) + int) ;; 12 + (want-vis "Select the visibility nickname requested by this load state." + (_type_ symbol) + int) ;; 13 + (want-force-vis "Set forced visibility for a requested level, or report an error when the level + is absent." + (_type_ symbol symbol) + int) ;; 14 + (execute-command "Execute one load or cutscene command. Commands may alter load requests, + symbols, entities, particles, settings, saves, time of day, camera state, or + events. Entity birth and kill commands save permanent state in one of 256 + slots so temporary playback can be cleaned up." + (_type_ pair) + none) ;; 15 + (execute-commands-up-to "Consume scheduled command-list entries whose timestamp is no later + than frame. Each entry may hold one command or a list of commands; the + first future entry remains pending." + (_type_ float) + int) ;; 16 + (backup-load-state-and-set-cmds "Discard stale temporary entity records after warning, snapshot + this into the global backup, clear the backup command list, and + install command-list for temporary cutscene or camera playback." + (_type_ pair) + int) ;; 17 + (restore-load-state-and-cleanup "Execute all remaining temporary commands, restore every tracked + entity's permanent status and kill any live temporary process, + then restore the saved load-state snapshot." + (_type_) + int) ;; 18 + (restore-load-state "Discard temporary entity tracking without undoing the entities, then + restore the saved load-state snapshot." + (_type_) + int) ;; 19 + (set-force-inside! "Set forced-inside behavior for a requested level, or report an error when + the level is absent." + (_type_ symbol symbol) + none) ;; 20 ) ) @@ -9794,7 +10588,9 @@ :size-assert #x7c :flag-assert #xa0000007c (:methods - (debug-draw! (_type_) none) ;; 9 + (debug-draw! + "Draw this checkpoint's position, name, and forward direction." + (_type_) none) ;; 9 ) ) @@ -9875,26 +10671,82 @@ :flag-assert #x1d00000144 ;; field dummy is a basic loaded with a signed load (:methods - (initialize! (_type_ symbol game-save string) _type_) ;; 9 - (adjust (_type_ symbol float handle) float) ;; 10 - (task-complete? (_type_ game-task) symbol) ;; 11 - (lookup-entity-perm-by-aid (_type_ actor-id) entity-perm) ;; 12 - (get-entity-task-perm (_type_ game-task) entity-perm) ;; 13 - (copy-perms-from-level! (_type_ level) none) ;; 14 - (copy-perms-to-level! (_type_ level) none) ;; 15 - (debug-print (_type_ symbol) _type_) ;; 16 - (get-or-create-continue! (_type_) continue-point) ;; 17 - (get-continue-by-name (_type_ string) continue-point) ;; 18 - (set-continue! (_type_ basic) continue-point) ;; 19 - (buzzer-count (_type_ game-task) int) ;; 20 - (seen-text? (_type_ text-id) symbol) ;; 21 - (mark-text-as-seen (_type_ text-id) none) ;; 22 - (got-buzzer? (_type_ game-task int) symbol) ;; 23 - (save-game! (_type_ game-save string) none) ;; 24 - (load-game! (_type_ game-save) game-save) ;; 25 - (clear-text-seen! (_type_ text-id) none) ;; 26 - (get-death-count (_type_ symbol) int) ;; 27 - (get-health-percent-lost (_type_ symbol) float) ;; 28 + (initialize! + "Reset or reload game state for cause. dead records death statistics and becomes life or try +in play mode; game clears all persistent progress and selects a starting checkpoint; try and game +restore lives. In play mode, restart actors asynchronously at the selected checkpoint and +optionally load save-to-load. continue-point-override applies only to a game reset." + (_type_ symbol game-save string) _type_) ;; 9 + (adjust + "Adjust lives, precursor orbs, power cells, or scout flies. Positive orb collection updates +per-level and total counts; a power-cell amount is its game-task ID; a scout-fly amount packs the +task in the low halfword and fly index in the high halfword. Return the resulting item count." + (_type_ symbol float handle) float) ;; 10 + (task-complete? + "Return whether task's permanent record has the real-complete bit." + (_type_ game-task) symbol) ;; 11 + (lookup-entity-perm-by-aid + "Return the saved entity permission record with actor ID aid, or #f when absent." + (_type_ actor-id) entity-perm) ;; 12 + (get-entity-task-perm + "Return the permanent task record indexed by task." + (_type_ game-task) entity-perm) ;; 13 + (copy-perms-from-level! + "Copy task-bearing entity permission records from level into persistent game state, replacing +records with matching actor IDs and appending new records while capacity remains." + (_type_ level) none) ;; 14 + (copy-perms-to-level! + "Copy matching persistent entity permission records into level, then clear transient +try-reset status bits before the entities are used." + (_type_ level) none) ;; 15 + (debug-print + "Inspect game state and optionally print completed game tasks or saved entity permissions. +Pass #f for both categories." + (_type_ symbol) _type_) ;; 16 + (get-or-create-continue! + "Return the current checkpoint in play mode when present. Otherwise populate and return the +shared default checkpoint in front of the camera using the current two-level load state." + (_type_) continue-point) ;; 17 + (get-continue-by-name + "Search every loaded level descriptor's checkpoint list and return the matching name, or #f." + (_type_ string) continue-point) ;; 18 + (set-continue! + "Select a checkpoint from a name or continue-point. A missing or invalid value creates the +shared camera-relative default checkpoint. Reset checkpoint death and time counters when the +selected pointer changes." + (_type_ basic) continue-point) ;; 19 + (buzzer-count + "Count the scout-fly bits stored in task's first reminder byte." + (_type_ game-task) int) ;; 20 + (seen-text? + "Return whether text's bit is set in the seen-text table." + (_type_ text-id) symbol) ;; 21 + (mark-text-as-seen + "Mark text as seen when its ID is between 1 and 4094." + (_type_ text-id) none) ;; 22 + (got-buzzer? + "Return whether scout-fly index is set in task's first reminder byte." + (_type_ game-task int) symbol) ;; 23 + (save-game! + "Pack the current persistent game state into save with save-name. Copy active-level entity +permissions first, write the summary used by the save menu, then append aligned tagged payloads +for progression, timers, settings, hints, tasks, and entity permissions." + (_type_ game-save string) none) ;; 24 + (load-game! + "Restore persistent game state from save. Keep PC-owned settings and speedrun state, shift +live display deadlines when the saved base clock is installed, bound variable-sized arrays to +their current capacities, copy permissions back to active levels, and refresh task status." + (_type_ game-save) game-save) ;; 25 + (clear-text-seen! + "Clear text's bit in the seen-text table; text must be a valid ID." + (_type_ text-id) none) ;; 26 + (get-death-count + "Return deaths divided by five and capped at four. Use the current level's death byte when +per-level? is true and it has a valid remap; otherwise use deaths since the last power cell." + (_type_ symbol) int) ;; 27 + (get-health-percent-lost + "Return one quarter of the capped death count; the argument is unused." + (_type_ symbol) float) ;; 28 ) ) @@ -9935,7 +10787,7 @@ ;; - Functions -(define-extern wind-get-hashed-index (function vector int)) +(define-extern wind-get-hashed-index "Hash a world position and the current wind tick into the 64-sample wind ring." (function vector int)) ;; - Symbols @@ -9992,6 +10844,12 @@ (count-clear-qword uint128 :offset 80) (last-clear uint128 :offset 96) ) + (:methods + (mem-usage + :override-doc + "Account for this 112-byte shrub prototype, its four populated geometry slots as +prototype-owned data, and its name string.") + ) :method-count-assert 9 :size-assert #x70 :flag-assert #x900000070 @@ -10002,6 +10860,15 @@ (data prototype-bucket-shrub 1 :inline :offset 32) (_pad uint32) ) + (:methods + (login + :override-doc + "Log in every populated geometry slot of every shrub prototype.") + (mem-usage + :override-doc + "Account for this inline prototype array in the drawable-group category, then account for +every shrub prototype it contains.") + ) :method-count-assert 18 :size-assert #x94 :flag-assert #x1200000094 @@ -10035,6 +10902,12 @@ (generic-count-clear uint128 :offset 80) (geometry-override prototype-tie 4 :offset 16 :score 1) ) + (:methods + (mem-usage + :override-doc + "Account for this TIE prototype's four populated geometry slots as prototype-owned data, its +name string, optional time-of-day palette, and optional collision fragments.") + ) :method-count-assert 9 :size-assert #x94 :flag-assert #x900000094 @@ -10047,7 +10920,14 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (login (_type_) none) ;; 9 + (mem-usage + :override-doc + "Account for this array in the drawable-group category, then account for every TIE prototype +it contains.") + (login + "Log in every populated geometry slot. For an environment-mapped prototype, resolve the +ADGIF shader without texture remapping and install its fixed linear-filtered, clamped blend state." + (_type_) none) ;; 9 ) ) @@ -10100,7 +10980,10 @@ :size-assert #x30 :flag-assert #xa00000030 (:methods - (debug-print-frames (_type_) _type_) ;; 9 + (debug-print-frames + "Print the selected frame payload for every entry in this channel's animation group. This is +intended for uncompressed animation objects." + (_type_) _type_) ;; 9 ) ) @@ -10145,9 +11028,21 @@ :size-assert #xc0 :flag-assert #xb000000c0 (:methods - (new (symbol type int) _type_) ;; 0 - (current-cycle-distance (_type_) float) ;; 9 - (debug-print-channels (_type_ symbol) int) ;; 10 + (new + "Allocate a joint controller with capacity for channel-capacity channels and initialize their +parent links." + (symbol type int) _type_) ;; 0 + (relocate :override-doc + "Adjust the optional effect controller, root-channel array, and every allocated channel's + parent pointer after the owning process heap moves.") + (current-cycle-distance + "Fold the active root-channel push, blend, push1, and stack commands and return the resulting +animation-cycle distance." + (_type_) float) ;; 9 + (debug-print-channels + "Print the command, animation, artist-frame position, interpolation, and final weight of every +active channel." + (_type_ symbol) int) ;; 10 ) ) @@ -10312,7 +11207,7 @@ ;; - Functions -(define-extern invalidate-cache-line (function pointer int)) +(define-extern invalidate-cache-line "Write back and invalidate both ways of an EE data-cache line." (function pointer int)) ;; - Symbols @@ -10348,9 +11243,11 @@ (elt-type type :offset 64) (data-offset uint16 :offset 96) (elt-count uint32 :offset 112 :size 15) - (inlined? uint8 :offset 127 :size 1) ;; guess. + (inlined? uint8 :offset 127 :size 1) ) :flag-assert #x900000010 + (:methods + (length :override-doc "Return the property's storage size in bytes: four bytes per reference or the element size for inline data.")) ) (deftype res-lump (basic) @@ -10367,20 +11264,60 @@ :flag-assert #x1600000020 ;; field extra is a basic loaded with a signed load (:methods - (new (symbol type int int) _type_) ;; 0 - (get-property-data (_type_ symbol symbol float pointer (pointer res-tag) pointer) pointer :no-virtual) ;; 9 - (get-property-struct (_type_ symbol symbol float structure (pointer res-tag) pointer) structure :no-virtual) ;; 10 - (get-property-value (_type_ symbol symbol float uint128 (pointer res-tag) pointer) uint128 :no-virtual) ;; 11 - (get-property-value-float (_type_ symbol symbol float float (pointer res-tag) pointer) float :no-virtual) ;; 12 - (get-tag-index-data (_type_ int) pointer) ;; 13 - (get-tag-data (_type_ res-tag) pointer) ;; 14 - (allocate-data-memory-for-tag! (_type_ res-tag) res-tag) ;; 15 - (sort! (_type_) _type_) ;; 16 - (add-data! (_type_ res-tag pointer) res-lump) ;; 17 - (add-32bit-data! (_type_ res-tag object) res-lump) ;; 18 - (lookup-tag-idx (_type_ symbol symbol float) res-tag-pair :no-virtual) ;; 19 - (make-property-data (_type_ float res-tag-pair pointer) pointer) ;; 20 - (get-curve-data! (_type_ curve symbol symbol float) symbol) ;; 21 + (new "Allocate a res lump with room for data-count tags and data-size bytes of property data." (symbol type int int) _type_) ;; 0 + (length :override-doc "Return the number of occupied property tags.") + (asize-of :override-doc "Return the lump's allocated size, including its tag table and packed data area.") + (mem-usage :override-doc "Add the lump and its referenced objects to the selected memory-usage category.") + (get-property-data "Return the address of property name at time, or default if lookup fails. + mode controls lookup: base ignores time and selects the first sample, exact requires a sample + at time, and interp selects an exact sample or brackets time for interpolation. + If tag-addr is nonfalse, write the selected lower res-tag there. If interpolation is required, + buf-addr must point to enough storage for every element of the result. Exact and + non-interpolated results point directly into the lump." (_type_ symbol symbol float pointer (pointer res-tag) pointer) pointer :no-virtual) ;; 9 + (get-property-struct "Return structure property name at time, or default if lookup fails. + mode controls lookup: base ignores time and selects the first sample, exact requires a sample + at time, and interp selects an exact sample or brackets time for interpolation. + Reference tags are dereferenced before returning. If tag-addr is nonfalse, write the selected + lower res-tag there. buf-addr supplies interpolation storage, although structure properties + are normally references and therefore are not interpolated." (_type_ symbol symbol float structure (pointer res-tag) pointer) structure :no-virtual) ;; 10 + (get-property-value "Return the first scalar element of property name in a 128-bit value, or + default if lookup or type conversion fails. + mode controls lookup: base ignores time and selects the first sample, exact requires a sample + at time, and interp selects an exact sample or brackets time for interpolation. + Integer values are sign- or zero-extended according to their element type; float bits are + returned in the same 128-bit container. If tag-addr is nonfalse, write the selected lower + res-tag there. buf-addr must hold the interpolated array when interpolation is required." (_type_ symbol symbol float uint128 (pointer res-tag) pointer) uint128 :no-virtual) ;; 11 + (get-property-value-float "Return the first numeric element of property name converted to float, + or default if lookup or type conversion fails. + mode controls lookup: base ignores time and selects the first sample, exact requires a sample + at time, and interp selects an exact sample or brackets time for interpolation. + Float properties are loaded directly and integer properties are numerically converted + according to their signedness and width. If tag-addr is nonfalse, write the selected lower + res-tag there. buf-addr must hold the interpolated array when interpolation is required." (_type_ symbol symbol float float (pointer res-tag) pointer) float :no-virtual) ;; 12 + (get-tag-index-data "Return the data address for tag index i." (_type_ int) pointer) ;; 13 + (get-tag-data "Return the data address described by tag." (_type_ res-tag) pointer) ;; 14 + (allocate-data-memory-for-tag! "Reuse an aligned compatible slot or allocate 16-byte-aligned lump storage for tag. + Install the updated tag, force a zero element count to one, and return false if the tag table or data area is full." (_type_ res-tag) res-tag) ;; 15 + (sort! "Bubble-sort occupied tags by the first eight name bytes and then by key frame." (_type_) _type_) ;; 16 + (add-data! "Install tag and copy its inline payload, or store data as a reference. + A reference tag with more than one element appears to store only the first pointer even though + its allocated length accounts for the full array." (_type_ res-tag pointer) res-lump) ;; 17 + (add-32bit-data! "Install value as one inline 32-bit property." (_type_ res-tag object) res-lump) ;; 18 + (lookup-tag-idx "Find the tag indices for property name-sym at time and return them packed as a + res-tag-pair. + In base mode, ignore time and repeat the earliest sample index in both halves. In exact mode, + require an exact key-frame match and repeat that index. In interp mode, repeat an exact match + or return the nearest lower and upper samples that bracket time. + The untimed -1000000000.0 sample is a fallback before the first timed sample, not an + interpolation endpoint. Return a negative packed result when the property or requested sample + is missing." (_type_ symbol symbol float) res-tag-pair :no-virtual) ;; 19 + (make-property-data "Return the property data selected by tag-pair at time. + Reference properties, exact samples, pairs with different element counts or types, a false + buf, and unsupported element types return the lower sample's address directly. + Otherwise interpolate every element of matching inline float, integer, or vector arrays into + buf and return buf. The caller must provide enough storage for the complete array." (_type_ float res-tag-pair pointer) pointer) ;; 20 + (get-curve-data! "Load exact control-point and knot properties into curve-target at time. + Return true only when both properties exist, and clamp the reported control-point count to 256." (_type_ curve symbol symbol float) symbol) ;; 21 ) ) @@ -10410,11 +11347,17 @@ ;; - Functions -(define-extern vu-lights<-light-group! (function vu-lights light-group none)) -(define-extern light-slerp (function light light light float light)) -(define-extern light-group-slerp (function light-group light-group light-group float light-group)) -(define-extern light-group-process! (function vu-lights light-group vector vector none)) -(define-extern vu-lights-default! (function vu-lights vu-lights)) +(define-extern vu-lights<-light-group! "Convert a light group to the VU lighting layout used by foreground renderers." (function vu-lights light-group none)) +(define-extern light-slerp "Blend light a toward b into out, clamping alpha to 0 through 1. + Color and level are interpolated linearly; direction uses spherical interpolation and preserves + a's direction magnitude." (function light light light float light)) +(define-extern light-group-slerp "Blend all three directional lights and the ambient light from + group a toward group b into out. light-slerp clamps alpha separately for each light." (function light-group light-group light-group float light-group)) +(define-extern light-group-process! "Convert group into the transposed VU lighting layout in lights. + The signed y rotation from vector-b to vector-a is calculated first, but its result is not used." + (function vu-lights light-group vector vector none)) +(define-extern vu-lights-default! "Initialize lights with neutral axis directions, white, dim gray, + and black directional colors, and 0.3 gray ambient light." (function vu-lights vu-lights)) ;; - Symbols @@ -10445,8 +11388,13 @@ ;; - Functions -(define-extern time-to-apex (function float float int)) -(define-extern time-to-ground (function float float float int)) +(define-extern time-to-apex "Return the truncated number of 300 Hz ticks until upward-velocity + reaches zero under constant gravity-acceleration. The acceleration is signed along the same axis + and is normally negative." (function float float int)) +(define-extern time-to-ground "Return the number of 300 Hz ticks needed to fall height. + Starting with upward-velocity, subtract the positive downward gravity-strength each tick and then + advance displacement with the new velocity. This matches the game's discrete integration order." + (function float float float int)) ;; - Symbols @@ -10484,8 +11432,11 @@ ;; target is launch jumping (from a blue eco pad) (prevent-attacks-during-launch-jump) - (surf08) ;; never set, prevents various attacks from being possible - (surf09) ;; another attack prevent + ;; never set by any shipped surface, but tested together with the launch-jump bit: + ;; blocks square/"hands" attacks, including the flop out of jump states + (prevent-hand-attack) + ;; never set by a shipped surface; blocks circle/"feet" spin attacks + (prevent-feet-attack) (allow-edge-grab) ;; if set, and jak is falling, turn on the ledge grab search. (jump) ;; set on all jumps, used to prevent "on-grounds" in places (attacking) ;; set on all attacks, but not actually used anywhere @@ -10537,12 +11488,23 @@ ;; - Functions -(define-extern calc-terminal-vel (function float float float float)) -(define-extern calc-terminal2-vel (function float float float float float)) -(define-extern calc-terminal4-vel (function float float float float)) -(define-extern surface-interp! (function surface surface surface float surface)) -(define-extern surface-mult! (function surface surface surface surface)) -(define-extern surface-clamp-speed (function surface surface surface int none)) +(define-extern calc-terminal-vel "Compute the fixed-point velocity for the legacy linear drag + equation from per-second acceleration, constant drag, and the linear drag coefficient." + (function float float float float)) +(define-extern calc-terminal2-vel "Compute the fixed-point velocity for the legacy quadratic drag + equation. reserved is accepted by the original interface but is not used." (function float float float float float)) +(define-extern calc-terminal4-vel "Compute the fixed-point velocity for the legacy fourth-power + drag equation from per-second acceleration, constant drag, and the drag coefficient." + (function float float float float)) +(define-extern surface-interp! "Blend src0 toward src1 into dst. + Linearly interpolate all 30 numeric parameters. For each hook, prefer a nonempty src1 hook, then a + nonempty src0 hook, then nothing. Copy mode and flags from src1." (function surface surface surface float surface)) +(define-extern surface-mult! "Combine src0 and src1 into dst. + Multiply all 30 numeric parameters, select each hook from src1 then src0, copy mode from src1, OR + both flag sets, and call the selected mult-hook with pass 1." (function surface surface surface surface)) +(define-extern surface-clamp-speed "On pass 1, clamp dst's maximum and target speeds to the + corresponding minima of dst and src0. src1 is unused but retained for the mult-hook interface." + (function surface surface surface int none)) ;; - Symbols @@ -10609,8 +11571,9 @@ (noedge uint8 :offset 2 :size 1) (nolineofsight uint8 :offset 12 :size 1) - ;; this is not in the inspect, but appears to be set. - (unknown-bit uint8 :offset 15 :size 1) + ;; Ignore endless-fall contacts. This overlaps bit 1 of event because ignore + ;; masks use the same packed bit positions as triangle PAT values. + (noendlessfall uint8 :offset 15 :size 1) ) :method-count-assert 9 :size-assert #x4 @@ -10630,9 +11593,12 @@ ;; - Functions -(define-extern pat-material->string (function pat-surface string)) -(define-extern pat-mode->string (function pat-surface string)) -(define-extern pat-event->string (function pat-surface string)) +(define-extern pat-material->string "Return pat's material name, or *unknown* when its packed value + is outside pat-material." (function pat-surface string)) +(define-extern pat-mode->string "Return pat's collision-mode name, or *unknown* when its packed + value is outside pat-mode." (function pat-surface string)) +(define-extern pat-event->string "Return pat's contact-event name, or *unknown* when its packed + value is outside pat-event." (function pat-surface string)) ;; - Symbols @@ -10654,8 +11620,10 @@ (has-power-cell 1) ;; should spawn power cell on death (vent-valve 2) (wrap-phase 3) ;; phase should wrap from 1 to 0 instead of mirroring. - (fop4 4) ;; unused? - (fop5 5) ;; wait-for-cue after death? nothing sets this. + (fop4 4) ;; unused (no reads or writes) + ;; if set in an actor's options, a nav-enemy (babak checks it in go-initial-state!) spawns + ;; dormant in nav-enemy-wait-for-cue instead of idle; nothing in shipped actor data sets it. + (start-wait-for-cue 5) (instant-collect 6) ;; set on balloon lurker, puffer (skip-jump-anim 7) ;; skips fuel cell "jump" animation (can-collect 8) @@ -10707,10 +11675,21 @@ :size-assert #x28 :flag-assert #xc00000028 (:methods - (new (symbol type process-drawable pickup-type float) _type_) ;; 0 - (drop-pickup (_type_ symbol process-tree fact-info int) (pointer process)) ;; 9 + (new "Allocate fact information for owner, allowing its eco-info resource to override kind + and amount, then load its options and optional fade or respawn timeout." + (symbol type process-drawable pickup-type float) _type_) ;; 0 + (relocate :override-doc + "Adjust the owning process pointer after its process heap moves.") + (drop-pickup + "Choose and spawn this pickup drop. Random eco-pill drops use death count, player health, the +live pill count, and amount-bonus to select health or an adjusted pill amount. Probe downward from +the owning process for a ground position, raise fuel cells, and return the last spawned process. +radial-velocity? distributes multiple pickups around the Y axis; destination-pool owns them, and +spawn-info is retained for the caller interface but is not read." + (_type_ symbol process-tree fact-info int) (pointer process)) ;; 9 (reset! (_type_ symbol) none) ;; 10 - (pickup-collectable! (_type_ pickup-type float handle) float) ;; 11 + (pickup-collectable! "Return zero without changing the pickup state; fact-info-target + overrides this hook to apply pickups." (_type_ pickup-type float handle) float) ;; 11 ) ) @@ -10737,7 +11716,18 @@ :size-assert #x90 :flag-assert #xc00000090 (:methods - (new (symbol type process-drawable pickup-type float) _type_) ;; 0 + (new "Allocate target fact information, initialize its common pickup fields, clear the + current eco source, and reset its health and pickup state." + (symbol type process-drawable pickup-type float) _type_) ;; 0 + (reset! :override-doc + "Reset one target pickup category, or all categories when field is #f. Eco clears its level +and timeout; health restores its configured maximum; buzzer and eco-pill restore their maxima and +clear their counts.") + (pickup-collectable! :override-doc + "Apply a target pickup. Handle green health eco, small eco pills, precursor orbs, power cells, +scout flies, and timed red, blue, or yellow eco; update counts, timers, sound, vibration, collision +state, and blue-eco tracking effects. A zero colored-eco amount returns the active amount for that +eco kind without extending its timer.") ) ) @@ -10754,13 +11744,16 @@ :size-assert #x44 :flag-assert #xc00000044 (:methods - (new (symbol type process-drawable pickup-type float) _type_) ;; 0 + (new "Allocate enemy fact information, initialize its common pickup fields, and load its + movement, notice, and camera-distance tuning from the owning entity." + (symbol type process-drawable pickup-type float) _type_) ;; 0 ) ) ;; - Functions -(define-extern pickup-type->string (function pickup-type string)) +(define-extern pickup-type->string "Return kind's pickup name, or *unknown* when its value is + outside pickup-type." (function pickup-type string)) ;; - Symbols @@ -10814,12 +11807,27 @@ :size-assert #x134 :flag-assert #xe00000134 (:methods - (new (symbol type process-drawable) _type_) ;; 0 - (compute-alignment! (_type_) transformq) ;; 9 - (align! (_type_ align-opts float float float) trsqv) ;; 10 - (align-vel-and-quat-only! (_type_ align-opts vector int float float) trsqv) ;; 11 ;; 3rd arg is unused - (first-transform (_type_) transform) ;; 12 - (snd-transform (_type_) transform) ;; 13 + (new "Allocate an alignment controller and associate it with owner." (symbol type process-drawable) _type_) ;; 0 + (relocate :override-doc + "Adjust the owning process pointer after its process heap moves.") + (compute-alignment! + "Sample the skeleton's alignment joint and return its translation, scale, and rotation change +since the previous sample. Disable application for a missing or changed animation, a loop wrap, or +the first frame of a non-looping animation so the discontinuity is not mistaken for root motion." + (_type_) transformq) ;; 9 + (align! + "Apply the sampled animation-root delta through the owning process's apply-alignment method. +options selects the velocity axes and rotation; x-scale, y-scale, and z-scale independently scale +the translation passed to that method. Return the process root." + (_type_ align-opts float float float) trsqv) ;; 10 + (align-vel-and-quat-only! + "Apply selected parts of the sampled root motion directly to the process root. The Y velocity +uses y-scale. XZ follows desired-travel, with per-frame distance limited by both desired-travel's +length and the animation delta's length times animation-speed-scale before conversion to speed. The +integer argument is unused. Return the process root." + (_type_ align-opts vector int float float) trsqv) ;; 11 + (first-transform "Return the current alignment-joint transform." (_type_) transform) ;; 12 + (snd-transform "Return the previous alignment-joint transform." (_type_) transform) ;; 13 ) ) @@ -10889,12 +11897,39 @@ :flag-assert #x14004000b0 ;; inherited inspect of process (:methods - (initialize-skeleton (_type_ skeleton-group pair) none) ;; 14 - (initialize-skeleton-by-name (_type_ string object) _type_) ;; 15 - (apply-alignment (_type_ align-opts transformq vector) collide-shape) ;; 16 - (do-joint-math! (_type_) none) ;; 17 - (cleanup-for-death (_type_) none) ;; 18 - (evaluate-joint-control (_type_) none) ;; 19 + (deactivate :override-doc + "Stop particles and ambient sound owned by this drawable, then perform the ordinary process +deactivation.") + (relocate :override-doc + "Adjust every optional drawable controller owned by this process, then relocate the process + allocation.") + (initialize-skeleton + "Load the skeleton group's art group, construct draw and cspace data from skeleton-template, +select its meshes and render resources, and initialize joint animation. Art lookup or type errors +enter process-drawable-art-error." + (_type_ skeleton-group pair) none) ;; 14 + (initialize-skeleton-by-name + "Resolve *-sg* to a valid skeleton-group and initialize it with skeleton-template. +Enter process-drawable-art-error when the named group is absent or invalid." + (_type_ string object) _type_) ;; 15 + (apply-alignment + "Apply the requested animation-root alignment to this drawable. Selected local velocity +components are rebuilt from animation translation, per-axis scale, frame rate, and gravity; the +rotation option postmultiplies and normalizes the root quaternion." + (_type_ align-opts transformq vector) collide-shape) ;; 16 + (do-joint-math! + "Generate the current animation frame, run skeleton prebind and postbind hooks, build every +cspace transform, and update the draw origin. Hidden objects with no-animation set are skipped." + (_type_) none) ;; 17 + (cleanup-for-death + "Remove collision links, disable joint channels, and mark the drawable's entity permanently +dead before process teardown." + (_type_) none) ;; 18 + (evaluate-joint-control + "Evaluate active joint channels, restarting when evaluation changes the channel stack. +Validate animation objects, clamp frame positions and blend weights, then update blend shapes, +eyes, and effect control." + (_type_) none) ;; 19 ) (:states (process-drawable-art-error string) @@ -10971,7 +12006,7 @@ (control) (angle) (rotate-to) - (atki13) + (prev-state) ) (deftype attack-info (structure) @@ -10995,7 +12030,11 @@ :size-assert #x68 :flag-assert #xa00000068 (:methods - (combine! (_type_ attack-info) none) ;; 9 + (combine! + "Merge fields selected by incoming.mask. Derive a missing knockback vector from the attacker +to the current process; when a vector is supplied, use it to default shove-back and shove-up. +Default dist to the absolute shove-back distance." + (_type_ attack-info) none) ;; 9 ) ) @@ -11037,13 +12076,17 @@ (new-post-hook (function none) :offset-assert 256) ;; TODO - no idea on these types (cur-post-hook (function none) :offset-assert 260) ;; TODO - no idea on these types (clone-copy-trans symbol :offset-assert 264) - (shadow-backup basic :offset-assert 268) + (shadow-backup shadow-geo :offset-assert 268) (draw? symbol :offset-assert 272) ) :heap-base #xb0 :method-count-assert 20 :size-assert #x114 :flag-assert #x1400b00114 + (:methods + (relocate :override-doc + "Adjust all four optional joint modifiers, then relocate this drawable process.") + ) (:states manipy-idle) ) @@ -11060,7 +12103,13 @@ :size-assert #xd0 :flag-assert #x15006000d0 (:methods - (is-visible? (_type_) symbol) ;; 20 + (init-from-entity! :override-doc + "Initialize the particle source, ambient sound, and visibility radius. Resolve art-name from +a cached particle-group pointer, string, or symbol; the beach-grotto group uses a larger radius and +special state. The source entity's completion flag determines whether spawning begins enabled.") + (is-visible? + "Update the world-space visibility sphere and return whether it intersects the view frustum." + (_type_) symbol) ;; 20 ) (:states part-spawner-active) @@ -11085,6 +12134,12 @@ :method-count-assert 14 :size-assert #xf8 :flag-assert #xe009000f8 + (:methods + (deactivate :override-doc + "Kill this tracker's live particles before performing ordinary process deactivation.") + (relocate :override-doc + "Adjust the optional root transform and particle control, then relocate the process.") + ) (:states part-tracker-process) ) @@ -11115,7 +12170,11 @@ :size-assert #xe0 :flag-assert #xf007000e0 (:methods - (eval (_type_ pair) process) ;; 14 + (eval + "Evaluate one (command-name . arguments) camera script command and return its command-specific +result. Commands can wait, loop, exchange events, grab and release actors, control drawing and +camera targets, and launch camera animation." + (_type_ pair) process) ;; 14 ) (:states camera-tracker-process) @@ -11129,7 +12188,7 @@ (event symbol :offset-assert 192) (run-function (function object) :offset-assert 196) (callback (function touch-tracker none) :offset-assert 200) - (event-mode basic :offset-assert 204) ;; not a basic! + (event-mode symbol :offset-assert 204) ) :heap-base #x60 :method-count-assert 20 @@ -11149,6 +12208,13 @@ :method-count-assert 14 :size-assert #x98 :flag-assert #xe00300098 + (:methods + (init-from-entity! :override-doc + "Initialize the pole transform and horizontal facing from entity, install its grab range, +and begin waiting for a nearby edge-grab-capable target.") + (relocate :override-doc + "Adjust the optional root transform, then relocate the process.") + ) (:states swingpole-stance swingpole-active) @@ -11168,8 +12234,14 @@ :size-assert #x1c :flag-assert #xb0000001c (:methods - (init! (_type_ string int int int symbol string) none) ;; 9 - (get-response (_type_) symbol) ;; 10 + (init! + "Initialize a prompt at x-position and y-position. message-space separates the question from +its response line; cancel-only? disables confirmation, and cancel-message labels that response." + (_type_ string int int int symbol string) none) ;; 9 + (get-response + "Suppress hints and the HUD while displaying this prompt. Consume X as yes when confirmation +is allowed or triangle as no, then return yes, no, or undecided." + (_type_) symbol) ;; 10 ) ) @@ -11200,6 +12272,8 @@ :size-assert #x70 :flag-assert #xf00000070 (:methods + (init-from-entity! :override-doc + "Mark the source entity dead and enter this hidden process's virtual die state.") (die () _type_ :state) ;; 14 ) ) @@ -11226,7 +12300,7 @@ (flags pov-camera-flag :offset-assert 176) (debounce-start-time time-frame :offset-assert 184) (notify-handle handle :offset-assert 192) - (anim-name string :offset-assert 200) + (anim-name basic :offset-assert 200) (command-list pair :offset-assert 204) (mask-to-clear process-mask :offset-assert 208) (music-volume-movie float :offset-assert 212) @@ -11242,11 +12316,22 @@ (pov-camera-playing () _type_ :state) ;; 22 (pov-camera-start-playing () _type_ :state) ;; 23 (pov-camera-startup () _type_ :state) ;; 24 - (check-for-abort (_type_) symbol) ;; 25 - (target-grabbed? (_type_) symbol) ;; 26 - (pre-startup-callback (_type_) none) ;; 27 - (target-released? (_type_) symbol) ;; 28 - (set-stack-size! (_type_) none) ;; 29 + (check-for-abort + "After the input debounce, consume triangle or honor allow-abort. When notify-of-abort is set, +send abort-request to the owner and return true; otherwise return false." + (_type_) symbol) ;; 25 + (target-grabbed? + "Return whether the target has yielded control to this camera, or whether no target exists." + (_type_) symbol) ;; 26 + (pre-startup-callback + "Run camera-subtype setup immediately before entering startup. The base method does nothing." + (_type_) none) ;; 27 + (target-released? + "Return whether the target has resumed normal control, or whether no target exists." + (_type_) symbol) ;; 28 + (set-stack-size! + "Let a camera subtype select its process stack size. The base method leaves it unchanged." + (_type_) none) ;; 29 ) ) @@ -11267,15 +12352,40 @@ :size-assert #x8 :flag-assert #x1200000008 (:methods - (get-current-value (_type_ float) float) ;; 9 - (get-current-phase-no-mod (_type_) float) ;; 10 - (get-current-phase (_type_) float) ;; 11 - (get-current-value-with-mirror (_type_ float) float) ;; 12 - (get-current-phase-with-mirror (_type_) float) ;; 13 - (setup-params! (_type_ uint float float float) none) ;; 14 - (load-params! (_type_ process uint float float float) symbol) ;; 15 - (sync-now! (_type_ float) float) ;; 16 - (get-phase-offset (_type_) float) ;; 17 + (get-current-value + "Return the current sawtooth phase multiplied by max-value." + (_type_ float) float) ;; 9 + (get-current-phase-no-mod + "Return the base clock's wrapped phase from 0 through 1 without applying a subtype's easing +or endpoint pauses." + (_type_) float) ;; 10 + (get-current-phase + "Return the current sawtooth phase from 0 through 1." + (_type_) float) ;; 11 + (get-current-value-with-mirror + "Return a triangular value that moves from zero to max-value and back to zero during each +period." + (_type_ float) float) ;; 12 + (get-current-phase-with-mirror + "Return a triangular phase that moves from zero to one and back to zero during each period." + (_type_) float) ;; 13 + (setup-params! + "Set the period in 300 Hz game-time ticks and the initial phase as a fraction of that period. +The base clock ignores ease-out and ease-in, which are retained for the shared subtype interface." + (_type_ uint float float float) none) ;; 14 + (load-params! + "Load the sync resource from proc. Its first two floats are the period in seconds and initial +phase; the period is converted to 300 Hz game-time ticks. Return true when the resource exists, +otherwise install the supplied defaults and return false. The base clock ignores default-ease-out +and default-ease-in." + (_type_ process uint float float float) symbol) ;; 15 + (sync-now! + "Adjust the stored tick offset so the current normalized phase equals phase-now, then return +the wrapped offset." + (_type_ float) float) ;; 16 + (get-phase-offset + "Return the stored tick offset as a fraction of the period." + (_type_) float) ;; 17 ) ) @@ -11290,6 +12400,22 @@ :method-count-assert 18 :size-assert #x1c :flag-assert #x120000001c + (:methods + (setup-params! :override-doc + "Set the period and initial phase, then build a normalized quadratic-linear-quadratic easing +curve for each leg of the mirrored phase. ease-out is the accelerating fraction at the start and +ease-in is the decelerating fraction at the end; both are clamped, and ease-out is shortened if +they overlap.") + (load-params! :override-doc + "Load the sync resource from proc. Four floats supply period seconds, initial phase, +ease-out, and ease-in; a two-value resource uses the supplied easing defaults. Return true when the +resource exists, otherwise install every supplied default and return false.") + (get-current-phase-with-mirror :override-doc + "Return the mirrored zero-to-one-to-zero phase after applying the stored +quadratic-linear-quadratic easing curve independently to each leg.") + (get-current-value-with-mirror :override-doc + "Return the eased mirrored phase multiplied by max-value.") + ) ) (deftype sync-info-paused (sync-info) @@ -11300,6 +12426,26 @@ :method-count-assert 18 :size-assert #x10 :flag-assert #x1200000010 + (:methods + (setup-params! :override-doc + "Set the period and initial phase plus endpoint pauses measured as fractions of the complete +cycle. pause-after-out holds the value at one and pause-after-in holds it at zero; both are clamped +and pause-after-in is shortened if the pauses would overlap.") + (load-params! :override-doc + "Load the sync resource from proc. Four floats supply period seconds, initial phase, +pause-after-out, and pause-after-in; a two-value resource uses the supplied pause defaults. Return +true when the resource exists, otherwise install every supplied default and return false.") + (get-current-phase :override-doc + "Return a zero-to-one sawtooth that reaches one early, then holds there for the configured +pause-after-out fraction of the cycle. This non-mirrored form does not use pause-after-in.") + (get-current-value :override-doc + "Return the paused non-mirrored phase multiplied by max-value.") + (get-current-phase-with-mirror :override-doc + "Return a zero-to-one-to-zero phase whose moving legs are shortened to leave the configured +holds at one and zero.") + (get-current-value-with-mirror :override-doc + "Return the paused mirrored phase multiplied by max-value.") + ) ) (deftype delayed-rand-float (structure) @@ -11315,8 +12461,15 @@ :size-assert #x1c :flag-assert #xb0000001c (:methods - (set-params! (_type_ int int float) float) ;; 9 - (update! (_type_ ) float) ;; 10 + (set-params! + "Initialize the value to zero. Each later change waits a random number of game-time ticks +between min-delay and max-delay and chooses a value from the symmetric interval whose total width +is value-range." + (_type_ int int float) float) ;; 9 + (update! + "Choose a new delay and uniformly distributed value when the current delay expires, then +return the held value." + (_type_ ) float) ;; 10 ) ) @@ -11333,27 +12486,53 @@ :size-assert #x18 :flag-assert #xb00000018 (:methods - (set-params! (_type_ float float float float) float) ;; 9 - (update! (_type_ float) float) ;; 10 + (set-params! + "Initialize value and target to initial-value, clear velocity, and set the spring gain, +velocity limit, and retained damping fraction. A damping value of zero prevents movement, while one +applies no damping and permits continued oscillation." + (_type_ float float float float) float) ;; 9 + (update! + "Advance the damped spring toward target plus target-offset. Acceleration is scaled by frame +time, velocity is clamped before damping, and the final integration is also frame-time scaled." + (_type_ float) float) ;; 10 ) ) +(defenum bouncing-float-state + :type int32 + :bitfield #f + (at-minimum -1) + (free 0) + (at-maximum 1) + ) + (deftype bouncing-float (structure) ((osc oscillating-float :inline :offset-assert 0) (max-value float :offset-assert 24) (min-value float :offset-assert 28) (elasticity float :offset-assert 32) - (state int32 :offset-assert 36) + (state bouncing-float-state :offset-assert 36) ) :pack-me :method-count-assert 13 :size-assert #x28 :flag-assert #xd00000028 (:methods - (set-params! (_type_ float float float float float float float) float) ;; 9 - (update! (_type_ float) float) ;; 10 - (at-min? (_type_) symbol) ;; 11 ;; bool - (at-max? (_type_) symbol) ;; 12 ;; bool + (set-params! + "Initialize a damped spring constrained between min-value and max-value. elasticity controls +the fraction of outward velocity retained, with its direction reversed, when an endpoint is hit; +max-vel clamps the spring velocity before that collision response." + (_type_ float float float float float float float) float) ;; 9 + (update! + "Advance the spring toward target plus target-offset, clamp any endpoint crossing, reflect +outward velocity by elasticity, record which endpoint was hit, and return the resulting value." + (_type_ float) float) ;; 10 + (at-min? + "Return true when the latest update hit the minimum endpoint." + (_type_) symbol) ;; 11 ;; bool + (at-max? + "Return true when the latest update hit the maximum endpoint." + (_type_) symbol) ;; 12 ;; bool ) ) @@ -11370,10 +12549,22 @@ :size-assert #x30 :flag-assert #xd00000030 (:methods - (set-params! (_type_ int int float float) vector) ;; 9 - (update-now! (_type_) vector) ;; 10 - (update-with-delay! (_type_) vector) ;; 11 - (update-with-delay-or-reset! (_type_) vector) ;; 12 + (set-params! + "Initialize the vector to zero. Each later change waits a random number of game-time ticks +between min-delay and max-delay; X and Z use the symmetric xz-range and Y uses y-range." + (_type_ int int float float) vector) ;; 9 + (update-now! + "Choose a new delay and uniformly distributed X, Y, and Z components immediately, then return +the stored vector." + (_type_) vector) ;; 10 + (update-with-delay! + "Choose a new random vector if the current delay has expired; otherwise retain the previous +value." + (_type_) vector) ;; 11 + (update-with-delay-or-reset! + "Choose a new random vector if the current delay has expired; otherwise reset the stored +value to zero." + (_type_) vector) ;; 12 ) ) @@ -11389,8 +12580,15 @@ :size-assert #x3c :flag-assert #xb0000003c (:methods - (set-params! (_type_ vector float float float) vector) ;; 9 - (update! (_type_ vector) vector) ;; 10 + (set-params! + "Initialize value and target from initial-value, or reset both when it is false; clear +velocity and set the spring gain, speed limit, and retained damping fraction. A damping value of +zero prevents movement, while one applies no damping and permits continued oscillation." + (_type_ vector float float float) vector) ;; 9 + (update! + "Advance the damped vector spring toward target plus an optional target-offset. Limit the +velocity by magnitude so its direction is preserved, then apply damping and frame-time integration." + (_type_ vector) vector) ;; 10 ) ) @@ -11417,12 +12615,18 @@ :size-assert #x20 :flag-assert #xf00000020 (:methods - (set-zero! (_type_) _type_) ;; 9 - (update! (_type_) float) ;; 10 - (get-no-update (_type_) float) ;; 11 - (activate! (_type_ float int int float float) _type_) ;; 12 - (nonzero-amplitude? (_type_) symbol) ;; 13 - (die-on-next-update! (_type_) _type_) ;; 14 + (set-zero! "Deactivate the waveform, clear its parameters, and return the control." (_type_) _type_) ;; 9 + (update! "Apply the amplitude and period multipliers at elapsed period boundaries, then +sample the sine wave with its linear lifetime fade. Deactivate at the duration limit or a requested +period boundary." (_type_) float) ;; 10 + (get-no-update "Sample the sine wave and its linear lifetime fade without applying period damping +or deactivating the control." (_type_) float) ;; 11 + (activate! "Start a waveform if the current output is within one fifth of its amplitude. +amplitude sets the initial peak; period-ticks and duration-ticks are game-time ticks; +amplitude-scale and period-scale multiply their values after each period." (_type_ float int int float float) _type_) ;; 12 + (nonzero-amplitude? "Return true when the waveform is active." (_type_) symbol) ;; 13 + (die-on-next-update! "Request deactivation when update! next crosses a period boundary. Samples +remain available until that boundary." (_type_) _type_) ;; 14 ) ) @@ -11443,13 +12647,38 @@ :size-assert #x28 :flag-assert #x1000000028 (:methods - (eval-position! (_type_ float vector) vector) ;; 9 - (eval-velocity! (_type_ float vector) vector) ;; 10 - (setup-from-to-duration! (_type_ vector vector float float) none) ;; 11 - (setup-from-to-xz-vel! (_type_ vector vector float float) none) ;; 12 - (setup-from-to-y-vel! (_type_ vector vector float float) none) ;; 13 - (setup-from-to-height! (_type_ vector vector float float) none) ;; 14 - (debug-draw! (_type_) none) ;; 15 + (eval-position! + "Evaluate position after elapsed-time game-time ticks into result. Vertical motion includes + one half gravity times time squared; evaluation is not clamped to the solved flight + duration." + (_type_ float vector) vector) ;; 9 + (eval-velocity! + "Evaluate velocity after elapsed-time game-time ticks into result. Only the vertical +component changes under gravity." + (_type_ float vector) vector) ;; 10 + (setup-from-to-duration! + "Solve the initial velocity that moves from start to destination in duration game-time ticks +under constant vertical gravity. Store the supplied duration; callers must provide a positive, +nonzero duration." + (_type_ vector vector float float) none) ;; 11 + (setup-from-to-xz-vel! + "Solve a trajectory from start to destination at the requested nonzero horizontal speed +under constant vertical gravity. Horizontal distance divided by xz-speed determines the duration." + (_type_ vector vector float float) none) ;; 12 + (setup-from-to-y-vel! + "Solve a trajectory from start to destination with initial-y-velocity and constant vertical +gravity. Use the later real time at which the vertical equation reaches the destination; when no +real root exists, use a 900-tick fallback duration." + (_type_ vector vector float float) none) ;; 13 + (setup-from-to-height! + "Solve a trajectory from start to destination whose apex is apex-height above the higher +endpoint. Derive the required initial vertical velocity, using 4096 when that square-root input is +not positive, then solve the corresponding flight duration." + (_type_ vector vector float float) none) ;; 14 + (debug-draw! + "Draw the solved flight as ten translucent red line segments from time zero through the +stored duration, without depth testing." + (_type_) none) ;; 15 ) ) @@ -11529,12 +12758,14 @@ :flag-assert #x1000000090 (:methods (new (symbol type joint-mod-handler-mode process-drawable int) _type_) ;; 0 + (relocate :override-doc + "Adjust the owning process and controlled joint pointers after the process heap moves.") (set-mode! (_type_ joint-mod-handler-mode) _type_) ;; 9 (set-target! (_type_ vector) none) ;; 10 (look-at-enemy! (_type_ vector symbol process) none) ;; 11 (reset-blend! (_type_) _type_) ;; 12 (set-twist! (_type_ float float float) vector) ;; 13 - (set-trs! (_type_ vector quaternion vector) none) ;; 14 + (set-trs! "Replace any nonfalse translation, rotation, and scale override components." (_type_ vector quaternion vector) none) ;; 14 (shut-down! (_type_) none) ;; 15 ) ) @@ -11557,7 +12788,9 @@ (wheel-axis int8 :offset-assert 44) ) (:methods - (new (symbol type process-drawable int float int) _type_) + (new "Attach a wheel controller to one joint and derive its rotation from forward travel." (symbol type process-drawable int float int) _type_) + (relocate :override-doc + "Adjust the owning process pointer after its process heap moves.") ) :method-count-assert 9 :size-assert #x2d @@ -11572,7 +12805,7 @@ (enable symbol :offset-assert 76) ) (:methods - (new (symbol type process-drawable int symbol symbol symbol) _type_) + (new "Attach a local-transform override and select which animated channels it replaces." (symbol type process-drawable int symbol symbol symbol) _type_) ) :method-count-assert 9 :size-assert #x50 @@ -11585,7 +12818,7 @@ (enable basic :offset-assert 68) ) (:methods - (new (symbol type process-drawable int basic) _type_) + (new "Attach an optional absolute world-transform override to one joint." (symbol type process-drawable int basic) _type_) ) :method-count-assert 9 :size-assert #x48 @@ -11600,7 +12833,7 @@ (enable basic :offset-assert 120) ) (:methods - (new (symbol type process-drawable int basic) _type_) + (new "Attach a local-transform override that blends with the animated joint transform." (symbol type process-drawable int basic) _type_) ) :method-count-assert 9 :size-assert #x7c @@ -11614,7 +12847,7 @@ (enable basic :offset-assert 40) ) (:methods - (new (symbol type process-drawable int vector float) _type_) + (new "Attach a continuously rotating local transform to one joint." (symbol type process-drawable int vector float) _type_) ) :method-count-assert 9 :size-assert #x2c @@ -11623,21 +12856,27 @@ ;; - Functions -(define-extern joint-mod-spinner-callback (function cspace transformq none)) -(define-extern cspace<-parented-transformq-joint! (function cspace transformq none)) -(define-extern joint-mod-blend-local-callback (function cspace transformq none)) -(define-extern joint-mod-set-world-callback (function cspace transformq none)) -(define-extern cspace<-transformq! (function cspace transformq matrix)) -(define-extern joint-mod-set-local-callback (function cspace transformq none)) -(define-extern joint-mod-wheel-callback (function cspace transformq none)) -(define-extern vector<-cspace! (function vector cspace vector)) -(define-extern add-debug-text-sphere (function symbol bucket-id vector float string rgba symbol)) -(define-extern joint-mod-look-at-handler (function cspace transformq none)) -(define-extern joint-mod-world-look-at-handler (function cspace transformq none)) -(define-extern joint-mod-rotate-handler (function cspace transformq none)) -(define-extern joint-mod-joint-set-handler (function cspace transformq none)) -(define-extern joint-mod-joint-set*-handler (function cspace transformq none)) -(define-extern add-debug-matrix (function symbol bucket-id matrix matrix)) +(define-extern joint-mod-spinner-callback "Advance the spin angle and apply it to the joint's local rotation when enabled." (function cspace transformq none)) +(define-extern cspace<-parented-transformq-joint! "Build a joint's bone transform from its local transform, joint scale, and parent bone transform." (function cspace transformq none)) +(define-extern joint-mod-blend-local-callback "Blend the animated local transform toward the configured override when enabled." (function cspace transformq none)) +(define-extern joint-mod-set-world-callback "Use the configured world transform when enabled, otherwise evaluate the animated local transform." (function cspace transformq none)) +(define-extern cspace<-transformq! "Convert a transformq into a cspace's bone transform matrix." (function cspace transformq matrix)) +(define-extern joint-mod-set-local-callback "Replace selected local transform channels and preserve the remaining animated channels." (function cspace transformq none)) +(define-extern joint-mod-wheel-callback "Rotate a wheel joint according to the owning process's forward travel and wheel circumference." (function cspace transformq none)) +(define-extern vector<-cspace! "Extract a cspace bone's homogeneous translation as a position vector." (function vector cspace vector)) +(define-extern add-debug-text-sphere + "Draw a wireframe sphere of radius at center and place text there. Color affects the sphere; the + text uses the default font color." + (function symbol bucket-id vector float string rgba symbol)) +(define-extern joint-mod-look-at-handler "Turn the joint toward its world-space target by seeking clamped yaw and pitch offsets around the configured local axes." (function cspace transformq none)) +(define-extern joint-mod-world-look-at-handler "Turn the evaluated bone matrix toward the target in world space while respecting blend and angle limits." (function cspace transformq none)) +(define-extern joint-mod-rotate-handler "Apply the configured twist around the selected local joint axes." (function cspace transformq none)) +(define-extern joint-mod-joint-set-handler "Replace the joint's local translation, rotation, and scale with the configured transform." (function cspace transformq none)) +(define-extern joint-mod-joint-set*-handler "Add the configured translation and multiply its rotation and scale into the animated local transform." (function cspace transformq none)) +(define-extern add-debug-matrix + "Draw the three two-meter basis axes of xform at its translation, using red for x, green for y, + and blue for z. Return xform." + (function symbol bucket-id matrix matrix)) (define-extern joint-mod-debug-draw (function joint-mod none)) ;; - Symbols @@ -11681,20 +12920,49 @@ ((joint-id int32 :offset-assert 4) (num-tris uint32 :offset-assert 8) (num-verts uint32 :offset-assert 12) - (vertex-data (inline-array vector) :offset-assert 16) + (vertex-data (inline-array vector) :offset-assert 16) ;; padded through the next four-vector batch (tris collide-mesh-tri 1 :inline :offset 32) ) :method-count-assert 16 :size-assert #x28 :flag-assert #x1000000028 (:methods - (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 ;; spat - (sphere-on-platform-test (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) ;; 12 ;; sopt - (populate-cache! (_type_ 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 + (asize-of :override-doc + "Return the fixed collide-mesh header plus storage for its variable-length inline triangle +array. The separately allocated vertex-data buffer is not part of this size.") + (mem-usage :override-doc + "Account for the mesh-and-triangle allocation and the separate sixteen-byte-per-vertex +buffer as two allocations in the collide-mesh category.") + (debug-draw-tris "Draw every triangle after transforming its local vertices by the selected + joint node, using the triangle's PAT-mode color with low alpha." + (_type_ process-drawable int) none) ;; 9 + (overlap-test "Return true when the sphere encoded by center.xyz and radius.w strictly overlaps + any cached triangle. Box contact survives the broad phase, but exact distance equal to the + radius is not an overlap." (_type_ collide-mesh-cache-tri vector) symbol) ;; 10 + (should-push-away-test "Find the deepest sphere penetration no greater than best-distance, store + its contact triangle, and return the selected signed separation. Equal candidates replace the + local result, so the last equal triangle wins. A candidate must be penetrating and its + closest-point direction must lie within about 45 degrees of the cached oriented face normal. + Sphere is encoded by center.xyz and radius.w." + (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) ;; 11 ;; spat + (sphere-on-platform-test "Find the smallest signed separation no greater than best-distance from + a ground or obstacle triangle and store its contact. Equal candidates replace the local result, + so the last equal triangle wins. Candidates must lie strictly between -1024 and 122.88 and + point within about 45 degrees of the cached oriented face normal; the normal is not tested + against world up. Sphere is encoded by center.xyz and radius.w." + (_type_ collide-mesh-cache-tri collide-tri-result vector float) float) ;; 12 ;; sopt + (populate-cache! "Transform the padded local vertex buffer through xform in four-vertex batches + on scratchpad, then expand each indexed triangle into world-space vertices, a unit face normal, + integer bounds, and overlaid surface properties in cache." (_type_ collide-mesh-cache-tri matrix) none) ;; 13 + (transform-verts-1-matrix! "Transform the nonempty padded vertex buffer in groups of four and + write each result twice to output: first as a floating-point vector, then as an integer vector + converted with truncation. Output provides 32 bytes for every padded vertex." + (_type_ matrix (pointer uint8)) none) ;; 14 + (transform-verts-2-matrix! "Transform local vertices in groups of four. Write each result from + float-xform as a floating-point vector, then transform that result by integer-xform + and write its truncated integer vector. The input must be nonempty and padded to four vectors; + output provides 32 bytes for every padded vertex." + (_type_ matrix matrix (pointer uint8)) none) ;; 15 ) ) @@ -11708,9 +12976,12 @@ :size-assert #xa020 :flag-assert #xc0000a020 (:methods - (allocate! (_type_ int) int) ;; 9 - (is-id? (_type_ int) symbol) ;; 10 - (next-id! (_type_) uint) ;; 11 + (allocate! "Round byte-count up to sixteen and allocate it from the linear cache. Wrap to the + beginning and advance the nonzero generation id when the remaining tail is too small; print an + error and return false when one allocation exceeds the entire cache." + (_type_ int) (pointer uint8)) ;; 9 + (is-id? "Return true when cache-id belongs to the current cache generation." (_type_ int) symbol) ;; 10 + (next-id! "Discard all cached blocks and advance to a nonzero generation id." (_type_) uint) ;; 11 ) ) @@ -11749,7 +13020,7 @@ :size-assert #x20 :flag-assert #xa00000020 (:methods - (set-rider! (_type_ handle) symbol) ;; 9 + (set-rider! "Assign the rider handle and clear the cached sticky primitive." (_type_ handle) symbol) ;; 9 ) ) @@ -11762,9 +13033,16 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (new (symbol type int) _type_) ;; 0 - (add-rider! (_type_ process-drawable) collide-sticky-rider) ;; 9 - (reset! (_type_) int) ;; 10 + (new "Allocate storage for rider-count sticky riders." (symbol type int) _type_) ;; 0 + (length :override-doc "Return the number of active riders.") + (asize-of :override-doc "Return the header size plus storage for the allocated rider capacity.") + (relocate :override-doc + "Adjust every active rider's cached sticky-primitive pointer after the owning process heap + moves.") + (add-rider! "Append rider-process, clear its sticky primitive, and return the new rider record. +Print an error and return false when the fixed allocation is full." + (_type_ process-drawable) collide-sticky-rider) ;; 9 + (reset! "Remove every active rider without releasing the allocated storage." (_type_) int) ;; 10 ) ) @@ -11791,7 +13069,8 @@ :size-assert #x8c :flag-assert #xa0000008c (:methods - (init! (_type_ vector) symbol) ;; 9 + (init! "Initialize a swept collision query with move-vector, no accepted hit, and a best-u +past the end of the movement step." (_type_ vector) symbol) ;; 9 ) ) @@ -11806,13 +13085,20 @@ :size-assert #x64 :flag-assert #xa00000064 (:methods - (reset! (_type_) none) ;; 9 + (reset! "Reset the best distance and both primitive references." (_type_) none) ;; 9 ) ) (declare-type touching-list structure) +(defenum overlaps-others-options + :bitfield #t + :type uint32 + (solid-only 0) + (accept-root-sphere-overlap 1) + ) + (deftype overlaps-others-params (structure) - ((options uint32 :offset-assert 0) + ((options overlaps-others-options :offset-assert 0) (tlist touching-list :offset-assert 4) ) :method-count-assert 9 @@ -11965,26 +13251,60 @@ :size-assert #x48 :flag-assert #x1c00000048 (:methods - (new (symbol type collide-shape uint int) _type_) ;; 0 - (move-by-vector! (_type_ vector) none) ;; 9 - (find-prim-by-id (_type_ uint) collide-shape-prim) ;; 10 - (debug-draw-world-sphere (_type_) symbol) ;; 11 - (add-fg-prim-using-box (_type_ collide-cache) none) ;; 12 - (add-fg-prim-using-line-sphere (_type_ collide-cache) none) ;; 13 - (add-fg-prim-using-y-probe (_type_ collide-cache) none) ;; 14 - (overlaps-others-test (_type_ overlaps-others-params collide-shape-prim) symbol) ;; 15 - (overlaps-others-group (_type_ overlaps-others-params collide-shape-prim-group) symbol) ;; 16 + (new "Allocate a primitive base of size-bytes and initialize its owner, id, masks, transform, + offense, and type markers." (symbol type collide-shape uint int) _type_) ;; 0 + (relocate :override-doc + "Adjust this primitive's owning collision-shape pointer after the process heap moves.") + (move-by-vector! "Translate this primitive's world bounding sphere by offset." (_type_ vector) none) ;; 9 + (find-prim-by-id "Return this primitive when its id matches, otherwise return false." + (_type_ uint) collide-shape-prim) ;; 10 + (debug-draw-world-sphere "Draw this primitive's world bounding sphere using a color appropriate +to its primitive type and collision state." (_type_) symbol) ;; 11 + (add-fg-prim-using-box + "Add this primitive to the active box query. Sphere leaves are copied into the cache, mesh + leaves import their overlapping triangles, groups recurse through compatible children, and + the base implementation reports an invalid primitive type." + (_type_ collide-cache) none) ;; 12 + (add-fg-prim-using-line-sphere + "Add this primitive to the active swept-sphere query. Sphere leaves are copied into the + cache, mesh leaves import triangles overlapping the oriented sweep box, groups recurse + through compatible children, and the base implementation reports an invalid primitive type." + (_type_ collide-cache) none) ;; 13 + (add-fg-prim-using-y-probe + "Add this primitive to the active vertical-probe query. Sphere leaves are copied into the + cache, mesh leaves import their overlapping triangles, groups recurse through compatible + children, and the base implementation reports an invalid primitive type." + (_type_ collide-cache) none) ;; 14 + (overlaps-others-test "Test this primitive against another primitive, optionally requiring +solid leaf actions and recording exact touching pairs. Return whether any overlap is found." + (_type_ overlaps-others-params collide-shape-prim) symbol) ;; 15 + (overlaps-others-group "Test this primitive against every compatible child of another group +and optionally record each touching pair." (_type_ overlaps-others-params collide-shape-prim-group) symbol) ;; 16 (unused-17 () none) ;; 17 - (collide-with-collide-cache-prim-mesh (_type_ collide-shape-intersect collide-cache-prim) none) ;; 18 - (collide-with-collide-cache-prim-sphere (_type_ collide-shape-intersect collide-cache-prim) none) ;; 19 - (add-to-bounding-box (_type_ collide-kind) symbol) ;; 20 - (num-mesh (_type_ collide-shape-prim) int) ;; 21 - (on-platform-test (_type_ collide-shape-prim collide-overlap-result float) none) ;; 22 - (should-push-away-test (_type_ collide-shape-prim collide-overlap-result) none) ;; 23 - (should-push-away-reverse-test (_type_ collide-shape-prim-group collide-overlap-result) none) ;; 24 - (update-transforms! (_type_ process-drawable) symbol) ;; 25 - (set-collide-as! (_type_ collide-kind) none) ;; 26 - (set-collide-with! (_type_ collide-kind) none) ;; 27 + (collide-with-collide-cache-prim-mesh "Test this foreground primitive against one cached mesh +primitive and update intersection when it supplies an earlier compatible hit." + (_type_ collide-shape-intersect collide-cache-prim) none) ;; 18 + (collide-with-collide-cache-prim-sphere "Test this foreground primitive against one cached +sphere primitive and update intersection when it supplies an earlier compatible hit." + (_type_ collide-shape-intersect collide-cache-prim) none) ;; 19 + (add-to-bounding-box "Seed or expand the shared shape bounds with primitives whose collide-with +mask intersects kind. Return true when at least one primitive contributes." (_type_ collide-kind) symbol) ;; 20 + (num-mesh "Resolve mesh primitives from mesh-group and return the number which could not be +resolved." (_type_ collide-shape-prim) int) ;; 21 + (on-platform-test "Recursively test this platform primitive against other-prim and retain the +closest supporting contact below the 122.88-unit (three-centimeter) tolerance in overlap-result." + (_type_ collide-shape-prim collide-overlap-result float) none) ;; 22 + (should-push-away-test "Recursively test this primitive against other-prim and retain the +deepest compatible negative separation in overlap-result." + (_type_ collide-shape-prim collide-overlap-result) none) ;; 23 + (should-push-away-reverse-test "Test this primitive against each compatible child in +other-group, reversing the virtual dispatch while preserving collide-with versus collide-as." + (_type_ collide-shape-prim-group collide-overlap-result) none) ;; 24 + (update-transforms! "Update this primitive's world sphere from its local sphere and selected +bone, shape translation, or already-world-space transform mode; recurse into groups." + (_type_ process-drawable) symbol) ;; 25 + (set-collide-as! "Set collide-as on this primitive and every child primitive." (_type_ collide-kind) none) ;; 26 + (set-collide-with! "Set collide-with on this primitive and every child primitive." (_type_ collide-kind) none) ;; 27 ) ) @@ -11995,7 +13315,7 @@ :size-assert #x4c :flag-assert #x1c0000004c (:methods - (new (symbol type collide-shape uint) _type_) ;; 0 + (new "Allocate an obstacle sphere primitive with no resolved transform." (symbol type collide-shape uint) _type_) ;; 0 ) ) @@ -12009,8 +13329,9 @@ :size-assert #x5c :flag-assert #x1d0000005c (:methods - (new (symbol type collide-shape uint uint) _type_) ;; 0 - (change-mesh (_type_ int) none) ;; 28 + (new "Allocate a mesh primitive that selects mesh-id and begins with an invalid cache." (symbol type collide-shape uint uint) _type_) ;; 0 + (change-mesh "Select a new mesh id from the owner's drawable geometry, invalidate the cached +triangles with a fresh cache generation, and refresh the world transform." (_type_ int) none) ;; 28 ) ) @@ -12025,18 +13346,25 @@ :size-assert #x54 :flag-assert #x1e00000054 (:methods - (new (symbol type collide-shape uint int) _type_) ;; 0 - (append-prim (_type_ collide-shape-prim) none) ;; 28 - (add-to-non-empty-bounding-box (_type_ collide-kind) none) ;; 29 + (new "Allocate a group with capacity for element-count primitive pointers." (symbol type collide-shape uint int) _type_) ;; 0 + (length :override-doc "Return the number of occupied primitive slots.") + (asize-of :override-doc "Return the header size plus storage for the allocated primitive capacity.") + (relocate :override-doc + "Adjust the owning collision-shape pointer and every active child primitive pointer after the + process heap moves.") + (append-prim "Append prim when capacity remains; print an error and leave the group unchanged +when it is full." (_type_ collide-shape-prim) none) ;; 28 + (add-to-non-empty-bounding-box "Expand an already initialized shared bounding box with every +compatible leaf in this group." (_type_ collide-kind) none) ;; 29 ) ) (defenum nav-flags :bitfield #t :type uint8 - (navf0 0) - (navf1 1) - (navf2 2) + (avoid-body 0) ;; expose this shape's body sphere to other actors' navigation + (avoid-extra-sphere 1) ;; also expose its reserved extra navigation sphere + (navf2 2) ;; bits 2-7 have no known Jak 1 use (navf3 3) (navf4 4) (navf5 5) @@ -12064,58 +13392,111 @@ :size-assert #xb8 :flag-assert #x38000000b8 (:methods - (new (symbol type process-drawable collide-list-enum) _type_) - (move-by-vector! (_type_ vector) none) ;; 28 - (alloc-riders (_type_ int) none) ;; 29 - (move-to-point! (_type_ vector) none) ;; 30 ;; ret - symbol | float (CSPG::9) - (debug-draw (_type_) none) ;; 31 - (fill-cache-for-shape! (_type_ float collide-kind) none) ;; 32 - (fill-cache-integrate-and-collide! (_type_ vector collide-kind) none) ;; 33 - (find-prim-by-id (_type_ uint) collide-shape-prim) ;; 34 - (detect-riders! (_type_) symbol) ;; 35 - (build-bounding-box-for-shape (_type_ bounding-box float collide-kind) symbol) ;; 36 - (integrate-and-collide! (_type_ vector) none) ;; 37 - (find-collision-meshes (_type_) symbol) ;; 38 - (on-platform (_type_ collide-shape collide-overlap-result) symbol) ;; 39 - (find-overlapping-shapes (_type_ overlaps-others-params) symbol) ;; 40 ;; check if blocked?? - (calc-shove-up (_type_ attack-info float) vector) ;; 41 - (should-push-away (_type_ collide-shape collide-overlap-result) symbol) ;; 42 - (pull-rider! (_type_ pull-rider-info) none) ;; 43 - (pull-riders! (_type_) symbol) ;; 44 - (do-push-aways! (_type_) symbol) ;; 45 - (set-root-prim! (_type_ collide-shape-prim) collide-shape-prim) ;; 46 - (update-transforms! (_type_) symbol) ;; 47 - (clear-collide-with-as (_type_) none) ;; 48 - (restore-collide-with-as (_type_) none) ;; 49 - (backup-collide-with-as (_type_) none) ;; 50 - (set-root-prim-collide-with! (_type_ collide-kind) none) ;; 51 - (set-root-prim-collide-as! (_type_ collide-kind) none) ;; 52 - (set-collide-kinds (_type_ int collide-kind collide-kind) none) ;; 53 - (set-collide-offense (_type_ int collide-offense) none) ;; 54 - (send-shove-back (_type_ process touching-shapes-entry float float float) none) ;; 55 + (new "Allocate a collision shape, initialize its transform and query mask, and connect its + process to the selected foreground collision list." (symbol type process-drawable collide-list-enum) _type_) + (relocate :override-doc + "Adjust the owning process, root primitive, and optional sticky-rider group after the process + heap moves.") + (move-by-vector! "Translate the shape and all of its primitive world spheres by offset." + (_type_ vector) none) ;; 28 + (alloc-riders "Allocate room for rider-count sticky riders. Report an error and preserve the +existing allocation when called more than once." (_type_ int) none) ;; 29 + (move-to-point! "Translate the shape so its origin reaches destination and move every +primitive world sphere by the same offset." (_type_ vector) none) ;; 30 + (debug-draw "Draw the root primitive hierarchy when its world sphere intersects the view +frustum." (_type_) none) ;; 31 + (fill-cache-for-shape! "Build the shape's compatible world bounds with padding-distance and +fill the shared collision cache, or clear the cache when no primitive contributes." + (_type_ float collide-kind) none) ;; 32 + (fill-cache-integrate-and-collide! "Fill the collision cache for one frame of velocity, adding +one meter of reach for the target, then run the shape's integration method." + (_type_ vector collide-kind) none) ;; 33 + (find-prim-by-id "Return the primitive in the root hierarchy whose id equals id-to-find." + (_type_ uint) collide-shape-prim) ;; 34 + (detect-riders! "Rebuild the rider list from the foreground collision lists selected by this +shape's collide-with mask. For each compatible shape standing on a sticky platform primitive, +save that primitive's angle and the rider position in its bone-local space, then send the platform +a ridden event. Saving the local point lets later platform translation and rotation carry the +rider." (_type_) symbol) ;; 35 + (build-bounding-box-for-shape "Fill box with the bounds of root primitives compatible with +kind, expanded by padding-distance plus one millimeter. Return false when none contribute." + (_type_ bounding-box float collide-kind) symbol) ;; 36 + (integrate-and-collide! "Advance the shape for one frame at velocity. The base implementation +only translates; moving subclasses perform swept collision and response." + (_type_ vector) none) ;; 37 + (find-collision-meshes "Resolve every mesh primitive from the process drawable's collision mesh +group, report unresolved entries, update transforms, and return that update result." (_type_) symbol) ;; 38 + (on-platform "Test whether other-shape is supported by this platform within 122.88 game units +(three centimeters). Fill overlap-result with the closest supporting primitive pair and return +whether one was found." + (_type_ collide-shape collide-overlap-result) symbol) ;; 39 + (find-overlapping-shapes "Search compatible foreground collision lists for overlaps with this +shape. The root-sphere option accepts a broad-phase overlap directly; otherwise leaf geometry is +tested, and an optional touching list receives exact pairs. Return true when any overlap is found." + (_type_ overlaps-others-params) symbol) ;; 40 + (calc-shove-up "Set attack.shove-up, find the closest point on the process path to the target, +store its path distance in attack.shove-back, and return attack's launch vector." + (_type_ attack-info float) vector) ;; 41 + (should-push-away "Test two solid, mask-compatible shape hierarchies. Fill overlap-result with +the deepest negative separation and its primitives, returning true only for an overlap." + (_type_ collide-shape collide-overlap-result) symbol) ;; 42 + (pull-rider! "Move one rider to its transformed platform-local destination. A solid platform +fills the rider's collision cache out to two meters beyond the required displacement, converts that +displacement to a frame velocity, and uses the rider's collision integration so carried riders +still collide with the world; a non-solid platform translates the rider directly. For moving riders, +save the actual resulting velocity for momentum after stepping off and update the sticky timestamp. +Send the platform's angle change as a rotate-y-angle event." (_type_ pull-rider-info) none) ;; 43 + (pull-riders! "For every valid sticky rider, transform its saved bone-local point through the +supporting primitive's current bone transform. Compute the change in that bone's Y angle, then move +the rider to the resulting world-space point so it inherits both translation and rotation." + (_type_) symbol) ;; 44 + (do-push-aways! "Push overlapping moving shapes away from this shape. Search each compatible +foreground list, accept penetrations of at least two centimeters, and run up to three corrective +collision steps per victim while preserving its collision status." (_type_) symbol) ;; 45 + (set-root-prim! "Install prim as the root and return it." (_type_ collide-shape-prim) collide-shape-prim) ;; 46 + (update-transforms! "Update the root primitive hierarchy from this shape's owning process." + (_type_) symbol) ;; 47 + (clear-collide-with-as "Disable the root primitive's collide-with and collide-as masks." + (_type_) none) ;; 48 + (restore-collide-with-as "Restore the root primitive's masks saved by backup-collide-with-as." + (_type_) none) ;; 49 + (backup-collide-with-as "Save the root primitive's collide-with and collide-as masks." + (_type_) none) ;; 50 + (set-root-prim-collide-with! "Set collide-with throughout the root primitive hierarchy." + (_type_ collide-kind) none) ;; 51 + (set-root-prim-collide-as! "Set collide-as throughout the root primitive hierarchy." + (_type_ collide-kind) none) ;; 52 + (set-collide-kinds "For each root or immediate child whose primitive id shares a bit with +prim-id-mask, clear clear-kind and then add set-kind to collide-as." + (_type_ int collide-kind collide-kind) none) ;; 53 + (set-collide-offense "Set offense on each root or immediate child whose primitive id shares a +bit with prim-id-mask." (_type_ int collide-offense) none) ;; 54 + (send-shove-back "When the touching pair supplies an upward-enough direction, send other-process +a shove event whose horizontal velocity follows its current motion or facing and whose vertical +velocity is shove-up-velocity." (_type_ process touching-shapes-entry float float float) none) ;; 55 ) ) -(defenum cshape-moving-flags +(defenum collide-status :bitfield #t :type uint64 - (onsurf) - (onground) - (tsurf) - (twall) - (t-ceil) - (t-act) - (csmf06) - (csmf07) - (csmf08) - (csmf09) + (on-surface) + (on-ground) + (touch-surface) + (touch-wall) + (touch-ceiling) + (touch-actor) + (on-special-surface) + (touch-edge) + (no-touch) + (blocked) (on-water) - (impact-surf) - (t-bckgnd) - (csmf13) - (t-ceil-sticky) - (csmf15) - (csmf16) + (impact-surface) + (touch-background) + (stuck) + (touch-ceiling-sticky) + (glance) + (probe-hit) (csmf17) (csmf18) (csmf19) @@ -12134,20 +13515,20 @@ (defenum cshape-reaction-flags :bitfield #t :type uint32 - (csrf00) - (csrf01) - (csrf02) - (csrf03) - (csrf04) - (csrf05) - (csrf06) - (csrf07) - (csrf08) - (csrf09) - (csrf10) - (csrf11) - (csrf12) - (csrf13) + (wall-by-pat) + (wall-by-angle) + (hit-wall) + (low-coverage) + (glancing) + (air-mode) + (no-grab-edge) + (ledge-candidate) + (corner-slide) + (vertical-edge) + (edge-grab-ledge) + (on-ground) + (edge-grab-in-air) + (wall-bounce) (csrf14) (csrf15) (csrf16) @@ -12175,11 +13556,11 @@ (poly-pat pat-surface :offset-assert 256) (cur-pat pat-surface :offset-assert 260) (ground-pat pat-surface :offset-assert 264) - (status cshape-moving-flags :offset-assert 272) - (old-status cshape-moving-flags :offset-assert 280) - (prev-status cshape-moving-flags :offset-assert 288) + (status collide-status :offset-assert 272) + (old-status collide-status :offset-assert 280) + (prev-status collide-status :offset-assert 288) (reaction-flag cshape-reaction-flags :offset-assert 296) - (reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags) :offset-assert 300) + (reaction (function collide-shape-moving collide-shape-intersect vector vector collide-status) :offset-assert 300) (no-reaction (function collide-shape-moving collide-shape-intersect vector vector none) :offset-assert 304) (local-normal vector :inline :offset-assert 320) (surface-normal vector :inline :offset-assert 336) @@ -12199,15 +13580,35 @@ :size-assert #x1bc :flag-assert #x41000001bc (:methods - (set-and-handle-pat! (_type_ pat-surface) none) ;; 56 - (integrate-no-collide! (_type_ vector) none) ;; 57 - (collide-shape-moving-method-58 (_type_ vector) symbol) ;; 58 - (integrate-for-enemy-with-move-to-ground! (_type_ vector collide-kind float symbol symbol symbol) none) ;; 59 - (move-to-ground (_type_ float float symbol collide-kind) symbol) ;; 60 - (move-to-ground-point! (_type_ vector vector vector) none) ;; 61 - (compute-acc-due-to-gravity (_type_ vector float) vector) ;; 62 - (step-collison! (_type_ vector vector float) float) ;; 63 - (move-to-tri! (_type_ collide-tri-result vector) none) ;; 64 + (relocate :override-doc + "Adjust the optional dynamics pointer, then relocate the base collision shape.") + (set-and-handle-pat! "Adopt pat as the current contact material. Start the water or endless-fall +responses when entering those events, and stop the water response when leaving water." + (_type_ pat-surface) none) ;; 56 + (integrate-no-collide! "Update transforms and history, clear per-frame collision state, move one +frame at velocity without a sweep, and copy the resulting translation to shadow-pos." + (_type_ vector) none) ;; 57 + (integrate-and-revert-if-blocked! "Move one frame without a sweep, then run a solid exact-overlap +query. Restore trans-old[0] and return true when an overlap is found; shadow-pos remains at the +attempted destination." (_type_ vector) symbol) ;; 58 + (integrate-for-enemy-with-move-to-ground! "Integrate an enemy, probe or synthesize its ground +point, optionally hover when no ground is found, and optionally restore the old position when its +foreground collision query is blocked. use-misty-ground? selects the analytic Misty height probe, +which returns a fraction without filling the triangle result." + (_type_ vector collide-kind float symbol symbol symbol) none) ;; 59 + (move-to-ground "Probe from snap-up-height above the shape to search-below beneath it, move to +the hit triangle, and return true. Return false and optionally warn when no ground of ground-kind +is found." (_type_ float float symbol collide-kind) symbol) ;; 60 + (move-to-ground-point! "Move immediately to ground-point, remove world-y velocity, set the +ground-contact status and normals, and record impact velocity along gravity." + (_type_ vector vector vector) none) ;; 61 + (compute-acc-due-to-gravity "Store gravity plus the slope-parallel acceleration selected by +slopiness in acceleration-out and return that vector." (_type_ vector float) vector) ;; 62 + (step-collison! "Sweep one fractional frame of vel-in against every compatible cache primitive. +Run the collision reaction for the earliest hit, or move the full distance when clear; store the +resulting velocity in vel-out and return the fraction consumed." (_type_ vector vector float) float) ;; 63 + (move-to-tri! "Move to position, copy triangle PAT and normal state, mark a clean supporting +surface contact, and set the shape's surface from that PAT." (_type_ collide-tri-result vector) none) ;; 64 ) ) @@ -12237,7 +13638,7 @@ (local-normal vector :inline :offset-assert 64) (surface-normal vector :inline :offset-assert 80) (time time-frame :offset-assert 96) - (status cshape-moving-flags :offset-assert 104) + (status collide-status :offset-assert 104) (pat pat-surface :offset-assert 112) (reaction-flag cshape-reaction-flags :offset-assert 116) ) @@ -12245,267 +13646,298 @@ :size-assert #x78 :flag-assert #xa00000078 (:methods - (update! (_type_ collide-shape-moving vector vector vector) _type_) ;; 9 + (update! "Record a collision-history sample, including the contact point, final position, +incoming and outgoing velocity, contact normals, collision state, reaction flags, surface +properties, and the current time." + (_type_ collide-shape-moving vector vector vector) _type_) ;; 9 ) ) ;; NOTE : type has been PAL patched +;; control-info is the player's movement/collision "brain" (also used, mostly idle, by the +;; sidekick). It extends collide-shape-moving with everything target-specific: pad input, +;; turning, the surface system, variable jumps, edge grabs / pole swings, attack bookkeeping, +;; and per-state scratch storage. +;; +;; Layout notes (layout is exact and must not change): +;; - the state-var0/1/2 and state-vector0/1 slots are true unions: one memory location reused +;; for unrelated purposes by different target states. Typed overlay views are provided. +;; - offsets 2416..2487 are one block: a 'launch event-message-block is mem-copied over it +;; (saved-launch-event = its `to`, jump-kind = its `message`, launch-* = its params). (deftype control-info (collide-shape-moving) ( - (unknown-vector00 vector :inline :offset 448) ;; from - logic-target::build-conversions - (unknown-vector01 vector :inline :offset 464) ;; from - logic-target::turn-to-vector - (unknown-vector02 vector :inline :offset 480) ;; from - logic-target::do-rotations2 - (unknown-quaternion00 quaternion :inline :offset 496) ;; from - target-util::(method 27 control-info) - (unknown-quaternion01 quaternion :inline :offset 512) ;; from - logic-target::do-rotations2 - (unknown-float00 float :offset 528) ;; from - logic-target::do-rotations2 - (unknown-float01 float :offset 532) - (unknown-float02 float :offset 536) ;; from - logic-target::add-thrust - (unknown-vector10 vector :inline :offset 544) ;; from - logic-target::flat-setup - (unknown-vector11 vector :inline :offset 560) ;; from - logic-target::target-no-move-post - (unknown-vector12 vector :inline :offset 576) - (unknown-vector13 vector :inline :offset 592) ;; from - collide-shape::method-37 | target::mod-var-jump - (unknown-vector14 vector :inline :offset 608) ;; from - logic-target::target-no-move-post - (unknown-vector15 vector :inline :offset 624) ;; from - collide-shape::method-37 | target-handler::target-exit - (unknown-vector16 vector :inline :offset 640) ;; from - collide-shape::method-37 - (unknown-dynamics00 dynamics :offset 656) ;; from - logic-target::bend-gravity - (unknown-surface00 surface :offset 660) - (unknown-surface01 surface :offset 664) ;; not a symbol - target-util::target-align-vel-z-adjust - (unknown-cpad-info00 cpad-info :offset 668) ;; not a symbol - target-util::move-legs? - (unknown-float10 float :offset 672) ;; from - logic-target::turn-to-vector - (unknown-float11 float :offset 676) ;; from - logic-target::turn-to-vector - (unknown-float12 float :offset 680) ;; from - logic-target::turn-to-vector - (unknown-float13 float :offset 684) ;; from - logic-target::turn-to-vector - (unknown-vector20 vector :inline :offset 688) ;; from - logic-target::turn-to-vector - (unknown-vector21 vector :inline :offset 704) ;; from - logic-target::turn-to-vector - (unknown-vector22 vector :inline :offset 720) ;; from - logic-target::turn-to-vector - (unknown-vector23 vector :inline :offset 736) ;; from - logic-target::turn-to-vector - ; (unknown-dword-temp-01 uint64 :offset 776) ;; from - logic-target::read-pad - (unknown-vector-array00 vector 7 :inline :offset 752) ;; from - logic-target::turn-to-vector - (unknown-vector30 vector :inline :offset 880) ;; from - logic-target::read-pad - (unknown-vector31 vector :inline :offset 896) ;; from - logic-target::read-pad - (unknown-float20 float :offset 912) ;; from - logic-target::read-pad - (unknown-float21 float :offset 916) ;; from - logic-target::read-pad - (unknown-dword00 uint64 :offset 920) ;; from - logic-target::read-pad - (unknown-matrix00 matrix :inline :offset 928) ;; from - target-util::(method 16 target) - (unknown-matrix01 matrix :inline :offset 992) ;; from - target-util::(method 16 target) - (unknown-matrix02 matrix :inline :offset 1056) ;; from - logic-target::joint-points - (unknown-qword00 uint128 :offset 1136) - (unknown-float30 float :offset 1140) ;; from - logic-target::target-calc-camera-pos - (unknown-vector40 vector :inline :offset 1152) ;; from - logic-target::target-real-post - (unknown-float40 float :offset 1172) ;; from - target-death::lambda-1 - (unknown-float41 float :offset 1176) ;; from - logic-target::do-rotations2 - (unknown-int00 int32 :offset 1180) ;; from - logic-target::joint-points - (unknown-float50 float :offset 1168) ;; from - logic-target::target-real-post - (unknown-vector50 vector :inline :offset 1184) ;; from - logic-target::build-conversions - (unknown-vector51 vector :inline :offset 1200) ;; from - logic-target::build-conversions - (unknown-vector52 vector :inline :offset 1216) - (unknown-vector53 vector :inline :offset 1232) - (last-known-safe-ground vector :inline :offset 1248) - (unknown-vector55 vector :inline :offset 1264) - (unknown-dword10 time-frame :offset 1280) ;; from - collide-reaction-target::target-collision-reaction - (unknown-dword11 time-frame :offset 1288) ;; from - target-util::can-jump? - (unknown-float60 float :offset 1300) ;; from - target-util::can-duck? - (unknown-float61 float :offset 1304) ;; from - target-util::target-align-vel-z-adjust - (unknown-float62 float :offset 1308) ;; from - target-util::target-print-stats - (unknown-float63 float :offset 1312) ;; from - logic-target::target-compute-slopes - (unknown-float64 float :offset 1316) ;; from - logic-target::target-compute-slopes - (unknown-dword20 time-frame :offset 1320) ;; from target-util::turn-around? - TODO - (unknown-dword21 time-frame :offset 1328) ;; from target-util::turn-around? - TODO - (unknown-dword-coverage int64 :offset 1336) - (unknown-float-coverage-0 float :offset 1344) - (unknown-float-coverage-1 float :offset 1348) - (unknown-float-coverage-2 float :offset 1352) - (unknown-u32-coverage-0 uint32 :offset 1356) - (unknown-vector-coverage-0 vector :inline :offset 1376) - (unknown-vector-coverage-1 vector :inline :offset 1392) - (unknown-vector-coverage-2 vector :inline :offset 1440) - (unknown-vector-coverage-3 vector :inline :offset 1472) - (unknown-vector60 vector :inline :offset 1456) ;; from - logic-target::add-thrust - (unknown-vector61 vector :inline :offset 1504) ;; from - logic-target::add-thrust - (unknown-float70 float :offset 1520) ;; from - logic-target::add-thrust - (unknown-float71 float :offset 1524) ;; from - collide-shape::method-37 - (unknown-vector70 vector :inline :offset 1536) ;; from - logic-target::add-thrust - (unknown-vector71 vector :inline :offset 1552) ;; from - target-tube::tube-thrust - (unknown-vector72 vector :inline :offset 1568) ;; from - collide-reaction-racer::racer-collision-reaction - (unknown-vector73 vector :inline :offset 1584) ;; from - collide-reaction-racer::racer-collision-reaction - (unknown-handle00 handle :offset 1600) ;; from logic-target::reset-target-state - (unknown-sphere-array00 collide-shape-prim-sphere 3 :offset 1608) ;; from target-util::target-collide-set! and from target-util::target-danger-set! - (unknown-sphere00 collide-shape-prim-sphere :offset 1632) ;; from target-util::target-danger-set! - (unknown-sphere01 collide-shape-prim-sphere :offset 1636) ;; from target-util::target-danger-set! - (unknown-sphere02 collide-shape-prim-sphere :offset 1640) ;; from target-util::target-danger-set! - (unknown-int50 int32 :offset 1656) ;; from target::(enter target-wheel) - (unknown-dword30 time-frame :offset 1664) ;; from target::(trans target-walk) - (unknown-dword31 time-frame :offset 1672) ;; from target-util::can-hands? - (unknown-dword32 time-frame :offset 1680) ;; from target-util::can-hands? - (unknown-dword33 time-frame :offset 1688) ;; from target-util::can-feet? - (unknown-dword34 time-frame :offset 1696) ;; from target-util::can-feet? - (unknown-dword35 time-frame :offset 1704) ;; from target::(exit target-slide-down) - (unknown-dword36 time-frame :offset 1712) ;; from target::(trans target-jump) - (unknown-float80 float :offset 1724) ;; from logic-target::bend-gravity - (unknown-float81 float :offset 1728) ;; from logic-target::bend-gravity - (unknown-float82 float :offset 1732) ;; from logic-target::bend-gravity - (unknown-vector80 vector :inline :offset 1744) ;; from logic-target::joint-points - (unknown-cspace00 cspace :inline :offset 1760) ;; from logic-target::joint-points - (unknown-vector90 vector :score 100 :inline :offset 1776) ;; from logic-target::target-compute-edge - (unknown-vector91 vector :inline :offset 1792) ;; from logic-target::target-compute-edge - (unknown-vector92 vector :inline :offset 1824) ;; from logic-target::joint-points - (unknown-cspace10 cspace :inline :offset 1808) ;; from logic-target::joint-points - (unknown-symbol00 symbol :offset 1840) ;; from target-util::target-danger-set! - (unknown-float90 float :offset 1844) ;; from target-util::target-danger-set! - (unknown-float91 float :offset 1848) ;; from target-util::target-collide-set! - (unknown-vector-array10 vector 16 :inline :offset 1856) ;; from target-util::turn-around? - (unknown-float100 float :offset 2112) ;; from target-util::turn-around? - (unknown-int10 int32 :offset 2116) ;; from target-util::turn-around? - (unknown-float110 float :offset 2120) ;; from logic-target::target-compute-edge - (unknown-vector100 vector :inline :offset 2128) ;; from logic-target::target-compute-edge - (unknown-vector101 vector :inline :offset 2144) ;; from logic-target::target-compute-edge - (unknown-dword40 time-frame :offset 2160) ;; from logic-target::target-compute-edge - (unknown-dword41 time-frame :offset 2168) ;; from logic-target::target-compute-edge - (unknown-handle10 handle :offset 2176) ;; from logic-target::target-compute-pole - probably a swingpole - (unknown-uint20 uint32 :offset 2184) ;; from target::(trans target-running-attack) - (unknown-spoolanim00 spool-anim :offset 2184) ;; from target2::(trans target-stance-ambient) - (unknown-int20 int32 :offset 2184) ;; from (anon-function 1 basebutton) - (unknown-symbol20 symbol :offset 2184) ;; from (anon-function 1 basebutton) - (unknown-float120 float :offset 2184) ;; from target::mod-var-jump - (unknown-int21 int32 :offset 2188) ;; from logic-target::target-compute-pole - (unknown-uint30 uint32 :offset 2188) ;; from target::(code target-running-attack) - (unknown-float121 float :offset 2188) ;; from target::mod-var-jump - (unknown-uint31 uint32 :offset 2192) ;; from target::(trans target-running-attack) - (unknown-int37 int32 :offset 2192) - (unknown-float122 float :offset 2196) ;; from target::(trans target-jump) - (unknown-float123 float :offset 2200) ;; from target::mod-var-jump - (unknown-float124 float :offset 2204) ;; from target::init-var-jump - (unknown-vector102 vector :inline :offset 2224) ;; from (anon-function 3 basebutton) - (unknown-vector103 vector :inline :offset 2240) ;; from (anon-function 3 basebutton) - (unknown-quaternion02 quaternion :inline :offset 2256) ;; from racer-states::(code target-racing-get-on) - (unknown-quaternion03 quaternion :inline :offset 2272) ;; from racer-states::(code target-racing-get-on) - (unknown-smush00 smush-control :inline :offset 2288) ;; from (event target-fishing) - (unknown-vector110 vector :inline :offset 2320) ;; from logic-target::flag-setup - (unknown-vector111 vector :inline :offset 2336) ;; from logic-target::flag-setup - (unknown-symbol30 symbol :offset 2384) ;; from target-util::target-danger-set! - (unknown-int31 uint32 :offset 2384) ;; from target:: (event target-running-attack) - (unknown-dword50 int64 :offset 2392) ;; from target-util::target-start-attack - (unknown-dword51 int64 :offset 2400) ;; from target-util::target-start-attack - (unknown-pointer00 pointer :offset 2416) ;; from target-handler::target-standard-event-handler - (unknown-symbol40 symbol :offset 2428) ;; from logic-target::post-flag-setup - (unknown-dword60 int64 :offset 2432) ;; from target::(enter target-jump) - (unknown-dword61 int64 :offset 2440) ;; from target::(enter target-jump) - (unknown-dword62 int64 :offset 2448) ;; from target::(enter target-jump) - probably some sort of object64 that's used as a vector? - (unknown-dword63 int64 :offset 2456) ;; from target::(enter target-jump) - (unknown-halfword00 int16 :offset 2488) ;; from logic-target::target-move-dist - ;; these were determined from racer-collision-reaction. - (history-length int16 :offset 2490) - (history-data collide-history 128 :inline :offset-assert 2496) - (unknown-float140 float :offset 18944) - (unknown-dword70 time-frame :offset 18952) ;; from logic-target::add-thrust - (unknown-int40 int32 :offset 18880) ;; from logic-target::flag-setup - (unknown-dword80 time-frame :offset 18888) ;; from logic-target::post-flag-setup - (unknown-dword81 time-frame :offset 18896) ;; from logic-target::post-flag-setup - (unknown-float130 float :offset 18904) ;; from target2::target-swim-tilt - (unknown-float131 float :offset 18908) ;; from target2::target-swim-tilt - (unknown-dword82 time-frame :offset 18912) ;; from logic-target::reset-target-state - (unknown-vector120 vector :inline :offset 18928) ;; from target::(code target-running-attack) - (unknown-float150 float :offset 18944) ;; from target::(code target-wheel-flip) - (unknown-vector121 vector :inline :offset 18960) ;; from target collide response - (wall-pat pat-surface :offset 18976) ;; pat information for wall-check collision - (unknown-soundid00 sound-id :offset 18980) ;; from powerups::target-powerup-process - (unknown-float141 float :offset 18984) ;; from powerups::target-powerup-process + ;; --- the control frame ----------------------------------------------------------------- + ;; velocity expressed in the "control frame" (rotated so +z is Jak's facing). Built from + ;; world transv by build-conversions, accelerated by add-thrust, converted back to world + ;; transv by reverse-conversions each pipeline tick. + (transv-ctrl vector :inline :offset 448 :score 1) + ;; the desired velocity that add-thrust accelerates transv-ctrl toward (stick * surface speed) + (target-transv vector :inline :offset 464 :score 1) + ;; gravity-normal eased toward the ground normal by bend-gravity (slope banking) + (bent-gravity-normal vector :inline :offset 480 :score 1) + ;; the quaternion all control math uses. The drawn quat additionally blends toward + ;; override-quat by override-quat-alpha (used to pitch Jak's body while swimming). + (quat-for-control quaternion :inline :offset 496 :score 1) + (override-quat quaternion :inline :offset 512 :score 1) + (override-quat-alpha float :offset 528 :score 1) ;; 0 = use quat-for-control only + (ctrl-xz-vel float :offset 532 :score 1) ;; xz-plane speed of transv-ctrl + (velocity-after-thrust float :offset 536 :score 1) ;; |velocity| recorded at the end of add-thrust + (last-transv vector :inline :offset 544 :score 1) + ;; --- draw/collision offsets from animation --------------------------------------------- + ;; drawing-only offset (does not affect collision); applied via cspace-offset + (draw-offset vector :inline :offset 560 :score 1) + ;; the offset actually added to the root bone by node 0's cspace callback + ;; (cspace<-transformq+trans!); seeks toward (draw-offset - anim-collide-offset-world), so it + ;; shifts drawing (and any bone-attached collide prims) without touching trans + (cspace-offset vector :inline :offset 576 :score 1) + ;; collision offset sampled from the anim clip's 'collide-offset res-lump track at the current + ;; frame (mod-var-jump) -- NOT the aligner. Model-local vector, rotated by root-orientation + ;; into anim-collide-offset-world; its per-frame delta is injected into the collision velocity so + ;; trans follows the animated body (e.g. the jump tuck), while cspace-offset cancels it from the + ;; drawn position (the pose already carries the displacement visually). + (anim-collide-offset-local vector :inline :offset 592) + (anim-collide-offset-world vector :inline :offset 608 :score 1) + (old-anim-collide-offset-world vector :inline :offset 624 :score 1) ;; previous frame's value + (anim-collide-offset-delta-world vector :inline :offset 640 :score 1) ;; frame-to-frame change + ;; --- surfaces & input ------------------------------------------------------------------ + (standard-dynamics dynamics :offset 656 :score 1) ;; pointer to *standard-dynamics*, to restore dynam + (mod-surface surface :offset 660 :score 1) ;; the state-selected surface mode (walk/jump/dive/...) + (current-surface surface :offset 664 :score 1) ;; live surface = mod-surface x ground surf (surface-mult!) + (cpad cpad-info :offset 668 :score 1) ;; this player's controller + (turn-to-angle float :offset 672 :score 1) ;; heading change requested this frame + (last-turn-to-angle float :offset 676 :score 1) + (turn-to-magnitude float :offset 680 :score 1) + (last-turn-to-magnitude float :offset 684 :score 1) + ;; unit xz vector from Jak toward the "target point" of movement; holds its last value + ;; while the stick is neutral + (to-target-pt-xz vector :inline :offset 688 :score 1) + (last-to-target-pt-xz vector :inline :offset 704 :score 1) + ;; to-target-pt-xz scaled by stick magnitude, in the local-normal plane + (turn-to-target vector :inline :offset 720 :score 1) + (last-turn-to-target vector :inline :offset 736 :score 1) + ;; rolling history of the last 8 turn directions, in the control frame. turn-to-vector shifts + ;; entries 0..6 up one slot (writing index 7) and inserts at 0; average-turn-angle reads all 8. + ;; (jak2 declared this as 7 with a "(8?)" comment -- the code says 8, ending flush at 880.) + (turn-history-ctrl vector 8 :inline :offset 752) + (pad-xz-dir vector :inline :offset 880 :score 1) ;; stick direction as a world-space xz unit vector (camera-relative) + (last-pad-xz-dir vector :inline :offset 896 :score 1) + (pad-magnitude float :offset 912 :score 1) ;; stick deflection 0..1 + (last-pad-magnitude float :offset 916 :score 1) + (time-of-last-pad-read time-frame :offset 920 :score 1) + ;; rotations between the world frame and the control frame ("w-R-c" = world rotation of control) + (w-R-c matrix :inline :offset 928 :score 1) + (c-R-w matrix :inline :offset 992 :score 1) + ;; the root quaternion (the final drawn/collision orientation, incl. the override-quat blend) + ;; as a rotation-only matrix; rebuilt each frame in joint-points. Rotates model-local offsets + ;; into world (head offset, anim-collide-offset-local). NOT the w-R-c/c-R-w movement frame: + ;; that one flattens out pitch and uses the surface normal as up. + (root-orientation matrix :inline :offset 1056 :score 1) + ;; --- camera / forced turning ----------------------------------------------------------- + ;; position the camera should track (target-calc-camera-pos); the qword view exists for a + ;; raw quad write in target-death + (camera-pos-qword uint128 :offset 1136) + (camera-pos vector :inline :overlay-at camera-pos-qword :score 1) + (camera-pos-y float :offset 1140) ;; y lane of camera-pos (no direct refs in current decomp) + ;; --- scripted movement-input override ("the scripted stick") ------------------------------ + ;; target-real-post lerps (stick-dir x magnitude) toward (direction x magnitude) by strength + ;; before turn-to-vector, so this steers actual locomotion. Users: tongue grabs + ;; (target-apply-tongue) and homing knockback (velocity-set-to-target! + the smack mult-hooks). + (force-turn-to-direction vector :inline :offset 1152 :score 1) ;; world-space xz unit direction + (force-turn-to-magnitude float :offset 1168 :score 1) ;; virtual stick deflection 0..1 (both users set 1.0) + ;; commanded travel speed in velocity units: the smack mult-hooks lerp the surface's + ;; target-speed/transv-max toward it by strength (it is a lerp DESTINATION, not a minimum) + (force-turn-to-target-speed float :offset 1172 :score 1) + ;; 0..1 blend of player stick vs command; NEGATIVE = recomputed each tick as (1 - stick + ;; deflection), i.e. the script takes over only as the player releases the stick + (force-turn-to-strength float :offset 1176 :score 1) + ;; scratch counter zeroed at the end of joint-points every frame; jak 2 calls it + ;; tongue-counter ("stupid leftover from jak 1") + (tongue-counter int32 :offset 1180) + ;; --- gravity / ground contact ---------------------------------------------------------- + (gravity-normal vector :inline :offset 1184 :score 1) + (last-gravity-normal vector :inline :offset 1200 :score 1) + (last-trans-any-surf vector :inline :offset 1216 :score 1) ;; trans at the last frame we were on any surface + (ground-contact-normal vector :inline :offset 1232 :score 1) + (last-known-safe-ground vector :inline :offset 1248) ;; respawn-safe standing position + (ground-contact-sphere-center vector :inline :offset 1264 :score 1) ;; center of the collide sphere touching ground + (last-time-on-ground time-frame :offset 1280 :score 1) + (last-time-on-surface time-frame :offset 1288 :score 1) + (ground-local-norm-dot-grav float :offset 1300 :score 1) ;; dot(gravity, local normal), updated on ground contact + (local-slope-z float :offset 1304 :score 1) + (local-slope-x float :offset 1308 :score 1) + (surface-slope-z float :offset 1312 :score 1) + (surface-slope-x float :offset 1316 :score 1) + (last-time-touching-actor time-frame :offset 1320 :score 1) + (time-of-last-lc time-frame :offset 1328 :score 1) ;; last low-coverage (edge) contact + (time-of-last-lc-touch-edge int64 :offset 1336) ;; last low-coverage contact that was a ledge-candidate + ;; --- low-coverage (edge) probe results ------------------------------------------------- + ;; written by target-collision-low-coverage when the sphere hits a triangle EDGE (coverage + ;; < 1). Two downward sphere-casts sample the geometry on either side of the edge: + ;; probe 1 starts 0.7m OUTWARD (Jak's side) -- "does the ground fall away past the lip?"; + ;; probe 2 starts 0.2m up and 0.2m INWARD -- "is there solid floor right behind the lip?". + ;; Ledge = probe1 drop > 1.25x radius AND probe2 dist < 2x radius (plus pat checks). + ;; See collide-reaction-target.gc. + (low-coverage-probe1-drop float :offset 1344 :score 1) ;; along-gravity drop from the contact to probe 1's hit + (low-coverage-probe1-pat float :offset 1348) ;; probe 1 hit pat-surface (bits stored in a float) + (low-coverage-probe2-dist float :offset 1352 :score 1) ;; distance from probe 2's start to its hit + (low-coverage-probe2-pat uint32 :offset 1356) ;; probe 2 hit pat-surface + (low-coverage-probe1-normal vector :inline :offset 1376) ;; probe 1 hit normal + (low-coverage-probe2-normal vector :inline :offset 1392) ;; probe 2 hit normal + ;; unit vector ALONG the contacted edge line (= poly-normal x push-out; both lie in the + ;; cross-section plane perpendicular to the edge). Within 30 deg of vertical => vertical-edge. + (low-coverage-edge-dir vector :inline :offset 1440 :score 1) + ;; perpendicular to the edge, tangent to the collide sphere at the contact, oriented downward + ;; (= push-out x edge-dir) -- the "over the lip" direction + (low-coverage-across-edge-dir vector :inline :offset 1456 :score 1) + ;; the above flattened level and re-oriented OUTWARD (toward Jak's side); probes offset along +/- this + (low-coverage-across-edge-xz vector :inline :offset 1472 :score 1) + ;; --- blocked-by-wall tracking ---------------------------------------------------------- + ;; velocity snapshot from when Jak first became blocked by a wall; limited to the commanded + ;; direction/speed afterwards (see add-thrust) + (btransv vector :inline :offset 1504 :score 1) + (blocked-factor float :offset 1520 :score 1) ;; approaches 1 while a wall is eating velocity + (blocked-in-air-factor float :offset 1524 :score 1) ;; same, but only while in an air surface mode + ;; --- contact records for the state machine --------------------------------------------- + (wall-contact-pt vector :inline :offset 1536 :score 1) + (wall-contact-poly-normal vector :inline :offset 1552 :score 1) + (actor-contact-pt vector :inline :offset 1568 :score 1) + (actor-contact-normal vector :inline :offset 1584 :score 1) + (actor-contact-handle handle :offset 1600 :score 1) ;; handle of the last actor touched + ;; --- attack / danger collision prims --------------------------------------------------- + ;; the 3 body collide spheres (transform-index 28/26/7: upper/middle/lower body), retargeted + ;; by target-collide-set! for normal/duck/tube poses + (collision-spheres collide-shape-prim-sphere 3 :offset 1608) + ;; the 3 attack hitbox prims, configured per danger-mode by target-danger-set! + ;; (spin/punch/flop/etc set position+radius+collide-kind; 'harmless zeroes them) + (danger-sphere0 collide-shape-prim-sphere :offset 1632) + (danger-sphere1 collide-shape-prim-sphere :offset 1636) + (danger-sphere2 collide-shape-prim-sphere :offset 1640) + ;; --- move cooldown timestamps ---------------------------------------------------------- + (wheel-counter int32 :offset 1656) ;; consecutive-roll counter (enter target-wheel) + (last-wheel-end-time time-frame :offset 1664) ;; gates re-entering the roll + (last-running-attack-end-time time-frame :offset 1672) + (last-hands-attempt-time time-frame :offset 1680) ;; last denied hands-attack attempt (can-hands?) + (last-attack-end-time time-frame :offset 1688 :score 1) + (last-feet-attempt-time time-frame :offset 1696) ;; last denied feet-attack attempt (can-feet?) + (last-slide-down-end-time time-frame :offset 1704) ;; set on exit of target-slide-down + (last-time-of-stuck time-frame :offset 1712 :score 1) ;; prevents repeated stuck reactions + ;; --- gravity bend ---------------------------------------------------------------------- + ;; "bend" rotates the control frame's y axis toward the ground normal as bend-amount 0 -> 1 + (bend-amount float :offset 1724 :score 1) + (bend-target float :offset 1728 :score 1) + (bend-speed float :offset 1732 :score 1) + ;; --- joint tracking (joint-points, run every frame) ------------------------------------ + (ctrl-to-head-offset vector :inline :offset 1744) ;; *TARGET-bank* head-offset rotated by root-orientation + ;; an inline cspace abused as two pointers: `parent` = left index-finger joint cspace (lindA), + ;; `joint` = right index-finger joint cspace (rindA); their positions average to midpoint-of-hands + (hand-cspaces cspace :inline :offset 1760) + (midpoint-of-hands vector :score 100 :inline :offset 1776) ;; reference point for edge grabs / hand interactions + (ctrl-to-hands-offset vector :inline :offset 1792 :score 1) ;; midpoint-of-hands - trans + (sidekick-root cspace :inline :offset 1808) ;; Daxter's attach point; `parent` = LshoulderPad joint + (sidekick-root-pos vector :inline :offset 1824) ;; world position of the sidekick attach joint + ;; --- collide-mode (body collision pose) ------------------------------------------------ + (collide-mode symbol :offset 1840) ;; current body-collision pose ('normal, 'duck, ...) + (collide-mode-transition float :offset 1844) ;; 0..1 blend between collide modes + (duck-tube-transition float :offset 1848) ;; 0..1 blend used for the duck/tube pose spheres + ;; --- velocity history ------------------------------------------------------------------ + (transv-history vector 16 :inline :offset 1856 :score 1) ;; w = ctrl-xz-vel of that frame + (average-xz-vel float :offset 2112 :score 1) ;; average over transv-history + (idx-of-fastest-xz-vel int32 :offset 2116 :score 1) + ;; --- edge grab / pole swing ------------------------------------------------------------ + (hand-to-edge-dist float :offset 2120) ;; goes to 0 as Jak is pulled onto an edge/pole + (edge-grab-edge-dir vector :inline :offset 2128 :score 1) ;; direction along the grabbed edge + (edge-grab-across-edge-dir vector :inline :offset 2144 :score 1) ;; perpendicular to the edge, normal to gravity + (last-successful-compute-edge-time time-frame :offset 2160 :score 1) + (edge-grab-start-time time-frame :offset 2168) ;; set entering edge-grab; blocks instant re-exit + (swingpole-handle handle :offset 2176) ;; the swingpole process being swung on + ;; --- per-state scratch slots ----------------------------------------------------------- + ;; state-var0/1/2 are one uint32 each, reused with a different meaning per target state: + ;; state-var0: var-jump MIN apex height (float bits; init-var-jump/mod-var-jump) + ;; | time of last landed hit (target-running-attack) + ;; | done/abort flag (grab, death movies, basebutton warp) + ;; | ambient spool-anim pointer (state-spool-anim view) + ;; state-var1: var-jump MAX apex height (float bits) + ;; | "did move to pole" flag (target-compute-pole; see the named overlay) + ;; | time of surface smack (running-attack) | flut speed / racer height (float) + ;; state-var2: 1 = current attack already connected (running-attack/flut/swim smack logic) + ;; | high-jump mode argument | flop mode (int view) + (state-var0 uint32 :offset 2184) + (state-spool-anim spool-anim :overlay-at state-var0) ;; spooled ambient anim (stance-ambient, look-around, death movies) + (state-var0-int int32 :overlay-at state-var0) + (state-var0-symbol symbol :overlay-at state-var0) + (state-var0-float float :overlay-at state-var0) + (state-var1-int int32 :offset 2188) + (did-move-to-pole-or-max-jump-height int32 :overlay-at state-var1-int :score 1) + (state-var1 uint32 :overlay-at state-var1-int) + (state-var1-float float :overlay-at state-var1-int) + (state-var2 uint32 :offset 2192) + (state-var2-int int32 :overlay-at state-var2) + ;; --- variable jump --------------------------------------------------------------------- + (jump-forward-blend float :offset 2196) ;; 0..1 forward-lean anim blend during jumps (from xz speed) + ;; 0..1 time since jump start while X is held (-1 once locked); lerps the apex height from + ;; state-var0 (min) to state-var1 (max) in mod-var-jump. Also raised by X pressure as the + ;; held-jump anim blend in target-jump. + (var-jump-hold-time float :offset 2200) + (var-jump-last-hold-time float :offset 2204) ;; copy of the above from the last active frame (never read) + ;; --- per-state scratch vectors/quats --------------------------------------------------- + ;; state-vector0: jump start position (init/mod-var-jump) | warp-button target pos | + ;; transv snapshot on edge-grab entry | mount get-on start position + (state-vector0 vector :inline :offset 2224) + ;; state-vector1: warp-button camera pos | mount get-on destination position + (state-vector1 vector :inline :offset 2240) + ;; orientation slerp endpoints for mounting/dismounting the zoomer and flut-flut + (mount-start-quat quaternion :inline :offset 2256) + (mount-end-quat quaternion :inline :offset 2272) + (fishing-smush smush-control :inline :offset 2288) ;; squash-and-stretch oscillator for the fishing minigame + ;; --- jump tracking --------------------------------------------------------------------- + (last-trans-leaving-surf vector :inline :offset 2320 :score 1) ;; trans when we last left a surface + (highest-jump-mark vector :inline :offset 2336 :score 1) ;; trans xz at the apex of the current jump + ;; --- attack state ---------------------------------------------------------------------- + (danger-mode symbol :offset 2384 :score 1) ;; current attack mode ('spin, 'punch, 'flop, ... or #f) + (target-attack-id int64 :offset 2392 :score 1) ;; unique id, incremented per attack (dedups multi-hits) + (attack-count int64 :offset 2400 :score 1) + ;; --- saved 'launch event (one mem-copied event-message-block, offsets 2416..2487) ------- + (saved-launch-event pointer :offset 2416) ;; start of the copied block (its `to` slot) + (jump-kind symbol :offset 2428) ;; the copied event's message; checked for 'launch by jump states + (launch-height int64 :offset 2432) ;; param0: jump height (float bits) + (launch-camera-state int64 :offset 2440) ;; param1: camera state symbol to switch to + (launch-dest int64 :offset 2448) ;; param2: pointer to the landing-target vector + (launch-tracking-time int64 :offset 2456) ;; param3: how long the homing tracker steers toward launch-dest + ;; --- collision history ring (debug display + racer reactions) --------------------------- + (history-data-idx int16 :offset 2488 :score 1) + (history-length int16 :offset 2490) + (history-data collide-history 128 :inline :offset-assert 2496) + ;; --- (fields below live past the history ring) ------------------------------------------ + (remaining-ctrl-iterations int32 :offset 18880 :score 1) ;; countdown of physics sub-steps this frame (high-fps determinism) + (invulnerable-start-time time-frame :offset 18888) ;; timed invulnerability window (post-flag-setup flicker + timeout) + (invulnerable-duration time-frame :offset 18896) + (swim-tilt-angle float :offset 18904 :score 1) ;; underwater swim pitch, seeks toward stick input + (swim-draw-offset-y float :offset 18908 :score 1) ;; vertical draw offset (bob) while swimming + ;; rate-limiter for fired attacks: yellow-eco blasts (first-person + punch redirect) and the + ;; racer/flut/swim attack cooldowns + (last-fire-time time-frame :offset 18912) + (align-xz-vel vector :inline :offset 18928) ;; xz velocity taken from the animation align (wheel-flip / running-attack) + (zx-vel-frac float :offset 18944) ;; 0..1 fraction of commanded velocity actually achieved; scales flip/attack anim speed + (time-of-last-clear-wall-in-jump time-frame :offset 18952) ;; when (jumping into wall) last became (jumping, clear of wall) + (wall-contact-normal vector :inline :offset 18960 :score 1) + (wall-pat pat-surface :offset 18976) ;; pat information for wall-check collision + (ice-loop-sound-id sound-id :offset 18980) ;; looping "ice-loop" skid sound while on ice + (ice-loop-volume float :offset 18984) ;; its volume, seeked from xz speed ;; PAL patch here - (unknown-soundid01 sound-id :offset 18988) - (unknown-int34 int32 :offset 18992) - (unknown-int35 int32 :offset 18996) - (unknown-int36 int32 :offset 19000) - (transv-ctrl vector :inline :overlay-at unknown-vector00 :score 1) - (target-transv vector :inline :overlay-at unknown-vector01 :score 1) - (bent-gravity-normal vector :inline :overlay-at unknown-vector02 :score 1) - (last-transv vector :inline :overlay-at unknown-vector10 :score 1) - (draw-offset vector :inline :overlay-at unknown-vector11 :score 1) - (cspace-offset vector :inline :overlay-at unknown-vector12 :score 1) - (anim-collide-offset-world vector :inline :overlay-at unknown-vector14 :score 1) - (old-anim-collide-offset-world vector :inline :overlay-at unknown-vector15 :score 1) - (anim-collide-offset-delta-world vector :inline :overlay-at unknown-vector16 :score 1) - (to-target-pt-xz vector :inline :overlay-at unknown-vector20 :score 1) - (last-to-target-pt-xz vector :inline :overlay-at unknown-vector21 :score 1) - (turn-to-target vector :inline :overlay-at unknown-vector22 :score 1) - (last-turn-to-target vector :inline :overlay-at unknown-vector23 :score 1) - (pad-xz-dir vector :inline :overlay-at unknown-vector30 :score 1) - (last-pad-xz-dir vector :inline :overlay-at unknown-vector31 :score 1) - (force-turn-to-direction vector :inline :overlay-at unknown-vector40 :score 1) - (gravity-normal vector :inline :overlay-at unknown-vector50 :score 1) - (last-gravity-normal vector :inline :overlay-at unknown-vector51 :score 1) - (last-trans-any-surf vector :inline :overlay-at unknown-vector52 :score 1) - (ground-contact-normal vector :inline :overlay-at unknown-vector53 :score 1) - (ground-contact-sphere-center vector :inline :overlay-at unknown-vector55 :score 1) - (low-coverage-tangent vector :inline :overlay-at unknown-vector60 :score 1) - (btransv vector :inline :overlay-at unknown-vector61 :score 1) - (wall-contact-pt vector :inline :overlay-at unknown-vector70 :score 1) - (wall-contact-poly-normal vector :inline :overlay-at unknown-vector71 :score 1) - (actor-contact-pt vector :inline :overlay-at unknown-vector72 :score 1) - (actor-contact-normal vector :inline :overlay-at unknown-vector73 :score 1) - (ctrl-to-hands-offset vector :inline :overlay-at unknown-vector91 :score 1) - (edge-grab-edge-dir vector :inline :overlay-at unknown-vector100 :score 1) - (edge-grab-across-edge-dir vector :inline :overlay-at unknown-vector101 :score 1) - (low-coverage-overhang-plane-normal vector :inline :overlay-at unknown-vector-coverage-2 :score 1) - (low-coverage-tangent-xz vector :inline :overlay-at unknown-vector-coverage-3 :score 1) - (last-trans-leaving-surf vector :inline :overlay-at unknown-vector110 :score 1) - (highest-jump-mark vector :inline :overlay-at unknown-vector111 :score 1) - (wall-contact-normal vector :inline :overlay-at unknown-vector121 :score 1) - (quat-for-control quaternion :inline :overlay-at unknown-quaternion00 :score 1) - (override-quat quaternion :inline :overlay-at unknown-quaternion01 :score 1) - (w-R-c matrix :inline :overlay-at unknown-matrix00 :score 1) - (c-R-w matrix :inline :overlay-at unknown-matrix01 :score 1) - (ctrl-orientation matrix :inline :overlay-at unknown-matrix02 :score 1) - (mod-surface surface :overlay-at unknown-surface00 :score 1) - (current-surface surface :overlay-at unknown-surface01 :score 1) - (override-quat-alpha float :overlay-at unknown-float00 :score 1) - (ctrl-xz-vel float :overlay-at unknown-float01 :score 1) - (velocity-after-thrust float :overlay-at unknown-float02 :score 1) - (turn-to-angle float :overlay-at unknown-float10 :score 1) - (last-turn-to-angle float :overlay-at unknown-float11 :score 1) - (turn-to-magnitude float :overlay-at unknown-float12 :score 1) - (last-turn-to-magnitude float :overlay-at unknown-float13 :score 1) - (pad-magnitude float :overlay-at unknown-float20 :score 1) - (last-pad-magnitude float :overlay-at unknown-float21 :score 1) - (smack-speed-lerp-min float :overlay-at unknown-float40 :score 1) - (force-turn-to-strength float :overlay-at unknown-float41 :score 1) - (force-turn-to-speed float :overlay-at unknown-float50 :score 1) - (ground-local-norm-dot-grav float :overlay-at unknown-float60 :score 1) - (local-slope-z float :overlay-at unknown-float61 :score 1) - (local-slope-x float :overlay-at unknown-float62 :score 1) - (surface-slope-z float :overlay-at unknown-float63 :score 1) - (surface-slope-x float :overlay-at unknown-float64 :score 1) - (blocked-factor float :overlay-at unknown-float70 :score 1) - (blocked-in-air-factor float :overlay-at unknown-float71 :score 1) - (bend-amount float :overlay-at unknown-float80 :score 1) - (bend-target float :overlay-at unknown-float81 :score 1) - (bend-speed float :overlay-at unknown-float82 :score 1) - (average-xz-vel float :overlay-at unknown-float100 :score 1) - (low-coverage-slope-to-next1 float :overlay-at unknown-float-coverage-0 :score 1) - (low-coverage-slope-to-next2 float :overlay-at unknown-float-coverage-2 :score 1) - (idx-of-fastest-xz-vel int32 :overlay-at unknown-int10 :score 1) - (did-move-to-pole-or-max-jump-height int32 :overlay-at unknown-int21 :score 1) - (remaining-ctrl-iterations int32 :overlay-at unknown-int40 :score 1) - (history-data-idx int16 :overlay-at unknown-halfword00 :score 1) - (time-of-last-pad-read time-frame :overlay-at unknown-dword00 :score 1) - (last-time-on-ground time-frame :overlay-at unknown-dword10 :score 1) - (last-time-on-surface time-frame :overlay-at unknown-dword11 :score 1) - (last-time-touching-actor time-frame :overlay-at unknown-dword20 :score 1) - (time-of-last-lc time-frame :overlay-at unknown-dword21 :score 1) - (last-attack-end-time time-frame :overlay-at unknown-dword33 :score 1) - (last-time-of-stuck time-frame :overlay-at unknown-dword36 :score 1) - (last-successful-compute-edge-time time-frame :overlay-at unknown-dword40 :score 1) - (target-attack-id int64 :overlay-at unknown-dword50 :score 1) - (attack-count int64 :overlay-at unknown-dword51 :score 1) - (actor-contact-handle handle :overlay-at unknown-handle00 :score 1) - (danger-mode symbol :overlay-at unknown-symbol30 :score 1) - (cpad cpad-info :overlay-at unknown-cpad-info00 :score 1) - (standard-dynamics dynamics :overlay-at unknown-dynamics00 :score 1) - (transv-history vector 16 :inline :overlay-at unknown-vector-array10 :score 1) - (camera-pos vector :inline :overlay-at unknown-qword00 :score 1) + (launch-sound-id sound-id :offset 18988) ;; "launch-fire" sound id (PAL addition) + (unknown-int34 int32 :offset 18992) ;; PAL addition; no known uses + (unknown-int35 int32 :offset 18996) ;; PAL addition; no known uses + (unknown-int36 int32 :offset 19000) ;; PAL addition; no known uses ) :size-assert #x4a3c ;; #x4a2c :method-count-assert 65 :flag-assert #x4100004a3c ;; #x4100004a2c + (:methods + (integrate-and-collide! + :override-doc "Apply the animation collision offset, run moving-shape collision integration, +track how much commanded motion was blocked, and update the achieved horizontal-velocity +fraction.") + ) ) ;; ---------------------- @@ -12517,6 +13949,7 @@ ;; - Types (deftype touching-prim (structure) + "One primitive in a touching pair, with the intersected triangle when the primitive came from a mesh." ((cprim collide-shape-prim :offset-assert 0) ;; a big guess, there's a few that meet this name (has-tri? symbol :offset-assert 4) (tri collide-tri-result :inline :offset-assert 16) @@ -12528,6 +13961,8 @@ (declare-type touching-shapes-entry structure) (deftype touching-prims-entry (structure) + "One pair of touching primitives. A nonnegative u is the prospective collision-step fraction +needed to reach the contact; a negative u marks a contact that is already overlapping or confirmed." ((next touching-prims-entry :offset-assert 0) (prev touching-prims-entry :offset-assert 4) (allocated? symbol :offset-assert 8) @@ -12539,14 +13974,22 @@ :size-assert #xe4 :flag-assert #xd000000e4 (:methods - (get-touched-prim (_type_ trsqv touching-shapes-entry) collide-shape-prim) ;; 9 + (get-touched-prim "Return the primitive in this pair that belongs to shape, or #f when shape is +not one of the owning shape entry's two shapes." + (_type_ collide-shape touching-shapes-entry) collide-shape-prim) ;; 9 (touching-prims-entry-method-10 () none) ;; 10 - (get-middle-of-bsphere-overlap (_type_ vector) vector) ;; 11 - (get-touched-tri (_type_ collide-shape touching-shapes-entry) collide-tri-result) ;; 12 + (get-middle-of-bsphere-overlap "Store the midpoint of the center-line segment shared by the +primitives' overlapping world spheres in output. The spheres are assumed to overlap and to have +distinct centers." + (_type_ vector) vector) ;; 11 + (get-touched-tri "Return the recorded collision triangle for shape, or #f when shape is not in +the pair or its primitive did not come from a triangle." + (_type_ collide-shape touching-shapes-entry) collide-tri-result) ;; 12 ) ) (deftype touching-prims-entry-pool (structure) + "A fixed pool of 64 touching-primitive pairs maintained as a doubly linked free list." ((head touching-prims-entry :offset-assert 0) (nodes touching-prims-entry 64 :inline :offset-assert 16) ) @@ -12554,15 +13997,22 @@ :size-assert #x3c10 :flag-assert #xd00003c10 (:methods - (new (symbol type) _type_) ;; 0 - (alloc-node (_type_) touching-prims-entry) ;; 9 - (get-free-node-count (_type_) int) ;; 10 - (init-list! (_type_) none) ;; 11 - (free-node (_type_ touching-prims-entry) touching-prims-entry) ;; 12 + (new "Allocate a touching-primitive entry pool and initialize its free list." + (symbol type) _type_) ;; 0 + (alloc-node "Remove and return the first entry in the free list, or #f when the pool is empty." + (_type_) touching-prims-entry) ;; 9 + (get-free-node-count "Count the entries currently available in the free list." + (_type_) int) ;; 10 + (init-list! "Reset the fixed pool and link all 64 entries into the free list." + (_type_) none) ;; 11 + (free-node "Return an allocated entry to the front of the free list. Releasing an already-free +entry has no effect." + (_type_ touching-prims-entry) touching-prims-entry) ;; 12 ) ) (deftype touching-shapes-entry (structure) + "One pair of touching shapes and the linked list of primitive pairs responsible for the contact." ((cshape1 collide-shape :offset-assert 0) (cshape2 collide-shape :offset-assert 4) (resolve-u int8 :offset-assert 8) @@ -12574,18 +14024,30 @@ :flag-assert #x1200000010 (:methods (touching-shapes-entry-method-9 (_type_) none) ;; 9 - (get-touched-shape (_type_ collide-shape) collide-shape) ;; 10 + (get-touched-shape "Return the other shape in this touching pair, or #f when shape is not in +the pair." + (_type_ collide-shape) collide-shape) ;; 10 (touching-shapes-entry-method-11 () none) ;; 11 - (prims-touching? (_type_ collide-shape-moving uint) touching-prims-entry) ;; 12 ; this one! - (prims-touching-action? (_type_ collide-shape collide-action collide-action) touching-prims-entry) ;; 13 + (prims-touching? "Find a touching primitive belonging to shape whose primitive-id shares a bit +with prim-id-mask. Return #f when no primitive matches or shape is not in this pair." + (_type_ collide-shape-moving uint) touching-prims-entry) ;; 12 ; this one! + (prims-touching-action? "Find a touching primitive belonging to shape whose action has at least +one required-actions bit and no rejected-actions bit. Return #f when none matches or shape is not +in this pair." + (_type_ collide-shape collide-action collide-action) touching-prims-entry) ;; 13 (touching-shapes-entry-method-14 () none) ;; 14 - (free-touching-prims-list (_type_) symbol) ;; 15 - (get-head (_type_) touching-prims-entry) ;; 16 - (get-next (_type_ touching-prims-entry) touching-prims-entry) ;; 17 + (free-touching-prims-list "Return every primitive pair in this shape entry to the shared pool +and mark the shape entry unused." + (_type_) symbol) ;; 15 + (get-head "Return the first touching-primitive pair for this shape pair." + (_type_) touching-prims-entry) ;; 16 + (get-next "Return the touching-primitive pair after the given node." + (_type_ touching-prims-entry) touching-prims-entry) ;; 17 ) ) (deftype touching-list (structure) + "The solver's touching shape pairs and their prospective or confirmed primitive contacts." ((num-touching-shapes int32 :offset-assert 0) (resolve-u int8 :offset-assert 4) (touching-shapes touching-shapes-entry 32 :inline :offset-assert 8) @@ -12594,13 +14056,28 @@ :size-assert #x208 :flag-assert #xf00000208 (:methods - (new (symbol type) _type_) ;; 0 - (add-touching-prims (_type_ collide-shape-prim collide-shape-prim float collide-tri-result collide-tri-result) none) ;; 9 + (new "Allocate an empty list of touching shape pairs." + (symbol type) _type_) ;; 0 + (add-touching-prims "Record a contact between two primitives at step-u, copying the 84-byte +field payload of either optional triangle result without its tail padding. A nonnegative step-u is +prospective until update-from-step-size confirms it; a negative value is already overlapping. A +repeated primitive pair keeps its original u and replaces only its triangle data when the new step-u +is smaller." + (_type_ collide-shape-prim collide-shape-prim float collide-tri-result collide-tri-result) none) ;; 9 (touching-list-method-10 () 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 - (free-all-prim-nodes (_type_) none) ;; 14 + (update-from-step-size "Confirm prospective contacts whose u is no greater than chosen-step by +setting their u to -1, and unlink contacts beyond the chosen step. Already-negative contacts remain +confirmed." + (_type_ float) none) ;; 11 + (send-events-for-touching-shapes "Send the configured self and other events for every retained +shape pair. When the second shape belongs to target, swap the pair first so target receives events +in the first-shape role. Pair traversal otherwise follows touching-list order with no event priority." + (_type_) none) ;; 12 + (get-shapes-entry "Return the order-independent entry for shape-a and shape-b, reusing an empty +slot or appending one when necessary. Return #f when all 32 slots are occupied." + (_type_ collide-shape collide-shape) touching-shapes-entry) ;; 13 + (free-all-prim-nodes "Return every primitive-pair entry to the shared pool and empty this list." + (_type_) none) ;; 14 ) ) @@ -12619,6 +14096,8 @@ ;; - Types (deftype edge-grab-info (structure) + "A validated edge hold: edge and triangle vertices, hand and center points, the hanging frame, +and enough actor-local data to follow a moving foreground primitive." ((world-vertex vector 6 :inline :offset-assert 0) (local-vertex vector 6 :inline :offset-assert 96) (actor-cshape-prim-offset int32 :offset-assert 192) @@ -12630,19 +14109,25 @@ (left-hand-hold vector :inline :offset-assert 272) (right-hand-hold vector :inline :offset-assert 288) (center-hold-old vector :inline :offset-assert 304) - (edge-tri-pat uint32 :offset-assert 320) + (edge-tri-pat pat-surface :offset-assert 320) ) :method-count-assert 11 :size-assert #x144 :flag-assert #xb00000144 (:methods - (edge-grab-info-method-9 (_type_) symbol) ;; 9 - (debug-draw (_type_) symbol) ;; 10 + (update-and-validate! "Re-anchor an actor-backed hold from its saved bone-local vertices. +Reject a missing or disabled actor, a supporting triangle tilted more than 45 degrees from up, +or a hanging or leap-up pose whose clearance spheres now collide. Notify the actor when its hold +remains valid." + (_type_) symbol) ;; 9 + (debug-draw "Draw the saved edge, triangle, hand holds, and hanging frame." + (_type_) symbol) ;; 10 ) ) (declare-type collide-cache-tri structure) (deftype collide-edge-tri (structure) + "A collision-cache triangle accepted as a possible supporting face for an edge grab." ((ctri collide-cache-tri :offset-assert 0) (normal vector :inline :offset-assert 16) ) @@ -12652,6 +14137,7 @@ ) (deftype collide-edge-edge (structure) + "One candidate edge, its supporting triangle, endpoints, outward direction, and edge direction." ((ignore basic :offset-assert 0) (etri collide-edge-tri :offset-assert 4) (vertex-ptr (inline-array vector) 2 :offset-assert 8) @@ -12664,6 +14150,9 @@ ) (deftype collide-edge-hold-item (structure) + "A rated hold point on a candidate edge. Split zero is the projected center, positive values +advance toward the edge's second endpoint, and negative values advance toward its first endpoint; +the magnitude selects the next incremental fallback distance." ((next collide-edge-hold-item :offset-assert 0) (rating float :offset-assert 4) (split int8 :offset-assert 8) @@ -12677,6 +14166,7 @@ ) (deftype collide-edge-hold-list (structure) + "A distance-sorted list of at most 32 candidate holds and their debug attempt positions." ((num-allocs uint32 :offset-assert 0) (num-attempts uint32 :offset-assert 4) (head collide-edge-hold-item :offset-assert 8) @@ -12687,14 +14177,18 @@ :size-assert #x810 :flag-assert #xb00000810 (:methods - (debug-draw (_type_) object) ;; 9 - (add-to-list! (_type_ collide-edge-hold-item) none) ;; 10 + (debug-draw "Draw the candidate holds and attempted positions." + (_type_) object) ;; 9 + (add-to-list! "Save the candidate point for debug display and insert the hold in ascending +rating order, preserving insertion order when ratings are equal." + (_type_ collide-edge-hold-item) none) ;; 10 ) ) (declare-type collide-cache basic) (declare-type collide-shape basic) (deftype collide-edge-work (structure) + "Scratch storage and search limits for extracting grabbable edges from a collision cache." ((ccache collide-cache :offset-assert 0) (cshape collide-shape :offset-assert 4) (num-verts uint32 :offset-assert 8) @@ -12726,17 +14220,46 @@ :size-assert #x2690 :flag-assert #x1400002690 (:methods - (search-for-edges (_type_ collide-edge-hold-list) symbol) ;; 9 - (debug-draw-edges (_type_) object) ;; 10 - (debug-draw-tris (_type_) none) ;; 11 - (debug-draw-sphere (_type_) symbol) ;; 12 - (compute-center-point! (_type_ collide-edge-edge vector) float) ;; 13 - (collide-edge-work-method-14 (_type_ vector vector int) float) ;; 14 - (find-grabbable-edges! (_type_) none) ;; 15 - (find-grabbable-tris! (_type_) none) ;; 16 - (should-add-to-list? (_type_ collide-edge-hold-item collide-edge-edge) symbol) ;; 17 - (find-best-grab! (_type_ collide-edge-hold-list edge-grab-info) symbol) ;; 18 - (check-grab-for-collisions (_type_ collide-edge-hold-item edge-grab-info) symbol) ;; 19 + (search-for-edges "Project the search point onto each exposed edge, reject holds outside the +reach, outward-distance, or facing limits, and build a rating-sorted list of at most 32 candidates." + (_type_ collide-edge-hold-list) symbol) ;; 9 + (debug-draw-edges "Draw the extracted candidate edges." + (_type_) object) ;; 10 + (debug-draw-tris "Draw the accepted supporting triangles." + (_type_) none) ;; 11 + (debug-draw-sphere "Draw the deduplicated vertices used by the candidate edge list." + (_type_) symbol) ;; 12 + (compute-center-point! "Project the search point onto an edge in the xz plane, clamp the +projection to the segment, and store the resulting point. The scalar return is the output x +coordinate and is not used by the edge search." + (_type_ collide-edge-edge vector) float) ;; 13 + (nearest-grab-edge-distance! "Find the nearest non-ignored edge belonging to one collision +primitive, store the closest point on that edge, and return its distance from the test point. +Return -1 when no matching edge exists." + (_type_ vector vector int) float) ;; 14 + (find-grabbable-edges! "Deduplicate the accepted triangle vertices, pair oppositely directed +shared edges, and extract at most 96 exposed boundary edges with normalized edge and outward +directions. Interior edges and edges facing away from the target are marked to be ignored." + (_type_) none) ;; 15 + (find-grabbable-tris! "Select at most 48 ground or obstacle collision-cache triangles whose +PAT permits edge grabbing, whose integer bounds overlap the reach box, and whose unit normal is +within 45 degrees of up." + (_type_) none) ;; 16 + (should-add-to-list? "Accept a candidate only when its center lies inside the reach box, its +outward test point lies within the configured xz distance, and its direction from the target +meets the configured facing cosine. Fill its edge, points, zero split state, and squared xz +distance rating on success." + (_type_ collide-edge-hold-item collide-edge-edge) symbol) ;; 17 + (find-best-grab! "Try at most 16 holds in rating order. After a failed center hold, generate +valid fallbacks in both directions at 1024 units, then add 1433.6 units for a second position +2457.6 units from center. Reinsert every fallback by rating and return the first hold that passes +full collision validation." + (_type_ collide-edge-hold-list edge-grab-info) symbol) ;; 18 + (check-grab-for-collisions "Place both hands along the edge and require each to remain within +0.12 meters of a non-ignored edge on the same collision primitive. Fill the hanging frame and +saved geometry, reject blocked hanging or pull-up clearance spheres, and save actor-local vertices +and a process handle when the supporting primitive belongs to a moving actor." + (_type_ collide-edge-hold-item edge-grab-info) symbol) ;; 19 ) ) @@ -12754,19 +14277,41 @@ ;; - Functions -(define-extern joint-control-reset! (function joint-control joint-control-channel none :behavior process-drawable)) +(define-extern joint-control-reset! + "Remove the stack group containing channel from controller, repair push1 and root-channel state, +compact both sides of the channel array, and reduce the active count." + (function joint-control joint-control-channel none :behavior process-drawable)) (define-extern cspace-index-by-name (function process-drawable string int)) (define-extern cspace-by-name (function process-drawable string cspace)) -(define-extern cspace-by-name-no-fail (function process-drawable string cspace)) -(define-extern cspace-index-by-name-no-fail (function process-drawable string int)) -(define-extern num-func-none (function joint-control-channel float float float)) -(define-extern num-func-+! (function joint-control-channel float float float)) -(define-extern num-func--! (function joint-control-channel float float float)) -(define-extern num-func-loop! (function joint-control-channel float float float)) -(define-extern num-func-seek! (function joint-control-channel float float float)) -(define-extern num-func-blend-in! (function joint-control-channel float float float)) -(define-extern num-func-chan (function joint-control-channel float float float)) -(define-extern num-func-identity (function joint-control-channel float float float)) +(define-extern cspace-by-name-no-fail "Return the named joint coordinate space, printing an error +and falling back to joint zero when the name is absent." + (function process-drawable string cspace)) +(define-extern cspace-index-by-name-no-fail "Return the named joint coordinate-space index, +printing an error and returning zero when the name is absent." + (function process-drawable string int)) +(define-extern num-func-none "Return the channel's current frame without changing it." + (function joint-control-channel float float float)) +(define-extern num-func-+! "Advance the frame by the given rate, animation speed, and display +time adjustment." + (function joint-control-channel float float float)) +(define-extern num-func--! "Move the frame backward by the given rate, animation speed, and display +time adjustment." + (function joint-control-channel float float float)) +(define-extern num-func-loop! "Advance the frame and wrap it across the animation duration. Adding +one duration before the truncating quotient keeps modest backward steps near frame zero in range." + (function joint-control-channel float float float)) +(define-extern num-func-seek! "Move the frame toward the target by at most the given rate, +animation speed, and display time adjustment." + (function joint-control-channel float float float)) +(define-extern num-func-blend-in! "Move the frame interpolation toward one by the given rate and +display time adjustment, resetting the channel when the blend completes." + (function joint-control-channel float float float)) +(define-extern num-func-chan "Copy the frame from another root channel selected by its channel +index." + (function joint-control-channel float float float)) +(define-extern num-func-identity "Return the current frame unchanged. This separate function symbol +lets callers hold an animation on an explicitly selected frame." + (function joint-control-channel float float float)) ;; ---------------------- @@ -12799,13 +14344,32 @@ :size-assert #x24 :flag-assert #xf00000024 (:methods - (new (symbol type process-drawable) _type_) - (effect-control-method-9 (_type_) none) ;; 9 - (effect-control-method-10 (_type_ symbol float int) object) ;; 10 - (effect-control-method-11 (_type_ symbol float int basic pat-surface) none) ;; 11 - (effect-control-method-12 (_type_ symbol float int basic sound-name) int) ;; 12 - (set-channel-offset! (_type_ int) none) ;; 13 - (effect-control-method-14 (_type_ float float float) none) ;; 14 + (new "Create an effect controller for drawable when its art contains effect-name data; +return #f when the art has no such data." + (symbol type process-drawable) _type_) + (relocate :override-doc + "Adjust the owning process pointer after its process heap moves.") + (update-effects "Track the selected animation channel in artist-frame units and dispatch every +effect tag crossed since the previous update. Handle forward and backward seeking, loop wraps, and +held frames without firing a tag twice." + (_type_) none) ;; 9 + (do-effect "Dispatch one named animation effect. Give the owning process first chance to consume +it as an event, then resolve material effects, particle launchers or groups, sounds, camera shake, +and death effects. A negative joint selects the effect-joint property at frame." + (_type_ symbol float int) object) ;; 10 + (do-effect-for-surface "Resolve a footstep, landing, slide, footprint, or droppings effect from +the supplied collision material, launch its material-specific particles when applicable, and play +its material-specific sound." + (_type_ symbol float int basic pat-surface) none) ;; 11 + (play-effect-sound "Build a default sound specification, apply exact-frame effect-param pairs, +skip sounds beyond their falloff maximum, and play the result at the selected joint or without a +position when joint is negative." + (_type_ symbol float int basic sound-name) int) ;; 12 + (set-channel-offset! "Select the root animation channel whose effect tags are tracked." + (_type_ int) none) ;; 13 + (play-effects-from-res-lump "Dispatch each consecutive effect-name tag strictly between the +lower and upper frame bounds, plus a tag exactly equal to exact-frame." + (_type_ float float float) none) ;; 14 ) ) @@ -12845,6 +14409,20 @@ (deftype collide-fragment (drawable) ((mesh collide-frag-mesh :offset 8) ) + (:methods + (mem-usage :override-doc + "Account for the fragment and mesh headers, packed polygon stream and PAT indices, and packed +vertex quadwords. Bit 0 of flags selects the prototype categories instead of the ordinary +background-collision categories.") + (draw :override-doc + "Leave this collision fragment invisible. The disabled debug block can draw its bounds.") + (collide-with-box :override-doc + "Append each fragment in this contiguous range whose bounding sphere and stored bounds + intersect the active box query.") + (collide-y-probe :override-doc + "Append each fragment in this contiguous range whose bounding sphere intersects the active + vertical probe.") + ) :method-count-assert 18 :size-assert #x20 :flag-assert #x1200000020 @@ -12854,6 +14432,25 @@ ((data collide-fragment 1 :inline :offset-assert 32) (pad uint32) ;; ending in inline basic always results in 4 byte pad. ) + (:methods + (mem-usage :override-doc + "Account for the inline-array header and delegate memory accounting to every collision +fragment.") + (login :override-doc + "No linked resources need initialization; return this inline array unchanged.") + (draw :override-doc + "Sphere-cull every collision fragment and invoke draw on each survivor. Submitted-array is +part of the drawable interface and is unused.") + (collide-with-box :override-doc + "Ignore count and test every collision fragment in this inline array against the active box, +appending matches to result.") + (collide-y-probe :override-doc + "Ignore count and test every collision fragment in this inline array against the active +vertical probe, appending matches to result.") + (collide-ray :override-doc + "Ignore count and test every collision fragment in this inline array against the active +swept-sphere ray, appending matches to result.") + ) :method-count-assert 18 :size-assert #x44 :flag-assert #x1200000044 @@ -12861,6 +14458,24 @@ (deftype drawable-tree-collide-fragment (drawable-tree) ((data-override drawable-inline-array :offset 32)) + (:methods + (login :override-doc + "No linked resources need initialization; return this collision tree unchanged.") + (draw :override-doc + "When collision display is enabled, submit every child inline array for the current frame. +Submitted-tree is part of the drawable interface and is unused.") + (unpack-vis :override-doc + "Consume no visibility data, leave destination unchanged, and return source unchanged.") + (collide-with-box :override-doc + "Ignore count and forward the active collision-box query across every inline array in this +tree, appending matches to result.") + (collide-y-probe :override-doc + "Ignore count and forward the active vertical-probe query across every inline array in this +tree, appending matches to result.") + (collide-ray :override-doc + "Ignore count and forward the active swept-sphere ray query across every inline array in this +tree, appending matches to result.") + ) :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 @@ -12881,7 +14496,7 @@ (target vector :inline :offset-assert 192) (target-base vector :inline :offset-assert 208) (parent-base vector :inline :offset-assert 224) - (parent-quat vector :inline :offset-assert 240) + (parent-quat quaternion :inline :offset-assert 240) (base-vector vector :inline :offset-assert 256) (timeout time-frame :offset-assert 272) (options uint64 :offset-assert 280) @@ -12906,15 +14521,36 @@ :flag-assert #x1d0130019c ;; inherited inspect of process-drawable (:methods - (projectile-die () _type_ :state) ;; 20 ;; state - sound related? - (projectile-dissipate () _type_ :state) ;; 21 ;; state - (projectile-impact () _type_ :state) ;; 22 ;; state - (projectile-moving () _type_ :state) ;; 23 ;; state - (projectile-method-24 (_type_) none) ;; 24 - (projectile-method-25 (_type_) none) ;; 25 - (projectile-method-26 (_type_) none) ;; 26 - (projectile-method-27 (_type_) none) ;; 27 - (projectile-method-28 (_type_) none) ;; 28 + (projectile-die "Notify the interested process of death, then release the projectile." + () _type_ :state) ;; 20 + (projectile-dissipate "Play the type-specific expiration effect and sound, then enter +projectile-die. Blue projectiles skip the yellow expiration effect." + () _type_ :state) ;; 21 + (projectile-impact "Apply the type-specific impact effect and sound, then enter projectile-die. +Blue projectiles clean up immediately." + () _type_ :state) ;; 22 + (projectile-moving "Process touched and die events, update homing and collision once per +display time-ratio substep, and update effects once per rendered frame. Impact after the hit limit +or after the sixteen-sample travel history detects a stall; dissipate when timeout expires." + () _type_ :state) ;; 23 + (update-projectile-effects! "Update effects for this projectile type. The base spawns its +particle trail; yellow also updates its shadow, transform, time-windowed trail, and tracking sound; +blue randomly emits a blue-eco glow." + (_type_) none) ;; 24 + (go-moving! "Enter the projectile's initial moving or launch state." (_type_) none) ;; 25 + (init-projectile-collision! "Create the moving collision sphere, contact callback, collision +masks, navigation radius, and touched event. Yellow also collides with mother-spider; blue restricts +the sphere to background collision." + (_type_) none) ;; 26 + (init-projectile-settings! "Apply settings for this projectile type. Yellow configures homing, +eco attack, launcher and trail particles, sounds, and level water planes; blue targets a random +joint, uses blue-eco particles, and collides only with the background. The base implementation does +nothing." + (_type_) none) ;; 27 + (update-target! "Refresh this projectile type's homing target. Yellow selects a rated nearby +attackable or follows the player collision sphere; blue follows its chosen drawable joint and +impacts within one meter. The base implementation does nothing." + (_type_) none) ;; 28 ) ) @@ -12989,7 +14625,11 @@ :size-assert #x250 ;;#x248 :flag-assert #x1501e00250 ;;#x1501e00248 (:methods - (find-edge-grabs! (_type_ collide-cache) object) ;; 20 ;; none or #f + (find-edge-grabs! "Fill a collision cache around the target, select upward supporting +triangles and their exposed boundary edges, and search for a reachable hold first in the stick +direction and then in the target's facing direction. Fill *edge-grab-info* and send edge-grab +when hand placement and hanging clearance succeed." + (_type_ collide-cache) object) ;; 20 ;; none or #f ) (:states (target-jump float float surface) @@ -13050,7 +14690,7 @@ target-edge-grab-off (target-pole-flip-up-jump float float) (target-pole-flip-forward-jump float float) - (target-pole-flip-up object object float) + (target-pole-flip-up float float float) (target-pole-flip-forward float float float) target-stance-look-around (target-racing-smack float symbol) @@ -13094,7 +14734,10 @@ (target-death symbol) (target-clone-anim handle) target-title - target-demo + (target-demo + (:code + "Disable pause and progress, show the territory- and language-specific demo screens, then + start the Village 1 demo conversation and remain in place.")) target-title-play target-title-wait (target-warp-in vector vector) @@ -13187,6 +14830,13 @@ :flag-assert #x900000020 ) +(defenum perf-counter-pair + :type uint32 + :bitfield #f + (cycles-instructions 0) + (icache-dcache 1) + ) + (deftype perf-stat (structure) ((frame-number uint32 :offset-assert 0) (count uint32 :offset-assert 4) @@ -13194,7 +14844,7 @@ (instructions uint32 :offset-assert 12) (icache uint32 :offset-assert 16) (dcache uint32 :offset-assert 20) - (select uint32 :offset-assert 24) + (select perf-counter-pair :offset-assert 24) (ctrl uint32 :offset-assert 28) (accum0 uint32 :offset-assert 32) (accum1 uint32 :offset-assert 36) @@ -13208,10 +14858,30 @@ :flag-assert #xe00000034 (:methods (perf-stat-method-9 (_type_) none) ;; 9 - (print-to-stream (_type_ string basic) none) ;; 10 - (reset! (_type_) none) ;; 11 - (read! (_type_) none) ;; 12 - (update-wait-stats (_type_ uint uint uint) none) ;; 13 + (print-to-stream + "Print one performance-counter row to the console. stream is accepted for the standard + print-to-stream interface but is ignored." + (_type_ string basic) + none + ) ;; 10 + (reset! + "Begin one performance-counter sample. The EE clears and enables both counters selected by + ctrl; the PC port records the current CPU clock because it exposes only elapsed cycles." + (_type_) + none + ) ;; 11 + (read! + "Stop the active performance-counter sample and add its two counter values to accum0 and + accum1. The PC port adds elapsed CPU-clock ticks to accum0 and leaves accum1 at zero." + (_type_) + none + ) ;; 12 + (update-wait-stats + "Add the waits spent transferring data to VU0, to scratchpad, and from scratchpad while this + performance bucket is enabled." + (_type_ uint uint uint) + none + ) ;; 13 ) ) @@ -13232,8 +14902,13 @@ ;; - Types (deftype bsp-node (structure) + ;; A plane selects front when dot(position, plane.xyz) - plane.w is nonnegative. Positive + ;; children are bsp-node pointers; nonpositive children identify terminal sides. Visibility + ;; trees use negative child values to encode their leaf indices. ((front int32 :offset-assert 0) (back int32 :offset-assert 4) + ;; Each side carries six two-bit neighboring-level flag pairs: load in bit zero and display in + ;; bit one. bsp-camera-asm copies the selected terminal side's packed flags into the header. (front-flags uint32 :offset-assert 8) (back-flags uint32 :offset-assert 12) (plane vector :inline :offset-assert 16) @@ -13274,6 +14949,7 @@ (unk-data-2 uint16 9 :offset-assert 130) (boxes box8s-array :offset-assert 148) + ;; Packed neighboring-level flags from the terminal BSP side containing the camera. (current-bsp-back-flags uint32 :offset-assert 152) (ambients drawable-inline-array-ambient :offset-assert 156) (unk-data-4 float :offset-assert 160) @@ -13288,9 +14964,47 @@ :size-assert #x190 :flag-assert #x1400000190 (:methods - (relocate (_type_ kheap (pointer uint8)) none :replace) ;; 7 - (birth (_type_) none) ;; 18 - (deactivate-entities (_type_) none) ;; 19 + (relocate "Validate a newly linked BSP for the currently loading level, preserve the corrected + title and demo names, and connect the BSP and level to each other. Reject invalid + types, versions, and visibility lists longer than 2048 entries." + (_type_ kheap (pointer uint8)) + none + :replace) ;; 7 + (mem-usage :override-doc + "Account for this header's owned level data and delegate memory accounting to its drawable +trees and cameras.") + (login :override-doc + "Log in the level's drawable trees and every ADGIF shader.") + (draw :override-doc + "Prepare scratchpad visibility, subdivision state, and math-camera VU registers; draw the +level's drawable trees and three foreground engines for the current display frame.") + (collide-with-box :override-doc + "Forward the active box query to every drawable tree and append their geometry to result. +length is passed through for child implementations that use it.") + (collide-y-probe :override-doc + "Forward the active vertical-probe query to every drawable tree and append their geometry to +result. length is passed through for child implementations that use it.") + (collide-ray :override-doc + "Forward the active swept-sphere ray query to every drawable tree and append their geometry +to result. length is passed through for child implementations that use it.") + (collect-stats :override-doc + "Upload the current visibility bits and math-camera VU registers, then collect renderer +statistics from the level's drawable trees.") + (debug-draw :override-doc + "Prepare the level's scratchpad visibility and math-camera VU registers, then submit debug +geometry from its drawable trees.") + (collect-ambients :override-doc + "Forward an ambient-sphere query to every drawable tree and append matches to result. length +is passed through for child implementations that use it.") + (birth + "Allocate or validate the level's entity and ambient tables, add actors in birth-order, + initialize ambient payloads, and connect every camera. Actor process creation is deferred + across later frames." + (_type_) none) ;; 18 + (deactivate-entities + "Kill and unlink this BSP's actors and cameras, then deactivate any remaining entity, + particle, or drawable process that still references the level heap being released." + (_type_) none) ;; 19 ) ) @@ -13345,8 +15059,17 @@ ;; - Functions -(define-extern map-bsp-tree (function (function bsp-node none) bsp-header bsp-node none)) -(define-extern inspect-bsp-tree (function bsp-header bsp-node none)) +(define-extern map-bsp-tree + "Walk the BSP below node. Positive child values are pointers to another node; for each + nonpositive child, call visit on the node that owns that terminal side. A node with two + terminal children is therefore visited twice." + (function (function bsp-node none) bsp-header bsp-node none) + ) +(define-extern inspect-bsp-tree + "Recursively print the BSP below node, indenting each level. Positive child values are followed + as node pointers; nonpositive children print a terminal divider." + (function bsp-header bsp-node none) + ) ;; ---------------------- @@ -13358,12 +15081,15 @@ ;; - Types (deftype collide-using-spheres-params (structure) + "Inputs for a collision query against up to 64 spheres. The cache is filled for their combined + bounds, excluding proc and ignore-pat, then the spheres are tested against matching cached + primitives; solid-only restricts the test to solid primitives." ((spheres (inline-array sphere) :offset-assert 0) (num-spheres uint32 :offset-assert 4) (collide-with collide-kind :offset-assert 8) (proc process-drawable :offset-assert 16) - (ignore-pat pat-surface :offset-assert 20) ;; flags / bitfield i bet - (solid-only basic :offset-assert 24) ;; probably a symbol + (ignore-pat pat-surface :offset-assert 20) + (solid-only symbol :offset-assert 24) ) :method-count-assert 9 :size-assert #x1c @@ -13371,6 +15097,7 @@ ) (deftype collide-puss-sphere (structure) + "One query sphere and its integer-coordinate bounding box in the sphere-probe scratchpad work." ((bsphere sphere :inline :offset-assert 0) (bbox4w bounding-box4w :inline :offset-assert 16) ) @@ -13380,6 +15107,7 @@ ) (deftype collide-puss-work (structure) + "Scratchpad work for testing the cached primitives against as many as 64 query spheres." ((closest-pt vector :inline :offset-assert 0) (tri-normal vector :inline :offset-assert 16) (tri-bbox4w bounding-box4w :inline :offset-assert 32) @@ -13390,12 +15118,23 @@ :size-assert #xc60 :flag-assert #xb00000c60 (:methods - (collide-puss-work-method-9 (_type_ object object) symbol) ;; 9 - (collide-puss-work-method-10 (_type_ object object) symbol) ;; 10 + (check-mesh-prim-against-spheres + "Return true when any query sphere overlaps a triangle in mesh-prim, recording the closest + point and triangle normal in this work area." + (_type_ collide-cache-prim collide-using-spheres-params) + symbol + ) ;; 9 + (check-sphere-prim-against-spheres + "Return true when any query sphere overlaps sphere-prim." + (_type_ collide-cache-prim collide-using-spheres-params) + symbol + ) ;; 10 ) ) (deftype collide-puyp-work (structure) + "Working state for a downward Y probe. best-u tracks the nearest hit along move-dist and tri-out + receives its surface, point, normal, and representative vertices." ((best-u float :offset-assert 0) (ignore-pat pat-surface :offset-assert 4) (tri-out collide-tri-result :offset-assert 8) @@ -13408,6 +15147,8 @@ ) (deftype collide-cache-tri (structure) + "One world-space triangle in the collision cache. Its final quadword overlays the surface + properties, owning primitive index, and query-specific user values." ((vertex vector 3 :inline :offset-assert 0) ;(extra-quad UNKNOWN 16 :offset-assert 48) (extra-quad uint128 :offset 48) @@ -13422,6 +15163,8 @@ ) (deftype collide-cache-prim (structure) + "One cached collision primitive. It keeps the common primitive core inline and either references + a sphere primitive or a contiguous range of cached triangles." ((prim-core collide-prim-core :inline :offset-assert 0) (extra-quad uint128 :offset-assert 32) (ccache collide-cache :offset 32) @@ -13439,12 +15182,23 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (resolve-moving-sphere-tri (_type_ collide-tri-result collide-prim-core vector float collide-action) float) ;; 9 - (resolve-moving-sphere-sphere (_type_ collide-tri-result collide-prim-core vector float collide-action) float) ;; 10 + (resolve-moving-sphere-tri + "Sweep moving-sphere along move against this cached primitive's triangles which have one of + the required actions. Update result for the nearest hit preceding best-u and return its + fraction, or return -1 when no earlier compatible triangle is hit." + (_type_ collide-tri-result collide-prim-core vector float collide-action) float) ;; 9 + (resolve-moving-sphere-sphere + "Sweep moving-sphere along move against this cached sphere primitive when it has one of the + required actions. Update result for a hit preceding best-u and return its fraction, or + return -1 when no earlier compatible hit is found." + (_type_ collide-tri-result collide-prim-core vector float collide-action) float) ;; 10 ) ) (deftype collide-cache (basic) + "Temporary geometry for collision queries that may hit background fragments, dynamic foreground + shapes, or water. Fill methods collect broad-phase candidates into world-space primitives and + triangles; probe methods then perform line-sphere, vertical, or multi-sphere tests." ((num-tris int32 :offset-assert 4) ;;(num-tris-u uint32 :offset 4) ;; added (num-prims int32 :offset-assert 8) @@ -13461,34 +15215,113 @@ :size-assert #x8670 :flag-assert #x2100008670 (:methods - (debug-draw (_type_) none) ;; 9 - (fill-and-probe-using-line-sphere (_type_ vector vector float collide-kind process collide-tri-result pat-surface) float) ;; 10 - (fill-and-probe-using-spheres (_type_ collide-using-spheres-params) symbol) ;; 11 - (fill-and-probe-using-y-probe (_type_ vector float collide-kind process-drawable collide-tri-result pat-surface) float) ;; 12 - (fill-using-bounding-box (_type_ bounding-box collide-kind process-drawable pat-surface) none) ;; 13 - (fill-using-line-sphere (_type_ vector vector float collide-kind process-drawable pat-surface) none) ;; 14 - (fill-using-spheres (_type_ collide-using-spheres-params) none) ;; 15 - (fill-using-y-probe (_type_ vector float collide-kind process-drawable pat-surface) none) ;; 16 - (initialize (_type_) none) ;; 17 - (probe-using-line-sphere (_type_ vector vector float collide-kind collide-tri-result pat-surface) float) ;; 18 - (probe-using-spheres (_type_ collide-using-spheres-params) symbol) ;; 19 - (probe-using-y-probe (_type_ vector float collide-kind collide-tri-result pat-surface) float) ;; 20 - (fill-from-background (_type_ (function bsp-header int collide-list none) (function collide-cache object none)) none) ;; 21 ;; second functiom is method 28 - (fill-from-foreground-using-box (_type_) none) ;; 22 - (fill-from-foreground-using-line-sphere (_type_) none) ;; 23 - (fill-from-foreground-using-y-probe (_type_) none) ;; 24 - (fill-from-water (_type_ water-control) none) ;; 25 ;; or whatever is from 152 in the process passed to 16 - (load-mesh-from-spad-in-box (_type_ collide-frag-mesh) none) ;; 26 - (collide-cache-method-27 (_type_) none) ;; 27 - (collide-cache-method-28 (_type_) none) ;; 28 - (collide-cache-method-29 (_type_ collide-frag-mesh) none) ;; 29 + (debug-draw + "Draw the cached triangles with their surface colors and the cached foreground spheres." + (_type_) none) ;; 9 + (fill-and-probe-using-line-sphere + "Refill the cache for a sphere of radius moving from start by move, then find the nearest + compatible solid hit. Skip proc's own primitives and surfaces matching ignore-pat; write a + hit to result and return its movement fraction, or -100000000.0 when nothing is hit." + (_type_ vector vector float collide-kind process collide-tri-result pat-surface) float) ;; 10 + (fill-and-probe-using-spheres + "Refill the cache around params' sphere set, then return whether any compatible cached + primitive overlaps one of the spheres." + (_type_ collide-using-spheres-params) symbol) ;; 11 + (fill-and-probe-using-y-probe + "Refill the cache around the vertical probe centered at start, then cast downward by + probe-length. Skip proc's own primitives and surfaces matching ignore-pat; write the nearest + compatible solid hit to result and return its fraction, or -100000000.0 when nothing is hit." + (_type_ vector float collide-kind process-drawable collide-tri-result pat-surface) float) ;; 12 + (fill-using-bounding-box + "Refill the cache with background, water, and foreground geometry of the requested kinds + which overlaps box. Skip proc's own foreground primitives and surfaces matching ignore-pat." + (_type_ bounding-box collide-kind process-drawable pat-surface) none) ;; 13 + (fill-using-line-sphere + "Refill the cache for a sphere of radius moving from start by move. Fall back to an ordinary + bounding box when every movement component is at most one meter; otherwise construct an + oriented sweep box and its inverse transform for broad-phase rejection. Skip proc's own + foreground primitives and surfaces matching ignore-pat." + (_type_ vector vector float collide-kind process-drawable pat-surface) none) ;; 14 + (fill-using-spheres + "Refill the cache from the bounding box enclosing params' sphere set." + (_type_ collide-using-spheres-params) none) ;; 15 + (fill-using-y-probe + "Refill the cache for a vertical probe centered at start and extending probe-length in both + Y directions for broad-phase collection. Skip proc's own foreground primitives and surfaces + matching ignore-pat." + (_type_ vector float collide-kind process-drawable pat-surface) none) ;; 16 + (initialize "Empty this cache and clear its querying process." (_type_) none) ;; 17 + (probe-using-line-sphere + "Sweep a sphere of radius from start by move against compatible solid cached primitives. + Ignore matching surfaces, write the nearest hit to result, and return its movement fraction, + or -100000000.0 when nothing is hit." + (_type_ vector vector float collide-kind collide-tri-result pat-surface) float) ;; 18 + (probe-using-spheres + "Return true on the first cached primitive which overlaps one of params' spheres and satisfies + its collision-kind and optional solid-only filters. Reject sets larger than 64 spheres." + (_type_ collide-using-spheres-params) symbol) ;; 19 + (probe-using-y-probe + "Cast downward from start by probe-length against compatible solid cached primitives. Ignore + matching surfaces, write the nearest hit to result, and return its fraction, or + -100000000.0 when nothing is hit." + (_type_ vector float collide-kind collide-tri-result pat-surface) float) ;; 20 + (fill-from-background + "Collect background fragments with find-mesh, unpack their packed vertices, and pass each + scratchpad mesh to import-mesh. The cache must be empty on entry; all accepted triangles are + represented by the background primitive in slot zero." + (_type_ + (function bsp-header int collide-list none) + (function collide-cache collide-frag-mesh none)) + none) ;; 21 ;; second functiom is method 28 + (fill-from-foreground-using-box + "Walk the requested foreground connection lists and add compatible primitives whose world + bounds overlap the active box query, excluding the querying process." + (_type_) none) ;; 22 + (fill-from-foreground-using-line-sphere + "Walk the requested foreground connection lists and add compatible primitives whose world + bounds overlap the active oriented swept-sphere box, excluding the querying process." + (_type_) none) ;; 23 + (fill-from-foreground-using-y-probe + "Walk the requested foreground connection lists and add compatible primitives whose world + bounds overlap the active vertical probe, excluding the querying process." + (_type_) none) ;; 24 + (fill-from-water + "When active water collision is enabled and capacity remains, append two waterbottom + triangles covering the active query box in XZ, plus one cached water primitive which owns + them. Racers use 0.2 meters below the surface, swim-ground uses the surface minus swim-height, + and other water uses base-height minus bottom-height; jump-out water is ignored." + (_type_ water-control) none) ;; 25 ;; or whatever is from 152 in the process passed to 16 + (load-mesh-from-spad-in-box + "Import scratchpad triangles which overlap the active integer box and do not match the + ignored surface mask, stopping at the cache's triangle capacity." + (_type_ collide-frag-mesh) none) ;; 26 + (load-mesh-from-spad-in-line-sphere + "Transform the scratchpad vertices into the swept-sphere box frame, then import triangles + which overlap that integer box and do not match the ignored surface mask." + (_type_ collide-frag-mesh) none) ;; 27 + (load-mesh-from-spad-in-y-probe + "Import scratchpad triangles which overlap the active vertical probe and do not match the + ignored surface mask, stopping at the cache's triangle capacity." + (_type_ collide-frag-mesh) none) ;; 28 + (transform-collide-mesh-in-spad + "Transform the unpacked vertices in the low scratchpad region through the swept-query inverse + matrix, convert them to integer coordinates, and write them to the secondary scratchpad + region used for oriented-box rejection." + (_type_ collide-frag-mesh) none) ;; 29 (puyp-mesh (_type_ collide-puyp-work collide-cache-prim) none) ;; 30 - (puyp-sphere (_type_ collide-puyp-work collide-cache-prim) vector) ;; 31 - (unpack-background-collide-mesh (_type_ object object object) none) ;; 32 ;; helper for fill from background. + (puyp-sphere + "Intersect the downward probe in work with prim's sphere. When the hit precedes work.best-u, + update the result point, outward normal, surface, and representative tangent triangle." + (_type_ collide-puyp-work collide-cache-prim) vector) ;; 31 + (unpack-background-collide-mesh + "Unpack one background fragment's VU0 vertex output into scratchpad triangles, applying the + TIE instance transform when present." + (_type_ collide-frag-mesh basic int) none) ;; 32 ;; helper for fill from background. ) ) (deftype collide-list-item (structure) + "One background broad-phase result: a packed collision fragment and its optional TIE instance." ((mesh collide-frag-mesh :offset-assert 0) (inst basic :offset-assert 4) ) @@ -13498,6 +15331,7 @@ ) (deftype collide-list (structure) + "Fixed-capacity list of background collision fragments selected by a broad-phase traversal." ((num-items int32 :offset-assert 0) (items collide-list-item 256 :inline :offset-assert 16) ) @@ -13507,6 +15341,8 @@ ) (deftype collide-work (structure) + "Shared broad-phase work for the current cache fill: an enclosing sphere, integer bounding box, + and inverse transform for a rotated line-sphere volume." ((collide-sphere-neg-r sphere :inline :offset-assert 0) (collide-box4w bounding-box4w :inline :offset-assert 16) (inv-mat matrix :inline :offset-assert 48) @@ -13549,6 +15385,10 @@ :method-count-assert 18 :size-assert #x70 :flag-assert #x1200000070 + (:methods + (login :override-doc "Log in the billboard's single flat adgif shader.") + (mem-usage :override-doc "Account for this billboard's inline storage.") + ) ) (deftype shrub-view-data (structure) @@ -13572,12 +15412,15 @@ ) (deftype shrubbery (drawable) + "Packed shrub geometry and its static DMA streams. header[0] is the number of two-texture shader + pairs, header[1] is the triangle-strip count, and header[2] is the display-vertex count; the + triangle count is therefore header[2] - 2 * header[1]." ((textures (inline-array adgif-shader) :offset 4) ;; header breakdown: - ;; [0] - number of textures / 2 - ;; [1] - number of vertices - ;; [2] - number of triangle strips - ;; [3] - ?? + ;; [0] - number of two-texture shader pairs + ;; [1] - number of triangle strips + ;; [2] - number of display vertices + ;; [3] - obj/vtx/col/stq qwc bytes ;; ;; Number of Triangles in the Shrub = header[2] - 2 * header[1] (header qword :offset 8) @@ -13594,6 +15437,13 @@ :method-count-assert 18 :size-assert #x20 :flag-assert #x1200000020 + (:methods + (login :override-doc + "Log in both adgif shaders for every shader pair, then finish the PC texture setup.") + (mem-usage :override-doc + "Account separately for the shrub header and its object, vertex, color, and +texture-coordinate streams.") + ) ) (deftype instance-shrubbery (instance) @@ -13623,6 +15473,20 @@ :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (mem-usage :override-doc + "Account for the tree header, optional time-of-day palette, recursive draw-node hierarchy, +and prototype array.") + (login :override-doc "Log in the tree's prototype array when it is present.") + (draw :override-doc + "Queue this shrub tree and its owning level for the background pass; root and frame are +provided by the drawable interface but are not needed.") + (unpack-vis :override-doc + "Shrub trees do not use packed visibility IDs; leave destination unchanged and return it.") + (collect-stats :override-doc + "Accumulate enabled near-shrub, opaque-shrub, translucent-shrub, and billboard counts, +including fragment, instance, triangle, and displayed-vertex totals.") + ) ) (deftype generic-shrub-fragment (drawable) @@ -13642,6 +15506,13 @@ :method-count-assert 18 :size-assert #x20 :flag-assert #x1200000020 + (:methods + (login :override-doc + "Log in each five-quadword adgif shader record in this generic shrub fragment.") + (mem-usage :override-doc + "Account separately for this fragment header and its referenced control, vertex, color, and +texture-coordinate streams.") + ) ) (deftype prototype-shrubbery (drawable-inline-array) @@ -13651,6 +15522,13 @@ :method-count-assert 18 :size-assert #x44 :flag-assert #x1200000044 + (:methods + (mem-usage :override-doc + "Account for the prototype-array header and each inline shrubbery fragment.") + (login :override-doc "Log in every inline shrubbery fragment.") + (asize-of :override-doc + "Return the prototype-shrubbery header size plus storage for its active inline fragments.") + ) ) (deftype prototype-trans-shrubbery (prototype-shrubbery) @@ -13665,6 +15543,9 @@ :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (login :override-doc "Log in every generic shrub fragment in the group.") + ) ) (deftype shrubbery-matrix (structure) @@ -13775,7 +15656,12 @@ ;; - Functions -(define-extern shrubbery-login-post-texture (function shrubbery none)) +(define-extern shrubbery-login-post-texture + "Repack the logged-in adgif shaders into the shrub's VU1-facing DMA data. Each shader pair keeps + two texture-register qwords but shares one four-qword state block; the first state qword updates + only its three register words and preserves the packet word already in the destination." + (function shrubbery none) + ) ;; - Symbols @@ -13810,6 +15696,14 @@ :method-count-assert 18 :size-assert #x40 :flag-assert #x1200000040 + (:methods + (login :override-doc + "Log in each five-quadword adgif shader referenced by this fragment.") + (mem-usage :override-doc + "Account for this prototype's header and referenced shader, point, draw-point, generic, and +debug data. With the instance-color flag, account only for one instance's packed color table in +the geometry-selected color category.") + ) ) (deftype instance-tie (instance) @@ -13821,6 +15715,17 @@ :method-count-assert 18 :size-assert #x40 :flag-assert #x1200000040 + (:methods + (mem-usage :override-doc + "Account for this instance and, when it owns color overrides, ask each available geometry +prototype to account for the corresponding packed instance-color table.") + (collide-with-box :override-doc + "Append every collision fragment of each enabled TIE instance in this contiguous range whose + transformed bounds intersect the active box query.") + (collide-y-probe :override-doc + "Append every collision fragment of each enabled TIE instance in this contiguous range whose + transformed bounds intersect the active vertical probe.") + ) ) (deftype drawable-inline-array-instance-tie (drawable-inline-array) @@ -13830,6 +15735,24 @@ :method-count-assert 18 :size-assert #x64 :flag-assert #x1200000064 + (:methods + (asize-of :override-doc + "Return the array header size plus storage for its active inline TIE instances.") + (collide-with-box :override-doc + "Append collision geometry from every instance in this nonempty inline array that intersects +the active collision box. The count argument is part of the drawable collision ABI and is unused +here.") + (collide-y-probe :override-doc + "Append collision geometry from every instance in this nonempty inline array that intersects +the active vertical probe. The count argument is part of the drawable collision ABI and is unused +here.") + (collide-ray :override-doc + "Append collision geometry from every instance in this nonempty inline array that intersects +the active swept-sphere ray. The count argument is part of the drawable collision ABI and is +unused here.") + (mem-usage :override-doc + "Account for the inline-array header and every active TIE instance.") + ) ) (deftype drawable-tree-instance-tie (drawable-tree) @@ -13838,6 +15761,29 @@ :method-count-assert 18 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (login :override-doc + "Log in every child drawable in this TIE instance tree.") + (draw :override-doc + "Queue this TIE tree and its owning level for background drawing in the current frame.") + (collect-stats :override-doc + "Accumulate the enabled Generic, ordinary TIE, and near-TIE prototype, fragment, instance, +triangle, and display-vertex counts produced by the most recent draw.") + (debug-draw :override-doc + "Submit debug geometry for the first geometry variant of every TIE prototype.") + (collide-with-box :override-doc + "Append collision geometry from every child of this nonempty tree that intersects the active +collision box. The count argument is part of the drawable collision ABI and is unused here.") + (collide-y-probe :override-doc + "Append collision geometry from every child of this nonempty tree that intersects the active +vertical probe. The count argument is part of the drawable collision ABI and is unused here.") + (collide-ray :override-doc + "Append collision geometry from every child of this nonempty tree that intersects the active +swept-sphere ray. The count argument is part of the drawable collision ABI and is unused here.") + (mem-usage :override-doc + "Account for the tree header, its child drawables, and its prototype array. The prototype +pass is marked so fragments are not charged as independent allocations a second time.") + ) ) (deftype prototype-tie (drawable-inline-array) @@ -13847,6 +15793,13 @@ :method-count-assert 18 :size-assert #x64 :flag-assert #x1200000064 + (:methods + (login :override-doc "Log in every inline TIE fragment.") + (mem-usage :override-doc + "Account for the prototype-array header and every inline TIE fragment.") + (asize-of :override-doc + "Return the prototype-array header size plus storage for its active inline fragments.") + ) ) (deftype tie-matrix (structure) @@ -13859,6 +15812,12 @@ :flag-assert #x900000060 ) +(defenum instance-tie-work-flag + :type uint32 + :bitfield #t + (has-generic 1) + ) + (deftype instance-tie-work (structure) ((wind-const vector :inline :offset-assert 0) (hmge-d vector :inline :offset-assert 16) @@ -13890,7 +15849,7 @@ (first-generic-prototype uint32 :offset-assert 420) (refl-fade-fac float :offset-assert 424) (refl-fade-end float :offset-assert 428) - (flags uint32 :offset-assert 432) + (flags instance-tie-work-flag :offset-assert 432) (paused basic :offset-assert 436) (wait-from-spr uint32 :offset-assert 440) (wait-to-spr uint32 :offset-assert 444) @@ -13905,7 +15864,7 @@ (bankb instance-tie 32 :inline :offset-assert 2048) (outa uint128 256 :offset-assert 4096) (outb uint128 256 :offset-assert 8192) - ;; this is outside the type???? + ;; Dynamic scratchpad work begins immediately after the fixed double-buffered bank area. (work instance-tie-work :dynamic :offset-assert 12288) ) :method-count-assert 9 @@ -14031,6 +15990,19 @@ :method-count-assert 18 :size-assert #x40 :flag-assert #x1200000040 + (:methods + (login :override-doc + "Log in every inline adgif shader used by this terrain fragment.") + (mem-usage :override-doc + "Account for the fragment header, overlapping base/common/LOD DMA streams, colors, and debug +data. With the color-only flag, record only the packed per-LOD colors; the separate-prototype-data +flag excludes those colors from the ordinary total.") + (collect-stats :override-doc + "Classify this fragment against the camera and add the selected detail stream's counts to the +active terrain statistics.") + (debug-draw :override-doc + "Draw this fragment's saved edge-debug geometry.") + ) ) (deftype drawable-inline-array-tfrag (drawable-inline-array) @@ -14039,15 +16011,31 @@ :method-count-assert 18 :size-assert #x64 :flag-assert #x1200000064 + (:methods + (login :override-doc "Log in every inline terrain fragment.") + (mem-usage :override-doc + "Account for the inline-array header and delegate to every terrain fragment.") + (asize-of :override-doc + "Return the nominal inline-array size, which includes its first terrain fragment, plus 64 +bytes for each additional active fragment.") + (collect-stats :override-doc + "Accumulate statistics for the visible fragments in this inline array.") + (debug-draw :override-doc + "Draw debug geometry for every visible fragment in this inline array.") + ) ) (deftype drawable-inline-array-trans-tfrag (drawable-inline-array-tfrag) - ;; I think this is a bug. + ;; The translucent layout adds a second inline tfragment slot at offset 112. ((data2 tfragment 1 :inline :offset-assert 112) (pad2 uint32)) :method-count-assert #x12 :size-assert #xb4 :flag-assert #x12000000b4 + (:methods + (collect-stats :override-doc + "Accumulate statistics for the visible translucent fragments in this inline array.") + ) ) (deftype drawable-tree-tfrag (drawable-tree) @@ -14057,6 +16045,16 @@ :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (mem-usage :override-doc + "Account for the tree header, optional time-of-day palette, and every inline fragment array.") + (draw :override-doc + "Queue this terrain tree and its owning level for the background renderer.") + (collect-stats :override-doc + "Configure normal-terrain statistics and traverse every array in this tree.") + (debug-draw :override-doc + "Draw debug geometry for every array in this tree while terrain rendering is enabled.") + ) ) (deftype drawable-tree-trans-tfrag (drawable-tree-tfrag) @@ -14064,6 +16062,12 @@ :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (draw :override-doc + "Queue this translucent terrain tree and its owning level for the background renderer.") + (collect-stats :override-doc + "Configure translucent-terrain statistics and traverse every array in this tree.") + ) ) (deftype drawable-tree-dirt-tfrag (drawable-tree-tfrag) @@ -14071,6 +16075,12 @@ :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (draw :override-doc + "Queue this dirt terrain tree and its owning level for the background renderer.") + (collect-stats :override-doc + "Configure translucent-terrain statistics and traverse every dirt array in this tree.") + ) ) (deftype drawable-tree-ice-tfrag (drawable-tree-tfrag) @@ -14078,6 +16088,12 @@ :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (draw :override-doc + "Queue this ice terrain tree and its owning level for the background renderer.") + (collect-stats :override-doc + "Configure translucent-terrain statistics and traverse every ice array in this tree.") + ) ) (deftype drawable-tree-lowres-tfrag (drawable-tree-tfrag) @@ -14085,6 +16101,12 @@ :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (draw :override-doc + "Queue this low-resolution terrain tree and its owning level for the background renderer.") + (collect-stats :override-doc + "Configure normal-terrain statistics and traverse every low-resolution array in this tree.") + ) ) (deftype drawable-tree-lowres-trans-tfrag (drawable-tree-trans-tfrag) @@ -14092,6 +16114,14 @@ :method-count-assert #x12 :size-assert #x24 :flag-assert #x1200000024 + (:methods + (draw :override-doc + "Queue this low-resolution translucent terrain tree and its owning level for the background +renderer.") + (collect-stats :override-doc + "Configure translucent-terrain statistics and traverse every low-resolution array in this +tree.") + ) ) (deftype tfrag-dists (structure) @@ -14280,14 +16310,14 @@ ;; - Types (deftype subdivide-settings (basic) - ;; guess on these being floats ((dist float 5 :offset-assert 4) (meters float 5 :offset-assert 24) (close float 4 :offset-assert 44) (far float 4 :offset-assert 60) ) (:methods - (new (symbol type meters meters) _type_) + (new "Allocate subdivision settings and initialize the first three level profiles with +close-distance and far-distance. Profile 3 is the artist-menu override." (symbol type meters meters) _type_) ) :method-count-assert 9 :size-assert #x4c @@ -14490,7 +16520,12 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (update-perm! (_type_ symbol entity-perm-status) _type_) ;; 9 + (update-perm! + "Clear permanent status for reset mode. game clears clear-mask. Other task records always + clear birth-blocked, error, and suppress-birth; non-task records clear clear-mask. A record + with respawn-on-reload also clears dead, no-kill, and suppress-birth. Clear user data unless + it was explicitly supplied by a cstage." + (_type_ symbol entity-perm-status) _type_) ;; 9 ) ) @@ -14511,7 +16546,10 @@ :size-assert #x40 :flag-assert #xa00000040 (:methods - (birth? (_type_ vector) symbol) ;; 9 + (birth? + "Return true when this entity is not birth-blocked or dead and lies within the actor birth + distance of camera-position." + (_type_ vector) symbol) ;; 9 ) ) @@ -14539,11 +16577,18 @@ :flag-assert #x1b00000034 ;; unrecognized get op: (set! t9 find-parent-method) parent was res-lump (:methods - (birth! (_type_) _type_) ;; 22 - (kill! (_type_) _type_) ;; 23 - (add-to-level! (_type_ level-group level actor-id) none) ;; 24 - (remove-from-level! (_type_ level-group) _type_) ;; 25 - (get-level (_type_) level) ;; 26 + (birth! "Default entity birth hook; subclasses create their live representation." (_type_) _type_) ;; 22 + (kill! "Default entity kill hook; subclasses remove their live representation." (_type_) _type_) ;; 23 + (add-to-level! + "Append this entity to level's entity-link array, splice the link into the level group's + circular list, copy its transform, and initialize actor ID, task, level, and visibility data." + (_type_ level-group level actor-id) none) ;; 24 + (remove-from-level! + "Unlink this entity from the level group's circular entity list and return the entity." + (_type_ level-group) _type_) ;; 25 + (get-level + "Return the active level heap containing this entity, or level-default when none contains it." + (_type_) level) ;; 26 ) ) @@ -14588,8 +16633,13 @@ :size-assert #x34 :flag-assert #x1d00000034 (:methods - (draw-debug (_type_) none) ;; 27 - (birth-ambient! (_type_) none) ;; 28 + (draw-debug + "Draw this ambient's enabled editor marker, label, type, and resource-specific annotation." + (_type_) none) ;; 27 + (birth-ambient! + "Decode this entity's resource properties into the compact ambient-data payload and select +the function that applies its ambient effect." + (_type_) none) ;; 28 ) ) @@ -14608,10 +16658,15 @@ :flag-assert #x1f00000050 ;; unrecognized get op: (set! t9 find-parent-method) parent was entity (:methods - (next-actor (_type_) entity-actor) ;; 27 - (prev-actor (_type_) entity-actor) ;; 28 - (debug-print (_type_ symbol type) none) ;; 29 - (set-or-clear-status! (_type_ entity-perm-status symbol) none) ;; 30 + (next-actor "Resolve the first next-actor reference from this actor's resource data." (_type_) entity-actor) ;; 27 + (prev-actor "Resolve the first prev-actor reference from this actor's resource data." (_type_) entity-actor) ;; 28 + (debug-print + "Print one row of the entity debug table when this actor matches expected-type. mode controls + meter positions and the optional permanent-state detail row." + (_type_ symbol type) none) ;; 29 + (set-or-clear-status! + "Set or clear status-mask in this actor's permanent status. enabled? selects the operation." + (_type_ entity-perm-status symbol) none) ;; 30 ) ) @@ -14639,7 +16694,10 @@ ;; - Functions -(define-extern entity-nav-login (function entity-actor none)) +(define-extern entity-nav-login + "Initialize actor's shared navigation mesh and route table on first use, then attach any authored + static obstacle-sphere array." + (function entity-actor none)) ;; - Symbols @@ -14657,6 +16715,11 @@ ;; - Types +(defenum sprite-matrix-mode + :type int32 + (camera 0) + (screen 1)) + (deftype sprite-vec-data-2d (structure) ((x-y-z-sx vector :inline :offset-assert 0 :score -10) (flag-rot-sy vector :inline :offset-assert 16 :score -10) @@ -14668,7 +16731,7 @@ (sy float :offset 28) (rot float :offset 24) (flag int32 :offset 16) - (matrix int32 :offset 20) + (matrix sprite-matrix-mode :offset 20) (warp-turns int32 :offset 16) (r float :offset 32) (g float :offset 36) @@ -14856,6 +16919,9 @@ (spt-anim 2) (spt-anim-speed 3) (spt-birth-func 4) + ;; Index of a joint on the tracked process's skeleton, or a reference point + ;; to launch from instead of the launch-control's origin. The launch code and + ;; part-tracker resolve the value. (spt-joint/refpoint 5) (spt-num 6) (spt-sound 7) @@ -14925,15 +16991,18 @@ (spt-end 67) ) +;; How sp-init-fields! interprets an sp-field-init-spec when initializing a +;; field. Integer and floating-point fields store +;; initial + random-mult * (rand * random-range), where rand-vu returns [0, 1). (defenum sp-flag :type uint16 - (int 0) ;; int - (float 1) ;; float - (float-int-rand 2) ;; float with int rand - (copy-from-other 3) ;; copy - (object 4) ;; label - (symbol 5) ;; symbol - (launcher 6) ;; launcher from id + (int 0) ;; integer field; the random term is truncated to an integer + (float 1) ;; floating-point field + (float-int-rand 2) ;; float with an integer-quantized random term + (copy-from-other 3) ;; copy an earlier field at the negative offset in initial-value + (object 4) ;; raw object or label pointer, such as a sound-spec or :data payload + (symbol 5) ;; store the symbol's value + (launcher 6) ;; resolve initial-value as an index in *part-id-table* ) ;; - Types @@ -14970,16 +17039,26 @@ :flag-assert #x900000010 ) +;; Controls when and how one item in a launch-group spawns. (defenum sp-group-item-flag :bitfield #t :type uint16 - (is-3d 0) - (bit1 1) - (start-dead 2) - (launch-asap 3) - (bit6 6) + (is-3d 0) ;; use the oriented 3D particle system rather than 2D billboards + ;; Periodic emitters re-arm each period rather than going dormant after one + ;; cycle. This is set by convention on most items, but only affects periodic + ;; items that do not use launch-asap. + (auto-rearm 1) + (start-dead 2) ;; begin inactive and wait for an explicit spawn + (launch-asap 3) ;; launch an immediate one-shot burst outside the period scheduler + (relaunch-each-spawn 6) ;; burst on every spawn call, even while particles remain active ) +;; One launcher in a group, with its timing and visibility parameters. Timing +;; uses 300 Hz ticks. period is the cycle length, with zero meaning continuous +;; launch; length is the active window within a cycle; and offset changes the +;; instance's phase. fade-after stops emission beyond that camera distance, +;; while falloff-to is the distance where the linearly scaled emission rate +;; reaches zero. hour-mask suppresses emission during selected in-game hours. (deftype sparticle-group-item (structure) ((launcher uint32 :offset-assert 0) (fade-after meters :offset-assert 4) @@ -14996,11 +17075,12 @@ :flag-assert #x90000001c ) +;; Per-instance state for one item in a launch-control. (defenum sp-launch-state-flags :bitfield #t :type uint16 - (launcher-active 0) ;; active - (particles-active 1) ;; wants to launch + (launcher-active 0) ;; enabled and considered by spawn + (particles-active 1) ;; a launch occurred and particles exist or are still wanted (bit2 2) ) @@ -15049,7 +17129,10 @@ :size-assert #x30 :flag-assert #xa00000030 (:methods - (create-launch-control (_type_ process) sparticle-launch-control) ;; 9 + (create-launch-control + "Allocate and initialize per-process launch state for every valid launcher in this group." + (_type_ process) + sparticle-launch-control) ;; 9 ) ) @@ -15068,16 +17151,41 @@ :size-assert #x40 :flag-assert #xe00000040 (:methods - (initialize (_type_ sparticle-launch-group process) none) ;; 9 - (is-visible? (_type_ vector) symbol) ;; 10 - (spawn (_type_ vector) object) ;; 11 - (kill-and-free-particles (_type_) none) ;; 12 - (kill-particles (_type_) none) ;; 13 + (relocate :override-doc + "Adjust the owner process and heap-local launch origins, then update the key and binding + pointers of every live particle owned by this control.") + (initialize + "Initialize this control's timing and one launch-state for every valid launcher in group." + (_type_ sparticle-launch-group process) + none) ;; 9 + (is-visible? + "Return true when the group's bounds at offset intersect the view, or when bounds or an +attached matrix prevent useful sphere culling." + (_type_ vector) + symbol) ;; 10 + (spawn + "Emit each active group item at pos according to its 300 Hz period, active window, time-of-day +mask, distance falloff, and one-shot flags. Continuous items turn elapsed ticks into a fractional +birth count; periodic items count only the portion of the elapsed interval inside their window." + (_type_ vector) + object) ;; 11 + (kill-and-free-particles + "Mark every item inactive, reset this control's timing, kill its particles, and release its +optional sprite transform." + (_type_) + none) ;; 12 + (kill-particles + "Kill particles belonging to this control without resetting item flags or releasing its +optional sprite transform." + (_type_) + none) ;; 13 ) ) -(define-extern part-group-pointer? (function pointer symbol)) +(define-extern part-group-pointer? + "Return true when ptr addresses a slot inside the particle-group registry." + (function pointer symbol)) ;; ---------------------- ;; File - sparticle-h @@ -15087,30 +17195,45 @@ ;; - Types +;; Per-particle simulation and rendering flags. Bits 0 through 14 are consumed +;; by the 2D/3D update functions and launch code; bits 16 through 20 control +;; launch and relaunch transforms. If several blend flags are present, glow +;; takes priority over subtract-blend, which takes priority over +;; blend-erase-dest. With none present, the texture's normal blend is retained. (defenum sp-cpuinfo-flag :bitfield #t :type uint32 - (bit0 0) - (bit1 1) ;; village1-part - (bit2 2) ;; cleared after an aux has its func set to add-to-sprite-aux-lst - (bit3 3) - (bit4 4) ;; see - swamp-blimp - (ready-to-launch 6) ;; maybe just just death? - (bit7 7) - (aux-list 8) ;; prevents relaunch, adds to aux - (bit9 9) - (level0 10) - (level1 11) - (bit12 12) ;; required to relaunch - (bit13 13) - (bit14 14) - (use-global-acc 16) - (launch-along-z 17) - (left-multiply-quat 18) - (right-multiply-quat 19) - (set-conerot 20) + (die-when-scale-0 0) ;; die when either scale component shrinks through zero + (die-when-color-0 1) ;; die when red, green, and blue have all reached zero + (die-when-faded 2) ;; die at zero alpha; aux-list particles clear this before hiding + (glow 3) ;; additive GS blend: (Cs - 0) * As + Cd + (subtract-blend 4) ;; subtractive GS blend: (0 - Cs) * As + Cd + (blend-erase-dest 5) ;; covered destination pixels are forced to black + ;; A newly launched particle begins at zero alpha with its intended alpha in + ;; cache-alpha. Its first simulation update restores alpha and clears this bit. + (just-launched 6) + (orbit 7) ;; orbit a center point in the 2D update + (aux-list 8) ;; use *sprite-aux-list* and prevent normal relaunch + (write-depth 9) ;; enable depth writes in the particle's ZBUF setting + (level0 10) ;; particle storage belongs to the level0 heap + (level1 11) ;; particle storage belongs to the level1 heap + (use-time-of-day-color 12) ;; multiply color and fade by the current time-of-day particle color + (run-while-paused 13) ;; keep simulating while the game is paused + (no-fog 14) ;; select the fog-disabled 2D giftag + (use-global-acc 16) ;; leave acceleration in world space + (launch-along-z 17) ;; use +z instead of +y as the launch cone axis + (left-multiply-quat 18) ;; on relaunch, q-new = parent-q * q + (right-multiply-quat 19) ;; on relaunch, q-new = q * parent-q + (set-conerot 20) ;; set cone rotation y from the additional y rotation ) +;; Live state for one particle. The cpu fields in sp-field-id map directly to +;; consecutive words beginning at omega, which sp-init-fields! fills by walking +;; a pointer through this structure. The data overlays expose the same region +;; as raw words, floats, or bytes. +;; +;; vel and accel alias the xyz lanes of the integration vectors. scalevelx and +;; scalevely occupy the otherwise unused w lanes of vel-sxvel and rot-syvel. (deftype sparticle-cpuinfo (structure) ((sprite sprite-vec-data-2d :offset-assert 0) (adgif adgif-shader :offset-assert 4) @@ -15150,6 +17273,10 @@ ;; field key is a basic loaded with a signed load ) +;; Temporary launch transform assembled from the launch fields. launchrot and +;; conerot carry Euler angles until sp-euler-convert produces the particle +;; quaternion; coneradius adds a radial component around the cone axis, and +;; rotate-y applies an additional rotation to the launch direction. (deftype sparticle-launchinfo (structure) ((launchrot vector :inline :offset-assert 0) (conerot vector :inline :offset-assert 16) @@ -15162,6 +17289,15 @@ :flag-assert #x900000028 ) +;; A particle pool. There are separate 2D billboard and oriented-3D systems. +;; Each divides its storage into two groups of 64-particle blocks; group 1 in +;; the 2D system is reserved for screen-space and HUD particles. Each +;; alloc-table word is a block bitmap whose set bits are free slots. +;; +;; cpuinfo-table, vecdata-table, and adgifdata-table are parallel arrays indexed +;; by block * 64 + bit. They hold the simulation state, renderer vectors, and GS +;; shader state respectively, and each cpuinfo caches its matching sprite and +;; adgif pointers. (deftype sparticle-system (basic) ((blocks int32 2 :offset-assert 4) (length int32 2 :offset-assert 12) @@ -15177,7 +17313,12 @@ :size-assert #x34 :flag-assert #x900000034 (:methods - (new (symbol type int int symbol pointer (inline-array adgif-shader)) _type_) ;; 0 + (new + "Allocate a particle pool with two groups rounded up to 64-slot blocks. sprite-memory and +adgif-memory provide parallel rendering storage for every rounded slot; each CPU entry is linked to +its matching records and each allocation bitmap begins with every slot free." + (symbol type int int symbol pointer (inline-array adgif-shader)) + _type_) ;; 0 ) ) @@ -15204,36 +17345,54 @@ :size-assert #x10 :flag-assert #x1a00000010 (:methods - (new (symbol type process) _type_) ;; 0 - (get-matching-actor-type-mask (_type_ type) int) ;; 9 - (actor-count-before (_type_) int) ;; 10 - (link-to-next-and-prev-actor (_type_) entity-actor) ;; 11 - (get-next (_type_) entity-actor) ;; 12 - (get-prev (_type_) entity-actor) ;; 13 - (get-next-process (_type_) process) ;; 14 - (get-prev-process (_type_) process) ;; 15 - (apply-function-forward (_type_ (function entity-actor object object) object) int) ;; 16 - (apply-function-reverse (_type_ (function entity-actor object object) object) int) ;; 17 - (apply-all (_type_ (function entity-actor object object) object) int) ;; 18 - (send-to-all (_type_ symbol) none) ;; 19 - (send-to-all-after (_type_ symbol) object) ;; 20 - (send-to-all-before (_type_ symbol) object) ;; 21 - (send-to-next-and-prev (_type_ symbol) none) ;; 22 - (send-to-next (_type_ symbol) none) ;; 23 - (send-to-prev (_type_ symbol) none) ;; 24 - (actor-count (_type_) int) ;; 25 + (new "Create links for proc from the first next-actor and prev-actor references on its entity." (symbol type process) _type_) ;; 0 + (relocate :override-doc + "Adjust the owning process pointer after its process heap moves.") + (get-matching-actor-type-mask "Return a mask whose nth bit is set when the + nth actor in the complete linked list has matching-type." (_type_ type) int) ;; 9 + (actor-count-before "Count the actors preceding this actor in the complete linked list." (_type_) int) ;; 10 + (link-to-next-and-prev-actor "Refresh the cached neighbors from the process entity's resource data and return the next actor." (_type_) entity-actor) ;; 11 + (get-next "Return the cached next actor." (_type_) entity-actor) ;; 12 + (get-prev "Return the cached previous actor." (_type_) entity-actor) ;; 13 + (get-next-process "Return the live process attached to the next actor, or false if either is absent." (_type_) process) ;; 14 + (get-prev-process "Return the live process attached to the previous actor, or false if either is absent." (_type_) process) ;; 15 + (apply-function-forward "Call callback on actors after this one in forward + order. Stop and return false when it returns true; return 0 after visiting + the remainder." (_type_ (function entity-actor object object) object) int) ;; 16 + (apply-function-reverse "Call callback on actors before this one in reverse + order. Stop and return false when it returns true; return 0 after visiting + the remainder." (_type_ (function entity-actor object object) object) int) ;; 17 + (apply-all "Walk from the first actor through the complete list, including + this actor. Stop and return false when callback returns true; return 0 + after visiting all actors." (_type_ (function entity-actor object object) object) int) ;; 18 + (send-to-all "Send a parameterless message to the processes of every actor before and after this one." (_type_ symbol) none) ;; 19 + (send-to-all-after "Send a parameterless message to each live process after + this actor and return the most recent truthy event result." (_type_ symbol) object) ;; 20 + (send-to-all-before "Send a parameterless message to each live process + before this actor and return the most recent truthy event result." (_type_ symbol) object) ;; 21 + (send-to-next-and-prev "Send a parameterless message to the next and previous actors' live processes." (_type_ symbol) none) ;; 22 + (send-to-next "Send a parameterless message to the next actor's live process when present." (_type_ symbol) none) ;; 23 + (send-to-prev "Send a parameterless message to the previous actor's live process when present." (_type_ symbol) none) ;; 24 + (actor-count "Count all actors in the complete linked list, including this actor." (_type_) int) ;; 25 ) ) ;; - Functions -(define-extern entity-actor-count (function res-lump symbol int)) -(define-extern entity-actor-lookup (function res-lump symbol int entity-actor)) ;; NOTE - return value is not confirmed -(define-extern entity-by-name (function string entity)) -(define-extern entity-by-aid (function uint entity)) -(define-extern actor-link-subtask-complete-hook (function entity-actor (pointer symbol) symbol)) -(define-extern actor-link-dead-hook (function entity-actor (pointer symbol) symbol)) -(define-extern alt-actor-list-subtask-incomplete-count (function process-drawable int)) +(define-extern entity-actor-count "Return the number of actor references in the named resource entry, or zero when it is absent." (function res-lump symbol int)) +(define-extern entity-actor-lookup "Resolve actor reference idx from a named + resource entry. String entries use entity-by-name and integer entries use + entity-by-aid; return false when the entry or index is absent." (function res-lump symbol int entity-actor)) ;; NOTE - return value is not confirmed +(define-extern entity-by-name + "Return the first actor, ambient, or camera with name across active levels, or false." + (function string entity)) +(define-extern entity-by-aid + "Binary-search active levels' actor-ID-sorted entity-link arrays and return the matching entity, + or false." + (function uint entity)) +(define-extern actor-link-subtask-complete-hook "Set result to whether actor is complete and return false to stop traversal when it is." (function entity-actor (pointer symbol) symbol)) +(define-extern actor-link-dead-hook "Set result to whether actor is dead and return false to stop traversal when it is." (function entity-actor (pointer symbol) symbol)) +(define-extern alt-actor-list-subtask-incomplete-count "Count missing or incomplete actors referenced by proc's alt-actor resource entry." (function process-drawable int)) ;; ---------------------- @@ -15283,6 +17442,8 @@ ;; - Types +;; Shared gameplay-camera tuning used for collision movement, input response, +;; attack timing, the default third-person distance envelope, and view tilt. (deftype camera-bank (basic) ((collide-move-rad float :offset-assert 4) (joypad uint32 :offset-assert 8) @@ -15300,6 +17461,9 @@ :flag-assert #x900000030 ) +;; Two endpoints and a parameterization mode. Camera entities use this to map a +;; world point to a normalized position along a linear, radial, or spherical +;; interval. (deftype cam-index (structure) ((flags cam-index-options :offset-assert 0) (vec vector 2 :inline :offset 16) @@ -15308,11 +17472,17 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (cam-index-method-9 (_type_ symbol entity vector curve) symbol) ;; 9 - (cam-index-method-10 (_type_ vector) float) ;; 10 ; inlined vector-dot issue? + (setup-from-entity! "Read the two endpoint vectors from entity data or + fallback-curve and prepare their spherical, radial, or linear + parameterization." (_type_ symbol entity vector curve) symbol) ;; 9 + (point->parameter "Project a world point onto this index and return its + normalized position." (_type_ vector) float) ;; 10 ; inlined vector-dot issue? ) ) +;; One node in a camera tracking trail. direction and tp-length describe the +;; segment to next; incarnation changes whenever a fixed-pool slot is reused so +;; saved cursors can detect stale indices. (deftype tracking-point (structure) ((position vector :inline :offset-assert 0) (direction vector :inline :offset-assert 16) @@ -15334,6 +17504,9 @@ :flag-assert #x900000008 ) +;; A fixed pool of 32 tracking points shared by an intrusive used list and free +;; list. The used chain records a moving breadcrumb trail; sampling and pruning +;; let the camera follow its arc rather than cut directly across corners. (deftype tracking-spline (structure) ((point tracking-point 32 :inline :offset-assert 0) (summed-len float :offset-assert 1536) @@ -15354,24 +17527,46 @@ :size-assert #x664 :flag-assert #x1800000664 (:methods - (tracking-spline-method-9 (_type_) none) ;; 9 - (tracking-spline-method-10 (_type_ vector) none) ;; 10 - (print-nth-point (_type_ int) none) ;; 11 - (tracking-spline-method-12 (_type_) none) ;; 12 - (tracking-spline-method-13 (_type_ int) none) ;; 13 - (tracking-spline-method-14 (_type_ tracking-spline-sampler) none) ;; 14 - (tracking-spline-method-15 (_type_) none) ;; 15 - (tracking-spline-method-16 (_type_ float) none) ;; 16 - (tracking-spline-method-17 (_type_ vector float float symbol) int) ;; 17 ; - return value is actually none but they do a manual `return` - (tracking-spline-method-18 (_type_ float vector tracking-spline-sampler) vector) ;; 18 - (tracking-spline-method-19 (_type_ float vector tracking-spline-sampler) vector) ;; 19 - (tracking-spline-method-20 (_type_ vector int) none) ;; 20 - (tracking-spline-method-21 (_type_ vector float float) vector) ;; 21 - (tracking-spline-method-22 (_type_ float) none) ;; 22 - (tracking-spline-method-23 (_type_) none) ;; 23 + (validate! "Recount the used and free chains and correct their counters if + they disagree with the lists." (_type_) none) ;; 9 + (reset! "Reset the trail to start-pos and rebuild the free chain over the + remaining slots." (_type_ vector) none) ;; 10 + (print-nth-point "Print one breadcrumb with markers for the used head, + next-to-last point, and end point." (_type_ int) none) ;; 11 + (print-all-points "Print every breadcrumb in the used chain, followed by + the chain terminator." (_type_) none) ;; 12 + (delete-point! "Remove the point after pt, return its slot to the free + chain, and reconnect the surrounding segment." (_type_ int) none) ;; 13 + (advance-used-point! "Advance the used-chain head to sampler, freeing the + points passed and updating the trail length." (_type_ tracking-spline-sampler) none) ;; 14 + (prune-most-collinear! "Free the interior point whose removal changes the + trail direction least." (_type_) none) ;; 15 + (prune-shallow-points! "Remove interior points whose length-weighted bend + is below budget." (_type_ float) none) ;; 16 + (add-point! "Append new-pos when it is at least min-dist from the tail, + optionally pruning the trail to obtain a free slot." (_type_ vector float float symbol) int) ;; 17 ; - return value is actually none but they do a manual `return` + (accumulate-sample! "Walk arc-len forward from sampler and add the sampled + trail position to out-pos." (_type_ float vector tracking-spline-sampler) vector) ;; 18 + (sample-point! "Clear out-pos and sample the trail arc-len forward from + sampler." (_type_ float vector tracking-spline-sampler) vector) ;; 19 + (apply-trail-correction! "Bias move along the changes in trail direction + before stop-pt. The correction is strongest on short, curved trails and + fades as the recorded path becomes straighter." (_type_ vector int) none) ;; 20 + (follow-update! "Advance the trail follower toward pos using accel and + max-speed. Average 64 evenly spaced samples over the adaptive sample + window, apply the trail-direction correction, and return the smoothed + position." (_type_ vector float float) vector) ;; 21 + (trim-to-length! "Drop the oldest trail segments until its live length is + no greater than max-len." (_type_ float) none) ;; 22 + (debug-draw "Draw the used breadcrumb chain, the endpoints of the current + sampling window, and the trail correction applied to the last output." + (_type_) none) ;; 23 ) ) +;; A scalar spring-like seeker. value accelerates toward target and its speed +;; is limited by both max-vel and max-partial times the remaining distance, so +;; it eases down automatically near the target. (deftype cam-float-seeker (structure) ((target float :offset-assert 0) (value float :offset-assert 4) @@ -15385,13 +17580,19 @@ :size-assert #x18 :flag-assert #xd00000018 (:methods - (init-cam-float-seeker (_type_ float float float float) none) ;; 9 - (copy-cam-float-seeker (_type_ _type_) none) ;; 10 - (update! (_type_ float) none) ;; 11 - (jump-to-target! (_type_ float) float) ;; 12 + (init-cam-float-seeker "Initialize target and value to initial-value, clear + velocity, and set the acceleration and two speed limits." (_type_ float float float float) none) ;; 9 + (copy-cam-float-seeker "Copy the complete seeker state from source." (_type_ _type_) none) ;; 10 + (update! "Advance one frame toward target plus offset. Acceleration and + displacement use the display time ratio, and velocity is capped by the + smaller of max-vel and max-partial times the remaining distance." (_type_ float) none) ;; 11 + (jump-to-target! "Set value directly to target plus offset, clear velocity, + and return the new value." (_type_ float) float) ;; 12 ) ) +;; Vector form of cam-float-seeker. The velocity magnitude is limited as a +;; whole, preserving direction and giving an isotropic three-dimensional seek. (deftype cam-vector-seeker (structure) ((target vector :inline :offset-assert 0) (value vector :inline :offset-assert 16) @@ -15404,8 +17605,10 @@ :size-assert #x3c :flag-assert #xb0000003c (:methods - (init! (_type_ vector float float float) none) ;; 9 - (update! (_type_ vector) none) ;; 10 + (init! "Initialize target and value from initial-value, or zero when it is + false; clear velocity and set the acceleration and speed limits." (_type_ vector float float float) none) ;; 9 + (update! "Advance one frame toward target plus optional offset, limiting + velocity magnitude by max-vel and the remaining-distance limit." (_type_ vector) none) ;; 10 ) ) @@ -15426,6 +17629,8 @@ :flag-assert #x9000000d0 ) +;; The combiner blends two camera-slave outputs during a transition and +;; produces the position, inverse rotation, and field of view used for drawing. (deftype camera-combiner (process) ((trans vector :score 999 :inline :offset-assert 112) (inv-camera-rot matrix :inline :offset-assert 128) @@ -15448,6 +17653,8 @@ cam-combiner-active) ) +;; One camera placement behavior. The master may keep an outgoing and incoming +;; slave alive together while the combiner transitions between them. (deftype camera-slave (process) ((trans vector :score 999 :inline :offset-assert 112) (fov float :offset-assert 128) @@ -15534,6 +17741,9 @@ cam-periscope) ) +;; Coordinates gameplay camera selection and target tracking. It maintains the +;; active slaves, target transforms and tracking trail, and transition state; +;; the combiner produces the final rendered camera. (deftype camera-master (process) ((master-options uint32 :offset-assert 112) (num-slaves int32 :offset-assert 116) @@ -15593,6 +17803,10 @@ :method-count-assert 14 :size-assert #x964 :flag-assert #xe09000964 + (:methods + (relocate :override-doc + "Adjust the optional water-drip particle control, then relocate the camera process.") + ) (:states cam-master-active list-keeper-active) @@ -15611,16 +17825,26 @@ ;; - Functions -(define-extern float-save-redline (function float none)) -(define-extern float-lookup-redline (function float float)) -(define-extern float-save-blueline (function float none)) -(define-extern float-lookup-blueline (function float float)) -(define-extern float-save-greenline (function float none)) -(define-extern float-lookup-greenline (function float float)) -(define-extern float-save-yellowline (function float none)) -(define-extern float-lookup-yellowline (function float float)) -(define-extern float-save-timeplot (function float none)) -(define-extern float-lookup-timeplot (function float float)) +(define-extern float-save-redline "Append value to the 400-sample red debug + plot, overwriting the oldest sample when the ring wraps." (function float none)) +(define-extern float-lookup-redline "Read the red debug plot at position in its + wrapped drawing order: zero is newest and one starts at the oldest sample." (function float float)) +(define-extern float-save-blueline "Append value to the 400-sample blue debug + plot, overwriting the oldest sample when the ring wraps." (function float none)) +(define-extern float-lookup-blueline "Read the blue debug plot at position in + its wrapped drawing order: zero is newest and one starts at the oldest sample." (function float float)) +(define-extern float-save-greenline "Append value to the 400-sample green debug + plot, overwriting the oldest sample when the ring wraps." (function float none)) +(define-extern float-lookup-greenline "Read the green debug plot at position in + its wrapped drawing order: zero is newest and one starts at the oldest sample." (function float float)) +(define-extern float-save-yellowline "Append value to the 400-sample yellow + debug plot, overwriting the oldest sample when the ring wraps." (function float none)) +(define-extern float-lookup-yellowline "Read the yellow debug plot at position + in its wrapped drawing order: zero is newest and one starts at the oldest sample." (function float float)) +(define-extern float-save-timeplot "Append value to the 400-sample time debug + plot, overwriting the oldest sample when the ring wraps." (function float none)) +(define-extern float-lookup-timeplot "Read the time debug plot at position in + its wrapped drawing order: zero is newest and one starts at the oldest sample." (function float float)) ;; - Symbols @@ -15660,6 +17884,7 @@ ;; Containing DGOs - ['GAME', 'ENGINE'] ;; Version - 3 +;; Options for controller-driven external camera movement. (defenum external-cam-option :bitfield #t (allow-z 0) @@ -15667,9 +17892,17 @@ ;; - Symbols +;; Controller-driven external-camera movement options. (define-extern *external-cam-options* external-cam-option) +;; False for the gameplay camera, or the controller/debug mode that directly +;; moves *math-camera*. (define-extern *external-cam-mode* symbol) +;; Short-lived request to render from the alternate camera values. Writers +;; refresh it with at least 2; camera update reduces it to 1 for the current +;; frame and clears it on the next non-menu frame if it is not refreshed. (define-extern *camera-look-through-other* int) +;; Alternate field of view, position, inverse rotation, vertical impulse, and +;; debug target used while *camera-look-through-other* is active. (define-extern *camera-other-fov* bfloat) (define-extern *camera-other-trans* vector) (define-extern *camera-other-matrix* matrix) @@ -15685,6 +17918,7 @@ ;; - Types +;; Source location captured by the assert macro before it reports a failure. (deftype __assert-info-private-struct (structure) ((filename string :offset-assert 0) (line-num uint16 :offset-assert 4) @@ -15694,8 +17928,8 @@ :size-assert #x8 :flag-assert #xb00000008 (:methods - (set-pos (_type_ string uint uint) int) ;; 9 - (print-pos (_type_) int) ;; 10 + (set-pos "Record the source filename, line, and column and return zero." (_type_ string uint uint) int) ;; 9 + (print-pos "Print the recorded GOAL source location and return zero." (_type_) int) ;; 10 ) ) @@ -15712,6 +17946,7 @@ ;; - Types +;; One manipy-backed HUD image with its screen position and nonuniform scale. (deftype hud-icon (basic) ((icon (pointer manipy) :offset-assert 4) (icon-y int32 :offset-assert 8) @@ -15725,6 +17960,7 @@ :flag-assert #x90000001c ) +;; One HUD particle effect and the positions used to animate it between frames. (deftype hud-particle (basic) ((part sparticle-launch-control :offset-assert 4) (init-pos vector :inline :offset-assert 16) @@ -15736,6 +17972,9 @@ :flag-assert #x900000040 ) +;; Base process for a numeric HUD element. Subclasses supply the value source +;; and appearance while this type manages arrival/hide states, value tallying, +;; text and icon placement, and a small fixed set of particle effects. (deftype hud (process) ((value int32 :offset-assert 112) (value2 int32 :offset-assert 116) @@ -15770,19 +18009,62 @@ :flag-assert #x1b00b00118 ;; inherited inspect of process (:methods - (hidden? (_type_) symbol) ;; 14 - (draw-hud (_type_) none) ;; 15 - (tally-value (_type_ int int) none) ;; 16 - (draw-icons (_type_) none) ;; 17 - (draw-particles (_type_) none) ;; 18 - (hud-update (_type_) none) ;; 19 - (init-particles! (_type_ int) none) ;; 20 - (get-icon-pos-x (_type_) int) ;; 21 - (get-icon-pos-y (_type_) int) ;; 22 + (relocate :override-doc + "Adjust every non-null particle launch-control pointer by offset, then relocate the complete +HUD process allocation with the base process method.") + (deactivate :override-doc + "Remove every registry entry that points to this HUD, kill its particle launch controls, +release their sprite matrices, and deactivate the base process.") + (hidden? "Return whether this HUD's next state is hud-hidden." (_type_) symbol) ;; 14 + (draw-hud + "While visible and unpaused, spawn every configured particle except skip-particle once +particle zero has a nonzero screen position." + (_type_) none) ;; 15 + (tally-value + "Update the primary and secondary values when the HUD is allowed on screen. When +increment-on-event is active and the primary value rises within 1.5 seconds of the last target +equality, advance the display by one every 0.1 seconds. Otherwise refresh the target and copy it +directly unless a noninitial HUD has been unequal for at least 1.5 seconds; the next matching update +resumes direct synchronization. Show this HUD and its linked friend after a visible change. On PC, +directional input also selects the collectable summary scope." + (_type_ int int) none) ;; 16 + (draw-icons + "Apply the current video scales and slide offset to every manipy-backed icon's scale and +screen position." + (_type_) none) ;; 17 + (draw-particles + "Recompute each HUD particle's screen position from its initial position, slide offset, and +vertical offset, then update its allocated sprite HVDF. The PC path uses vertical scaling when VIS +is disabled so window-aspect positioning remains consistent." + (_type_) none) ;; 18 + (hud-update + "Update this HUD subtype's value and animation state. The base implementation does nothing." + (_type_) none) ;; 19 + (init-particles! + "Create this HUD subtype's icons and particle launch controls. init-value is normally zero; +hud-money-all interprets it as a requested level index. The base implementation does nothing." + (_type_ int) none) ;; 20 + (get-icon-pos-x + "Return the screen X destination for a collectable flying into this HUD. The base +implementation returns zero." + (_type_) int) ;; 21 + (get-icon-pos-y + "Return the screen Y destination for a collectable flying into this HUD. The base +implementation returns zero." + (_type_) int) ;; 22 (hud-method-23 (_type_) none) ;; 23 ;; unused - (set-pos-and-scale (_type_ symbol symbol) none) ;; 24 - (get-icon-scale-x (_type_) float) ;; 25 - (get-icon-scale-y (_type_) float) ;; 26 + (set-pos-and-scale + "Select this HUD subtype's positions and scales for widescreen and PAL display modes. The +base implementation does nothing." + (_type_ symbol symbol) none) ;; 24 + (get-icon-scale-x + "Return the X scale for a collectable flying into this HUD. The base implementation returns +zero." + (_type_) float) ;; 25 + (get-icon-scale-y + "Return the Y scale for a collectable flying into this HUD. The base implementation returns +zero." + (_type_) float) ;; 26 ) (:states hud-arriving @@ -15800,6 +18082,8 @@ (declare-type hud-bike-speed hud) (declare-type hud-bike-heat hud) (declare-type hud-money-all hud) +;; Registry of the nine HUD processes. Named fields provide typed access and +;; parts overlays the same pointers for common indexed operations. (deftype hud-parts (structure) ( (pickups (pointer hud-pickups) :offset-assert 0) @@ -15831,9 +18115,10 @@ ;; - Types +;; Per-level totals used by the progress and save-file displays. (deftype count-info (structure) - ((money-count int32 :offset-assert 0) - (buzzer-count int32 :offset-assert 4) + ((money-count int32 :offset-assert 0) ;; total precursor orbs + (buzzer-count int32 :offset-assert 4) ;; total scout flies ) :pack-me :method-count-assert 9 @@ -15841,6 +18126,8 @@ :flag-assert #x900000008 ) +;; Variable-length table of per-level collectible totals. The inline data continues beyond the +;; nominal header size. (deftype game-count-info (basic) ((length int32 :offset-assert 4) (data count-info :inline :dynamic :offset-assert 8) @@ -15850,6 +18137,9 @@ :flag-assert #x900000008 ) +;; Text for one power-cell task. The first three task-name entries describe the task during its +;; introduction/reminder, later-reminder, and reward/resolution phases. A completed task uses +;; text-index-when-resolved to select the name that remains on the progress screen. (deftype task-info-data (basic) ((task-id game-task :offset-assert 4) (task-name text-id 4 :offset-assert 8) @@ -15860,6 +18150,9 @@ :flag-assert #x90000001c ) +;; Progress-screen data for one level. text-group-index selects the level text bank, nb-of-tasks +;; gives the used portion of the eight-entry task-info array, and buzzer-task-index identifies the +;; scout-fly task or is -1 when the level has none. (deftype level-tasks-info (basic) ((level-name-id text-id :offset-assert 4) (text-group-index int32 :offset-assert 8) @@ -15989,6 +18282,8 @@ :type int32 :copy-entries progress-screen) +;; One pause-menu choice. option-type determines how the three parameters and value-to-modify are +;; interpreted: choices can edit a value, open another progress-screen, or act as a button. (deftype game-option (basic) ((option-type game-option-type :offset-assert 8) (name text-id :offset-assert 16) @@ -16003,6 +18298,8 @@ :flag-assert #x900000028 ) +;; Owns the pause/progress menu state, transitions, save-card display data, and the HUD icons and +;; particles used to draw each screen. (deftype progress (process) ((current-debug-string int32 :offset-assert 112) (current-debug-language int32 :offset-assert 116) @@ -16064,51 +18361,171 @@ :heap-base #x270 :flag-assert #x3b027002dc (:methods + (relocate :override-doc + "Adjust every live particle launcher pointer after the progress process heap moves, then + relocate the inherited process fields.") (progress-method-14 (_type_) none) ;; 14 ;; unused (progress-method-15 (_type_) none) ;; 15 ;; unused (progress-method-16 (_type_) none) ;; 16 ;; unused - (draw-progress (_type_) none) ;; 17 + (draw-progress + "Draw the persistent progress overlay: current collectable counts, completion percentage, + option buttons, and the small collectable icons. Slide each group on its own staggered + path during progress-screen transitions." + (_type_) none) ;; 17 (progress-method-18 () none) ;; 18 ;; unused - (visible? (_type_) symbol) ;; 19 - (hidden? (_type_) symbol) ;; 20 - (adjust-sprites (_type_) none) ;; 21 - (adjust-icons (_type_) none) ;; 22 - (adjust-ratios (_type_ symbol symbol) none) ;; 23 - (draw-fuel-cell-screen (_type_ int) none) ;; 24 - (draw-money-screen (_type_ int) none) ;; 25 - (draw-buzzer-screen (_type_ int) none) ;; 26 - (draw-notice-screen (_type_) none) ;; 27 - (draw-options (_type_ int int float) none) ;; 28 - (respond-common (_type_) none) ;; 29 - (respond-progress (_type_) none) ;; 30 - (respond-memcard (_type_) none) ;; 31 - (can-go-back? (_type_) symbol) ;; 32 - (initialize-icons (_type_) none) ;; 33 - (initialize-particles (_type_) none) ;; 34 - (draw-memcard-storage-error (_type_ font-context) none) ;; 35 - (draw-memcard-data-exists (_type_ font-context) none) ;; 36 - (draw-memcard-no-data (_type_ font-context) none) ;; 37 - (draw-memcard-accessing (_type_ font-context) none) ;; 38 - (draw-memcard-insert (_type_ font-context) none) ;; 39 - (draw-memcard-file-select (_type_ font-context) none) ;; 40 - (draw-memcard-auto-save-error (_type_ font-context) none) ;; 41 - (draw-memcard-removed (_type_ font-context) none) ;; 42 - (draw-memcard-error (_type_ font-context) none) ;; 43 + (visible? + "Return true while the progress process exists and its screen has finished sliding in." + (_type_) symbol) ;; 19 + (hidden? + "Return true while the progress process is absent or its screen has finished sliding out." + (_type_) symbol) ;; 20 + (adjust-sprites + "Update the progress screen's side-panel geometry from its slide position, transform every + particle from authored screen coordinates into the active display coordinates, update + allocated sprite matrices, and submit the particles." + (_type_) none) ;; 21 + (adjust-icons + "Apply the active display scaling and screen offsets to the two precursor-orb model icons." + (_type_) none) ;; 22 + (adjust-ratios + "Choose side-panel, button, slot, and precursor-orb layout values for aspect and video-mode. + PAL applies additional vertical compensation after the 4:3 or 16:9 layout is selected." + (_type_ symbol symbol) none) ;; 23 + (draw-fuel-cell-screen + "Draw the power-cell task screen for level-index. Arrange one task egg per level task, + mark its current task state, rotate the four power-cell models, and print the selected + task name and completion label." + (_type_ int) none) ;; 24 + (draw-money-screen + "Draw the precursor-orb totals for level-index. Position and rotate the large orb during + transitions, then print the level and whole-game collected counts." + (_type_ int) none) ;; 25 + (draw-buzzer-screen + "Draw the scout-fly totals for level-index. Position the large icon during transitions, + derive the level count from its designated task, and print level and whole-game totals." + (_type_ int) none) ;; 26 + (draw-notice-screen + "Create the common notice font context and dispatch the active memory-card, autosave, + video-mode, disc, or quit screen to its specialized drawing method." + (_type_) none) ;; 27 + (draw-options + "Draw the current option table centered around base-y with row-spacing and base-scale. + Render menu labels, toggles, slider values and bars, the animated language carousel, + and the active selection highlight." + (_type_ int int float) none) ;; 28 + (respond-common + "Handle navigation and editing for the current option table. Up and down select rows, + left and right change values, confirm enters menus or begins editing, and cancel restores + the saved value or leaves the screen." + (_type_) none) ;; 29 + (respond-progress + "Handle controls on the collectable screens: move between opened levels, select the + power-cell, precursor-orb, or scout-fly view, open settings, and select known power-cell + tasks." + (_type_) none) ;; 30 + (respond-memcard + "Handle confirmation on memory-card, video-mode, disc, autosave, and quit screens. Select + save slots, start requested card operations, follow yes/no choices, and return to the + appropriate prior screen or game mode." + (_type_) none) ;; 31 + (can-go-back? + "Return true when the stable progress screen may process a back command. Transitions and + active option edits block it; collectable screens are always eligible, while settings + screens also require a compatible entry screen." + (_type_) symbol) ;; 32 + (initialize-icons + "Create four power-cell and two precursor-orb model icons, assign their authored screen + positions and scales, and offset the power-cell animation frames." + (_type_) none) ;; 33 + (initialize-particles + "Create the progress screen's background, navigation, task, collectable, memory-card, and + save-status particles in their fixed particle-state slots. The PC adds a second pair of + navigation arrows for its extended menus." + (_type_) none) ;; 34 + (draw-memcard-storage-error + "Draw the not-formatted, no-space, or not-inserted memory-card message, including the + required-space details and continue prompt." + (_type_ font-context) none) ;; 35 + (draw-memcard-data-exists + "Draw the warning that the selected memory-card slot already contains save data and ask + whether it should be overwritten." + (_type_ font-context) none) ;; 36 + (draw-memcard-no-data + "Draw the notice that no save data exists and ask whether a new save should be created." + (_type_ font-context) none) ;; 37 + (draw-memcard-accessing + "Draw the blinking loading, saving, formatting, or creating status for the active + memory-card operation, followed by the do-not-remove warning." + (_type_ font-context) none) ;; 38 + (draw-memcard-insert + "Ask the player to insert a memory card or go back. The Japanese missing-card case adds a + separate not-inserted warning above the ordinary prompt." + (_type_ font-context) none) ;; 39 + (draw-memcard-file-select + "Draw four sliding memory-card file slots. Show each save's level and, while its details + are visible, its collectable totals, completion, and territory-formatted timestamp; + otherwise show an empty slot." + (_type_ font-context) none) ;; 40 + (draw-memcard-auto-save-error + "Draw the save error, card check, and autosave-disabled messages, followed by the continue + prompt." + (_type_ font-context) none) ;; 41 + (draw-memcard-removed + "Warn that the memory card was removed and autosave has been disabled, then draw the + continue prompt." + (_type_ font-context) none) ;; 42 + (draw-memcard-error + "Draw the operation-specific load, save, format, or create error, followed by the card + check and continue messages." + (_type_ font-context) none) ;; 43 (progress-method-44 (_type_) none) ;; 44 ;; unused - (push! (_type_) none) ;; 45 - (pop! (_type_) none) ;; 46 + (push! + "Save the current screen and option index on the five-entry progress navigation stack. + Print an error and leave the stack unchanged when it is full." + (_type_) none) ;; 45 + (pop! + "Restore and enter the most recently saved progress screen. Return control to game mode + when the navigation stack is empty." + (_type_) none) ;; 46 (progress-method-47 (_type_) none) ;; 47 ;; unused - (enter! (_type_ progress-screen int) none) ;; 48 - (draw-memcard-format (_type_ font-context) none) ;; 49 - (draw-auto-save (_type_ font-context) none) ;; 50 - (set-transition-progress! (_type_ int) none) ;; 51 - (set-transition-speed! (_type_) none) ;; 52 - (set-memcard-screen (_type_ progress-screen) progress-screen) ;; 53 - (draw-pal-change-to-60hz (_type_ font-context) none) ;; 54 - (draw-pal-now-60hz (_type_ font-context) none) ;; 55 - (draw-no-disc (_type_ font-context) none) ;; 56 - (draw-bad-disc (_type_ font-context) none) ;; 57 - (draw-quit (_type_ font-context) none) ;; 58 + (enter! + "Enter screen at option. Reset the screen's selection state and transition speed, then + start any create, load, save, or format operation associated with the new screen." + (_type_ progress-screen int) none) ;; 48 + (draw-memcard-format + "Explain that the memory card is unformatted and ask whether to format it." + (_type_ font-context) none) ;; 49 + (draw-auto-save + "Draw the autosave warning and continue prompt, and blink the save-status icon near the + prompt while the screen is fully visible." + (_type_ font-context) none) ;; 50 + (set-transition-progress! + "Set the 0-to-512 transition offset and derive its inverse and normalized progress values." + (_type_ int) none) ;; 51 + (set-transition-speed! + "Choose the screen-transition speed. Collectable and file-selection screens use the slower + value; other screens use the faster value." + (_type_) none) ;; 52 + (set-memcard-screen + "Resolve requested-screen against the current memory-card presence, formatting, capacity, + initialization, and autosave state. Return the appropriate file, format, insert, space, + data, or removal screen, or leave the request unchanged." + (_type_ progress-screen) progress-screen) ;; 53 + (draw-pal-change-to-60hz + "Draw the PAL 60 Hz support warning and continue prompt before changing video mode." + (_type_ font-context) none) ;; 54 + (draw-pal-now-60hz + "Explain that the display is now running at 60 Hz and ask whether to keep the mode." + (_type_ font-context) none) ;; 55 + (draw-no-disc + "Draw the missing-disc warning. Offer the continue prompt only after a disc is present." + (_type_ font-context) none) ;; 56 + (draw-bad-disc + "Draw the unreadable-disc warning and continue prompt." + (_type_ font-context) none) ;; 57 + (draw-quit + "Draw the quit confirmation prompt." + (_type_ font-context) none) ;; 58 ) (:states progress-normal @@ -16134,10 +18551,12 @@ ;; - Types (deftype rpc-buffer (basic) + "Storage for fixed-size commands sent to an IOP RPC server. base points to the 64-byte-aligned +payload area within the dynamic trailing allocation." ((elt-size uint32 :offset-assert 4) (elt-count uint32 :offset-assert 8) (elt-used uint32 :offset-assert 12) - (busy basic :offset-assert 16) + (busy symbol :offset-assert 16) (base pointer :offset-assert 20) (data uint8 :dynamic :offset 32) ) @@ -16145,11 +18564,14 @@ :size-assert #x20 :flag-assert #x900000020 (:methods - (new (symbol type uint uint) rpc-buffer) ;; 0 + (new "Allocate an RPC buffer for elt-count fixed-size elements and align its payload to a +64-byte boundary." (symbol type uint uint) rpc-buffer) ;; 0 ) ) (deftype rpc-buffer-pair (basic) + "Two RPC buffers used for asynchronous double buffering. current receives new commands while +the other buffer may still be in use by the IOP." ((buffer rpc-buffer 2 :offset-assert 4) (current rpc-buffer :offset-assert 12) (last-recv-buffer pointer :offset-assert 16) @@ -16159,13 +18581,24 @@ :size-assert #x18 :flag-assert #xf00000018 (:methods - (new (symbol type uint uint int) rpc-buffer-pair) ;; 0 - (call (rpc-buffer-pair uint pointer uint) int) ;; 9 - (add-element (rpc-buffer-pair) pointer) ;; 10 - (decrement-elt-used (rpc-buffer-pair) int) ;; 11 - (sync (rpc-buffer-pair symbol) int) ;; 12 - (check-busy (rpc-buffer-pair) symbol) ;; 13 - (pop-last-received (rpc-buffer-pair) pointer) ;; 14 + (new "Allocate an RPC buffer pair for elt-count elements of elt-size and bind it to rpc-port." + (symbol type uint uint int) rpc-buffer-pair) ;; 0 + (call "Submit the nonempty current buffer as an asynchronous RPC call. Wait for the previous +buffer if necessary, record receive-buffer, and swap buffers so new commands can be queued." + (rpc-buffer-pair uint pointer uint) int) ;; 9 + (add-element "Reserve and return the next element in the current buffer. A full buffer is +submitted immediately with function number zero and no receive buffer before reserving the +element, so callers needing other call parameters must flush explicitly." + (rpc-buffer-pair) pointer) ;; 10 + (decrement-elt-used "Discard the most recently reserved element when the current buffer is not +empty." (rpc-buffer-pair) int) ;; 11 + (sync "Wait for the previous buffer's RPC to finish, optionally print a stall warning, then +release that buffer for reuse." (rpc-buffer-pair symbol) int) ;; 12 + (check-busy "Return #t while the previous buffer's RPC is still running. Once it completes, +release that buffer for reuse and return #f." (rpc-buffer-pair) symbol) ;; 13 + (pop-last-received "Return and clear the receive-buffer pointer supplied to the most recent +call. The caller must first establish that the asynchronous RPC has completed." + (rpc-buffer-pair) pointer) ;; 14 ) ) @@ -16184,6 +18617,8 @@ ;; - Types (deftype path-control (basic) + "A resource-loaded polyline associated with a drawable process. The embedded curve stores the +control-vertex pointer and count; plain path controls do not use knots." ((flags path-control-flag :offset-assert 4) (name symbol :offset-assert 8) (process process-drawable :offset-assert 12) @@ -16195,26 +18630,55 @@ :size-assert #x24 :flag-assert #x1500000024 (:methods - (new (symbol type process symbol float) _type_) - (debug-draw (_type_) none) ;; 9 - (eval-path-curve-div! (_type_ vector float symbol) vector) ;; 10 - (get-random-point (_type_ vector) vector) ;; 11 - (path-control-method-12 (_type_ vector float) vector) ;; 12 - (eval-path-curve! (_type_ vector float symbol) vector) ;; 13 - (path-control-method-14 (_type_ vector float) vector) ;; 14 - (length-as-float (_type_) float) ;; 15 - (path-distance (_type_) float) ;; 16 - (get-num-verts (_type_) int) ;; 17 - (should-display? (_type_) symbol) ;; 18 - (path-control-method-19 (_type_) float) ;; 19 - (path-control-method-20 (_type_) float) ;; 20 + (new "Load the named control vertices for proc at time. A path named path may come from the +linked path-actor; missing data sets not-found, while allocation failure reports an art error." + (symbol type process symbol float) _type_) + (relocate :override-doc + "Adjust the owning process pointer after its process heap moves.") + (debug-draw "Draw the enabled line or curve, control points, and index labels, or report missing +path data when entity-error display is enabled." (_type_) none) ;; 9 + (eval-path-curve-div! "Evaluate at progress measured in control-vertex intervals. A plain path +clamps to its endpoints and mode exact selects the lower vertex instead of interpolating. A curve +divides progress by num-cverts minus one and ignores mode. Valid data must contain vertices." + (_type_ vector float symbol) vector) ;; 10 + (get-random-point "Copy a random control vertex into result, or the null vector when the path +is empty." (_type_ vector) vector) ;; 11 + (get-tangent-at-vertex! "Store the normalized tangent at progress measured in control-vertex +intervals. A plain path uses its containing segment; a curve converts progress to normalized +parameter space. Fewer than two plain-path vertices leave result's direction unchanged before +normalization." (_type_ vector float) vector) ;; 12 + (eval-path-curve! "Evaluate at normalized progress. A plain path maps progress uniformly across +its vertex intervals and mode exact selects a vertex instead of interpolating. A curve evaluates +its knot spline and ignores mode." + (_type_ vector float symbol) + vector) ;; 13 + (get-tangent-at-percent! "Store the normalized tangent at normalized progress. Plain paths use +the containing segment. Curves use a 0.01 forward parameter difference before 0.99 and a backward +difference thereafter." + (_type_ vector float) vector) ;; 14 + (length-as-float "Return the number of control-vertex intervals as a float." (_type_) float) ;; 15 + (path-distance "Return the polyline's exact segment sum. A curve-control override lazily caches +curve-length's three-samples-per-control-point estimate instead." (_type_) float) ;; 16 + (get-num-verts "Return the number of control vertices." (_type_) int) ;; 17 + (should-display? "Return whether global path-mark display and this path's display flag are +both enabled." (_type_) symbol) ;; 18 + (get-closest-vertex-index-to-target "Return the fractional control-vertex interval nearest the +target in XZ. Each interval is tested as a segment; inherited curve-control use therefore tests +chords between uniformly spaced spline samples rather than solving the exact closest point." + (_type_) float) ;; 19 + (get-closest-percent-to-target "Normalize get-closest-vertex-index-to-target by the number of +control-vertex intervals." (_type_) float) ;; 20 ) ) (deftype curve-control (path-control) + "A path control backed by a knot spline. If vertices load without matching knot data, the +constructor downgrades the object to path-control." () (:methods - (new (symbol type process symbol float) _type_) + (new "Load the named control vertices and their name-k knot resource for proc at time. path +uses path-k and may use a linked path-actor. Missing knots downgrade valid vertices to a plain +path; missing vertices set not-found." (symbol type process symbol float) _type_) ) :method-count-assert 21 :size-assert #x24 @@ -16235,6 +18699,9 @@ ;; - Types (deftype nav-poly (structure) + "One navigation triangle. vertex indexes the mesh-local vertex array; adj-poly gives neighboring +triangles with 255 as the boundary sentinel. pat bit zero marks a gap and the remaining defined +bits select debug colors." ((id uint8 :offset-assert 0) (vertex uint8 3 :offset-assert 1) (adj-poly uint8 3 :offset-assert 4) @@ -16247,6 +18714,7 @@ ) (deftype nav-vertex (vector) + "One mesh-local navigation vertex." () :method-count-assert 9 :size-assert #x10 @@ -16254,6 +18722,7 @@ ) (deftype nav-sphere (structure) + "A world-space obstacle sphere baked into the level navigation data." ((trans sphere :inline :offset-assert 0) ) :method-count-assert 9 @@ -16262,6 +18731,8 @@ ) (deftype nav-ray (structure) + "State for walking an XZ ray across adjacent triangles. The walk terminates on its destination, +a mesh boundary, or a gap triangle, recording the last edge and distance traveled." ((current-pos vector :inline :offset-assert 0) (dir vector :inline :offset-assert 16) (dest-pos vector :inline :offset-assert 32) @@ -16280,6 +18751,8 @@ ) (deftype nav-route-portal (structure) + "The shared edge to cross when leaving a triangle along a precomputed route. edge-index is -1 +when no route exists." ((next-poly nav-poly :offset-assert 0) (vertex nav-vertex 2 :offset-assert 4) (edge-index int8 :offset-assert 12) @@ -16290,6 +18763,8 @@ ) (deftype clip-travel-vector-to-mesh-return-info (structure) + "Boundary and gap details produced while clipping travel to the navigation mesh. The previous +and next edge fields are reserved and are not filled." ((found-boundary symbol :offset-assert 0) (intersection vector :inline :offset-assert 16) (boundary-normal vector :inline :offset-assert 32) @@ -16309,6 +18784,9 @@ ) (deftype nav-node (structure) + "One node in the navigation triangle BVH. An interior node stores byte offsets to two children; +a leaf overlays those offsets with a count and stores up to eight triangle indices split around +the scale-z field." ((center-x float :offset-assert 0) (center-y float :offset-assert 4) (center-z float :offset-assert 8) @@ -16334,6 +18812,7 @@ ) (deftype nav-lookup-elem (structure) + "One entry in the four-slot, per-frame point-to-triangle lookup cache." ((vec vector :inline :offset-assert 0) (y-thresh float :offset 12) (time uint32 :offset-assert 16) @@ -16349,6 +18828,9 @@ ) (deftype nav-mesh (basic) + "A shared triangle navigation mesh with explicit adjacency, a triangle BVH, a four-entry lookup +cache, static obstacle spheres, and a packed all-pairs next-edge routing table. Vertices and +navigation calculations are mesh-local; origin converts between local and world space." ((user-list engine :offset-assert 4) (poly-lookup-history uint8 2 :offset-assert 8) (debug-time uint8 :offset-assert 10) @@ -16363,51 +18845,79 @@ (vertex (inline-array nav-vertex) :offset-assert 188) (poly-count int32 :offset-assert 192) (poly (inline-array nav-poly) :offset-assert 196) - (route (inline-array vector4ub) :offset-assert 200) ;; this is a guess, it's probably wrong -- but its something with a uint8 at offset 0 + ;; Two bits per ordered triangle pair select the next portal edge. Values zero through two name + ;; an edge; three means there is no intermediate portal and the caller should aim directly. + (route (inline-array vector4ub) :offset-assert 200) ) :method-count-assert 30 :size-assert #xcc :flag-assert #x1e000000cc (:methods - (tri-centroid-world (_type_ nav-poly vector) vector) ;; 9 ;; finds the centroid of the given triangle, in the "world" coordinate system. - (tri-centroid-local (_type_ nav-poly vector) vector) ;; 10 ;; finds the centroid of the given triangle, in the local nav-mesh coordinate system. - (get-adj-poly (_type_ nav-poly nav-poly symbol) nav-poly) ;; 11 - (setup-portal (_type_ nav-poly nav-poly nav-route-portal) object) ;; 12 ;; sets up a portal between two polys. - (initialize-mesh! (_type_) none) ;; 13 - (move-along-nav-ray! (_type_ nav-ray) none) ;; 14 ;; think this updates the current position in a nav-ray, and updates which triangle you're in. - ;; this takes in a point/direction/distance, and see what would happen if you tried to move this way. - ;; it returns the distance you can go before one of these happens: - ;; - you reach the destination - ;; - you hit a nav mesh boundary/gap - ;; - you cross 15 triangles. - (try-move-along-ray (_type_ nav-poly vector vector float) meters) ;; 15 - (nav-mesh-method-16 (_type_ vector nav-poly vector symbol float clip-travel-vector-to-mesh-return-info) none) ;; 16 - (update-route-table (_type_) none) ;; 17 ;; (initialization related) - (nav-mesh-method-18 (_type_ int vector int (pointer int8) int) none) ;; 18 ;; something to do with routes. - (compute-bounding-box (_type_ vector vector) none) ;; 19 - (debug-draw-poly (_type_ nav-poly rgba) none) ;; 20 ;; TODO - is rgba a vector4w? - (point-in-poly? (_type_ nav-poly vector) symbol) ;; 21 ;; is the point inside of the triangle? - (find-opposite-vertices (_type_ nav-poly nav-poly) uint) ;; 22 ;; given two triangles that share an edge, get the indices of the two vertices that aren't part of the edge. - (nav-mesh-method-23 (_type_ nav-poly vector vector vector nav-route-portal) vector) ;; 23 - (closest-point-on-boundary (_type_ nav-poly vector vector) vector) ;; 24 ;; find the closest point on the perimeter of the triangle. - (project-point-into-tri-3d (_type_ nav-poly vector vector) none) ;; 25 ;; will move a 3D point in space to the surface of this nav-poly - ;; Looking from the top down, is the point inside the nav-poly? - ;; - if the point is inside the triangle, returns that point. - ;; - if the point is outside the triangle, move it to the closest point (will be on the edge) - (project-point-into-tri-2d (_type_ nav-poly vector vector) vector) ;; 26 - ;; finds which triangle the given point is in. - ;; also has some caching stuff so if you look up the same point multiple times, it won't redo the work. - ;; I _think_ this is only an approximate check that may return #f even if you are inside. - ;; But, if it returns a poly, it will be right. - (find-poly-fast (_type_ vector meters) nav-poly) ;; 27 - (find-poly (_type_ vector meters (pointer nav-control-flags)) nav-poly) ;; 28 ;; The accurate version of find-poly (tries find-poly-fast first) - ;; checks to see if the triangle is in the mesh or not. - ;; not sure why it's separate from 27 (and such a different implementation). there might be some details I'm missing here. - (is-in-mesh? (_type_ vector float meters) symbol) ;; 29 + (length :override-doc "Return the number of navigation triangles.") + (mem-usage :override-doc "Add the mesh object, vertex array, triangle array, and packed route +table allocations to the navigation memory-usage bucket.") + (tri-centroid-world "Store poly's world-space centroid in result." (_type_ nav-poly vector) + vector) ;; 9 + (tri-centroid-local "Store poly's mesh-local centroid in result." (_type_ nav-poly vector) + vector) ;; 10 + (get-adj-poly "Return the next triangle selected by the route from current-poly toward +target-poly. If vertex-pair is non-false, store the two shared vertex indices packed into its value +field. Return #f for a direct route or missing neighbor." (_type_ nav-poly nav-poly symbol) + nav-poly) ;; 11 + (setup-portal "Fill portal with the next routed edge and its neighboring triangle. Leave it +without a next triangle when current-poly can travel directly toward target-poly or has no stored +next edge." (_type_ nav-poly nav-poly nav-route-portal) object) ;; 12 + (initialize-mesh! "Validate the loaded mesh, warning about empty, degenerate, downward-facing, +oversized, or all-gap triangle data." (_type_) none) ;; 13 + (move-along-nav-ray! "Advance ray across one triangle edge and update its termination, +boundary, destination, or gap state." (_type_ nav-ray) none) ;; 14 + (try-move-along-ray "Walk an XZ ray from start-poly toward direction for distance, stopping at +the destination, a boundary or gap, or after fifteen triangles. Return the distance traveled." + (_type_ nav-poly vector vector float) meters) ;; 15 + (clip-travel-vector-to-mesh "Ray-walk and clip travel so it stays on the mesh. slide? selects +boundary sliding instead of stopping; info receives boundary and gap details." + (_type_ vector nav-poly vector symbol float + clip-travel-vector-to-mesh-return-info) + none) ;; 16 + (update-route-table "Patch each directly adjacent non-gap triangle pair to use the direct-travel +route marker in the packed route table." (_type_) none) ;; 17 + (build-route-table-recursive "Mark current-poly as directly reachable from from-poly. With a +positive depth budget, continue through unvisited non-gap neighbors whose centroids are visible +from source-centroid." (_type_ int vector int (pointer int8) int) none) ;; 18 + (compute-bounding-box "Store the world-space minimum and maximum vertex bounds." (_type_ vector + vector) + none) ;; 19 + (debug-draw-poly "Draw one navigation triangle with color." (_type_ nav-poly rgba) none) ;; 20 + (point-in-poly? "Return whether a mesh-local point lies inside poly in the XZ plane." + (_type_ nav-poly vector) symbol) ;; 21 + (find-opposite-vertices "Pack the two shared-edge vertex indices of adjacent triangles, or +#xffffffff when they do not share an oriented edge." + (_type_ nav-poly nav-poly) uint) ;; 22 + (clip-travel-to-poly "Clip desired-travel against one triangle in XZ, store it in result-travel, +and record the crossed neighbor in portal. At a boundary corner, a start point within five +centimeters of an endpoint may continue through the adjacent edge." (_type_ nav-poly vector vector + vector nav-route-portal) + vector) ;; 23 + (closest-point-on-boundary "Store the closest point on poly's perimeter to point." + (_type_ nav-poly vector vector) vector) ;; 24 + (project-point-into-tri-3d "Project point onto poly's 3D plane and store the result." + (_type_ nav-poly vector vector) none) ;; 25 + (project-point-into-tri-2d "Store point when it lies inside poly in XZ, otherwise store the +closest point on the perimeter." (_type_ nav-poly vector vector) vector) ;; 26 + (find-poly-fast "Find the triangle containing a mesh-local point with the BVH and per-frame +cache, returning #f when no triangle contains it within the Y threshold." + (_type_ vector meters) nav-poly) ;; 27 + (find-poly "Find the triangle for a mesh-local point, falling back to the closest triangle when +the point is outside and reporting the direct-hit flag through flags." + (_type_ vector meters (pointer nav-control-flags)) nav-poly) ;; 28 + (is-in-mesh? "Return whether a mesh-local XZ circle overlaps any non-gap triangle within the Y +threshold." (_type_ vector float meters) symbol) ;; 29 ) ) (deftype check-vector-collision-with-nav-spheres-info (structure) + "The nearest obstacle-sphere hit along a travel direction: ray parameter, world-space +intersection, and outward normal." ((u float :offset-assert 0) (intersect vector :inline :offset-assert 16) (normal vector :inline :offset-assert 32) @@ -16418,6 +18928,7 @@ ) (deftype nav-gap-info (structure) + "A landing point and first non-gap triangle found across a chain of gap triangles." ((dest vector :inline :offset-assert 0) (poly nav-poly :offset-assert 16) ) @@ -16427,6 +18938,8 @@ ) (deftype nav-control (basic) + "Per-actor pathfinding and steering state. It tracks the current route, clips travel to the mesh, +gathers obstacle spheres, and reports gap, blocked, and destination progress to its owner." ((flags nav-control-flags :offset-assert 4) (process basic :offset-assert 8) (shape collide-shape :offset-assert 12) @@ -16436,7 +18949,8 @@ (current-poly nav-poly :offset-assert 28) (next-poly nav-poly :offset-assert 32) (target-poly nav-poly :offset-assert 36) - (portal nav-route-portal 2 :offset-assert 40) ;; guess + ;; These are the two nav-vertex pointers of the active portal edge, not portal records. + (portal nav-vertex 2 :offset-assert 40) (nearest-y-threshold meters :offset-assert 48) (event-temp vector :inline :offset-assert 64) (old-travel vector :inline :offset-assert 80) @@ -16452,47 +18966,92 @@ (nav-cull-radius float :offset-assert 208) (num-spheres int16 :offset-assert 212) (max-spheres int16 :offset-assert 214) - (sphere sphere :inline :dynamic :offset-assert 224) ;; guess + ;; Mesh-local avoidance spheres continue beyond the nominal type size. + (sphere sphere :inline :dynamic :offset-assert 224) ) :method-count-assert 36 :size-assert #xe0 :flag-assert #x24000000e0 (:methods - (new (symbol type collide-shape int float) _type_) - (debug-draw (_type_) none) ;; 9 - (point-in-bounds? (_type_ vector) symbol) ;; 10 - (nav-control-method-11 (_type_ vector) vector) ;; 11 - (nav-control-method-12 (_type_ nav-gap-info) symbol) ;; 12 - (nav-control-method-13 (_type_ vector vector) vector) ;; 13 ;; see - puffer::20 | second vector may be clip-travel-vector-to-mesh-return-info though - (set-current-poly! (_type_ nav-poly) none) ;; 14 - (set-target-pos! (_type_ vector) none) ;; 15 - (nav-control-method-16 (_type_ vector) nav-poly) ;; 16 ; see - nav-enemy-test-point-in-nav-mesh? - (project-onto-nav-mesh (_type_ vector vector) vector) ;; 17 ;; moves point to nav-mesh. - (find-poly (_type_ vector) nav-poly) ;; 18 - (nav-control-method-19 (_type_ vector collide-shape-moving vector float) none) ;; 19 ;; csm not trsqv? ret not vector? - (project-point-into-tri-3d (_type_ nav-poly vector vector) vector) ;; 20 - (nav-control-method-21 (_type_ vector) nav-poly) ;; 21 - (nav-control-method-22 (_type_ vector float) symbol) ;; 22 - (nav-control-method-23 (_type_ vector check-vector-collision-with-nav-spheres-info) float) ;; 23 ;; TODO - unconfirmed maybe (nav-control-method-23 (_type_ vector matrix) float) ;; 23 - (nav-control-method-24 (_type_ float clip-travel-vector-to-mesh-return-info) none) ;; 24 - (is-in-mesh? (_type_ vector float) symbol) ;; 25 ; see - nav-enemy-test-point-near-nav-mesh? - (nav-control-method-26 (_type_) none) ;; 26 ;; stub - (nav-control-method-27 (_type_) none) ;; 27 - (nav-control-method-28 (_type_ collide-kind) none) ;; 28 - (should-display? (_type_) symbol) ;; 29 - (nav-control-method-30 (_type_ vector vector vector) sphere) ;; 30 ;; TODO - last arg? - it has a float as the first arg, vector is a total guess - (intersect-ray-line-segment? (_type_ vector vector vector vector) symbol) ;; 31 - (nav-control-method-32 (_type_ vector vector vector vector float) symbol) ;; 32 - (nav-control-method-33 (_type_ vector vector vector vector float) symbol) ;; 33 + (new "Allocate per-actor navigation state with capacity for sphere-count avoidance spheres, +connect it to shape's mesh, and load the nearest-Y threshold from the entity resource." + (symbol type collide-shape int float) _type_) + (length :override-doc "Return the number of avoidance spheres currently stored.") + (asize-of :override-doc "Return the fixed navigation-control size plus sixteen bytes for each +reserved avoidance-sphere slot.") + (relocate :override-doc + "Adjust the owning process and collision-shape pointers after the process heap moves.") + (debug-draw "Draw the enabled mesh, route, travel, and obstacle-sphere debug layers." + (_type_) none) ;; 9 + (point-in-bounds? "Return whether point lies inside the navigation mesh's world-space bounding +sphere." (_type_ vector) symbol) ;; 10 + (navigate! "Update navigation toward destination: relocalize on the mesh, gather obstacle +spheres, compute travel, and send gap or blocked events." (_type_ vector) vector) ;; 11 + (find-gap-landing "Find the first non-gap triangle beyond the current gap chain and fill the +landing point. Return #t when a landing exists." (_type_ nav-gap-info) symbol) ;; 12 + (compute-travel "Build this frame's travel toward destination along the portal route, using +previous-travel as the fallback direction." (_type_ vector vector) vector) ;; 13 + (set-current-poly! "Set the current triangle and mark it as explicitly supplied this frame." + (_type_ nav-poly) none) ;; 14 + (set-target-pos! "Copy pos into the steering target position." (_type_ vector) none) ;; 15 + (find-poly-fast-from-world "Find the triangle containing a world-space point using the mesh's +fast lookup." (_type_ vector) nav-poly) ;; 16 + (project-onto-nav-mesh "Store a world-space point projected onto the navigation mesh." + (_type_ vector vector) vector) ;; 17 + (find-poly "Find the navigation triangle containing a world-space point." (_type_ vector) + nav-poly) ;; 18 + (steer-toward-point "Turn body toward goal by at most turn-speed while validating the proposed +step remains on the mesh; store the accepted position in out-pos." + (_type_ vector collide-shape-moving vector float) none) ;; 19 + (project-point-into-tri-3d "Project a world-space point onto poly and store the world-space +result." (_type_ nav-poly vector vector) vector) ;; 20 + (find-poly-fast-at "Find the triangle containing a world-space point using the mesh's fast +lookup." (_type_ vector) nav-poly) ;; 21 + (point-on-mesh-below? "Return whether world-point lies in a mesh triangle and below the mesh +origin plus y-tolerance." (_type_ vector float) symbol) ;; 22 + (check-vector-collision-with-nav-spheres "Find the nearest forward avoidance-sphere hit along +travel-direction. Return its ray parameter and, when info is supplied, store the world-space +intersection and outward normal." (_type_ vector + check-vector-collision-with-nav-spheres-info) + float) ;; 23 + (clip-travel-to-mesh "Clip this control's travel to the mesh up to max-distance and fill +boundary or gap details." (_type_ float clip-travel-vector-to-mesh-return-info) none) ;; 24 + (is-in-mesh? "Return whether a world-space circle overlaps the navigation mesh." + (_type_ vector float) symbol) ;; 25 + (post-relocalize-hook "Hook called after the control is relocalized on the mesh." + (_type_) none) ;; 26 + (relocalize-in-mesh! "Update current-poly by ray-walking from the previous body position to its +current position." (_type_) none) ;; 27 + (gather-nav-spheres! "Rebuild the mesh-local obstacle-sphere list from the player, authored +static spheres, and other navigation users. collision-mask filters the other users' collision +kinds." (_type_ collide-kind) none) ;; 28 + (should-display? "Return whether global navigation-mark display and this control's display flag +are both enabled." (_type_) symbol) ;; 29 + (find-deepest-sphere-along-ray "Return the avoidance sphere most deeply overlapped by the ray, +or #f when there is no hit." (_type_ vector vector vector) sphere) ;; 30 + (intersect-ray-line-segment? "Return whether the XZ ray from point along direction intersects +the finite segment." (_type_ vector vector vector vector) symbol) ;; 31 + (avoid-spheres "Store a travel vector that avoids the mesh-local obstacle spheres. When the +straight path is blocked, follow tangent candidates around both sides of the obstacle chain, blend +away from any sphere containing the start, and choose the candidate closest to the desired or +fallback direction. Return #t when travel was deflected." (_type_ vector vector vector vector float) + symbol) ;; 32 + (avoid-spheres-and-detect-blocked "Deflect travel around spheres. If the resulting travel is no +longer than the original and is under five centimeters, set the blocked state, update its timer and +count, and send block-event." (_type_ vector vector vector vector float) symbol) ;; 33 (nav-control-method-34 () none) ;; 34 - (nav-control-method-35 (_type_ vector vector vector vector float) none) ;; 35 + (avoid-spheres-world "Deflect travel around spheres using a world-space start position." + (_type_ vector vector vector vector float) none) ;; 35 ) ) ;; - Functions -(define-extern nav-mesh-connect (function process trsqv nav-control nav-mesh :behavior process)) -(define-extern has-nav-mesh? (function entity-actor symbol)) +(define-extern nav-mesh-connect "Find and initialize proc's navigation mesh, register the process +and optional navigation control as users, and return the shared mesh or the empty default mesh." + (function process trsqv nav-control nav-mesh :behavior process)) +(define-extern has-nav-mesh? "Return whether the actor has loaded navigation data or a linked +nav-mesh actor resource." (function entity-actor symbol)) ;; - Symbols @@ -16509,6 +19068,9 @@ ;; - Types (deftype load-dgo-msg (structure) + "A 32-byte bidirectional DGO RPC message. A new load supplies two temporary object buffers, the +current heap top, and the DGO name. A continuation supplies an updated heap top. The reply overlays +b1 with the address of the loaded object and reports whether that object was the last in the DGO." ((rsvd uint16 :offset-assert 0) ;; unused? (result load-msg-result :offset-assert 2) ;; status from OVERLORD (b1 pointer :offset-assert 4) ;; EE -> OVERLORD, first temp load buffer @@ -16524,6 +19086,10 @@ ) (deftype load-chunk-msg (structure) + "The shared 64-byte layout used for STR loads and streamed-audio commands. STR loads transmit +only the first 32 bytes, so their filename occupies the first 16 bytes of basename; playback sends +the full record and can use all 48 bytes. For playback, result is a str-play-command rather than a +load status, and id overlays the destination address." ((rsvd uint16 :offset-assert 0) (result load-msg-result :offset-assert 2) (address pointer :offset-assert 4) @@ -16538,6 +19104,9 @@ ) (deftype dgo-header (structure) + "The 64-byte header immediately before each GOAL object loaded from a DGO. length is the byte +length of this object, not the DGO object count; rootname names the object, and its dynamic data +begins directly after the header." ((length uint32 :offset-assert 0) (rootname uint8 60 :offset-assert 4) ;; added @@ -16551,23 +19120,55 @@ ;; - Functions (define-extern link-begin (function pointer (pointer uint8) int kheap link-flag int)) -(define-extern string->sound-name (function string sound-name)) -(define-extern str-load (function string int pointer int symbol)) -(define-extern str-load-status (function (pointer int32) symbol)) -(define-extern str-load-cancel (function none)) -(define-extern str-play-async (function string sound-id none)) -(define-extern str-play-stop (function string none)) -(define-extern str-play-queue (function string none)) -(define-extern str-ambient-play (function string none)) -(define-extern str-ambient-stop (function string none)) -(define-extern str-play-kick (function none)) -(define-extern dgo-load-begin (function string pointer pointer pointer load-dgo-msg)) -(define-extern dgo-load-get-next (function (pointer symbol) pointer)) -(define-extern dgo-load-continue (function pointer int)) -(define-extern dgo-load-cancel (function none)) -(define-extern find-temp-buffer (function int pointer)) -(define-extern dgo-load-link (function dgo-header kheap symbol symbol symbol)) -(define-extern destroy-mem (function (pointer uint32) (pointer uint32) none)) +(define-extern string->sound-name "Pack at most fifteen bytes of str into a zero-padded 16-byte +sound name." (function string sound-name)) +(define-extern str-load "Begin an asynchronous load of chunk-id from name into address. A negative +chunk ID loads an ordinary file with max-length as its limit; a nonnegative ID selects a chunk and +uses the chunk's recorded length. Return #t when the RPC starts, or #f while the loader is locked or +busy." (function string int pointer int symbol)) +(define-extern str-load-status "Poll the current STR load. Return busy while the RPC is in flight, +error when OVERLORD reports a failure, or complete after storing the loaded byte count in +length-out." (function (pointer int32) symbol)) +(define-extern str-load-cancel "Release this client's STR-load lock without cancelling the +in-flight OVERLORD request. A new load still waits for the RPC channel to become idle." + (function none)) +(define-extern str-play-async "Append a command to start the named animation's streamed audio with +the supplied sound ID. str-play-kick sends the accumulated playback commands." + (function string sound-id none)) +(define-extern str-play-stop "Append a command to stop the streamed audio selected by animation +name. str-play-kick sends the accumulated playback commands." (function string none)) +(define-extern str-play-queue "When playback and file loading permit it, append a request to queue +the named animation stream without starting it. Always release the one-update queue gate." + (function string none)) +(define-extern str-ambient-play "Append a command to play a VAG stream named directly rather than +deriving its name from an animation. str-play-kick sends the accumulated playback commands." + (function string none)) +(define-extern str-ambient-stop "Append a command to stop a VAG stream named directly rather than +deriving its name from an animation. str-play-kick sends the accumulated playback commands." + (function string none)) +(define-extern str-play-kick "Send the accumulated streamed-audio commands when the playback RPC +channel is idle." (function none)) +(define-extern dgo-load-begin "Start an asynchronous, double-buffered DGO load. buffer1 and buffer2 +hold non-final objects while they are linked; buffer-top is the current heap destination for a +final object. Return the RPC command record." (function string pointer pointer pointer load-dgo-msg)) +(define-extern dgo-load-get-next "Poll the DGO loader. Return the next loaded object's header, or #f +while no object is ready or after an error. Store #t in last-object for the final object and #f when +more objects remain." (function (pointer symbol) pointer)) +(define-extern dgo-load-continue "Tell the DGO loader that the previous temporary object can be +replaced and supply the updated heap destination for a possible final object. Return the command +record address as an integer." (function pointer int)) +(define-extern dgo-load-cancel "Synchronize the DGO RPC and cancel the active load. Call this +between receiving an object and requesting the next one; cancelling during an object transfer can +stall for several frames." (function none)) +(define-extern find-temp-buffer "Return a 16-byte-aligned address in the current frame's global DMA +buffer when it has room for size/16 plus two quadwords, otherwise return #f. The second branch +repeats the same test and is unreachable." (function int pointer)) +(define-extern dgo-load-link "Check the loaded object's heap bounds, remember its name, and start +linking its data into heap. print-login enables linker login output; last-object enables the final +object placement notice. Return whether linking started successfully." + (function dgo-header kheap symbol symbol symbol)) +(define-extern destroy-mem "Fill the half-open range from start up to but not including end with +#xffffffff in four-byte steps." (function (pointer uint32) (pointer uint32) none)) ;; - Symbols @@ -16589,6 +19190,8 @@ ;; - Types (deftype ramdisk-rpc-fill (structure) + "A reset-and-load request for the IOP RAM disk. It discards the previous contents, loads filename +from DVD, and assigns the caller-provided ee-id to the cached file." ((rsvd1 int32 :offset-assert 0) (ee-id int32 :offset-assert 4) (rsvd2 int32 2 :offset-assert 8) @@ -16600,6 +19203,10 @@ ) (deftype ramdisk-rpc-load (structure) + "A request for a slice of a file cached in the IOP RAM disk. ee-id selects the file, offset and +length select its bytes, and the RPC response copies those bytes into an EE destination supplied +separately. length must not exceed 8192, and the caller must keep the requested range inside the +file." ((rsvd int32 :offset-assert 0) (ee-id int32 :offset-assert 4) (offset uint32 :offset-assert 8) @@ -16611,6 +19218,8 @@ ) (deftype ramdisk-rpc-load-to-ee (structure) + "A bypass-load request that copies filename directly from DVD to the EE address in addr without +using the IOP RAM disk. length is the requested byte count; offset is not used by the handler." ((rsvd int32 :offset-assert 0) (addr int32 :offset-assert 4) (offset int32 :offset-assert 8) @@ -16624,8 +19233,10 @@ ;; - Functions -(define-extern ramdisk-load (function int uint uint pointer int)) -(define-extern ramdisk-sync (function none)) +(define-extern ramdisk-load "Begin copying length bytes at offset from the RAM-disk file identified +by file-id into destination. The transfer is asynchronous; return zero after submitting it." + (function int uint uint pointer int)) +(define-extern ramdisk-sync "Wait for the active RAM-disk RPC to finish." (function none)) ;; - Symbols @@ -16642,6 +19253,9 @@ ;; - Types (deftype sound-iop-info (basic) + "Per-vblank status copied from the IOP sound driver: stream position and ID, sound-memory +availability, 48 voice states, disc status, and timing diagnostics. The IOP DMA writes #x110 bytes +starting at frame, extending 12 bytes past the nominal type into the 16-byte allocator padding." ((frame uint32 :offset 16) (strpos int32 :offset-assert 20) (str-id sound-id :offset-assert 24) @@ -16663,6 +19277,8 @@ ) (deftype flava-table-row (structure) + "The music variation number selected for each music-flava event in one music bank. Zero means the +event has no alternate variation for this bank." ((music symbol :offset-assert 0) (flava uint8 50 :offset-assert 4) ) @@ -16673,6 +19289,7 @@ ) (deftype flava-table (basic) + "Up to twenty per-music variation maps; count is the number of initialized rows." ((row flava-table-row 20 :inline :offset-assert 4) (count int32 :offset-assert 1284) ) @@ -16683,55 +19300,109 @@ ;; - Functions -(define-extern math-camera-pos (function vector)) -(define-extern target-pos (function int vector)) -(define-extern camera-pos (function vector)) -(define-extern new-sound-id (function sound-id)) -(define-extern get-sound-buffer-entry (function pointer)) -(define-extern sound-trans-convert (function vector3w vector int)) -(define-extern sound-stop (function sound-id int)) -(define-extern effect-param->sound-spec (function sound-spec (pointer float) int sound-spec)) -(define-extern ear-trans (function vector)) -(define-extern sound-play-by-spec (function sound-spec sound-id vector sound-id)) -(define-extern sound-play-by-name (function sound-name sound-id int int int sound-group symbol sound-id)) -(define-extern sound-angle-convert (function float int)) -(define-extern sound-set-ear-trans (function vector vector float int)) -(define-extern activate-progress (function process progress-screen none)) +(define-extern math-camera-pos "Return the renderer's current camera translation." (function vector)) +(define-extern target-pos + "Return the target root position for joint-index zero or the selected joint translation +otherwise. Fall back to the camera position when no target exists." + (function int vector)) +(define-extern camera-pos "Return the active camera position. Prefer the combiner output while a + camera transition is active, otherwise use the renderer camera, with a zero-vector fallback + before camera initialization." (function vector)) +(define-extern new-sound-id "Allocate the next sound ID, reserving values below #x10000 even after +the counter wraps." (function sound-id)) +(define-extern get-sound-buffer-entry "Reserve and return the next command in the current sound +player RPC buffer." (function pointer)) +(define-extern sound-trans-convert "Store src divided by 16 and truncated to integer coordinates in +dest. A false src uses the current listener position." (function vector3w vector int)) +(define-extern sound-stop "Queue a stop command for sound ID." (function sound-id int)) +(define-extern effect-param->sound-spec + "Apply opcode/value pairs to spec. Opcodes set or randomly add volume, pitch, and bend; set falloff +minimum, maximum, and curve; or set priority. value-count counts floats and is consumed two at a +time." + (function sound-spec (pointer float) int sound-spec)) +(define-extern ear-trans "Return the active listener position: math-camera during movies or +external-camera control, target position when a target exists, otherwise camera position." + (function vector)) +(define-extern sound-play-by-spec "Queue playback using spec and return id. trans is the sound +position; #t selects the current process drawable's root, and #f falls back to the listener." + (function sound-spec sound-id object sound-id)) +(define-extern sound-play-by-name "Queue name with the supplied sound ID, IOP-scale volume, pitch, +bend, and group, then return id. trans may be a position, #t for the current process drawable's +root, or #f for the listener." (function sound-name sound-id int int int sound-group object sound-id)) +(define-extern sound-angle-convert "Interpret the low signed 16 bits of angle as one full turn, +convert them to integer degrees, and wrap the result into zero through 359." (function float int)) +(define-extern sound-set-ear-trans "Queue the listener position, camera position, and camera angle +used by IOP spatialization." (function vector vector float int)) +(define-extern activate-progress + "Open screen in the progress process. Spawn and initialize the progress process when absent; + otherwise push the current screen before starting the requested transition." + (function process progress-screen none)) (define-extern kset-language (function language-enum int)) -(define-extern sound-command->string (function sound-command string)) -(define-extern sound-name= (function sound-name sound-name symbol)) -(define-extern str-is-playing? (function symbol)) -(define-extern current-str-id (function sound-id)) -(define-extern current-str-pos (function sound-id int)) -(define-extern is-cd-in? (function symbol)) -(define-extern check-irx-version (function int)) -(define-extern sound-bank-load (function sound-name sound-id)) -(define-extern sound-bank-unload (function sound-name int)) -(define-extern sound-music-load (function sound-name int)) -(define-extern sound-music-unload (function int)) -(define-extern sound-reload-info (function int)) -(define-extern set-language (function language-enum int)) -(define-extern list-sounds (function int)) -(define-extern sound-buffer-dump (function int)) -(define-extern swap-sound-buffers (function vector vector float int)) -(define-extern free-last-sound-buffer-entry (function int)) -(define-extern sound-basic-cb (function int (pointer int32) none)) -(define-extern sound-set-volume (function sound-group float int)) -(define-extern sound-set-reverb (function int float float uint int)) -(define-extern sound-pause (function sound-id int)) -(define-extern sound-continue (function sound-id int)) -(define-extern sound-group-pause (function sound-group int)) -(define-extern sound-group-stop (function sound-group int)) -(define-extern sound-group-continue (function sound-group int)) -(define-extern sound-set-falloff-curve (function int float float int)) -(define-extern sound-set-sound-falloff (function sound-name int int int int)) -(define-extern sound-set-flava (function uint int)) -(define-extern sound-volume-off (function int)) -(define-extern sound-set-fps (function int int)) -(define-extern show-iop-info (function dma-buffer int)) -(define-extern show-iop-memory (function dma-buffer int)) -(define-extern make-sqrt-table (function int)) -(define-extern flava-lookup (function symbol music-flava int)) +(define-extern sound-command->string "Return the debug name of a sound command." + (function sound-command string)) +(define-extern sound-name= "Return whether both 64-bit halves of two packed sound names match." + (function sound-name sound-name symbol)) +(define-extern str-is-playing? "Return whether the IOP reports an active streamed-audio position." + (function symbol)) +(define-extern current-str-id "Return the IOP-reported streamed-audio sound ID." + (function sound-id)) +(define-extern current-str-pos "Return the current streamed-audio position for id, or -1 when +another stream is active." (function sound-id int)) +(define-extern is-cd-in? "Return whether the IOP reports that a disc is present." (function symbol)) +(define-extern check-irx-version "Register the per-vblank sound-status destination, print the IOP +sound driver's version, and crash unless it is version 2.0." (function int)) +(define-extern sound-bank-load "Submit a sound-effect bank load and return a newly allocated sound +ID." (function sound-name sound-id)) +(define-extern sound-bank-unload "Submit a sound-effect bank unload." (function sound-name int)) +(define-extern sound-music-load "Submit a music-bank load, replacing the current music bank on the +IOP." (function sound-name int)) +(define-extern sound-music-unload "Submit a request to fade out and unload the current music bank." + (function int)) +(define-extern sound-reload-info "Submit a request to refresh the IOP sound-bank information." + (function int)) +(define-extern set-language "Set the kernel language and submit the same language to the IOP sound +loader." (function language-enum int)) +(define-extern list-sounds "Ask the IOP sound driver to print its active sounds." (function int)) +(define-extern sound-buffer-dump "Print the commands currently queued in the EE sound-player +buffer, including the name of each play command." (function int)) +(define-extern sound-set-mirror-mode "Submit the PC mirror-mode extension when mode changes." + (function sound-mirror-mode none)) +(define-extern swap-sound-buffers "Submit this frame's queued sound-player commands after appending +listener state when space permits. Disable new sound commands while the previous RPC remains busy, +and show the no-disc or bad-disc screen reported by the IOP." + (function vector vector float int)) +(define-extern free-last-sound-buffer-entry "Discard the most recently reserved sound-player +command." (function int)) +(define-extern sound-basic-cb "Store value in result." + (function int (pointer int32) none)) +(define-extern sound-set-volume "Queue a group master volume, converting percentage to the IOP's +0-to-1024 scale." (function sound-group float int)) +(define-extern sound-set-reverb "Queue reverb type and normalized left/right depths for the selected +SPU core mask." (function int float float uint int)) +(define-extern sound-pause "Queue a pause command for sound ID." (function sound-id int)) +(define-extern sound-continue "Queue a continue command for sound ID." (function sound-id int)) +(define-extern sound-group-pause "Queue a pause command for every sound in group." + (function sound-group int)) +(define-extern sound-group-stop "Queue a stop command for every sound in group." + (function sound-group int)) +(define-extern sound-group-continue "Queue a continue command for every sound in group." + (function sound-group int)) +(define-extern sound-set-falloff-curve "Define one cubic distance-attenuation curve from normalized +falloff and ease parameters, converted to signed 12.12 fixed point." (function int float float int)) +(define-extern sound-set-sound-falloff "Assign a sound's near and far attenuation distances and +falloff-curve index in its loaded bank." (function sound-name int int int int)) +(define-extern sound-set-flava "Queue the current music variation number." (function uint int)) +(define-extern sound-volume-off "Set the music, sound-effect, and ambient volume settings to zero." + (function int)) +(define-extern sound-set-fps "Queue the PC sound driver's frame rate." (function int int)) +(define-extern show-iop-info "Draw the active/inactive state of the IOP's 24 voices on each SPU +core." (function dma-buffer int)) +(define-extern show-iop-memory "Draw live IOP free memory and the free-memory baseline recorded +after RAM-disk allocation, in bytes and KiB." (function dma-buffer int)) +(define-extern make-sqrt-table "Print the 256-entry integer square-root table used by the IOP's +distance-attenuation calculation as C source." (function int)) +(define-extern flava-lookup "Return the music variation mapped to event for music, or zero when the +music or event has no mapping." (function symbol music-flava int)) ;; - Symbols @@ -16753,12 +19424,30 @@ ;; - Functions -(define-extern transformq-copy! (function transformq transformq transformq)) -(define-extern matrix<-transformq! (function matrix transformq matrix)) -(define-extern matrix<-no-trans-transformq! (function matrix transformq matrix)) -(define-extern matrix<-transformq+trans! (function matrix transformq vector matrix)) -(define-extern matrix<-transformq+world-trans! (function matrix transformq vector matrix)) -(define-extern matrix<-parented-transformq! (function matrix transformq vector matrix)) +(define-extern transformq-copy! + "Copy translation, quaternion rotation, and scale from src to dst." + (function transformq transformq transformq)) +(define-extern matrix<-transformq! + "Convert src to an affine matrix, scaling its three rotation axes and forcing translation.w to +one." + (function matrix transformq matrix)) +(define-extern matrix<-no-trans-transformq! + "Convert src rotation and scale to an affine matrix with zero translation and homogeneous w equal +to one." + (function matrix transformq matrix)) +(define-extern matrix<-transformq+trans! + "Convert src to an affine matrix and add local-offset.xyz after scaling and rotating it into world +space. local-offset.w is ignored." + (function matrix transformq vector matrix)) +(define-extern matrix<-transformq+world-trans! + "Convert src to an affine matrix and add world-offset.xyz directly to its world-space translation. +world-offset.w is ignored." + (function matrix transformq vector matrix)) +(define-extern matrix<-parented-transformq! + "Prepare src for composition with a nonuniformly scaled parent. Divide every scaled rotation-axis +component by the corresponding nonzero parent-scale component so the later parent multiplication +does not apply that scale again; copy translation unchanged." + (function matrix transformq vector matrix)) ;; ---------------------- @@ -16769,17 +19458,62 @@ ;; - Functions -;; pt, u, sphere, rad -(define-extern ray-sphere-intersect (function vector vector vector float float)) -(define-extern raw-ray-sphere-intersect (function float float)) -(define-extern ray-circle-intersect (function vector vector vector float float)) -(define-extern ray-cylinder-intersect (function vector vector vector vector float float vector float)) -(define-extern ray-plane-intersect (function vector vector vector vector vector vector vector float)) -(define-extern ray-triangle-intersect (function vector vector float matrix vector vector float)) -(define-extern collide-do-primitives (function float)) ;; NOTE - didn't bother to check input args -(define-extern moving-sphere-sphere-intersect (function vector vector vector vector float)) -(define-extern moving-sphere-moving-sphere-intersect (function vector vector vector vector vector float)) -(define-extern moving-sphere-triangle-intersect (function vector vector float collide-cache-tri vector vector float)) +(define-extern ray-sphere-intersect + "Return the first contact fraction for a finite ray against a sphere. ray-direction spans the +whole probe rather than being unit length, so zero is the ray origin and one is its end. Return +zero when the origin is inside the sphere and COLLISION_MISS when contact lies outside the probe." + (function vector vector vector float float)) +(define-extern raw-ray-sphere-intersect + "Solve the finite ray-sphere quadratic for a sphere at the origin. radius is passed normally; +ray-relative-origin and ray-direction occupy VU0 vf1 and vf2 under the EE calling +convention. Return zero from inside the sphere and COLLISION_MISS for a miss." + (function float float)) +(define-extern ray-circle-intersect + "Return the first contact fraction for a finite ray against a circle in the XZ plane. The Y +components of the origin, direction, and circle center are ignored." + (function vector vector vector float float)) +(define-extern ray-cylinder-intersect + "Return the first contact fraction for a finite ray against the curved side of a finite cylinder. +cylinder-axis must be unit length and cylinder-length measures from cylinder-origin along that +axis. End caps are not tested. Write the corresponding point on the cylinder axis to axis-point-out; +only use that output after a nonnegative return. Return COLLISION_MISS when the ray misses or meets +the infinite cylinder beyond either end." + (function vector vector vector vector float float vector float)) +(define-extern ray-plane-intersect + "Intersect a ray with the infinite plane through plane-a, plane-b, and plane-c. Write the +intersection point and a unit plane normal to the output vectors, and return the ray parameter. +Return COLLISION_MISS without writing the outputs when the ray is parallel to the plane; this +function does not restrict the parameter to the finite zero-to-one probe interval." + (function vector vector vector vector vector vector vector float)) +(define-extern ray-triangle-intersect + "Intersect a ray with the triangle formed by the first three rows of triangle. Write the plane +intersection and unit triangle normal to the output vectors. When radius rounds to a nonzero +integer, move the returned fraction earlier by radius divided by the ray length and clamp it to +zero; the inside test still uses the centerline-plane intersection. Return COLLISION_MISS for a +parallel ray, a contact behind the origin, or a point outside the triangle." + (function vector vector float matrix vector vector float)) +(define-extern collide-do-primitives + "Sweep a sphere against the three vertices and three edges of triangle and retain the earliest +contact within the finite motion. On a hit, write the contacted vertex or closest point on the +contacted edge to contact-out. Return COLLISION_MISS when none of the six boundary primitives is +hit; contact-out is undefined in that case." + (function vector vector float collide-cache-tri vector float)) +(define-extern moving-sphere-sphere-intersect + "Sweep a moving sphere along motion against a static sphere. Sphere vectors store center in xyz +and radius in w. Write the point on the moving sphere facing the static center at first contact and +return its fraction along motion, or COLLISION_MISS." + (function vector vector vector vector float)) +(define-extern moving-sphere-moving-sphere-intersect + "Sweep two moving spheres over the same zero-to-one interval using their relative motion. Sphere +vectors store center in xyz and radius in w. Write the point on the first sphere facing the second +at first contact and return the fraction, or COLLISION_MISS." + (function vector vector vector vector vector float)) +(define-extern moving-sphere-triangle-intersect + "Sweep a sphere from sphere-start along sphere-motion against triangle. First reject disjoint +swept bounds, then test the triangle face thickened by radius; when the projected face point falls +outside the triangle, test its three vertices and edges. Write the triangle contact point and unit +normal and return the earliest zero-to-one contact fraction, or COLLISION_MISS." + (function vector vector float collide-cache-tri vector vector float)) ;; ---------------------- @@ -16790,38 +19524,133 @@ ;; - Functions -(define-extern flatten-joint-control-to-spr (function joint-control int)) -(define-extern make-joint-jump-tables (function int)) -(define-extern calc-animation-from-spr (function (inline-array vector) int none)) -(define-extern decompress-fixed-data-to-accumulator (function none)) -(define-extern decompress-frame-data-to-accumulator (function none)) -(define-extern decompress-frame-data-pair-to-accumulator (function none)) -(define-extern matrix-from-control! (function matrix-stack joint joint-control symbol matrix)) -(define-extern matrix-from-control-channel! (function matrix joint joint-control-channel matrix)) -(define-extern matrix-from-control-pair! (function matrix matrix joint matrix)) -(define-extern matrix-from-joint-anim-frame (function joint-anim-compressed-control int int matrix)) ;; ??? -(define-extern create-interpolated-joint-animation-frame (function (inline-array vector) int process-drawable int)) -(define-extern mem-size (function basic symbol int int)) -(define-extern jacc-mem-usage (function joint-anim-compressed-control memory-usage-block int joint-anim-compressed-control)) -(define-extern joint-anim-inspect-elt (function joint-anim float joint-anim)) -(define-extern joint-anim-login (function joint-anim-drawable joint-anim-drawable)) -(define-extern joint-control-channel-eval (function joint-control-channel none)) -(define-extern joint-control-channel-eval! (function joint-control-channel (function joint-control-channel float float float) none)) -(define-extern joint-control-channel-group-eval! (function joint-control-channel art-joint-anim (function joint-control-channel float float float) int)) -(define-extern joint-control-channel-group! (function joint-control-channel art-joint-anim (function joint-control-channel float float float) int)) -(define-extern joint-control-copy! (function joint-control joint-control joint-control)) -(define-extern joint-control-remap! (function joint-control art-group art-group pair int string symbol)) -(define-extern cspace<-cspace! (function cspace cspace matrix)) -(define-extern cspace<-rot-yxy! (function cspace transform matrix)) ;; unused -(define-extern cspace<-transform-yxy! (function cspace transform matrix)) ;; unused -(define-extern cspace<-transformq+trans! (function cspace transformq vector matrix)) -(define-extern cspace<-transformq+world-trans! (function cspace transformq vector matrix)) -(define-extern cspace-calc-total-matrix! (function cspace matrix matrix)) -(define-extern cspace<-matrix-no-push-joint! (function cspace joint-control matrix)) -(define-extern cspace<-matrix-joint! (function cspace matrix matrix)) -(define-extern cspace<-parented-matrix-joint! (function cspace matrix matrix)) -(define-extern clear-frame-accumulator (function (inline-array vector) none)) -(define-extern normalize-frame-quaternions function) +(define-extern flatten-joint-control-to-spr + "Evaluate the joint controller's postfix blend commands into per-channel weights, then describe +each contributing animation frame for the scratchpad decompressor. Adjacent frames are uploaded +together when interpolation is nonzero. The final weights are also copied to inspector-amount." + (function joint-control int)) +(define-extern make-joint-jump-tables + "Install the 16 control-nibble destinations used by the fixed, frame, and frame-pair +decompressors. Each entry points directly into the corresponding assembly function so absent +translation, quaternion, or scale components can be skipped without testing every component." + (function int)) +(define-extern calc-animation-from-spr + "Clear the destination frame, DMA each requested compressed animation from scratchpad, accumulate +its fixed and frame-varying components at the requested blend weight, and normalize the resulting +quaternions. joint-count includes the two matrix entries at the front of the frame." + (function (inline-array vector) int none)) +(define-extern decompress-fixed-data-to-accumulator + "Accumulate one animation's fixed matrices and transform components. This assembly function uses +the decompressor state already assigned to EE saved registers by calc-animation-from-spr." + (function none)) +(define-extern decompress-frame-data-to-accumulator + "Accumulate one compressed frame at its current blend weight. This assembly function uses the +decompressor state already assigned to EE saved registers by calc-animation-from-spr." + (function none)) +(define-extern decompress-frame-data-pair-to-accumulator + "Interpolate two adjacent compressed frames, then accumulate their translation, quaternion, and +scale components. This assembly function uses the decompressor state already assigned to EE saved +registers by calc-animation-from-spr." + (function none)) +(define-extern matrix-from-control! + "Evaluate a joint controller's postfix channel commands for one of the two matrix joints. push +adds a matrix to matrix-stack, blend combines a channel with the current matrix, and stack combines +the top two matrices. no-push handles the paired push1/stack form without growing the stack." + (function matrix-stack joint joint-control symbol matrix)) +(define-extern matrix-from-control-channel! + "Write one matrix joint from a controller channel. Clamp its frame to the animation range, copy +an exact integral frame, or interpolate the two neighboring frames." + (function matrix joint joint-control-channel matrix)) +(define-extern matrix-from-control-pair! + "Blend the current matrix with the matrix selected by channel. Nonpositive interpolation keeps +the current matrix, interpolation at least one replaces it, and intermediate values lerp them." + (function matrix joint-control-channel joint matrix)) +(define-extern matrix-from-joint-anim-frame + "Return matrix-index zero or one from the fixed animation data or the selected frame, according +to matrix-bits in the compressed header." + (function joint-anim-compressed-control int int matrix)) +(define-extern create-interpolated-joint-animation-frame + "Generate a drawable's blended joint-animation frame. The GOAL decompressor is normally used; +the original scratchpad decompressor remains available through the development switch." + (function (inline-array vector) int process-drawable int)) +(define-extern mem-size + "Collect value's memory categories using flags, optionally print the complete category table, + and return the sum of aligned total bytes." + (function basic symbol int int)) +(define-extern jacc-mem-usage + "Account for a compressed animation control block, its fixed data, and each compressed frame." + (function joint-anim-compressed-control memory-usage-block int joint-anim-compressed-control)) +(define-extern joint-anim-inspect-elt + "Inspect the payload element selected by rounding index to an integer. Matrix and transformq +animations have specialized displays; other animation payload types are left unchanged." + (function joint-anim float joint-anim)) +(define-extern joint-anim-login + "Log in every populated drawable payload in an animation." + (function joint-anim-drawable joint-anim-drawable)) +(define-extern joint-control-channel-eval + "Evaluate a channel with its current numeric callback and parameters, then record the evaluation +time." + (function joint-control-channel none)) +(define-extern joint-control-channel-eval! + "Install a numeric callback, evaluate it with the channel parameters, and record the evaluation +time." + (function joint-control-channel (function joint-control-channel float float float) none)) +(define-extern joint-control-channel-group-eval! + "Install a channel callback and optional animation group, then evaluate it and record the time. +A stack command records the callback but does not select or evaluate an animation." + (function joint-control-channel art-joint-anim (function joint-control-channel float float float) int)) +(define-extern joint-control-channel-group! + "Install a channel callback and optional animation group without evaluating it. A stack command +records only the callback." + (function joint-control-channel art-joint-anim (function joint-control-channel float float float) int)) +(define-extern joint-control-copy! + "Copy the controller state and allocated channel records, preserve the selected root-channel +index, and retarget every copied channel's parent to the destination controller." + (function joint-control joint-control joint-control)) +(define-extern joint-control-remap! + "Retarget every active animation channel from old-art-group to matching animations in +new-art-group. Build names with new-prefix, apply optional indexed aliases from renames, and fall +back to the first joint animation at frame zero when a match is absent. Return true only when every +channel was matched." + (function joint-control art-group art-group pair int string symbol)) +(define-extern cspace<-cspace! + "Copy the bone transform from source into destination." + (function cspace cspace matrix)) +(define-extern cspace<-rot-yxy! + "Build destination's bone rotation from a Y-X-Y Euler transform and apply its scale." + (function cspace transform matrix)) ;; unused +(define-extern cspace<-transform-yxy! + "Build destination's bone matrix from a Y-X-Y Euler transform, translation, and scale." + (function cspace transform matrix)) ;; unused +(define-extern cspace<-transformq+trans! + "Build destination's bone matrix from a quaternion transform plus an added local translation." + (function cspace transformq vector matrix)) +(define-extern cspace<-transformq+world-trans! + "Build destination's bone matrix from a quaternion transform plus an added world-space +translation." + (function cspace transformq vector matrix)) +(define-extern cspace-calc-total-matrix! + "Compose this coordinate space's bone transform with the camera temporary matrix." + (function cspace matrix matrix)) +(define-extern cspace<-matrix-no-push-joint! + "Evaluate this coordinate space's matrix joint with no-push channel semantics and copy the +result into its bone transform." + (function cspace joint-control matrix)) +(define-extern cspace<-matrix-joint! + "Copy a matrix joint directly into this coordinate space's bone transform." + (function cspace matrix matrix)) +(define-extern cspace<-parented-matrix-joint! + "Compose a matrix joint with the parent coordinate space's bone transform." + (function cspace matrix matrix)) +(define-extern clear-frame-accumulator + "Zero the two leading matrices and every following transformq accumulator. The destination is +passed normally; calc-animation-from-spr supplies the joint count in its saved-register ABI." + (function (inline-array vector) none)) +(define-extern normalize-frame-quaternions + "Set translation and scale w to one and normalize every accumulated transform quaternion after +the two leading matrices. The destination is passed normally; calc-animation-from-spr supplies the +joint count in its saved-register ABI." + (function (inline-array vector) none)) ;; ---------------------- @@ -16850,7 +19679,11 @@ ;; - Functions -(define-extern ray-arbitrary-circle-intersect (function vector vector vector vector float float)) +(define-extern ray-arbitrary-circle-intersect + "Intersect the finite probe origin + fraction * displacement with the filled disk centered at +circle-origin in circle-normal's plane. Return a zero-to-one fraction only when the plane contact +lies strictly inside radius; return COLLISION_MISS otherwise." + (function vector vector vector vector float float)) (define-extern camera-line (function vector vector vector4w none)) @@ -16862,7 +19695,13 @@ ;; - Functions -(define-extern update-wind (function wind-work (array uint8) none)) +(define-extern update-wind + "Advance the shared procedural wind. Random-walk the ground-plane heading, then linearly +interpolate the cyclic gust table over 120 effective ticks per entry and multiply that envelope by +a fresh random amplitude. Store the resulting scalar force and direction in the current slot of +the 64-sample ring. work must be *wind-work*, and gust-table must not be empty. The PC time ratio +adjusts gust/ring progression and output magnitude for custom frame rates." + (function wind-work (array uint8) none)) ;; ---------------------- @@ -16873,11 +19712,26 @@ ;; - Functions -(define-extern print-cl-stat (function cl-stat string none)) -(define-extern clear-cl-stat (function cl-stat none)) -(define-extern mem-usage-bsp-tree (function bsp-header bsp-node memory-usage-block int none)) -(define-extern bsp-camera-asm (function bsp-header vector none)) -(define-extern print-collide-stats (function none)) +(define-extern print-cl-stat + "When stat contains work, print its fragment, triangle, and output totals with per-call averages +under label, then add those totals into the aggregate collision statistics." + (function cl-stat string none)) +(define-extern clear-cl-stat + "Zero a collision statistic's fragment, triangle, and output counters." + (function cl-stat none)) +(define-extern mem-usage-bsp-tree + "Recursively count the 32-byte internal nodes reachable from node in the BSP-node memory +category. Nonpositive terminal children are not followed; header and flags are unused." + (function bsp-header bsp-node memory-usage-block int none)) +(define-extern bsp-camera-asm + "Traverse the BSP for camera-position. At each split, select front when +dot(camera-position, plane.xyz) - plane.w is nonnegative. Store the terminal leaf index and that +side's packed neighboring-level flags in header." + (function bsp-header vector none)) +(define-extern print-collide-stats + "Print the frame's collision counts, per-call averages, and target timing breakdown, then clear +the counters and restart all three collision stopwatches." + (function none)) ;; - Unknowns @@ -16911,15 +19765,41 @@ (collide 15) (camera 16)) -(define-extern perf-stat-bucket->string (function perf-stat-bucket string)) -(define-extern print-tr-stat (function tr-stat string string none)) -(define-extern clear-tr-stat (function tr-stat none)) -(define-extern print-terrain-stats (function none)) -(define-extern update-subdivide-settings! (function subdivide-settings math-camera int none)) -(define-extern set-tfrag-dists! (function tfrag-dists none)) -(define-extern start-perf-stat-collection (function none)) -(define-extern end-perf-stat-collection (function none)) -(define-extern print-perf-stats (function none)) +(define-extern perf-stat-bucket->string + "Return the debug name of a performance-statistics bucket." + (function perf-stat-bucket string)) +(define-extern print-tr-stat + "Format and print a nonempty renderer-statistics bucket, then add its counters to the terrain + total. The strip column is the average number of triangles per triangle strip." + (function tr-stat string string none)) +(define-extern clear-tr-stat + "Zero all renderer-statistics counters in stat." + (function tr-stat none)) +(define-extern print-terrain-stats + "Print active-level memory use and every renderer-statistics bucket, update the display strings, + and clear the counters for the next reporting interval." + (function none)) +(define-extern update-subdivide-settings! + "Select a close/far LOD profile, construct five nonuniform world-distance thresholds, convert + them to camera-scaled distances, and update the tfragment thresholds." + (function subdivide-settings math-camera int none)) +(define-extern set-tfrag-dists! + "Fill the affine distance coefficients for the first two tfragment LOD bands. For distance d in + [near, far], y is (far - d) / (far - near), x is half of (d - near) / (far - near), and w stores + the far boundary." + (function tfrag-dists none)) +(define-extern start-perf-stat-collection + "Advance the rotating renderer performance sample, clear the selected bucket, and start its + selected counter pair. The EE uses its hardware counters; the PC records elapsed CPU-clock + ticks." + (function none)) +(define-extern end-perf-stat-collection + "Stop the all-code performance sample, accumulate the active counter pair, and copy each enabled + bucket's raw accumulators to its named result fields." + (function none)) +(define-extern print-perf-stats + "Print every performance-statistics bucket that collected at least one sample." + (function none)) ;; - Unknowns @@ -16933,7 +19813,7 @@ (define-extern *terrain-context* terrain-context) (define-extern GSH_ENABLE symbol) (define-extern GSH_BUCKET bucket-id) -(define-extern GSH_WHICH_STAT int) +(define-extern GSH_WHICH_STAT perf-counter-pair) (define-extern GSH_MAX_DISPLAY basic) (define-extern GSH_TIME int) (define-extern *gomi-stats-hack* (inline-array perf-stat)) @@ -17036,26 +19916,81 @@ ;; - Functions -(define-extern sprite-init-distorter (function dma-buffer uint none)) -(define-extern sprite-draw-distorters (function dma-buffer none)) -(define-extern sprite-add-frame-data (function dma-buffer uint none)) -(define-extern sprite-add-matrix-data (function dma-buffer uint none)) -(define-extern sprite-add-3d-all (function sprite-array-3d dma-buffer int none)) -(define-extern sprite-add-2d-all (function sprite-array-2d dma-buffer int none)) -(define-extern sprite-add-shadow-all (function fake-shadow-buffer dma-buffer none)) -(define-extern sprite-add-shadow-chunk (function fake-shadow-buffer int int dma-buffer none)) -(define-extern sprite-setup-header (function sprite-header int none)) -(define-extern sprite-add-3d-chunk (function sprite-array-3d int int dma-buffer none)) -(define-extern sprite-add-2d-chunk (function sprite-array-2d int int dma-buffer int none)) -(define-extern sprite-setup-frame-data (function sprite-frame-data int none)) -(define-extern clear-sprite-aux-list (function none)) -(define-extern add-to-sprite-aux-list (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none)) ;; it's a callback. -(define-extern sprite-set-3d-quaternion! (function sprite-vec-data-3d quaternion quaternion)) -(define-extern sprite-get-3d-quaternion! (function quaternion sprite-vec-data-3d quaternion)) -(define-extern sprite-draw (function display none)) -(define-extern sprite-allocate-user-hvdf (function int)) -(define-extern sprite-release-user-hvdf (function int none)) -(define-extern sprite-get-user-hvdf (function int vector)) +(define-extern sprite-init-distorter + "Configure the GS to sample the current framebuffer without writing depth, upload the radial warp + tables, and load the sprite-distortion VU1 program." + (function dma-buffer uint none)) +(define-extern sprite-draw-distorters + "Project each enabled warp sprite with its selected camera or screen matrix, discard clipped + sprites, replace an invalid radial turn count with 11, and shrink warps that cross the lower + screen edge. Pack visible sprites into VU1 batches of at most 170 and draw each as radial + framebuffer-texture strips." + (function dma-buffer none)) +(define-extern sprite-add-frame-data + "Build and upload the 41 quadwords of sprite constants shared by every chunk in this frame." + (function dma-buffer uint none)) +(define-extern sprite-add-matrix-data + "Upload either the camera transform and camera HVDF offset, or the screen-space transform and + all 75 allocatable user HVDF offsets, to the sprite VU1 program." + (function dma-buffer sprite-matrix-mode none)) +(define-extern sprite-add-3d-all + "Split one group of valid 3D sprites into chunks of at most 48 and append their VIF packets." + (function sprite-array-3d dma-buffer int none)) +(define-extern sprite-add-2d-all + "Split one group of valid 2D sprites into chunks of at most 48 and append their VIF packets. + Group 0 uses the world-space entry point and group 1 uses the screen-space entry point." + (function sprite-array-2d dma-buffer int none)) +(define-extern sprite-add-shadow-all + "Split the fake-shadow buffer into chunks of at most 48 and append their sprite packets." + (function fake-shadow-buffer dma-buffer none)) +(define-extern sprite-add-shadow-chunk + "Convert a range of temporary fake shadows into 3D sprite vectors and shaders in the DMA + buffer, then invoke the 3D sprite VU1 entry point." + (function fake-shadow-buffer int int dma-buffer none)) +(define-extern sprite-setup-header + "Set the sprite count in the one-quadword VIF upload header." + (function sprite-header int none)) +(define-extern sprite-add-3d-chunk + "Reference the vector and shader data for at most 48 3D sprites and invoke the VU1 3D entry + point." + (function sprite-array-3d int int dma-buffer none)) +(define-extern sprite-add-2d-chunk + "Reference the vector and shader data for at most 48 2D sprites and invoke the selected VU1 + entry point." + (function sprite-array-2d int int dma-buffer int none)) +(define-extern sprite-setup-frame-data + "Build the VU1 sprite constants for this frame: GIF tags, texture state, sine and cosine + coefficients, camera scales, unit-quad templates, perspective correction, color, and fog." + (function sprite-frame-data int none)) +(define-extern clear-sprite-aux-list + "Reset the sprite auxiliary list for the next frame without releasing its storage." + (function none)) +(define-extern add-to-sprite-aux-list + "Record a particle's four-byte 2D warp-sprite reference in the auxiliary list when space remains, + then clear the submitted 3D sprite's alpha. This is a sparticle callback." + (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern sprite-set-3d-quaternion! + "Store a 3D sprite quaternion as xyz. Negate xyz when w is negative so the omitted component can + always be reconstructed as the nonnegative square root; the packed sprite-scale lane is left + unchanged." + (function sprite-vec-data-3d quaternion quaternion)) +(define-extern sprite-get-3d-quaternion! + "Copy a 3D sprite's stored quaternion xyz into the destination and reconstruct nonnegative w as + sqrt(1 - x*x - y*y - z*z). The stored quaternion is expected to be normalized." + (function quaternion sprite-vec-data-3d quaternion)) +(define-extern sprite-draw + "Build the sprite bucket: run distorters, upload the VU1 program and frame constants, draw world + 3D and 2D sprites plus fake shadows, then upload the screen transform and draw HUD sprites." + (function display none)) +(define-extern sprite-allocate-user-hvdf + "Allocate one of the 75 user HVDF offsets and return its index, or return 0 when none is free." + (function int)) +(define-extern sprite-release-user-hvdf + "Release a user HVDF offset. Index 0 is reserved and out-of-range indices are ignored." + (function int none)) +(define-extern sprite-get-user-hvdf + "Return the HVDF offset vector at index without performing a bounds check." + (function int vector)) ;; - Symbols @@ -17117,8 +20052,15 @@ ;; - Functions (define-extern add-debug-line (function symbol bucket-id vector vector rgba symbol rgba symbol)) -(define-extern make-debug-sphere-table (function debug-sphere-table none)) -(define-extern add-debug-sphere-from-table (function bucket-id vector float rgba none)) +(define-extern make-debug-sphere-table + "Fill table with a unit-sphere latitude/longitude grid. Each cell stores its current point, the + next point around the same latitude, and the next point along the same longitude so drawing + needs no trigonometry." + (function debug-sphere-table none)) +(define-extern add-debug-sphere-from-table + "Draw a wireframe sphere in bucket by scaling the cached unit grid by radius, translating it to + center, and drawing one latitude edge and one longitude edge from every grid cell in color." + (function bucket-id vector float rgba none)) ;; - Symbols @@ -17172,45 +20114,143 @@ ;; - Functions (define-extern debug-set-camera-pos-rot! (function vector matrix vector)) -(define-extern drawable-frag-count (function drawable int)) -(define-extern add-debug-light (function symbol bucket-id light vector string symbol)) -(define-extern add-debug-text-3d (function symbol bucket-id string vector font-color vector2h symbol)) -(define-extern add-debug-x (function symbol bucket-id vector rgba symbol)) -(define-extern add-debug-curve (function symbol bucket-id (inline-array vector) int (pointer float) int rgba symbol)) -(define-extern add-debug-sphere (function symbol bucket-id vector float rgba symbol)) -(define-extern get-debug-text-3d (function debug-text-3d)) -(define-extern internal-draw-debug-text-3d (function bucket-id string vector font-color vector2h pointer)) -(define-extern get-debug-line (function debug-line)) -(define-extern internal-draw-debug-line (function bucket-id vector vector rgba symbol rgba pointer)) -(define-extern draw-string (function string dma-buffer font-context float)) -(define-extern transform-float-point (function vector vector4w vector4w)) -(define-extern add-debug-point (function symbol bucket-id vector symbol)) ;; unused -(define-extern add-debug-outline-triangle (function symbol bucket-id vector vector vector rgba symbol)) -(define-extern add-debug-triangle-normal (function symbol bucket-id vector vector vector rgba symbol)) -(define-extern add-debug-flat-triangle (function symbol bucket-id vector vector vector rgba symbol)) -(define-extern debug-reset-buffers (function symbol)) -(define-extern debug-draw-buffers (function symbol)) -(define-extern add-debug-line2d (function symbol bucket-id vector vector vector symbol)) -(define-extern add-debug-box (function symbol bucket-id vector vector rgba symbol)) -(define-extern add-debug-sphere-with-transform (function symbol bucket-id vector meters matrix rgba symbol)) -(define-extern add-debug-spheres (function symbol bucket-id (inline-array vector) int rgba symbol)) -(define-extern add-debug-circle (function symbol bucket-id vector float rgba matrix symbol)) -(define-extern add-debug-rot-matrix (function symbol bucket-id matrix vector matrix)) -(define-extern add-debug-yrot-vector (function symbol bucket-id vector float float rgba symbol)) -(define-extern add-debug-arc (function symbol bucket-id vector float float float rgba matrix symbol)) -(define-extern add-debug-curve2 (function symbol bucket-id curve rgba symbol symbol)) -(define-extern add-debug-points (function symbol bucket-id (inline-array vector) int rgba float int symbol)) ;; unused -(define-extern debug-percent-bar (function symbol bucket-id int int float rgba symbol)) -(define-extern debug-pad-display (function cpad-info symbol)) ;; unused -(define-extern add-debug-lights (function symbol bucket-id (inline-array light) vector symbol)) -(define-extern history-init (function pos-history int pos-history)) -(define-extern history-draw-and-update (function pos-history int vector symbol)) -(define-extern dma-timeout-cam (function vector)) -(define-extern display-file-info (function int)) +(define-extern drawable-frag-count + "Recursively count leaf drawables below drawable-data. False contributes zero, a drawable-group + contributes the sum of its children, and any other drawable contributes one." + (function drawable int)) +(define-extern drawable-tri-count + "Recursively count the triangles in drawable-data for debug geometry statistics." + (function drawable int)) +(define-extern drawable-vertex-ratio + "Accumulate drawable vertex statistics and return the displayed vertex-use ratio." + (function drawable debug-vertex-stats int)) +(define-extern add-debug-light + "When the light has a nonzero level, draw its direction from origin and place a labeled sphere at + the level-scaled endpoint. The sphere color is derived from the light color." + (function symbol bucket-id light vector string symbol)) +(define-extern add-debug-text-3d + "Draw text at location with font-color-id and an optional 2D offset. During pauseable drawing, + copy at most 79 characters into the persistent text buffer. The PC may filter distant strings." + (function symbol bucket-id string vector font-color vector2h symbol)) +(define-extern add-debug-x + "Draw two short perpendicular lines centered at center in the xz plane." + (function symbol bucket-id vector rgba symbol)) +(define-extern add-debug-curve + "Draw a curve from its control vertices and knots by evaluating four line segments per control + vertex over normalized progress from zero through one." + (function symbol bucket-id (inline-array vector) int (pointer float) int rgba symbol)) +(define-extern add-debug-sphere + "Draw a wireframe sphere of radius at center." + (function symbol bucket-id vector float rgba symbol)) +(define-extern get-debug-text-3d + "Reserve the next persistent 3D debug-text entry, or return false when the buffer is full." + (function debug-text-3d)) +(define-extern internal-draw-debug-text-3d + "Project location, apply the 2D offset, and append text with font-color-id to bucket immediately." + (function bucket-id string vector font-color vector2h pointer)) +(define-extern get-debug-line + "Reserve the next persistent debug-line entry, or return false when the buffer is full." + (function debug-line)) +(define-extern internal-draw-debug-line + "Project and draw a 3D line immediately. A false mode uses the supplied colors, fade halves the + second endpoint RGB, and fade-depth scales both endpoint colors by projected depth. A second + color of -1 or opaque white reuses the first color." + (function bucket-id vector vector rgba symbol rgba pointer)) +(define-extern draw-string + "Draw str with ctxt's transform, origin, colors, size, alignment, shadow, and kerning settings. + Interpret embedded font commands while appending glyph packets to buf and return the horizontal + displacement from the starting origin." + (function string dma-buffer font-context float)) +(define-extern transform-float-point + "Transform in with the cached camera registers, perform perspective division and GS offset and + depth clamping, convert to 28.4 fixed point, store the result in out, and return out. The input + precedes the output, unlike most destructive vector functions." + (function vector vector4w vector4w)) +(define-extern add-debug-point + "Draw a projected point as a large four-vertex red, green, and blue gradient diamond." + (function symbol bucket-id vector symbol)) ;; unused +(define-extern add-debug-outline-triangle + "Draw the three edges of a triangle." + (function symbol bucket-id vector vector vector rgba symbol)) +(define-extern add-debug-triangle-normal + "Draw a one-meter normal from the centroid of the triangle." + (function symbol bucket-id vector vector vector rgba symbol)) +(define-extern add-debug-flat-triangle + "Project and draw one flat-shaded triangle." + (function symbol bucket-id vector vector vector rgba symbol)) +(define-extern debug-reset-buffers + "Clear the persistent line and 3D-text counts and leave pauseable drawing disabled." + (function symbol)) +(define-extern debug-draw-buffers + "Draw every persistent debug line and 3D text entry." + (function symbol)) +(define-extern add-debug-line2d + "Convert two screen-coordinate points to GS coordinates and draw a line with the supplied packed + color vector." + (function symbol bucket-id vector vector vector symbol)) +(define-extern add-debug-box + "Draw all twelve edges of the axis-aligned box bounded by min-point and max-point." + (function symbol bucket-id vector vector rgba symbol)) +(define-extern add-debug-sphere-with-transform + "Transform point by xform and draw a sphere of radius at the result. The sphere itself remains + axis-aligned; xform changes only its center." + (function symbol bucket-id vector meters matrix rgba symbol)) +(define-extern add-debug-spheres + "Draw count spheres from centers, taking each sphere's radius from the center vector's w lane." + (function symbol bucket-id (inline-array vector) int rgba symbol)) +(define-extern add-debug-circle + "Draw a twelve-segment circle of radius around center. An optional orientation rotates its local + xz plane before translation." + (function symbol bucket-id vector float rgba matrix symbol)) +(define-extern add-debug-rot-matrix + "Draw the three two-meter basis axes of rotation at origin, using red for x, green for y, and blue + for z. Return rotation." + (function symbol bucket-id matrix vector matrix)) +(define-extern add-debug-yrot-vector + "Draw a line of length from origin in the horizontal direction selected by yrot." + (function symbol bucket-id vector float float rgba symbol)) +(define-extern add-debug-arc + "Draw a twelve-segment arc from start-angle through end-angle at radius around center, plus radial + lines at both ends. An optional orientation rotates the local xz plane before translation." + (function symbol bucket-id vector float float float rgba matrix symbol)) +(define-extern add-debug-curve2 + "Draw curve-data with add-debug-curve. unused-option is retained for the legacy interface." + (function symbol bucket-id curve rgba symbol symbol)) +(define-extern add-debug-points + "Label and mark count points. A nonzero fixed-y overrides every point's y coordinate, and + highlight-index is drawn white while the remaining points use color." + (function symbol bucket-id (inline-array vector) int rgba float int symbol)) ;; unused +(define-extern debug-percent-bar + "Draw a 255-pixel background bar and a ten-pixel-high colored fill at screen position x,y. The + fill width is 255 times fraction." + (function symbol bucket-id int int float rgba symbol)) +(define-extern debug-pad-display + "Shift a 32-sample stick history, append the current left-stick direction and speed, and draw the + samples as fading 2D squares." + (function cpad-info symbol)) ;; unused +(define-extern add-debug-lights + "Draw the three directional lights and ambient light in lights from origin." + (function symbol bucket-id (inline-array light) vector symbol)) +(define-extern history-init + "Set history's capacity to num-points and clear its lazily allocated point buffer." + (function pos-history int pos-history)) +(define-extern history-draw-and-update + "Allocate history storage on the debug heap when drawing first becomes enabled, append position + to the circular cursor, and when enabled draw adjacent stored samples without closing the ring." + (function pos-history int vector symbol)) +(define-extern dma-timeout-cam + "Set the debug camera to the fixed position and rotation used to investigate DMA timeouts." + (function vector)) +(define-extern display-file-info + "When enabled outside menus, print file versions, source asset names, and tool diagnostics for + every active level." + (function int)) ;; - Unknowns -(define-extern add-debug-vector (function symbol bucket-id vector vector meters rgba symbol)) +(define-extern add-debug-vector + "Draw a line from origin to origin plus direction times length." + (function symbol bucket-id vector vector meters rgba symbol)) (define-extern *debug-lines* (inline-array debug-line)) (define-extern *debug-lines-trk* debug-tracking-thang) (define-extern *debug-text-3ds* (inline-array debug-text-3d)) @@ -17291,15 +20331,42 @@ ;; - Functions -(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)) -(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 + "Append one fragment's blend-target data, active coefficients, and destination geometry to the + BLERC DMA chain. Split large vertex sets into scratchpad-sized blocks and return the next free + chain address." + (function int (pointer int16) dma-packet merc-blend-data merc-blend-ctrl pointer dma-packet)) +(define-extern setup-blerc-chains + "Append BLERC work for every blendable fragment in merc using target-weights. The first packet is + retained for blerc-execute, and dma-buffer advances past the completed chain." + (function merc-ctrl (pointer int16) dma-buffer none)) +(define-extern blerc-stats-init + "Print the preceding BLERC frame's optional range and workload statistics, then reset them." + (function none)) +(define-extern blerc-init + "Begin a BLERC frame by clearing the queued-chain head and tail after resetting statistics." + (function none)) +(define-extern blerc-a-fragment + "Apply every active blend target in one scratchpad block to its base vertices, clamp the packed + results to unsigned bytes, preserve the packed matrix/destination halfwords, and update optional + statistics." + (function blerc-block none)) +(define-extern dma-from-spr + "Wait for the from-scratchpad DMA channel, then copy qwc quadwords from scratchpad-src to dst." + (function uint pointer pointer none)) +(define-extern merc-dma-chain-to-spr + "Wait for the to-scratchpad DMA channel, then run the source chain so its payload is written at + scratchpad-dst." + (function pointer dma-packet none)) +(define-extern blerc-execute + "Execute the queued BLERC chain through two scratchpad buffers, overlap transfers with packed + blend-target arithmetic, and copy each completed vertex block back into its MERC fragment." + (function none)) +(define-extern merc-blend-shape + "Interpolate the drawable's signed blend-target weights for its current animation frame and queue + its level-zero MERC geometry. After BLERC is disabled, queue one zero-weight pass to restore the + base vertices." + (function process-drawable object)) ;; - Unknowns @@ -17315,14 +20382,43 @@ ;; - Functions -(define-extern merc-vu1-init-buffer (function bucket-id gs-test int none)) -(define-extern merc-vu1-initialize-chain (function dma-gif-packet dma-packet)) -(define-extern merc-vu1-add-vu-function (function dma-packet vu-function int dma-gif-packet)) -(define-extern get-eye-block (function int int int)) -(define-extern merc-stats-display (function merc-ctrl none)) -(define-extern merc-stats (function none)) -(define-extern merc-edge-stats (function none)) -(define-extern merc-vu1-init-buffers (function none)) +(define-extern merc-vu1-init-buffer + "If bucket-id received drawing commands, prepend a MERC VU1/GS initialization chain using test +and link it to the bucket's previous head. The third argument is reserved and currently unused." + (function bucket-id gs-test int none)) +(define-extern merc-vu1-initialize-chain + "Append the MERC microprogram upload, configure VIF1's 442-qword double buffers, upload the eight +low-memory constants, start VU1 at entry zero, and return the next DMA packet." + (function dma-gif-packet dma-packet)) +(define-extern merc-vu1-add-vu-function + "Append REF/MPG packets that upload func at its VU origin and return the next packet. Uploads are +split at 127 quadwords so each VIF NUM field can describe its 254 instructions. A zero flush-mode +uses FLUSHE; any other value uses FLUSHA." + (function dma-packet vu-function int dma-gif-packet)) +(define-extern get-eye-block + "Return the GS block address of one eye's 32x32 texture. slot picks the tile in the shared eye + render target and eye-index picks the left (0) or right (1) half of that tile. merc's adgif login + stores the result in tex0 tbp0 for the two shaders an art group marked as eye materials. + A tile is exactly one PSMCT32 page, so each slot advances 32 blocks. Inside the page the right eye + begins at pixel x 32, which is block column 4 of the page's 8x4 block grid, and PSMCT32's block + swizzle puts that at block 16. + The PC renderer keys eye textures off an index rather than a VRAM address, so its path returns + slot * 2 + eye-index." (function int int int)) +(define-extern merc-stats-display + "Print one MERC asset's texture-coordinate quantization range and per-effect fragment, vertex, +triangle, and strip-length statistics." + (function merc-ctrl none)) +(define-extern merc-stats + "Find every loaded MERC asset in the three level slots and print its geometry statistics." + (function none)) +(define-extern merc-edge-stats + "Find every loaded MERC asset in the three level slots and print its longest encoded edge." + (function none)) +(define-extern merc-vu1-init-buffers + "After drawing has filled the MERC buckets, prepend initialization chains to each nonempty +enabled bucket. Ordinary buckets use alpha reference #x26; water uses #x80 and preserves the +framebuffer on alpha failure." + (function none)) ;; - Unknowns @@ -17358,16 +20454,53 @@ ;; - Functions -(define-extern ripple-update-waveform-offs (function ripple-wave-set none)) -(define-extern ripple-slow-add-sine-waves (function ripple-wave-set float float float)) -(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-make-request (function ripple-wave merc-effect none)) -(define-extern ripple-execute (function none)) -(define-extern ripple-matrix-scale function) -(define-extern ripple-add-debug-sphere (function process-drawable vector float float none)) ; TODO - this could be a child type of process-drawable instead -(define-extern ripple-find-height (function process-drawable int vector float)) +(define-extern ripple-update-waveform-offs + "Advance every wave's 16-bit phase by the number of display frames since the wave set was last +updated. The PC port scales the advance for high frame rates so the animation retains its original +speed." + (function ripple-wave-set none)) +(define-extern ripple-slow-add-sine-waves + "Evaluate every wave at one grid coordinate, sum the scaled cosines, and clamp the height to the +signed-byte range used by the packed ripple table." + (function ripple-wave-set float float float)) +(define-extern ripple-execute-init + "Build the 256-entry VU0 cosine table used while generating ripple vertices. Each entry holds one +cosine sample and the delta to the next sample, allowing linear interpolation between samples." + (function none)) +(define-extern ripple-create-wave-table + "Convert an uninitialized wave set's directions and speeds, advance its phases, and sum its waves +into a 16 by 16 scratchpad height field. Pack the height and forward-difference x/z slopes into +unsigned bytes based at 128; neighbor reads wrap at the field edges so the table tiles." + (function ripple-wave-set int)) +(define-extern ripple-apply-wave-table + "Patch one MERC effect's packed vertices from the current ripple table. Each two-byte query +selects a table entry with its low nibbles; the entry supplies the vertex's y byte and x/z normal +bytes. Fragment geometry, query, and control streams advance according to their packed counts." + (function merc-effect symbol)) +(define-extern ripple-make-request + "Queue an effect to receive a waveform during this frame. Ignore duplicate effects and requests +beyond the sixteen-entry buffer." + (function ripple-wave merc-effect none)) +(define-extern ripple-execute + "Build each requested waveform table once, apply it to every queued effect that shares that +waveform, and clear the request list." + (function none)) +(define-extern ripple-matrix-scale + "Copy count 128-byte records from source to destination. Qwords at offsets 0, 32, and 80 are +copied unchanged; the vector at 16 is scaled by primary-scale, the vector at 48 has the original +16 vector times subtract-scale removed, and the vectors at 64 and 96 are scaled by secondary-scale." + (function pointer int float float float pointer none)) +(define-extern ripple-add-debug-sphere + "Transform one local ripple-grid point by the drawable's inverse yaw and root translation, then +draw a debug sphere at the resulting world position. x-slope and z-slope displace the local x/z +coordinates in proportion to the point's z component." + (function process-drawable vector float float none)) ; TODO - this could be a child type of process-drawable instead +(define-extern ripple-find-height + "Return the ripple surface height at point for a drawable whose first MERC effect is rippled. +Transform the point into the effect's grid, evaluate the four surrounding wave samples, bilinearly +interpolate them, and apply the drawable's faded or global ripple scale. The integer argument is +reserved and currently unused." + (function process-drawable int vector float)) ;; - Symbols @@ -17385,9 +20518,11 @@ (defenum bone-calc-flags :type uint16 :bitfield #t - (bncfl00 0) - (bncfl01 1) ;; use identity matrix in bone matrix calc instead of cam rot (effectively screen-space bones?) - (bncfl02 2) + ;; Write per-bone ripple deformation data after calculating the skinning matrices. + (write-ripple-data 0) + ;; Use identity instead of camera rotation for screen-space bones. HUD draw paths set this. + (no-cam-rot 1) + (bncfl02 2) ;; bits 2-15 are unused in Jak 1 (bncfl03 3) (bncfl04 4) (bncfl05 5) @@ -17468,28 +20603,84 @@ ;; - Functions -(define-extern paused? (function symbol)) -(define-extern dump-mem (function pointer int none)) -(define-extern bone-list-init (function none)) -(define-extern texscroll-make-request (function merc-effect none)) -(define-extern texscroll-execute (function none)) -(define-extern bones-set-sqwc (function none)) -(define-extern bones-reset-sqwc (function none)) -(define-extern bones-init (function dma-buffer dma-foreground-sink-group none)) -(define-extern draw-bones-mtx-calc (function bone-calculation int bone-calc-flags object)) -(define-extern bones-mtx-calc (function int pointer pointer int object none)) -(define-extern bones-mtx-calc-execute (function none)) -(define-extern bones-wrapup (function none)) -(define-extern dump-qword (function qword none)) -(define-extern bones-debug (function none)) -(define-extern dump-bone-mem (function none)) -(define-extern draw-bones-shadow (function draw-control pointer pointer pointer)) -(define-extern draw-bones-generic-merc (function draw-control pointer pointer int pointer)) -(define-extern draw-bones-merc (function draw-control object object int int pointer)) -(define-extern draw-bones-check-longest-edge (function draw-control float none)) -(define-extern draw-bones-check-longest-edge-asm (function draw-control float symbol)) -(define-extern draw-bones (function draw-control dma-buffer float none)) -(define-extern draw-bones-hud (function draw-control dma-buffer none)) +(define-extern paused? + "Return true in pause or menu mode, or while a visible progress screen is active." + (function symbol)) +(define-extern dump-mem + "Print count consecutive quadwords as hexadecimal words and floating-point values." + (function pointer int none)) +(define-extern bone-list-init + "Clear the linked list of deferred bone calculations." + (function none)) +(define-extern texscroll-make-request + "Advance one effect's texture-scroll phase from the display clock and queue the effect only when +the resulting packed texture-coordinate delta is nonzero." + (function merc-effect none)) +(define-extern texscroll-execute + "Apply every queued texture-scroll delta directly to the packed texture-coordinate byte of each +MERC vertex, then clear the request list." + (function none)) +(define-extern bones-set-sqwc + "Configure the VIF1 interleave transfer to copy four quadwords and skip one." + (function none)) +(define-extern bones-reset-sqwc + "Restore VIF1's interleave transfer to one copied quadword followed by one skipped quadword." + (function none)) +(define-extern bones-init + "Initialize the two scratchpad bone-work banks, reset MERC and shadow-chain state, and upload the +bone/light VU0 program before foreground draw submission begins." + (function dma-buffer dma-foreground-sink-group none)) +(define-extern draw-bones-mtx-calc + "Fill a deferred bone-calculation from the active scratchpad joint and bone buffers, append it to +the frame's calculation list, and return the address immediately after the record." + (function bone-calculation int bone-calc-flags object)) +(define-extern bones-mtx-calc + "Calculate count camera-space skinning matrices from joint inverse-bind matrices and current bone +transforms with the original VU0 program." + (function int pointer pointer int object none)) +(define-extern bones-mtx-calc-execute + "Execute every deferred skinning calculation, optionally derive packed ripple deformation rows, +reset the VIF1 interleave mode, and clear the calculation list." + (function none)) +(define-extern bones-wrapup + "Terminate and insert the frame's MERC DMA chain when any ordinary MERC work was submitted." + (function none)) +(define-extern dump-qword + "Print one quadword's address and four hexadecimal words." + (function qword none)) +(define-extern bones-debug + "Reserved bone-system debug hook." + (function none)) +(define-extern dump-bone-mem + "Print both scratchpad joint, bone, and output banks followed by the DMA-list area." + (function none)) +(define-extern draw-bones-shadow + "Append one drawable's shadow settings, geometry reference, and bone-matrix reference to the +current shadow queue unless its settings disable the draw or distance fade culls it." + (function draw-control pointer pointer pointer)) +(define-extern draw-bones-generic-merc + "Build deferred generic-MERC control records for every effect selected for generic rendering. +Copy lights and effect headers, append fragment and matrix-reference chains, and link the records +through merc-globals for later conversion." + (function draw-control pointer pointer int pointer)) +(define-extern draw-bones-merc + "Build and link ordinary MERC DMA packets for all effects selected for MERC rendering, including +matrix references, fragment geometry, shader state, and the selected VU1 entry points." + (function draw-control object object int int pointer)) +(define-extern draw-bones-check-longest-edge + "Debug wrapper for the MERC-prime longest-edge visibility test." + (function draw-control float none)) +(define-extern draw-bones-check-longest-edge-asm + "Return true when the drawable's configured longest edge remains short enough in projected screen +space for MERC-prime to rely on GS scissoring instead of generic clipping." + (function draw-control float symbol)) +(define-extern draw-bones + "Prepare deferred skinning, lighting, ripple and texture-scroll updates, renderer selection, +shadow work, death effects, and MERC or generic-MERC submission for one foreground drawable." + (function draw-control dma-buffer float none)) +(define-extern draw-bones-hud + "Prepare screen-space skinning and foreground submission for one HUD drawable." + (function draw-control dma-buffer none)) ;; - Unknowns @@ -17522,10 +20713,21 @@ ;; - Functions -(define-extern generic-init-buf (function dma-buffer int gs-zbuf none)) -(define-extern generic-dma-foreground-sink-init (function generic-dma-foreground-sink none)) -(define-extern generic-init-buffers (function symbol)) -(define-extern generic-sink (function int generic-dma-foreground-sink)) +(define-extern generic-init-buf + "Upload and initialize the Generic VU1 renderer, set its GS alpha/depth state, upload the ten +qword camera and packet constant block, start entry zero, and reset VIF BASE, OFFSET, and ROW." + (function dma-buffer int gs-zbuf none)) +(define-extern generic-dma-foreground-sink-init + "Reset one sink's persistent VU1 data-memory cursors to qword 837 for GIF output and qword 9 for +packed input." + (function generic-dma-foreground-sink none)) +(define-extern generic-init-buffers + "Initialize the default lights, append Generic VU1 and GS setup to every active foreground +bucket, disable depth writes for the two water sinks, and reset each sink's persistent cursors." + (function symbol)) +(define-extern generic-sink + "Return generic foreground sink i." + (function int generic-dma-foreground-sink)) ;; - Symbols @@ -17540,9 +20742,17 @@ ;; - Functions -(define-extern generic-add-constants (function dma-buffer int none)) -(define-extern generic-setup-constants (function generic-constants int none)) -(define-extern generic-reset-buffers (function dma-buffer int int none)) +(define-extern generic-add-constants + "Append the ten-qword Generic camera, fog, GIF, guard-band, and packet constant block to dma-buf." + (function dma-buffer int none)) +(define-extern generic-setup-constants + "Fill the Generic VU1 constant block from the active camera and select alpha blending for its +triangle-strip GIF tag." + (function generic-constants int none)) +(define-extern generic-reset-buffers + "Select one of the two VU1 GIF output buffers and one of the three input-buffer offsets, then call +entry 12 to install the selected addresses. This helper is unused by the shipped game." + (function dma-buffer int int none)) ;; - Unknowns @@ -17557,31 +20767,96 @@ ;; - Functions -(define-extern generic-work-init (function generic-dma-foreground-sink none)) -(define-extern generic-upload-vu0 (function none)) -(define-extern upload-vu0-program (function vu-function pointer none)) -(define-extern generic-initialize-without-sink (function matrix vu-lights none)) -(define-extern generic-initialize (function generic-dma-foreground-sink matrix vu-lights none)) -(define-extern generic-wrapup (function generic-dma-foreground-sink none)) -(define-extern generic-dma-from-spr function) -(define-extern generic-light-proc function) -(define-extern generic-envmap-proc function) -(define-extern generic-prepare-dma-double function) -(define-extern generic-prepare-dma-single function) -(define-extern generic-envmap-dproc function) -(define-extern generic-interp-dproc function) -(define-extern generic-no-light-proc function) -(define-extern generic-no-light-dproc-only function) -(define-extern generic-no-light-dproc function) -(define-extern generic-no-light+envmap function) -(define-extern generic-no-light function) -(define-extern generic-envmap-only-proc function) -(define-extern generic-light function) -(define-extern generic-copy-vtx-dclr-dtex function) -(define-extern generic-none function) -(define-extern generic-none-dma-wait function) -(define-extern generic-debug-light-proc function) -(define-extern generic-post-debug function) +(define-extern generic-work-init + "Copy the Generic packet templates into scratchpad, restore the sink's VU1 input and GIF cursors, +select the first EE output buffer, and build the per-draw environment-map shader." + (function generic-dma-foreground-sink none)) +(define-extern generic-upload-vu0 + "Build and start an asynchronous VIF0 DMA chain which uploads the Generic VU0 program. This entry +does not wait for completion, and its one-off chain construction is less optimized than +upload-vu0-program." + (function none)) +(define-extern upload-vu0-program + "Upload a VU0 program in blocks of at most 127 instruction pairs, waiting for VIF0 DMA to become +idle and charging every busy poll to wait-counter." + (function vu-function pointer none)) +(define-extern generic-initialize-without-sink + "Synchronously upload the Generic VU0 program, copy transform into scratchpad, and optionally copy +seven VU lighting vectors. This entry does not initialize or update a foreground sink." + (function matrix vu-lights none)) +(define-extern generic-initialize + "Initialize Generic scratchpad state for sink, start the VU0 upload, copy transform, and optionally +copy seven VU lighting vectors." + (function generic-dma-foreground-sink matrix vu-lights none)) +(define-extern generic-wrapup + "Save the Generic VU1 input-bank and GIF-buffer cursors from scratchpad back into sink." + (function generic-dma-foreground-sink none)) +(define-extern generic-dma-from-spr + "Wait for the scratchpad-to-memory DMA channel, then transfer qwc quadwords from scratch-address +to the current Generic DMA output and advance that output cursor." + (function int int none)) +(define-extern generic-light-proc + "Expand indexed GSF vertices in groups of four, run Generic VU0 lighting entry zero, and write the +lit colors plus reconstructed position, normal, and texture streams." + (function none)) +(define-extern generic-envmap-proc + "Generate the Generic environment-map pass from expanded vertices: transform normals and eye +vectors, call VU0 entry 48 for reflected ST coordinates, and build the extra color/texture stream." + (function none)) +(define-extern generic-prepare-dma-double + "Build the paired ordinary and environment-map Generic DMA packet layouts, choose rotating VU1 +input/GIF buffers, and initialize both output headers before vertex conversion." + (function none)) +(define-extern generic-prepare-dma-single + "Build one Generic DMA packet layout, choose the rotating VU1 input and GIF buffers, and initialize +its output header before vertex conversion." + (function none)) +(define-extern generic-envmap-dproc + "Generate environment-map texture deltas for the expanded GSF vertices using the current transform +and Generic VU0 entry 48." + (function none)) +(define-extern generic-interp-dproc + "Apply the pending Generic interpolation job to a range of expanded vertex delta attributes." + (function none)) +(define-extern generic-no-light-proc + "Expand indexed GSF vertices without lighting, preserving source colors while reconstructing the +position, normal, and texture streams." + (function none)) +(define-extern generic-no-light-dproc-only + "Apply delta color and texture data to expanded GSF vertices without producing the ordinary +position and normal streams." + (function none)) +(define-extern generic-no-light-dproc + "Expand GSF vertices without lighting while applying their delta color and texture attributes." + (function none)) +(define-extern generic-no-light+envmap + "Build both ordinary and environment-map Generic passes without lighting, apply interpolation and +delta attributes using shaders, then start the scratchpad-to-memory DMA." + (function gsf-buffer pointer none)) +(define-extern generic-no-light + "Build one Generic pass without lighting using shaders, then start the scratchpad-to-memory DMA." + (function gsf-buffer pointer none)) +(define-extern generic-envmap-only-proc + "Build the environment-map-only Generic vertex stream, including reflected texture coordinates, +environment colors, strip metadata, and its final DMA packet." + (function none)) +(define-extern generic-light + "Build one lit Generic pass using shaders, then start the scratchpad-to-memory DMA." + (function gsf-buffer pointer none)) +(define-extern generic-copy-vtx-dclr-dtex + "Expand the GSF vertex stream while applying its packed delta-color and delta-texture attributes." + (function none)) +(define-extern generic-none "Perform no Generic vertex processing." (function none)) +(define-extern generic-none-dma-wait + "Wait until the scratchpad-to-memory DMA channel is idle without processing vertices." + (function none)) +(define-extern generic-debug-light-proc + "Replace Generic vertex colors with packed, clamped normal components while preserving the other +expanded vertex attributes." + (function none)) +(define-extern generic-post-debug + "Print the first 16 quadwords of the shared GSF buffer as four hexadecimal words per row." + (function none)) ;; - Symbols @@ -17614,15 +20889,42 @@ ;; - Functions -(define-extern generic-merc-init-asm (function none)) -(define-extern mercneric-matrix-asm function) -(define-extern mercneric-shader-asm function) -(define-extern mercneric-bittable-asm function) -(define-extern mercneric-convert function) -(define-extern high-speed-reject (function none)) -(define-extern generic-merc-execute-asm (function none)) -(define-extern generic-merc-add-to-cue (function generic-dma-foreground-sink none)) -(define-extern generic-merc-execute-all (function dma-buffer none)) +(define-extern generic-merc-init-asm + "Upload the MERC VU0 program at address 280, install the Generic conversion callbacks, copy the + camera transforms and high-speed-reject scales into scratchpad, and initialize both expanded + vertex work buffers." + (function none)) +(define-extern mercneric-matrix-asm + "Expand the current fragment's matrix data into the scratchpad matrix table used by the MERC VU0 + vertex conversion program." + function) +(define-extern mercneric-shader-asm + "Copy the current fragment's shader records into the Generic input packet and patch their packet + addresses and effect references." + function) +(define-extern mercneric-bittable-asm + "Build the compact matrix-reference bit table used while converting the current MERC fragment." + function) +(define-extern mercneric-convert + "Convert one queued MERC fragment from its packed geometry, matrix, shader, and effect records + into Generic renderer input and output buffers. VU0 expands weighted vertices while the EE + prepares the next portion of the packet." + function) +(define-extern high-speed-reject + "Transform up to eight packed bounds vectors and reject the current MERC control when every + tested point lies outside a common camera-space boundary." + (function none)) +(define-extern generic-merc-execute-asm + "Consume the queued MERC controls in scratchpad, double-buffer transfers between main memory and + scratchpad, convert their fragments into Generic packets, and advance the output DMA chain." + (function none)) +(define-extern generic-merc-add-to-cue + "Append sink to the current frame's MERC cue and advance the insertion cursor." + (function generic-dma-foreground-sink none)) +(define-extern generic-merc-execute-all + "Initialize Generic MERC conversion, convert every cued sink into the frame's global DMA buffer, + insert each completed chain in its foreground bucket, and update wait and DMA-memory statistics." + (function dma-buffer none)) ;; - Unknowns @@ -17638,15 +20940,36 @@ ;; - Functions -(define-extern generic-tie-dma-to-spad function) -(define-extern generic-tie-dma-to-spad-sync (function object object none)) -(define-extern generic-tie-decompress function) -(define-extern generic-tie-upload-next function) -(define-extern generic-tie-convert-proc function) -(define-extern generic-tie-convert (function none)) -(define-extern generic-tie-display-stats function) -(define-extern generic-tie-debug function) -(define-extern generic-tie-execute (function generic-dma-foreground-sink dma-buffer basic none)) +(define-extern generic-tie-dma-to-spad + "Start a chain DMA transfer from main memory into the selected TIE scratchpad input buffer." + (function object object none)) +(define-extern generic-tie-dma-to-spad-sync + "Wait for an earlier main-to-scratchpad transfer, then start a chain DMA transfer into the + selected TIE scratchpad input buffer." + (function object object none)) +(define-extern generic-tie-decompress + "Expand the current compact TIE vertex block into the base-point and interpolated-point work + buffers used by the Generic converter." + function) +(define-extern generic-tie-upload-next + "Start the next compact TIE input transfer and swap the active scratchpad input buffer." + function) +(define-extern generic-tie-convert-proc + "Convert the current TIE model's compact points and instances into expanded Generic vertex + streams, invoking the selected lighting, environment-map, and interpolation processors." + function) +(define-extern generic-tie-convert + "Walk a compact TIE input chain in scratchpad, decompress and convert every model and instance, + and copy completed Generic packets to the output DMA buffer." + (function none)) +(define-extern generic-tie-display-stats "Display TIE conversion statistics when enabled." function) +(define-extern generic-tie-debug + "Print the first twenty expanded Generic positions in floating-point world units." + (function none)) +(define-extern generic-tie-execute + "Initialize Generic state for sink, transfer and convert input-chain, append the expanded packets + to dma-buf, and update renderer performance and DMA-memory statistics." + (function generic-dma-foreground-sink dma-buffer basic none)) ;; - Unknowns @@ -17701,26 +21024,69 @@ ;; - Functions -(define-extern shadow-vu0-upload (function none)) -(define-extern shadow-dma-init (function dma-buffer none)) -(define-extern shadow-execute (function shadow-dma-packet pointer pointer)) -(define-extern shadow-dma-end (function dma-buffer none)) -(define-extern shadow-vu1-init-buffer (function dma-buffer none)) -(define-extern shadow-xform-verts function) -(define-extern shadow-calc-dual-verts function) -(define-extern shadow-scissor-edges function) -(define-extern shadow-scissor-top function) -(define-extern shadow-init-vars function) -(define-extern shadow-find-facing-single-tris function) -(define-extern shadow-find-single-edges function) -(define-extern shadow-find-facing-double-tris function) -(define-extern shadow-find-double-edges function) -(define-extern shadow-add-verts function) -(define-extern shadow-add-facing-single-tris function) -(define-extern shadow-add-single-edges function) -(define-extern shadow-add-double-tris function) -(define-extern shadow-add-double-edges function) -(define-extern shadow-execute-all (function dma-buffer shadow-queue none)) +(define-extern shadow-vu0-upload + "Upload the shadow face-classification and dual-vertex VU0 program." + (function none)) +(define-extern shadow-dma-init + "Append GS state and full-screen strips which initialize framebuffer alpha for the shadow-volume + pass while masking color and depth writes." + (function dma-buffer none)) +(define-extern shadow-execute + "Transform one shadow mesh, classify its facing triangles and silhouette edges, clip and extrude + the volume, append its VIF packets at output, and return the advanced output pointer." + (function shadow-dma-packet pointer pointer)) +(define-extern shadow-dma-end + "Resolve the alpha shadow mask into the time-of-day shadow color and restore normal framebuffer + and depth state." + (function dma-buffer none)) +(define-extern shadow-vu1-init-buffer "Append the shadow VU1 program, constants, camera matrix, and initialization call to a DMA buffer." (function dma-buffer none)) +(define-extern shadow-xform-verts + "Skin the simplified shadow mesh into working-space vertices; each vertex uses at most two joints." + function) +(define-extern shadow-calc-dual-verts + "Intersect projected shadow edges with the clipping planes and calculate the paired vertices used + to close the extruded volume." + function) +(define-extern shadow-scissor-edges + "Clip the shadow's silhouette-edge list against the active side planes." + function) +(define-extern shadow-scissor-top + "Clip the projected shadow volume against its top plane." + function) +(define-extern shadow-init-vars + "Initialize the temporary shadow workspace, clipping planes, light direction, tables, and counters." + function) +(define-extern shadow-find-facing-single-tris + "Classify single-sided triangles against the light and collect the front-facing triangles." + function) +(define-extern shadow-find-single-edges + "Collect silhouette edges from the single-sided triangle adjacency table." + function) +(define-extern shadow-find-facing-double-tris + "Classify double-sided triangles against the light and record their facing direction." + function) +(define-extern shadow-find-double-edges + "Collect silhouette edges from the double-sided triangle adjacency table." + function) +(define-extern shadow-add-verts + "Append the transformed and extruded shadow vertices to the output VIF packet." + function) +(define-extern shadow-add-facing-single-tris + "Append front-facing single-sided caps to the shadow-volume packet." + function) +(define-extern shadow-add-single-edges + "Append side quads for the collected single-sided silhouette edges." + function) +(define-extern shadow-add-double-tris + "Append the selected double-sided caps to the shadow-volume packet." + function) +(define-extern shadow-add-double-edges + "Append side quads for the collected double-sided silhouette edges." + function) +(define-extern shadow-execute-all + "Build the frame shadow pass for every nonempty queued run, bracket it with alpha initialization + and resolve packets, and insert the completed chain into the shadow bucket." + (function dma-buffer shadow-queue none)) ;; - Symbols @@ -17772,8 +21138,13 @@ ;; - Functions -(define-extern shadow-vu1-add-constants (function dma-buffer none)) -(define-extern shadow-vu1-add-matrix (function dma-buffer math-camera none)) +(define-extern shadow-vu1-add-constants + "Upload the shadow projection, texture, fog, color, and GIF constants plus the initial VU1 GIF + buffer template." + (function dma-buffer none)) +(define-extern shadow-vu1-add-matrix + "Upload the four perspective-matrix rows used to project shadow-volume vertices." + (function dma-buffer math-camera none)) ;; - Unknowns @@ -17789,11 +21160,33 @@ ;; - Functions -(define-extern depth-cue-draw-front (function dma-buffer int float float uint int symbol)) -(define-extern depth-cue-set-stencil (function dma-buffer int int int dma-gif-packet vector4w)) -(define-extern depth-cue-draw-depth (function dma-buffer int float float int int symbol)) -(define-extern depth-cue-calc-z (function float float)) -(define-extern depth-cue (function display pointer)) +(define-extern depth-cue-draw-front + "Append the sixteen-strip full-screen depth-cue filter to dma-buf. Each 32-pixel source strip is + scaled by sharpness into temporary VRAM, then expanded and alpha-blended back into + on-screen-fbp at the supplied GS depth. field-offset is the interlaced-field offset in GS + sixteenth-pixel units." + (function dma-buffer int float float uint int symbol)) +(define-extern depth-cue-set-stencil + "Append ten 64-pixel sprites which write color only to the destination alpha channel where the + existing depth passes greater-equal. framebuffer-page is a GS framebuffer base page, depth is a + GS 24-bit depth value, field-offset is in GS sixteenth-pixel units, and color supplies the + RGBAQ qword repeated before each group of five sprites." + (function dma-buffer int int int vector4w vector4w)) +(define-extern depth-cue-draw-depth + "Append the sixteen-strip depth-cue filter at depth, applying the filtered RGB only where the + destination-alpha stencil is set. sharpness scales each temporary strip, alpha controls the + blend strength, on-screen-fbp is the GS framebuffer base page, and field-offset is in GS + sixteenth-pixel units." + (function dma-buffer int float float uint int symbol)) +(define-extern depth-cue-calc-z + "Convert a nonzero camera-space Z distance to GS 24-bit depth using the active perspective + projection and viewport depth offset." + (function float float)) +(define-extern depth-cue + "Append the enabled full-screen depth-cue postprocess to display's current DMA buffer, restore + the GS framebuffer state, insert the chain into the depth-cue bucket, and record its DMA usage. + Return the inserted bucket tag, or false when the renderer is disabled." + (function display pointer)) ;; - Unknowns @@ -17808,8 +21201,13 @@ ;; - Functions -(define-extern get-string-length (function string font-context float)) -(define-extern draw-string-adv (function string dma-buffer font-context none)) +(define-extern get-string-length + "Interpret str with ctxt's size, alignment, and kerning settings without drawing, and return the + horizontal displacement from the starting origin." + (function string font-context float)) +(define-extern draw-string-adv + "Draw str into buf with ctxt, then advance ctxt's origin x by the returned width." + (function string dma-buffer font-context none)) ;; - Unknowns @@ -17836,8 +21234,18 @@ ;; - Functions -(define-extern unpack-comp-rle (function (pointer int8) (pointer int8) none)) -(define-extern unpack-comp-huf (function (pointer uint8) (pointer uint8) uint huf-dictionary-node none)) +(define-extern unpack-comp-rle + "Decode signed-control run-length data from src into dst. A positive control n repeats the next + byte n+1 times, a negative control -n copies the following n bytes literally, and zero + terminates the stream. Repeated runs store length minus one so every nonzero positive control + represents at least two bytes." + (function (pointer int8) (pointer int8) none)) +(define-extern unpack-comp-huf + "Decode src into dst one most-significant bit first. Child values 0 through 255 emit a byte, 256 + terminates the stream, and values above 256 select another four-byte node relative to + dictionary-base, which addresses node 257. root is the dictionary's final node; restart there + after each emitted byte." + (function (pointer uint8) (pointer uint8) uint huf-dictionary-node none)) ;; ---------------------- @@ -17848,19 +21256,66 @@ ;; - Functions -(define-extern background-upload-vu0 (function none)) -(define-extern time-of-day-interp-colors (function (pointer rgba) uint mood-context none)) +(define-extern background-upload-vu0 + "Upload the shared background VU0 program and cache the camera clipping planes and transforms in + VU0 data memory. wait-to-vu0 counts polls spent waiting for an earlier VIF0 transfer before the + initialization entry point runs." + (function none)) +(define-extern time-of-day-interp-colors + "Blend each palette color's eight authored RGBA samples with context's packed 4.6 time-of-day + weights. Process 32 colors per input page, clamp RGB to 255 and alpha to 128, and DMA completed + output batches from the two scratchpad output banks into data. The final input DMA reads a full + page past the palette's nominal height, and data receives the complete rounded block; callers + provide accessible resource storage and a roomy work buffer, then ignore the extra colors." + (function (pointer rgba) time-of-day-palette mood-context none)) (define-extern draw-drawable-tree-instance-shrub (function drawable-tree-instance-shrub level none)) -(define-extern upload-vis-bits (function level level bsp-header none)) -(define-extern time-of-day-interp-colors-scratch (function (pointer rgba) time-of-day-palette mood-context none)) -(define-extern draw-drawable-tree-tfrag (function drawable-tree-tfrag none)) -(define-extern draw-drawable-tree-trans-tfrag (function drawable-tree-trans-tfrag none)) -(define-extern draw-drawable-tree-dirt-tfrag (function drawable-tree-dirt-tfrag none)) -(define-extern draw-drawable-tree-ice-tfrag (function drawable-tree-ice-tfrag none)) -(define-extern tie-near-make-perspective-matrix (function matrix matrix)) -(define-extern draw-drawable-tree-instance-tie (function drawable-tree-instance-tie level none)) -(define-extern init-background (function none)) -(define-extern finish-background (function none)) +(define-extern upload-vis-bits + "Copy lev's visibility bit list to the terrain scratchpad. When artist visibility inversion is + enabled, xor it with bsp's all-visible list so only drawable bits are flipped. previous-lev is + retained by the calling convention but is not read." + (function level level bsp-header none)) +(define-extern time-of-day-interp-colors-scratch + "Blend each palette color's eight authored RGBA samples with context's packed 4.6 time-of-day + weights, writing directly to scratchpad data. Double-buffer 32-color input pages, shift the + accumulated products down six bits, and clamp RGB to 255 and alpha to 128. The last input DMA + may read as many as 31 colors past the nominal palette, and data receives the complete rounded + block; callers leave that storage accessible and ignore colors beyond height." + (function (pointer rgba) time-of-day-palette mood-context none)) +(define-extern draw-drawable-tree-tfrag + "Cull the tree hierarchy, build the opaque far and near terrain DMA streams, submit them to the +current level's terrain buckets, and account for the DMA storage used." + (function drawable-tree-tfrag none)) +(define-extern draw-drawable-tree-trans-tfrag + "Cull the tree hierarchy and build alpha-blended far and near terrain streams using the +translucent TEST state and buckets." + (function drawable-tree-trans-tfrag none)) +(define-extern draw-drawable-tree-dirt-tfrag + "Cull the tree hierarchy and build alpha-blended far and near dirt-terrain streams using their +dedicated TEST state and buckets." + (function drawable-tree-dirt-tfrag none)) +(define-extern draw-drawable-tree-ice-tfrag + "Cull the tree hierarchy and build alpha-blended far and near ice-terrain streams using their +dedicated TEST state and buckets." + (function drawable-tree-ice-tfrag none)) +(define-extern tie-near-make-perspective-matrix + "Build the TIE near-path perspective matrix by applying the camera's homogeneous projection +scale to camera-temp." + (function matrix matrix)) +(define-extern draw-drawable-tree-instance-tie + "Cull the TIE tree, group visible instances by prototype and distance-selected geometry variant, +build the enabled Generic, ordinary TIE, and near-TIE packet chains, insert those chains in the +owning level's buckets, update renderer timing and DMA-memory statistics, and publish the nearest +instance distance to the level." + (function drawable-tree-instance-tie level none)) +(define-extern init-background + "Clear the frame-local background tree queues, counts, and VU0 wait counter." + (function none)) +(define-extern finish-background + "Consume the background trees collected during drawable traversal. This draws shrubbery and each + terrain category with the owning level's visibility and mood state, records nearest terrain + distances, draws TIE instances, and appends any fallback generic-TIE output to its foreground + bucket." + (function none)) ;; - Symbols @@ -17884,7 +21339,12 @@ (define-extern collide-cache-using-line-sphere-test (function vector symbol)) (define-extern collide-cache-using-y-probe-test (function vector symbol)) (define-extern collide-cache-using-box-test (function vector symbol)) -(define-extern draw-node-cull (function pointer pointer (inline-array draw-node) int none)) +(define-extern draw-node-cull + "Filter one BVH depth's child-visibility bytes. input-vis supplies one visibility bit per node; + output-vis supplies the corresponding byte of up to eight child bits. Clear a byte when its + parent bit is absent or its draw-node bounding sphere is outside any of the four side planes. + Nodes are copied to alternating 32-node scratchpad banks while the previous bank is tested." + (function (pointer uint8) (pointer uint8) (inline-array draw-node) int none)) ;; ---------------------- @@ -17895,20 +21355,57 @@ ;; - Functions -(define-extern upload-generic-shrub (function dma-buffer generic-shrub-fragment int int dma-buffer)) -(define-extern shrub-num-tris (function shrubbery uint)) -(define-extern shrub-init-frame (function dma-buffer gs-test none)) -(define-extern shrub-upload-model (function shrubbery dma-buffer int symbol)) ;; third arg is `start-bank` from shrub-work -(define-extern shrub-do-init-frame (function dma-buffer symbol)) -(define-extern shrub-upload-view-data (function dma-buffer symbol)) -(define-extern shrub-init-view-data (function shrub-view-data symbol)) -(define-extern mem-usage-shrub-walk (function draw-node int memory-usage-block int draw-node)) -(define-extern shrub-make-perspective-matrix (function matrix matrix)) -(define-extern shrub-time (function int int int int int int)) ;; unused -(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 shrub-upload-test (function generic-shrub-fragment none)) -(define-extern test-func (function none)) +(define-extern upload-generic-shrub + "Append a near-shrub VU1 upload to dma-buf. Unpack the camera matrix and two control quadwords at + matrix-vu-address, upload fragment's control records immediately after them, place its texture + coordinates, colors, and vertices at stream-vu-address and the next two addresses, then start + VU1 entry 10." + (function dma-buffer generic-shrub-fragment int int dma-buffer)) +(define-extern shrub-num-tris + "Return the number of triangles encoded by shrub: display vertices minus two strip-start + vertices for each triangle strip." + (function shrubbery uint)) +(define-extern shrub-init-frame + "Initialize the shrub VU1 program, VIF state, and GS TEST register in dma-buf." + (function dma-buffer gs-test none)) +(define-extern shrub-upload-model + "Append shrub's static object, vertex, color, and texture-coordinate streams to dma-buf, run the + model initialization entry selected by start-bank, and exchange the two VU1 data banks." + (function shrubbery dma-buffer int symbol)) +(define-extern shrub-do-init-frame + "Upload and initialize the shrub VU1 program and install its VIF row, column, and mask state." + (function dma-buffer symbol)) +(define-extern shrub-upload-view-data + "Append the current camera fog and texture/GIF constants to the shrub VU1 input packet." + (function dma-buffer symbol)) +(define-extern shrub-init-view-data + "Fill the shrub VU1 view constants from the current math camera." + (function shrub-view-data symbol)) +(define-extern mem-usage-shrub-walk + "Recursively account for node storage and leaf instance-shrubbery records across node-count + contiguous shrub BVH roots. flags is forwarded for the memory-usage traversal." + (function draw-node int memory-usage-block int draw-node)) +(define-extern shrub-make-perspective-matrix + "Copy the current camera transform to out, divide its homogeneous coefficients by pfog0, and fold + the horizontal, vertical, depth, and fog offsets into the first three components." + (function matrix matrix)) +(define-extern shrub-time + "Evaluate the unused shrub timing-model polynomial for five integer factors." + (function int int int int int int)) +(define-extern draw-inline-array-instance-shrub + "Traverse node-count shrub BVH roots, classify visible leaf instances by prototype and distance, + and build their scratchpad-assisted DMA chains." + (function dma-buffer drawable int (inline-array prototype-bucket-shrub) none)) +(define-extern draw-prototype-inline-array-shrub + "Finish and submit the near, opaque, translucent, and billboard DMA chains accumulated for + prototype-count shrub buckets." + (function int (inline-array prototype-bucket-shrub) pointer)) +(define-extern shrub-upload-test + "Debug-upload one generic shrub fragment to VU1 memory and wait for the transfer to finish." + (function generic-shrub-fragment none)) +(define-extern test-func + "Run the short VU0/FPU dependency timing experiment." + (function none)) ;; - Unknowns @@ -17923,8 +21420,14 @@ ;; - Functions -(define-extern tfrag-details (function tfragment none)) -(define-extern clip-restore (function none)) +(define-extern tfrag-details + "Disassemble a tfragment's common, base, level-zero, and level-one VIF streams. The level-zero + view pairs dma-qwc[3] with the raw word at offset 40, the final dma-chain slot; that unusual + pairing may come from an older tfragment debug layout." + (function tfragment none)) +(define-extern clip-restore + "Move the debug camera to a captured Sandover pose used to inspect near-terrain clipping." + (function none)) ;; - Unknowns @@ -17939,18 +21442,54 @@ ;; - Functions -(define-extern add-tfrag-mtx-0 (function dma-buffer none)) -(define-extern add-tfrag-mtx-1 (function dma-buffer none)) -(define-extern add-tfrag-data (function dma-buffer int none)) -(define-extern tfrag-data-setup (function tfrag-data int none)) -(define-extern tfrag-print-stats (function symbol none)) -(define-extern tfrag-init-buffer (function dma-buffer gs-test int none)) -(define-extern tfrag-end-buffer (function dma-buffer none)) -(define-extern draw-inline-array-tfrag (function pointer drawable-inline-array int dma-buffer none)) -(define-extern tfrag-near-init-buffer (function dma-buffer gs-test int none)) -(define-extern tfrag-near-end-buffer (function dma-buffer none)) -(define-extern draw-inline-array-tfrag-near (function pointer drawable-inline-array int dma-buffer none)) -(define-extern stats-tfrag-asm (function tfragment none)) +(define-extern add-tfrag-mtx-0 + "Append the camera transform for VU1 input bank zero at quadword 5." + (function dma-buffer none)) +(define-extern add-tfrag-mtx-1 + "Append the camera transform for VU1 input bank one at quadword 333." + (function dma-buffer none)) +(define-extern add-tfrag-data + "Append the fourteen shared terrain-renderer quadwords at VU address 656, then call VU1 entry +zero to initialize its alternating output buffers." + (function dma-buffer int none)) +(define-extern tfrag-data-setup + "Fill the shared VU1 fog, GIF, homogeneous-screen, ambient, guard-volume, and distance constants. +alpha-blend selects the GS ABE bit; *subdivide-draw-mode* can replace textured strips and fans with +wireframe lines or untextured geometry." + (function tfrag-data int none)) +(define-extern tfrag-print-stats + "Print the terrain renderer's triangle, vertex, strip, shader, and DMA statistics to destination +when terrain statistics are enabled outside the menu." + (function symbol none)) +(define-extern tfrag-init-buffer + "Upload the terrain VU1 program, install TEST_1, both camera-matrix banks, and shared constants, +set the VIF double-buffer base and offset, and clear the frame's terrain counters." + (function dma-buffer gs-test int none)) +(define-extern tfrag-end-buffer + "Patch the final terrain VU call into the DMA stream, wait for VU1, and restore the VIF mode, row, +base, offset, and cycle state expected by the next renderer." + (function dma-buffer none)) +(define-extern draw-inline-array-tfrag + "Traverse fragment-count terrain fragments selected by visibility-bits, choose and assemble +their distance-dependent DMA streams, and double-buffer 16-fragment scratchpad input banks and +128-quadword output packets." + (function (pointer uint8) (pointer tfragment) int dma-buffer none)) +(define-extern tfrag-near-init-buffer + "Initialize the near-terrain DMA stream with its VU1 program, TEST_1 state, both camera-matrix +banks, shared constants, and VIF double-buffer base and offset." + (function dma-buffer gs-test int none)) +(define-extern tfrag-near-end-buffer + "Patch the final near-terrain VU call into the DMA stream, wait for VU1, and restore the VIF mode, +row, base, offset, and cycle state." + (function dma-buffer none)) +(define-extern draw-inline-array-tfrag-near + "Traverse fragment-count terrain fragments selected by visibility-bits and build the near-camera +DMA streams, including per-frame colors, in alternating scratchpad and output banks." + (function (pointer uint8) (pointer tfragment) int dma-buffer none)) +(define-extern stats-tfrag-asm + "Classify one terrain fragment against the camera and accumulate its fragment, triangle, and +display-vertex counts in the active normal or near terrain statistics." + (function tfragment none)) ;; - Unknowns @@ -17967,8 +21506,13 @@ ;; - Functions -(define-extern edge-debug-lines (function (array vector-array) none)) -(define-extern vis-cull (function int symbol)) +(define-extern edge-debug-lines + "Draw the selected edge lists as pairs of white, translucent, depth-independent debug lines. +*display-strip-lines* selects lists by bit position." + (function (array vector-array) none)) +(define-extern vis-cull + "Return the visibility bit for draw-node id from the current scratchpad visibility list." + (function int symbol)) ;; ---------------------- @@ -18001,13 +21545,35 @@ ;; - Functions -(define-extern tie-init-consts (function tie-consts int none)) -(define-extern tie-float-reg (function int string)) -(define-extern tie-int-reg (function int string)) -(define-extern tie-init-engine (function dma-buffer gs-test int none)) ;; probably first int is gs-test -(define-extern tie-end-buffer (function dma-buffer none)) -(define-extern tie-ints (function none)) -(define-extern tie-floats (function none)) +(define-extern tie-init-consts + "Build the VU1 GIF templates, triple-buffer addresses, instance-data bank addresses, and alpha-test +states used by TIE. The three GIF output addresses are stored as 2^23-biased floats so VU1 can +recover their integer addresses with mtir, and their sum lets the program select the third bank by +subtracting the two current banks. alpha-blend controls the ABE bit in the geometry primitive." + (function tie-consts int none)) +(define-extern tie-float-reg + "Return the source name assigned to a TIE VU1 floating-point register." + (function int string)) +(define-extern tie-int-reg + "Return the source name assigned to a TIE VU1 integer register." + (function int string)) +(define-extern tie-init-engine + "Append the TIE VU1 upload and initialization packets to dma-buf. This installs the requested GS +TEST state, uploads the constant block, initializes the microprogram, and configures VIF's ROW, +BASE/OFFSET, mode, and cycle state for the packed instance stream. alpha-blend controls the geometry +primitive's ABE bit." + (function dma-buffer gs-test int none)) +(define-extern tie-end-buffer + "Append the TIE shutdown packets, restoring the normal GS TEST state and clearing the VIF mask, +mode, and ROW state changed by tie-init-engine." + (function dma-buffer none)) +(define-extern tie-ints + "Print the saved TIE VU1 integer-register values with their source names." + (function none)) +(define-extern tie-floats + "Print the saved TIE VU1 floating-point-register values, as words and floats, with their source +names." + (function none)) ;; - Unknowns @@ -18043,11 +21609,27 @@ ;; - Functions -(define-extern tie-near-init-consts (function tie-near-consts int none)) -(define-extern tie-near-init-engine (function dma-buffer gs-test int none)) -(define-extern tie-near-end-buffer (function dma-buffer none)) -(define-extern tie-near-int-reg (function int string)) -(define-extern tie-near-float-reg (function int string)) +(define-extern tie-near-init-consts + "Build the TIE near-path packet templates, triple-buffer addresses, instance-data bank addresses, +camera projection constants, clipping guard volume, and normal and translucent alpha-test states. +alpha-blend controls the ABE bit in the strip and clipped-polygon primitives." + (function tie-near-consts int none)) +(define-extern tie-near-init-engine + "Append the TIE near-path VU1 upload and initialization packets to dma-buf. This uploads the +constant block, initializes the microprogram, and configures VIF's ROW, BASE/OFFSET, mode, and cycle +state for the packed instance stream. alpha-blend controls the geometry primitives' ABE bit. The +test-state argument is accepted by the shared renderer interface but is not used by this path." + (function dma-buffer gs-test int none)) +(define-extern tie-near-end-buffer + "Append the TIE near-path shutdown packets, restoring the normal GS TEST state and clearing the +VIF mask, mode, and ROW state changed by tie-near-init-engine." + (function dma-buffer none)) +(define-extern tie-near-int-reg + "Return the source name assigned to a TIE near-path VU1 integer register." + (function int string)) +(define-extern tie-near-float-reg + "Return the source name assigned to a TIE near-path VU1 floating-point register." + (function int string)) ;; - Unknowns @@ -18084,15 +21666,43 @@ ;; - Functions -(define-extern tie-init-buffers (function dma-buffer none)) -(define-extern tie-debug-between (function uint uint uint)) -(define-extern tie-debug-one (function uint uint uint)) -(define-extern walk-tie-generic-prototypes (function none)) -(define-extern draw-inline-array-instance-tie (function pointer (inline-array instance-tie) int dma-buffer none)) -(define-extern draw-inline-array-prototype-tie-generic-asm (function dma-buffer int prototype-array-tie none)) -(define-extern draw-inline-array-prototype-tie-asm (function dma-buffer int prototype-array-tie none)) -(define-extern draw-inline-array-prototype-tie-near-asm (function dma-buffer int prototype-array-tie none)) -(define-extern tie-test-cam-restore (function none)) +(define-extern tie-init-buffers + "Splice the TIE and near-TIE initialization and shutdown packets around each nonempty level +bucket. The dma-buf argument is unused; packets are allocated from the active display frame's +global buffer. Call this after all TIE drawing has appended its bucket chains." + (function dma-buffer none)) +(define-extern tie-debug-between + "Restrict instance processing to the inclusive range from min-instance through max-instance." + (function uint uint uint)) +(define-extern tie-debug-one + "Restrict instance processing to count consecutive instances beginning at min-instance." + (function uint uint uint)) +(define-extern walk-tie-generic-prototypes + "Do nothing. This retained debug entry has no body." + (function none)) +(define-extern draw-inline-array-instance-tie + "Consume visibility bits for instance-count contiguous TIE instances, cull and transform visible +instances with VU0, append their per-LOD instance records to the owning prototype buckets, and +flush full packet blocks through the double-buffered scratchpad output to dma-buf." + (function pointer (inline-array instance-tie) int dma-buffer none)) +(define-extern draw-inline-array-prototype-tie-generic-asm + "Build Generic renderer chains for prototype-count TIE prototypes. Expand the selected instance +colors, upload palette chunks through alternating scratchpad banks, append the referenced fragment +records, and flush full packet blocks to dma-buf." + (function dma-buffer int prototype-array-tie none)) +(define-extern draw-inline-array-prototype-tie-asm + "Build ordinary TIE renderer chains for prototype-count prototypes. Expand instance colors, +upload palette chunks through alternating scratchpad banks, append geometry variants one through +three, and flush full packet blocks to dma-buf." + (function dma-buffer int prototype-array-tie none)) +(define-extern draw-inline-array-prototype-tie-near-asm + "Build near-TIE renderer chains for prototype-count prototypes. Expand instance colors, upload +palette chunks through alternating scratchpad banks, append geometry variant zero, and flush full +packet blocks to dma-buf." + (function dma-buffer int prototype-array-tie none)) +(define-extern tie-test-cam-restore + "Restore the saved TIE debugging camera position, orientation, and field of view." + (function none)) ;; - Unknowns @@ -18109,7 +21719,7 @@ ;; - Types (deftype sparticle-birthinfo (structure) - ((sprite uint32 :offset-assert 0) + ((sprite texture-id :offset-assert 0) (anim int32 :offset-assert 4) (anim-speed float :offset-assert 8) (birth-func basic :offset-assert 12) @@ -18157,34 +21767,103 @@ ;; - Functions -(define-extern sphere-in-view-frustum? (function sphere symbol)) -(define-extern kill-all-particles-with-key (function sparticle-launch-control none)) +(define-extern sphere-in-view-frustum? + "Return true unless sphere lies wholly outside one of *math-camera*'s four view-frustum side +planes." + (function sphere symbol)) +(define-extern kill-all-particles-with-key + "Stop every 2D and 3D particle owned by key without releasing its pool slots." + (function sparticle-launch-control none)) -(define-extern sp-relaunch-setup-fields (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern sp-relaunch-setup-fields + "Reinitialize the fields specified by launcher on a live particle, preserving unspecified values +and the particle's level flags. Time-of-day-colored particles preserve or retint each RGB and fade +component according to whether the new launcher supplies that component." + (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) -(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-init-fields! + "Walk sorted 16-byte init specs and initialize consecutive fields in the half-open ID range +(field-id, end-field-id]. Missing fields are zeroed only when write-missing-fields is true. Return +the next unconsumed spec so callers can process adjacent field ranges without restarting." + (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-launch-particles-var (function sparticle-system sparticle-launcher vector sparticle-launch-state sparticle-launch-control float none)) ;; asm - ret not confirmed -(define-extern sp-get-particle (function sparticle-system int sparticle-launch-state sparticle-cpuinfo)) -(define-extern particle-adgif (function adgif-shader texture-id none)) -(define-extern lookup-part-group-by-name (function string basic)) -(define-extern lookup-part-group-pointer-by-name (function string (pointer sparticle-launch-group))) ;; this can actually be a pointer to way more than just a SLG - can be - SLG | sparticle-launcher | sound-spec | death-info. See effect-control::10 -(define-extern unlink-part-group-by-heap (function kheap int)) -(define-extern particle-setup-adgif (function adgif-shader texture-id none)) -(define-extern sp-queue-launch (function sparticle-system sparticle-launcher vector int)) -(define-extern sp-adjust-launch (function sparticle-launchinfo sparticle-cpuinfo (inline-array sp-field-init-spec) 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-death (function sparticle-system sparticle-launcher vector none)) -(define-extern sp-clear-queue (function none)) -(define-extern sp-relaunch-particle-2d (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) -(define-extern sp-relaunch-particle-3d (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d 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 birth-func-copy-rot-color (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) -(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 sp-launch-particles-var + "Birth rate-scaled particles from launcher at pos. Decode the launcher's misc, sprite, CPU, and +launch fields; allocate each particle; apply local, cone, Euler, and owning-system rotations; build +its shader and sprite state; invoke its optional birth callback; and mark it for first-frame setup." + (function sparticle-system sparticle-launcher vector sparticle-launch-state sparticle-launch-control float none)) ;; asm - ret not confirmed +(define-extern sp-get-particle + "Allocate a free particle in group, beginning at binding's rotating block index when supplied. +Clear its bitmap bit, mark its CPU record valid, and return it; return false when full." + (function sparticle-system int sparticle-launch-state sparticle-cpuinfo)) +(define-extern particle-adgif + "Copy the shader for tex-id into shader. Check the most-recent hit and then the populated cache; +fill the next free entry on a miss, or initialize shader directly when all eighty entries are full." + (function adgif-shader texture-id none)) +(define-extern lookup-part-group-by-name + "Return the first registered particle launch group whose name matches name, or false." + (function string basic)) +(define-extern lookup-part-group-pointer-by-name + "Return the table slot containing the first particle launch group named name, or a null pointer." + (function string (pointer sparticle-launch-group))) ;; this can actually be a pointer to way more than just a SLG - can be - SLG | sparticle-launcher | sound-spec | death-info. See effect-control::10 +(define-extern unlink-part-group-by-heap + "Clear every particle-group registry slot whose value lies inside heap's active address range." + (function kheap int)) +(define-extern particle-setup-adgif + "Initialize a particle shader from tex-id and install the particle renderer's GS register layout, +alpha blend, and depth-buffer settings." + (function adgif-shader texture-id none)) +(define-extern sp-queue-launch + "Append a particle launch request while the launcher is busy, returning the new queue size. Print +an error and return zero when the fixed queue is full." + (function sparticle-system sparticle-launcher vector int)) +(define-extern sp-adjust-launch + "Read a launcher's launch-field specs and apply its launch rotation, cone direction, and optional +Y rotation to the particle's position, velocity, acceleration, and stored cone orientation." + (function sparticle-launchinfo sparticle-cpuinfo (inline-array sp-field-init-spec) none)) +(define-extern sp-euler-convert + "Convert the launch cone Euler angles to the xyz-only quaternion expected by 3D sprites, choosing +a positive implicit w, and convert 300 Hz angular velocity to a per-display-frame quaternion step." + (function sparticle-launchinfo sparticle-cpuinfo none)) +(define-extern sp-rotate-system + "Rotate a particle's launch offset, velocity, and local acceleration by the owning system's +xyz-only quaternion." + (function sparticle-launchinfo sparticle-cpuinfo transformq none)) +(define-extern sp-launch-particles-death + "Launch the enemy-death particle as a single 2D sprite, initialize its sprite and CPU fields, +apply current time-of-day color, copy the shared death shader, and mark it just launched." + (function sparticle-system sparticle-launcher vector none)) +(define-extern sp-clear-queue + "Launch every deferred particle request and empty the launch queue." + (function none)) +(define-extern sp-relaunch-particle-2d + "Reinitialize a live 2D particle for its next launcher and reset auxiliary-list state when needed." + (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern sp-relaunch-particle-3d + "Reinitialize a live 3D particle, compose its new Euler rotation with its prior xyz-only +quaternion as requested by its flags, and rebuild its per-frame rotation quaternion." + (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) +(define-extern sparticle-track-root + "Write the tracked drawable's root translation to out-pos." + (function object sparticle-cpuinfo vector none)) +(define-extern sparticle-track-root-prim + "Write the tracked drawable's root collision primitive center to out-pos." + (function object sparticle-cpuinfo vector none)) +(define-extern birth-func-copy-rot-color + "Compose the new 3D particle's rotation with its parent sprite's Y rotation, store an xyz-only +quaternion with positive implicit w, and copy the parent's RGB." + (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-copy2-rot-color + "Build the new 3D particle's rotation from its parent sprite and one of two alternating mirrored +Z angles, store an xyz-only quaternion with positive implicit w, and copy the parent's RGB." + (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-copy-omega-to-z + "Seed the sprite's Z rotation from omega and copy the parent's next-time into both the child +countdown and its initial scale." + (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) +(define-extern birth-func-random-next-time + "Choose a uniformly random relaunch countdown below user-float." + (function sparticle-system sparticle-cpuinfo sprite-vec-data-3d sparticle-launcher sparticle-launch-state none)) ;; - Unknowns @@ -18207,33 +21886,100 @@ ;; - Functions -(define-extern all-particles-60-to-50 (function none)) -(define-extern all-particles-50-to-60 (function none)) -(define-extern sp-process-particle-system (function sparticle-system int sprite-array-2d none)) -(define-extern forall-particles-runner (function (function sparticle-system sparticle-cpuinfo pointer none) sparticle-system 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 forall-particles (function function symbol symbol none)) -(define-extern sparticle-kill-it-level0 (function sparticle-system sparticle-cpuinfo none)) -(define-extern sparticle-kill-it-level1 (function sparticle-system sparticle-cpuinfo 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 forall-particles-with-key-runner (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) sparticle-system none)) -(define-extern sp-get-approx-alloc-size (function sparticle-system int int)) -(define-extern sp-process-block (function sparticle-system int sprite-array-2d int none)) -(define-extern sp-copy-to-spr (function int pointer int none)) -(define-extern sp-process-block-3d (function sparticle-system int int int int symbol none)) -(define-extern sp-process-block-2d (function sparticle-system int int int int symbol none)) -(define-extern sp-copy-from-spr (function int pointer int none)) -(define-extern sp-free-particle (function sparticle-system int sparticle-cpuinfo sprite-vec-data-2d none)) -(define-extern sp-particle-copy! (function sparticle-cpuinfo sparticle-cpuinfo none)) -(define-extern sp-get-block-size (function sparticle-system int int)) -(define-extern sp-kill-particle (function sparticle-system sparticle-cpuinfo none)) -(define-extern sp-orbiter (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern memcpy function) -(define-extern kill-all-particles-in-level (function level int)) -(define-extern set-particle-frame-time (function int none)) -(define-extern process-particles (function none)) +(define-extern all-particles-60-to-50 + "Rescale every live 3D particle's rotational step when switching from 60 Hz to 50 Hz." + (function none)) +(define-extern all-particles-50-to-60 + "Rescale every live 3D particle's rotational step when switching from 50 Hz to 60 Hz." + (function none)) +(define-extern sp-process-particle-system + "Update the active prefix of one particle-system group in scratchpad-sized chunks and publish +that prefix length to the matching sprite-array group." + (function sparticle-system int sprite-array-2d none)) +(define-extern forall-particles-runner + "Call func for every valid particle in sys, passing its CPU record and parallel sprite record. +Completely free 64-slot blocks are skipped." + (function (function sparticle-system sparticle-cpuinfo pointer none) sparticle-system none)) +(define-extern sparticle-60-to-50 + "Convert one 3D particle's per-frame rotation quaternion from a 60 Hz step to a 50 Hz step." + (function sparticle-system sparticle-cpuinfo pointer none)) +(define-extern sparticle-50-to-60 + "Convert one 3D particle's per-frame rotation quaternion from a 50 Hz step to a 60 Hz step." + (function sparticle-system sparticle-cpuinfo pointer none)) +(define-extern forall-particles + "Call func for every valid particle in the selected 2D and 3D systems." + (function function symbol symbol none)) +(define-extern sparticle-kill-it-level0 + "Stop cpuinfo when it belongs to level heap zero." + (function sparticle-system sparticle-cpuinfo none)) +(define-extern sparticle-kill-it-level1 + "Stop cpuinfo when it belongs to level heap one." + (function sparticle-system sparticle-cpuinfo none)) +(define-extern forall-particles-with-key + "Call func for particles owned by key in the selected 2D and 3D systems." + (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) symbol symbol none)) +(define-extern sparticle-kill-it + "Stop a particle and detach its launch-state without releasing its pool slot." + (function sparticle-system sparticle-cpuinfo none)) +(define-extern forall-particles-with-key-runner + "Call func for every valid particle in sys whose launch-control key matches key." + (function sparticle-launch-control (function sparticle-system sparticle-cpuinfo none) sparticle-system none)) +(define-extern sp-get-approx-alloc-size + "Return the number of slots through the last partly occupied block in group, rounded to 64. +This includes free holes and is the prefix that must be processed." + (function sparticle-system int int)) +(define-extern sp-process-block + "Copy count parallel particle records beginning at start-slot into scratchpad, update them, and +copy the mutable CPU and sprite records back. Shader records are input-only." + (function sparticle-system int sprite-array-2d int none)) +(define-extern sp-copy-to-spr + "Copy size bytes from main memory to a scratchpad offset, rounded up to whole quadwords." + (function int pointer int none)) +(define-extern sp-process-block-3d + "Update count 3D particle records in scratchpad: age, integrate, rotate, fade, invoke callbacks, +handle death or relaunch, and write their oriented sprite data." + (function sparticle-system int int int int symbol none)) +(define-extern sp-process-block-2d + "Update count 2D particle records in scratchpad: age, integrate, fade, invoke callbacks, handle +death or relaunch, and write their billboard sprite data." + (function sparticle-system int int int int symbol none)) +(define-extern sp-copy-from-spr + "Copy size bytes from a scratchpad offset to main memory, rounded up to whole quadwords." + (function int pointer int none)) +(define-extern sp-free-particle + "Release slot back to sys, clear its valid state and sprite alpha, and detach any active launcher." + (function sparticle-system int sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern sp-particle-copy! + "Copy src's rendered sprite, shader, and simulated CPU state to dst without replacing dst's +pool bookkeeping, ownership key, binding, or cached record pointers." + (function sparticle-cpuinfo sparticle-cpuinfo none)) +(define-extern sp-get-block-size + "Return one past the highest partly occupied block in group, or zero when the group is empty." + (function sparticle-system int int)) +(define-extern sp-kill-particle + "Release a main-memory particle immediately. A scratchpad copy is instead marked with a zero +timer so its block update can perform the release safely." + (function sparticle-system sparticle-cpuinfo none)) +(define-extern sp-orbiter + "Advance cpuinfo around the center pointer packed in user-float and write the world position to +out-pos. omega and radius hold the current orbit state; vel-sxvel.x and .z change them over time, +while .y supplies the incremental precession of the orbit plane. rotvel3d accumulates that plane +orientation before it rotates the in-plane offset." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern memcpy + "Copy size rounded-up bytes from src to dst in 128-byte bursts followed by 16-byte quadwords." + (function pointer pointer int none)) +(define-extern kill-all-particles-in-level + "Stop every particle tagged for lev's active level heap without releasing its pool slot." + (function level int)) +(define-extern set-particle-frame-time + "Set particle timing from elapsed 300 Hz ticks: retain the tick count as both packed bits and a +float, and store the equivalent number of 60 Hz frames in the remaining lanes." + (function int none)) +(define-extern process-particles + "Update particle timing, all 2D, HUD, and 3D particle groups, profiling bars, and deferred +launches for one display frame." + (function none)) ;; - Unknowns @@ -18250,8 +21996,11 @@ ;; - Functions -;; This is a terrible terrible function, here be dragons - https://github.com/water111/jak-project/pull/623! -(define-extern entity-info-lookup (function type entity-info)) +(define-extern entity-info-lookup + "Find the spawn metadata for entity-type. A successful search replaces the inherited +process-tree method in slot 13 with the matching entity-info pointer, so later lookups can return +it directly. Store #f and return #f when the type has no table entry." + (function type entity-info)) ;; - Symbols @@ -18266,16 +22015,50 @@ ;; - Functions -(define-extern ja-channel-push! (function int time-frame int :behavior process-drawable)) -(define-extern ja-channel-set! (function int int :behavior process-drawable)) -(define-extern kill-current-level-hint (function pair pair symbol none)) -(define-extern level-hint-surpress! (function none)) -(define-extern ja-aframe-num (function int float :behavior process-drawable)) -(define-extern ja-abort-spooled-anim (function spool-anim art-joint-anim int int :behavior process-drawable)) -(define-extern art-group-load-check (function string kheap int art-group)) -(define-extern drawable-load (function drawable kheap drawable)) -(define-extern art-load (function string kheap art)) -(define-extern ja-play-spooled-anim (function spool-anim art-joint-anim art-joint-anim (function process-drawable symbol) int :behavior process-drawable)) +(define-extern ja-channel-push! + "Push channel-count new root channels. When blend-time is nonzero, retain the current channels +below them and append a blend-in channel; otherwise replace the active set." + (function int time-frame int :behavior process-drawable)) +(define-extern ja-channel-set! + "Replace the active joint-animation stack with channel-count initialized channels rooted at the +start of the controller's channel array." + (function int int :behavior process-drawable)) +(define-extern kill-current-level-hint + "Send event to the active level hint when its mode is present in include-modes, or when the +include list is empty, and is absent from exclude-modes." + (function pair pair symbol none)) +(define-extern level-hint-surpress! + "Restart the global delay that prevents another level hint from playing." + (function none)) +(define-extern ja-aframe-num + "Convert channel-index's current internal frame to the animation's artist-frame numbering." + (function int float :behavior process-drawable)) +(define-extern ja-abort-spooled-anim + "Finish or abort a spooled animation. Restore loader state, stop its stream, clear spooling +status, and release the spool lock. If exit-anim is supplied and completed-part is nonnegative, +blend onto that animation while keeping the completed part requested until the channel switch +finishes." + (function spool-anim art-joint-anim int int :behavior process-drawable)) +(define-extern art-group-load-check + "In a debug build, load the versioned art-group file into heap, validate its type and file +version, and log it in. Return #f when debug memory is unavailable or any validation fails." + (function string kheap int art-group)) +(define-extern drawable-load + "Load and log in a drawable when source is a filename, or log in source directly when it is +already a drawable. The EE path moves low-stack loads to the protected kernel stack. Return #f for +an invalid object." + (function drawable kheap drawable)) +(define-extern art-load + "Load name into heap, verify that the result is art, and log it in. The EE path moves low-stack +loads to the protected kernel stack; return #f when the loaded object is not art." + (function string kheap art)) +(define-extern ja-play-spooled-anim + "Play every streamed part in request while driving the joint animation from the audio stream +position. Wait on the global spool lock using idle-anim, request the current part at highest +priority and the next part at high priority, execute timed load commands, and abort through +break-func or when audio fails to start. Cleanup always passes the last completed part and exit-anim +to ja-abort-spooled-anim." + (function spool-anim art-joint-anim art-joint-anim (function process-drawable symbol) int :behavior process-drawable)) (define-extern link (function pointer pointer int kheap int pointer)) ;; - Symbols @@ -18307,23 +22090,32 @@ ) (declare-type task-control basic) +(declare-type process-taskable process-drawable) (deftype task-cstage (structure) ((game-task game-task :offset-assert 0) (status task-status :offset-assert 8) (flags task-flags :offset-assert 16) - (condition (function task-control symbol) :offset-assert 20) + (condition (function task-control symbol :behavior process-taskable) :offset-assert 20) ) :method-count-assert 16 :size-assert #x18 :flag-assert #x1000000018 (:methods - (get-task (_type_) game-task) ;; 9 - (get-status (_type_) task-status) ;; 10 - (task-available? (_type_ task-control) symbol) ;; 11 - (closed? (_type_) symbol) ;; 12 - (closed-by-default? (_type_) symbol) ;; 13 - (close-task! (_type_) int) ;; 14 - (open-task! (_type_) int) ;; 15 + (get-task "Return this stage's game task." (_type_) game-task) ;; 9 + (get-status "Return this stage's progress status." (_type_) task-status) ;; 10 + (task-available? + "Return whether this open stage may become current. Permanently close it when saved progress +has reached its status or the task is complete; otherwise evaluate its condition against control." + (_type_ task-control) symbol) ;; 11 + (closed? "Return whether this stage is currently closed." (_type_) symbol) ;; 12 + (closed-by-default? + "Return whether non-game resets leave this stage closed." + (_type_) symbol) ;; 13 + (close-task! + "Close this stage. When it has an associated entity, mark its persistent task status as +user-authored and advance that status monotonically to this stage." + (_type_) int) ;; 14 + (open-task! "Clear this stage's transient closed flag." (_type_) int) ;; 15 ) ) @@ -18335,16 +22127,43 @@ :size-assert #xc :flag-assert #x130000000c (:methods - (current-task (_type_) game-task) ;; 9 - (current-status (_type_) task-status) ;; 10 - (close-current! (_type_) game-task) ;; 11 - (close-status! (_type_ task-status) game-task) ;; 12 - (first-any (_type_ symbol) game-task) ;; 13 - (reset! (_type_ symbol symbol) int) ;; 14 - (closed? (_type_ game-task task-status) symbol) ;; 15 - (get-reminder (_type_ int) int) ;; 16 - (save-reminder (_type_ int int) int) ;; 17 ;; TODO - i believe this is none - (exists? (_type_ game-task task-status) symbol) ;; 18 + (current-task + "Return the current stage's task, or game-task.none when this is the null control or no stage +is current." + (_type_) game-task) ;; 9 + (current-status + "Return the current stage's status, or task-status.invalid when this is the null control or no +stage is current." + (_type_) task-status) ;; 10 + (close-current! + "Close the current stage when one exists, then select and return the first available task." + (_type_) game-task) ;; 11 + (close-status! + "Close the stage with status for the current task, then select the first available task. +Report an error and return game-task.none when no matching stage exists." + (_type_ task-status) game-task) ;; 12 + (first-any + "Select the first available stage in array order and return its task. Clear current-stage and +return game-task.none when none is available; warn for the null control when requested." + (_type_ symbol) game-task) ;; 13 + (reset! + "Reset stage closure. A game reset opens every stage; other resets open only stages that are +not closed by default. Reapply persistent closure for stages that remain closed." + (_type_ symbol symbol) int) ;; 14 + (closed? + "Return whether the matching task and status stage is closed. Report an error and return true +when no matching stage exists." + (_type_ game-task task-status) symbol) ;; 15 + (get-reminder + "Return reminder byte index from the persistent task record associated with the first stage." + (_type_ int) int) ;; 16 + (save-reminder + "Store value in reminder byte index of the first stage's persistent task record and mark the +record as user-modified." + (_type_ int int) int) ;; 17 ;; TODO - i believe this is none + (exists? + "Return whether a stage with the given task and status exists." + (_type_ game-task task-status) symbol) ;; 18 ) ) @@ -18358,9 +22177,17 @@ :flag-assert #xc00000010 :pack-me (:methods - (ambient-control-method-9 (_type_) none) ;; 9 - (ambient-control-method-10 (_type_ vector time-frame float process-drawable) vector) ;; 10 - (play-ambient (_type_ string symbol vector) symbol) ;; 11 + (ambient-control-method-9 + "Restart the ambient-chatter cooldown at the current gameplay frame." + (_type_) none) ;; 9 + (ambient-control-method-10 + "Fill out-vector with the displacement from the listener to speaker and return it only when +cooldown ticks have elapsed and the speaker is within max-distance. Return #f otherwise." + (_type_ vector time-frame float process-drawable) vector) ;; 10 + (play-ambient + "Play name as positional ambient speech when it differs from the previous line, hint +conditions permit it, and the normal level is active. force bypasses the hint-availability test." + (_type_ string symbol vector) symbol) ;; 11 ) ) @@ -18408,28 +22235,75 @@ (hidden () _type_ :state) ;; 28 ;; state (be-clone (handle) _type_ :state) ;; 29 (idle () _type_ :state) ;; 30 ;; state - (get-art-elem (_type_) art-element) ;; 31 - (play-anim! (_type_ symbol) basic) ;; 32 ;; ret - spool-anim | .. - (process-taskable-method-33 (_type_) none) ;; 33 - (get-accept-anim (_type_ symbol) spool-anim) ;; 34 - (push-accept-anim (_type_) none) ;; 35 - (get-reject-anim (_type_ symbol) spool-anim) ;; 36 ;; ret - spool-anim | .. - (push-reject-anim (_type_) none) ;; 37 - (process-taskable-method-38 (_type_) none) ;; 38 - (should-display? (_type_) symbol) ;; 39 - (process-taskable-method-40 (_type_ object skeleton-group int int vector int) none) ;; 40 - (initialize-collision (_type_ int vector) none) ;; 41 - (process-taskable-method-42 (_type_) none) ;; 42 - (process-taskable-method-43 (_type_) symbol) ;; 43 - (play-reminder (_type_) symbol) ;; 44 + (get-art-elem "Return the art element on the active root animation channel." (_type_) art-element) ;; 31 + (play-anim! + "Return this character's animation for the current task stage. commit? lets subtype +implementations apply progression changes when playback really begins; false only selects or +prefetches the animation." + (_type_ symbol) basic) ;; 32 ;; ret - spool-anim | .. + (prefetch-play-anim! + "Select the current play animation without committing progression and request it at streaming +priority -99 when it is spooled." + (_type_) none) ;; 33 + (get-accept-anim + "Return the task-accept animation. commit? lets subtype implementations apply the accepted +choice when playback begins." + (_type_ symbol) spool-anim) ;; 34 + (push-accept-anim + "Select the task-accept animation without committing the choice and request it for streaming." + (_type_) none) ;; 35 + (get-reject-anim + "Return the task-reject animation. commit? lets subtype implementations apply the rejected +choice when playback begins." + (_type_ symbol) spool-anim) ;; 36 ;; ret - spool-anim | .. + (push-reject-anim + "Select the task-reject animation without committing the choice and request it for streaming." + (_type_) none) ;; 37 + (goto-post-anim-state! + "Enter give-cell when the task owes a reward, otherwise enter release." + (_type_) none) ;; 38 + (should-display? "Return whether this taskable character should be visible." (_type_) symbol) ;; 39 + (init-as-taskable! + "Initialize collision, drawable and skeleton state, joint indices, interaction defaults, +ambient state, and shadow control for a taskable character." + (_type_ object skeleton-group int int vector int) none) ;; 40 + (initialize-collision + "Build this character's solid, indestructible enemy collision sphere at center-joint. Set its +navigation radius to three quarters of the sphere radius, save its collision mask, and install it +as the drawable root." + (_type_ int vector) none) ;; 41 + (goto-initial-state! + "Enter hidden when the character should not display, give-cell when its current stage needs +resolution, and idle otherwise." + (_type_) none) ;; 42 + (try-play-ambient-chatter + "Try to play character-specific ambient speech. The base implementation does nothing." + (_type_) symbol) ;; 43 + (play-reminder "Try to play a reminder for the current task stage." (_type_) symbol) ;; 44 (process-taskable-method-45 (_type_) symbol) ;; 45 - (process-taskable-method-46 (_type_) none) ;; 46 - (target-above-threshold? (_type_) symbol) ;; 47 - (draw-npc-shadow (_type_) none) ;; 48 + (update-music-and-flava! + "Enable the configured sound flavor and music while the target is within 102400 world units, +counting vertical separation fourfold, and remove each setting after the target leaves that range." + (_type_) none) ;; 46 + (target-above-threshold? + "Return whether the target is above this character's interaction threshold." + (_type_) symbol) ;; 47 + (draw-npc-shadow + "Update this character's shadow planes and sun direction when its highest-detail geometry was +drawn this frame; otherwise disable the shadow." + (_type_) none) ;; 48 (hidden-other () _type_ :state) ;; 49 - (process-taskable-method-50 (_type_) symbol) ;; 50 - (close-anim-file! (_type_) symbol) ;; 51 - (process-taskable-method-52 (_type_) none) ;; 52 + (target-far-away? + "Return whether the target is more than 245760 world units from this character. Without a +target, compare the camera against the collision sphere using the corresponding squared distance." + (_type_) symbol) ;; 50 + (close-anim-file! + "Return the streaming state of the current play animation's first part, or #f when it is not +a spooled animation." + (_type_) symbol) ;; 51 + (setup-shadow-settings! + "Set this character's shadow-control bottom and top plane W terms to 12288 and -4096." + (_type_) none) ;; 52 ) ) @@ -18442,20 +22316,55 @@ ;; - Functions -(define-extern get-task-control (function game-task task-control)) -(define-extern level-hint-spawn (function text-id string entity process-tree game-task none)) -(define-extern get-game-count (function int count-info)) -(define-extern activate-orb-all (function int int)) -(define-extern close-specific-task! (function game-task task-status game-task)) -(define-extern reset-all-hint-controls (function none)) -(define-extern reset-actors (function symbol none)) -(define-extern set-blackout-frames (function time-frame none)) -(define-extern set-master-mode (function symbol none)) -(define-extern stop (function symbol int)) -(define-extern start (function symbol continue-point target)) -(define-extern position-in-front-of-camera! (function vector float float vector)) -(define-extern game-task->string (function game-task string)) -(define-extern trsq->continue-point (function trsq none)) +(define-extern get-task-control + "Return the control selected by task in *task-controls*. Report an error and return the null +control for values outside the shipped task range." + (function game-task task-control)) +(define-extern level-hint-spawn + "Advance task to need-hint when supplied, apply owner's hint command list, replace the active +hint, and spawn a text hint under process-tree. Do nothing when policy or a command rejects it." + (function text-id string entity process-tree game-task none)) +(define-extern get-game-count + "Return the collectable-count record for level-index." + (function int count-info)) +(define-extern activate-orb-all + "Create the all-orbs summary HUD for level-index if it is not already active." + (function int int)) +(define-extern close-specific-task! + "Close the stage matching task and status, then select and return the first available task in +that control. Report an error and return game-task.none when no matching stage exists." + (function game-task task-status game-task)) +(define-extern reset-all-hint-controls + "Clear the timing and attempt/success counters for every registered level hint." + (function none)) +(define-extern reset-actors + "Kill active actors, clear reset-specific permanent status and user data in level and game-state + permission tables, deactivate remaining entity-pool processes, and restore the actor birth + budget. game also resets task control." + (function symbol none)) +(define-extern set-blackout-frames + "Keep the screen black for at least duration more frames. Zero ends the blackout immediately; + nonzero durations extend the current deadline but never shorten it." + (function time-frame none)) +(define-extern set-master-mode + "Switch among game, pause, menu, and progress modes. Update process masks, pause audio and + progress UI as required, then apply the resulting settings." + (function symbol none)) +(define-extern stop + "Kill the active target process, clear *target*, and record mode as the new game mode." + (function symbol int)) +(define-extern start + "Stop any existing target, clear the level border modes, and spawn a new target initialized at + continue-point. Return the new target, or false when process allocation fails." + (function symbol continue-point target)) +(define-extern position-in-front-of-camera! "Place out at forward-distance along the camera's + forward axis and up-distance along its up axis, measured from the current camera translation." + (function vector float float vector)) +(define-extern game-task->string "Return the debug name of a game task." (function game-task string)) +(define-extern trsq->continue-point + "Print source text for a static checkpoint using transform, the current target level, camera +transform, and two-level load state." + (function trsq none)) ;; - Symbols @@ -18521,6 +22430,9 @@ ) (deftype game-save-tag (structure) + "A 16-byte save-field header. Scalar values occupy the eight-byte user overlay; strings and +arrays follow the header, with elt-count and elt-size describing their payload. The next header +begins after the payload rounded up to a 16-byte boundary." ((user-object object 2 :offset-assert 0) (user-uint64 uint64 :offset 0) (user-float0 float :offset 0) @@ -18543,6 +22455,8 @@ ) (deftype game-save (basic) + "A versioned save record with a fixed 64-byte summary followed by aligned game-save-tag records. +The summary supports save-menu display without unpacking the dynamic payload." ((version int32 :offset-assert 4) (allocated-length int32 :offset-assert 8) (length int32 :offset-assert 12) @@ -18566,10 +22480,21 @@ :size-assert #x50 :flag-assert #xc00000050 (:methods - (new (symbol type int) _type_) ;; 0 - (save-to-file (_type_ string) _type_) ;; 9 - (load-from-file! (_type_ string) _type_) ;; 10 - (debug-print (_type_ symbol) _type_) ;; 11 + (new + "Allocate a save with tag-capacity bytes of dynamic tagged payload storage." + (symbol type int) _type_) ;; 0 + (asize-of :override-doc + "Return the fixed save header plus its allocated dynamic payload capacity.") + (save-to-file + "Write this save's header and active tagged payload to filename for debugging." + (_type_ string) _type_) ;; 9 + (load-from-file! + "Read a debug save from filename when it fits this object's allocated capacity. Restore this +object's capacity after the read and invalidate its payload on a short read or version mismatch." + (_type_ string) _type_) ;; 10 + (debug-print + "Print the save summary and tag headers. When detail is true, also decode known array tags." + (_type_ symbol) _type_) ;; 11 ) ) @@ -18592,32 +22517,96 @@ :flag-assert #x17016001cc ;; inherited inspect of process (:methods - (get-heap () _type_ :state) ;; 14 - (get-card () _type_ :state) ;; 15 - (format-card () _type_ :state) ;; 16 - (create-file () _type_ :state) ;; 17 - (save () _type_ :state) ;; 18 - (restore () _type_ :state) ;; 19 - (error (mc-status-code) _type_ :state) ;; 20 - (done () _type_ :state) ;; 21 - (unformat-card () _type_ :state) ;; 22 + (deactivate :override-doc + "Release the save-icon particles, then deactivate the process.") + (relocate :override-doc + "Relocate the heap-owned save-icon launch control before relocating the process.") + (get-heap + "Reserve one streaming heap for memory-card data, waiting up to sixty seconds before +reporting no-memory." + () _type_ :state) ;; 14 + (get-card + "Wait for current card information, validate or adopt its handle, and dispatch according to +the requested save mode." + () _type_ :state) ;; 15 + (format-card + "Format an unformatted card, retrying start failures and polling completion before continuing." + () _type_ :state) ;; 16 + (create-file + "Create the memory-card save structure when it is absent and there is enough space, then +continue with the requested save or restore operation." + () _type_ :state) ;; 17 + (save + "Pack the current game into the reserved heap and asynchronously write the selected card +file. Retry transient write failures and roll back the automatic-save count on a terminal error." + () _type_ :state) ;; 18 + (restore + "Asynchronously read the selected card file into the reserved heap, validate its version, +restore game state and settings, then wait for the new game state to settle." + () _type_ :state) ;; 19 + (error + "Release reserved memory, publish the memory-card status to the requesting process, and show +the appropriate progress screen for automatic-save failures." + (mc-status-code) _type_ :state) ;; 20 + (done + "Release reserved memory, publish success and current card selection, and show the first +automatic-save notice unless the PC speedrun mode suppresses it." + () _type_ :state) ;; 21 + (unformat-card + "Unformat a formatted card and poll until completion." + () _type_ :state) ;; 22 ) ) ;; - Functions -(define-extern auto-save-command (function symbol int int process-tree none)) -(define-extern auto-save-init-by-other (function symbol process-tree int int none :behavior auto-save)) -(define-extern progress-allowed? (function symbol)) -(define-extern print-game-text (function string font-context symbol int int float)) ; TODO decomp error, this seems correct though -(define-extern get-aspect-ratio (function symbol)) -(define-extern get-task-status (function game-task task-status)) -(define-extern lookup-level-info (function symbol level-load-info)) -(define-extern calculate-completion (function progress float)) -(define-extern game-save-elt->string (function game-save-elt string)) -(define-extern progress-level-index->string (function int string)) -(define-extern auto-save-post (function none :behavior auto-save)) -(define-extern auto-save-check (function none)) +(define-extern auto-save-command + "Start an auto-save process for mode, card handle, and file index, notifying notify-proc when it +finishes." + (function symbol int int process-tree none)) +(define-extern auto-save-init-by-other + "Initialize an auto-save process. Reject a concurrent process, establish its card, file, notify +handle, and icon, apply automatic-save policy, then reserve a streaming heap." + (function symbol process-tree int int none :behavior auto-save)) +(define-extern progress-allowed? + "Return true when gameplay is in a state that permits opening the progress screen. Reject + movies, cameras, fades, letterbox or blackout transitions, autosave vetoes, a missing target, + and camera-cheat control." + (function symbol)) +(define-extern print-game-text + "Word-wrap str within font-ctxt's bounds, honoring its alignment and start-line. Draw each visible +line unless no-draw is true, in which case perform the same layout pass for measurement. Alpha is +applied while drawing; line-height supplies the spacing for large text, while ordinary text uses +14 units. Remove trailing spaces and formatting-only font commands at line boundaries, append drawn +packet ranges to the debug DMA bucket, and return the total height of the nonempty lines that fit." + (function string font-context symbol int int float)) +(define-extern get-aspect-ratio + "Return the currently selected 4:3 or 16:9 aspect ratio." + (function symbol)) +(define-extern get-task-status + "Return the first available stage status matching task. Refresh the control's current stage +before returning; return task-status.invalid when no matching available stage exists." + (function game-task task-status)) +(define-extern lookup-level-info + "Return the first level-load-info whose canonical name, VIS name, or nickname matches name. + Return default-level when no entry matches." + (function symbol level-load-info)) +(define-extern calculate-completion + "Calculate whole-game completion as 80 percent power cells, 10 percent precursor orbs, and + 10 percent scout flies. When progress is nonfalse, also store each available total there." + (function progress float)) +(define-extern game-save-elt->string + "Return the debug name of a save tag kind." + (function game-save-elt string)) +(define-extern progress-level-index->string + "Return the translated level name for a progress-table index, or #f when out of range." + (function int string)) +(define-extern auto-save-post + "Draw automatic-save status text and the flashing save icon after each auto-save state update." + (function none :behavior auto-save)) +(define-extern auto-save-check + "Detect removal or replacement of the remembered automatic-save card and start an error process." + (function none)) (define-extern mc-format (function int mc-status-code)) (define-extern mc-unformat (function int mc-status-code)) @@ -18639,8 +22628,15 @@ ;; - Functions -(define-extern set-aspect-ratio (function symbol none)) -(define-extern set-video-mode (function symbol none)) +(define-extern set-aspect-ratio + "Select 4:3 or 16:9 display correction. Update the font matrix and notify the HUD and active + progress screen after changing the horizontal scale." + (function symbol none)) +(define-extern set-video-mode + "Select NTSC, PAL, or the PC custom timing mode. Configure vertical display geometry, frame + timing, camera projection, shadows, pause and font placement, then notify the HUD and active + progress screen." + (function symbol none)) (define-extern scf-get-volume (function int)) (define-extern scf-get-language (function language-enum)) (define-extern scf-get-aspect (function uint)) @@ -18658,15 +22654,40 @@ ;; - Functions -(define-extern make-light-kit (function light-group float float float float none)) -(define-extern make-village1-light-kit (function mood-context none)) -(define-extern make-misty-light-kit (function mood-context none)) -(define-extern make-village2-light-kit (function mood-context none)) -(define-extern make-rolling-light-kit (function mood-context none)) -(define-extern make-village3-light-kit (function mood-context none)) -(define-extern update-mood-shadow-direction (function mood-lights none)) -(define-extern update-mood-erase-color (function mood-fog mood-lights none)) -(define-extern update-mood-erase-color2 (function mood-fog mood-lights mood-lights none)) +(define-extern make-light-kit + "Build a three-directional-light kit. dir0 and dir1 are opposing warm diagonal lights rotated + around Y by heading in 65,536-units-per-turn rotation units; dir2 points straight down. The + three level arguments set their respective light strengths." + (function light-group float float float float none)) +(define-extern make-village1-light-kit + "Initialize light groups 1 through 7 for the Village 1 and beach mood contexts." + (function mood-context none)) +(define-extern make-misty-light-kit + "Initialize Misty's first light group with warm orange key and downward colors." + (function mood-context none)) +(define-extern make-village2-light-kit + "Initialize Village 2 light groups 1 through 6 with the authored directional colors and levels." + (function mood-context none)) +(define-extern make-rolling-light-kit + "Initialize Rolling's first six light groups with a single overhead yellow directional light." + (function mood-context none)) +(define-extern make-village3-light-kit + "Initialize Village 3 light groups 1 and 2 with cyan upper and amber downward lighting." + (function mood-context none)) +(define-extern update-mood-shadow-direction + "Point the shadow opposite the authored light direction. Directions more than 25 degrees from + vertical are clamped to 25 degrees from straight down while preserving their horizontal + azimuth, preventing excessively shallow projected shadows." + (function mood-lights none)) +(define-extern update-mood-erase-color + "Derive fog's framebuffer erase color from ambient plus the vertical directional-light + contribution, tint it by the shared far-ocean color, double RGB, then blend toward fog-color + by (255 - fog-min) / 255." + (function mood-fog mood-lights none)) +(define-extern update-mood-erase-color2 + "Derive fog's framebuffer erase color by averaging the lit, far-ocean-tinted colors from two + lighting snapshots, then blend that average toward fog-color by (255 - fog-min) / 255." + (function mood-fog mood-lights mood-lights none)) ;; - Symbols @@ -18974,43 +22995,144 @@ ;; - Functions -(define-extern clear-mood-times (function mood-context symbol)) -(define-extern update-mood-quick (function mood-context int int int int vector)) -(define-extern update-mood-flames (function mood-context int int int float float float none)) -(define-extern update-mood-light (function mood-context int int int float float float int none)) -(define-extern target-joint-pos (function vector)) ;; TODO - unconfirmed -(define-extern update-mood-itimes (function mood-context none)) ;; TODO - implement VFTOI12 and PPACH -(define-extern update-mood-fog (function mood-context float vector)) -(define-extern update-mood-sky-texture (function mood-context float vector)) -(define-extern update-mood-palette (function mood-context float int float)) -(define-extern update-mood-interp (function mood-context mood-context mood-context float none)) -(define-extern update-mood-lightning (function mood-context int int int int float symbol none)) ;; TODO - asm - ret not verified -(define-extern update-mood-lava (function mood-context int int symbol none)) -(define-extern update-light-kit (function light-group light float none)) -(define-extern set-target-light-index (function int int)) -(define-extern update-mood-caustics (function mood-context int int none)) -(define-extern update-mood-jungleb-blue (function mood-context float int none)) -(define-extern update-mood-prt-color (function mood-context vector)) -(define-extern update-mood-default (function mood-context float int none)) -(define-extern update-mood-misty (function mood-context float int none)) -(define-extern update-mood-village2 (function mood-context float int none)) -(define-extern update-mood-swamp (function mood-context float int none)) -(define-extern update-mood-village1 (function mood-context float int none)) -(define-extern update-mood-jungle (function mood-context float int none)) -(define-extern update-mood-jungleb (function mood-context float int none)) -(define-extern update-mood-sunken (function mood-context float int none)) -(define-extern update-mood-rolling (function mood-context float int none)) -(define-extern update-mood-firecanyon (function mood-context float int none)) -(define-extern update-mood-training (function mood-context float int none)) -(define-extern update-mood-maincave (function mood-context float int none)) -(define-extern update-mood-darkcave (function mood-context float int none)) -(define-extern update-mood-robocave (function mood-context float int none)) -(define-extern update-mood-snow (function mood-context float int none)) -(define-extern update-mood-village3 (function mood-context float int none)) -(define-extern update-mood-lavatube (function mood-context float int none)) -(define-extern update-mood-ogre (function mood-context float int none)) -(define-extern update-mood-finalboss (function mood-context float int none)) -(define-extern update-mood-citadel (function mood-context float int none)) +(define-extern clear-mood-times + "Clear the eight time-of-day palette weights in context." + (function mood-context symbol)) +(define-extern update-mood-quick + "Select fog, sky, and lighting snapshots directly, without hourly interpolation. fog-index, + sky-index, and light-index select their respective tables; level-index selects the active + level's time-of-day mask." + (function mood-context int int int int vector)) +(define-extern update-mood-flames + "Animate slot-count flame palette slots beginning at first-slot. state-offset selects the + flames-state in context; base-weight, amplitude, and duration-scale control each randomized + half-sine flicker." + (function mood-context int int int float float float none)) +(define-extern update-mood-light + "Animate one palette slot as a night light. fade-state-offset and phase-state-offset select + bytes in context state; base-weight and amplitude set its cosine flicker, hour controls its + day/night fade, and phase-offset offsets the flicker phase." + (function mood-context int int int float float float int none)) +(define-extern target-joint-pos + "Return the target draw-origin joint position, or the camera position when no target exists." + (function vector)) +(define-extern update-mood-itimes + "Convert the eight floating palette weights into the packed values used by time-of-day palette + interpolation. Each times vector has one in xyz and its weight in w, so multiplying xyz by w + broadcasts the weight. Conversion to 20.12 fixed point followed by a six-bit arithmetic shift + produces 4.6 values; packing pairs of 32-bit lanes into high halfwords stores all eight weights + in four itimes quadwords." + (function mood-context none)) +(define-extern update-mood-fog + "Interpolate the current fog colors and distances from context's hourly fog schedule." + (function mood-context float vector)) +(define-extern update-mood-sky-texture + "Interpolate the current sun and environment colors and set the eight sky-texture weights from + context's hourly sky schedule." + (function mood-context float vector)) +(define-extern update-mood-palette + "Interpolate context's particle, shadow, ambient, and directional lighting for hour. The two + selected palette weights are quantized to sixty-fourths, and level-index selects the active + level's light-mask entries." + (function mood-context float int float)) +(define-extern update-mood-interp + "Blend the current fog, sun, shadow, and complete light kit from context-a to context-b by blend, + writing result. Exact endpoints are copied directly." + (function mood-context mood-context mood-context float none)) +(define-extern update-mood-lightning + "Animate lightning across sky-count sky slots beginning at first-sky-slot. state-offset selects + the flash pattern byte, first-light-slot selects the matching lighting slots, strength scales + the flash, and distant? selects the quieter, less frequent thunder." + (function mood-context int int int int float symbol none)) +(define-extern update-mood-lava + "Animate four lava palette slots beginning at first-slot, using the lava-state at state-offset. + When update-slots? is false, only the downward orange light is updated." + (function mood-context int int symbol none)) +(define-extern update-light-kit + "Copy source-light's color into group's ambient light and apply level to its intensity." + (function light-group light float none)) +(define-extern set-target-light-index + "Select the target and sidekick light group, when they exist." + (function int int)) +(define-extern update-mood-caustics + "Crossfade four caustic palette slots beginning at first-slot. The byte at state-offset encodes + the current slot in bits 3-4 and its eighth-step interpolation in bits 0-2." + (function mood-context int int none)) +(define-extern update-mood-jungleb-blue + "Apply Jungle B's blue fog and light transition, then update its packed palette weights." + (function mood-context float int none)) +(define-extern update-mood-prt-color + "Derive a missing particle tint from seventy-five percent ambient light and twenty-five percent + blended directional light, then copy it to the current shadow color." + (function mood-context vector)) +(define-extern update-mood-default + "Update the ordinary hourly fog, sky, lighting palette, and packed palette weights." + (function mood-context float int none)) +(define-extern update-mood-misty + "Update Misty's hourly mood, warehouse flame and night lights, and secondary light kit." + (function mood-context float int none)) +(define-extern update-mood-village2 + "Update Village 2's hourly mood, flame and lightning effects, local light kits, and target + lighting transitions." + (function mood-context float int none)) +(define-extern update-mood-swamp + "Update the swamp's hourly mood and storm effects, brightening the fog when the camera looks + upward." + (function mood-context float int none)) +(define-extern update-mood-village1 + "Update Village 1's hourly mood, chimney flame, light kits, and target lighting transitions near + authored landmarks." + (function mood-context float int none)) +(define-extern update-mood-jungle + "Update the jungle's hourly mood and enable the egg-top night light after its task completes." + (function mood-context float int none)) +(define-extern update-mood-jungleb + "Update Jungle B's mood, lightning, local fire and platform lighting, and blue-fog transition." + (function mood-context float int none)) +(define-extern update-mood-sunken + "Update Sunken Precursor City's mood, caustics, chamber light groups, and local target lighting." + (function mood-context float int none)) +(define-extern update-mood-rolling + "Update Precursor Basin's mood and target lighting near its rolling hazards. Each authored + vector stores a center in xyz and radius in w; the five-entry light2 group uses the four matrix + rows and color slot of a light-ellipse as contiguous vector storage." + (function mood-context float int none)) +(define-extern update-mood-firecanyon + "Update Fire Canyon's hourly mood and lava lighting." + (function mood-context float int none)) +(define-extern update-mood-training + "Update Geyser Rock's hourly mood and animated night lighting." + (function mood-context float int none)) +(define-extern update-mood-maincave + "Update the main cave's hourly mood and flame lighting." + (function mood-context float int none)) +(define-extern update-mood-darkcave + "Update Dark Eco Plant's mood, lava glow, and proximity-based local lighting." + (function mood-context float int none)) +(define-extern update-mood-robocave + "Update the robot cave's hourly mood and lava lighting." + (function mood-context float int none)) +(define-extern update-mood-snow + "Update Snowy Mountain's mood, lightning, fortress lighting transition, and local target light." + (function mood-context float int none)) +(define-extern update-mood-village3 + "Update Volcanic Crater's mood, lava effects, local light kits, and target lighting transitions." + (function mood-context float int none)) +(define-extern update-mood-lavatube + "Update Lava Tube's hourly mood and animated lava palette." + (function mood-context float int none)) +(define-extern update-mood-ogre + "Update Klaww's mood and blend the authored phase palettes, fog, lava glow, and local lighting + according to boss progress and camera position." + (function mood-context float int none)) +(define-extern update-mood-finalboss + "Update the final battle mood, blending from the fixed dawn setup into the normal hourly palette + while controlling stars, sunlight, arena lighting, and the secret-ending light." + (function mood-context float int none)) +(define-extern update-mood-citadel + "Update the citadel's fixed palette, flames, flickering lights, shield glow, and proximity-based + fog and target lighting." + (function mood-context float int none)) ;; - Symbols @@ -19019,7 +23141,7 @@ (define-extern *rolling-spheres-on* (inline-array vector)) ;; 11 vectors (define-extern *rolling-spheres-light0* vector) ;; TODO - what is going on here... (define-extern *rolling-spheres-light1* (inline-array vector)) ; TODO - what is going on here... -(define-extern *rolling-spheres-light2* light-ellipse) +(define-extern *rolling-spheres-light2* light-ellipse) ;; five contiguous vectors; matrix.vector[4] intentionally aliases color (define-extern *rolling-spheres-light3* (inline-array vector)) (define-extern *rolling-spheres-light4* vector) ;; TODO - what is going on here... (define-extern *flash0* (array float)) @@ -19050,12 +23172,35 @@ ;; - Functions -(define-extern matrix-local->world (function symbol symbol matrix)) -(define-extern update-snow (function target none)) -(define-extern check-drop-level-rain (function sparticle-system sparticle-cpuinfo vector none)) ;; second arg is a guess, it's passed as `a1` to `sp-kill-particle` -(define-extern update-rain (function target none)) -(define-extern cam-master-effect (function none :behavior camera-master)) -(define-extern sparticle-track-sun (function int sparticle-cpuinfo matrix none)) ;; TODO - unused / first arg is unknown / matrix is probably wrong +(define-extern matrix-local->world "Return the camera local-to-world rotation. smooth? selects the + smoothed inverse-camera matrix; the second argument is retained for the shared interface but is + unused." (function symbol symbol matrix)) +(define-extern update-snow + "Launch snow around target. As target speed rises from 2048 to 40960, crossfade from the + low-speed snow emitter to four fast flakes and turn the fast emitter a half-turn from the + target's horizontal velocity heading." + (function target none)) +(define-extern check-drop-level-rain + "Kill a rain particle after its position falls below particle's user-float impact height, then + launch a splash and expanding water ring at that height." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern update-rain + "Launch rain around target and compensate each streak's width and height for camera pitch, making + long narrow streaks near a horizontal view and shorter wider streaks near a vertical view. A + sufficiently positive vertical camera-axis component also sends the camera a ten-second + screen-droplet effect with pitch-controlled amount and fall speed." + (function target none)) +(define-extern cam-master-effect + "Drive the camera-space rain droplets for ten seconds after a part-water-drip event. Apply the + event's amount to both droplet sizes, scale their downward acceleration by its speed, and spawn + the camera's water-drip launch control." + (function none :behavior camera-master)) +(define-extern sparticle-track-sun + "Place one sun sprite at the selected sky sun relative to the camera. particle's user-float + selects sun zero or one and its core or halo layer; normal-sun layers take the current + time-of-day sun color, with quarter-brightness halos, while green-sun layers retain their + authored colors. Scale nonzero alpha by the current sun fade." + (function sparticle-system sparticle-cpuinfo matrix none)) ;; - Symbols @@ -19070,19 +23215,49 @@ ;; - Functions -(define-extern make-sky-textures (function time-of-day-context int none)) -(define-extern init-time-of-day (function none :behavior time-of-day-proc)) -(define-extern update-sky-tng-data (function float none)) -(define-extern time-of-day-update (function none :behavior time-of-day-proc)) -(define-extern start-time-of-day (function none)) -(define-extern time-of-day-setup (function symbol symbol)) -(define-extern set-time-of-day (function float none)) -(define-extern init-time-of-day-context (function time-of-day-context none)) -(define-extern update-time-of-day (function time-of-day-context none)) +(define-extern make-sky-textures + "Composite one active level's eight time-of-day sky snapshots and cloud source into the shared + 64-by-96 runtime target. Weight the result for the current cross-level transition, restore the + GS state, and enqueue the packet in that level's translucent bucket." + (function time-of-day-context int none)) +(define-extern init-time-of-day + "Initialize the calendar clock and star, ordinary-sun, and green-sun launch controls, then enter + time-of-day-tick. Before display-rate adjustment, the normal clock advances by 300 subsecond + units per update and the fast clock advances by 18000." + (function none :behavior time-of-day-proc)) +(define-extern update-sky-tng-data + "Update both suns and the moon for time, advance the two cloud layers' wrapped texture phases, + and store the current time. Custom refresh rates scale the phase steps to preserve scroll + speed." + (function float none)) +(define-extern time-of-day-update + "Run the time-of-day effect hook, maintain the nighttime stars and the two time-windowed sun particle + groups, and update the sky renderer. Stars are emitted only when a sky is active and the blended + mood requests more than 45; obsolete particles are expired or killed before their count resets." + (function none :behavior time-of-day-proc)) +(define-extern start-time-of-day + "Replace any active time-of-day process with a newly initialized clock." + (function none)) +(define-extern time-of-day-setup + "Return whether the clock is advancing. When toggle is true, switch between the normal or fast + clock and a frozen noon, updating the debug-menu mode to match." + (function symbol symbol)) +(define-extern set-time-of-day + "Set the clock from a fractional hour, splitting its fractional parts into minutes and seconds." + (function float none)) +(define-extern init-time-of-day-context + "Initialize the fixed title-screen directional and ambient light colors and enable their levels." + (function time-of-day-context none)) +(define-extern update-time-of-day + "Evaluate the two loaded level moods and blend their fog, sky, particles, shadows, stars, sun, + and nine light groups according to level distance. Approach boundary changes over about five + seconds, publish the final fog and erase colors, blend the target's selected light group and + constrained shadow direction, then clear this frame's external palette-fade requests." + (function time-of-day-context none)) ;; - Symbols -(define-extern time-of-day-effect (function none)) ;; only 'nothing' is stored here, looks like dead code +(define-extern time-of-day-effect (function none)) ;; pre-update effect hook; defaults to nothing when unbound ;; - Unknowns @@ -19097,12 +23272,27 @@ ;; - Functions -(define-extern sky-set-sun-radii (function sky-parms int float float float symbol)) -(define-extern sky-set-sun-colors (function sky-parms int rgba rgba rgba rgba symbol)) -(define-extern sky-set-sun-colors-sun (function sky-parms int rgba rgba symbol)) -(define-extern sky-set-sun-colors-halo (function sky-parms int rgba rgba symbol)) -(define-extern sky-set-sun-colors-aurora (function sky-parms int rgba rgba symbol)) -(define-extern sky-set-orbit (function sky-parms int float float float float float float symbol)) +(define-extern sky-set-sun-radii + "Set the apparent sun, halo, and aurora radii in the sun record selected by index's low bit." + (function sky-parms sky-sun-index float float float symbol)) +(define-extern sky-set-sun-colors + "Set a sun's continuous center-to-edge color gradient. The sun edge is also the halo center, + and the halo edge is also the aurora center." + (function sky-parms sky-sun-index rgba rgba rgba rgba symbol)) +(define-extern sky-set-sun-colors-sun + "Set the center and edge colors of the sun record selected by index's low bit." + (function sky-parms sky-sun-index rgba rgba symbol)) +(define-extern sky-set-sun-colors-halo + "Set the center and edge colors of the halo record selected by index's low bit." + (function sky-parms sky-sun-index rgba rgba symbol)) +(define-extern sky-set-sun-colors-aurora + "Set the center and edge colors of the aurora record selected by index's low bit." + (function sky-parms sky-sun-index rgba rgba symbol)) +(define-extern sky-set-orbit + "Configure the sun, green-sun, or moon orbit. High-noon is an hour of the day; tilt and rise + are supplied in degrees and stored in radians; distance is the orbit radius; and the halo + bounds control a sun's animated aurora radius." + (function sky-parms sky-orbit-index float float float float float float symbol)) ;; ---------------------- @@ -19137,13 +23327,34 @@ ;; - Functions -(define-extern sky-add-frame-data function) -(define-extern sky-make-sun-data (function sky-parms int float none)) -(define-extern sky-make-moon-data (function sky-parms float none)) -(define-extern sky-make-light (function sky-parms light int rgba none)) -(define-extern sky-init-upload-data function) -(define-extern sky-upload function) -(define-extern sky-draw (function sky-parms none)) +(define-extern sky-add-frame-data + "Append the old sky renderer's 18-quadword frame constants, refresh its VU light block, copy + the current circle, sun, and moon data into contiguous upload storage, and append the VIF + transfer for that 27-quadword image." + (function dma-buffer object symbol)) +(define-extern sky-make-sun-data + "Place one sun on its tilted orbit for hour, completing one revolution per 24 hours. Its + aurora radius blends from min-halo to max-halo as the sun rises to high noon and stays at + min-halo throughout the far half of the orbit." + (function sky-parms sky-sun-index float none)) +(define-extern sky-make-moon-data + "Place the moon on its tilted orbit for hour, completing one revolution per 24 hours." + (function sky-parms float none)) +(define-extern sky-make-light + "Point dst-light toward the selected sun or moon, assign light-color's RGB bytes as normalized + floats while replacing its alpha with 1, and enable the light's first level." + (function sky-parms light sky-orbit-index rgba none)) +(define-extern sky-init-upload-data + "Initialize the normal sun's center-to-edge color layers from one packed color, using alpha + 96 for the inner halo, 48 for its outer edge and the inner aurora, and 0 at the aurora edge." + (function sky-parms rgba none)) +(define-extern sky-upload + "Upload the old sky VU1 program and its current frame and celestial data, then start the + program's setup entry point." + (function dma-buffer object none)) +(define-extern sky-draw + "Append the VIF command that starts the old sky VU1 program's draw entry point." + (function dma-buffer none)) ;; - Unknowns @@ -19158,21 +23369,69 @@ ;; - Functions -(define-extern copy-sky-texture (function dma-buffer adgif-shader float none)) -(define-extern copy-cloud-texture (function dma-buffer adgif-shader float none)) -(define-extern init-sky-regs (function none)) -(define-extern render-sky-tri (function (inline-array sky-vertex) dma-buffer none)) -(define-extern close-sky-buffer (function dma-buffer none)) -(define-extern set-tex-offset (function int int none)) -(define-extern render-sky-quad (function int dma-buffer none)) -(define-extern sky-tng-setup-cloud-layer (function float float vector (inline-array sky-vertex) none)) -(define-extern draw-large-polygon function) -(define-extern init-sky-tng-data (function sky-tng-data none)) -(define-extern clip-polygon-against-positive-hyperplane function) -(define-extern clip-polygon-against-negative-hyperplane function) -(define-extern sky-duplicate-polys function) -(define-extern sky-tng-setup-clouds (function none)) -(define-extern render-sky-tng (function time-of-day-context none)) +(define-extern copy-sky-texture + "Append one weighted 32-by-32 time-of-day snapshot to the runtime sky target. The first + contribution replaces the target and later contributions alpha-blend over it." + (function dma-buffer adgif-shader float none)) +(define-extern copy-cloud-texture + "Append one weighted 64-by-64 cloud snapshot below the sky image in the runtime target. The + first contribution replaces the cloud region and later contributions alpha-blend over it." + (function dma-buffer adgif-shader float none)) +(define-extern init-sky-regs + "Load the camera transform, projection, fog, texture-offset, and layer-depth state used by the + sky polygon renderer. Select vertical screen offset 2049 when camera translation y is positive + and 2047 otherwise." + (function none)) +(define-extern render-sky-tri + "Transform three sky vertices into a closed scratchpad polygon and pass it through clipping and + GS packet conversion." + (function (inline-array sky-vertex) dma-buffer none)) +(define-extern close-sky-buffer + "Append the #x8000 terminator for the current large-polygon stream and advance the DMA buffer by + one qword." + (function dma-buffer none)) +(define-extern set-tex-offset + "Convert two wrapped 16-bit texture phases to normalized turns and store them as the current + cloud-layer ST offset." + (function int int none)) +(define-extern render-sky-quad + "Transform four sky vertices into a closed scratchpad polygon and pass it through clipping and + GS packet conversion." + (function (inline-array sky-vertex) dma-buffer none)) +(define-extern sky-tng-setup-cloud-layer + "Build one 36-vertex cloud layer from rotated outer and inner squares plus their midpoint ring. + The outer edge is transparent, the center retains color's alpha, and continuous ST coordinates + map the nine resulting quads." + (function float float vector (inline-array sky-vertex) none)) +(define-extern draw-large-polygon + "Clip the closed scratchpad polygon against all four homogeneous screen planes, then append its + giftag and perspective-correct ST, RGBAQ, and fixed-point XYZF vertices to the DMA buffer." + function) +(define-extern init-sky-tng-data + "Initialize the untextured base, alpha-blended textured roof, and fogged ocean giftags, then + clear the time and both cloud-layer scroll phases." + (function sky-tng-data none)) +(define-extern clip-polygon-against-positive-hyperplane + "Clip a closed 48-byte-per-vertex polygon against component <= w, interpolating position, STQ, + and color at each crossing and closing the output list." + function) +(define-extern clip-polygon-against-negative-hyperplane + "Clip a closed 48-byte-per-vertex polygon against component >= -w, interpolating position, STQ, + and color at each crossing and closing the output list." + function) +(define-extern sky-duplicate-polys + "Append the half-open aligned quadword range [begin, end) to the DMA buffer. An empty or reversed + range writes nothing." + (function dma-buffer (pointer uint128) (pointer uint128) none)) +(define-extern sky-tng-setup-clouds + "Build both 36-vertex cloud layers with different rotations and center colors so their grids do + not align." + (function none)) +(define-extern render-sky-tng + "Composite the prepared sky texture over four roof triangles, draw two independently scrolling + nine-quad cloud layers, fill the four base triangles at GS layer depth 256, and enqueue the + completed packet in the sky bucket." + (function time-of-day-context none)) ;; - Unknowns @@ -19192,6 +23451,8 @@ ;; - Types (deftype lbvtx (structure) + ;; v0/v1/v2 are previous/next/active in the triangulation work buffer, then triangle indices in + ;; load-boundary.data[0..tri-cnt). ix retains the original vertex ordinal. ((x float :offset-assert 0) (y float :offset-assert 4) (z float :offset-assert 8) @@ -19209,26 +23470,27 @@ (defenum load-boundary-cmd :type uint8 - (invalid 0) - (load 1) - (cmd2 2) - (display 3) - (vis 4) - (force-vis 5) - (checkpt 6) + (invalid 0) ;; No command. + (load 1) ;; Replace the desired pair of loaded levels. + (cmd2 2) ;; Reserved; no executor or boundary data uses it. + (display 3) ;; Set a loaded level's display mode. + (vis 4) ;; Select the active visibility nickname. + (force-vis 5) ;; Bypass BSP visibility outside this level's inside boxes. + (checkpt 6) ;; Select a continue point. ) (deftype load-boundary-crossing-command (structure) + ;; bparm is reserved padding. parm contains the two GOAL object parameters. ((cmd load-boundary-cmd :offset-assert 0) (bparm uint8 3 :offset-assert 1) (parm uint32 2 :offset-assert 4) (lev0 basic :offset 4) (lev1 basic :offset 8) - (displev basic :offset 4) - (dispcmd basic :offset 8) - (nick basic :offset 4) - (forcelev basic :offset 4) - (forceonoff basic :offset 8) + (displev symbol :offset 4) + (dispcmd symbol :offset 8) + (nick symbol :offset 4) + (forcelev symbol :offset 4) + (forceonoff symbol :offset 8) (checkname basic :offset 4) ) :pack-me @@ -19240,11 +23502,18 @@ (defenum load-boundary-flags :type uint8 :bitfield #t - (closed 0) - (player 1) + (closed 0) ;; Use a filled horizontal polygon at top-plane instead of an open vertical wall. + (player 1) ;; Test player movement instead of camera movement. + ) + +(defenum load-boundary-crossing-result + (none 0) + (forward 1) + (backward 2) ) (deftype load-boundary (basic) + ;; rejector.xyz is the center of the XZ bounding box and rejector.w is half its diagonal. ((num-points uint16 :offset-assert 4) (flags load-boundary-flags :offset-assert 6) (top-plane float :offset-assert 8) @@ -19256,9 +23525,13 @@ (rejector vector :inline :offset-assert 48) (data lbvtx 1 :inline :offset-assert 64) (data2 lbvtx :dynamic :inline :offset 64) - ) + ) (:methods - (new (symbol type int symbol symbol) _type_) ;; 0 + (new "Allocate a load boundary with room for vertex-count vertices. Set the closed flag when + closed? is true, initialize the vertical limits, vertex indices, rejector, and crossing + commands, and prepend it to *load-boundary-list* when add-to-list? is true." + (symbol type int symbol symbol) + _type_) ;; 0 ) :method-count-assert 9 :size-assert #x50 @@ -19292,59 +23565,186 @@ ;; - Functions -(define-extern check-closed-boundary (function load-boundary lbvtx lbvtx symbol)) -(define-extern check-open-boundary (function load-boundary lbvtx lbvtx symbol)) -(define-extern load-state-want-vis (function symbol int)) -(define-extern load-state-want-levels (function symbol symbol int)) -(define-extern load-state-want-display-level (function symbol symbol int)) -(define-extern load-state-want-force-vis (function symbol symbol int)) -(define-extern command-get-param (function object object object)) -(define-extern entity-birth-no-kill (function entity none)) -(define-extern part-tracker-init (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) process collide-prim-core none :behavior part-tracker)) -(define-extern command-list-get-process (function object process)) -(define-extern command-get-quoted-param (function object object object)) -(define-extern command-get-int (function object int int)) -(define-extern ambient-hint-spawn (function string vector process-tree symbol object)) -(define-extern command-get-float (function object float float)) -(define-extern process-by-ename (function string process)) -(define-extern point-in-polygon (function load-boundary vector symbol)) -(define-extern try-corner (function object int symbol)) -(define-extern split-monotone-polygon (function load-boundary int none)) -(define-extern fix-boundary-normals (function load-boundary none)) -(define-extern triangulate-boundary (function load-boundary object)) -(define-extern find-bounding-circle (function load-boundary none)) -(define-extern render-boundary (function load-boundary none)) -(define-extern check-boundary (function load-boundary none)) -(define-extern edit-load-boundaries (function none)) -(define-extern copy-load-command! (function load-boundary-crossing-command load-boundary-crossing-command none)) -(define-extern copy-load-boundary! (function load-boundary load-boundary none)) -(define-extern lb-add-plane (function load-boundary)) -(define-extern lb-add (function load-boundary)) -(define-extern save-boundary-cmd (function load-boundary-crossing-command string object none)) -(define-extern replace-load-boundary (function load-boundary load-boundary none)) -(define-extern format-boundary-cmd (function load-boundary-crossing-command none)) -(define-extern boundary-set-color (function lbvtx load-boundary-crossing-command none)) -(define-extern add-boundary-shader (function texture-id dma-buffer none)) -(define-extern draw-boundary-cap (function load-boundary float dma-buffer symbol none)) -(define-extern draw-boundary-side (function load-boundary integer integer dma-buffer symbol none)) -(define-extern init-boundary-regs (function none)) -(define-extern render-boundary-tri (function lbvtx dma-buffer none)) -(define-extern render-boundary-quad (function lbvtx dma-buffer none)) -(define-extern draw-boundary-polygon function) -(define-extern lb-del (function none)) -(define-extern lb-add-vtx-before (function none)) -(define-extern lb-add-vtx-after (function none)) -(define-extern lb-del-vtx (function none)) -(define-extern load-boundary-from-template (function (array object) none)) -(define-extern ---lb-save (function none)) -(define-extern lb-add-load (function object object none)) -(define-extern lb-add-load-plane (function object object none)) -(define-extern lb-flip (function none)) -(define-extern lb-set-camera (function none)) -(define-extern lb-set-player (function none)) -(define-extern lb-copy (function none)) -(define-extern render-boundaries (function none)) -(define-extern command-get-time (function object int int)) +(define-extern check-closed-boundary "Test whether movement crossed the closed boundary's top plane + inside its triangulated cap. The XZ sample uses vertical-motion divided by previous-to-plane + distance, so it is generally extrapolated beyond current-pos rather than placed on the plane. + Return none, forward, or backward according to the crossing direction." + (function load-boundary lbvtx lbvtx load-boundary-crossing-result)) +(define-extern check-open-boundary "Intersect the previous-to-current XZ segment with every open + boundary edge, accept intersections within the boundary's vertical range, and accumulate oriented + crossings. Return forward for positive net crossings, backward for negative, or none." + (function load-boundary lbvtx lbvtx load-boundary-crossing-result)) +(define-extern load-state-want-vis "Apply want-vis to the global load state." + (function symbol int)) +(define-extern load-state-want-levels "Apply want-levels to the global load state." + (function symbol symbol int)) +(define-extern load-state-want-display-level "Apply want-display-level to the global load state." + (function symbol symbol int)) +(define-extern load-state-want-force-vis "Apply want-force-vis to the global load state." + (function symbol symbol int)) +(define-extern command-get-param "Decode a command parameter: seconds to 300-Hz frames, meters to + 4096-unit world coordinates, degrees to 65536-unit turns, and static-vectorm to a permanently + allocated scaled vector. Unrecognized values pass through; false uses default." + (function object object object)) +(define-extern entity-birth-no-kill + "Set no-kill on entity, birth it unless blocked, dead, or already live, and leave the resulting + process connected." + (function entity none)) +(define-extern part-tracker-init + "Initialize a particle tracker at source-prim. Follow target for duration, or use the particle +group's duration when duration is not positive, invoking callback each frame when supplied." + (function sparticle-launch-group time-frame (function part-tracker none) (pointer process-drawable) + process collide-prim-core none :behavior part-tracker)) +(define-extern command-list-get-process "Resolve a command target to a process. Accept an existing + process, target, sidekick, self, parent, camera, an entity/process name string, or a child + drawable's art-group name; return false if unresolved." + (function object process)) +(define-extern command-get-quoted-param "Decode a command parameter after removing one outer + (quote value) wrapper." + (function object object object)) +(define-extern command-get-int "Return value as an integer when it is a boxed integer or float; + return default for false or unsupported values." + (function object int int)) +(define-extern ambient-hint-spawn + "Spawn a positional ambient, camera, or stinger hint under process-tree when no hint is active. +Camera hints first dismiss the current hint." + (function string vector process-tree symbol object)) +(define-extern command-get-float "Return value as a float when it is a boxed integer or float; + return default for false or unsupported values." + (function object float float)) +(define-extern process-by-ename + "Return the live process connected to the named entity, or false." + (function string process)) +(define-extern point-in-polygon "Return true when point's XZ coordinates lie inside any cached + boundary triangle, including points on triangle edges." + (function load-boundary vector symbol)) +(define-extern try-corner "Return true when the candidate corner's diagonal leaves every remaining + polygon vertex on the valid side, making the corner safe to clip during triangulation." + (function load-boundary int symbol)) +(define-extern split-monotone-polygon "Ear-clip one monotone polygon from the work-buffer links, + append each triangle's original vertex indices to boundary, and remove accepted corners until one + triangle remains." + (function load-boundary int none)) +(define-extern fix-boundary-normals "Check that each cached cap triangle lies in the XZ plane and + swap its first two indices when necessary so every triangle faces upward." + (function load-boundary none)) +(define-extern triangulate-boundary "Triangulate a closed XZ boundary into index triples stored in + its vertex records. Build circular previous/next links in the global work buffer, normalize + winding, split non-monotone sections, triangulate each monotone polygon, and fix triangle winding. + Open boundaries only mark their cache initialized." + (function load-boundary int)) +(define-extern find-bounding-circle "Store an XZ rejection circle centered on boundary's + axis-aligned bounding box, with radius equal to the box half-diagonal." + (function load-boundary none)) +(define-extern render-boundary "Append debug rendering for boundary to the debug DMA bucket. Closed + boundaries draw their triangulated top cap; open boundaries draw vertical side quads. The selected + boundary alternates UV phase to flash." + (function load-boundary none)) +(define-extern check-boundary "Reject distant movement using boundary's cached circle, test the + camera or player segment according to its flags, select the forward/backward command, and apply + load, display, visibility, forced-visibility, or checkpoint state changes." + (function load-boundary none)) +(define-extern edit-load-boundaries "Run the controller-two load-boundary editor: print the + selection, highlight the selected vertex, move vertices or height planes in camera-relative axes, + and cycle boundaries and vertices. Moving geometry invalidates cached triangulation." + (function none)) +(define-extern copy-load-command! "Copy the complete twelve-byte crossing command, including its + command byte, reserved bytes, and two object parameters, from src to dst." + (function load-boundary-crossing-command load-boundary-crossing-command none)) +(define-extern copy-load-boundary! "Copy flags, vertical planes, and both crossing commands from src + to dst, and invalidate dst's cached triangulation. Vertex storage and list links are not copied." + (function load-boundary load-boundary none)) +(define-extern lb-add-plane "Create and select a closed 50-by-50-meter boundary whose first corner + is at the camera." + (function load-boundary)) +(define-extern lb-add "Create and select an open two-point boundary beginning at the camera and + extending 50 meters along positive Z." + (function load-boundary)) +(define-extern save-boundary-cmd "Write command as a static-load-boundary keyword clause to stream. + key-name is normally fwd or bwd; invalid and cmd2 commands emit nothing." + (function load-boundary-crossing-command string object none)) +(define-extern replace-load-boundary "Replace old-boundary in the global linked list with + new-boundary, preserving its successor and editor selection. Print an error if old-boundary is not + present." + (function load-boundary load-boundary none)) +(define-extern format-boundary-cmd "Print a concise editor description of command and its parameters + to the standard console." + (function load-boundary-crossing-command none)) +(define-extern boundary-set-color "Set a debug polygon color from command's load-boundary command + kind: load, display, visibility, checkpoint, or the default/unknown color." + (function lbvtx load-boundary-crossing-command none)) +(define-extern add-boundary-shader "Append the fixed five-register ADGIF shader used by + load-boundary polygons to dma-buf, initialize it from shader-texture, disable texture filtering, and + advance the buffer cursor." + (function texture-id dma-buffer none)) +(define-extern draw-boundary-cap "Draw every cached triangle of a closed boundary at plane-y. + uv-phase? selects the alternate UV orientation used to flash the selected boundary." + (function load-boundary float dma-buffer symbol none)) +(define-extern draw-boundary-side "Build and draw the vertical quad joining two boundary vertices + between bot-plane and top-plane. uv-phase? selects the alternate UV orientation used to flash the + selected boundary." + (function load-boundary integer integer dma-buffer symbol none)) +(define-extern init-boundary-regs "Prepare the shared sky polygon registers for load-boundary + drawing. Copy the camera fog parameters, load the camera transform and homogeneous-screen + constants, scale the transform rows, and clear the polygon offset register." + (function none)) +(define-extern render-boundary-tri "Transform three interleaved position/UV/color vertices into + camera space, select the forward or backward command color from the polygon winding, and pass the + triangle through the boundary polygon clipper." + (function lbvtx dma-buffer none)) +(define-extern render-boundary-quad "Transform four interleaved position/UV/color vertices into + camera space, select the forward or backward command color from the polygon winding, and pass the + quad through the boundary polygon clipper." + (function lbvtx dma-buffer none)) +(define-extern draw-boundary-polygon "Clip the transformed polygon against the four screen + hyperplanes, then perspective-divide surviving vertices and append position, texture, color, fog, + and GIF data to the DMA buffer. Return false when clipping removes the polygon." + function) +(define-extern lb-del "Remove the selected editor boundary from the global list and clear the + selection. Report when nothing is selected or the boundary cannot be found." + (function none)) +(define-extern lb-add-vtx-before "Replace the selected boundary with a one-vertex-larger copy and + insert a vertex before the selection at the midpoint of its neighboring edge, wrapping across the + closing edge." + (function none)) +(define-extern lb-add-vtx-after "Replace the selected boundary with a one-vertex-larger copy and + insert a vertex after the selection at the midpoint of its neighboring edge, wrapping across the + closing edge. Advance the editor selection to the new vertex." + (function none)) +(define-extern lb-del-vtx "Replace the selected boundary with a one-vertex-smaller copy that omits + the selected vertex. Clear the vertex selection when the removed vertex was last." + (function none)) +(define-extern load-boundary-from-template "Instantiate and prepend a runtime load boundary from a + four-element static template containing flags, top/bottom plus XZ points, and forward/backward + command lists." + (function (array object) none)) +(define-extern ---lb-save "Rewrite game/load-boundary-data.gc from the current linked list, + serializing flags, planes, XZ points, and both crossing commands." + (function none)) +(define-extern lb-add-load "Create an open boundary and assign a forward load command requesting + level0 and level1." + (function symbol symbol none)) +(define-extern lb-add-load-plane "Create a closed boundary and assign a forward load command + requesting level0 and level1." + (function symbol symbol none)) +(define-extern lb-flip "Swap the selected boundary's forward and backward crossing commands." + (function none)) +(define-extern lb-set-camera "Make the selected boundary react to camera crossings by clearing its + player flag." + (function none)) +(define-extern lb-set-player "Make the selected boundary react to player crossings by setting its + player flag." + (function none)) +(define-extern lb-copy "Duplicate the selected boundary, including every vertex and both commands, + prepend the copy to the boundary list, and select it." + (function none)) +(define-extern render-boundaries "Once per frame, retain previous camera/player positions, capture + current positions, lazily triangulate and bound each boundary, optionally draw it, and execute any + detected crossings. Run the editor when boundary display is enabled." + (function none)) +(define-extern command-get-time "Convert (seconds n) to 300-Hz animation frames, otherwise convert a + boxed number to an integer; return default when conversion is unavailable." + (function object int int)) ;; - Unknowns @@ -19410,15 +23810,43 @@ ;; - Functions -(define-extern update-sound-banks (function int)) -(define-extern load-vis-info (function symbol symbol int)) -(define-extern on (function symbol process)) -(define-extern level-update-after-load (function level login-state level)) -(define-extern add-bsp-drawable (function bsp-header level symbol display-frame none)) -(define-extern remap-level-name (function level-load-info symbol)) -(define-extern bg (function symbol int)) -(define-extern play (function symbol symbol int)) -(define-extern show-level (function symbol int)) +(define-extern update-sound-banks + "Reconcile the two resident sound-bank slots with the distinct banks required by active levels. + Do nothing while the loader RPC is busy or a movie is active, report more than two requirements, + and perform at most one load or unload per call." + (function int)) +(define-extern load-vis-info + "Start loading the self VIS file for the active level whose nickname matches vis-name, replacing + the old VIS file when required." + (function symbol symbol int)) +(define-extern on + "Start the display process when it is not already running, activate loaded levels, and teleport + to a camera-start entity for a non-release boot. Return the display process or false." + (function symbol process)) +(define-extern level-update-after-load + "Advance a level's incremental login. Log in direct drawable trees and art groups, process queued + tfragment arrays and TIE prototypes in bounded batches, initialize actor navigation, then attach + visibility, load packages, publish subdivision distances, and mark the level loaded." + (function level login-state level)) +(define-extern add-bsp-drawable + "Draw a level BSP for the current display frame and optionally append its strip-line debug view." + (function bsp-header level symbol display-frame none)) +(define-extern remap-level-name + "Return info's VIS filename symbol when VIS mode is enabled, otherwise its canonical level name." + (function level-load-info symbol)) +(define-extern bg + "Load and activate one level for the background/debug entry point. Accept its canonical name, + VIS name, or nickname; load its runtime packages, initialize load-state and continue state, and + synchronously advance loading when no display process exists." + (function symbol int)) +(define-extern play + "Initialize the normal game entry point: choose the startup level from the boot message, allocate + level heaps, reset presentation and load state, load and activate the startup level, start the + display process, and optionally initialize game progress." + (function symbol symbol int)) +(define-extern show-level + "Keep the target's current level requested and add level-name as the displayed neighbor." + (function symbol int)) ;; - Symbols @@ -19439,13 +23867,39 @@ ;; - Functions -(define-extern set-font-color-alpha (function font-color int none)) -(define-extern load-game-text-info (function string symbol 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 int none)) -(define-extern disable-level-text-file-loading (function none)) -(define-extern enable-level-text-file-loading (function none)) +(define-extern lookup-text-impl! + "Binary-search this text group for id. Use return-false? to select #f or an `UNKNOWN ID n` string +when it is absent. On PC, try the English fallback group first unless fallback-call? marks that +recursive lookup." + (function game-text-info text-id symbol symbol string)) +(define-extern set-font-color-alpha + "Set alpha on all four palette variants for color-index and on the font shadow." + (function font-color int none)) +(define-extern load-game-text-info + "Synchronously ensure group-name is loaded in the selected language into heap and publish the +linked game-text-info through destination-symbol. Reuse matching data; otherwise reset the heap, +load and link the language/group TXT file, and clear destination-symbol on link failure. EE maps +English to UK English in SCEE territory; PC reads its selected text language. Errors are reported +while the function always returns zero." + (function string symbol kheap int)) +(define-extern load-level-text-files + "Load the common text group when level text loading is enabled or level-index is nonnegative. The +PC port also loads an English copy used for missing-translation fallback." + (function int none)) +(define-extern draw-debug-text-box + "Draw the transformed rectangle described by context's origin, width, and height as four gray +debug lines." + (function font-context none)) +(define-extern print-game-text-scaled + "Temporarily scale context's bounds and font scale around its centering flags, draw str with +alpha, and restore the context." + (function string float font-context int none)) +(define-extern disable-level-text-file-loading + "Prevent calls with a negative level index from loading the common text group." + (function none)) +(define-extern enable-level-text-file-loading + "Allow calls with a negative level index to load the common text group." + (function none)) ;; - Unknowns @@ -19464,6 +23918,10 @@ ;; - Types (deftype collide-probe-stack-elem (structure) + "The reflected view of one pending broad-phase span. The EE code packs these into eight bytes in +scratchpad: child is followed by a 16-bit remaining count and a signed 16-bit work kind in the two +halves of count. A negative kind identifies a queued TIE instance, zero identifies direct leaves, +and a positive kind identifies a draw-node span." ((child uint32 :offset-assert 0) (count uint32 :offset-assert 4) ) @@ -19473,6 +23931,9 @@ ) (deftype collide-probe-stack (structure) + "Scratchpad LIFO storage for iterative collision-tree traversal. The EE code packs 1024 +eight-byte elements into 0x2000 bytes; the reflected inline array has a nominal 0x4000-byte +allocation because its elements receive sixteen-byte inline alignment." ((data collide-probe-stack-elem 1024 :inline :offset-assert 0) ) :method-count-assert 9 @@ -19482,26 +23943,79 @@ ;; - Functions -(define-extern misty-ambush-height (function vector float)) -(define-extern distc (function vector vector float)) -(define-extern interpolate (function float float float float float float)) -(define-extern collide-upload-vu0 (function none)) -(define-extern collide-probe-instance-tie (function object int collide-list int int)) ;; drawable is either an instance-tie or a draw-node inline arrary -(define-extern collide-probe-node (function (inline-array draw-node) int collide-list int)) -(define-extern indent-to (function int none)) -(define-extern probe-traverse-inline-array-node (function drawable-inline-array-node int none)) -(define-extern probe-traverse-draw-node (function draw-node int 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 probe-traverse-collide-fragment (function drawable-tree-collide-fragment int none)) -(define-extern print-out (function int object)) -(define-extern collide-probe-instance-tie-collide-frags (function none)) ;; does nothing -(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-probe-make-list (function level collide-list none)) -(define-extern misty-ambush-height-probe (function vector float float)) -(define-extern pke-collide-test (function none)) ;; does nothing +(define-extern misty-ambush-height + "Return the hand-tuned ground height for the Misty Island ambush as a piecewise-linear function +of horizontal distance from the arena center." + (function vector float)) +(define-extern distc + "Return the XZ-plane distance between a and b." + (function vector vector float)) +(define-extern interpolate + "Linearly map x from the segment x0..x1 onto y0..y1 without clamping or handling a zero-length +input segment." + (function float float float float float float)) +(define-extern collide-upload-vu0 + "Upload the collision probe's three-entry VU0 program before traversing background collision +trees. PC collision functions execute the equivalent vector operations directly." + (function none)) +(define-extern collide-probe-instance-tie + "Traverse a draw-node or instance-TIE span against the active broad-phase box and append each +surviving prototype collision fragment with its owning instance to result. Draw-node-span? selects +the interpretation of the initial span. Callers must keep traversal within the 1024-entry probe +stack and 256-entry result list; no capacity checks are performed." + (function object int collide-list int int)) +(define-extern collide-probe-node + "Traverse node-count draw nodes against the active broad-phase box and append each surviving +collision fragment to result. Callers must keep traversal within the 1024-entry probe stack and +256-entry result list; no capacity checks are performed." + (function (inline-array draw-node) int collide-list int)) +(define-extern indent-to + "Print space-count spaces to the debug stream." + (function int none)) +(define-extern probe-traverse-inline-array-node + "Print one inline draw-node array and recursively describe any draw-node children." + (function drawable-inline-array-node int none)) +(define-extern probe-traverse-draw-node + "Print one draw node and recursively describe its child draw-node span." + (function draw-node int none)) +(define-extern creates-new-method? + "Return true when method-id lies beyond the method table allocated by type-to-check's parent." + (function type int symbol)) +(define-extern overrides-parent-method? + "Return true when type-to-check's method-id entry differs from its parent's entry." + (function type int symbol)) +(define-extern describe-methods + "Print the type which creates or most recently overrides each method slot of type-to-describe." + (function type symbol)) +(define-extern probe-traverse-collide-fragment + "Print the inline-array levels of a collide-fragment drawable tree and recursively describe its +draw-node arrays." + (function drawable-tree-collide-fragment int none)) +(define-extern print-out + "Print value as a decimal integer to the debug console." + (function int object)) +(define-extern collide-probe-instance-tie-collide-frags + "Do nothing. This unused collision-fragment hook remains as a placeholder." + (function none)) +(define-extern collide-probe-collide-fragment-tree-make-list + "Traverse a collide-fragment tree with more than one inline-array level and append broad-phase +matches to result. Single-level trees are unsupported here." + (function drawable-tree-collide-fragment collide-list none)) +(define-extern collide-probe-instance-tie-tree-make-list + "Traverse an instance-TIE tree and append broad-phase matches to result. Support both hierarchical +draw-node trees and a single direct instance array." + (function drawable-tree-instance-tie collide-list int)) +(define-extern collide-probe-make-list + "Upload the collision VU program, traverse every TIE and collide-fragment tree in level-to-probe, +and append broad-phase matches to result without clearing its existing entries." + (function level collide-list none)) +(define-extern misty-ambush-height-probe + "Return the fraction of probe-length from position down to the hand-tuned Misty ambush ground +height. The fraction can exceed one; return -1 only when position is not above the ground." + (function vector float float)) +(define-extern pke-collide-test + "Do nothing. This unused collision test remains as a placeholder." + (function none)) ;; - Unknowns @@ -19517,7 +24031,11 @@ ;; - Functions -(define-extern sphere-cull (function vector symbol)) ;; vf deps - vf16-19 +(define-extern sphere-cull + "Test sphere against the four current view-frustum side planes. Return true unless the sphere +lies wholly outside any plane; the EE entry uses plane coefficients left in vf16-vf19 by its +caller." + (function vector symbol)) ;; vf deps - vf16-19 ;; ---------------------- @@ -19529,6 +24047,8 @@ ;; - Types (deftype sopt-work (structure) + "Stack workspace for sphere-on-platform-test: the closest point followed by the integer-coordinate +bounding box of the query sphere expanded by 122.88." ((intersect vector :inline :offset-assert 0) (sphere-bbox4w bounding-box4w :inline :offset-assert 16) ) @@ -19538,6 +24058,8 @@ ) (deftype spat-work (structure) + "Stack workspace for should-push-away-test: the closest point followed by the query sphere's +integer-coordinate bounding box." ((intersect vector :inline :offset-assert 0) (sphere-bbox4w bounding-box4w :inline :offset-assert 16) ) @@ -19547,6 +24069,8 @@ ) (deftype oot-work (structure) + "Stack workspace for overlap-test: the closest point followed by the query sphere's +integer-coordinate bounding box." ((intersect vector :inline :offset-assert 0) (sphere-bbox4w bounding-box4w :inline :offset-assert 16) ) @@ -19565,6 +24089,8 @@ ;; - Types (deftype add-prims-touching-work (structure) + "Stack workspace holding the optional triangle results while a touching-primitive pair is found +or allocated." ((tri1 collide-tri-result :offset-assert 0) (tri2 collide-tri-result :offset-assert 4) ) @@ -19583,6 +24109,8 @@ ;; - Types (deftype pbhp-stack-vars (structure) + "Deferred state used while find-best-grab! generates the negative-direction fallback for a +failed center hold." ((edge collide-edge-edge :offset-assert 0) (allocated basic :offset-assert 4) (neg-hold-pt vector :inline :offset-assert 16) @@ -19607,12 +24135,33 @@ ;; - Functions -(define-extern target-attack-up (function target symbol symbol none)) -(define-extern find-ground-point (function control-info vector float float vector)) -(define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags)) -(define-extern simple-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags)) -(define-extern collide-shape-draw-debug-marks (function none)) -(define-extern debug-report-col-stats (function int)) +(define-extern target-attack-up + "Send event-type to launch the target toward nearby safe ground using attack-mode. Fall back to +the last known safe ground, and use a straight upward launch when that point differs by ten meters +or more along gravity." + (function target symbol symbol none)) +(define-extern find-ground-point + "Search eight alternating headings around target-control for safe ground. Each ray begins +start-distance forward and five meters above the target, and rejects deadly, endless-fall, or +steep results. Copy the first direction with two acceptable hits to ground-result, or return false +when every direction fails." + (function control-info vector float float vector)) +(define-extern default-collision-reaction + "Move shape to the earliest intersection, process its surface material, classify the contact as +ground, wall, ceiling, or actor contact, and remove velocity directed into the surface. Store the +adjusted velocity in velocity-out and return the collide-status bits produced by the contact." + (function collide-shape-moving collide-shape-intersect vector vector collide-status)) +(define-extern simple-collision-reaction + "Move shape to the earliest intersection and reflect its velocity by one-and-a-half times the +incoming normal component. Store the result in velocity-out and return the basic contact status." + (function collide-shape-moving collide-shape-intersect vector vector collide-status)) +(define-extern collide-shape-draw-debug-marks + "Draw the target marker and registered collision shapes selected by the collision-debug filters." + (function none)) +(define-extern debug-report-col-stats + "When collision timing is enabled, print the collision and frame times, then restart both +stopwatches for the next frame." + (function int)) ;; - Unknowns @@ -19658,10 +24207,15 @@ ;; - Types (deftype death-info (basic) - ((vertex-skip uint16 :offset-assert 4) + (;; Vertex sampling stride for the dissolving MERC death effect. + (vertex-skip uint16 :offset-assert 4) + ;; Effect duration before time-factor scaling. (timer uint8 :offset-assert 6) + ;; Elapsed ticks during which ordinary triangles overlap the dissolve. (overlap uint8 :offset-assert 7) + ;; Particle launcher id used for sampled death vertices. (effect uint32 :offset-assert 8) + ;; Optional sound effect played when death starts. (sound symbol :offset-assert 12) ) :method-count-assert 9 @@ -19671,8 +24225,13 @@ ;; - Functions -(define-extern birth-func-death-sparks (function none)) ;; does absolutely nothing -(define-extern merc-death-spawn (function int vector vector none)) ;; i think the int is the id for the particle table +(define-extern birth-func-death-sparks + "No-op birth callback for death-spark particles." + (function none)) +(define-extern merc-death-spawn + "Launch the death particle selected by effect-id at position when that part-table entry is a +particle launcher. surface-normal is reserved for the sampled MERC normal and is currently unused." + (function int vector vector none)) ;; - Unknowns @@ -19767,6 +24326,7 @@ ) (defenum water-look + :type int32 (water-anim-sunken-big-room 0) (water-anim-sunken-first-room-from-entrance 1) (water-anim-sunken-qbert-room 2) @@ -19818,7 +24378,7 @@ ) (deftype water-control (basic) - ((flags water-flags :offset-assert 4) + ((flags water-flag :offset-assert 4 :score 1) (process process-drawable :offset-assert 8) (joint-index int32 :offset-assert 12) (top-y-offset float :offset-assert 16) @@ -19852,21 +24412,43 @@ (drip-speed float :offset-assert 272) (drip-height meters :offset-assert 276) (drip-mult float :offset-assert 280) - (flag water-flag :overlay-at flags :score 1) ;; added + (flag water-flag :overlay-at flags) ;; added compatibility view ) :method-count-assert 17 :size-assert #x11c :flag-assert #x110000011c (:methods - (new (symbol type process int float float float) _type_) ;; 0 - (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 - (create-splash (_type_ float vector int vector) none) ;; 13 - (display-water-marks? (_type_) symbol) ;; 14 - (water-control-method-15 (_type_) none) ;; 15 - (water-control-method-16 (_type_) none) ;; 16 + (new "Allocate water state for owner. Track joint-index plus top-y-offset as its top point, +install the default swim and wade depths, and initialize an eight-meter bottom and 0.4-meter ripple +size." (symbol type process-drawable int float float float) _type_) ;; 0 + (relocate :override-doc + "Adjust the owning process pointer after its process heap moves.") + (water-control-init-extra! "Perform subtype-specific water-control initialization. The base +implementation is empty." (_type_) none) ;; 9 + (update-water-state! "Refresh the tracked root, top point, and moving surface, then derive the +touching, head-submerged, wading, swimming, and under-water states. Send the owner's water events, +apply surface motion and tar effects, and drive wakes, splashes, and post-water drips. The +classification height uses the smoothed ocean or ripple offset, while surface-height retains the +raw sampled surface for particles." + (_type_) none) ;; 10 + (start-bobbing! "Ask the bob smush-control to start a water-line waveform with the negative of +amplitude, subject to its restart guard. period-ticks and duration-ticks are game-time ticks; the +amplitude decays by 0.9 after each period." + (_type_ float int int) none) ;; 11 + (distance-from-surface "Return the tracked top point's signed height above the effective water +surface; a negative result is submerged." (_type_) float) ;; 12 + (create-splash "Create a splash at position, led by five percent of velocity and pinned to the +raw surface height. size zero selects the small particle group; other values select the full group. +The control's splash and master water-particle flags must both be enabled." + (_type_ float vector int vector) none) ;; 13 + (display-water-marks? "Return whether both global and per-control water debug marks are enabled." + (_type_) symbol) ;; 14 + (enter-water! "Record first contact with the surface and clear jump-out. When particles are +enabled, query the owner for ground-height, map values from 2,048 through 24,576 to splash scales +from 0.3 through 1, play the swim-stroke effect, and create the entry splash. Restore tar's initial +swim depth." (_type_) none) ;; 15 + (exit-water! "Clear the touch-water state, stop surface bobbing, and restore tar's initial swim +depth when the process leaves the water." (_type_) none) ;; 16 ) ) @@ -19877,8 +24459,8 @@ (bottom-height meters :offset-assert 188) (attack-event symbol :offset-assert 192) (target handle :offset-assert 200) - (flags water-flags :offset-assert 208) - (flag water-flag :overlay-at flags :score 1) ;; added + (flags water-flag :offset-assert 208 :score 1) + (flag water-flag :overlay-at flags) ;; added compatibility view ) :heap-base #x70 :method-count-assert 30 @@ -19886,16 +24468,35 @@ :flag-assert #x1e007000d4 ;; inherited inspect of process-drawable (:methods + (init-from-entity! :override-doc + "Finish initialization after the entity system has installed this volume's entity. Build the +root and resource state, run both subtype setup hooks, and enter the startup state. The supplied +entity argument is not read by this implementation.") (water-vol-idle () _type_ :state) ;; 20 (water-vol-startup () _type_ :state) ;; 21 - (water-vol-method-22 (_type_) none) ;; 22 ;; can also return an obs? - (reset-root! (_type_) none) ;; 23 - (set-stack-size! (_type_) none) ;; 24 - (water-vol-method-25 (_type_) none) ;; 25 - (update! (_type_) none) ;; 26 - (on-exit-water (_type_) none) ;; 27 - (get-ripple-height (_type_ vector) float) ;; 28 - (init! (_type_) none) ;; 29 + (setup-water! "Perform subtype-specific water setup. Animated and specialized volumes install +their skeleton, animation, ambient sound, ripple, or tint state here; the base implementation is +empty." (_type_) none) ;; 22 + (reset-root! "Install a plain transform root; containment is tested with the separate volume +control." (_type_) none) ;; 23 + (set-stack-size! "Use a 128-byte stack for the volume's small state thread." (_type_) none) ;; 24 + (setup-from-res! "Apply subtype-specific resource setup before water setup. Specialized +volumes use this hook for resource look, translation offset, and rotation offset; the base +implementation is empty." (_type_) none) ;; 25 + (update! "Release the claimed target after it leaves the volume, or apply the configured damage +while it remains in deadly water. When unclaimed, acquire the global target on entry, copy this +volume's flags and available depth thresholds into its water-control, and retain this process until +the claim is released." (_type_) none) ;; 26 + (on-exit-water "Clear the volume-supplied state from the claimed target, unlink both handles, +notify other water volumes so an overlap can claim it immediately, and release this process's +no-kill status." (_type_) none) ;; 27 + (get-ripple-height + "Return the water surface height at point, including any ripple displacement supplied by the + volume subtype." + (_type_ vector) float) ;; 28 + (init! "Build the volume from its entity. Read attack-event with drown as the default, create +the volume control, and read water-height as surface, wade depth, swim depth, optional flags, and +optional bottom depth. Enable ordinary water particles after loading the data." (_type_) none) ;; 29 ) ) @@ -19908,37 +24509,82 @@ ;; - Functions -(define-extern vector-into-frustum-nosmooth! (function matrix vector float vector)) -(define-extern slave-matrix-blend-2 (function matrix float vector matrix matrix)) -(define-extern mat-remove-z-rot (function matrix vector matrix)) -(define-extern parameter-ease-sin-clamp (function float float)) -(define-extern cam-slave-get-intro-step (function entity float)) -(define-extern cam-slave-get-float (function entity symbol float float)) -(define-extern cam-slave-init-vars (function none :behavior camera-slave)) -(define-extern cam-calc-follow! (function cam-rotation-tracker vector symbol vector)) -(define-extern slave-set-rotation! (function cam-rotation-tracker vector float float symbol none)) +(define-extern vector-into-frustum-nosmooth! "Rotate camera-matrix just enough to keep the target's + horizontal position, feet, and head inside the camera safe frame at fov. This applies + the immediate framing correction; later matrix blending supplies temporal smoothing." + (function matrix vector float vector)) +(define-extern slave-matrix-blend-2 "Rotate current-matrix toward target-matrix by a frame-rate- + adjusted quaternion step. The step grows with aim-vector distance; options-bits bit 2 selects + full three-dimensional rather than local-down-flattened distance." + (function matrix float vector matrix matrix)) +(define-extern mat-remove-z-rot "Remove roll from camera-matrix by aligning its up axis with the + direction opposite local-down while preserving its forward axis." (function matrix vector matrix)) +(define-extern parameter-ease-sin-clamp "Clamp t to 0..1 and apply a half-cosine ease with zero + slope at both endpoints." (function float float)) +(define-extern cam-slave-get-intro-step "Read intro-time plus intro-time-offset and return the + normalized increment for one 60 Hz frame. A non-positive duration uses the 1/240 fallback." + (function entity float)) +(define-extern cam-slave-get-float "Read property from entity with default-value, add the + interpolated property-offset value, and return the result." (function entity symbol float float)) +(define-extern cam-slave-init-vars "Reset the camera slave's state. Preserve the active camera + transform, rotation, field of view, and velocity when available; otherwise use the standard + defaults." (function none :behavior camera-slave)) +(define-extern cam-calc-follow! "Update tracker's camera aim point from camera-pos. The ordinary + path leads in the target's facing direction according to view angle and camera distance, then + optionally smooths that offset. The long-look mode uses a larger speed- and heading-dependent + lead with a quartic transition." (function cam-rotation-tracker vector symbol vector)) +(define-extern slave-set-rotation! "Build tracker's inverse camera rotation from its follow point, + optional point of interest and tilt; keep the target in frame, optionally blend toward the new + orientation, and remove roll. options-bits is a raw cam-slave-options word carried in a float." + (function cam-rotation-tracker vector float float symbol none)) (define-extern camera-slave-debug (function camera-slave none)) (define-extern camera-line-rel-len (function vector vector float vector4w none)) -(define-extern cam-slave-get-flags (function entity symbol uint128)) -(define-extern cam-slave-get-vector-with-offset (function entity-actor vector symbol symbol)) -(define-extern cam-slave-get-fov (function entity float)) -(define-extern cam-slave-get-interp-time (function entity float)) -(define-extern cam-slave-get-rot (function entity-actor matrix matrix)) -(define-extern cam-state-from-entity (function entity state)) -(define-extern parameter-ease-none (function object object)) ;; stubbed and unused -(define-extern parameter-ease-clamp (function float float)) ;; unused -(define-extern parameter-ease-lerp-clamp (function float float)) ;; unused -(define-extern parameter-ease-sqrt-clamp (function float float)) ;; unused -(define-extern fourth-power (function float float)) ;; unused -(define-extern third-power (function float float)) ;; unused -(define-extern parameter-ease-sqr-clamp (function float float)) -(define-extern cam-slave-go (function state none)) -(define-extern cam-slave-init (function state entity none :behavior camera-slave)) -(define-extern cam-standard-event-handler (function process int symbol event-message-block object :behavior camera-slave)) -(define-extern cam-curve-pos (function vector vector curve symbol vector :behavior camera-slave)) -(define-extern cam-curve-setup (function vector none :behavior camera-slave)) -(define-extern v-slrp2! (function vector vector vector float vector float vector)) -(define-extern v-slrp3! (function vector vector vector vector float vector)) +(define-extern cam-slave-get-flags "Read property's base flag word, set bits from property-on, + clear bits from property-off, and return the combined value." (function entity symbol uint128)) +(define-extern cam-slave-get-vector-with-offset "Read property from actor, using its live + translation or rotation for the matching property names, add an optional property-offset vector, + and write out. Return true when a value was available." (function entity-actor vector symbol symbol)) +(define-extern cam-slave-get-fov "Read fov plus fov-offset from entity. A zero base fov uses the + 64-degree default before applying the offset." (function entity float)) +(define-extern cam-slave-get-interp-time "Read interpTime plus interpTime-offset from entity and + return zero when the combined duration is at most one millisecond." (function entity float)) +(define-extern cam-slave-get-rot "Convert actor's rotation to out-matrix after composing an optional + rot-offset quaternion." (function entity-actor matrix matrix)) +(define-extern cam-state-from-entity "Select the camera state described by entity: circular for a + pivot, standoff for align data, spline for a camera path, the base string mode for positive + stringMaxLength, or fixed otherwise. Return false for no entity." (function entity state)) +(define-extern parameter-ease-none "Return value unchanged." (function object object)) ;; stubbed and unused +(define-extern parameter-ease-clamp "Clamp t to 0..1." (function float float)) ;; unused +(define-extern parameter-ease-lerp-clamp "Clamp t to 0..1 and apply a continuous piecewise-linear + ease with shallow endpoint slopes and a steeper middle." (function float float)) ;; unused +(define-extern parameter-ease-sqrt-clamp "Clamp t to 0..1 and apply the symmetric square-root + shaping curve." (function float float)) ;; unused +(define-extern fourth-power "Return x to the fourth power." (function float float)) ;; unused +(define-extern third-power "Return x to the third power." (function float float)) ;; unused +(define-extern parameter-ease-sqr-clamp "Clamp t to 0..1 and apply a symmetric quadratic + ease-in/ease-out curve." (function float float)) +(define-extern cam-slave-go "Reinitialize the camera slave and immediately enter next-state." + (function state none)) +(define-extern cam-slave-init "Initialize a camera slave for initial-state and optional + camera-entity, notify the camera master when needed, run the state's enter function, and make + initial-state current." (function state entity none :behavior camera-slave)) +(define-extern cam-standard-event-handler "Handle camera state changes, point-of-interest + activation, and immediate rotation updates after a teleport." + (function process int symbol event-message-block object :behavior camera-slave)) +(define-extern cam-curve-pos "Add the active intro and camera-path offsets to pos. When tangent is + supplied, estimate the intro direction into it. use-follow-point? selects the slave follow point + instead of the camera master's adjusted target when indexing the path." + (function vector vector curve symbol vector :behavior camera-slave)) +(define-extern cam-curve-setup "Load the camera and intro curves from the slave's entity, prepare + their endpoint offsets and camera index, and initialize intro timing." + (function vector none :behavior camera-slave)) +(define-extern v-slrp2! "Spherically interpolate from-vector toward to-vector by t while + interpolating their lengths separately and limiting the angular step to max-angle. When + plane-normal is supplied, rotate within that plane and interpolate the normal component + separately." (function vector vector vector float vector float vector)) +(define-extern v-slrp3! "Spherically interpolate from-vector toward to-vector by no more than + max-angle, using the required angular fraction and interpolating length separately. An optional + plane-normal constrains the rotation plane." (function vector vector vector vector float vector)) ;; - Symbols @@ -19952,9 +24598,14 @@ ;; - Functions -(define-extern matrix-world->local (function matrix)) -(define-extern camera-angle (function float)) -(define-extern camera-teleport-to-entity (function entity-actor none :behavior process)) +(define-extern matrix-world->local "Return the current world-to-camera rotation matrix." + (function matrix)) +(define-extern camera-angle "Return the camera's horizontal heading from the X and Z components of + the world-to-camera right axis." (function float)) +(define-extern camera-teleport-to-entity "Build a unit-scale camera transform from start-entity's + orientation and the position stored in the scale vector of its extra transform, then send it to + the camera master as an immediate teleport." + (function entity-actor none :behavior process)) ;; - Symbols @@ -19996,22 +24647,52 @@ ;; - Functions -(define-extern list-keeper-init (function none :behavior camera-master)) -(define-extern master-track-target (function symbol :behavior camera-master)) ;; TODO - go get that collide-cache function -(define-extern master-check-regions (function object :behavior camera-master)) +(define-extern list-keeper-init "Enter the list-keeper state, whose process remains last among the + camera master's children." (function none :behavior camera-master)) +(define-extern master-track-target "Update the camera master's tracked position and target + orientation. Handle ordinary and drawable targets, ground-to-air vertical smoothing, edge-grab + clearance, water height limits, pitch look-ahead, and the ten-meter target breadcrumb trail." + (function symbol :behavior camera-master)) +(define-extern master-check-regions "Keep the current camera region while its padded volume still + contains the target, otherwise select the first active region whose volume contains it and whose + cutout does not. Fall back to the base camera when none qualifies." + (function object :behavior camera-master)) (define-extern camera-master-debug (function camera-master none)) -(define-extern master-unset-region (function object :behavior camera-master)) -(define-extern reset-target-tracking (function symbol :behavior camera-master)) -(define-extern reset-drawable-tracking (function symbol :behavior camera-master)) -(define-extern master-switch-to-entity (function entity symbol :behavior camera-master)) -(define-extern reset-drawable-follow (function float :behavior camera-master)) -(define-extern reset-follow (function float :behavior camera-master)) -(define-extern in-cam-entity-volume? (function vector entity float symbol symbol)) -(define-extern master-base-region (function entity float :behavior camera-master)) -(define-extern setup-slave-for-hopefull (function camera-slave none)) -(define-extern master-is-hopeful-better? (function camera-slave camera-slave symbol :behavior camera-master)) ;; TODO - ASM -(define-extern target-cam-pos (function vector)) -(define-extern cam-master-init (function none :behavior camera-master)) +(define-extern master-unset-region "Clear the authored camera region, restore the default string + camera limits and tilt, remove its point of interest and region option, and blend back to the + base camera when necessary." (function object :behavior camera-master)) +(define-extern reset-target-tracking "Reset all target tracking state from the player, including + position and facing, attack-aware string limits, water state, vertical offsets, and the target + trail." (function symbol :behavior camera-master)) +(define-extern reset-drawable-tracking "Reset all target tracking state from the selected drawable + target and bone, using its bone transform when available and its control transform otherwise." + (function symbol :behavior camera-master)) +(define-extern master-switch-to-entity "Activate region's camera state and any alternates. Keep the + candidate requiring the least change from the current view, then ask the camera master to blend + to it using the authored interpolation time." (function entity symbol :behavior camera-master)) +(define-extern reset-drawable-follow "Reset the tracked position from the selected drawable target + and bone without rebuilding the rest of the tracking state." (function float :behavior camera-master)) +(define-extern reset-follow "Reset the tracked player position and vertical speed without + rebuilding the rest of the tracking state." (function float :behavior camera-master)) +(define-extern in-cam-entity-volume? "Return true when point lies within any exact sample of + entity's convex volume property. Each sample is an array of half-space planes; margin expands the + accepted distance beyond every plane." (function vector entity float symbol symbol)) +(define-extern master-base-region "Apply region's authored string-camera bounds, point of interest, + cliff height, tilt, and options to the persistent base camera." (function entity float :behavior camera-master)) +(define-extern setup-slave-for-hopefull "Prepare candidate's follow point and rotation when its + blend-to mode requires tracking, so alternate-camera comparisons use its actual view." + (function camera-slave none)) +(define-extern master-is-hopeful-better? "Return true when new-candidate's forward direction is + closer than current-best's to the active combiner view." + (function camera-slave camera-slave symbol :behavior camera-master)) +(define-extern target-cam-pos + "Return the point the camera should follow. Use the target's alternate point for explicit or +saved-position overrides; while falling into dark eco, clamp the ordinary camera point above that +alternate height. Fall back to the camera position when no target exists." + (function vector)) +(define-extern cam-master-init "Initialize the camera master, its string seekers and target trail, + spawn the child-list keeper and initial free-floating slave, create the screen-drip launcher, and + enter the active state." (function none :behavior camera-master)) ;; - Symbols @@ -20112,37 +24793,85 @@ ;; - Functions -(define-extern cam-bike-code (function none :behavior camera-slave)) -(define-extern cam-calc-bike-follow! (function cam-rotation-tracker vector symbol vector :behavior camera-slave)) -(define-extern cam-stick-code (function none :behavior camera-slave)) -(define-extern set-string-parms (function vector :behavior camera-slave)) -(define-extern cam-string-code (function vector :behavior camera-slave)) -(define-extern cam-string-find-position-rel! (function vector symbol)) -(define-extern cam-string-set-position-rel! (function vector int :behavior camera-slave)) +(define-extern cam-bike-code "Steer the bike camera behind the target, vary its distance and height + with target speed, spring toward the desired position, and slide along blocking geometry." + (function none :behavior camera-slave)) +(define-extern cam-calc-bike-follow! "Place the bike camera's look point far ahead of the target + and above it. The position and snap arguments are retained for the shared follow interface." + (function cam-rotation-tracker vector symbol vector :behavior camera-slave)) +(define-extern cam-stick-code "Spring the manually orbiting camera toward its desired position, + collide and slide up to four times, and keep its distance control consistent after a collision." + (function none :behavior camera-slave)) +(define-extern set-string-parms "Refresh the string camera's minimum and maximum offset vectors + from the camera master unless the values are locked." (function vector :behavior camera-slave)) +(define-extern cam-string-code "Run the string camera's follow, line-of-sight, joystick, hidden + target, collision movement, and final position-spline smoothing stages for one frame." + (function vector :behavior camera-slave)) +(define-extern cam-string-find-position-rel! "Find an unobstructed emergency camera offset behind + the target. Sweep alternating thirty-degree steps around local down through a half turn, writing + the selected relative offset and returning false only when the default must be reused." + (function vector symbol)) +(define-extern cam-string-set-position-rel! "Install a relative string-camera offset, reset the + desired and smoothed positions, clear velocity, and cancel a pending line-of-sight jump." + (function vector int :behavior camera-slave)) (define-extern cam-debug-reset-coll-tri (function none)) ;; not confirmed -(define-extern cam-string-follow (function object :behavior camera-slave)) -(define-extern cam-string-line-of-sight (function vector :behavior camera-slave)) -(define-extern cam-string-joystick (function vector :behavior camera-slave)) -(define-extern cam-string-find-hidden (function none :behavior camera-slave)) +(define-extern cam-string-follow "Carry the horizontal target-to-camera string with target motion, + enforce its current length limits, and adjust field of view and distance for the long-string mode." + (function object :behavior camera-slave)) +(define-extern cam-string-line-of-sight "Run the line-of-sight solver and rotate the horizontal + camera string toward its lateral escape direction with a distance-dependent angular limit." + (function vector :behavior camera-slave)) +(define-extern cam-string-joystick "Apply manual string length and orbit input. Couple height to + distance, respect the current line-of-sight side, and otherwise recenter toward target facing." + (function vector :behavior camera-slave)) +(define-extern cam-string-find-hidden "Test whether the target remains visible and, after a + sustained obstruction, reset the string camera to a newly searched clear position." + (function none :behavior camera-slave)) (define-extern cam-collision-record-save (function vector vector int symbol camera-slave none)) -(define-extern cam-string-move (function object :behavior camera-slave)) -(define-extern cam-dist-analog-input (function int float float)) -(define-extern cam-los-collide (function vector vector clip-travel-vector-to-mesh-return-info pat-surface symbol :behavior camera-slave)) -(define-extern dist-info-init (function collide-los-dist-info none)) -(define-extern los-cw-ccw (function (inline-array collide-cache-tri) vector vector float clip-travel-vector-to-mesh-return-info vector float symbol)) +(define-extern cam-string-move "Move the string camera toward its desired position with up to four + sphere-cast collision slides. Classify the requested motion for line-of-sight steering and shorten + the string when geometry blocks the move." (function object :behavior camera-slave)) +(define-extern cam-dist-analog-input "Map an unsigned stick value to a signed string-distance rate. + Values from 28 through 160 form the dead zone; scale controls the full-rate magnitude." + (function int float float)) +(define-extern cam-los-collide "Classify geometry blocking the camera-to-target sightline, choose a + lateral escape, and search the target breadcrumb trail for a recoverable clear view when direct + sliding is insufficient." (function vector vector collide-los-result pat-surface symbol :behavior camera-slave)) +(define-extern dist-info-init "Mark an obstruction extent summary empty and reset its sample count." + (function collide-los-dist-info none)) +(define-extern los-cw-ccw "Project one blocking triangle and its contact point into the sightline + frame, classify it as clockwise, counter-clockwise, or straddling the line, and append its extents + to the corresponding result bucket." + (function (inline-array collide-cache-tri) vector vector float collide-los-result vector float symbol)) (define-extern cam-debug-add-los-tri (function (inline-array collide-cache-tri) vector vector none)) -(define-extern cam-los-spline-collide (function vector vector pat-surface float)) -(define-extern cam-los-setup-lateral (function clip-travel-vector-to-mesh-return-info vector vector symbol :behavior camera-slave)) +(define-extern cam-los-spline-collide "Sphere-cast from a target breadcrumb toward the camera with + the tighter line-of-sight radius. Return -1 for a clear segment or the first significant hit + fraction." (function vector vector pat-surface float)) +(define-extern cam-los-setup-lateral "Choose the clockwise or counter-clockwise camera slide from + accumulated obstruction extents, preserving the chosen side to prevent dithering, and write the + resulting lateral movement." (function collide-los-result vector vector symbol :behavior camera-slave)) (define-extern slave-los-state->string (function slave-los-state string)) -(define-extern dist-info-print (function collide-los-dist-info string object)) -(define-extern dist-info-valid? (function collide-los-dist-info symbol)) -(define-extern dist-info-append (function collide-los-dist-info vector none)) -(define-extern cam-circular-code (function float :behavior camera-slave)) -(define-extern cam-circular-position (function symbol vector :behavior camera-slave)) -(define-extern cam-circular-position-into-max-angle (function vector vector float vector :behavior camera-slave)) -(define-extern cam-standoff-calc-trans (function vector :behavior camera-slave)) -(define-extern string-push-help (function float)) -(define-extern cam-draw-collide-cache (function collide-cache none)) +(define-extern dist-info-print "Print an obstruction extent summary under label for camera + line-of-sight debugging." (function collide-los-dist-info string object)) +(define-extern dist-info-valid? "Return true when an obstruction extent summary contains at least + one initialized parallel-distance range." (function collide-los-dist-info symbol)) +(define-extern dist-info-append "Expand an obstruction extent summary with one point in parallel, + lateral, and signed-side vertical coordinates." (function collide-los-dist-info vector none)) +(define-extern cam-circular-code "Update the authored pivot, smoothly follow the target around it, + constrain the camera to its orbit, and apply an optional position-driven focal pull." + (function float :behavior camera-slave)) +(define-extern cam-circular-position "Place the camera on its pivot orbit. When approach-slowly? is + true, move gently toward the angular limit; otherwise establish the orbit immediately." + (function symbol vector :behavior camera-slave)) +(define-extern cam-circular-position-into-max-angle "Constrain current-direction to the orbit radius + and permitted angle from ideal-direction. Apply optional analog orbit input and approach the + boundary by approach-scale without overshooting." (function vector vector float vector :behavior camera-slave)) +(define-extern cam-standoff-calc-trans "Place the camera at its standoff offset from the current + target position and return the resulting translation." (function vector :behavior camera-slave)) +(define-extern string-push-help "Return the string camera's fixed 0.1-meter collision push." + (function float)) +(define-extern cam-draw-collide-cache "Draw every cached collision triangle without depth testing." + (function collide-cache none)) ;; - Symbols @@ -20218,8 +24947,17 @@ ;; - Functions -(define-extern cam-free-floating-move (function matrix vector vector int vector)) -(define-extern cam-free-floating-input (function vector vector symbol int vector)) +(define-extern cam-free-floating-move "Apply free-camera input to a camera matrix and position. + Preserve the chosen up direction while yawing when one is supplied; otherwise allow unrestricted + yaw. Pitch and roll are then applied in camera-local axes before the local translation is rotated + into world space. Return false when the controller is invalid or menus own the camera." + (function matrix vector vector int vector)) +(define-extern cam-free-floating-input "Accumulate one frame of free-camera rotation and local + translation from controller-index. Buttons provide digital motion with pressure-sensitive speed, + while the sticks provide simultaneous translation and rotation. allow-roll? enables L2 and R2 + roll; the load-boundary display may also accept translation from controller one. Scale both + outputs by the display time adjustment before returning." + (function vector vector symbol int vector)) ;; - Symbols @@ -20240,7 +24978,9 @@ ;; - Functions -(define-extern cam-combiner-init (function none :behavior camera-combiner)) +(define-extern cam-combiner-init "Initialize the camera combiner's output transform, field of view, + transition state, tracking mode, and velocity, then enter cam-combiner-active." + (function none :behavior camera-combiner)) ;; - Symbols @@ -20254,12 +24994,30 @@ ;; - Functions -(define-extern move-camera-from-pad (function math-camera math-camera)) -(define-extern update-view-planes (function math-camera (inline-array plane) float none)) -(define-extern update-visible (function math-camera symbol)) ;; second/third arg unused -(define-extern set-point (function vector float float float none)) -(define-extern plane-from-points (function (inline-array plane) vector vector vector int none)) -(define-extern update-camera (function symbol)) +(define-extern move-camera-from-pad "Apply the selected external-camera controller to camera. + Preserve an upright basis relative to gravity unless allow-z is enabled, accumulate orientation in + *save-camera-inv-rot*, copy that basis to the math camera, and return camera." + (function math-camera math-camera)) +(define-extern update-view-planes "Build the camera's four side clipping planes. Construct near and + far frustum corners at scale, rotate them into world space, form rays from the camera to the four + far corners, and write the resulting planes in coefficient-transposed form. scale widens the side + planes without changing the near and far distances." + (function math-camera (inline-array plane) float none)) +(define-extern update-visible "Select the current BSP leaf and visibility string for every active + level. Prefer valid self visibility, then adjacent-level visibility; retain the previous bits while + data is loading and fall back to all-visible when no usable string exists. Return false." + (function math-camera symbol)) +(define-extern set-point "Set point's xyz coordinates and set w to one." + (function vector float float float none)) +(define-extern plane-from-points "Construct a normalized plane from two in-plane edge directions and + a point on the plane. Store its four coefficients at plane-index in the coefficient-transposed + four-plane array." + (function (inline-array plane) vector vector vector int none)) +(define-extern update-camera "Choose the gameplay, alternate, or controller-driven camera for this + frame; update the math camera's view, inverse-view, view-projection, smoothed rotation, fog and + field-of-view factors; publish camera constants and guard planes to TIE and shrub rendering; update + BSP visibility and wind; and return false." + (function symbol)) ;; - Symbols @@ -20279,6 +25037,8 @@ ;; - Types (deftype plane-volume (structure) + "One convex volume represented as half-space planes. The point and normal +debug ranges are generated from those planes when volume marks are enabled." ((volume-type symbol :offset-assert 0) (point-count int16 :offset-assert 4) (normal-count int16 :offset-assert 6) @@ -20292,17 +25052,27 @@ :size-assert #x18 :flag-assert #xc00000018 (:methods - (init-vol! (_type_ symbol vector-array vector-array) symbol) ;; 9 - (debug-draw (_type_) none) ;; 10 - (point-in-vol? (_type_ vector float) symbol) ;; 11 + (init-vol! "Recover this volume's edges from its planes and append them to point-array as +endpoint pairs, plus one face centroid and its plane to normal-array per face that produced any +edges. volume-type selects the debug color. The arrays are appended to, and the volume records its +own ranges so several volumes can share them. Every plane normal must be unit length and point out +of a closed volume. Overflow prints an error and drops the remaining geometry. Return false." + (_type_ symbol vector-array vector-array) symbol) ;; 9 + (debug-draw "Draw the edge list generated by init-vol!, one line per consecutive point pair. +Select green for vol, grey for pvol, and red for any other volume-type, all at half alpha." + (_type_) none) ;; 10 + (point-in-vol? "Return whether point is inside every half-space, with tolerance added to each +plane's distance. Positive tolerance expands along each plane normal, and an empty plane set +returns true." + (_type_ vector float) symbol) ;; 11 ) ) (defenum vol-flags :bitfield #t :type uint32 - (volf00) - (volf01) + (display-marks 0) + (debug-alloc 1) (volf02) (volf03) (volf04) @@ -20336,7 +25106,9 @@ ) (deftype vol-control (basic) - ((flags uint32 :offset-assert 4) + "The positive and cutout convex volumes authored on one drawable process. +Point tests accept a point in any positive volume unless a cutout volume contains it." + ((flags vol-flags :offset-assert 4) (process process-drawable :offset-assert 8) (pos-vol-count int32 :offset-assert 12) (pos-vol plane-volume 32 :inline :offset-assert 16) @@ -20349,10 +25121,20 @@ :size-assert #x61c :flag-assert #xc0000061c (:methods - (new (symbol type process-drawable) _type_) ;; 0 - (init! (_type_) symbol) ;; 9 - (point-in-vol? (_type_ vector) symbol) ;; 10 - (vol-control-method-11 (_type_) symbol) ;; 11 + (new "Allocate a volume control for owner and load consecutive vol and cutoutvol plane +properties from its entity resource. Each category has room for 32 volume records." + (symbol type process-drawable) _type_) ;; 0 + (relocate :override-doc + "Adjust the owning process pointer after its process heap moves.") + (init! "When global volume marks and this control's display-marks and debug-alloc flags are +enabled, lazily allocate shared debug point and normal arrays, rebuild their derived geometry as +needed, and draw every positive and cutout volume. Return zero." + (_type_) symbol) ;; 9 + (point-in-vol? "Return whether point lies inside at least one positive volume and outside every +cutout volume. Cutouts take precedence, and a control without positive volumes returns false." + (_type_ vector) symbol) ;; 10 + (should-display? "Return whether global volume-mark display and this control's display flag +are both enabled." (_type_) symbol) ;; 11 ) ) @@ -20503,80 +25285,264 @@ ;; - Functions -(define-extern cam-layout-stop (function symbol)) -(define-extern cam-layout-start (function none)) -(define-extern cam-layout-init (function none :behavior cam-layout)) -(define-extern clmf-next-entity (function int symbol :behavior cam-layout)) -(define-extern cam-layout-entity-info (function entity-actor basic)) -(define-extern cam-layout-entity-volume-info (function symbol :behavior cam-layout)) ; TODO - crash -(define-extern cam-layout-do-menu (function clm none :behavior cam-layout)) -(define-extern cam-layout-print (function int int string pointer)) -(define-extern cam-layout-function-call (function symbol string int basic symbol :behavior cam-layout)) -(define-extern cam-layout-do-action (function clm-item-action symbol :behavior cam-layout)) -(define-extern clmf-save-single (function entity-camera symbol symbol file-stream :behavior cam-layout)) -(define-extern cam-layout-save-cam-rot (function symbol string entity-actor string)) -(define-extern cam-layout-save-cam-trans (function symbol string entity-actor string)) -(define-extern cam-layout-save-pivot (function symbol string entity-actor string)) -(define-extern cam-layout-save-align (function symbol string entity-actor string)) -(define-extern cam-layout-save-interesting (function symbol string entity-actor string)) -(define-extern cam-layout-save-fov (function symbol string entity-actor string)) -(define-extern cam-layout-save-focalpull (function symbol string entity-actor string)) -(define-extern cam-layout-save-flags (function symbol string entity-actor string)) -(define-extern cam-layout-save-introsplinetime (function symbol string entity-actor string)) -(define-extern cam-layout-save-introsplineexitval (function symbol string entity-actor string)) -(define-extern cam-layout-save-interptime (function symbol string entity-actor string)) -(define-extern cam-layout-save-splineoffset (function symbol string entity-actor string)) -(define-extern cam-layout-save-spline-follow-dist-offset (function symbol string entity-actor string)) -(define-extern cam-layout-save-campointsoffset (function symbol string entity-actor string)) -(define-extern cam-layout-save-tiltAdjust (function symbol string entity-actor string)) -(define-extern cam-layout-save-stringMinLength (function symbol string entity-actor string)) -(define-extern cam-layout-save-stringMaxLength (function symbol string entity-actor string)) -(define-extern cam-layout-save-stringMinHeight (function symbol string entity-actor string)) -(define-extern cam-layout-save-stringMaxHeight (function symbol string entity-actor string)) -(define-extern cam-layout-save-stringCliffHeight (function symbol string entity-actor string)) -(define-extern cam-layout-save-maxAngle (function symbol string entity-actor string)) -(define-extern cam-layout-save-campoints-flags (function symbol string entity-actor string)) -(define-extern cam-layout-save-focalpull-flags (function symbol string entity-actor string)) +(define-extern cam-layout-stop + "Stop the camera-layout editor process and clear its active marker." + (function symbol)) +(define-extern cam-layout-start + "Start the camera-layout editor unless it is already active. The editor process remains live + during pause and menu modes." + (function none)) +(define-extern cam-layout-init + "Count the live camera entities, restore the last selected camera, rebuild its volume previews, + and enter the active camera-layout state." + (function none :behavior cam-layout)) +(define-extern clmf-next-entity + "Advance the selected camera by byte-step divided by the eight-byte connection stride, wrapping + through the camera engine. Rebuild the selected camera's vol, pvol, and cutoutvol previews." + (function int symbol :behavior cam-layout)) +(define-extern cam-layout-entity-info + "Draw the selected camera's frustum, pivot, alignment and interest points, camera and intro + splines, index points, and interpolation diagnostics. The selected item blinks off every eight + frames." + (function entity-actor basic)) +(define-extern cam-layout-entity-volume-info + "Draw every reconstructed camera volume as green vol, gray pvol, or red cutoutvol wireframe, + blinking the selected volume." + (function symbol :behavior cam-layout)) ; TODO - crash +(define-extern cam-layout-do-menu + "Draw the current camera-layout menu, update the spline preview phases, dispatch active item + actions from controller input, and move within list items with the d-pad." + (function clm none :behavior cam-layout)) +(define-extern cam-layout-print + "Draw debug text at screen coordinates x and y, terminate its DMA chain, and insert the result in + the current frame's debug bucket." + (function int int string pointer)) +(define-extern cam-layout-function-call + "Resolve a menu value-printer symbol and call it with the output string and its two parameters." + (function symbol string int basic symbol :behavior cam-layout)) +(define-extern cam-layout-do-action + "Apply one menu action when its entity requirement, edge/level button mode, and controller button + tests pass. An action either selects another clm menu or invokes its function." + (function clm-item-action symbol :behavior cam-layout)) +(define-extern clmf-save-single + "Write one camera definition and its editable offset tags. print? also describes effective values + on the console; named-file? chooses the camera's .cam path instead of the garbage preview file." + (function entity-camera symbol symbol file-stream :behavior cam-layout)) +(define-extern cam-layout-save-cam-rot + "Write the camera's rot-offset quaternion when present, optionally printing the setup rotation + and offset." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-cam-trans + "Write trans-offset when present. Diagnostic output also shows the setup translation, the added + offset, an optional subtracted translation_info level origin, and the resulting Maya position." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-pivot + "Write pivot-offset when both the base pivot and its offset are present, optionally printing the + base, offset, and combined position." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-align + "Write align-offset when both the base alignment point and its offset are present, optionally + printing the base, offset, and combined position." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-interesting + "Write interesting-offset when both the base interest point and its offset are present, + optionally printing the base, offset, and combined position." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-fov + "Write a nonzero fov-offset in degrees and optionally print the base, offset, combined field of + view, and corresponding Maya focal length." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-focalpull + "Write a nonzero focalPull-offset in meters and optionally print the base, offset, and combined + focal-pull distance." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-flags + "Write nonzero camera flag-on and flag-off override masks, optionally printing the base and + effective masks." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-introsplinetime + "Write a nonzero intro-time-offset in seconds. Diagnostic output treats a zero base value as the + one-second default." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-introsplineexitval + "Write a nonzero intro-exitValue-offset. Diagnostic output notes that a zero base value uses the + default exit value of 0.5." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-interptime + "Write a nonzero interpTime-offset in seconds, optionally printing the base, offset, and combined + interpolation time." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-splineoffset + "Write spline-offset when a camera has no pivot and carries an explicit spline offset." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-spline-follow-dist-offset + "Write spline-follow-dist-offset when a camera has no pivot and carries the distance offset." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-campointsoffset + "Write campoints-offset when present, optionally printing the three meter components." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-tiltAdjust + "Write a nonzero tiltAdjust-offset in degrees, optionally printing the base, offset, and combined + adjustment." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-stringMinLength + "Write a nonzero stringMinLength-offset in meters, optionally printing the base, offset, and + combined value." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-stringMaxLength + "Write a nonzero stringMaxLength-offset in meters, optionally printing the base, offset, and + combined value." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-stringMinHeight + "Write a nonzero stringMinHeight-offset in meters, optionally printing the base, offset, and + combined value." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-stringMaxHeight + "Write a nonzero stringMaxHeight-offset in meters, optionally printing the base, offset, and + combined value." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-stringCliffHeight + "Write a nonzero stringCliffHeight-offset in meters, optionally printing the base, offset, and + combined value." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-maxAngle + "Write a nonzero maxAngle-offset in degrees, optionally printing the base, offset, and combined + angle." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-campoints-flags + "Write nonzero campoints-flags-on and campoints-flags-off override masks, optionally printing the + base and effective masks." + (function symbol string entity-actor string)) +(define-extern cam-layout-save-focalpull-flags + "Write nonzero focalpull-flags-on and focalpull-flags-off override masks, optionally printing the + base and effective masks." + (function symbol string entity-actor string)) (define-extern cam-index-options->string (function cam-index-options object string)) (define-extern cam-slave-options->string (function cam-slave-options object string)) -(define-extern fov->maya (function float float)) -(define-extern cam-layout-entity-volume-info-create (function entity-camera symbol symbol :behavior cam-layout)) ;; TODO - decomp crash -(define-extern clmf-next-volume (function int symbol :behavior cam-layout)) -(define-extern clmf-input (function vector vector int vector)) +(define-extern fov->maya + "Convert a horizontal field-of-view angle to the Maya focal length used by the camera exporter. + Return zero for a zero field of view." + (function float float)) +(define-extern cam-layout-entity-volume-info-create + "Read consecutive plane arrays of volume-type from camera, reconstruct each convex volume's + clipped plane-intersection edges, and append its draw segments plus plane-centroid records to the + fixed camera-layout preview buffers. Return false at the first missing property or full buffer." + (function entity-camera symbol symbol :behavior cam-layout)) ;; TODO - decomp crash +(define-extern clmf-next-volume + "Advance the selected reconstructed volume by delta with wraparound." + (function int symbol :behavior cam-layout)) +(define-extern clmf-input + "Read one controller into rotation and camera-relative translation vectors. The right stick + pitches/yaws, L3 changes it to roll, the left stick moves horizontally, and L1/R1 move vertically." + (function vector vector int vector)) (define-extern camera-fov-frame (function matrix vector float float float vector4w none)) -(define-extern interp-test (function (function vector vector vector float vector float none) interp-test-info basic)) -(define-extern v-slrp! (function vector vector vector float vector)) -(define-extern interp-test-deg (function (function vector vector vector vector float none) interp-test-info basic)) +(define-extern interp-test + "Draw ten segments sampled from interpolator, then draw and print the current debug-t sample." + (function (function vector vector vector float vector float none) interp-test-info basic)) +(define-extern v-slrp! + "Spherically interpolate between from and to at clamped fraction t and write dst. This form derives + the angle from asin of the normalized cross-product length and does not handle parallel or + antiparallel inputs." + (function vector vector vector float vector)) +(define-extern interp-test-deg + "Draw ten eighteen-degree samples from an angle-based interpolator, then draw and print the + current debug-t sample over 180 degrees." + (function (function vector vector vector vector float none) interp-test-info basic)) (define-extern camera-line-setup (function vector4w none)) (define-extern camera-line-draw (function vector vector symbol)) -(define-extern cam-layout-intersect-dist (function vector vector vector float)) -(define-extern clmf-button-test (function symbol)) -(define-extern clmf-bna (function symbol)) -(define-extern clmf-implement (function symbol)) -(define-extern clmf-pos-rot (function symbol symbol symbol :behavior cam-layout)) -(define-extern clmf-next-vol-dpad (function symbol)) -(define-extern clmf-to-edit-cam (function symbol)) -(define-extern clmf-to-vol-attr (function symbol :behavior cam-layout)) -(define-extern clmf-to-spline-attr (function symbol)) -(define-extern clmf-to-intro-attr (function symbol)) -(define-extern clmf-to-index-attr (function symbol)) -(define-extern clmf-to-focalpull-attr (function symbol)) -(define-extern clmf-to-edit (function symbol :behavior cam-layout)) -(define-extern clmf-to-select (function symbol)) -(define-extern clmf-look-through (function symbol :behavior cam-layout)) -(define-extern clmf-save-one (function symbol symbol :behavior cam-layout)) -(define-extern clmf-save-all (function symbol symbol :behavior cam-layout)) -(define-extern clmf-cam-flag-toggle (function int int symbol :behavior cam-layout)) -(define-extern clmf-cam-flag (function string uint uint symbol :behavior cam-layout)) -(define-extern clmf-cam-float-adjust (function symbol (pointer float) symbol :behavior cam-layout)) -(define-extern clmf-cam-meters (function meters symbol symbol :behavior cam-layout)) -(define-extern clmf-cam-fov (function degrees symbol symbol :behavior cam-layout)) -(define-extern clmf-cam-deg (function degrees symbol symbol :behavior cam-layout)) -(define-extern clmf-cam-intro-time (function float symbol symbol :behavior cam-layout)) -(define-extern clmf-cam-interp-time (function float symbol symbol :behavior cam-layout)) -(define-extern clmf-cam-float (function float symbol symbol :behavior cam-layout)) -(define-extern clmf-cam-string (function string symbol symbol :behavior cam-layout)) -(define-extern cam-layout-restart (function none)) +(define-extern cam-layout-intersect-dist + "Return the signed distance along direction from point to plane, or a large sentinel when the + direction is nearly parallel to the plane." + (function vector vector vector float)) +(define-extern clmf-button-test + "Display the button-test message, consume analog camera input, and report that no menu action was + completed so dispatch can continue." + (function symbol)) +(define-extern clmf-bna + "Display that the selected button is not applicable and consume analog camera input." + (function symbol)) +(define-extern clmf-implement + "Display that the selected button is not implemented and consume analog camera input." + (function symbol)) +(define-extern clmf-pos-rot + "Ensure the selected camera has the requested position and optional rotation offset resources, + then edit them from controller zero in camera-relative translation and world rotation." + (function symbol symbol symbol :behavior cam-layout)) +(define-extern clmf-next-vol-dpad + "Select the previous or next reconstructed volume from the d-pad and consume analog input." + (function symbol)) +(define-extern clmf-to-edit-cam + "Enter the general camera edit menu after validating the current volume selection." + (function symbol)) +(define-extern clmf-to-vol-attr + "Use the selected volume index as the resource key and enter the volume-attribute menu." + (function symbol :behavior cam-layout)) +(define-extern clmf-to-spline-attr + "Enter the camera-spline attribute menu." + (function symbol)) +(define-extern clmf-to-intro-attr + "Enter the intro-spline attribute menu." + (function symbol)) +(define-extern clmf-to-index-attr + "Enter the index-point attribute menu." + (function symbol)) +(define-extern clmf-to-focalpull-attr + "Enter the focal-pull attribute menu." + (function symbol)) +(define-extern clmf-to-edit + "Reset the resource key to the default frame and return to the camera edit menu." + (function symbol :behavior cam-layout)) +(define-extern clmf-to-select + "Stop blinking a camera component and return to the camera selection menu." + (function symbol)) +(define-extern clmf-look-through + "Copy the selected camera's field of view, position, and rotation into the alternate debug camera + and enable it for ten frames." + (function symbol :behavior cam-layout)) +(define-extern clmf-save-one + "Save the selected camera. Options bit three prints diagnostics and bit four writes the named + camera file instead of the garbage preview file." + (function symbol symbol :behavior cam-layout)) +(define-extern clmf-save-all + "Save every live camera. Options bit three prints diagnostics and bit four writes named files." + (function symbol symbol :behavior cam-layout)) +(define-extern clmf-cam-flag-toggle + "Divide scaled-bit-mask by eight, then cycle that camera flag through forced off, forced on, and + inherited. Volume keys are translated into the corresponding vol, pvol, or cutoutvol property + array." + (function int int symbol :behavior cam-layout)) +(define-extern clmf-cam-flag + "Divide scaled-bit-mask by eight and append that flag's effective state to text, distinguishing + explicit on/off overrides from the inherited Maya value." + (function string uint uint symbol :behavior cam-layout)) +(define-extern clmf-cam-float-adjust + "Adjust one float offset with the left stick and write it back as an exact default-frame resource + value. A zero scale parameter means unit scale." + (function symbol (pointer float) symbol :behavior cam-layout)) +(define-extern clmf-cam-meters + "Append a named camera float to text in meters." + (function meters symbol symbol :behavior cam-layout)) +(define-extern clmf-cam-fov + "Append the selected camera's field of view to text in degrees." + (function degrees symbol symbol :behavior cam-layout)) +(define-extern clmf-cam-deg + "Append a named camera float to text in degrees." + (function degrees symbol symbol :behavior cam-layout)) +(define-extern clmf-cam-intro-time + "Append the selected camera's intro duration to text and update the intro preview step." + (function float symbol symbol :behavior cam-layout)) +(define-extern clmf-cam-interp-time + "Append the selected camera's interpolation time to text." + (function float symbol symbol :behavior cam-layout)) +(define-extern clmf-cam-float + "Append a named camera float to text." + (function float symbol symbol :behavior cam-layout)) +(define-extern clmf-cam-string + "Append every symbol in a named camera resource array to text." + (function string symbol symbol :behavior cam-layout)) +(define-extern cam-layout-restart + "Stop and immediately restart the camera-layout editor." + (function none)) ;; - Symbols @@ -20681,20 +25647,131 @@ ;; - Functions -(define-extern cam-collision-record-draw (function none)) -(define-extern master-draw-coordinates (function vector none)) -(define-extern cam-debug-draw-tris (function symbol)) -(define-extern cam-collision-record-step (function int none)) -(define-extern camera-sphere (function vector float vector none)) -(define-extern camera-line-rel (function vector vector vector4w none)) -(define-extern camera-fov-draw (function int int vector float float vector4w symbol)) -(define-extern cam-line-dma (function pointer)) -(define-extern camera-line2d (function vector4w vector4w pointer)) -(define-extern camera-plot-float-func (function float float float float (function float float) vector4w none)) -(define-extern cam-debug-add-coll-tri (function cam-debug-tri vector cam-debug-tri none)) -(define-extern debug-euler (function cam-dbg-scratch object)) -(define-extern bike-cam-limit (function float float)) -(define-extern external-cam-reset! (function none)) +(define-extern cam-slave-options->string + "Append the names of the enabled camera-slave option bits to output and + return output as a string." + (function cam-slave-options object string)) +(define-extern cam-index-options->string + "Append the historical labels for the enabled camera-index option bits to + output. These strings are opposite the current SPHERICAL and RADIAL enum + names." + (function cam-index-options object string)) +(define-extern slave-los-state->string + "Return the debug name of a camera line-of-sight state, or *unknown* for an + unrecognized value." + (function slave-los-state string)) +(define-extern cam-line-dma + "Append the current transformed debug-line endpoints and color to the + no-depth-test debug DMA bucket." + (function pointer)) +(define-extern camera-line2d + "Draw a line between two screen-space points. Convert pixels to GS 12.4 + coordinates, invert Y, and place both endpoints at the far 24-bit depth." + (function vector4w vector4w pointer)) +(define-extern camera-plot-float-func + "Plot fn over [x-min, x-max] in a 400 by 200 pixel debug graph. Map + [y-min, y-max] to the plot height, draw the axes and border at screen offset + (20, 20), then connect one sample per horizontal pixel in color." + (function float float float float (function float float) vector4w none)) +(define-extern camera-line-setup + "Select the color for subsequent camera-line-draw calls and initialize the + identity world-to-screen transform." + (function vector4w none)) +(define-extern camera-line-draw + "Transform and draw one world-space line using the color selected by + camera-line-setup. Reject either endpoint whose transformed depth is past + the debug renderer's unsigned cutoff." + (function vector vector symbol)) +(define-extern camera-line + "Draw one world-space line in color." + (function vector vector vector4w none)) +(define-extern camera-line-rel + "Draw a line from start to start plus offset." + (function vector vector vector4w none)) +(define-extern camera-line-rel-len + "Normalize direction to length and draw that displacement from start." + (function vector vector float vector4w none)) +(define-extern camera-sphere + "Draw a sphere as a ten-by-ten latitude/longitude wireframe." + (function vector float vector none)) +(define-extern camera-cross + "Draw three perpendicular diameter lines through center. The first axis is + axis-a; the other two are formed by successive crosses with axis-b and + axis-a. half-length is the distance from center to each endpoint." + (function vector vector vector vector4w meters basic)) +(define-extern camera-bounding-box-draw + "Draw the twelve edges of bounds in the original fixed gray. The two trailing + arguments are retained for compatibility but are not read." + (function bounding-box basic rgba none)) +(define-extern cam-debug-reset-coll-tri + "Clear the per-frame camera collision and line-of-sight triangle lists." + (function none)) +(define-extern cam-debug-add-los-tri + "Save the first collision-cache triangle, intersection, and color in the + line-of-sight debug list. The list holds at most 460 entries." + (function (inline-array collide-cache-tri) vector vector none)) +(define-extern cam-debug-add-coll-tri + "Copy a camera debug triangle with a new intersection and color into the + collision debug list. The list holds at most 460 entries." + (function cam-debug-tri vector cam-debug-tri none)) +(define-extern cam-debug-draw-tris + "Draw the recorded camera line-of-sight and collision triangles selected by + the corresponding display flags, with a cross at each intersection." + (function symbol)) +(define-extern camera-fov-draw + "Draw one side of a camera frustum from two direction-vector addresses, + origin, near distance, far distance, and color." + (function int int vector float float vector4w symbol)) +(define-extern camera-fov-frame + "Draw a camera frustum from its inverse rotation, origin, half field of view, + vertical scale, horizontal scale, and color. The near and far outlines are + 4096 and 20480 GOAL units from the origin." + (function matrix vector float float float vector4w none)) +(define-extern debug-euler + "Interpret the matrix packed from scratch.sphere-vec.w onward, print its Euler + conversion and reconstruction, and report whether any component differs by + more than 0.001." + (function cam-dbg-scratch object)) +(define-extern bike-cam-limit + "Return a cosine camera limit that rises from zero to one as the nonnegative + scaled input approaches 8192, and remains one beyond that range." + (function float float)) +(define-extern camera-slave-debug + "Draw the active camera-slave frustum, tracking basis and follow point, + target body spheres, spline trail, and state-specific string, circular, or + authored-spline geometry when camera marks are enabled." + (function camera-slave none)) +(define-extern master-draw-coordinates + "Draw RGB world axes in front of the camera combiner. If direction is + non-null, also draw its normalized direction in yellow." + (function vector none)) +(define-extern cam-collision-record-save + "When collision history recording is enabled, append one camera movement + attempt to the 600-entry ring, including collision parameters and the + camera-slave state needed to reproduce and inspect the probe." + (function vector vector int symbol camera-slave none)) +(define-extern cam-collision-record-step + "Move the selected collision-history index by delta, wrapping within all 600 + storage slots." + (function int none)) +(define-extern cam-collision-record-draw + "Select a collision-history entry with the d-pad, print its saved camera + state, repeat its line-sphere probe, and draw the movement, hit triangle, + intersection direction, and normal." + (function none)) +(define-extern camera-master-debug + "Draw the camera-master diagnostics selected by the global display flags: + alternate-camera geometry, last attacker, saved performance statistics, + collision history, target spline, coordinate axes, and collision triangles." + (function camera-master none)) +(define-extern debug-set-camera-pos-rot! + "Move the live camera combiner to position and inverse-rotation. Temporarily + enter the free-floating state so the transform can be replaced, then return + to the fixed state. Return position." + (function vector matrix vector)) +(define-extern external-cam-reset! "Reset the external math camera to the current combiner transform, + or to the identity at the origin when the combiner is unavailable." + (function none)) ;; - Unknowns @@ -20723,9 +25800,17 @@ ;; - Functions -(define-extern cam-stop (function none)) -(define-extern reset-cameras (function none)) ;; defined in entity.gc -(define-extern cam-start (function symbol none)) +(define-extern cam-stop + "Destroy every active camera master, slave, and combiner; clear the live + camera globals; and restore cam-string as the base camera mode." + (function none)) +(define-extern reset-cameras + "Remove every camera-engine connection, then reconnect all cameras from active levels." + (function none)) ;; defined in entity.gc +(define-extern cam-start + "Restart the camera combiner and master. When reset? is true, clear the + camera-engine list and rebirth the camera entities from every active level." + (function symbol none)) ;; ---------------------- @@ -20736,39 +25821,137 @@ ;; - Functions -(define-extern process-entity-status! (function process entity-perm-status symbol int)) -(define-extern process-grab? (function process symbol :behavior camera-tracker)) -(define-extern process-release? (function process symbol :behavior process)) -(define-extern ja-post (function none :behavior process-drawable)) -(define-extern make-nodes-from-jg (function art-joint-geo pair symbol cspace-array :behavior process-drawable)) -(define-extern dma-add-process-drawable (function process-drawable draw-control symbol dma-buffer none)) -(define-extern add-process-drawable (function process-drawable draw-control symbol dma-buffer none)) -(define-extern vector<-cspace+vector! (function vector cspace vector vector)) -(define-extern cspace-children (function process-drawable int pair)) -(define-extern cspace-inspect-tree (function process-drawable cspace int int object object)) -(define-extern fill-skeleton-cache (function process-drawable int)) ;; idk -(define-extern execute-math-engine (function int)) -(define-extern draw-joint-spheres (function process-drawable symbol)) -(define-extern anim-loop (function none :behavior process-drawable)) -(define-extern ja-done? (function int symbol :behavior process-drawable)) -(define-extern ja-min? (function int symbol :behavior process-drawable)) -(define-extern ja-max? (function int symbol :behavior process-drawable)) -(define-extern ja-num-frames (function int int :behavior process-drawable)) -(define-extern ja-frame-num (function int float :behavior process-drawable)) -(define-extern ja-aframe (function float int float :behavior process-drawable)) -(define-extern ja-speed (function int float :behavior process-drawable)) -(define-extern ja-step (function int float :behavior process-drawable)) -(define-extern ja-group-size (function int :behavior process-drawable)) -(define-extern ja-eval (function int :behavior process-drawable)) -(define-extern ja-blend-eval (function int :behavior process-drawable)) -(define-extern transform-post (function int :behavior process-drawable)) -(define-extern rider-trans (function int :behavior process-drawable)) -(define-extern rider-post (function int :behavior process-drawable)) -(define-extern pusher-post (function int :behavior process-drawable)) -(define-extern process-drawable-delay-player (function time-frame int :behavior process-drawable)) -(define-extern process-drawable-fuel-cell-handler (function process int symbol event-message-block object :behavior process-drawable)) -(define-extern process-drawable-birth-fuel-cell (function entity vector symbol none :behavior process-drawable)) -(define-extern process-drawable-valid? (function process-drawable symbol)) +(define-extern process-entity-status! + "Set or clear status-mask on proc's permanent entity link when proc is still that entity's live + process. Return the resulting status, or zero when the connection is stale." + (function process entity-perm-status symbol int)) +(define-extern process-grab? + "Resolve target-process, remember it when called by a camera tracker, and ask it to enter grab +mode. Return the target's response, or false when it cannot be resolved." + (function process symbol :behavior camera-tracker)) +(define-extern process-release? + "Resolve target-process and query its current mode. If the query returns any truthy value, send +end-mode and return that response; otherwise return true." + (function process symbol :behavior process)) +(define-extern ja-post + "Finish this drawable's animation update. Evaluate joint control, build matrices immediately when +required, otherwise queue the drawable for the matrix engine, and update collision transforms when +a forced skeleton refresh completes." + (function none :behavior process-drawable)) +(define-extern make-nodes-from-jg + "Allocate the drawable's cspace and bone arrays from joint-geometry and skeleton-template, +connect each joint to its parent and transform function, then register the drawable with the +foreground renderer." + (function art-joint-geo pair symbol cspace-array :behavior process-drawable)) +(define-extern dma-add-process-drawable + "Cull actor by its bounding sphere, select and smoothly blend its time-of-day lighting and shadow +contribution, choose a distance LOD, register the required texture masks, set clipping and draw +status flags, and submit its bones to dma-buf. Queue a matrix refresh when changing to a +higher-detail skeleton. flag is the unused connection payload." + (function process-drawable draw-control symbol dma-buffer none)) +(define-extern add-process-drawable + "Invoke control's configured DMA submission function for actor, forwarding flag and dma-buf." + (function process-drawable draw-control symbol dma-buffer none)) +(define-extern cspace-by-name + "Return the first cspace node whose joint has name, or #f when the drawable has no matching +joint." + (function process-drawable string cspace)) +(define-extern cspace-index-by-name + "Return the node-list index of the first joint with name, or -1 when it is absent." + (function process-drawable string int)) +(define-extern vector<-cspace! + "Extract a cspace bone's homogeneous translation into destination. The stored xyz components are +divided by w and the result is returned as a position vector." + (function vector cspace vector)) +(define-extern vector<-cspace+vector! + "Transform local-position by the cspace bone matrix and write the result to destination." + (function vector cspace vector vector)) +(define-extern cspace-children + "Return a list of every cspace node whose parent is parent-index." + (function process-drawable int pair)) +(define-extern cspace-inspect-tree + "Print the cspace hierarchy below node. depth and branch-mask control the tree guides; display-mode +may add joint-animation matrix details or mesh fragment, triangle, and vertex statistics." + (function process-drawable cspace int int object process-drawable)) +(define-extern fill-skeleton-cache + "Initialize each bone cache's matrix offsets, parent-matrix offset, and frame marker, then write +back the cache lines so the animation hardware sees the updated records." + (function process-drawable int)) +(define-extern execute-math-engine + "Evaluate joint matrices for every valid process queued in the matrix engine, then empty the +queue." + (function int)) +(define-extern draw-joint-spheres + "Draw a small debug sphere at every cspace node; the PC debug build also labels named joints." + (function process-drawable symbol)) +(define-extern anim-loop + "Put the drawable's behavior thread to sleep indefinitely while post processing continues." + (function none :behavior process-drawable)) +(define-extern ja-done? + "Return whether channel-index's seek has reached its requested frame; an empty controller is +already done." + (function int symbol :behavior process-drawable)) +(define-extern ja-min? + "Return whether channel-index is at internal frame zero." + (function int symbol :behavior process-drawable)) +(define-extern ja-max? + "Return whether channel-index has reached the final frame in its animation." + (function int symbol :behavior process-drawable)) +(define-extern ja-num-frames + "Return the highest valid internal frame number for channel-index." + (function int int :behavior process-drawable)) +(define-extern ja-frame-num + "Return channel-index's current internal frame." + (function int float :behavior process-drawable)) +(define-extern ja-aframe + "Convert artist-frame to the corresponding internal frame for channel-index." + (function float int float :behavior process-drawable)) +(define-extern ja-speed + "Return channel-index's animation playback speed." + (function int float :behavior process-drawable)) +(define-extern ja-step + "Return the artist-frame step represented by one internal frame on channel-index." + (function int float :behavior process-drawable)) +(define-extern ja-group-size + "Return the number of channels in the current pushed root group, or zero when no pushed group is +active." + (function int :behavior process-drawable)) +(define-extern ja-eval + "Evaluate every active root channel that has not already been evaluated this frame, excluding +stack commands." + (function int :behavior process-drawable)) +(define-extern ja-blend-eval + "Evaluate channels below the current root group for blending, excluding stack commands and +channels already evaluated this frame." + (function int :behavior process-drawable)) +(define-extern transform-post + "Finish joint animation and update collision transforms." + (function int :behavior process-drawable)) +(define-extern rider-trans + "Detect riders on this drawable's collision shape during the transition phase." + (function int :behavior process-drawable)) +(define-extern rider-post + "Finish joint animation, update collision transforms, pull attached riders, and perform +push-away resolution." + (function int :behavior process-drawable)) +(define-extern pusher-post + "Finish joint animation, update collision transforms, and perform push-away resolution." + (function int :behavior process-drawable)) +(define-extern process-drawable-delay-player + "Wait for safe player control, hold the target process through dialog and delay frames, then +release it." + (function time-frame int :behavior process-drawable)) +(define-extern process-drawable-fuel-cell-handler + "Mark this drawable dead when a fuel-cell child sends a pickup notification." + (function process int symbol event-message-block object :behavior process-drawable)) +(define-extern process-drawable-birth-fuel-cell + "Spawn the source entity's pending fuel-cell pickup at position, retrying until the child is +created; instant-collect? selects immediate collection." + (function entity vector symbol none :behavior process-drawable)) +(define-extern process-drawable-valid? + "Validate drawable geometry and active joint channels, append diagnostics to *valid-con*, print +the report on failure, and return whether every checked object is valid." + (function process-drawable symbol)) ;; - Unknowns @@ -20784,11 +25967,28 @@ ;; - Functions -(define-extern find-hint-control-index (function text-id int)) -(define-extern start-hint-timer (function text-id none)) -(define-extern increment-success-for-hint (function text-id none)) -(define-extern can-hint-be-played? (function text-id entity string symbol)) -(define-extern update-task-hints (function none)) +(define-extern find-hint-control-index + "Return the registered level-hint-control index for hint-id, or -1 when no policy is registered." + (function text-id int)) +(define-extern start-hint-timer + "Stamp start-time for a registered hint that requires more than one attempt, provided its timer +has not already been started." + (function text-id none)) +(define-extern increment-success-for-hint + "Increment hint-id's successful-attempt counter, saturating at 127. Do nothing when the hint has +no registered control." + (function text-id none)) +(define-extern can-hint-be-played? + "Return whether hint-id may play now. Reject conflicting speech, a previously seen nonzero text, +an unready hint semaphore, the global hint cooldown, dialog or loading activity, and blackout time. +An unregistered hint then passes. A registered hint debounces distinct attempts, accumulates the +continuous-call delay used by single-attempt hints, enforces its delay and success cutoff, and +saturating-increments its attempt count when eligible. speaker and text are accepted but not used." + (function text-id entity string symbol)) +(define-extern update-task-hints + "For the current level's remapped task-hint group, advance unknown or need-hint tasks to +need-hint once their configured in-level delay has elapsed." + (function none)) ;; - Symbols @@ -20822,27 +26022,85 @@ ;; - Functions -(define-extern ambient-type-error (function drawable-ambient vector none)) -(define-extern ambient-type-sound (function drawable-ambient vector none)) -(define-extern ambient-type-sound-loop (function drawable-ambient vector none)) -(define-extern ambient-type-poi (function drawable-ambient vector none)) -(define-extern ambient-type-hint (function drawable-ambient vector none)) -(define-extern ambient-type-light (function drawable-ambient vector none)) -(define-extern ambient-type-dark (function drawable-ambient vector none)) -(define-extern ambient-type-weather-off (function drawable-ambient vector none)) -(define-extern ambient-type-ocean-off (function drawable-ambient vector none)) -(define-extern ambient-type-ocean-near-off (function drawable-ambient vector none)) -(define-extern ambient-type-music (function drawable-ambient vector none)) -(define-extern level-hint-task-process (function entity uint128 string int)) -(define-extern bottom-hud-hidden? (function symbol)) -(define-extern level-hint-init-by-other (function text-id string entity none :behavior level-hint)) -(define-extern voicebox-spawn (function process vector (pointer process))) -(define-extern hide-bottom-hud (function none)) -(define-extern ambient-hint-init-by-other (function string vector symbol none :behavior level-hint)) -(define-extern level-hint-process-cmd (function (pointer int32) int int int)) -(define-extern task-known? (function game-task symbol)) -(define-extern can-grab-display? (function process symbol)) -(define-extern level-hint-displayed? (function symbol)) +(define-extern ambient-type-error + "Draw a red editor error label for an ambient whose properties could not select a valid effect." + (function drawable-ambient vector none)) +(define-extern ambient-type-sound + "At the ambient's randomized cycle interval, choose an effect-name variant and play it at the +ambient sphere with its effect parameters and a small random bend." + (function drawable-ambient vector none)) +(define-extern ambient-type-sound-loop + "Refresh the ambient's persistent looping sound at its sphere using the properties cached at +birth." + (function drawable-ambient vector none)) +(define-extern ambient-type-poi + "Perform the per-frame step for a point-of-interest ambient; this type needs no additional +action after it has been collected." + (function drawable-ambient vector none)) +(define-extern ambient-type-hint + "Apply this ambient's hint policy and spawn its level hint, or display the missing-ID diagnostic +in debug builds." + (function drawable-ambient vector none)) +(define-extern ambient-type-light + "Test query-position against this ambient's convex volumes. The light type has no additional +per-frame action after a containing volume is found." + (function drawable-ambient vector none)) +(define-extern ambient-type-dark + "Set the target's secondary draw interpolation to full when query-position lies within any of +this ambient's convex volumes." + (function drawable-ambient vector none)) +(define-extern ambient-type-weather-off + "Disable weather when query-position lies within any of this ambient's convex volumes." + (function drawable-ambient vector none)) +(define-extern ambient-type-ocean-off + "Disable the full ocean pass while this already-collected ambient is active." + (function drawable-ambient vector none)) +(define-extern ambient-type-ocean-near-off + "Disable nearby ocean geometry while this already-collected ambient is active." + (function drawable-ambient vector none)) +(define-extern ambient-type-music + "Apply this ambient's default music and, when its priority wins, its sound-flavor selection." + (function drawable-ambient vector none)) +(define-extern level-hint-task-process + "Resolve owner's text-id, check whether the hint may play, and execute its pairs of hint commands. +Return the resolved text ID when every command passes, or -1 when policy or a conditional command +rejects it." + (function entity uint128 string int)) +(define-extern bottom-hud-hidden? + "Return true when the four lower HUD entries are absent or hidden." + (function symbol)) +(define-extern level-hint-init-by-other + "Initialize a resource-backed text hint, mark its text as seen, claim the hint semaphore, and +select text, sidekick speech, or voicebox playback from the owner's play-mode properties." + (function text-id string entity none :behavior level-hint)) +(define-extern voicebox-spawn + "Spawn a camera-voicebox under owner and a voicebox drawable under that camera slave at position. + Pass the calling process's handle to the drawable so its exit can detect when the hint owner is + gone. Return the voicebox process pointer, or false if either allocation fails." + (function process vector (pointer process))) +(define-extern hide-bottom-hud + "Ask the buzzers, eco meter, bike speed, and bike heat HUD entries to hide." + (function none)) +(define-extern ambient-hint-init-by-other + "Initialize a positional ambient, camera, or stinger sound hint, claim the hint semaphore, and +install cleanup for exit and death events." + (function string vector symbol none :behavior level-hint)) +(define-extern level-hint-process-cmd + "Execute the hint command at command-index using the following word as its task ID. Return the +following command index, or -1 when a conditional command fails." + (function (pointer int32) int int int)) +(define-extern task-known? + "Return true when task's current status is introduction, either reminder, resolution, reward +speech, or invalid; return false for need-hint and unknown." + (function game-task symbol)) +(define-extern can-grab-display? + "Let requester claim the shared hint display when it is free, already owned by requester, or +stale for one tenth of a second, provided normal gameplay can show text." + (function process symbol)) +(define-extern level-hint-displayed? + "Return true while the active text hint is in its normal display state and has not appeared for +five seconds." + (function symbol)) (define-extern ambient-inspect function) ;; - Unknowns @@ -20858,10 +26116,21 @@ ;; - Functions -(define-extern __assert (function symbol string int)) -(define-extern __assert-min-max-range-float (function float float float string string string int)) -(define-extern __assert-min-max-range-int (function int int int string string string int)) -(define-extern __assert-zero-lim-range-int (function int int string string int)) +(define-extern __assert + "When exp is false, print msg and the source position captured by the assert macro. Return zero." + (function symbol string int)) +(define-extern __assert-min-max-range-float + "When exp lies outside the inclusive floating-point range [minimum, maximum], print the source +expressions, their values, and the captured assert position. Return zero." + (function float float float string string string int)) +(define-extern __assert-min-max-range-int + "When exp lies outside the inclusive integer range [minimum, maximum], print the source +expressions, their values, and the captured assert position. Return zero." + (function int int int string string string int)) +(define-extern __assert-zero-lim-range-int + "When exp lies outside the half-open integer range [0, maximum), print the source expressions, +their values, and the captured assert position. Return zero." + (function int int string string int)) ;; - Symbols @@ -20901,6 +26170,12 @@ :flag-assert #x14005000bc (:states med-res-level-idle) + (:methods + (init-from-entity! :override-doc + "Initialize a medium-resolution level object from entity. Resolve an optional particle +group, construct the med-res-level skeleton name from its level and index properties, and make the +object persist across ordinary actor culling.") + ) ) (deftype launcher (process-drawable) @@ -20920,36 +26195,127 @@ launcher-idle launcher-deactivated launcher-active) + (:methods + (init-from-entity! :override-doc + "Build this launcher's collision sphere and drawable data, load its spring height, particle +group, camera mode, optional destination and seek time, then enter the idle state.") + ) ) ;; - Functions -(define-extern line-in-view-frustum? (function vector vector symbol)) -(define-extern process-drawable-random-point! (function process-drawable vector vector)) -(define-extern process-drawable-from-entity! (function process-drawable entity-actor none)) -(define-extern cam-launcher-long-joystick (function vector :behavior camera-slave)) -(define-extern hide-hud-quick (function none)) -(define-extern command-get-process (function object process process :behavior camera-tracker)) -(define-extern camera-change-to (function string int symbol symbol)) -(define-extern camera-look-at (function pair uint process :behavior camera-tracker)) -(define-extern camera-pov-from (function pair uint process :behavior camera-tracker)) -(define-extern command-get-trans (function object vector vector)) ;; object types - null | symbol (null | target) | pair -(define-extern manipy-init (function vector entity-actor skeleton-group vector none :behavior manipy)) ;; TODO - not confirmed yet -(define-extern part-tracker-notify (function object :behavior part-tracker)) -(define-extern clone-anim-once (function handle int symbol string none :behavior process-drawable)) -(define-extern convert-to-hud-object (function process-drawable hud none :behavior process-drawable)) -(define-extern clone-anim (function handle int symbol string none :behavior process-drawable)) -(define-extern merc-eye-anim (function process-drawable none)) -(define-extern ja-anim-done? (function process symbol)) -(define-extern command-get-camera (function object state state)) -(define-extern camera-anim (function symbol basic entity (pointer process) :behavior camera-tracker)) ;; unused -(define-extern camera-tracker-init (function object object :behavior camera-tracker)) ;; TODO - nested SC -(define-extern cam-launcher-joystick (function vector :behavior camera-slave)) -(define-extern launcher-init-by-other (function vector float int float none :behavior launcher)) -(define-extern touch-tracker-init (function vector float time-frame none :behavior touch-tracker)) -(define-extern process-drawable-pair-random-point! (function process-drawable process-drawable vector float vector)) -(define-extern birth-func-set-quat (function int sparticle-cpuinfo sparticle-launchinfo none)) -(define-extern draw-eco-beam (function vector vector none)) +(define-extern line-in-view-frustum? + "Conservatively test the segment from start to end against the four view-frustum side planes. +Return false only when both endpoints lie outside the same plane." + (function vector vector symbol)) +(define-extern process-drawable-random-point! + "Write a random point associated with drawable into result. When eligible joints exist, select +one from indices 3 through the final node and use its translation. Otherwise sample a random +direction and radius inside the drawable's collision sphere or root-centered draw bounds; this +fallback is neither a uniform surface nor a uniform-volume sample." + (function process-drawable vector vector)) +(define-extern process-drawable-from-entity! + "Mark proc as actor-pausable and initialize its root translation, rotation, and unit scale from + actor." + (function process-drawable entity-actor none)) +(define-extern cam-launcher-long-joystick + "Yaw the long-fall camera's one-meter horizontal view offset from right-stick input." + (function vector :behavior camera-slave)) +(define-extern hide-hud-quick + "Immediately hide every active HUD entry." + (function none)) +(define-extern command-get-process + "Resolve selector to a process. Selectors may be processes, target, sidekick, parent, camera, a +named entity string, or a camera tracker's work, grab, look-at, pov, and anim handles. Return false +for a recognized handle that is no longer valid, or fallback for an unsupported selector." + (function object process process :behavior camera-tracker)) +(define-extern camera-change-to + "Resolve camera-selector and change the master camera to the named entity or state, blending for +blend-time 300-Hz ticks. When fixed-blend? is true, request a fixed-source blend. Return false when +the selector cannot be resolved." + (function object int symbol symbol)) +(define-extern camera-look-at + "Resolve target-selector, remember it when called by a camera tracker, and make the master camera +look at its joint-index. Return the resolved process or false." + (function object uint process :behavior camera-tracker)) +(define-extern camera-pov-from + "Resolve target-selector and make the master camera use joint-index as its point of view. A joint +index of -10 selects the model's camera joint when present. Return the resolved process or false." + (function object int process :behavior camera-tracker)) +(define-extern command-get-trans + "Resolve a camera-script position. Accept null for fallback, the null and target symbols, or a +(process-selector joint-index) pair naming one joint's translation." + (function object vector vector)) +(define-extern manipy-init + "Initialize a manipy drawable at position with skeleton. collision-option selects an ordinary +transform when false, a collectable collision sphere when it is a vector, or moving collision when +it is collide-shape-moving; then enter the event-driven animation state." + (function vector entity-actor skeleton-group vector none :behavior manipy)) +(define-extern part-tracker-notify + "Send the parent process a notify event whose first parameter is die." + (function object :behavior part-tracker)) +(define-extern clone-anim-once + "Copy and remap one animation pose from source-handle. Optionally copy its transform, update joint +math and effects, and place this drawable's origin at origin-joint-index when nonnegative." + (function handle int symbol string none :behavior process-drawable)) +(define-extern convert-to-hud-object + "Move this drawable from its projected world position into HUD coordinates, scale it for + hud-element, and send it toward that HUD as a collected object." + (function process-drawable hud none :behavior process-drawable)) +(define-extern clone-anim + "Copy a remapped animation pose from source-handle once per frame until the source process +disappears, then clear this drawable's spooling status." + (function handle int symbol string none :behavior process-drawable)) +(define-extern merc-eye-anim + "Sample proc's eye animation into its eye-control slot. Does nothing unless the skeleton is flagged + for eye animation, its merc geometry carries a merc-eye-ctrl, channel 0 is playing a frame group, + and that frame group has eye animation data. + Publishes into the slot everything render-eyes needs that does not come from the animation: proc's + handle, the three shaders of the eye material, and the index of the level proc belongs to. + Then writes both eyes by interpolating the packed keyframes on either side of channel 0's frame + number. Frame numbers past the last keyframe clamp to it, so an animation may end on a held eye + pose." (function process-drawable none)) +(define-extern ja-anim-done? + "Resolve target-process and return whether its current animation is finished. Manipys answer +through their query event; other drawables use channel zero's joint-animation state." + (function process symbol)) +(define-extern command-get-camera + "Resolve selector to a camera state or named camera entity, returning fallback for an unsupported +selector. The base, string, and fixed symbols select their standard camera states." + (function object state object)) +(define-extern camera-anim + "Spawn a one-shot manipy using skeleton at position, select animation, and remember its handle. +Return the new process pointer or false when no manipy is available." + (function skeleton-group string vector (pointer process) :behavior camera-tracker)) ;; unused +(define-extern camera-tracker-init + "Initialize a camera tracker from a command-list or a no-argument script function, inherit the +parent's entity, install movie settings and event handling, and begin evaluating the script." + (function object object :behavior camera-tracker)) +(define-extern cam-launcher-joystick + "Orbit the short-fall launcher camera's position about its tracked target from horizontal +right-stick input." + (function vector :behavior camera-slave)) +(define-extern launcher-init-by-other + "Create a launcher at position with spring-height, packed camera mode, and active-distance, +selecting the level's particle group and any destination stored on its entity." + (function vector float int float none :behavior launcher)) +(define-extern touch-tracker-init + "Create a moving collision sphere at position with radius and keep it active for duration. Events +can later choose a target to follow, forwarded touch event, callback, and early-exit predicate." + (function vector float time-frame none :behavior touch-tracker)) +(define-extern process-drawable-pair-random-point! + "Choose one random point on each drawable and interpolate between them by amount into result." + (function process-drawable process-drawable vector float vector)) +(define-extern birth-func-set-quat + "Install the shared beam orientation in this sprite's packed cone-rotation field. The sprite +format reconstructs a nonnegative quaternion w, so negate xyz when the shared quaternion lies in +the negative-w hemisphere; preserve the existing cone-rotation w." + (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern draw-eco-beam + "When the segment from start to end is visible, place a shield particle at its midpoint, scale +it to the beam length, and orient it along the segment. Launch three crossed planes, rolling the +orientation by 60 degrees between launches, to give the beam visible volume." + (function vector vector none)) ;; - Unknowns @@ -21056,33 +26422,116 @@ ;; - Functions -(define-extern target-height-above-ground (function float :behavior target)) -(define-extern target-align-vel-z-adjust (function float float :behavior target)) -(define-extern target-collide-set! (function symbol float int :behavior target)) -(define-extern target-start-attack (function none :behavior target)) -(define-extern target-danger-set! (function symbol symbol float :behavior target)) -(define-extern average-turn-angle (function target float)) ;; NOTE - arg not confirmed, also unused -(define-extern can-play-stance-amibent? (function symbol :behavior target)) -(define-extern can-jump? (function symbol symbol :behavior target)) -(define-extern move-legs? (function symbol :behavior target)) -(define-extern fall-test (function none :behavior target)) ;; NOTE - first arg unused -(define-extern slide-down-test (function none :behavior target)) -(define-extern smack-surface? (function symbol symbol :behavior target)) -(define-extern can-wheel? (function symbol :behavior target)) -(define-extern can-duck? (function symbol :behavior target)) -(define-extern can-exit-duck? (function symbol :behavior target)) ;; TODO - have to investigate collide-cache for this -(define-extern can-hands? (function symbol symbol :behavior target)) -(define-extern can-feet? (function symbol :behavior target)) -(define-extern vector-local+! (function vector vector vector :behavior target)) -(define-extern move-forward (function float vector :behavior target)) -(define-extern set-forward-vel (function float vector :behavior target)) -(define-extern delete-back-vel (function none :behavior target)) -(define-extern set-side-vel (function float vector :behavior target)) -(define-extern target-timed-invulnerable (function time-frame target none)) -(define-extern target-timed-invulnerable-off (function target none)) -(define-extern ground-tween-initialize (function ground-tween-info uint uint uint uint uint uint ground-tween-info :behavior target)) ;; TODO - dealing with inline-array issues -(define-extern ground-tween-update (function ground-tween-info float float none :behavior target)) ;; TODO - inline array issues as well -(define-extern target-rot (function quaternion)) +(define-extern target-height-above-ground + "Return the target root's vertical distance above the ground point found by its shadow probe." + (function float :behavior target)) +(define-extern target-align-vel-z-adjust + "Scale a requested control-space forward velocity by the current surface alignment. Uphill +motion additionally fades by one minus the local forward slope." + (function float float :behavior target)) +(define-extern target-collide-set! + "Configure the target's root bounds and three body spheres for mode. Pole pins the spheres to +joints; racer and flut install vehicle bounds; duck and tube collapse the vertical stack according +to transition; the default restores standing bounds. Save mode and transition so harmless danger +mode can restore the current pose." + (function symbol float int :behavior target)) +(define-extern target-start-attack + "Begin a distinct attack by incrementing its ID and clearing the number of objects hit." + (function none :behavior target)) +(define-extern target-danger-set! + "Configure the target's attack spheres for mode, reset inactive spheres, and update the dangerous +state flag. enlarge? applies the red-eco radius scale, except that the airborne flop is not enlarged +and flop-down uses a slightly larger scale." + (function symbol symbol float :behavior target)) +(define-extern average-turn-angle + "Return the mean absolute angle in degrees between straight ahead and the eight buffered turn +directions." + (function target float)) +(define-extern can-play-stance-amibent? + "Return whether the idle stance animation may play after thirty seconds without speech, +spooling, a movie, a hint, actor contact, or water contact. The amibent spelling is original." + (function symbol :behavior target)) +(define-extern can-jump? + "Return whether the target may jump from a surface or during the post-surface grace interval, +subject to surface and state prevent flags. Wheel flips additionally reject steep forward slopes." + (function symbol symbol :behavior target)) +(define-extern move-legs? + "Return whether the target's movement stick has any nonzero magnitude." + (function symbol :behavior target)) +(define-extern fall-test + "Enter target-falling after the target has left a surface beyond the grace interval and is moving +with gravity. Preserve recent moving-platform velocity; punch animations delay falling while close +to the ground." + (function none :behavior target)) +(define-extern slide-down-test + "Enter target-slide-down when the target is no longer standing or edge-grabbing, is beyond the +surface grace interval, and still touches terrain too steep to stand on." + (function none :behavior target)) +(define-extern smack-surface? + "Return whether the target struck a steep wall while lacking a significant standable contact. +When include-actors? is false, reject contact caused only by another actor." + (function symbol symbol :behavior target)) +(define-extern can-wheel? + "Return whether the target may roll: it must stand on a surface, avoid a near-head-on wall, +remain below the forward-slope limit, and lack the prevent-duck state flag." + (function symbol :behavior target)) +(define-extern can-duck? + "Return whether the target may duck on sufficiently flat ground while not swimming, underwater, +prevented from ducking, or too deep below the wading line." + (function symbol :behavior target)) +(define-extern can-exit-duck? + "Probe two standing-height body spheres and return whether no solid collision prevents the target +from standing up." + (function symbol :behavior target)) +(define-extern can-hands? + "Return whether a square-button hand attack may begin. Enforce state and surface restrictions, +optional recent-ground and slope requirements, and the running-attack cooldown; powered yellow eco +can override removable prevention and uses the shorter cooldown. Record a blocked cooldown attempt +for input buffering." + (function symbol symbol :behavior target)) +(define-extern can-feet? + "Return whether a feet attack may begin after state, surface, and attack-cooldown checks. Record a +blocked cooldown attempt for input buffering." + (function symbol :behavior target)) +(define-extern vector-local+! + "Transform local-vector from target control space to world space, add it to destination, and +return destination." + (function vector vector vector :behavior target)) +(define-extern move-forward + "Add speed along the target's local forward axis to its world velocity." + (function float vector :behavior target)) +(define-extern set-forward-vel + "Replace local forward velocity with speed, clear local sideways velocity, and preserve the +vertical component." + (function float vector :behavior target)) +(define-extern delete-back-vel + "Clamp the velocity component opposite the target's facing to zero while retaining forward and +sideways motion." + (function none :behavior target)) +(define-extern set-side-vel + "Replace local sideways velocity with speed, clear local forward velocity, and preserve the +vertical component." + (function float vector :behavior target)) +(define-extern target-timed-invulnerable + "Start timed invulnerability for target-process, save its start and duration, and remove +target-attack from the body spheres' accepted collision kinds." + (function time-frame target none)) +(define-extern target-timed-invulnerable-off + "End timed invulnerability, ensure the target is visible, and restore target-attack collision." + (function target none)) +(define-extern ground-tween-initialize + "Configure three animation channels for a flat ground animation plus uphill, downhill, left, and +right slope blends. base-channel selects the first channel and the next two hold the directional +layers." + (function ground-tween-info uint uint uint uint uint uint ground-tween-info :behavior target)) +(define-extern ground-tween-update + "Update the ground-animation forward and sideways blends from local slope. Clamp their targets, +ease each by a distance-dependent 0.05-to-0.2 step, and select the positive or negative directional +animation group for each layer." + (function ground-tween-info float float none :behavior target)) +(define-extern target-rot + "Return the target's control quaternion, or the identity quaternion when no target exists." + (function quaternion)) ;; - Symbols @@ -21099,12 +26548,34 @@ ;; - Functions -(define-extern birth-func-copy-target-y-rot (function int sparticle-cpuinfo sparticle-launchinfo none)) -(define-extern birth-func-ground-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) -(define-extern birth-func-target-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) -(define-extern birth-func-vector-orient (function int sparticle-cpuinfo sparticle-launchinfo none)) -(define-extern part-tracker-track-target-joint (function int sparticle-cpuinfo sparticle-launchinfo none)) ;; 3rd arg could also be a vector -(define-extern process-drawable-burn-effect (function time-frame none :behavior target)) +(define-extern birth-func-copy-target-y-rot + "Rotate a new particle's velocity and acceleration from target-local xz axes into the target's + current yaw frame. The authored direction is offset by -90 degrees before it is transformed." + (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-ground-orient + "Probe downward from a new particle and add an orientation that lays it on the hit surface. + The probe begins one meter above the launch position, reaches five meters downward, and ignores + the particle when there is no current target or no accepted surface. The surface tilt is combined + with the target's yaw plus 180 degrees." + (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-target-orient + "Lay a new particle on the target's current contact plane. The launcher's user-float supplies an + additional yaw in GOAL angle units; the result also includes the target's yaw plus 180 degrees. + Do nothing when no target exists." + (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern birth-func-vector-orient + "Lay a new particle on the normal addressed by its user-float. The normal is supplied as + sprite-vec-data-2d storage and no orientation is added when the pointer is null." + (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) +(define-extern part-tracker-track-target-joint + "Move a live 2D particle to the target joint selected by its integer user-float. The joint is + converted from camera space to world space. Do nothing when no target exists." + (function sparticle-system sparticle-cpuinfo sprite-vec-data-2d none)) +(define-extern process-drawable-burn-effect + "Play the burn sound and darken the parent drawable toward black during the first half of duration, + then restore its color during the second half. Launch one smoke particle per frame from a random + point on the drawable and restore the exact original color before returning." + (function time-frame none :behavior target)) ;; ---------------------- @@ -21115,11 +26586,39 @@ ;; - Functions -(define-extern collide-shape-moving-angle-set! (function collide-shape-moving vector vector none)) -(define-extern target-collision-low-coverage (function control-info collide-shape-intersect vector (pointer uint32) (pointer uint64) (pointer symbol) uint)) ;; i think the pointers are lies - TODO -(define-extern poly-find-nearest-edge (function vector (inline-array vector) vector vector vector)) -(define-extern target-collision-reaction (function control-info collide-shape-intersect vector vector cshape-moving-flags)) -(define-extern target-collision-no-reaction (function control-info collide-shape-intersect vector vector none)) +(define-extern collide-shape-moving-angle-set! + "Record surface-normal and its dot against gravity-normal as surface-angle, record the equivalent + dot for the unadjusted polygon normal as poly-angle, and retain the largest head-on contact angle + observed this frame. velocity supplies the direction opposite the contact normal for that test." + (function collide-shape-moving vector vector none)) +(define-extern target-collision-low-coverage + "Classify a glancing contact whose primitive does not fully cover the triangle. Cross the polygon + and contact normals to find the edge direction, derive the direction across that edge, then probe + beyond and behind the lip to distinguish a grabbable ledge from a corner that should be released. + Update reaction-flags, status, and is-wall through their in/out pointers and cache the probe + geometry on control." + (function control-info + collide-shape-intersect + vector + (pointer cshape-reaction-flags) + (pointer collide-status) + (pointer symbol) + uint)) +(define-extern poly-find-nearest-edge + "Select one of vertices' three triangle edges. Minimize the distance from point; an exact tie + selects the edge whose direction has the largest absolute dot with preferred-direction. Copy the + selected endpoints into result.edge-vertex[0] and result.edge-vertex[1] and return result." + (function edge-grab-info (inline-array vector) vector vector edge-grab-info)) +(define-extern target-collision-reaction + "Resolve one target collision into an adjusted velocity and collide-status. Push control out of + penetration, classify wall, floor, ceiling, actor, background, and low-coverage edge contacts, + apply surface impact friction, update the contact records and 128-entry history ring, and preserve + a ground-wall seam slide rather than catching at the corner." + (function control-info collide-shape-intersect vector vector collide-status)) +(define-extern target-collision-no-reaction + "Record a no-contact frame in control's history ring. Mark air-mode when the active modified + surface is air, write the supplied input and output velocities, and advance the ring index." + (function control-info collide-shape-intersect vector vector none)) ;; ---------------------- @@ -21130,48 +26629,188 @@ ;; - Functions -(define-extern init-target (function continue-point none :behavior target)) -(define-extern target-print-stats (function target symbol symbol )) -(define-extern activate-hud (function process none)) -(define-extern reset-target-state (function symbol target :behavior target)) -(define-extern init-sidekick (function none :behavior sidekick)) -(define-extern target-generic-event-handler (function process int symbol event-message-block object :behavior target)) -(define-extern level-setup (function none :behavior target)) -(define-extern target-exit (function none :behavior target)) -(define-extern target-calc-camera-pos (function none :behavior target)) -(define-extern do-target-shadow (function none :behavior target)) -(define-extern target-powerup-process (function none :behavior target)) -(define-extern flag-setup (function none :behavior target)) -(define-extern build-conversions (function vector vector :behavior target)) -(define-extern do-rotations1 (function quaternion :behavior target)) -(define-extern read-pad (function vector vector :behavior target)) -(define-extern turn-to-vector (function vector float symbol :behavior target)) -(define-extern add-thrust (function symbol :behavior target)) -(define-extern add-gravity (function vector :behavior target)) -(define-extern do-rotations2 (function int :behavior target)) -(define-extern reverse-conversions (function vector none :behavior target)) -(define-extern bend-gravity (function symbol :behavior target)) -(define-extern post-flag-setup (function none :behavior target)) -(define-extern joint-points (function none :behavior target)) -(define-extern target-real-post (function none :behavior target)) -(define-extern target-compute-edge (function none :behavior target)) -(define-extern target-compute-pole (function none :behavior target)) -(define-extern target-compute-slopes (function vector int :behavior target)) -(define-extern warp-vector-into-surface! (function vector vector vector vector)) -(define-extern vector<-pad-in-surface! (function vector symbol vector :behavior target)) -(define-extern draw-history (function control-info symbol)) -(define-extern vector-turn-to (function vector vector :behavior target)) -(define-extern print-history (function control-info none)) -(define-extern local-pad-angle (function float :behavior target)) -(define-extern turn-around? (function symbol :behavior target)) -(define-extern target-move-dist (function time-frame float :behavior target)) -(define-extern target-compute-edge-rider (function none :behavior target)) -(define-extern target-post (function none :behavior target)) -(define-extern target-swim-post (function none :behavior target)) -(define-extern target-no-stick-post (function none :behavior target)) -(define-extern target-no-move-post (function none :behavior target)) -(define-extern target-slide-down-post (function none :behavior target)) -(define-extern target-no-ja-move-post (function none :behavior target)) +(define-extern init-target + "Construct the player control, collision spheres, skeleton attachments, camera and movement + helpers, sidekick, and HUD, reset the movement state, then enter target-continue at the supplied + continue point." + (function continue-point none :behavior target)) +(define-extern target-print-stats + "Print the target's collision materials and flags, water state, slopes, position and velocity, + jump-height bookkeeping, gravity bend, and animation channels to output. Also draw the collision + history when its display option is enabled." + (function target symbol symbol )) +(define-extern activate-hud + "Create the six standard HUD processes under parent and clear the three optional HUD entries." + (function process none)) +(define-extern reset-target-state + "Restore neutral movement state, standard dynamics and ground surface, clear collision and + attachment state, disable temporary orientation and invulnerability, reset attack timing, and + stop pad rumble. A full reset also clears orientation, velocity, and the camera point." + (function symbol target :behavior target)) +(define-extern init-sidekick + "Initialize the sidekick drawable, skeleton, shadow, eye animation, and root-cspace callback, + repair any blend-shape state left in persistent PC render data, then enter sidekick-clone." + (function none :behavior sidekick)) +(define-extern target-generic-event-handler + "Handle target events that are valid in any state. These include pickups and queries, level + accounting, collision reset, transform save and restore, effects, sidekick lifetime, neck and + draw control, wait timers, and scripted state changes. proc is the sender, argc is the event + parameter count, message selects the operation, and block contains its parameters." + (function process int symbol event-message-block object :behavior target)) +(define-extern level-setup + "Refresh the level containing the target, accumulate its per-level play time, and send a + level-enter event when the containing level changes." + (function none :behavior target)) +(define-extern target-exit + "Restore the common target state after leaving a movement or action state: reset walking surface + properties and animation offsets, clear temporary turn, bend, water, neck, draw, spool, and + collision flags, and make the attack spheres harmless." + (function none :behavior target)) +(define-extern target-calc-camera-pos + "Select the camera tracking point from the animated clone joint, water surface, mud height, + control position, tube shadow, or skeleton root according to the current movement mode." + (function none :behavior target)) +(define-extern do-target-shadow + "Refresh the player's ground reference point once per frame. The player casts a real projected + shadow, so the radius is zero and this probe only updates control shadow-pos, which is seeded + from trans first in case the probe finds nothing. Skipped while off a surface, while swimming, + diving or flopping, and while the drawable is hidden or has its bones suppressed." (function none :behavior target)) +(define-extern target-powerup-process + "Update water and weather effects, ice-skid particles and sound, shadow direction, eco timeout, +and the active yellow, red, blue, or green eco sound and particle effects. Red eco also refreshes +danger-volume overlaps while active." + (function none :behavior target)) +(define-extern flag-setup + "Perform start-of-tick surface bookkeeping, maintain safe-ground and jump-apex positions, run + surface hooks, handle look-around and debug flight input, arm eligible edge grabs, and trigger an + endless-fall death below the level floor." + (function none :behavior target)) +(define-extern build-conversions + "Combine the movement-state and ground surfaces, apply the blue-eco running bonus, build the + character-to-world and world-to-character frames, and convert world velocity into the local + working velocity." + (function vector vector :behavior target)) +(define-extern do-rotations1 + "Apply the active surface's tilt rate to the target orientation before input-driven turning." + (function quaternion :behavior target)) +(define-extern read-pad + "Read the movement stick into a camera-relative world XZ direction, cache the current and previous + direction and magnitude once per display frame, and return the direction in the supplied vector." + (function vector vector :behavior target)) +(define-extern turn-to-vector + "Project a world heading into the active surface, record its turn angle and magnitude, and set the + desired velocity to heading times stick magnitude times the surface target speed." + (function vector float symbol :behavior target)) +(define-extern add-thrust + "Accelerate the local working velocity toward the desired velocity. Apply downhill slide, uphill + traction and speed loss, direction-dependent seek rates, nonlinear braking, airborne assistance, + blocker correction, and the short wall-lip boost without overshooting the requested velocity." + (function symbol :behavior target)) +(define-extern add-gravity + "Integrate gravity through the active surface slip factor, convert it to the local movement frame, + and clamp only the gravity-axis component to terminal speed while preserving lateral velocity." + (function vector :behavior target)) +(define-extern do-rotations2 + "Turn the desired facing toward input or actual motion at the surface turnvv rate, turn the body + toward that desired facing at turnv, blend the override quaternion, and recompute surface slopes." + (function int :behavior target)) +(define-extern reverse-conversions + "Convert the local working velocity back to world space, cache horizontal speed, and move the + current collision status into old-status for the next tick." + (function vector none :behavior target)) +(define-extern bend-gravity + "Ease the gravity-bend amount toward its target and rotate working gravity toward the supporting + polygon normal, allowing the target's up direction to follow slopes. Airborne wall contact + cancels the bend." + (function symbol :behavior target)) +(define-extern post-flag-setup + "Refresh recent actor-contact time, update timed-invulnerability flicker and expiration, and clear + the one-tick jump-kind marker after collision processing." + (function none :behavior target)) +(define-extern joint-points + "Choose the movement surface for wading, swimming, or mud; refresh head, sidekick, and hand points + from the evaluated skeleton; update active edge or pole holds; select the camera point; and clear + one-tick prevention and tongue state." + (function none :behavior target)) +(define-extern target-real-post + "Run the complete fixed-step target movement pipeline: status setup, coordinate conversion, pad + filtering and forced heading, thrust, gravity, facing, collision integration, and gravity bend. + Multiple physics ticks are processed when the display time ratio requires them." + (function none :behavior target)) +(define-extern target-compute-edge + "Revalidate the active ledge, rebuild its along-edge and across-edge frame, pull the midpoint of + the hands toward the hold point with timeout and per-tick limits, face across the ledge, and + record the motion for moving-platform riding." + (function none :behavior target)) +(define-extern target-compute-pole + "Find the closest point on the active swing pole, draw the hands toward it until contact and then + hold them exactly there, ease the camera below the pole center, and face perpendicular to the + pole while preserving the approached side." + (function none :behavior target)) +(define-extern target-compute-slopes + "Build a no-pitch frame from the current facing and supplied up axis, then measure forward and + sideways slopes against both the contact normal and the locally smoothed normal." + (function vector int :behavior target)) +(define-extern warp-vector-into-surface! + "Rotate src by the transform that carries the camera up axis to surface-normal and write the + result to dst, bending camera-relative input into the surface plane." + (function vector vector vector vector)) +(define-extern vector<-pad-in-surface! + "Read the movement stick into dst and bend it into the current surface plane. Scale the direction + by stick magnitude when scale? is true." + (function vector symbol vector :behavior target)) +(define-extern draw-history + "Draw the 128-entry collision-history path, velocity vectors, contacts, and surface normals. + L3 cycles preset display masks and L2 plus L3 selects the full history display." + (function control-info symbol)) +(define-extern vector-turn-to + "Immediately face the supplied world direction without rate limiting, preserve the current up + axis, and rebuild the movement coordinate conversions." + (function vector vector :behavior target)) +(define-extern print-history + "Print all 128 collision-history entries, including compact reaction-flag letters, positions, + contact points, input and output velocities, and contact normals." + (function control-info none)) +(define-extern local-pad-angle + "Return the cosine between the surface-warped stick direction and the current facing: one is + forward, zero is sideways, and minus one is backward." + (function float :behavior target)) +(define-extern turn-around? + "Maintain sixteen frames of movement history and request the hard turn-around state only when the + target is moving quickly on a surface and the stick is strongly reversed, outside recent actor + and low-coverage contacts." + (function symbol :behavior target)) +(define-extern target-move-dist + "Average recent collision-history positions inside time-window and return their mean distance + from the centroid, measuring actual displacement independently of reported velocity." + (function time-frame float :behavior target)) +(define-extern target-compute-edge-rider + "Update a moving ledge and translate the target by the hold point's frame-to-frame motion so the + hands continue to ride the same point." + (function none :behavior target)) +(define-extern target-post + "Run the standard complete movement post-processing pipeline." + (function none :behavior target)) +(define-extern target-swim-post + "Run swimming movement without stick-flick rejection, forced-heading blending, or gravity bending, + keeping water movement aligned to true gravity." + (function none :behavior target)) +(define-extern target-no-stick-post + "Run movement while ignoring stick magnitude for steering, preserving input history while the + target coasts under momentum, friction, gravity, and collision." + (function none :behavior target)) +(define-extern target-no-move-post + "Refresh orientation, conversion matrices, collision status, overlap triggers, joint animation, + and camera state without integrating velocity or changing position." + (function none :behavior target)) +(define-extern target-slide-down-post + "Run steep-slope sliding with a fixed downhill push while facing uphill, then process ordinary + gravity, collision, joint, camera, shadow, and powerup updates." + (function none :behavior target)) +(define-extern target-no-ja-move-post + "Update cspace offset, overlap triggers, camera, shadow, and powerups without joint animation or + movement integration for externally positioned states." + (function none :behavior target)) ;; - Unknowns @@ -21185,8 +26824,13 @@ ;; - Functions -(define-extern cspace<-cspace+quaternion! (function cspace cspace quaternion matrix)) -(define-extern starts (function object)) +(define-extern cspace<-cspace+quaternion! + "Build dst's bone transform from orientation and src's homogeneous translation. The result has + unit scale, a translation divided by its source w, and a final translation w of one." + (function cspace cspace quaternion matrix)) +(define-extern starts + "Ask the target event handler to activate the sidekick." + (function object)) ;; - Unknowns @@ -21233,8 +26877,15 @@ ;; - Functions -(define-extern voicebox-init-by-other (function vector handle none :behavior voicebox)) ;; first arg is either a `level-hint` process or a `vector` -(define-extern voicebox-track (function none :behavior voicebox)) +(define-extern voicebox-init-by-other + "Create the root transform at position, remember the owning hint process handle, initialize the + speaker skeleton with blend at the target-side endpoint, and enter the appearance state." + (function vector handle none :behavior voicebox)) +(define-extern voicebox-track + "Place the speaker along its blend path between the camera slave and the target's backpack, add a + slow vertical bob, face the target's mouth, steer the camera toward an unblocked side, and scale + the model from full size to zero as it enters the backpack." + (function none :behavior voicebox)) ;; - Unknowns @@ -21249,19 +26900,68 @@ ;; - Functions -(define-extern target-bonk-event-handler (function process int symbol event-message-block object :behavior target)) -(define-extern target-standard-event-handler (function process int symbol event-message-block object :behavior target)) -(define-extern target-send-attack (function process uint touching-shapes-entry int int symbol :behavior target)) ;; i suspect the uints are actually structures/basics -(define-extern target-attacked (function symbol attack-info process touching-shapes-entry (state symbol attack-info target) object :behavior target)) -(define-extern target-apply-tongue (function vector symbol :behavior target)) -(define-extern get-intersect-point (function vector touching-prims-entry control-info touching-shapes-entry vector)) -(define-extern target-powerup-effect (function symbol none :behavior target)) -(define-extern target-shoved (function meters meters process (state object object target) object :behavior target)) -(define-extern target-dangerous-event-handler (function process int symbol event-message-block object :behavior target)) -(define-extern target-jump-event-handler (function process int symbol event-message-block object :behavior target)) -(define-extern target-walk-event-handler (function process int symbol event-message-block object :behavior target)) -(define-extern target-state-hook-exit (function none :behavior target)) -(define-extern target-effect-exit (function none :behavior target)) +(define-extern target-bonk-event-handler + "Handle contact with an actor beneath the target and explicit jump events. Body-sphere contact + that reverses vertical velocity by more than four meters per second sends bonk when the target is + nearly above the contact. A fall beyond fall-far also delivers the target's bonk attack and + rebounds into target-jump. Return false when ordinary event handling should continue." + (function process int symbol event-message-block object :behavior target)) +(define-extern target-standard-event-handler + "Handle the ordinary target state interface: incoming attacks and shoves, saved launcher data, + powerups and loading waits, scripted movement modes and animations, edge and pole grabs, and + water transitions. Launcher events are retained intact for the jump state. Unrecognized messages + pass to target-generic-event-handler." + (function process int symbol event-message-block object :behavior target)) +(define-extern target-send-attack + "Send one of the target's attacks to a touched process with the touching record, attack mode, + per-swing attack id used to reject duplicate contacts, and attack count. If the receiver returns + neither false nor push, produce the appropriate contact particles, effect sound, and pad + feedback. Return the receiver's response." + (function process symbol touching-shapes-entry int int symbol :behavior target)) +(define-extern target-attacked + "Apply an incoming attack to the target unless its invulnerability rules reject it. Copy and + complete the attack record, derive a contact point when possible, apply simple survivable damage + in place, or enter hit-state for knockback and lethal hits. attack-or-shove and attack-invinc + select their exceptions to ordinary invulnerability; red eco also protects dangerous attacks + from dark eco. Return false when the hit is ignored." + (function symbol attack-info process touching-shapes-entry (state symbol attack-info target) object :behavior target)) +(define-extern target-apply-tongue + "Pull the target toward a tongue attachment point. Scale pull speed over the five-to-fifteen-meter + distance range, flatten the direction against local gravity, and accumulate directions when + several tongues attach during the same frame." + (function vector symbol :behavior target)) +(define-extern get-intersect-point + "Write the touched triangle's exact intersection to dest when available; otherwise write the + midpoint of the overlapping bounding spheres. Return dest." + (function vector touching-prims-entry control-info touching-shapes-entry vector)) +(define-extern target-powerup-effect + "Dispatch a one-shot target powerup effect. eco-blue emits a blue glow from a random animated +joint; other effect names do nothing." + (function symbol none :behavior target)) +(define-extern target-shoved + "Construct a non-damaging attack record that pushes the target shove-back meters horizontally and + shove-up meters vertically, buzz the pad, and enter hit-state. Use the airborne reaction when the + target was not on a surface in either the current or previous collision update." + (function meters meters process (state object object target) object :behavior target)) +(define-extern target-dangerous-event-handler + "While the target is attacking, deliver contact from any of its three danger spheres to the + touched process. Incoming attacks still go directly through target-attacked, and all other + messages use target-standard-event-handler." + (function process int symbol event-message-block object :behavior target)) +(define-extern target-jump-event-handler + "Handle airborne bonks and jumps before the standard event interface. Ignore a swim request while + the target is still moving upward so a jump out of water is not immediately cancelled." + (function process int symbol event-message-block object :behavior target)) +(define-extern target-walk-event-handler + "Handle grounded bonks and explicit jumps before passing remaining messages to the standard target + event interface." + (function process int symbol event-message-block object :behavior target)) +(define-extern target-state-hook-exit + "Clear the per-state target hook when leaving a state that installed one." + (function none :behavior target)) +(define-extern target-effect-exit + "Restore the target skeleton's effect channel offset after leaving a state that retargeted it." + (function none :behavior target)) ;; - Unknowns @@ -21275,13 +26975,40 @@ ;; - Functions -(define-extern target-land-effect (function none :behavior target)) -(define-extern target-hit-ground-anim (function symbol symbol :behavior target)) -(define-extern mod-var-jump (function symbol symbol symbol vector vector :behavior target)) -(define-extern init-var-jump (function float float vector vector vector vector :behavior target)) ;; 1st and 2nd vectors may be symbols instead? -(define-extern target-falling-anim (function time-frame time-frame symbol :behavior target)) -(define-extern target-falling-trans (function basic time-frame none :behavior target)) -(define-extern target-falling-anim-trans (function none :behavior target)) ;; unconfirmed +(define-extern target-land-effect + "Play landing effects for the target's current movement and surface. Flut launches its landing +poof and sound, racer plays an impact-scaled zoom sound, water uses the water landing effect, and +ordinary landings launch a poof and material sound." + (function none :behavior target)) +(define-extern target-hit-ground-anim + "Finish the animation active at touchdown. Select the standing or moving flop landing, ordinary + long or short jump landing, or knockback recovery; keep its required alignment or push until the + animation finishes. Fast ice slides skip landing animation, and swim slows a flop landing." + (function symbol symbol :behavior target)) +(define-extern mod-var-jump + "Update a rising variable-height jump. While jump-held? remains true during the first second, + interpolate the desired apex from the stored minimum to maximum and solve the required vertical + velocity from the current rise. Optionally update velocity and the animation collision offset." + (function symbol symbol symbol vector vector :behavior target)) +(define-extern init-var-jump + "Initialize a variable-height jump between min-height and max-height. Carry recent moving-platform + velocity, optionally reduce both heights by the animation collision offset, optionally replace + vel's vertical component with the ballistic launch speed, and remember the starting position." + (function float float symbol symbol vector vector :behavior target)) +(define-extern target-falling-anim + "Transition from the current edge-grab, blast, or ordinary animation into the falling loop. Play + the loop until loop-timeout elapses, or forever when it is negative, using blend-time for the + ordinary transition." + (function time-frame time-frame symbol :behavior target)) +(define-extern target-falling-trans + "Handle shared airborne transitions: air attacks, eco-powerup jump escape, landing, a + distance-and-time failsafe for a target stuck in the air, and slide-down entry. A negative + stuck-timeout disables the failsafe." + (function basic time-frame none :behavior target)) +(define-extern target-falling-anim-trans + "Non-blockingly maintain the falling loop and switch to the landing animation as soon as surface + contact is reported." + (function none :behavior target)) ;; - Unknowns @@ -21309,7 +27036,15 @@ :size-assert #x94 :flag-assert #xf00300094 (:methods - (spawn-particles! (_type_) none)) + (deactivate :override-doc + "Free the first-person HUD's particle launch controls and sprite slots, restore the normal + HUD, and deactivate this process.") + (relocate :override-doc + "Relocate each heap-owned particle launch-control pointer before relocating this process.") + (spawn-particles! + "Update the screen-space position and GS sprite offset of each first-person HUD particle, + then spawn the visible particles." + (_type_) none)) (:states hud-normal hud-coming-in @@ -21319,15 +27054,44 @@ ;; - Functions -(define-extern target-swim-tilt (function float float float float float :behavior target)) -(define-extern projectile-init-by-other (function entity-actor vector vector uint handle none :behavior projectile)) ;; 4th arg is `options`, 5th is `last-target` -(define-extern first-person-hud-init-by-other (function none :behavior first-person-hud)) -(define-extern disable-hud (function int none)) -(define-extern enable-hud (function none)) -(define-extern part-first-person-hud-left-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-first-person-hud-right-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-first-person-hud-selector-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern look-for-points-of-interest (function symbol)) +(define-extern target-swim-tilt + "Compute swimming pitch from horizontal speed and alignment with the requested direction. Add + tilt-bias, clamp to max-tilt, seek at tilt-seek-speed, build the override orientation from the + current facing and gravity-up directions, and update the diving draw offset." + (function float float float float float :behavior target)) +(define-extern projectile-init-by-other + "Initialize the projectile from source-entity, launch-position, initial-velocity, launch-context + option bits, and an optional last-target-handle. Create subtype collision and effects, seed the + sixteen-sample stall history, snapshot the parent transform, check initial overlaps for non-blue + projectiles, install the moving event hook, and enter the launch state." + (function entity-actor vector vector uint handle none :behavior projectile)) +(define-extern first-person-hud-init-by-other + "Create the left, right, and selector particles for the first-person aiming HUD, choose their + scale and horizontal offset for the active aspect ratio, and begin with the HUD off-screen." + (function none :behavior first-person-hud)) +(define-extern disable-hud + "Hide every HUD entry except keep-visible, then disable every other entry. The exception is + also hidden when its displayed value is zero." + (function int none)) +(define-extern enable-hud + "Enable every active HUD entry." + (function none)) +(define-extern part-first-person-hud-left-func + "Place and scale the left first-person HUD sprite from the HUD's slide-out fraction. Hide it + during movies and expand it rapidly as it leaves the screen." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-first-person-hud-right-func + "Place and scale the right first-person HUD sprite from the HUD's slide-out fraction. Hide it + during movies and expand it rapidly as it leaves the screen." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-first-person-hud-selector-func + "Fade the center selector's alpha from its full value to zero as the first-person HUD + leaves the screen, hiding it immediately during movies." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern look-for-points-of-interest + "Disabled point-of-interest display. Return false before the unfinished resource scan and + game-text overlay." + (function symbol)) ;; - Unknowns @@ -21343,18 +27107,52 @@ ;; - Functions -(define-extern target-death-anim (function spool-anim none :behavior target)) -(define-extern death-movie-remap (function int int int)) -(define-extern pov-camera-init-by-other (function vector skeleton-group string pov-camera-flag process-drawable pair none :behavior pov-camera)) ;; TODO - not confirmed -- sunken-elevator -(define-extern target-hit-effect (function attack-info none :behavior target)) -(define-extern target-hit-setup-anim (function attack-info none :behavior target)) -(define-extern target-hit-move (function attack-info symbol (function none :behavior target) float none :behavior target)) -(define-extern target-hit-orient (function attack-info vector symbol :behavior target)) -(define-extern target-hit-push (function vector matrix float float attack-info object :behavior target)) -(define-extern velocity-set-to-target! (function vector float attack-info vector :behavior target)) +(define-extern target-death-anim + "Play Jak's generic collapse animation while holding the camera behind him and pre-spooling the + selected death movie. Apply the animation's alignment delta as world-space velocity each frame." + (function spool-anim none :behavior target)) +(define-extern death-movie-remap + "Map a monotonically increasing death count into count movie slots, alternating forward and + backward passes so adjacent cycles do not restart with the same ordering." + (function int int int)) +(define-extern pov-camera-init-by-other + "Initialize a point-of-view camera at position with skel-group and either a resident animation +name or spool-anim. Apply flags, remember owner for completion and abort notifications, install the +timed command-list, and enter startup." + (function vector skeleton-group basic pov-camera-flag process-drawable pair none :behavior pov-camera)) +(define-extern target-hit-effect + "Create the contact effect and pain sound for a damaging hit. Burn attacks also attach the + timed burning effect to Jak." + (function attack-info none :behavior target)) +(define-extern target-hit-setup-anim + "Start the hit-reaction animation selected by the attack angle, airborne state, and shove type." + (function attack-info none :behavior target)) +(define-extern target-hit-move + "Apply a hit's upward launch and horizontal push until the reaction animation and knockback are + finished. Continue with fall-fn after the first animation when necessary." + (function attack-info symbol (function none :behavior target) float none :behavior target)) +(define-extern target-hit-orient + "Turn Jak for the hit reaction, install the appropriate knockback surface modifiers, and return + whether landing should end the reaction animation." + (function attack-info vector symbol :behavior target)) +(define-extern target-hit-push + "Perform one frame of knockback movement toward the requested point. Return true while homing, + false after steering is released, or stuck when collision prevents meaningful movement." + (function vector matrix float float attack-info object :behavior target)) +(define-extern velocity-set-to-target! + "Aim the forced-turn steering toward a point in the horizontal plane and set its requested speed. + The attack control value blends between full steering and the existing velocity. Return the + unnormalized offset to the target point." + (function vector float attack-info vector :behavior target)) (define-extern start-sequence-a (function none)) ;; not confirmed -(define-extern task-closed? (function game-task task-status symbol)) -(define-extern next-level (function symbol level-load-info)) +(define-extern task-closed? + "Return whether the stage matching task and status is closed. The underlying control method +reports an error and returns true when that stage does not exist." + (function game-task task-status symbol)) +(define-extern next-level + "Return the level-load-info whose index immediately follows the named level, or false when no + such entry exists. This supports the automatic level-walk debug mode." + (function symbol level-load-info)) ;; - Unknowns @@ -21466,7 +27264,8 @@ :size-assert #x20 :flag-assert #x900000020 (:methods - (new (symbol type string object (function object debug-menu-msg object)) _type_) ;; 0 + (new "Create a periodically refreshed flag item whose callback reads or toggles the value." + (symbol type string object (function object debug-menu-msg object)) _type_) ;; 0 ) ) @@ -21522,21 +27321,44 @@ (define-extern debug-menus-active (function debug-menu-context debug-menu-context)) (define-extern debug-menus-default-joypad-func (function debug-menu-context debug-menu-context)) (define-extern debug-menu-context-render (function debug-menu-context debug-menu-context)) -(define-extern debug-menu-context-close-submenu (function debug-menu-context debug-menu-context)) +(define-extern debug-menu-context-close-submenu + "Deactivate the current menu, then pop it from the open-menu stack when it is below the root." + (function debug-menu-context debug-menu-context)) (define-extern debug-menu-context-activate-selection (function debug-menu-context debug-menu-context)) -(define-extern debug-menu-context-select-new-item (function debug-menu-context int debug-menu-context)) +(define-extern debug-menu-context-select-new-item + "Move the current selection by offset entries, shortening the move at either end and wrapping + only when the selection already starts on the first or last entry." + (function debug-menu-context int debug-menu-context)) (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-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-msg (function debug-menu-item-var debug-menu-msg debug-menu-item-var)) +(define-extern debug-menu-item-submenu-msg + "Open the item's submenu when it receives a press message." + (function debug-menu-item-submenu debug-menu-msg debug-menu-item-submenu)) +(define-extern debug-menu-item-function-msg + "Invoke the item's callback on press and set a short blue or red highlight according to its + result. Clear the highlight when the item is deactivated." + (function debug-menu-item-function debug-menu-msg debug-menu-item-function)) +(define-extern debug-menu-item-flag-msg + "Toggle the flag callback on press, query it on update or activation, and refresh the open menus + after a change." + (function debug-menu-item-flag debug-menu-msg debug-menu-item-flag)) +(define-extern debug-menu-item-var-msg + "Begin variable editing on press, save the undo value, release the joypad on deactivation, and + query the callback on update or activation." + (function debug-menu-item-var debug-menu-msg debug-menu-item-var)) (define-extern debug-menu-context-release-joypad (function debug-menu-context symbol)) ;; this is called with a second arg in places, but definitely not used! (define-extern debug-menu-context-grab-joypad (function debug-menu-context basic (function basic none) symbol)) -(define-extern debug-menu-item-var-joypad-handler (function debug-menu-item-var debug-menu-item-var)) +(define-extern debug-menu-item-var-joypad-handler + "Edit the grabbed variable from the directional pad. Begin with the configured step, repeat after + a short delay, and double the step every 30 held frames up to the numeric cap. Releasing X + commits the value; pressing Circle while releasing restores the saved value." + (function debug-menu-item-var debug-menu-item-var)) (define-extern debug-menu-item-var-update-display-str (function debug-menu-item-var debug-menu-item-var)) -(define-extern debug-menu-context-open-submenu (function debug-menu-context debug-menu basic)) ;; can also return string error messages +(define-extern debug-menu-context-open-submenu + "Push a nonempty submenu onto the selection stack, select its first item when needed, and + activate its entries. Refuse stacks deeper than eight menus." + (function debug-menu-context debug-menu basic)) ;; can also return string error messages (define-extern debug-menu-context-select-next-or-prev-item (function debug-menu-context int debug-menu-context)) (define-extern debug-menu-render (function debug-menu int int debug-menu-node int debug-menu)) (define-extern debug-menu-item-render (function debug-menu-item int int int symbol debug-menu-item)) @@ -21544,7 +27366,11 @@ (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-make-from-template (function debug-menu-context pair debug-menu-node)) +(define-extern debug-menu-make-from-template + "Recursively build menus and items from a static template. Menu entries contain child templates; + flag and function entries decode callbacks; variable entries select integer, fixed-point, + hexadecimal, floating-point, or scaled floating-point setup." + (function debug-menu-context pair debug-menu-node)) (define-extern debug-menu-append-item (function debug-menu debug-menu-node debug-menu-node)) (define-extern debug-menu-context-set-root-menu (function debug-menu-context debug-menu debug-menu-context)) (define-extern debug-menu-func-decode (function object function)) @@ -21555,7 +27381,9 @@ (define-extern debug-menu-item-get-max-width (function debug-menu-item debug-menu int)) (define-extern debug-menu-remove-all-items (function debug-menu debug-menu)) (define-extern debug-menu-find-from-template (function debug-menu-context pair debug-menu)) -(define-extern debug-menus-handler (function debug-menu-context debug-menu-context)) +(define-extern debug-menus-handler + "Update and draw the menu context while it is active." + (function debug-menu-context debug-menu-context)) ;; ---------------------- @@ -21566,34 +27394,117 @@ ;; - Functions -(define-extern display-frame-finish (function display display)) -(define-extern display-sync (function display none)) -(define-extern determine-pause-mode (function int)) -(define-extern display-frame-start (function display int int none)) -(define-extern toggle-pause (function int)) -(define-extern deactivate-progress (function none)) -(define-extern debug-init-buffer (function bucket-id gs-zbuf gs-test none)) -(define-extern real-main-draw-hook (function none)) -(define-extern error-sphere (function drawable-error string none)) -(define-extern draw-instance-info (function string none)) ;; only passed *stdcon* -(define-extern find-instance-by-name (function string prototype-bucket)) -(define-extern prototype-bucket-type (function prototype-bucket type)) -(define-extern guard-band-cull (function vector symbol)) -(define-extern find-instance-by-index (function type int bsp-header prototype-bucket)) -(define-extern prototype-bucket-recalc-fields (function prototype-bucket prototype-bucket)) -(define-extern dma-add-process-drawable-hud (function process-drawable draw-control symbol dma-buffer none)) -(define-extern foreground-engine-execute (function engine display-frame int int none)) -(define-extern main-debug-hook (function none)) -(define-extern main-draw-hook (function none)) +(define-extern display-frame-finish + "Finish the current frame's DMA lists, link its ordered render buckets, append the final DMA tag, +flush the cache, and return disp. This does not start the transfer." + (function display display)) +(define-extern display-sync + "Wait for the previous render and vertical sync, apply pending video-mode changes, start the +current frame's DMA chain, update pause state, and initialize the next display frame." + (function display none)) +(define-extern determine-pause-mode + "Handle debug frame advance, pause input, controller-loss pause, and progress-screen +deactivation." + (function int)) +(define-extern display-frame-start + "Initialize display frame new-frame-index for drawing field odd-even. Update timing and frame +counters, reset its DMA buffers and debug state, reserve ordered render buckets, initialize the +debug bucket, update the draw environment, and service the controllers." + (function display int int none)) +(define-extern toggle-pause + "Read pause and debug-menu controls, transition among game, menu, pause, and progress modes, and + update the single-frame pause lock." + (function int)) +(define-extern deactivate-progress + "When the progress process has reached progress-gone, apply settings, free its particle + launchers, deactivate it, clear the global pointer, and reenable level text loading." + (function none)) +(define-extern debug-init-buffer + "Append a GIF packet that installs zbuf and test for debug draws in bucket." + (function bucket-id gs-zbuf gs-test none)) +(define-extern real-main-draw-hook + "Build one frame's renderer DMA lists, dispatching the active background, foreground, shadow, +particle, sprite, HUD, and debug draw systems." + (function none)) +(define-extern error-sphere + "When artist error spheres are enabled and item passes visibility and frustum culling, draw its +red bounding sphere and label it with name." + (function drawable-error string none)) +(define-extern draw-instance-info + "When instance statistics are enabled and *edit-instance* names a prototype, print its memory +use, LOD distances, instance counts, and per-geometry triangle, displayed-vertex, strip-length, and +texture statistics to output. Do nothing when the selection is absent." + (function string none)) ;; only passed *stdcon* +(define-extern find-instance-by-name + "Search every active level's shrub and TIE prototype arrays for name. Return the matching +prototype bucket, or false when no prototype matches." + (function string prototype-bucket)) +(define-extern prototype-bucket-type + "Classify prototype from the type of geometry slot 1, returning instance-shrubbery or +instance-tie." + (function prototype-bucket type)) +(define-extern guard-band-cull + "Return true when sphere crosses at least one expanded guard-plane boundary and therefore +requires clipping rather than trivial acceptance." + (function vector symbol)) +(define-extern find-instance-by-index + "Search active levels, optionally restricted to bsp-filter, for a shrub or TIE tree of tree-type +and return prototype-index from its prototype array. Return false when no tree matches; +prototype-index is not bounds checked." + (function type int bsp-header prototype-bucket)) +(define-extern prototype-bucket-recalc-fields + "Recompute prototype's derived LOD distances after editing its near or far plane. TIE places the +mid plane one third of the way from near to far; shrub preserves its mid plane and uses the full +near-to-far span for rdists.x. Update the reciprocal band lengths, set the near stiffening distance +to half the near plane, and return prototype." + (function prototype-bucket prototype-bucket)) +(define-extern dma-add-process-drawable-hud + "Draw actor at LOD 0 with *hud-lights*. Skip hidden or disabled controls, copy the fixed lights to +foreground scratchpad, mark the actor drawn, and submit its HUD bones to dma-buf; flag is unused." + (function process-drawable draw-control symbol dma-buffer none)) +(define-extern foreground-engine-execute + "Execute one foreground draw engine for level-index and sink-index. Initialize bone DMA with the +selected level foreground sink, invoke the actor connections, finish the Merc stream, account Merc +and Generic DMA use, cue Generic Merc, and advance the shadow queue. frame is retained by the +draw-engine interface although this function uses the current display buffers." + (function engine display-frame int int none)) +(define-extern main-debug-hook + "Execute debug-engine connections during gameplay; skip them while the master mode is menu or +progress." + (function none)) +(define-extern main-draw-hook + "Submit all renderer work for the current frame." + (function none)) (define-extern swap-display (function display none)) -(define-extern marks-cam-restore (function none)) -(define-extern eddie-cam-restore (function none)) -(define-extern gregs-jungle-cam-restore (function none)) -(define-extern gregs-village1-cam-restore (function none)) -(define-extern gregs-texture-cam-restore (function none)) -(define-extern gregs-texture2-cam-restore (function none)) -(define-extern cave-cam-restore (function none)) -(define-extern paals-cam-restore (function none)) +(define-extern marks-cam-restore + "Restore Mark's saved Village3 camera pose and FOV, install its CPU, VU, and tfragment profiling +baselines, clear the saved statistic strings, and enable old-stat display." + (function none)) +(define-extern eddie-cam-restore + "Restore Eddie's saved debug camera pose." + (function none)) +(define-extern gregs-jungle-cam-restore + "Restore Greg's saved Jungle camera pose and FOV, install its CPU, VU, and tfragment profiling +baselines, and clear the saved statistic strings." + (function none)) +(define-extern gregs-village1-cam-restore + "Restore Greg's saved Village1 camera pose and FOV, install its CPU, VU, and tfragment profiling +baselines, and clear the saved statistic strings." + (function none)) +(define-extern gregs-texture-cam-restore + "Restore Greg's saved Village1 texture-test camera pose and FOV, install its CPU, VU, and +tfragment profiling baselines, and clear the saved statistic strings." + (function none)) +(define-extern gregs-texture2-cam-restore + "Restore Greg's saved second Village1 texture-test camera pose and FOV, install its CPU, VU, and +tfragment profiling baselines, and clear the saved statistic strings." + (function none)) +(define-extern cave-cam-restore + "Restore the saved cave debug camera pose." + (function none)) +(define-extern paals-cam-restore + "Restore Paal's saved debug camera pose." + (function none)) ;; - Symbols @@ -21619,9 +27530,19 @@ ;; - Functions -(define-extern drawable-sphere-box-intersect? (function drawable bounding-box4w symbol)) ;; TODO - pcgtw | por | ppach -(define-extern instance-sphere-box-intersect? (function drawable instance-tie bounding-box4w symbol)) ;; pextlh | VITOF12 | pcgtw | por | ppach ;; TODO - the first arg is based from the second arg in `drawable:11` -(define-extern instance-tfragment-add-debug-sphere (function drawable instance-tie symbol)) ;; unused +(define-extern drawable-sphere-box-intersect? + "Broad-phase reject of a world-space bsphere against an integer-coordinate box. The sphere's own + box comes from its radius in w, truncated to integer world units to match query-box, and only x, + y and z are compared. Touching counts as a hit." + (function drawable bounding-box4w symbol)) ;; TODO - pcgtw | por | ppach +(define-extern instance-sphere-box-intersect? + "Broad-phase reject of one collide frag of a TIE instance against an integer-coordinate box. The + frag's bsphere is in prototype space, so it is carried through inst's compressed transform first." + (function drawable instance-tie bounding-box4w symbol)) ;; pextlh | VITOF12 | pcgtw | por | ppach +(define-extern instance-tfragment-add-debug-sphere + "Debug draw of one collide frag's world bsphere. Neither the instance basis nor max-scale is + applied, so this is only correct for an unrotated, unscaled instance. Unused." + (function drawable instance-tie symbol)) ;; ---------------------- @@ -21632,7 +27553,9 @@ ;; - Functions -(define-extern set-hud-aspect-ratio (function symbol symbol none)) ;; TODO return type not validated yet +(define-extern set-hud-aspect-ratio + "Update every active HUD entry for the selected aspect ratio and video mode." + (function symbol symbol none)) ;; TODO return type not validated yet ;; ---------------------- @@ -21643,17 +27566,42 @@ ;; - Functions -(define-extern display-loop (function int :behavior process)) -(define-extern entity-by-type (function type entity-actor)) +(define-extern display-loop + "Run the per-frame display process. Prepare animation, ambients, camera, drawing, menus, and debug + overlays; finish and submit the display frame; then update particles, sound, levels, memory-card + work, and PC settings before suspending." + (function int :behavior process)) +(define-extern entity-by-type + "Return the first active-level entity actor whose declared process type is exactly entity-type, + or false." + (function type entity-actor)) (define-extern scf-get-territory (function int)) -(define-extern pause-allowed? (function symbol)) -(define-extern menu-respond-to-pause (function symbol)) -(define-extern hide-progress-screen (function none)) -(define-extern set-letterbox-frames (function time-frame none)) -(define-extern letterbox (function none)) -(define-extern blackout (function none)) -(define-extern main-cheats (function int)) -(define-extern off (function int)) +(define-extern pause-allowed? + "Return true when gameplay permits pausing. Reject blackouts, background fades, an explicit + pause lock, an active autosave process, and a missing target." + (function symbol)) +(define-extern menu-respond-to-pause + "Called while the pause screen is up. Activates the popup menu when L3 is held and the main menu otherwise, and deactivates both once the game is no longer paused." (function symbol)) +(define-extern hide-progress-screen + "Ask the active progress process to leave." + (function none)) +(define-extern set-letterbox-frames + "Keep the movie letterbox active through duration frames after the current time." + (function time-frame none)) +(define-extern letterbox + "Append the movie bars to the final no-depth-test bucket. The original presentation uses fixed + top and bottom bars; native PC presentation boxes either axis to a 16:9 image." + (function none)) +(define-extern blackout + "Append a full-screen black quad to the final no-depth-test bucket." + (function none)) +(define-extern main-cheats + "Recognize cheat button sequences, service retail debug controls, and enforce kiosk timeouts by + spawning a short blackout-and-shutdown process." + (function int)) +(define-extern off + "Stop the target in debug mode, deactivate every active level, and stop the display loop." + (function int)) ;; - Symbols @@ -21680,6 +27628,8 @@ ;; - Types (deftype collide-puls-work (structure) + "Inputs and output for a moving-sphere probe over cached primitives. bsphere holds the starting + center and radius, move-dist holds the sweep vector, and tri-out receives the nearest hit." ((ignore-pat pat-surface :offset-assert 0) (tri-out collide-tri-result :offset-assert 4) (bsphere sphere :inline :offset-assert 16) @@ -21691,6 +27641,8 @@ ) (deftype lsmi-work (structure) + "Scratch state for a moving-sphere mesh test. It tracks the current and incoming best hit + fractions, required action bits, and the candidate triangle result." ((best-u float :offset-assert 0) (orig-best-u float :offset-assert 4) (action uint32 :offset-assert 8) @@ -21703,8 +27655,14 @@ ;; - Functions +(define-extern collide-cache-using-y-probe-test + "Return whether bsphere overlaps the active vertical-probe box." + (function vector symbol)) (define-extern make-collide-list-using-line-sphere-inst-test (function collide-fragment instance-tie symbol)) -(define-extern test-closest-pt-in-triangle (function collide-cache symbol)) +(define-extern test-closest-pt-in-triangle + "Exercise closest-point calculation for every cached triangle against the target position, + retaining the nearest point in temporary debug storage. Return false." + (function collide-cache symbol)) ;; - Unknowns @@ -21730,19 +27688,53 @@ ;; - Functions -(define-extern task-control-reset (function symbol none)) -(define-extern init-entity (function process entity-actor none)) -(define-extern birth-viewer (function process entity-actor object)) -(define-extern update-actor-vis-box (function process-drawable vector vector none)) -(define-extern process-status-bits (function process symbol none)) -(define-extern entity-by-meters (function float float float entity-actor)) -(define-extern entity-process-count (function symbol int)) -(define-extern entity-count (function int)) -(define-extern entity-remap-names (function pair none)) -(define-extern expand-vis-box-with-point (function entity vector none)) -(define-extern entity-task-complete-on (function entity none)) -(define-extern entity-task-complete-off (function entity none)) -(define-extern entity-speed-test (function string none)) +(define-extern task-control-reset + "Reset every task control with reset-mode, then select each control's first available stage." + (function symbol none)) +(define-extern init-entity + "Activate proc in the entity pool, connect it to actor, and run its init-from-entity! method + immediately before the process enters ordinary scheduling. Callers pass proc's installed type as + entity-type, although this implementation does not read it." + (function process entity-actor type none)) +(define-extern birth-viewer + "Use the viewer fallback for an entity whose declared process type is unavailable. Retype proc as + viewer, initialize it through the ordinary entity path, and return true." + (function process entity-actor symbol)) +(define-extern update-actor-vis-box + "Expand min-point and max-point around proc's world-space draw-bounds sphere when it has draw + control." + (function process-drawable vector vector none)) +(define-extern process-status-bits + "Print three compact process-status characters to stream: logic-running, drawing, and current + draw LOD. Unsupported or inactive fields print spaces." + (function process symbol none)) +(define-extern entity-by-meters + "Return the first active-level actor whose fixed-point translation equals x, y, and z in meters, + or false." + (function float float float entity-actor)) +(define-extern entity-process-count + "Count active-level entity links with live processes, or visible links when mode is vis." + (function symbol int)) +(define-extern entity-count + "Return the total number of entity links across active levels." + (function int)) +(define-extern entity-remap-names + "For each position/name record in remaps, locate the actor at the eighth-unit coordinates and + replace its name resource tag." + (function pair none)) +(define-extern expand-vis-box-with-point + "Expand entity's editable visibility box to contain point when the entity has visvol data." + (function entity vector none)) +(define-extern entity-task-complete-on + "Set real-complete in entity's task-permission record when the entity has a nonzero task." + (function entity none)) +(define-extern entity-task-complete-off + "Clear real-complete in entity's task-permission record unless the task is the complete sentinel." + (function entity none)) +(define-extern entity-speed-test + "In a debug segment, disable actor spawning, reset actors, time the named entity's birth with the + EE Count register while interrupts are disabled, print the result and process, then kill it." + (function string none)) ;; - Unknowns @@ -21758,7 +27750,12 @@ ;; - Functions -(define-extern plane-volume-intersect-dist (function vector vector vector float)) +(define-extern plane-volume-intersect-dist + "Return how many multiples of direction reach plane-data from origin, or 100000 meters when + direction is within one part in one hundred thousand of parallel. The plane is ax + by + cz = d + with d in w. The result is a distance only when direction is unit length, and negative values + place the plane behind origin." + (function vector vector vector float)) ;; ---------------------- @@ -21804,7 +27801,7 @@ (best-dir vector 2 :inline :offset-assert 32) (temp-dir vector 2 :inline :offset-assert 64) (away-dir vector :inline :offset-assert 96) - (best-dir-angle degrees 2 :offset-assert 112) ;; maybe degs? + (best-dir-angle float 2 :offset-assert 112) (ignore-mask uint64 :offset-assert 120) (initial-ignore-mask uint64 :offset-assert 128) (i-sphere int32 :offset-assert 136) @@ -21826,39 +27823,132 @@ ;; - Functions -(define-extern test-xz-point-on-line-segment? (function vector vector vector float symbol)) -(define-extern ray-ccw-line-segment-intersection? (function vector vector vector vector symbol)) -(define-extern choose-travel-portal-vertex (function nav-mesh nav-route-portal nav-poly vector int)) -(define-extern init-ray (function nav-ray symbol)) -(define-extern ray-line-segment-intersection? (function vector vector vector vector symbol)) -(define-extern point-triangle-distance-min (function vector float (inline-array nav-vertex) float)) -(define-extern nav-mesh-update-route-table (function nav-mesh int int uint uint)) -(define-extern nav-mesh-lookup-route (function nav-mesh int int uint)) -(define-extern nav-ray-test-local? (function nav-mesh nav-poly vector vector symbol)) -(define-extern init-ray-local (function nav-ray nav-poly vector vector symbol)) -(define-extern init-ray-dir-local (function nav-ray nav-poly vector vector float symbol)) -(define-extern circle-triangle-intersection? (function vector float (inline-array nav-vertex) symbol)) -(define-extern point-inside-rect? (function nav-node vector float symbol)) -(define-extern recursive-inside-poly (function nav-mesh nav-node vector float int)) ;; unused -(define-extern point-inside-poly? (function nav-mesh uint vector float symbol)) -(define-extern vu-point-triangle-intersection? (function vector vector vector vector symbol)) -(define-extern pke-nav-hack (function none)) -(define-extern debug-report-nav-stats (function none)) ;; empty stub -(define-extern inc-mod3 (function int int)) -(define-extern dec-mod3 (function int int)) -(define-extern circle-triangle-intersection-proc? (function vector float (inline-array nav-vertex) symbol)) -(define-extern nav-ray-test (function nav-mesh nav-poly vector vector meters)) -(define-extern clip-vector-to-halfspace! (function vector float float float float)) -(define-extern add-nav-sphere (function nav-control vector none)) -(define-extern add-collide-shape-spheres (function nav-control collide-shape vector none)) ;; unused -(define-extern circle-tangent-directions (function vector vector vector vector vector)) -(define-extern find-closest-circle-ray-intersection (function vector vector float int (inline-array vector) int int)) ;; last int arg may be a float but...it does a logand with it -(define-extern sign-bit (function int int)) -(define-extern compute-dir-parm (function vector vector vector float)) -(define-extern debug-nav-validate-current-poly (function nav-mesh nav-poly vector symbol)) ;; unused -(define-extern start-collect-nav (function none)) -(define-extern end-collect-nav (function none)) -(define-extern nav-sphere-from-cam (function none)) +(define-extern test-xz-point-on-line-segment? + "Return whether point is within tolerance of the finite XZ segment. Endpoint proximity is tested + first; otherwise the perpendicular projection must lie between segment-start and segment-end." + (function vector vector vector float symbol)) +(define-extern ray-ccw-line-segment-intersection? + "Return whether the XZ ray from origin along direction crosses the directed segment from start to + end on its counter-clockwise side." + (function vector vector vector vector symbol)) +(define-extern choose-travel-portal-vertex + "Choose the current portal endpoint around which the remaining route bends. Walk later portals + until both endpoints lie on one side of the current edge's perpendicular bisector; if the route + ends first, use the endpoint nearest target-point to choose the side." + (function nav-mesh nav-route-portal nav-poly vector int)) +(define-extern init-ray + "Reset ray's length and termination results, and normalize its current-to-destination XZ + direction." + (function nav-ray symbol)) +(define-extern ray-line-segment-intersection? + "Return whether the XZ ray from origin along direction intersects the segment from start to end, + independent of segment winding." + (function vector vector vector vector symbol)) +(define-extern point-triangle-distance-min + "Return point's shortest XZ distance to the triangle. Return zero inside it, the perpendicular + edge distance or nearest corner distance outside it, and stop at max-distance when an edge + already proves the triangle cannot improve the caller's current best." + (function vector float (inline-array nav-vertex) float)) +(define-extern nav-mesh-update-route-table + "Store edge-value in the packed two-bit route entry from from-poly to to-poly. Values zero through + two select a portal edge; three means no intermediate portal." + (function nav-mesh int int uint uint)) +(define-extern nav-mesh-lookup-route + "Return the packed two-bit route entry from from-poly to to-poly. The argument order matches the + table's to-then-from lookup convention." + (function nav-mesh int int uint)) +(define-extern nav-ray-test-local? + "Return whether a mesh-local ray from start to destination reaches its destination before a + boundary or gap." + (function nav-mesh nav-poly vector vector symbol)) +(define-extern init-ray-local + "Initialize ray at start in start-poly with a mesh-local destination." + (function nav-ray nav-poly vector vector symbol)) +(define-extern init-ray-dir-local + "Initialize ray at start in start-poly with a mesh-local direction and distance." + (function nav-ray nav-poly vector vector float symbol)) +(define-extern circle-triangle-intersection? + "Return whether the XZ circle overlaps the triangle in vertices, including edge and vertex + contact." + (function vector float (inline-array nav-vertex) symbol)) +(define-extern point-inside-rect? + "Return whether point lies inside node's XZ bounds and its Y interval overlaps y-threshold around + the point." + (function nav-node vector float symbol)) +(define-extern recursive-inside-poly + "Search a navigation BVH below node for a non-gap triangle containing point within y-threshold. + Return its triangle index or -1." + (function nav-mesh nav-node vector float int)) ;; unused +(define-extern point-inside-poly? + "Return whether point lies inside the indexed non-gap triangle in XZ and within y-threshold of its + average vertex height." + (function nav-mesh uint vector float symbol)) +(define-extern vu-point-triangle-intersection? + "Return whether point lies inside the triangle in XZ by comparing its three oriented edge signs; + Y and W are ignored." + (function vector vector vector vector symbol)) +(define-extern pke-nav-hack + "Print and reset the navigation traversal and triangle-test debug counters." + (function none)) +(define-extern debug-report-nav-stats + "Empty navigation-statistics hook." + (function none)) +(define-extern inc-mod3 + "Return the next cyclic triangle-edge index for an input in the range zero through two." + (function int int)) +(define-extern dec-mod3 + "Return the previous cyclic triangle-edge index for an input in the range zero through two." + (function int int)) +(define-extern circle-triangle-intersection-proc? + "Return whether the XZ circle overlaps the triangle in vertices. This is the reference version of + circle-triangle-intersection?." + (function vector float (inline-array nav-vertex) symbol)) +(define-extern nav-ray-test + "Convert the world-space start position to mesh-local space, then walk toward the world-space + destination from start-poly. Return the XZ distance traveled before reaching the destination, a + boundary, or a gap." + (function nav-mesh nav-poly vector vector meters)) +(define-extern clip-vector-to-halfspace! + "If travel's XZ projection onto the supplied normal exceeds limit, scale its X and Z components + uniformly so the projection equals limit. Leave Y unchanged; callers use the mutation rather + than the incidental return value." + (function vector float float float float)) +(define-extern add-nav-sphere + "Append a world-space obstacle sphere to control in mesh-local coordinates when capacity permits." + (function nav-control vector none)) +(define-extern add-collide-shape-spheres + "Append shape's enabled body and extra navigation spheres to control, combining each radius with + the navigating body's radius and rejecting spheres beyond the ten-meter cull range." + (function nav-control collide-shape vector none)) ;; unused +(define-extern circle-tangent-directions + "Store the two unit XZ directions from point tangent to the circle whose center is circle-center's + XYZ and whose radius is its W component. Clamp an inside point to the center distance so the + tangent calculation remains defined." + (function vector vector vector vector vector)) +(define-extern find-closest-circle-ray-intersection + "Return the nearest sphere index hit by the finite XZ ray, or -1. Set bits in ignore-mask skip the + corresponding entries in spheres." + (function vector vector float int (inline-array vector) int int)) ;; last int arg may be a float but...it does a logand with it +(define-extern sign-bit + "Return one when value's low 32-bit signed representation is negative, otherwise zero." + (function int int)) +(define-extern compute-dir-parm + "Return a signed turn cost for direction: one minus its dot product with input-direction, with the + sign selected by which side of right-direction it lies on." + (function vector vector vector float)) +(define-extern debug-nav-validate-current-poly + "Debug hook for validating current-poly. When point lies outside it, project point to the triangle + and compute the XZ miss distance for inspection; the hook returns #f." + (function nav-mesh nav-poly vector symbol)) ;; unused +(define-extern start-collect-nav + "Begin performance-counter bucket 14 for navigation work." + (function none)) +(define-extern end-collect-nav + "End performance-counter bucket 14 and accumulate both selected EE counters." + (function none)) +(define-extern nav-sphere-from-cam + "Print the current camera position as a SPHEREM authoring form." + (function none)) ;; - Unknowns @@ -21922,7 +28012,11 @@ ;; - Functions -(define-extern sound-name-with-material (function symbol pat-surface string sound-name)) +(define-extern sound-name-with-material + "Build a sound name from base, the collision material's sound-family name, and suffix. Materials +that share audio use the pcmetal, metal, or grass family, and waterbottom and deepsnow use the +shortened water and dpsnow names." + (function symbol pat-surface string sound-name)) ;; - Unknowns @@ -21937,15 +28031,38 @@ ;; - Functions -(define-extern splash-spawn (function basic basic int none)) -(define-extern part-water-splash-callback (function part-tracker none)) -(define-extern ocean-get-height (function vector float)) -(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 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-above-and-die (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern water-vol-init-by-other (function entity-actor none :behavior water-vol)) +(define-extern splash-spawn + "Spawn a splash tracker at position with scale stored as its callback userdata. size zero selects +the small splash group; other values select the full group." + (function basic basic int none)) +(define-extern part-water-splash-callback + "Configure the shared splash particle definitions from the tracker's surface height and scale. +This adjusts droplet kill heights plus the launch counts, positions, velocities, and ring sizes." + (function part-tracker none)) +(define-extern ocean-get-height + "World y of the ocean surface under world-pos. The live wave field is a 32-by-32 grid of floats spaced (meters 3) apart which wraps every (meters 96) - one mid-grid cell - in both x and z, so any world position maps into it; the four surrounding samples are bilinearly blended and added to the map's base height. Returns 0.0 when no ocean map is loaded or the wave field has not been built yet this frame, so a caller comparing against a real y has to treat 0.0 as \"no answer\" rather than \"sea level\"." (function vector float)) +(define-extern birth-func-y->userdata + "Add the launch transform's world Y coordinate to the particle's user-float, converting its +relative surface offset to a world-space height." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern birth-func-ocean-height + "Place the launch transform at the ocean height sampled at its position, plus the particle's +user-float vertical offset." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern check-water-level-drop + "When a descending particle crosses the world-space water height in user-float, kill it, play the +water-drop sound, and launch a surface ring at the crossing position." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-water-level-drop-and-die + "Kill a descending particle after it falls below the world-space water height in user-float." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-water-level-above-and-die + "Kill a particle once it reaches or rises above the world-space water height in user-float." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern water-vol-init-by-other + "Initialize a water volume spawned by another process. Install source-entity, build the root and +resource state, run both subtype setup hooks, and enter the startup state." + (function entity-actor none :behavior water-vol)) ;; ---------------------- @@ -21956,12 +28073,33 @@ ;; - Functions -(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 part-tracker-track-root (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern part-tracker-move-to-target (function part-tracker vector)) -(define-extern part-tracker-track-target (function part-tracker vector)) -(define-extern sparticle-track-root-money (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern eco-fadeout + "Keep the particle's next-launcher countdown two current frame intervals ahead while its owning +drawable is not fading. Stop refreshing the countdown when fade-out-particles is set so the +particle can advance to its next launcher." + (function sparticle-system sparticle-cpuinfo none)) +(define-extern eco-track-root-prim-fadeout + "Copy the center of the owning moving collide shape's root primitive into position, leaving its W +lane unchanged. Keep the particle's next-launcher countdown two current frame intervals ahead until +the owner sets fade-out-particles." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-tracker-track-root + "Copy the owning drawable's root translation into the particle position, leaving its W lane +unchanged." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern part-tracker-move-to-target + "Interpolate the tracker's root translation from its saved offset to target joint 5 using the +unclamped elapsed-tick factor elapsed / 150. Use the current tracker position as the destination +when no target exists." + (function part-tracker vector)) +(define-extern part-tracker-track-target + "Continue this callback during the linger interval and copy target joint 5 into the tracker's root +translation. Leave the tracker in place when no target exists, and return its root translation." + (function part-tracker vector)) +(define-extern sparticle-track-root-money + "Copy the owning drawable's root translation into position with Y raised by 2048 world units. +Leave position unchanged when the owner is hud-money." + (function sparticle-system sparticle-cpuinfo vector none)) ;; ---------------------- @@ -22008,7 +28146,11 @@ :flag-assert #x1600d0013c (:methods (initialize (_type_) _type_) ;; 20 - (initialize-params (_type_ time-frame float) none) ;; 21 + (initialize-params + "Prepare shared collectable motion and timing. Start collectible unless it has launch +velocity, record its base and bob phase, allow blue-eco attraction for supported kinds, optionally +fade after fadeout-time, and enlarge the collision sphere for the large option." + (_type_ time-frame float) none) ;; 21 ) ) @@ -22030,14 +28172,24 @@ :size-assert #x194 :flag-assert #x1f01300194 (:methods + (initialize :override-doc + "Allocate the moving collision sphere and fact information for an eco collectable. Configure +pause handling, collision response, blue-eco attraction, and the optional respawn delay.") (wait () _type_ :state) ;; 22 ;; state (pickup (object handle) _type_ :state) ;; 23 ;; state (die () _type_ :state) ;; 24 ;; state (jump () _type_ :state) ;; 25 (notice-blue (handle) _type_ :state) ;; 26 ;; state - (initialize-effect (_type_ pickup-type) none) ;; 27 - (initialize-eco (_type_ entity-actor pickup-type float) object) ;; 28 - (animate (_type_) none) ;; 29 + (initialize-effect + "Select the idle and collection particle groups and optional ambient sound for kind, then +create the idle particle control." + (_type_ pickup-type) none) ;; 27 + (initialize-eco + "Initialize an entity-backed eco collectable of kind and amount at the entity transform, +prepare its effects and shared collectable state, and enter blocked or wait as requested." + (_type_ entity-actor pickup-type float) object) ;; 28 + (animate "Base animation hook for eco collectables; subclasses provide the visible update." + (_type_) none) ;; 29 (blocked () _type_ :state) ;; 30 ) ) @@ -22048,6 +28200,13 @@ :method-count-assert 31 :size-assert #x194 :flag-assert #x1f01300194 + (:methods + (init-from-entity! :override-doc + "Read eco-info from the source entity, change this process to the matching concrete pickup +type, and dispatch that type's entity initializer.") + (animate :override-doc + "Spawn the idle eco particles at the collision sphere, update the optional ambient sound, +and leave joint animation unchanged.")) ) (deftype eco-yellow (eco) @@ -22056,6 +28215,9 @@ :method-count-assert 31 :size-assert #x194 :flag-assert #x1f01300194 + (:methods + (init-from-entity! :override-doc + "Initialize a yellow-eco pickup at the source entity using the standard single-eco amount.")) ) (deftype eco-red (eco) @@ -22064,6 +28226,9 @@ :method-count-assert 31 :size-assert #x194 :flag-assert #x1f01300194 + (:methods + (init-from-entity! :override-doc + "Initialize a red-eco pickup at the source entity using the standard single-eco amount.")) ) (deftype eco-blue (eco) @@ -22072,6 +28237,9 @@ :method-count-assert 31 :size-assert #x194 :flag-assert #x1f01300194 + (:methods + (init-from-entity! :override-doc + "Initialize a blue-eco pickup at the source entity using the standard single-eco amount.")) ) (deftype health (eco-collectable) @@ -22080,6 +28248,12 @@ :method-count-assert 31 :size-assert #x194 :flag-assert #x1f01300194 + (:methods + (init-from-entity! :override-doc + "Initialize a green-health pickup at the source entity using the standard health amount.") + (animate :override-doc + "Spawn the idle health particles at the collision sphere and update the optional ambient +sound.")) ) (deftype eco-pill (eco-collectable) @@ -22088,6 +28262,18 @@ :method-count-assert 31 :size-assert #x194 :flag-assert #x1f01300194 + (:methods + (initialize :override-doc + "Count this live pill, allocate its enlarged blue-eco collision sphere and fact information, +and prepare it for shared eco initialization.") + (init-from-entity! :override-doc + "Initialize a small green-health pill at the source entity using the standard pill amount.") + (deactivate :override-doc + "Remove this pill from the live-pill count, then perform ordinary eco-collectable +deactivation.") + (animate :override-doc + "Spawn the idle pill particles at the collision sphere and update the optional ambient +sound.")) ) (deftype money (eco-collectable) @@ -22096,6 +28282,18 @@ :method-count-assert 31 :size-assert #x194 :flag-assert #x1f01300194 + (:methods + (initialize :override-doc + "Allocate the money collision shape, skeleton, fact information, and optional PC starburst +particles; connect entity-backed money to the navigation mesh.") + (init-from-entity! :override-doc + "Initialize entity-backed money at its authored transform and enter the wait state.") + (deactivate :override-doc + "Mark money killed during pickup as dead before performing ordinary eco-collectable +deactivation.") + (run-logic? :override-doc + "Keep updating money while unpaused, nearby and recently drawn, changing skeleton channels, +or explicitly requesting skeleton updates.")) ) (deftype fuel-cell (eco-collectable) @@ -22106,6 +28304,13 @@ :method-count-assert 31 :size-assert #x19c :flag-assert #x1f0130019c + (:methods + (initialize :override-doc + "Allocate the fuel-cell collision shape, skeleton, idle particles and sound, and choose its +victory animation.") + (init-from-entity! :override-doc + "Initialize an entity-backed fuel cell at its authored transform, disable immediate +collection, and enter the wait state.")) (:states (fuel-cell-clone-anim handle) (fuel-cell-spline-slider handle float float)) @@ -22118,6 +28323,16 @@ :method-count-assert 31 :size-assert #x198 :flag-assert #x1f01300198 + (:methods + (initialize :override-doc + "Allocate the buzzer collision shape, skeleton, wing particles and sound, and choose the +victory animation used by the reward fuel cell.") + (init-from-entity! :override-doc + "Initialize an entity-backed buzzer. Completed buzzers wait for contact; incomplete buzzers +enter pickup immediately to present their task.") + (animate :override-doc + "Spin and animate the buzzer, orient and launch its wing particles from joint 15, update its +sound, and keep the selected victory animation spooled once six buzzers have been collected.")) ) (declare-type vent process-drawable) @@ -22150,7 +28365,11 @@ :size-assert #xd8 :flag-assert #x15007000d8 (:methods - (initialize (_type_ entity-actor pickup-type) none) ;; 20 + (initialize + "Initialize an eco vent at the source entity. Configure its collision volume, active +particles, collection effects, ambient sound, and optional blocker or animated valve, then enter +blocked or wait-for-touch." + (_type_ entity-actor pickup-type) none) ;; 20 ) (:states vent-blocked @@ -22165,6 +28384,9 @@ :method-count-assert 21 :size-assert #xd8 :flag-assert #x15007000d8 + (:methods + (init-from-entity! :override-doc + "Initialize a yellow-eco vent from the source entity.")) ) (deftype ventred (vent) @@ -22173,6 +28395,9 @@ :method-count-assert 21 :size-assert #xd8 :flag-assert #x15007000d8 + (:methods + (init-from-entity! :override-doc + "Initialize a red-eco vent from the source entity.")) ) (deftype ventblue (vent) @@ -22181,6 +28406,9 @@ :method-count-assert 21 :size-assert #xd8 :flag-assert #x15007000d8 + (:methods + (init-from-entity! :override-doc + "Initialize a blue-eco vent from the source entity.")) ) (deftype ecovent (vent) @@ -22189,25 +28417,79 @@ :method-count-assert 21 :size-assert #xd8 :flag-assert #x15007000d8 + (:methods + (init-from-entity! :override-doc + "Initialize the generic eco-vent entity as a blue-eco vent.")) ) ;; - Functions -(define-extern vent-standard-event-handler (function process int symbol event-message-block object :behavior vent)) -(define-extern ecovalve-init-by-other (function (function vent symbol) none :behavior ecovalve)) -(define-extern birth-pickup-at-point (function vector pickup-type float symbol process-tree fact-info (pointer process) :behavior process)) -(define-extern fuel-cell-pick-anim (function process-drawable spool-anim)) -(define-extern othercam-init-by-other (function process-taskable symbol symbol symbol none :behavior othercam)) -(define-extern fuel-cell-animate (function none :behavior fuel-cell)) -(define-extern add-blue-motion (function symbol symbol symbol symbol symbol :behavior eco-collectable)) -(define-extern check-blue-suck (function process-drawable none :behavior eco-collectable)) -(define-extern initialize-eco-by-other (function vector vector fact-info none :behavior eco)) -(define-extern add-blue-shake (function vector vector vector vector)) -(define-extern money-init-by-other (function vector vector fact-info entity-actor none :behavior money)) -(define-extern money-init-by-other-no-bob (function vector vector fact-info float entity-actor none :behavior money)) -(define-extern fuel-cell-init-by-other (function vector vector fact-info entity-actor none :behavior fuel-cell)) -(define-extern fuel-cell-init-as-clone (function handle int none :behavior fuel-cell)) -(define-extern buzzer-init-by-other (function vector vector fact-info entity-actor none :behavior buzzer)) +(define-extern vent-standard-event-handler + "Handle shared vent control messages. show-particles updates visible particle emission, and hide +installs an always-blocked predicate before entering vent-blocked." + (function process int symbol event-message-block object :behavior vent)) +(define-extern ecovalve-init-by-other + "Initialize the animated valve attached to a vent. Build its solid moving mesh, copy block-fn, +place the valve at its open or lowered offset, and enter its tracking state." + (function (function vent symbol) none :behavior ecovalve)) +(define-extern birth-pickup-at-point + "Spawn amount pickups of kind from the dead pickup pool at position. Copy source options when +pickup-info is supplied, use its pickup-radius resource when available, and optionally distribute +launch velocities radially. Fuel cells and buzzers spawn once and carry the full amount. Return the +last spawned process pointer, or false when allocation fails." + (function vector pickup-type float symbol process-tree fact-info (pointer process) :behavior process)) +(define-extern fuel-cell-pick-anim + "Choose a fuel-cell victory animation from the pickup entity's XZ position. Skip variations +masked by movie-mask; racer and flut target actions select their dedicated animations." + (function process-drawable spool-anim)) +(define-extern othercam-init-by-other + "Attach this camera process to cam-joint-index on owner. Configure movie masking, whether the +camera survives the animation ending, and normal, spooling, or logo behavior before entering +othercam-running." + (function process-taskable symbol symbol symbol none :behavior othercam)) +(define-extern fuel-cell-animate + "Keep the selected victory animation spooled, update visible idle particles and ambient sound at +the collision shape, and apply the fuel cell's half diffuse, half emissive color." + (function none :behavior fuel-cell)) +(define-extern add-blue-motion + "Update this pickup's attraction toward its saved target. Optional distance gating enters the +suck phase inside suck-suck-dist or returns to wait beyond suck-bounce-dist. The suck phase +accelerates inward while orbiting and bobbing; shake-and-glow? adds the near-target effects, and +stop-near-target? returns true within 8192 world units." + (function symbol symbol symbol symbol symbol :behavior eco-collectable)) +(define-extern check-blue-suck + "Set suck when candidate has a drawable collision shape whose root sphere is within +suck-suck-dist of this pickup." + (function process-drawable none :behavior eco-collectable)) +(define-extern initialize-eco-by-other + "Initialize a pooled eco pickup at position with velocity and values copied from pickup-info. +Carry its options, configure elemental effects and collection timing, then enter blocked or wait." + (function vector vector fact-info none :behavior eco)) +(define-extern add-blue-shake + "Add independent random XYZ shake to position. Shake is strongest at suck-suck-dist and falls to +zero at suck-bounce-dist." + (function vector vector vector vector)) +(define-extern money-init-by-other + "Initialize pooled money at position with velocity and values copied from pickup-info. Preserve +its source entity and options, enable parent notification, and enter wait with normal bobbing." + (function vector vector fact-info entity-actor none :behavior money)) +(define-extern money-init-by-other-no-bob + "Initialize pooled money at position with velocity, explicit kind and amount, and source entity. +Disable bobbing and blue-eco attraction, enable parent notification, and enter wait." + (function vector vector pickup-type float entity-actor none :behavior money)) +(define-extern fuel-cell-init-by-other + "Initialize a pooled fuel cell at position with velocity and values copied from pickup-info. +Preserve its source entity and options, disable immediate collection, and use an authored or debug +movie position for the optional jump before entering wait." + (function vector vector fact-info entity-actor none :behavior fuel-cell)) +(define-extern fuel-cell-init-as-clone + "Initialize a fuel cell cloned from source-handle, set its pickup amount, disable pause handling, +play the prize sound, and enter fuel-cell-clone-anim." + (function handle int none :behavior fuel-cell)) +(define-extern buzzer-init-by-other + "Initialize a pooled buzzer at position with velocity and values copied from pickup-info. +Preserve its source entity and options, enable parent notification, and enter wait." + (function vector vector fact-info entity-actor none :behavior buzzer)) ;; - Symbols @@ -22227,10 +28509,19 @@ ;; - Functions -(define-extern task-status->string (function task-status string)) -(define-extern open-specific-task! (function game-task task-status game-task)) -(define-extern task-exists? (function game-task task-status symbol)) -(define-extern sages-kidnapped? (function symbol)) +(define-extern task-status->string + "Return status's task-status name, or *unknown* for an unrecognized value." + (function task-status string)) +(define-extern open-specific-task! + "Open the stage matching task and status, then select and return the first available task in that +control. Report an error and return game-task.none when no matching stage exists." + (function game-task task-status game-task)) +(define-extern task-exists? + "Return whether a stage matching task and status exists in task's control." + (function game-task task-status symbol)) +(define-extern sages-kidnapped? + "Return whether the village4-button reward-speech stage is closed." + (function symbol)) ;; - Symbols @@ -22262,19 +28553,56 @@ ;; - Functions -(define-extern othercam-calc (function float none)) -(define-extern vector-for-ambient (function process-drawable vector vector)) -(define-extern hide-hud (function none)) -(define-extern hud-hidden? (function symbol)) -(define-extern process-taskable-clean-up-after-talking (function none :behavior process-taskable)) -(define-extern process-taskable-hide-exit (function symbol none :behavior process-taskable)) -(define-extern process-taskable-play-anim-code (function art-joint-anim basic object :behavior process-taskable)) ;; second arg can either be spool-anim or art-joint-anim -(define-extern process-taskable-play-anim-trans (function none :behavior process-taskable)) -(define-extern process-taskable-anim-loop (function none :behavior process-taskable)) -(define-extern process-taskable-play-anim-enter (function symbol :behavior process-taskable)) -(define-extern process-taskable-play-anim-exit (function none :behavior process-taskable)) -(define-extern process-taskable-hide-handler (function process int symbol event-message-block object :behavior process-taskable)) -(define-extern process-taskable-hide-enter (function int :behavior process-taskable)) +(define-extern othercam-calc + "Set the other camera's field of view from the authored camera joint's uniform scale using +2 * atan(14.941477 / (20.3 * joint-scale)). Larger joint scales therefore narrow the view." + (function float none)) +(define-extern vector-for-ambient + "Write the displacement from the target, or from the camera when no target exists, to speaker +into out-vector and return it." + (function process-drawable vector vector)) +(define-extern hide-hud + "Ask every active HUD entry to hide." + (function none)) +(define-extern hud-hidden? + "Return true when every HUD entry is absent or hidden." + (function symbol)) +(define-extern process-taskable-clean-up-after-talking + "Restore this character's visibility and animation initialization state, then remove the +conversation border and talking settings." + (function none :behavior process-taskable)) +(define-extern process-taskable-hide-exit + "Leave no-kill disabled when remaining hidden. Otherwise restore animation, collision, no-kill, +and shadow drawing as the character becomes active." + (function symbol none :behavior process-taskable)) +(define-extern process-taskable-play-anim-code + "Play animation for the current task interaction. Streamed animations coordinate target cloning, +movie audio levels, optional blending, and skip handling; resident joint animations seek to their +end while allowing debug cancellation. previous-animation supplies the blend source." + (function art-joint-anim basic object :behavior process-taskable)) ;; second arg can either be spool-anim or art-joint-anim +(define-extern process-taskable-play-anim-trans + "Keep the other camera active, hold the letterbox transition, and update this character's shadow +during task-animation playback." + (function none :behavior process-taskable)) +(define-extern process-taskable-anim-loop + "Blend to the character's current art element when needed, then loop it indefinitely and try +ambient chatter while the next state is idle." + (function none :behavior process-taskable)) +(define-extern process-taskable-play-anim-enter + "Prepare task-animation playback: initialize the cancellation query, enable animation blending, +spawn the joint camera, clear reward and playback flags, and suppress ambient speech." + (function symbol :behavior process-taskable)) +(define-extern process-taskable-play-anim-exit + "End task-animation playback by clearing blend state, stopping the joint camera, recording the +last-talk frame, and restoring the default shadow clipping planes." + (function none :behavior process-taskable)) +(define-extern process-taskable-hide-handler + "Handle clone, play-anim, and hidden-other messages while this character is hidden." + (function process int symbol event-message-block object :behavior process-taskable)) +(define-extern process-taskable-hide-enter + "Enter hidden mode by recording the state time, disabling shadow drawing, clearing conversation +settings and collision, selecting no animation channels, and finishing animation postprocessing." + (function int :behavior process-taskable)) ;; - Unknowns @@ -22288,7 +28616,10 @@ ;; - Functions -(define-extern pov-camera-play-and-reposition (function art-joint-anim vector float none :behavior pov-camera)) +(define-extern pov-camera-play-and-reposition + "Play animation at playback-rate. On the first frame within four frames of its end, teleport the +game camera to teleport-position so the following animated view begins from the authored location." + (function art-joint-anim vector float none :behavior pov-camera)) ;; ---------------------- @@ -22299,8 +28630,15 @@ ;; - Functions -(define-extern eco-blue-glow (function vector none)) -(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 + "Emit the blue-eco flash at position, with an independent fifty-percent chance of adding +lightning." + (function vector none)) +(define-extern cloud-track + "Call update-position each frame at a random drawable point. Remain on source for delay, blend +toward destination over transition-duration, then remain on destination for destination-duration. +A zero destination-duration leaves the tracker alive after the transition without further updates." + (function process-tree process-tree (function vector none) time-frame time-frame time-frame none :behavior process)) ;; ---------------------- @@ -22338,16 +28676,34 @@ :flag-assert #x1e00900100 ;; inherited inspect of process-drawable (:methods + (init-from-entity! :override-doc + "Initialize this crate from its entity resources, select and connect its art, then enter the +saved-dead or ordinary wait state.") (wait () _type_ :state) ;; 20 ;; state (die (symbol int) _type_ :state) ;; 21 (special-contents-die () _type_ :state) ;; 22 (bounce-on () _type_ :state) ;; 23 ;; state (notice-blue (handle) _type_ :state) ;; 24 - (params-init (_type_ entity) none) ;; 25 - (art-init (_type_) crate) ;; 26 - (params-set! (_type_ symbol symbol) none) ;; 27 - (check-dead (_type_) none) ;; 28 - (smush-update! (_type_) none) ;; 29 + (params-init + "Build the moving collision shape, pickup data, and entity-derived drawable state. Restore +collected pickup count, read crate-type into look and defense, and select crate-buzzer when the +pickup contents require it." + (_type_ entity) none) ;; 25 + (art-init + "Select the skeleton and base collision offense from look, apply any pickup-option offense +override, save the resting position, update the crate once, and connect it to the navigation mesh." + (_type_) crate) ;; 26 + (params-set! + "Replace look and defense when the corresponding optional symbol is non-false." + (_type_ symbol symbol) none) ;; 27 + (check-dead + "Enter the silent die state when this entity's saved crate marker is set; otherwise enter the +ordinary wait state." + (_type_) none) ;; 28 + (smush-update! + "Update the smush controller and scale the crate taller by its amplitude while narrowing X +and Z by half that amount." + (_type_) none) ;; 29 ) ) @@ -22357,6 +28713,11 @@ :heap-base #x90 :size-assert #x100 :flag-assert #x1e00900100 + (:methods + (params-init :override-doc + "Run the base crate parameter setup, then select barrel art while retaining the resolved +defense.") + ) ) (deftype bucket (crate) @@ -22365,6 +28726,11 @@ :heap-base #x90 :size-assert #x100 :flag-assert #x1e00900100 + (:methods + (params-init :override-doc + "Run the base crate parameter setup, then select bucket art while retaining the resolved +defense.") + ) ) (deftype crate-buzzer (crate) @@ -22373,6 +28739,11 @@ :heap-base #x90 :size-assert #x100 :flag-assert #x1e00900100 + (:methods + (art-init :override-doc + "Initialize the base crate art, then create the buzzer smoke launcher and ambient sound and +choose the streamed victory animation used after the sixth buzzer.") + ) ) (deftype pickup-spawner (crate) @@ -22382,13 +28753,29 @@ :heap-base #xa0 :size-assert #x104 :flag-assert #x1e00a00104 + (:methods + (params-init :override-doc + "Run the base crate parameter setup, hide the crate art, and resolve the optional alternate +actor that blocks a vent-controlled pickup spawner.") + (check-dead :override-doc + "Always enter the pickup-spawner wait state, regardless of the saved crate marker.") + ) ) ;; - Functions -(define-extern crate-post (function int :behavior crate)) -(define-extern crate-standard-event-handler (function process int symbol event-message-block object :behavior crate)) -(define-extern crate-init-by-other (function entity vector symbol none :behavior crate)) +(define-extern crate-post + "Update rider motion around the crate's smush deformation." + (function int :behavior crate)) +(define-extern crate-standard-event-handler + "Handle attacks, contact, bonks, wakeups, and blue-eco attraction. Break vulnerable crates, +reject attacks that do not meet iron or steel requirements, play contextual hints and impact +feedback, and enter notice-blue only while the crate is resting and eligible." + (function process int symbol event-message-block object :behavior crate)) +(define-extern crate-init-by-other + "Initialize a spawned crate from entity, place it at position, use crate-type for both its look +and defense, initialize its art, and enter its saved-dead or ordinary wait state." + (function entity vector symbol none :behavior crate)) ;; - Unknowns @@ -22409,8 +28796,13 @@ ;; - Functions -(define-extern send-hud-increment-event (function hud object)) -(define-extern hud-init-by-other (function int none :behavior hud)) +(define-extern send-hud-increment-event + "Send increment to hud-element only when it is configured for event-driven tallying." + (function hud object)) +(define-extern hud-init-by-other + "Reset a newly spawned HUD's common counts, timers, flags, masks, and offsets; let its subtype +create icons and particles from init-value; draw the initial hidden layout; and enter hud-hidden." + (function int none :behavior hud)) ;; - Symbols @@ -22432,6 +28824,13 @@ (deftype hud-pickups (hud) () + (:methods + (draw-hud :override-doc + "Draw the pickup particles, then print the displayed eco-pill count.") + (hud-update :override-doc + "Tally the displayed pickup count toward Jak's current eco-pill count.") + (init-particles! :override-doc + "Create the pickup icon particle, allocate its sprite matrix, and position its count text.")) :method-count-assert 27 :size-assert #x118 :heap-base #xb0 @@ -22441,6 +28840,16 @@ (deftype hud-health (hud) ((scale float :offset-assert 280) ) + (:methods + (draw-hud :override-doc + "Draw the three health-cell particles.") + (hud-update :override-doc + "Tally the displayed health and the time of the most recent health pickup.") + (init-particles! :override-doc + "Create and position the three health-cell particles and allocate their sprite matrices.") + (set-pos-and-scale :override-doc + "Select the health-cell positions and scale for widescreen and PAL output. The PC path + also adjusts horizontal placement when VIS is disabled.")) :method-count-assert 27 :size-assert #x11c :heap-base #xb0 @@ -22455,6 +28864,17 @@ (level-index int32 :offset-assert 296) (start-time time-frame :offset-assert 304) ) + (:methods + (draw-hud :override-doc + "Draw the all-orbs icon and count. When level-index is valid, also print that level's name.") + (hud-update :override-doc + "Rotate the orb icon and keep the summary visible for five seconds, then let it deactivate + after it finishes hiding.") + (init-particles! :override-doc + "Create the all-orbs icon and particle, total the level-task orb counts, select the requested + level when appropriate, hide the lower HUD, and start the five-second display.") + (set-pos-and-scale :override-doc + "Select the all-orbs icon position and nonuniform scale for widescreen and PAL output.")) :method-count-assert 27 :size-assert #x138 :heap-base #xd0 @@ -22466,6 +28886,24 @@ (y-scale float :offset-assert 284) (y-pos int32 :offset-assert 288) ) + (:methods + (draw-hud :override-doc + "Draw the orb HUD and its count. The PC collectable view can show the original unspent + count, the game-wide collected and available totals, or the current level's totals.") + (hud-update :override-doc + "Rotate the orb icon while unpaused and tally the displayed value toward Jak's money count.") + (init-particles! :override-doc + "Create the orb model and particle, allocate its sprite matrix, and position its count text.") + (set-pos-and-scale :override-doc + "Select the orb icon position and nonuniform scale for widescreen and PAL output.") + (get-icon-pos-x :override-doc + "Return the orb icon's screen X position for collectable flight.") + (get-icon-pos-y :override-doc + "Return the orb icon's screen Y position for collectable flight.") + (get-icon-scale-x :override-doc + "Return the orb collectable's destination X scale.") + (get-icon-scale-y :override-doc + "Return the orb collectable's destination Y scale.")) :method-count-assert 27 :size-assert #x124 :heap-base #xc0 @@ -22481,6 +28919,18 @@ (scale-center float :offset-assert 300) (icon-pos-y int32 :offset-assert 304) ) + (:methods + (draw-hud :override-doc + "Draw the power-cell HUD and its count. The PC collectable view can show the original + game-wide count, game-wide collected and available totals, or current-level task totals.") + (hud-update :override-doc + "Rotate the power-cell model, tally Jak's fuel count, and anchor the surrounding particles + to the model's center joint.") + (init-particles! :override-doc + "Create the power-cell model and surrounding particle group, allocate its sprite matrix, + and turn the model to face the camera.") + (set-pos-and-scale :override-doc + "Select the power-cell model, center, and starburst scales for widescreen and PAL output.")) :method-count-assert 27 :size-assert #x134 :heap-base #xd0 @@ -22491,6 +28941,24 @@ ((scale float :offset-assert 280) (text-y-offset int32 :offset-assert 284) ) + (:methods + (draw-hud :override-doc + "Draw the scout-fly particle and count. The PC collectable view can show the original + current-level count, game-wide totals, or current-level totals.") + (hud-update :override-doc + "Tally the displayed count toward Jak's current scout-fly count.") + (init-particles! :override-doc + "Create the scout-fly particle, allocate its sprite matrix, and position its count text.") + (set-pos-and-scale :override-doc + "Select the scout-fly particle scale and text offset for widescreen output.") + (get-icon-pos-x :override-doc + "Return the scout-fly icon's screen X position for collectable flight.") + (get-icon-pos-y :override-doc + "Return the scout-fly icon's screen Y position for collectable flight.") + (get-icon-scale-x :override-doc + "Return the scout-fly collectable's destination X scale.") + (get-icon-scale-y :override-doc + "Return the scout-fly collectable's destination Y scale.")) :method-count-assert 27 :size-assert #x120 :heap-base #xb0 @@ -22502,6 +28970,16 @@ (scale-backing float :offset-assert 284) (scale-blue float :offset-assert 288) ) + (:methods + (hud-update :override-doc + "Tally the eco meter toward the remaining pickup time, clamped between zero and the active + eco timeout.") + (init-particles! :override-doc + "Create the eco meter's backing, three-slice fill, and timer particles and allocate their + sprite matrices.") + (set-pos-and-scale :override-doc + "Select the eco meter scales for widescreen output. The PC path also adjusts horizontal + placement when VIS is disabled.")) :method-count-assert 27 :size-assert #x124 :heap-base #xc0 @@ -22510,21 +28988,54 @@ ;; - Functions -(define-extern calculate-rotation-and-color-for-slice (function int float int int int matrix none)) -(define-extern part-hud-health-01-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-health-02-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-health-03-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern fuel-cell-hud-orbit-callback (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern fuel-cell-hud-starburst-3-callback (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern fuel-cell-hud-starburst-4-callback (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern fuel-cell-hud-center-callback (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-buzzer-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-eco-timer-01-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-eco-timer-02-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-eco-timer-03-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-eco-timer-backing-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-eco-timer-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern show-hud (function none)) +(define-extern calculate-rotation-and-color-for-slice + "Rotate one of the eco meter's three fill slices to match fraction and write its RGB color. + Empty slices are moved out of view; the last fifth of the meter flashes by alternating green." + (function int float int int int matrix none)) +(define-extern part-hud-health-01-func + "Set the first health cell's scale and fade it when Jak has less than one health. At exactly one + health, flash its color to warn that the next hit is fatal." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-health-02-func + "Set the second health cell's scale and fade it when Jak has less than two health." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-health-03-func + "Set the third health cell's scale and fade it when Jak has less than three health." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern fuel-cell-hud-orbit-callback + "Place an orbit particle at the model joint selected by its user value, relative to the + power-cell center joint." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern fuel-cell-hud-starburst-3-callback + "Apply the third power-cell starburst's display-dependent X and Y scales." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern fuel-cell-hud-starburst-4-callback + "Apply the fourth power-cell starburst's display-dependent X and Y scales." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern fuel-cell-hud-center-callback + "Apply the display-dependent scale to the power-cell model and its center particle." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-buzzer-func + "Apply the display-dependent scale to the scout-fly HUD particle." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-eco-timer-01-func + "Color and rotate the first eco-meter fill slice for the active eco type and remaining time." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-eco-timer-02-func + "Color and rotate the second eco-meter fill slice for the active eco type and remaining time." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-eco-timer-03-func + "Color and rotate the third eco-meter fill slice for the active eco type and remaining time." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-eco-timer-backing-func + "Apply the display-dependent scale to the eco meter's backing particle." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-eco-timer-func + "Apply the display-dependent scale to the eco meter's timer particle." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern show-hud + "Show every active HUD entry when gameplay is active and the progress screen is absent or hidden." + (function none)) ;; - Unknowns @@ -22571,19 +29082,54 @@ ;; - Functions -(define-extern part-progress-hud-left-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-hud-right-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-hud-orb-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-hud-buzzer-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-hud-button-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-hud-tint-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-card-slot-01-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-card-slot-02-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-card-slot-03-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-card-slot-04-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-card-cell-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-progress-save-icon-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern fuel-cell-progress-hud-orbit-callback (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-hud-left-func + "Apply the current nonuniform scale to the progress screen's left side panel." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-hud-right-func + "Apply the current nonuniform scale to the progress screen's right side panel." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-hud-orb-func + "Scale the small orb icon against the horizontal side-panel scale so it retains its intended + proportions. The custom-aspect PC path leaves the port's existing sprite scale in place." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-hud-buzzer-func + "Scale the scout-fly icon against the horizontal side-panel scale so it retains its intended + proportions. The custom-aspect PC path leaves the port's existing sprite scale in place." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-hud-button-func + "Scale a progress navigation button against the horizontal side-panel scale so it retains its + intended proportions. The custom-aspect PC path leaves the port's existing sprite scale." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-hud-tint-func + "Fade the full-screen tint from the progress screen's slide position. On custom PC aspects, + widen it to cover the complete display." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-card-slot-01-func + "Highlight memory-card slot zero, apply the common slot height, and widen the card on custom + PC aspects." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-card-slot-02-func + "Highlight memory-card slot one, apply the common slot height, and widen the card on custom + PC aspects." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-card-slot-03-func + "Highlight memory-card slot two, apply the common slot height, and widen the card on custom + PC aspects." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-card-slot-04-func + "Highlight memory-card slot three, apply the common slot height, and widen the card on custom + PC aspects." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-card-cell-func + "Fade a memory-card file cell during the latter half of the inverted screen transition." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-progress-save-icon-func + "Shrink the save-status icon with the inverted screen-transition percentage." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern fuel-cell-progress-hud-orbit-callback + "Place one power-cell model particle at its selected model joint relative to the center joint. + Hide inactive particle-state entries offscreen; joint index three instead controls alpha." + (function sparticle-system sparticle-cpuinfo matrix none)) ;; ---------------------- @@ -22594,10 +29140,22 @@ ;; - Functions -(define-extern adjust-pos (function int int int)) -(define-extern draw-percent-bar (function int int float rgba none)) -(define-extern print-language-name (function int font-context int symbol font-context)) -(define-extern hide-progress-icons (function none)) +(define-extern adjust-pos + "Return the amount by which value exceeds threshold, clamped to zero. Progress-screen elements + use successive thresholds to stagger a shared transition." + (function int int int)) +(define-extern draw-percent-bar + "Draw a 255-by-14 translucent backing at x and y, then fill its inner 255-by-10 region by + fraction using color." + (function int int float rgba none)) +(define-extern print-language-name + "Draw language-index with horizontal offset and a linear distance fade. move-right? selects + the offset direction; restore the font position and default color afterward." + (function int font-context int symbol font-context)) +(define-extern hide-progress-icons + "Move every task, collectable, memory-card, button, and save-status particle offscreen, along + with the large orb icon." + (function none)) ;; ---------------------- @@ -22630,14 +29188,38 @@ ;; - Functions -(define-extern get-next-task-up (function int int int)) -(define-extern get-next-level-up (function int int)) -(define-extern get-next-level-down (function int int)) -(define-extern get-next-task-down (function int int int)) -(define-extern make-levels-with-tasks-available-to-progress (function none)) -(define-extern progress-init-by-other (function none :behavior progress)) -(define-extern init-game-options (function progress none)) -(define-extern make-current-level-available-to-progress (function none)) +(define-extern get-next-task-up + "Return the next known task after current-task-index in level-index, or the original index when + no later task is available. Cheat mode makes every task selectable." + (function int int int)) +(define-extern get-next-level-up + "Return the next opened level after level-index, or the original index when none is available." + (function int int)) +(define-extern get-next-level-down + "Return the previous opened level before level-index, or the original index when none is + available." + (function int int)) +(define-extern get-next-task-down + "Return the previous known task before current-task-index in level-index, or the original index + when no earlier task is available. Cheat mode makes every task selectable." + (function int int int)) +(define-extern make-levels-with-tasks-available-to-progress + "Expose progress-screen entries from known tasks. Demos open Misty Island and cheat mode opens + each outer level. In normal play the shipped code reads and writes level-opened at the inner + task index, not the outer level index, when a non-scout-fly task becomes known." + (function none)) +(define-extern progress-init-by-other + "Initialize the progress process, its screen stack, particles, model icons, particle-state + slots, icon orientations, aspect ratios, and initial waiting state." + (function none :behavior progress)) +(define-extern init-game-options + "Build the progress-screen option-table mapping for the current build, territory, boot mode, + and title entry point, then connect each option to the setting value it edits." + (function progress none)) +(define-extern make-current-level-available-to-progress + "Open the target's current border level in the progress screen when its remap index is valid. + Normal play opens any such level; demos only open Misty Island." + (function none)) ;; - Unknowns @@ -22654,9 +29236,22 @@ ;; - Functions -(define-extern set-credits-font-color (function float none)) -(define-extern draw-title-credits (function float none)) -(define-extern draw-end-credits (function int symbol)) +(define-extern set-credits-font-color + "Set the RGB channels of all four variants in credits color slot 32. Each channel is 64 times + brightness, clamped to a minimum of 128; the alpha channels are unchanged." + (function float none)) +(define-extern draw-title-credits + "Draw the opening title credits for a normalized time from 0 to 1. The timeline advances through + three-line cards: each card waits, fades in, holds at half opacity, and fades out. Per-line scale + and spacing come from the title-credit tables, with territory-specific company text on the first + card." + (function float none)) +(define-extern draw-end-credits + "Scroll the end-credit text upward by the given pixel offset. Lines above the screen are measured + without drawing, visible lines are drawn through the bottom edge, and missing text entries take + 25 pixels. Returns true after the final text ID; on PC the credits use the current audio language + and restore automatic level-text loading when finished." + (function int symbol)) ;; - Symbols @@ -22676,7 +29271,7 @@ ((point vector :inline :offset-assert 0) (best-point vector :inline :offset-assert 16) (match-handle handle :offset-assert 32) - (match projectile :offset-assert 40) + (match process-drawable :offset-assert 40) (best float :offset-assert 44) (radius float :offset-assert 48) (rating uint32 :offset-assert 52) @@ -22692,11 +29287,39 @@ ;; - Functions -(define-extern projectile-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags)) -(define-extern projectile-update-velocity-space-wars (function projectile none)) -(define-extern find-nearest-attackable (function vector float uint uint vector float projectile)) ;; Whatever te search returns (match from search-info) -(define-extern find-ground-and-draw-shadow (function vector vector float collide-kind process-drawable float float none)) -(define-extern spawn-projectile-blue (function target none)) +(define-extern projectile-collision-reaction + "Move a projectile to its earliest collision, send its process a die event on stopproj materials, + classify the contact, and reflect its incoming velocity above the surface. Store the reflected + velocity in vel-out and return the collide-status bits produced by the contact." + (function collide-shape-moving collide-shape-intersect vector vector collide-status)) +(define-extern projectile-update-velocity-space-wars + "Steer this toward its target point while preserving its current speed, flattening the target + offset along a contacted surface. Add the target offset and gravity, cap the result at max-speed, + and apply the option which forces a fixed downward Y velocity. Dissipate when an invalid target + lies behind the current direction." + (function projectile none)) +(define-extern find-nearest-attackable + "Find the nearest attackable drawable whose bounding-sphere surface is inside search-radius and + the cone around forward-direction. Candidate rating bit 0 means enemy and bit 1 means drawn; + rating-mask selects the compared bits and required-rating may require one. A candidate replaces + the current match only when its masked rating is at least as high and its surface is closer; + therefore a farther higher-rated candidate does not displace an earlier closer match. An + angle-range of 65536 disables the cone test." + (function vector float uint uint vector float process-drawable)) +(define-extern find-ground-and-draw-shadow + "Probe straight down for the surface under pos and queue a fake shadow on it. The probe starts + probe-y-offset above pos, reaches probe-length, considers only collide-with surfaces, and skips + ignore-proc's own primitives along with anything marked noentity. + radius sizes the shadow sprite; pass 0 to probe without drawing anything, which is what a caster + that already has a real projected shadow wants. probe-length doubles as the height over which the + sprite fades out. + ground-pos, when it is not #f, receives the contact point. It is left alone on a water bottom, so + a caster over water keeps the reference point it already had, and it is placed at the bottom of + the probe range when nothing was hit at all." (function vector vector float collide-kind process-drawable float float none)) +(define-extern spawn-projectile-blue + "Spawn a blue projectile from a random drawable joint on target-actor with a random velocity. + Leave without spawning when target-actor is false or the projectile pool is exhausted." + (function target none)) ;; - Unknowns @@ -22711,20 +29334,37 @@ ;; - Functions -(define-extern ocean-interp-wave (function ocean-wave-info uint none)) ;; unconfirmed -(define-extern ocean-generate-verts (function (inline-array vector) ocean-wave-info none)) ;; unconfirmed - pointer is *ocean-verts* -(define-extern draw-ocean-texture (function dma-buffer (inline-array vector) symbol none)) ;; unconfirmed - pointer is *ocean-verts* -(define-extern ocean-init-buffer (function dma-buffer pointer)) -(define-extern draw-ocean-far (function dma-buffer profile-frame)) -(define-extern draw-ocean-mid (function dma-buffer none)) ; not confirmed -(define-extern ocean-end-buffer (function dma-buffer pointer)) -(define-extern draw-ocean-near (function dma-buffer none)) -(define-extern init-ocean-far-regs (function none)) -(define-extern render-ocean-far (function dma-buffer int none)) -(define-extern render-ocean-quad (function (inline-array ocean-vertex) dma-buffer symbol)) +(define-extern ocean-interp-wave + "Build this frame's 32x32 height field from the 64-frame wave animation. The second argument is the phase in 1/32 frame steps: bits 5 and up choose the frame, wrapping modulo 64, and the low five bits give the weight toward the following frame. The two weights are published in (-> *ocean-work* interp) x and y with a 1/3 amplitude scale folded into both. The destination is the 4 KiB *ocean-heights* block." (function ocean-wave-info uint none)) ;; unconfirmed +(define-extern ocean-generate-verts + "Turn the height field into the 1024 pairs the near grid draws: one wave-displaced position followed by the vertex color the ocean-vu0-block microprogram computes from the surface normal and the uploaded lights. The three light colors and the ambient are scaled by *ocean-generate-verts-vector* before the upload, so the lighting the near grid sees is not the same as the rest of the scene's." (function (inline-array vector) ocean-wave-info none)) ;; unconfirmed - pointer is *ocean-verts* +(define-extern draw-ocean-texture + "Render the wave lattice in verts into the 128x128 ocean texture at *ocean-base-page*. verts is *ocean-verts*, the buffer ocean-generate-verts filled earlier this frame; it is read by reference, so it must outlive the DMA chain. build-mips? asks for the coarse levels to be produced as well, which only the mid pass needs. The chain sets the render target, uploads the microprogram, the constants and the environment-map shader, then pushes eleven batches of three vertex rows with a microprogram call after each. Entry point 0 primes the row buffers and emits two strips, entry 2 emits three, and entry 4 flushes the last packet, which comes to the 32 strips that fill the page. Called twice per frame by draw-ocean: the ocean's VRAM is shared with the eye renderer, so the page has to be rebuilt in each bucket that samples it." (function dma-buffer (inline-array vector) symbol none)) ;; unconfirmed - pointer is *ocean-verts* +(define-extern ocean-init-buffer + "Set the GS state shared by the far and mid passes: alpha test and depth test always pass, an ordinary source-alpha blend, and the six-level 128-by-128 ocean texture. The mip chain sits immediately after the base image in the special VRAM region, so its block addresses are computed from *ocean-base-page* rather than stored anywhere. TEXA's ta0 is raised to 128 for the run of ocean drawing; ocean-end-buffer puts it back. Returns the advanced buffer cursor." (function dma-buffer pointer)) +(define-extern draw-ocean-far + "Build the far-ocean DIRECT packet. One qword is reserved for the DMA/VIF tag, the skirt and corner quads are emitted for the current *ocean-facing* quadrant, the large-polygon stream is terminated, and the reserved tag is then backfilled with the qword count actually produced." (function dma-buffer profile-frame)) +(define-extern draw-ocean-mid + "Main function to draw the 'mid' ocean + The mid ocean is used to draw the non-transparent ocean parts. + There is a large 6x6 grid of tiles. + Tiles that are closer to the camera have an environment mapping effect applied. + Each tile is an 8x8 patch of the 48x48 grid of 96-meter cells. A tile whose bounding sphere comes within OCEAN-MID-ENV-DISTANCE of the camera is drawn twice, once textured and once through the environment map, which is why it reports twice the triangles. A negative authored index means the tile has no mid geometry. When the camera is near the water surface this also runs the transition and seam passes, which share this file's microprogram and constants." (function dma-buffer none)) ; not confirmed +(define-extern ocean-end-buffer + "Undo ocean-init-buffer's TEXA override so later renderers get the usual expansion, where a texture alpha bit of 0 means fully transparent. Returns the advanced buffer cursor." (function dma-buffer pointer)) +(define-extern draw-ocean-near + "Build the near-grid DMA chain in dma-buf: the depth and alpha test for the pass, the microprogram, this frame's constants and wave field, then one per-cell upload and microprogram call for every visible near cell. Cells are visited in the 4x4 mid-cell window ocean-transition selected, and a cell is drawn only when its transition camera-mask bit is set and the map gives it both a near index and a mask, so an authored coastline leaves the water out entirely rather than drawing it under the land. The caller closes the chain and inserts the bucket tag." (function dma-buffer none)) +(define-extern init-ocean-far-regs + "Latch the persistent VU0 state the far-ocean quads run on: the combined camera matrix, the homogeneous scale pair and the hvdf offset go into VU0 registers, the camera's current pfog0 and fog clamp range are published through (-> *sky-tng-data* fog), and the ocean GIF tag prepared by init-sky-tng-data is picked up. Must run after the camera update and before the frame's first render-ocean-quad." (function none)) +(define-extern render-ocean-far + "Append the far ocean: one (meters 1440) skirt strip outside each edge of the 48-by-48 map plus the four corner quads that close them. facing carries OCEAN_FAR_EDGE_* bits naming the edges to leave out, so the skirt behind the camera and the two corners touching it are never built. Skirt vertices carry pos.w of 0.0 instead of 1.0, which drops the translation row out of the combined camera matrix and turns them into homogeneous points at infinity along their own world direction; the surface sits within a few meters of y = 0, so that direction is nearly horizontal and those vertices project onto the horizon. Each strip walks along its edge and stops once render-ocean-quad has accepted a quad and then rejects one." (function dma-buffer int none)) +(define-extern render-ocean-quad + "Transform four ocean-vertex records with the registers init-ocean-far-regs latched into the clipping scratchpad, then tail-call draw-large-polygon-ocean, which clips the fan against the guard hyperplanes, performs the perspective divide, clamps fog into the camera's range and appends the survivor to dma-buf. Returns #f when the quad was rejected outright." (function (inline-array ocean-vertex) dma-buffer symbol)) (define-extern draw-large-polygon-ocean (function none)) -(define-extern draw-ocean (function none)) -(define-extern update-ocean (function none)) +(define-extern draw-ocean + "Build this frame's ocean. The wave field and the displaced near-grid vertices are allocated out of the frame's global DMA buffer and regenerated from the current phase, the surface height is chosen from where the camera is, and then two chains are appended: the texture, far and mid passes go into the ocean-mid-and-far bucket, and the texture and near passes into ocean-near. The near chain is dropped when the camera is more than (meters 48) from the surface in y, since none of the fine grid would be visible. The three off switches are debug overrides and clear themselves at the end of every unpaused frame." (function none)) +(define-extern update-ocean + "Choose the ocean map and the camera-facing quadrant for this frame. Every active level gets a say: an explicit 'none stops the search and leaves no ocean, but only when the camera is inside that level's meta geometry and not inside its neighbor's, and any level naming a map wins, with later levels overriding earlier ones. Below (meters -100) the sunken variant replaces whatever was chosen, since that is the same water seen from underneath. *ocean-facing* is set from the dominant axis of the camera's forward vector and selects which far strip draw-ocean-far leaves out." (function none)) ;; - Symbols @@ -22755,14 +29395,22 @@ ;; - Functions -(define-extern ocean-texture-add-constants (function dma-buffer pointer)) -(define-extern ocean-texture-add-envmap (function dma-buffer pointer)) -(define-extern ocean-texture-add-verts (function dma-buffer (inline-array vector) pointer)) ;; pointer is *ocean-verts* -(define-extern ocean-texture-add-call-start (function dma-buffer none)) ;; unconfirmed -(define-extern ocean-texture-add-call-rest (function dma-buffer none)) ;; unconfirmed -(define-extern ocean-texture-add-verts-last (function dma-buffer (inline-array vector) (inline-array vector) pointer)) ;; pointer is *ocean-verts* and unconfirmed -(define-extern ocean-texture-add-call-done (function dma-buffer none)) ;; unconfirmed -(define-extern ocean-texture-setup-constants (function ocean-texture-constants none)) +(define-extern ocean-texture-add-constants + "Append the constant block: a seven-quadword VIF unpack to OCEAN-TEXTURE-VU1-CONSTANTS whose payload ocean-texture-setup-constants writes straight into the DMA buffer. Returns the buffer's new base, past the 112 bytes it filled." (function dma-buffer pointer)) +(define-extern ocean-texture-add-envmap + "Add DMA packet to set up the GS with the env map texture's ADGIF shader. The environment map is the alpha-modulated ocean envmap; the microprogram's ST output indexes it, so this has to reach the GS before the first strip. Returns the buffer's new base, past the 112 bytes of header plus shader." (function dma-buffer pointer)) +(define-extern ocean-texture-add-verts + "Append one full upload batch: OCEAN-TEXTURE-BATCH-QWC quadwords referenced in place from rows, unpacked to quadword 0 of the double-buffered VU1 input area. That is three rows of 32 vertices, colors and transposed normals interleaved. The data is sent by reference, so rows must stay valid until the DMA chain has run." (function dma-buffer (inline-array vector) pointer)) ;; pointer is *ocean-verts* +(define-extern ocean-texture-add-call-start + "Start the microprogram at its entry point 0, which primes the row buffers from the first batch and emits the first two strips. STMOD is cleared in the second VIF slot so the unpacks after it write absolute values." (function dma-buffer none)) ;; unconfirmed +(define-extern ocean-texture-add-call-rest + "Start the microprogram at entry point 2, the steady-state loop: consume one batch of three rows and emit three strips." (function dma-buffer none)) ;; unconfirmed +(define-extern ocean-texture-add-verts-last + "Append the final upload batch as two transfers: the last two rows of the lattice from rows, then a copy of wrap-row - row 0 - unpacked behind them at quadword 128. That copy is the 33rd row, so the last strip closes the page against the first row and the texture tiles seamlessly in both directions." (function dma-buffer (inline-array vector) (inline-array vector) pointer)) ;; pointer is *ocean-verts* and unconfirmed +(define-extern ocean-texture-add-call-done + "Start the microprogram at entry point 4, which kicks the last GIF packet still sitting in an output buffer and leaves VU1 idle." (function dma-buffer none)) ;; unconfirmed +(define-extern ocean-texture-setup-constants + "Fill consts, the seven-quadword block the ocean-texture VU1 program keeps at OCEAN-TEXTURE-VU1-CONSTANTS. giftag is the 66-vertex textured tri-strip that one strip of the page becomes. buffers and dests are the pairs of VU1 addresses the program alternates between: two 199-quadword output buffers and two 99-quadword row buffers, one row being 33 vertices of three quadwords. start is the origin of the destination grid with its constant depth in z, offsets the four- and sixteen-texel steps between vertices and rows, and constants the 0.5 scale and bias that turn a signed reflection direction into an environment-map coordinate. cam-nrm is the camera's forward axis, negated so it points from the surface toward the eye; it makes the whole texture view-dependent, which is why this has to be rebuilt every frame." (function ocean-texture-constants none)) ;; - Unknowns @@ -22778,25 +29426,44 @@ ;; - Functions -(define-extern ocean-mid-add-constants (function dma-buffer none)) -(define-extern ocean-mid-add-call (function dma-buffer int none)) -(define-extern ocean-mid-add-upload (function dma-buffer int int int int float symbol)) -(define-extern ocean-mid-add-call-flush (function dma-buffer uint none)) -(define-extern draw-ocean-transition (function dma-buffer none)) -(define-extern draw-ocean-mid-seams (function dma-buffer none)) -(define-extern ocean-seams-add-constants (function dma-buffer none)) -(define-extern ocean-mid-add-upload-top (function dma-buffer uint uint none)) -(define-extern ocean-mid-add-upload-bottom (function dma-buffer uint uint none)) -(define-extern ocean-mid-add-upload-middle (function dma-buffer uint uint none)) -(define-extern ocean-mid-camera-masks-bit? (function uint uint symbol)) -(define-extern ocean-mid-mask-ptrs-bit? (function uint uint symbol)) -(define-extern ocean-mid-add-upload-table (function dma-buffer uint uint (pointer float) int symbol none)) -(define-extern ocean-mid-camera-masks-set! (function uint uint symbol)) -(define-extern ocean-mid-add-matrices (function dma-buffer vector none)) ;; not verified -(define-extern ocean-mid-check (function pointer int int vector symbol)) -(define-extern ocean-matrix*! (function matrix matrix matrix matrix)) -(define-extern ocean-mid-setup-constants (function ocean-mid-constants none)) -(define-extern ocean-vector-matrix*! (function vector vector matrix vector)) +(define-extern ocean-mid-add-constants + "Append the DMA that loads the mid-ocean constants to VU1 data address OCEAN-MID-VU-CONSTANTS, generating the block in place in the buffer. Advances base past the block." (function dma-buffer none)) +(define-extern ocean-mid-add-call + "Append a tag that resets the unpack write cycle and starts the microprogram at entry. MSCALF waits for a microprogram that is already running, so consecutive calls cannot overlap." (function dma-buffer int none)) +(define-extern ocean-mid-add-upload + "Append the upload for one 8x8 block of the mid grid: the two matrices, the nine-by-twelve patch of corner colors, and the authored suppression mask. block-z and block-x run 0..5, block-index is 6 * block-z + block-x, and mask-index selects the ocean-mid-mask the map authored for the block. camera-dist is the distance from the camera to the block's bounding sphere surface; when it is under one cell diagonal the three-by-three cells around the camera are additionally tested with ocean-mid-check. Records the address of the mask words in mid-mask-ptrs so draw-ocean-mid-seams can OR the camera mask into this packet after it is built. Advances base past the packet." (function dma-buffer int int int int float symbol)) +(define-extern ocean-mid-add-call-flush + "Append a tag that starts the microprogram at entry and then stalls VIF1 until the microprogram, its transfers and every GIF path have drained. Used to close a pass before another pass rewrites the shared constants." (function dma-buffer uint none)) +(define-extern draw-ocean-transition + "Draw the 96 m cells nearest the camera as 24 m geometry and stitch them to their neighbours. Called from draw-ocean-mid once it has decided which mid cells are too close for the mid grid and published that region as mid-minx/maxx/minz/maxz. Four steps: record which near cells the near pass will draw (which also fixes the region draw-ocean-near scans); emit four strips of 24 m quads for every mid cell with an authored transition record; stitch the border of the near region; patch the strip masks so no quad is drawn twice. Leaves near-minx/maxx/minz/maxz and near-mask-indices ready for draw-ocean-near; when nothing is close enough the near bounds come out inverted and the near pass draws nothing." (function dma-buffer none)) +(define-extern draw-ocean-mid-seams + "Stitch the border of the region marked in mid-camera-masks so the 96-meter mid cells meet the finer transition and near geometry without cracks, then fold the camera masks into the block packets that were already built. mid-minx, mid-maxx, mid-minz and mid-maxz bound the region, and each cell is culled with its own 68-meter bounding sphere before any seam work." (function dma-buffer none)) +(define-extern ocean-seams-add-constants + "Put the four unit-cell corner positions back into the resident constants block. The transition pass leaves 24-meter corners there, so the mid seam pass has to restore the 96-meter cell corners before it uploads any weight table. Advances base past the four quadwords." (function dma-buffer none)) +(define-extern ocean-mid-add-upload-top + "Stitch cell (cell-z, cell-x) on the first row of the region the camera masks cover. When the cell is itself masked the block pass will not draw it, so the cells above and beside it get an edge fan facing in; otherwise the cell keeps its mid geometry and its own edges toward the region are subdivided. An edge is only subdivided when the neighbor across it exists, and a cell at mid-minx or mid-maxx needs its side edge as well, so both together need a corner table." (function dma-buffer uint uint none)) +(define-extern ocean-mid-add-upload-bottom + "Stitch cell (cell-z, cell-x) on the last row of the camera region. This is ocean-mid-add-upload-top mirrored in z: the neighbor outside the region is at cell-z plus one here, so the up tables replace the down tables." (function dma-buffer uint uint none)) +(define-extern ocean-mid-add-upload-middle + "Stitch cell (cell-z, cell-x) on a row between the first and the last of the camera region. Only the left and right columns of the region need work here; the rows above and below are handled by ocean-mid-add-upload-top and ocean-mid-add-upload-bottom." (function dma-buffer uint uint none)) +(define-extern ocean-mid-camera-masks-bit? + "True when cell (cell-z, cell-x) of the 48x48 grid is marked in mid-camera-masks, meaning the transition and near passes will redraw it. Coordinates outside the grid return #t so callers treat everything beyond the grid as already handled." (function uint uint symbol)) +(define-extern ocean-mid-mask-ptrs-bit? + "True when cell (cell-z, cell-x) is suppressed by the mask its block already uploaded this frame. Coordinates outside the grid, and blocks that uploaded nothing, return #t." (function uint uint symbol)) +(define-extern ocean-mid-add-upload-table + "Append one stitching patch for cell (cell-z, cell-x) of the 48x48 grid and start the microprogram on it. weights is vertex-count quadwords of bilinear weights over the cell's four corners, from the tables in ocean-trans-tables; fan? selects the triangle-fan entry point, otherwise the triangle-strip entry point. Does nothing when ocean-mid-camera-masks-set! rejects the cell, which is also what keeps a cell from being stitched twice. Besides the two matrices, the packet carries the vertex count, the unit-square texture coordinates and the cell's four corner colors widened from 8-bit RGBA to floats." (function dma-buffer uint uint (pointer float) int symbol none)) +(define-extern ocean-mid-camera-masks-set! + "Mark cell (cell-z, cell-x) in mid-camera-masks and return #t, or return #f when the cell is outside the grid or its block's uploaded mask already suppresses it. The uploaded mask is read through mid-mask-ptrs without a null check, so the caller has to know the block uploaded one." (function uint uint symbol)) +(define-extern ocean-mid-add-matrices + "Append the OCEAN-MID-MATRICES-QWC matrix quadwords that open a mid-ocean upload: the camera rotation with origin transformed into camera space substituted into its translation row, then that matrix times the perspective matrix. origin is the world position of the block or cell corner the geometry that follows is relative to. Advances base past the matrices." (function dma-buffer vector none)) ;; not verified +(define-extern ocean-mid-check + "Mark cell (cell-x, cell-z) of one block in camera-mask when any of its four corners is within one cell diagonal of the camera. camera-mask is the eight-byte mid-camera-masks entry for that block; cell-x and cell-z run 0..7 inside the block and select the bit and the byte. block-origin is the world position of the block's first corner. The return value is not meaningful -- the fall-through path leaves the return register unset -- so callers use this only for its effect on the mask." (function pointer int int vector symbol)) +(define-extern ocean-matrix*! + "Set dst to left * right and return dst. All four result rows are computed before the first store, so dst may alias either input." (function matrix matrix matrix matrix)) +(define-extern ocean-mid-setup-constants + "Build the resident VU1 constants for the mid ocean in place at dst, which must be OCEAN-MID-CONSTANTS-QWC quadwords of DMA buffer. Copies this frame's camera transform, fog range and sun environment color, then fills in the GIF tags and ADGIF shaders for the textured and environment passes, the per-row index table, and the four corner positions of a unit cell. *ocean-subdivide-draw-mode* selects the primitive: 0 is normal textured rendering, 1 draws a wireframe and 2 draws untextured Gouraud shading." (function ocean-mid-constants none)) +(define-extern ocean-vector-matrix*! + "Transform src by mat with an implied w of 1.0, so mat's translation row is added, and return dst. src.w is ignored and dst.w receives the fourth column of the product." (function vector vector matrix vector)) ;; - Unknowns @@ -22811,16 +29478,26 @@ ;; - Functions -(define-extern ocean-make-trans-camera-masks (function uint uint uint uint symbol)) -(define-extern ocean-trans-add-upload-strip (function dma-buffer uint uint uint uint uint none)) -(define-extern ocean-trans-add-constants (function dma-buffer pointer)) -(define-extern draw-ocean-transition-seams (function dma-buffer symbol)) -(define-extern ocean-trans-camera-masks-bit? (function uint uint symbol)) -(define-extern ocean-trans-add-upload (function dma-buffer int int none)) -(define-extern ocean-trans-mask-ptrs-bit? (function int int symbol)) -(define-extern ocean-trans-add-upload-table (function dma-buffer int int (pointer float) int symbol none)) -(define-extern ocean-transition-check (function ocean-trans-mask int int vector symbol)) -(define-extern ocean-trans-mask-ptrs-set! (function int int symbol)) +(define-extern ocean-make-trans-camera-masks + "Build the camera mask for mid cell (mid-z, mid-x), whose slot in the 4x4 window is (window-z, window-x). Each of the cell's sixteen near cells is tested against the camera and the close ones are handed to the near pass. Always returns #f." (function uint uint uint uint symbol)) +(define-extern ocean-trans-add-upload-strip + "Emit one row of transition geometry for mid cell (mid-z, mid-x): four 24 m quads out of the cell's 4x4 block. strip-index selects both the row and its ten vertex weights in *ocean-trans-strip-array*. strip-mask is the authored suppression mask for that row, bit q clearing quad q. window-index is the cell's slot in the 4x4 window and is used only to record the uploaded header in trans-mask-ptrs so the mask can still be changed afterwards. The header quadword is (10, strip-mask, 0, 0) followed by the mid cell's four corner texture coordinates and colors; the ten weight vectors go to VU address 17. A strip-mask of 255 has no water in it and the caller must not call this." (function dma-buffer uint uint uint uint uint none)) +(define-extern ocean-trans-add-constants + "Replace the four corner positions the ocean-mid program keeps at VU address 765 with the corners of a 24 m near cell, so the seam patches that follow evaluate their weight lists at near-grid spacing. ocean-mid-setup-constants installs the 96 m corners and ocean-seams-add-constants puts them back. Returns the new buffer cursor." (function dma-buffer pointer)) +(define-extern draw-ocean-transition-seams + "Emit the seam patches around the border of the near region, then hand the near cells they cover over from the transition strips. The border is the near-min/near-max box, which draw-ocean-transition already widened by one cell in each direction. Claimed cells accumulate in trans-temp-masks and are merged into the strip headers at the end, once no further patch can be emitted. Always returns #f." (function dma-buffer symbol)) +(define-extern ocean-trans-camera-masks-bit? + "True when near cell (near-z, near-x) is claimed by the near pass, meaning neither the mid grid nor the transition strips may cover it. Coordinates are cells of the 192x192 near grid. Cells outside the 4x4 mid-cell window anchored at (mid-minz, mid-minx) have no mask and read as #f." (function uint uint symbol)) +(define-extern ocean-trans-add-upload + "Stitch near cell (near-z, near-x), which a transition strip covers, to whichever of its four neighbours the near pass has taken over. Up and down are -z and +z, left and right are -x and +x, matching the names of the stitch tables. A neighbour the authored mask suppresses has no geometry to match, so that edge needs no stitching; when both edges of a corner case fall away the cell is left to its strip. Only the four single-edge and four adjacent-edge cases are handled: a cell with near neighbours on opposite sides, or on three or more sides, is left alone." (function dma-buffer int int none)) +(define-extern ocean-trans-mask-ptrs-bit? + "True when the transition strip covering near cell (near-z, near-x) already suppresses it. Until draw-ocean-transition-seams merges the camera masks that is exactly the authored land mask, so callers use this to ask whether a neighbouring near cell has water in it. #f when the containing mid cell has no strip at all, and #f outside the window." (function int int symbol)) +(define-extern ocean-trans-add-upload-table + "Emit one seam patch covering near cell (near-z, near-x), a 24 m cell of the 192x192 grid. weights is one of the *ocean-trans-*-table* arrays and holds vert-count vertices, each four bilinear weights over the cell's corners; vert-count is 11 for the four single-edge tables and 18 for the four corner tables. fan-list? picks the VU1 entry matching the order that table was authored in. Does nothing unless ocean-trans-mask-ptrs-set! can claim the cell. Appends the cell transform, nine quadwords to VU address 8 (vertex count, then the cell's four corner texture coordinates and four corner colors), the weight list to address 17, and the draw call. Texture coordinates and colors are bilinear blends of the enclosing mid cell's corner values using the same weights the neighbouring passes use." (function dma-buffer int int (pointer float) int symbol none)) +(define-extern ocean-transition-check + "Test the near cell at (sub-z, sub-x) inside the mid cell whose world corner is cell-corner, both indices 0..3. If any of the near cell's four corners is within one near-cell diagonal of the camera, set bit sub-x of cell-mask row sub-z to hand the cell to the near pass and return early. Comparisons are on squared distances against 19327350000.0. The return value is meaningless and every caller ignores it." (function ocean-trans-mask int int vector symbol)) +(define-extern ocean-trans-mask-ptrs-set! + "Claim near cell (near-z, near-x) for a seam patch. Returns #f when the cell has no strip or its strip already suppresses it, in which case the caller must not emit geometry. Otherwise records the cell in trans-temp-masks, so draw-ocean-transition-seams takes it away from the strip once no further patch can be emitted, and returns #t." (function int int symbol)) ;; ---------------------- @@ -22831,13 +29508,20 @@ ;; - Functions -(define-extern ocean-near-add-constants (function dma-buffer none)) -(define-extern ocean-near-add-heights (function dma-buffer none)) -(define-extern ocean-near-add-call (function dma-buffer int none)) -(define-extern ocean-near-add-upload (function dma-buffer uint uint none)) -(define-extern ocean-near-add-matrices (function dma-buffer vector none)) -(define-extern ocean-near-setup-constants (function ocean-near-constants none)) -(define-extern ocean-near-add-call-flush (function dma-buffer int none)) +(define-extern ocean-near-add-constants + "Append the once-per-frame near-grid constant block: one 36-quadword VIF unpack to OCEAN-NEAR-VU1-CONSTANTS whose payload ocean-near-setup-constants writes straight into the DMA buffer, then advance past the 576 bytes it filled." (function dma-buffer none)) +(define-extern ocean-near-add-heights + "Append the wave-height field: the 32x32 floats that ocean-interp-wave left in *ocean-heights* earlier this frame, sent by reference as two 2 KiB transfers that land back to back starting at OCEAN-NEAR-VU1-HEIGHTS-0. The samples are three metres apart, so one near cell covers 8x8 of them and the field repeats once per mid cell. The buffer is in the frame's global DMA buffer, so this must be built before that buffer is reused." (function dma-buffer none)) +(define-extern ocean-near-add-call + "Append a VIF MSCALF that starts the near-grid microprogram at entry, an address in instruction pairs, once the transfers already queued on VIF1 have drained. The second VIF slot clears STMOD so the unpacks after this call write absolute values rather than adding to the data already in VU memory." (function dma-buffer int none)) +(define-extern ocean-near-add-upload + "Append everything VU1 needs to draw the near cell at grid position (cell-x, cell-z), which are indices into the 24-metre near grid rather than mid-cell indices. After the transform pair from ocean-near-add-matrices this writes four quadword groups: - the cell's 8x8 suppression mask, one byte per row, spread over two quadwords so the microprogram can read a row without shifting; a set bit drops one three-metre quad, which is how authored land cuts holes in the water; - the quadword offsets of the cell's four corners in the uploaded height field. A field row is eight quadwords and a cell is eight samples tall, so stepping one sub-cell in z is 64 quadwords and one in x is 2. The x and z steps wrap inside the mid cell, so the last sub-cell reads the first one's edge samples and neighbouring cells agree on their shared vertices; - the ocean-texture ST origin for the cell. The texture covers one whole mid cell, so a sub-cell starts at a quarter step in each direction; - four vertex colors for the cell's corners, obtained on VU0 by weighting the four authored map colors around this mid cell with the bilinear coefficients *ocean-trans-corner-table* stores for the sub-cell's position inside it. The caller must already have checked that the cell is visible and has a mask." (function dma-buffer uint uint none)) +(define-extern ocean-near-add-matrices + "Append the eight-quadword transform pair for one near cell. cell-origin is the cell's world-space corner with w = 1. The first matrix is the camera rotation with that corner, expressed in camera space, in its translation row; VU1 uses it to put cell-relative wave positions and normals into camera space. The second is that matrix times the perspective matrix, which takes a cell-relative position straight to homogeneous screen space. Both go to the double-buffered input area." (function dma-buffer vector none)) +(define-extern ocean-near-setup-constants + "Fill consts, the 36-quadword block that ocean-near-add-constants uploads to VU1. It carries this frame's homogeneous scale, HVDF offset and fog parameters, the scale factors the microprogram needs to turn a cell-relative position into world and texture coordinates, a GIF tag for the strip and fan form of each of the three draw passes, the adgif shaders for the ocean texture and the environment map, the TEX0 and FRAME qwords for the alpha-only pass, and the vertex-row addresses used by the strip builder. *ocean-subdivide-draw-mode* selects textured (0), wireframe (1) or untextured (2) primitives for every pass at once. The GS addresses come from *ocean-base-page* and *ocean-base-block*, so the ocean's VRAM must already be allocated." (function ocean-near-constants none)) +(define-extern ocean-near-add-call-flush + "Start the near-grid microprogram at entry like ocean-near-add-call, but hold the DMA chain with FLUSHA until VIF1, the microprogram and the GIF path have all gone idle instead of clearing STMOD. Needed when the next packet changes state that the running program's output still depends on." (function dma-buffer int none)) ;; - Unknowns @@ -22852,10 +29536,30 @@ ;; - Functions -(define-extern compute-and-draw-shadow (function vector vector vector vector float float none)) -(define-extern draw-shadow (function vector vector vector float float float none)) -(define-extern add-fake-shadow-to-buffer (function vector vector float int none)) -(define-extern swap-fake-shadow-buffers (function none)) +(define-extern compute-and-draw-shadow + "Queue a fake shadow lying flat on a surface whose normal is ground-normal. pos is the caster, + ground-pos is the contact point found for it, and radius, fade-height and flags mean what they + do in draw-shadow; radius is a float carried in a pointer register and flags an integer carried + in a float register. + Returns without queueing anything when the caster has already reached fade-height. + Raises ground-pos by a centimeter as a side effect, so the sprite does not z-fight the surface + it sits on." (function vector vector vector vector float float none)) +(define-extern draw-shadow + "Queue a fake shadow at ground-pos for a caster at pos, sized radius where the two touch and + shrinking linearly to nothing as the caster climbs fade-height above the ground. Nothing is + queued once the caster reaches fade-height. ground-rot and flags pass straight through to + add-fake-shadow-to-buffer; flags is an integer carried in a float register." (function vector vector vector float float float none)) +(define-extern add-fake-shadow-to-buffer + "Append one shadow sprite to the fake-shadow buffer that is currently open for filling. + pos is the world position of the sprite's center, already lifted clear of the ground. + ground-rot supplies the xyz lanes of the unit quaternion that rotates +y onto the ground + normal; its w lane is not stored and is reconstructed by the sprite VU1 program. + scale is the sprite size in world units, and flags selects the sprite's blend mode: bit 0 + picks additive, otherwise the sprite is subtracted from the frame buffer. + Does nothing once the buffer holds 32 shadows." (function vector vector float int none)) +(define-extern swap-fake-shadow-buffers + "Retire the buffer that is open for filling and open the other one, empty. The retired buffer + stays intact for sprite-add-shadow-all, which recomputes which of the two it is the same way." (function none)) ;; ---------------------- @@ -22866,9 +29570,38 @@ ;; - Functions -(define-extern convert-eye-data (function eye uint float)) -(define-extern render-eyes (function dma-buffer eye-control int pointer)) -(define-extern update-eyes (function none)) +(define-extern convert-eye-data + "Unpack one packed eye keyframe into dest's two vectors. frame is a merc-eye-anim-frame read as a + single doubleword. Bytes 0 to 2 are the signed pupil x, pupil y and blink values; they become + data 0 at 1/128 per unit, so they span -1 to just under 1, and a negative blink is what asks + render-eyes for the automatic eyelid blink. Bytes 4 to 6 are the unsigned iris, pupil and lid + scales; they become data 1 at 1/64 per unit, spanning 0 to just under 4. Bytes 3 and 7 land in the + two w lanes and nothing reads them. + Each group is widened to 32-bit lanes with packed interleaves against zero and then shifted so the + VU's fixed-point convert lands the value in the right place: there is no packed byte-to-float + instruction, and both converts work on a whole quadword. + The float return value is the iris scale, left in the register by the last transfer. No caller + uses it." (function eye uint float)) +(define-extern render-eyes + "Composite one eye-control slot's 64x32 tile into the shared eye render target and return the new + DMA base. dma-buf must already have the eye framebuffer, scissor and (32, 32) drawing offset + installed, which update-eyes does once per bucket. slot picks the tile, and it has to be the index + this eye-control occupies in *eye-control-array*, because merc was handed the block address for + that same tile. + Appends 1552 bytes: three adgif sets, five sprites, and the scissor and alpha-test changes between + them. + Writes through ctrl as a side effect. An eye whose lid is negative is asking for the automatic + blink, and its lid is replaced here with the value the current blink calls for, so the sign is + consumed the first time the eye is drawn after merc-eye-anim sets it." (function dma-buffer eye-control int pointer)) +(define-extern update-eyes + "Build every eye tile needed this frame. Runs three times over the buckets that precede the merc + pris draws -- pris-tex0, pris-tex1 and eyes -- installing the eye render target at the head of + each and restoring the normal framebuffer state at the tail, so a bucket's tiles exist in VRAM + exactly while that bucket's characters are drawn. + In between, walks all eleven eye-control slots and composites the ones whose process is still + alive, is flagged for eye animation, and was drawn this frame. Each of those also advances its + blink countdown, unless the game is paused. + Called from drawable's foreground pass, before sprite-draw." (function none)) ;; - Unknowns @@ -22883,6 +29616,8 @@ ;; - Types +;; Doubly linked list node. next and prev are #f only in the two terminators that the list header +;; itself forms. (deftype glst-node (structure) ((next glst-node :offset-assert 0) (prev glst-node :offset-assert 4) @@ -22892,6 +29627,7 @@ :flag-assert #x900000008 ) +;; A node with a name, matching Exec's ln_Name. (deftype glst-named-node (glst-node) ((privname string :offset-assert 8) ) @@ -22900,10 +29636,18 @@ :flag-assert #x90000000c ) +;; Amiga Exec style list header: two glst-nodes overlay its words, one at +0 (next = head, prev = +;; tail) that sits before the first element and one at +4 (next = tail, prev = tailpred) that sits +;; after the last. tail stays #f, so a forward walk ends when next is #f and a backward walk when +;; prev is #f, and insert/remove never special-case the ends. (deftype glst-list (structure) + ;; First element, or the +4 terminator when the list is empty. ((head glst-node :offset-assert 0) + ;; Always #f: the terminator both walks stop on. (tail glst-node :offset-assert 4) + ;; Last element, or the +0 terminator when the list is empty. (tailpred glst-node :offset-assert 8) + ;; Element count, maintained by insert and remove only. (numelem int32 :offset-assert 12) ) :allow-misaligned @@ -22921,8 +29665,10 @@ (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)) +(define-extern glst-node-name + "Return the name of the node. Unused; the callers read privname directly." (function glst-named-node string)) +(define-extern glst-set-name! + "Set the name of the node, and return it." (function glst-named-node string string)) ;; ---------------------- @@ -22933,19 +29679,54 @@ ;; - Functions -(define-extern glst-num-elements (function glst-list int)) -(define-extern glst-insert-after (function glst-list glst-node glst-node glst-node)) -(define-extern glst-insert-before (function glst-list glst-node glst-node glst-node)) -(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-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)) +(define-extern glst-num-elements + "Return the number of elements on the list" (function glst-list int)) +(define-extern glst-insert-after + "Insert a new node after node in the list. + Returns the new node. node may be the header's front terminator, which is how + glst-add-head prepends." (function glst-list glst-node glst-node glst-node)) +(define-extern glst-insert-before + "Insert a new node before node in the list. + Returns the new node. node may be the header's back terminator, which is how + glst-add-tail appends." (function glst-list glst-node glst-node glst-node)) +(define-extern glst-remove + "Unlink node and return it. Safe on the first or last element, because the + neighbour that gets patched is then one of the header's own terminators. + Does not check that node is really on this list; only numelem says so." (function glst-list glst-node glst-node)) +(define-extern glst-remove-tail + "Remove the last node from the list, if it is not also the first. + Returns the deleted node, or #f otherwise. + + The test looks at the node before the last one rather than at the last one + itself, which is why a one-element list is left alone; on an empty list it + reads through #f. Unused." (function glst-list glst-node)) +(define-extern glst-remove-head + "Remove the first node from the list, if it is not also the last. + Returns the deleted node, or #f otherwise. Has the same extra indirection as + glst-remove-tail. Unused." (function glst-list glst-node)) +(define-extern glst-add-tail + "Add a node to the end of the list, by inserting it before the terminator that + the tail field forms." (function glst-list glst-node glst-node)) +(define-extern glst-add-head + "Add a node to the start of the list, by inserting it after the terminator that + the head field forms. Unused." (function glst-list glst-node glst-node)) +(define-extern glst-init-list! + "Make the list empty: head points at the tail field, tailpred at the head + field, and tail is #f, so the two terminators are in place and each walk stops + at the other end. Returns the list. Must be called before anything else, and + is the only way to clear a list." (function glst-list glst-list)) +(define-extern glst-find-node-by-name + "Find the node in the list with the given name and return it. If it is not found, #f is returned instead" (function glst-list string glst-node)) +(define-extern glst-get-node-by-index + "Return the n-th node in the list, beginning at zero, or #f if n is negative or + past the end. Walks from the head, so callers stepping through a list should + keep the node rather than the index." (function glst-list int glst-node)) +(define-extern glst-length-of-longest-name + "Returns the length of longest name in a list of named nodes, or 0 if the list + is empty. Unused: anim-tester sizes its panels by asking each list handler to + measure its own rows." (function glst-list int)) +(define-extern glst-get-node-index + "Returns the index of the node in the list. If the node is not found on the list, returns -1" (function glst-list glst-node int)) ;; ---------------------- @@ -22956,27 +29737,55 @@ ;; - Types +;; The command a list-control passes to its listfunc. +(defenum list-control-cmd + :type int32 + (draw-line 0) + (visible? 1) + (measure 2) + (draw-title 3) + (input 4) + ) + +;; One scrolling list of glst-nodes on screen. Everything specific to a list lives in its listfunc, +;; which display-list-control calls once per node per command; the fields here are how the two +;; halves talk. (deftype list-control (structure) - ((listfunc (function int list-control symbol) :offset-assert 0) + ;; Called with a list-control-cmd and this control. + ((listfunc (function list-control-cmd list-control symbol) :offset-assert 0) + ;; Whatever owns the list; the handler knows the type. (list-owner uint32 :offset-assert 4) + ;; Panel position, in pixels. (top int32 :offset-assert 8) (left int32 :offset-assert 12) (list glst-list :offset-assert 16) + ;; Node the listfunc is being asked about. (the-node glst-node :offset-assert 20) (top-index int32 :offset-assert 24) + ;; Index of the-node. (the-index int32 :offset-assert 28) + ;; Screen line the-node would be drawn on. (the-disp-line int32 :offset-assert 32) + ;; Index under the cursor. (highlight-index int32 :offset-assert 36) + ;; Index the handler last accepted with X; -1 if none. (current-index int32 :offset-assert 40) + ;; Visible nodes in the whole list. (numlines int32 :offset-assert 44) + ;; Visible nodes on screen, at most MAX_LINES. (lines-to-disp int32 :offset-assert 48) + ;; Width of the widest visible line, in characters. (charswide int32 :offset-assert 52) + ;; Screen line of the highlighted node. (highlight-disp-line int32 :offset-assert 56) (field-id int32 :offset-assert 60) + ;; Where the listfunc should draw, in pixels. (xpos int32 :offset-assert 64) (ypos int32 :offset-assert 68) + ;; Per-list; 1 marks the animation picker inside the editor. (user-info int32 :offset-assert 72) (user-info-u uint32 :offset 72) ;; custom + ;; The listfunc's answer to a measure command. (return-int int32 :offset-assert 76) ) :allow-misaligned @@ -22985,6 +29794,7 @@ :flag-assert #x900000050 ) +;; Column of a sequence-editor row, in characters from the left of the panel. (deftype list-field (structure) ((left int32 :offset-assert 0) (width int32 :offset-assert 4) @@ -22994,6 +29804,8 @@ :flag-assert #x900000008 ) +;; Layout constants shared by every list-control. Pixels, except MAX_LINES and BORDER_LINES (screen +;; lines) and CHAR_WIDTH (the width the code assumes for one debug-font character). (deftype DISP_LIST-bank (basic) ((TV_SPACING int32 :offset-assert 4) (BORDER_WIDTH int32 :offset-assert 8) @@ -23002,6 +29814,7 @@ (CHAR_WIDTH int32 :offset-assert 20) (INC_DELAY int32 :offset-assert 24) (BORDER_LINES int32 :offset-assert 28) + ;; The four offsets are left at zero. (CXOFF int32 :offset-assert 32) (CYOFF int32 :offset-assert 36) (BXOFF int32 :offset-assert 40) @@ -23012,8 +29825,12 @@ :flag-assert #x900000030 ) +;; Where each of the four lists sits and how narrow it may get. X/Y are pixels; the widths and +;; EDIT_STATS_X/EDIT_PICK_X are characters. (deftype anim-tester-bank (basic) + ;; Unused. ((ANIM_SPEED float :offset-assert 4) + ;; Unused. (BLEND float :offset-assert 8) (OBJECT_LIST_X int32 :offset-assert 12) (OBJECT_LIST_Y int32 :offset-assert 16) @@ -23038,28 +29855,92 @@ (defenum anim-tester-flags :bitfield #t :type int32 - (fanimt0) - (fanimt1) - (fanimt2) - (fanimt3) - (fanimt4) - (fanimt5) + (anim-playing) + (just-entered) + (return-to-menu) + (editing-field) + (at-show-joint-info) + (at-apply-align) ) +;; Which list the tester is showing. +(defenum anim-tester-edit-mode + :type int32 + (none 0) + (pick-object 1) + (pick-joint-anim 2) + (pick-sequence 3) + (edit-sequence 4) + ) + +(defenum anim-test-obj-flags + :bitfield #t + :type int32 + (edited) + (play-sequence) + ) + +(defenum anim-test-seq-flags + :bitfield #t + :type int32 + (sequence) + (anim-present) + (from-file) + ) + +(defenum anim-test-item-flags + :bitfield #t + :type int32 + (end) + (wait-for-blend) + (blank) + ) + +(defenum anim-test-item-field + :type int64 + (name 0) + (speed 1) + (blend 2) + (first-frame 3) + (last-frame 4) + (blend-flag 5) + (unused-flag-1 6) + (unused-flag-2 7) + (unused-flag-3 8) + (move 9) + (insert 10) + (delete 11) + ) + +;; The tester process. It draws one loaded mesh with one animation channel set and owns the object +;; list and the animation picker; the per-object and per-sequence lists live on the nodes they +;; belong to. (deftype anim-tester (process-drawable) ((flags anim-tester-flags :offset-assert 176) + ;; Every loaded art group, as anim-test-obj. (obj-list glst-list :inline :offset-assert 180) + ;; Name of the object being played. (current-obj string :offset-assert 196) + ;; Global playback speed, percent. (speed int32 :offset-assert 200) + ;; The object list. (list-con list-control :inline :offset-assert 204) + ;; The animation picker inside the sequence editor. (pick-con list-control :inline :offset-assert 284) + ;; anim-test-item-field: which editor column is selected. (item-field int64 :offset-assert 368) + ;; Frames between steps while a value is held. (inc-delay int32 :offset-assert 376) + ;; Frames left before the next step. (inc-timer int32 :offset-assert 380) - (edit-mode int32 :offset-assert 384) - (old-mode int32 :offset-assert 388) + (edit-mode anim-tester-edit-mode :offset-assert 384) + ;; edit-mode last frame; written, never read. + (old-mode anim-tester-edit-mode :offset-assert 388) + ;; Frames per frame for the current row. (anim-speed float :offset-assert 392) + ;; Speed as a fraction, without the row's own percentage. (anim-gspeed float :offset-assert 396) + ;; Frame limits for the current row, or the min/max sentinels. (anim-first float :offset-assert 400) (anim-last float :offset-assert 404) ) @@ -23072,31 +29953,50 @@ ) ) +;; One mesh out of one art group, and everything the tester knows about its animations. privname is +;; the mesh name shown in the object list. (deftype anim-test-obj (glst-named-node) ((obj-art-group art-group :offset-assert 12) + ;; anim-test-sequence, one per animation in the art group. (seq-list glst-list :inline :offset-assert 16) - (flags int32 :offset-assert 32) + (flags anim-test-obj-flags :offset-assert 32) (mesh-geo merc-ctrl :offset-assert 36) (joint-geo art-joint-geo :offset-assert 40) + ;; Serves as both the animation list and the sequence list. (list-con list-control :inline :offset-assert 44) + ;; See anim-test-obj-init; holds a word of the process header and is never read. (parent uint32 :offset-assert 124) + ;; Selection kept across a close, for the animation list. (anim-index int32 :offset-assert 128) + ;; Cursor kept across a close, for the animation list. (anim-hindex int32 :offset-assert 132) + ;; Selection kept across a close, for the sequence list. (seq-index int32 :offset-assert 136) + ;; Cursor kept across a close, for the sequence list. (seq-hindex int32 :offset-assert 140) ) :method-count-assert 9 :size-assert #x90 :flag-assert #x900000090 (:methods - (new (symbol type int string basic) _type_) ;; 0 + (new + "Allocate a browser entry for the mesh named name in art group ag, with an + empty sequence list. count is ignored; every caller passes 1." + (symbol type int string basic) _type_) ;; 0 ) ) +;; One entry of an object's animation list. Every animation in the art group gets one holding a +;; single item; naming or editing it turns it into a sequence, a playlist of items played end to +;; end. parent lands exactly where list-con's user-info sits in an anim-test-obj, which is how the +;; shared animation-list handler finds the owning object. (deftype anim-test-sequence (glst-named-node) + ;; anim-test-seq-item, always ending in an **END** row. ((item-list glst-list :inline :offset-assert 12) + ;; Index of the row being played. (playing-item int32 :offset-assert 28) - (flags int32 :offset-assert 32) + (flags anim-test-seq-flags :offset-assert 32) + ;; The sequence editor. (list-con list-control :inline :offset-assert 36) (parent anim-test-obj :offset-assert 116) ) @@ -23104,64 +30004,207 @@ :size-assert #x78 :flag-assert #x900000078 (:methods - (new (symbol type int string) _type_) ;; 0 + (new + "Allocate a sequence named name with an empty item list. count is ignored." + (symbol type int string) _type_) ;; 0 ) ) +;; One row of a sequence: play animation privname, at speed, blending in over blend frames, from +;; first-frame to last-frame. (deftype anim-test-seq-item (glst-named-node) + ;; Percent of the tester's speed; negative plays backwards. ((speed int32 :offset-assert 12) + ;; Blend length in frames, before the global speed is applied. (blend int32 :offset-assert 16) + ;; -1.0 means min, -2.0 means max. (first-frame float :offset-assert 20) (last-frame float :offset-assert 24) + ;; Length of the animation, refreshed from the art group. (num-frames float :offset-assert 28) + ;; Frame number the animator's first frame had. (artist-base float :offset-assert 32) - (flags int32 :offset-assert 36) + (flags anim-test-item-flags :offset-assert 36) (parent anim-test-sequence :offset-assert 40) ) :method-count-assert 9 :size-assert #x2c :flag-assert #x90000002c (:methods - (new (symbol type int string) _type_) ;; 0 + (new + "Allocate a row that plays animation name at full speed with no blend, from + its first frame (min) to its last (max). count is ignored." + (symbol type int string) _type_) ;; 0 ) ) ;; - Functions -(define-extern anim-test-edit-sequence-list-handler (function int list-control symbol)) -(define-extern anim-test-seq-mark-as-edited (function anim-test-sequence none)) -(define-extern anim-tester-start (function symbol)) -(define-extern anim-tester-add-newobj (function anim-tester string art-group object)) -(define-extern anim-tester-stop (function symbol)) -(define-extern initialize-anim-tester (function none :behavior anim-tester)) -(define-extern anim-tester-save-object-seqs (function anim-test-obj file-stream)) -(define-extern anim-tester-num-print (function basic float none)) -(define-extern anim-test-obj-list-handler (function int list-control symbol)) -(define-extern anim-tester-standard-event-handler (function process int symbol event-message-block object :behavior anim-tester)) -(define-extern anim-tester-reset (function none :behavior anim-tester)) -(define-extern anim-tester-get-playing-item (function anim-test-sequence anim-test-seq-item)) -(define-extern anim-tester-update-anim-info (function anim-test-seq-item float :behavior anim-tester)) -(define-extern anim-tester-interface (function none :behavior anim-tester)) -(define-extern display-list-control (function list-control none)) -(define-extern anim-test-anim-list-handler (function int list-control symbol)) -(define-extern anim-test-sequence-list-handler (function int list-control symbol)) -(define-extern anim-tester-disp-frame-num (function string float float font-context pointer)) -(define-extern anim-test-seq-item-copy! (function anim-test-seq-item anim-test-seq-item anim-test-sequence)) -(define-extern anim-tester-adjust-frame (function float float float)) -(define-extern anim-test-edit-seq-insert-item (function anim-test-seq-item anim-test-sequence none)) -(define-extern anim-tester-pick-item-setup (function anim-test-seq-item anim-test-sequence none)) -(define-extern anim-tester-save-all-objects (function anim-tester symbol)) -(define-extern anim-tester-real-post (function none :behavior anim-tester)) -(define-extern anim-test-obj-item-valid? (function anim-test-obj anim-test-seq-item symbol)) -(define-extern anim-test-obj-init (function anim-test-obj list-control none)) -(define-extern anim-test-sequence-init (function anim-test-sequence anim-test-obj none)) -(define-extern anim-test-obj-remove-invalid (function anim-test-obj symbol)) -(define-extern anim-tester-post (function none :behavior anim-tester)) -(define-extern anim-tester-string-get-frame!! (function list-field string symbol)) -(define-extern anim-tester-load-object-seqs (function anim-tester string symbol)) -(define-extern anim-tester-add-object (function string none)) -(define-extern anim-tester-set-name (function string object)) -(define-extern anim-tester-add-sequence (function string none)) +(define-extern anim-test-edit-sequence-list-handler + "listfunc for the sequence editor: one row per item, with the columns of + anim-test-item-field and the header \"-spd-blnd-1st-lst-flgs-mov-\". + + Left and right move item-field along the row, skipping the three unimplemented + flag columns, and the highlighted column is drawn with a blue box behind it. + X acts on that column: on the name it opens the animation picker, on a number + it sets editing-field so up and down adjust the value (accelerating while + held, via inc-delay), on the blend flag it toggles it, and on the last three + it moves, inserts or deletes the row. The **END** row only accepts an insert." (function list-control-cmd list-control symbol)) +(define-extern anim-test-seq-mark-as-edited + "Turn seq into a named sequence, if it was not one already, and mark its object + as needing a save." (function anim-test-sequence none)) +(define-extern anim-tester-start + "Restart the tester with an empty object list and point the orbit camera at it." (function symbol)) +(define-extern anim-tester-add-newobj + "Add the contents of art group ag to the object list. + + The group is scanned in order. Its first merc-ctrl becomes the object, named + after that element; its first art-joint-geo becomes the object's skeleton; and + every art-joint-anim becomes one of the object's sequences, holding a single + row whose length and artist-base come from the animation itself. One group + therefore yields one object, however many meshes it holds. + + A sequence already on the list is kept and only marked anim-present, so + reloading a group preserves hand-built playlists; whatever is left unmarked + afterwards is dropped by anim-test-obj-remove-invalid. Selects the object and + restarts the tester on it. name is unused - the names come out of ag." (function anim-tester string art-group object)) +(define-extern anim-tester-stop + "Kill the tester process, if it is running." (function symbol)) +(define-extern initialize-anim-tester + "Set up the tester process: an empty object list, the object list control, a + 24-channel joint control and an align control, and a position 10 metres in + front of the camera. Clears the menu process mask so the tester keeps running + while the debug menu is up." (function none :behavior anim-tester)) +(define-extern anim-tester-save-object-seqs + "Write obj's sequences to data/.obinf as text: one Anim or Sequence + block per entry of the sequence list, one Item line per row inside it, and the + whole thing wrapped in Object/EndObject. The **END** and \"--blank--\" rows are + skipped, and from-file is cleared on everything written." (function anim-test-obj file-stream)) +(define-extern anim-tester-num-print + "Print a frame number to stream for an .obinf file, spelling the two sentinels + as \"min\" (-1.0) and \"max\" (-2.0)." (function basic float none)) +(define-extern anim-test-obj-list-handler + "listfunc for the object list: one row per mesh added by anim-tester-add-object, + marked with a * while it has unsaved sequence edits. X selects the object and + re-enters the process on it, square closes the list. Always returns #f apart + from the visible? command, which accepts every node." (function list-control-cmd list-control symbol)) +(define-extern anim-tester-standard-event-handler + "Handle the debug menu's requests. + + 'reset re-reads the current object and restarts playback, 'change-anim + restarts playback with whatever is selected now, the four pick/edit messages + open one of the lists and take the pad away from the camera, and + 'save-sequences writes every object marked edited." (function process int symbol event-message-block object :behavior anim-tester)) +(define-extern anim-tester-reset + "Rebuild the draw and joint state for the current object. + + The object is the one named by current-obj, or, if that name is not on the + list, whatever sits at list-con's current-index. Its skeleton and mesh become + a single LOD selected out to any distance, with a 10-metre bounding sphere so + it never culls, and a fresh joint animation channel set is posted once. + Complains to the console and leaves the old draw state alone if the object is + missing either its joint-geo or its mesh-geo." (function none :behavior anim-tester)) +(define-extern anim-tester-get-playing-item + "Return the row seq should play now, advancing playing-item past the **END** and + \"--blank--\" rows and wrapping at the end of the list. Gives up and returns the + unplayable row it started from if the whole list is unplayable." (function anim-test-sequence anim-test-seq-item)) +(define-extern anim-tester-update-anim-info + "Recompute this frame's playback rate and frame limits from item. anim-gspeed + is the tester's own speed as a fraction, anim-speed folds in the row's + percentage on top of it. A negative rate plays the row backwards, which is + expressed by swapping first and last and then making both rates positive, so + the seek! in the state code always counts towards anim-last." (function anim-test-seq-item float :behavior anim-tester)) +(define-extern anim-tester-interface + "Draw whichever list edit-mode selects, then remember it in old-mode. Prints an + error where the list would go if the object or sequence it needs is gone." (function none :behavior anim-tester)) +(define-extern display-list-control + "Draw one list and give it this frame's pad input. + + Both indices are clamped into range first, then the list is walked with + (list-control-cmd visible?) so a handler can filter nodes out: if the + highlighted node is filtered out, the highlight moves to the first visible + node. The visible nodes are measured to size the panel, the panel and title + are drawn, and top-index is moved until the highlight sits at least + BORDER_LINES from either edge of the window. Finally up to MAX_LINES rows are + drawn, or \"**NONE**\" if nothing is visible. + + the-node, the-index and the-disp-line are what a handler reads to find out + which node it is being asked about." (function list-control none)) +(define-extern anim-test-anim-list-handler + "listfunc for the animation list: the entries of one object's sequence list that + are still plain animations rather than named sequences, so up and down have to + skip over the sequences. When the control's user-info is 1 this list is the + picker inside the sequence editor and only moves its highlight; otherwise X + selects the animation to play and clears the object's play-sequence flag." (function list-control-cmd list-control symbol)) +(define-extern anim-test-sequence-list-handler + "listfunc for the sequence list: the named sequences of one object, so up and + down skip the plain animations. X opens the sequence editor on the highlighted + one and switches the object over to playing sequences." (function list-control-cmd list-control symbol)) +(define-extern anim-tester-disp-frame-num + "Draw one frame-number column: prefix, then either \"min\"/\"max\" for the two + sentinels or the frame number with artist-base added, so the number matches + what the animator saw. Disabled - it returns before drawing anything." (function string float float font-context pointer)) +(define-extern anim-test-seq-item-copy! + "Copy src onto dst, name and owning sequence included. Returns src's sequence." (function anim-test-seq-item anim-test-seq-item anim-test-sequence)) +(define-extern anim-tester-adjust-frame + "Step a frame limit by one animation frame while the d-pad is held, and return + it. -1.0 means \"min\" and -2.0 means \"max\": stepping up from min gives frame + 0 and stepping down from max gives the last real frame, while stepping past + either end saturates back onto the sentinel." (function float float float)) +(define-extern anim-test-edit-seq-insert-item + "Insert a copy of item immediately in front of it. Copying the **END** row + yields a \"--blank--\" placeholder instead, so inserting on the last row appends + an empty one to fill in." (function anim-test-seq-item anim-test-sequence none)) +(define-extern anim-tester-pick-item-setup + "Open the animation picker to the right of the sequence editor, highlighting the + animation item currently plays. user-info 1 tells the shared animation handler + that this is a picker, and editing-field makes the editor hand it the pad." (function anim-test-seq-item anim-test-sequence none)) +(define-extern anim-tester-save-all-objects + "Write out every object marked edited and clear the flag. Always returns #f." (function anim-tester symbol)) +(define-extern anim-tester-real-post + "Post the skeleton, but only while anim-playing is set: the state code clears + that flag whenever it could not set an animation up, and the joint state is + not safe to post then. Also moves the process by its own transv when + at-apply-align is on, and dumps the joint channels to the console when + at-show-joint-info is." (function none :behavior anim-tester)) +(define-extern anim-test-obj-item-valid? + "Can item still be played? True when one of obj's sequences has the same name + and was found in the art group during the last scan. As a side effect item's + num-frames and artist-base are refreshed from that sequence's own first item, + so a row's frame limits follow a reloaded animation. Returns #f otherwise." (function anim-test-obj anim-test-seq-item symbol)) +(define-extern anim-test-obj-init + "Point obj's animation list at its own sequence list and place it on screen. + parent-ctrl is meant to supply the node that owns obj, but every caller passes + the anim-tester process itself, so parent ends up holding a word out of the + process header. Nothing reads it." (function anim-test-obj list-control none)) +(define-extern anim-test-sequence-init + "Point seq's editor at its own item list, place it on screen and remember the + object it belongs to." (function anim-test-sequence anim-test-obj none)) +(define-extern anim-test-obj-remove-invalid + "Throw away everything in obj that the art group no longer supports: rows whose + animation has gone, and then any sequence left holding nothing but its **END** + row. Clears anim-present on every surviving sequence so the next scan of the + art group can set it again. Always returns #f." (function anim-test-obj symbol)) +(define-extern anim-tester-post + "Post hook for anim-tester-process." (function none :behavior anim-tester)) +(define-extern anim-tester-string-get-frame!! + "Parse the next argument of str as a frame number into (-> out left), accepting + \"min\" and \"max\" in either case as the -1 and -2 sentinels. Returns #f, leaving + out alone, when str holds no argument." (function list-field string symbol)) +(define-extern anim-tester-load-object-seqs + "Read data/.obinf back into tester. Not implemented: it returns #f, so + from-file is never set and edited sequences do not survive a restart." (function anim-tester string symbol)) +(define-extern anim-tester-add-object + "Load art group name into the global heap and add it to the tester, starting the + tester first if it is not running. Prints an error if the group is not found." (function string none)) +(define-extern anim-tester-set-name + "Rename the selected sequence of the selected object to name. Refuses names that + another sequence of the same object already uses, and only works on a named + sequence, not on a plain animation." (function string object)) +(define-extern anim-tester-add-sequence + "Create an empty named sequence on the selected object and open the editor on + it. If the name is already taken the existing sequence is opened instead. A new + sequence starts with just its **END** row." (function string none)) ;; - Unknowns @@ -23183,6 +30226,10 @@ (deftype viewer (process-drawable) ((janim art-joint-anim :offset-assert 176) ) + (:methods + (init-from-entity! :override-doc + "Initialize an entity-backed art viewer. Parse optional -ja-NAME and -geo-NAME selectors +from the entity name, then load the art group named by the entity type.")) (:states viewer-process ) @@ -23194,11 +30241,30 @@ ;; - Functions -(define-extern init-viewer-for-other (function string vector none :behavior viewer)) -(define-extern actor-get-arg! (function string string string symbol)) -(define-extern init-viewer (function string object :behavior viewer)) -(define-extern art-part-name (function string string)) -(define-extern add-a-bunch (function string int int float symbol)) +(define-extern init-viewer-for-other + "Initialize a standalone viewer at position. Treat art-name as both the art-group name and the + encoded source of optional -ja-NAME and -geo-NAME selectors." + (function string vector none :behavior viewer)) +(define-extern actor-get-arg! + "Clear result, find the first -key-VALUE segment in encoded-name, and copy VALUE through the next + hyphen or null terminator. Return true when the key is present. The caller must provide enough + result capacity because copying is unchecked." + (function string string string symbol)) +(define-extern init-viewer + "Load art-group-name from the owning entity's level or the default level. Select the requested + merc geometry and joint animation suffixes plus a joint-geometry entry, initialize the shared + viewer skeleton description, create alignment control, and enter viewer-process. Enter the art + error state if any required art is unavailable." + (function string object :behavior viewer)) +(define-extern art-part-name + "Copy and return the suffix after the first hyphen in art-name using the shared viewer-string + buffer. Return the empty shared buffer when art-name has no hyphen." + (function string string)) +(define-extern add-a-bunch + "Spawn an x-count by z-count grid of viewers around a point in front of the camera. Center the + grid in X and Z using spacing converted to an integer before each offset; unavailable process + slots are skipped." + (function string int int float symbol)) ;; - Unknowns @@ -23218,20 +30284,32 @@ ;; - Types +;; Particle test harness process. Spawns one particle group every frame and draws a cross at the +;; spawn point. (deftype part-tester (process) ((root trsqv :offset-assert 112) + ;; Launch control for the group under test. (part sparticle-launch-control :offset-assert 116) + ;; Group the launch control was built for. (old-group sparticle-launch-group :offset-assert 120)) :method-count-assert 14 :size-assert #x7c :heap-base #x100 :flag-assert #xe0100007c + (:methods + (deactivate :override-doc + "Kill the particles this tester launched before the process goes away.")) ) ;; - Functions -(define-extern part-tester-init-by-other (function vector none :behavior process-drawable)) -(define-extern start-part (function none)) +(define-extern part-tester-init-by-other + "Give the new tester a trsqv at pos and start it running. Declared on + process-drawable because part-tester's root sits where a process-drawable's + does, even though part-tester is a plain process." (function vector none :behavior process-drawable)) +(define-extern start-part + "Restart the particle tester at the anim-tester's position, or the player's if + the anim-tester is not running. Only one is ever alive." (function none)) ;; - Unknowns @@ -23247,71 +30325,204 @@ ;; Containing DGOs - ['GAME', 'ENGINE'] ;; Version - 3 +;; Texture categories the debug menu can stop uploading. +(defenum texture-enable-mask + :type uint64 + :bitfield #t + (tfrag 0) + (pris 1) + (shrub 2) + (alpha 3) + (water 4) + ) + +;; Debug edge, strip, and collision overlays selected by *display-strip-lines*. +(defenum strip-lines-controls + :type int64 + (none 0) + (strippable 1) + (convertible 2) + (good 3) + (edgeable 4) + (ordinary 8) + (color-mismatch 16) + (shader-mismatch 32) + (uv-mismatch 64) + (too-big 128) + (bad 240) + (all-edges 255) + (strips 256) + (frags 512) + (wall 1024) + (ground 2048) + (collision-mesh 3072) + ) + +;; Fixed times the debug menu can select, plus the running clock. +(defenum dm-time-of-day-setting + :type int64 + (7am-sunrise 0) + (9am-morning 1) + (12pm-noon 2) + (3pm-afternoon 3) + (6pm-sunset 4) + (7pm-twilight 5) + (11pm-evening 6) + (4am-green-sun 7) + (clock-running 8) + ) + +(defenum subdivide-draw-mode + :type int64 + (textured 0) + (outline 1) + (gouraud 2) + (hack 3) + ) + +(defenum ocean-subdivide-draw-mode + :type int64 + (textured 0) + (outline 1) + (gouraud 2) + ) + +;; Known camera-master settings exposed on the debug menu. +(defenum cam-master-options + :type uint64 + :bitfield #t + (ignore-regions 0) + (switch-only-on-ground 2) + ) + ;; - Functions -(define-extern build-continue-menu (function debug-menu game-info debug-menu-context)) -(define-extern debug-menu-make-camera-menu (function debug-menu-context debug-menu-item-submenu)) -(define-extern debug-menu-make-shader-menu (function debug-menu-context debug-menu-item-submenu)) -(define-extern debug-menu-make-instance-menu (function debug-menu-context debug-menu-item-submenu)) -(define-extern debug-menu-make-task-menu (function debug-menu-context debug-menu-item-submenu)) -(define-extern dm-current-continue (function string debug-menu-msg symbol)) -(define-extern dm-task-get-money (function int debug-menu-msg symbol)) -(define-extern dm-levitator-ready (function int debug-menu-msg symbol)) -(define-extern dm-lavabike-ready (function int debug-menu-msg symbol)) -(define-extern dm-give-all-cells (function int debug-menu-msg symbol)) -(define-extern debug-menu-make-task-unknown-menu (function debug-menu debug-menu-context none)) -(define-extern debug-menu-make-task-need-hint-menu (function debug-menu debug-menu-context none)) -(define-extern debug-menu-make-task-need-introduction-menu (function debug-menu debug-menu-context none)) -(define-extern debug-menu-make-task-need-reminder-a-menu (function debug-menu debug-menu-context none)) -(define-extern debug-menu-make-task-need-reminder-menu (function debug-menu debug-menu-context none)) -(define-extern debug-menu-make-task-need-reward-speech-menu (function debug-menu debug-menu-context none)) -(define-extern debug-menu-make-task-need-resolution-menu (function debug-menu debug-menu-context none)) -(define-extern dm-give-cell (function game-task none)) -(define-extern build-instance-list (function object none)) ;; TODO - drawable types aren't complete -(define-extern dm-edit-instance-toggle-pick-func (function int debug-menu-msg symbol)) -(define-extern dm-boolean-toggle-pick-func (function (pointer symbol) debug-menu-msg symbol)) -(define-extern build-shader-list (function none)) -(define-extern all-texture-tweak-adjust (function texture-page-dir float none)) ;; TODO - texture related types -(define-extern debug-menu-make-camera-mode-menu (function debug-menu debug-menu none)) -(define-extern dm-cam-externalize (function symbol debug-menu-msg symbol)) -(define-extern dm-cam-render-float (function int debug-menu-msg float float float)) -(define-extern dm-cam-settings-func (function int debug-menu-msg symbol)) -(define-extern dm-cam-settings-func-int (function int debug-menu-msg int int int)) -(define-extern debug-create-cam-restore (function none)) -(define-extern dm-cam-mode-func (function (state camera-slave) debug-menu-msg object)) -(define-extern dm-instance-pick-func (function string debug-menu-msg basic)) -(define-extern dm-enable-instance-func (function string debug-menu-msg symbol)) -(define-extern dm-shader-pick-func (function texture-id debug-menu-msg symbol)) -(define-extern debug-menu-nodeprocess-safe (function handle process)) -(define-extern babak-with-cannon-ride-cannon-post (function none :behavior babak-with-cannon)) +(define-extern beachcam-spawn + "Start the beach cannon camera on the placed alternate actor, attach a cloned power cell to the + camera for its lifetime, then stop the clone when the camera finishes." + (function none)) +(define-extern mistycam-spawn + "Run the Misty cannon camera from the placed alternate actor, keep a cloned power cell attached + to it, and stop the clone when the camera finishes." + (function none)) +(define-extern babak-with-cannon-compute-ride-point + "Transform Babak's fixed local riding offset by the cannon's main joint matrix and write the + resulting world position to output." + (function mistycannon vector vector)) +(define-extern babak-with-cannon-compute-cannon-dir + "Copy the cannon main joint's forward vector to output." + (function mistycannon vector vector)) +(define-extern handle->process-safe + "Resolve a handle and return its first process, or false when the handle no longer resolves." + (function handle process)) +(define-extern babak-with-cannon-ride-cannon-post + "When the linked cannon process is live, align Babak to its main-joint forward direction and + fixed riding point, then run the ordinary simple navigation-enemy post step." + (function none :behavior babak-with-cannon)) ;; - Unknowns @@ -24746,8 +32677,15 @@ ;; - Functions -(define-extern point-in-air-box-area? (function float float air-box symbol)) -(define-extern point-in-air-box? (function vector air-box symbol)) +(define-extern point-in-air-box-area? + "Return true when an X/Z offset from the air box's origin lies inside its rotated horizontal + rectangle. Rotate by the stored sine and cosine and test the half-open local ranges + [0, x-length) and [0, z-length)." + (function float float air-box symbol)) +(define-extern point-in-air-box? + "Return true when position is strictly above the air box's height level and its X/Z offset lies + inside the rotated horizontal rectangle. The volume has no upper height bound." + (function vector air-box symbol)) ;; ---------------------- @@ -24758,9 +32696,18 @@ ;; - Functions -(define-extern point-in-air? (function vector (inline-array air-box) int symbol)) ;; Not used -(define-extern points-in-air? (function vector vector (inline-array air-box) int symbol)) -(define-extern add-debug-air-box (function bucket-id air-box symbol)) +(define-extern point-in-air? + "Return true when position lies inside any of the first count air boxes. Return false for an + empty array or when no box contains it." + (function vector (inline-array air-box) int symbol)) ;; Not used +(define-extern points-in-air? + "Return true when both positions lie inside the same one of the first count air boxes. This tests + the endpoints themselves, not whether the segment between them crosses a box." + (function vector vector (inline-array air-box) int symbol)) +(define-extern add-debug-air-box + "Draw the air box's rectangular boundary at its minimum height. Use translucent green when the + camera is inside the volume and translucent red otherwise." + (function bucket-id air-box symbol)) ;; ---------------------- @@ -24784,10 +32731,23 @@ :size-assert #x20 :flag-assert #xd00000020 (:methods - (reset! (_type_ float float float) none) ;; 9 - (inc-xy-vel! (_type_ float float) none) ;; 10 - (move! (_type_) none) ;; 11 - (wobbler-method-12 (_type_ quaternion) none) ;; 12 + (reset! + "Clear displacement and velocity, then set the per-frame spring coefficient, velocity damping + multiplier, and reference height used to convert displacement into tilt." + (_type_ float float float) none) ;; 9 + (inc-xy-vel! + "Add an X/Y impulse to the wobble velocity." + (_type_ float float) none) ;; 10 + (move! + "Advance the two-axis damped spring by one frame. Integrate displacement using + seconds-per-frame, multiply velocity by damping, then subtract displacement times spring + without an additional time scale." + (_type_) none) ;; 11 + (tilt-quaternion! + "Set output to the lean represented by the current two-axis displacement. Use + (posy, 0, -posx) as the normalized tilt axis and atan(displacement magnitude / height) as + the angle." + (_type_ quaternion) none) ;; 12 ) ) @@ -24827,11 +32787,32 @@ :size-assert #x28 :flag-assert #xd00000028 (:methods - (new (symbol type int int float float float float) _type_) ;; 0 - (twister-method-9 (_type_ int int float) none) ;; 9 - (set-target! (_type_ float) none) ;; 10 - (twister-method-11 (_type_) none) ;; 11 - (twister-method-12 (_type_ process-drawable) none) ;; 12 + (new + "Allocate twist state for the inclusive skeleton-joint range first-joint through last-joint. + Store the speed and smoothing tuning, clear the target and every joint's angle and relative + twist limit, and reserve a sixteen-byte dynamic slot per joint." + (symbol type int int float float float float) _type_) ;; 0 + (asize-of :override-doc + "Return the allocation size: a forty-byte fixed header plus one sixteen-byte dynamic slot per + controlled joint.") + (set-max-dry-range! + "Set the maximum relative Y twist for the inclusive skeleton-joint range start-joint through + end-joint. Joint numbers are converted to indices relative to first-joint; callers must keep + the range inside this twister." + (_type_ int int float) none) ;; 9 + (set-target! + "Set the desired Y angle for the last controlled joint." + (_type_ float) none) ;; 10 + (update-twist! + "Smooth the last joint toward target, then walk backward through the chain. Preserve each + joint's existing wrapped angle difference when it is within max-dry; otherwise smooth that + difference toward the signed limit. A zero max-dry locks the joint to its successor." + (_type_) none) ;; 11 + (apply-twist-to-bones! + "Postmultiply each controlled bone transform by its Y-rotation about the drawable's root + position. Translate the bone to root-relative space before rotation, then restore the world + offset." + (_type_ process-drawable) none) ;; 12 ) ) @@ -24852,6 +32833,10 @@ :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 + (:methods + (init-from-entity! :override-doc + "Create the windmill's sticky moving platform and two blade collision meshes, initialize its + skeleton, allocate the looping gear sound ID, and enter idle.")) (:states windmill-one-idle) ) @@ -24868,6 +32853,10 @@ :size-assert #xc8 :heap-base #x60 :flag-assert #x14006000c8 + (:methods + (init-from-entity! :override-doc + "Create the pole's three collision meshes, load its movement speed, step distance, and number + of positions, restore the saved position from the entity's persistent data, and enter idle.")) (:states grottopole-idle grottopole-moving-up @@ -24880,6 +32869,10 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Create the vent rock's collision and skeleton, attach its actor link and navigation mesh, + and enter the already-broken state when the entity is persistently complete.")) (:states (ecoventrock-break symbol) ecoventrock-idle) @@ -24906,6 +32899,10 @@ :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 + (:methods + (init-from-entity! :override-doc + "Create the blade assembly's moving mesh collision and skeleton, install the joint prebind + callback that applies its blade angle, disable actor pause, and enter idle.")) (:states bladeassm-idle) ) @@ -24928,7 +32925,16 @@ :heap-base #xa0 :flag-assert #x1500a00110 (:methods - (flutflutegg-method-20 (_type_ float float float) none) ;; 20 + (relocate :override-doc + "Relocate the separately allocated wobbler when present, then relocate the drawable.") + (init-from-entity! :override-doc + "Create the egg's moving collision and skeleton, capture its starting position and forward + direction, initialize its travel and wobble state, and resume either the intact or already + broken task state.") + (apply-hit-impulse! + "Apply a forward velocity impulse and X/Y wobble impulses to the egg. Ignore repeated + impulses until half a second has elapsed." + (_type_ float float float) none) ;; 20 ) (:states (flutflutegg-break symbol) @@ -24945,6 +32951,10 @@ :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 + (:methods + (init-from-entity! :override-doc + "Create the harvester's five collision meshes and skeleton, resolve its linked vent rock, + and enter the deflated idle state.")) (:states harvester-idle (harvester-inflate symbol)) @@ -24959,12 +32969,28 @@ ;; - Functions -(define-extern flutflutegg-hit-sounds (function none :behavior flutflutegg)) -(define-extern bladeassm-prebind-function (function process-drawable int bladeassm event-message-block object)) ;; TODO - first arg is very likely wrong -(define-extern flying-rock-init-by-other (function vector vector float entity-actor none :behavior flying-rock)) -(define-extern spawn-flying-rock (function vector vector float entity none)) -(define-extern move-grottopole-to-position (function grottopole none)) -(define-extern move-grottopole (function grottopole float none)) +(define-extern flutflutegg-hit-sounds + "Play the egg's impact sound and, once the Flut Flut introduction is complete, choose the next + one-shot hit reaction line that has not already played." + (function none :behavior flutflutegg)) +(define-extern bladeassm-prebind-function + "Write the assembly's current blade angle as a Z-axis quaternion into the blade joint transform + before skeleton binding." + (function pointer int bladeassm none)) +(define-extern flying-rock-init-by-other + "Initialize a temporary flying rock at position with velocity and scale, including its spherical + collision, random initial orientation, and random tumble axis, then enter rolling." + (function vector vector float entity-actor none :behavior flying-rock)) +(define-extern spawn-flying-rock + "Spawn a temporary flying rock at position with velocity and scale, owned by source-entity." + (function vector vector float entity none)) +(define-extern move-grottopole-to-position + "Move the pole from its placed origin to its saved discrete position." + (function grottopole none)) +(define-extern move-grottopole + "Move the pole one configured step in direction, clamping the final frame to the exact distance + and shedding rock particles throughout the motion." + (function grottopole float none)) ;; - Unknowns @@ -24993,6 +33019,18 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize the Bird Lady as the Flut Flut task character, configure her lighting and music + flavor, then remove her when the task is already past its reminder stage or enter idle.") + (try-play-ambient-chatter :override-doc + "When the target is within thirty metres and the thirty-second cooldown has elapsed, choose + one of three Bird Lady idle lines with approximately equal probability.") + (target-above-threshold? :override-doc + "Return whether the target exists and its world Z coordinate is below -20 metres.") + (setup-shadow-settings! :override-doc + "Set the Bird Lady's shadow top and bottom clip planes relative to her root Y position, then + enable top-plane scissoring.")) ) ;; - Unknowns @@ -25016,6 +33054,15 @@ :size-assert #x190 :heap-base #x120 :flag-assert #x3501200190 + (:methods + (init-from-entity! :override-doc + "Initialize the beach resolution Bird Lady for the Flut Flut task, configure her music + flavor, and enter the taskable state selected by current progress.") + (play-anim! :override-doc + "Return the Flut Flut resolution animation. When committing playback, close the current task + stage and spawn cloned Flut Flut and egg manipulators for the animation.") + (should-display? :override-doc + "Return whether the Flut Flut task currently needs its reward speech.")) ) ;; - Unknowns @@ -25037,11 +33084,32 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize the Mayor for the jungle Lurker machine and village donation tasks, configure his + lighting and music flavor, and enter the taskable state selected by current progress.") + (play-anim! :override-doc + "Choose the Mayor's conversation animation for the current task stage. When commit? is true, + apply the corresponding task transitions, reminder bookkeeping, reward, and payment; false + only selects or prefetches the animation.") + (should-display? :override-doc + "Return whether the target, or the camera before a target exists, is less than fourteen metres + beyond the Mayor along world Z.") + (try-play-ambient-chatter :override-doc + "When the target is within thirty metres and the thirty-second cooldown has elapsed, choose + one of nine Mayor idle lines with equal probability. After the Lurker-machine reminder is + complete, six task-specific choices become silence while the three generic lines remain.") + (setup-shadow-settings! :override-doc + "Set the Mayor's shadow-control bottom and top plane W terms from his root Y position using + half-metre offsets.")) ) ;; - Functions -(define-extern mayor-lurkerm-reward-speech (function mayor symbol spool-anim)) +(define-extern mayor-lurkerm-reward-speech + "Return the Lurker-machine resolution animation. When commit? is true, select that task as the + pending cell reward, close its reward-speech stage, and advance to the next available task." + (function mayor symbol spool-anim)) ;; - Unknowns @@ -25057,18 +33125,39 @@ ;; - Types (deftype sculptor (process-taskable) - ((muse handle :offset-assert 384) + ((muse handle :offset-assert 384) ;; displayed Muse manipulator ) :method-count-assert 53 :size-assert #x188 :heap-base #x120 :flag-assert #x3501200188 + (:methods + (init-from-entity! :override-doc + "Initialize the Sculptor for the Misty Muse task, clear his displayed-Muse handle, configure + his lighting and music flavor, and enter the taskable state selected by current progress.") + (play-anim! :override-doc + "Choose the Sculptor's conversation animation for the current Misty Muse task stage. When + commit? is true, apply the corresponding task transition and create the displayed Muse for + the resolution animation; false only selects or prefetches the animation.") + (get-art-elem :override-doc + "Return art element 11 while the Muse task is invalid or awaiting resolution, otherwise + return the Sculptor's active root-channel art element.") + (try-play-ambient-chatter :override-doc + "When the target is within thirty metres and the thirty-second cooldown has elapsed, choose + one of seven Sculptor idle lines with approximately equal probability.") + (setup-shadow-settings! :override-doc + "Set the Sculptor's shadow-control bottom and top plane W terms from his root Y position using + half-metre offsets.")) ) ;; - Functions (declare-type muse nav-enemy) -(define-extern muse-to-idle (function muse object :behavior sculptor)) +(define-extern muse-to-idle + "Ensure the displayed Muse manipulator exists, light it, show it with a looping idle animation, + and attach its origin to joint 26. owner is the Sculptor viewed as a Muse: sculptor.muse and + muse.incomming-attack-id intentionally share the handle slot at offset 384." + (function muse object :behavior sculptor)) ;; - Unknowns @@ -25131,6 +33220,14 @@ :heap-base #xf0 :size-assert #x160 :flag-assert #x1400f00160 + (:methods + (relocate :override-doc + "Relocate the eight path controls, cached path control, and neck joint modifier, then + relocate the process through the parent method.") + (init-from-entity! :override-doc + "Initialize the Pelican's collision, skeleton, shadow, alignment, eight path controls, and + neck tracking, then resume its circling, nest, explosion, or completed state from the + entity's persistent stage.")) (:states (pelican-wait-at-end symbol) (pelican-wait-at-nest symbol) @@ -25145,9 +33242,18 @@ ;; - Functions -(define-extern pelican-fly (function (function pelican int) (function pelican int) none :behavior pelican)) -(define-extern pelican-path-update (function float int float float symbol quaternion :behavior pelican)) -(define-extern pelican-post (function none :behavior pelican)) +(define-extern pelican-fly + "Continuously play batches of wingbeats and optional glides. flap-count returns the number of + fly cycles in each batch and glide-count returns the following number of glide cycles." + (function (function pelican int) (function pelican int) none :behavior pelican)) +(define-extern pelican-path-update + "Apply the aligner's vertical and forward correction to the current path position, wrap the + parameter across the path's control-vertex range, move to the evaluated point, and face its + tangent immediately or over the requested turn time. The third argument is unused." + (function float int float float symbol quaternion :behavior pelican)) +(define-extern pelican-post + "Run the standard joint-animation post step." + (function none :behavior pelican)) ;; - Unknowns @@ -25179,8 +33285,21 @@ :flag-assert #x16006000c8 ;; inherited inspect of process-drawable (:methods - (lurkerworm-method-20 (_type_) none) ;; 20 - (particle-effect (_type_) none) ;; 21 + (relocate :override-doc + "Relocate the optional sand-particle controller and body twister, then relocate the drawable + through the parent method.") + (deactivate :override-doc + "Stop and free the secondary sand-particle controller before deactivating the drawable.") + (init-from-entity! :override-doc + "Initialize the Lurker Worm's body and attack collision spheres, skeleton, sand effects, + three-strike body twister, callbacks, navigation radius, and hidden idle state.") + (aim-at-target! + "Turn the body twister toward the target and seek the head pitch toward it, clamped between + -30 and 45 degrees." + (_type_) none) ;; 20 + (particle-effect + "Launch sand puffs at body joints 5 through 8." + (_type_) none) ;; 21 ) (:states lurkerworm-idle @@ -25194,10 +33313,18 @@ ;; - Functions -(define-extern lurkerworm-prebind-function (function pointer int lurkerworm none :behavior lurkerworm)) -(define-extern lurkerworm-joint-callback (function lurkerworm none)) -(define-extern lurkerworm-default-event-handler (function process int symbol event-message-block object :behavior lurkerworm)) -(define-extern lurkerworm-default-post-behavior (function none :behavior lurkerworm)) +(define-extern lurkerworm-prebind-function + "Apply the current head pitch to the head joint quaternion before binding the skeleton." + (function pointer int lurkerworm none :behavior lurkerworm)) +(define-extern lurkerworm-joint-callback + "Apply the body twister to the bound skeleton joints." + (function lurkerworm none)) +(define-extern lurkerworm-default-event-handler + "Die on attack. On a qualifying touch, send an attack back to the touching process." + (function process int symbol event-message-block object :behavior lurkerworm)) +(define-extern lurkerworm-default-post-behavior + "Aim the worm at the target and run the standard transform post step." + (function none :behavior lurkerworm)) ;; - Unknowns @@ -25219,6 +33346,28 @@ :heap-base #x130 :size-assert #x194 :flag-assert #x4c01300194 + ;; inherited inspect of nav-enemy + (:methods + (touch-handler :override-doc + "When the claw offense is enabled and an offensive primitive touches another process, send + the generic contact attack. Always apply shove-back, then resolve overlaps unless a contact + attack has already landed this frame.") + (attack-handler :override-doc + "Record the incoming attack handle. Flop, explosion, and dark-eco attacks always kill the + crab, and every attack kills while its shell is vulnerable. Otherwise enter the pushed + state, aiming a punch knockback along the target's facing or another hit away from the + target.") + (turn-toward-travel! :override-doc + "While orient is true, steer toward target-pos after navigation reports the destination + reached and otherwise steer along the travel heading. While false, spin in place at two and + a half turns per second.") + (integrate-and-collide! :override-doc + "Move by the current translation velocity and follow background ground within two metres, + without hovering or using either special ground probe.") + (init-from-entity! :override-doc + "Build the crab's body and joint-mounted claw collision, drawable, skeleton, navigation + tuning, and slide particles. Begin invulnerable, stationary, and forced to the distant LOD + in the idle state.")) (:states lurkercrab-pushed ) @@ -25226,8 +33375,13 @@ ;; - Functions -(define-extern lurkercrab-vulnerable (function int :behavior lurkercrab)) -(define-extern lurkercrab-invulnerable (function int :behavior lurkercrab)) +(define-extern lurkercrab-vulnerable + "Expose the crab to damage and change its central collision primitive to normal attack offense." + (function int :behavior lurkercrab)) +(define-extern lurkercrab-invulnerable + "Protect the crab from ordinary damage and restore indestructible offense on its central + collision primitive." + (function int :behavior lurkercrab)) ;; - Unknowns @@ -25249,6 +33403,14 @@ :heap-base #x120 :size-assert #x190 :flag-assert #x4c01200190 + ;; inherited inspect of nav-enemy + (:methods + (initialize-collision :override-doc + "Create a moving collision shape with a 1.2-metre normal-attack sphere and a half-metre + navigation radius.") + (post-init-setup! :override-doc + "Initialize the puppy skeleton and navigation tuning, then assign neck-controller up, nose, + and ear indices 0, 1, and 2 when the controller is present.")) ) ;; - Unknowns @@ -25278,6 +33440,16 @@ :size-assert #xcc :flag-assert #x18006000cc (:methods + (relocate :override-doc + "Relocate the optional falling and landing particle controllers, then relocate the drawable + through the parent method.") + (deactivate :override-doc + "Stop and free both optional rock particle controllers, then deactivate the drawable through + the parent method.") + (init-from-entity! :override-doc + "Create link, alignment, and particle controls, then restore the avalanche from task state. + An invalid task starts fallen; need-resolution recreates its fuel cell before starting + fallen; every other status waits idle for the trigger.") (idle () _type_ :state) ;; 20 ;; state (loading () _type_ :state) ;; 21 ;; state (falling () _type_ :state) ;; 22 ;; state @@ -25291,6 +33463,11 @@ :heap-base #x60 :size-assert #xcc :flag-assert #x18006000cc + ;; inherited inspect of beach-rock + (:methods + (init-from-entity! :override-doc + "Create the large rock's joint-4 collision mesh, drawable, skeleton, and expanded behavior + stack, then run the base beach-rock task-state setup.")) ) ;; - Unknowns @@ -25328,14 +33505,39 @@ :size-assert #xe8 :flag-assert #x1c008000e8 (:methods - (move-vertically! (_type_ symbol) none) ;; 20 - (adjust-heading-around-point-slow! (_type_ float) none) ;; 21 - (seagull-method-22 (_type_) none) ;; 22 - (adjust-heading-around-point! (_type_ float) none) ;; 23 - (seagull-method-24 (_type_) none) ;; 24 - (seagull-method-25 (_type_ float) none) ;; 25 - (seagull-method-26 (_type_) symbol) ;; 26 - (seagull-method-27 (_type_) none) ;; 27 + (move-vertically! + "Raise vertical velocity by three metres per second until the flock's lift limit when climb? + is true; otherwise lower it by one metre per second." + (_type_ symbol) none) ;; 20 + (adjust-heading-around-point-slow! + "Blend horizontal velocity twenty percent toward speed along the bird's current heading, + retaining eighty percent of the previous velocity." + (_type_ float) none) ;; 21 + (set-glide-sink-velocity! + "Set the fixed two-metres-per-second downward velocity used while soaring." + (_type_) none) ;; 22 + (adjust-heading-around-point! + "Set horizontal velocity to speed along the bird's current heading." + (_type_ float) none) ;; 23 + (steer-toward-target! + "Turn toward the flock's current path target, or toward the temporary collision-avoidance + heading while its timer is active. Mark arrival within twenty metres, and update target-dist + and angletan, the target's downward slope relative to horizontal distance." + (_type_) none) ;; 24 + (turn-toward-heading! + "Bank toward target-heading by half a degree per frame, within max-tilt, then advance heading + by one twentieth of the bank angle. Level the bank when the wrapped heading error is within + two degrees." + (_type_ float) none) ;; 25 + (teleport-near-target! + "Move ninety percent of the way toward a random point within one metre of the flock target, + then clear the teleport request." + (_type_) symbol) ;; 26 + (integrate-with-air-bounds! + "Predict this frame's endpoint and integrate without background collision only when the + current and predicted points occupy the same seagull air box. Otherwise use the ordinary + background collision integrator so crossing a box boundary cannot skip a collision." + (_type_) none) ;; 27 ) (:states (seagull-idle) @@ -25368,9 +33570,28 @@ :heap-base #x180 :flag-assert #x11018001f0 (:methods - (spawn-bird (_type_ vector) (pointer process)) ;; 14 - (play-hint (_type_ int) none) ;; 15 - (seagullflock-method-16 (_type_ seagull) float) ;; 16 + (relocate :override-doc + "Relocate the flock's path, actor link, and ambient sound when present, then relocate the + process through the parent method.") + (deactivate :override-doc + "Stop the ambient seagull sound when present, then deactivate the process through the parent + method.") + (init-from-entity! :override-doc + "Resume the flock at the path point following its saved hint progress, spawn one bird at the + target and twenty birds in a ten-metre square, start the ambient flock sound, and enter + idle.") + (spawn-bird + "Spawn one seagull at position, store it in the flock's fixed bird table, and return the new + process. Return false when all sixty-four slots are occupied." + (_type_ vector) (pointer process)) ;; 14 + (play-hint + "At most once every five seconds, advance the flock target and sidekick hint, save progress, + and stagger every bird's takeoff. triggering-bird-index takes off immediately. After the + fourth target is selected, begin the delayed waterfall transition." + (_type_ int) none) ;; 15 + (heading-to-target + "Return the heading angle from bird to the flock's current path target." + (_type_ seagull) float) ;; 16 ) (:states (seagullflock-idle) @@ -25379,10 +33600,23 @@ ;; - Functions -(define-extern seagull-init-by-other (function vector int seagullflock none :behavior seagull)) -(define-extern seagull-reaction (function collide-shape-moving collide-shape-intersect vector vector cshape-moving-flags)) -(define-extern seagull-post (function none :behavior seagull)) -(define-extern beach-rock-trigger (function int)) +(define-extern seagull-init-by-other + "Create a seagull's moving collision shape and indestructible half-metre sphere, place it at + position, attach it to flock at index, choose a random thrust from 12.5 to 17.5 metres per + second, and enter idle." + (function vector int seagullflock none :behavior seagull)) +(define-extern seagull-reaction + "Apply the accepted collision displacement while retaining the full vertical move, then remove + velocity into the hit surface so the bird slides along it. Steer away along the contact normal + for one second and return the collision contact bits. The final two vector arguments are + unused." + (function collide-shape-moving collide-shape-intersect vector vector collide-status)) +(define-extern seagull-post + "Build the bird orientation from its yaw heading and roll tilt, then update its transforms." + (function none :behavior seagull)) +(define-extern beach-rock-trigger + "Start the active seagull flock's one-second delay before the waterfall avalanche transition." + (function int)) ;; - Unknowns @@ -25431,38 +33665,75 @@ ) (deftype warp-gate-switch (basebutton) - ((warp handle :offset-assert 256) + ((warp handle :offset-assert 256) ;; Spawned warp-gate process while the switch is down. ) :method-count-assert 33 :size-assert #x108 :heap-base #xa0 :flag-assert #x2100a00108 (:methods - (pressable? (_type_) symbol) ;; 32 + (setup-skel-and-anim! :override-doc + "Restore the switch's initial pressed state from its task, create the warp-gate-switch + skeleton, and pose its animation at the first or last frame before posting transforms.") + (setup-collision! :override-doc + "Create one sticky, indestructible ground mesh on skeleton transform 4 inside a three-metre + primitive group, allocate one rider, and install the moving collision shape as root.") + (press! :override-doc + "When pressed, close the associated progression task, save the current Village 3 fuel-cell + count as the gondola's later two-cell baseline, notify the linked actor to start, and update + the base button state.") + (pressable? + "Reject presses while Jak is attached to special traversal geometry. The Training switch + also remains locked until all four tutorial tasks are complete and supplies its blocked + hint while locked." + (_type_) symbol) ;; 32 ) ) (deftype village-cam (process) - ((root-override trsq :score 100 :offset-assert 112) - (range meters :offset-assert 116) - (index int32 :offset-assert 120) - (state-time time-frame :offset-assert 128) + ((root-override trsq :score 100 :offset-assert 112) ;; Trigger transform copied from the entity. + (range meters :offset-assert 116) ;; Distance at which the hint camera may start. + ;; 0 selects Fire Canyon, 1 is silent, and 2/3 select the Village 2/3 switch reminders. + (index int32 :offset-assert 120) + (state-time time-frame :offset-assert 128) ) :method-count-assert 15 :size-assert #x88 :heap-base #x20 :flag-assert #xf00200088 (:methods - (idle () _type_ :state) ;; 14 + (relocate :override-doc + "Relocate the copied trigger transform, then let process relocate the allocation and its + ordinary process-owned storage.") + (init-from-entity! :override-doc + "Copy the trigger transform, activation range, and sequence index from the entity, make the + process pause with actors, and enter the hint-camera state.") + (idle + "Wait for Jak to enter range under valid hint conditions, then reserve the target, clear + competing dialog, play the indexed reminder and camera shot, and retire the trigger when + its one-shot work is complete." + () _type_ :state) ;; 14 ) ) ;; - Functions -(define-extern warp-gate-init-by-other (function vector none :behavior warp-gate)) -(define-extern get-next-slot-up (function warp-gate int int)) -(define-extern get-next-slot-down (function warp-gate int int)) -(define-extern print-level-name (function int font-context int int font-context)) +(define-extern warp-gate-init-by-other + "Create a warp selector at position. Determine its current slot from the active level and expose + destinations only through the furthest unlocked village gate." + (function vector none :behavior warp-gate)) +(define-extern get-next-slot-up + "Advance one destination slot, wrapping through the gate's inclusive range and skipping the + current level." + (function warp-gate int int)) +(define-extern get-next-slot-down + "Move back one destination slot, wrapping through the gate's inclusive range and skipping the + current level." + (function warp-gate int int)) +(define-extern print-level-name + "Draw a destination name on the selected side of the carousel. Distance supplies both the + horizontal displacement and a linear fade from full intensity at zero to transparent at 300." + (function int font-context int int font-context)) ;; - Unknowns @@ -25479,8 +33750,8 @@ ;; - Types (deftype oracle (process-taskable) - ((first-task uint8 :offset-assert 380) - (second-task uint8 :offset-assert 381) + ((first-task uint8 :offset-assert 380) ;; Task rewarded by the right-eye power cell. + (second-task uint8 :offset-assert 381) ;; Task rewarded by the left-eye power cell. (left-eye-cell handle :offset-assert 384) (right-eye-cell handle :offset-assert 392) ) @@ -25488,6 +33759,19 @@ :size-assert #x190 :heap-base #x120 :flag-assert #x3501200190 + (:methods + (init-from-entity! :override-doc + "Initialize the Oracle's taskable character, sleeping sound, two task identifiers, and + power-cell eyes. Spawn each eye whose task still needs resolution, attach its starburst + particles to the moving cell, and enter the state selected by current task progress.") + (get-art-elem :override-doc + "Return art element 2 from the active root animation channel.") + (play-anim! :override-doc + "Choose the Oracle conversation animation for the current task stage and village. When + commit? is true, close both introductions before the shared introduction, or close the + current payment stage, charge the Oracle fee, and remove the eye cell being awarded. False + only prepares the appropriate prompt and selects or prefetches the animation.") + ) ) ;; - Unknowns @@ -25504,12 +33788,14 @@ ;; - Types (deftype battlecontroller-spawner (structure) + "One encounter entrance: a staged jump path, its current creature, optional linked actors, the + next path point to cue, and whether this entrance can still spawn." ((path path-control :offset-assert 0) - (creature handle :offset-assert 8) + (creature handle :offset-assert 8) (trigger-actor entity-actor :offset-assert 16) (blocker-actor entity-actor :offset-assert 20) - (state int8 :offset-assert 24) - (enabled symbol :offset-assert 28) + (state int8 :offset-assert 24) + (enabled symbol :offset-assert 28) ) :method-count-assert 9 :size-assert #x20 @@ -25517,12 +33803,14 @@ ) (deftype battlecontroller-creature-type (structure) - ((type2 type :offset-assert 0) ; a guess - (percent float :offset-assert 4) - (pickup-percent float :offset-assert 8) + "One weighted enemy type and its limited chance to replace the encounter's ordinary enemy + pickup." + ((type2 type :offset-assert 0) + (percent float :offset-assert 4) + (pickup-percent float :offset-assert 8) (pickup-type pickup-type :offset-assert 12) - (max-pickup-count int8 :offset-assert 16) - (pickup-count int8 :offset-assert 17) + (max-pickup-count int8 :offset-assert 16) + (pickup-count int8 :offset-assert 17) ) :allow-misaligned :method-count-assert 9 @@ -25531,17 +33819,20 @@ ) (deftype battlecontroller (process-drawable) - ((final-pickup-spawn-point vector :inline :offset-assert 176) + "Coordinates a finite enemy encounter. Enemies enter along named paths until the configured + live and total limits are met; linked actors, music, camera, ocean visibility, persistence, and + the final pickup are managed around the battle." + ((final-pickup-spawn-point vector :inline :offset-assert 176) ;; Position of the last defeated enemy. (activate-distance float :offset-assert 192) - (max-spawn-count int16 :offset-assert 196) - (spawn-count int16 :offset-assert 198) + (max-spawn-count int16 :offset-assert 196) ;; Total enemies to create. + (spawn-count int16 :offset-assert 198) ;; Enemies created so far. (die-count int16 :offset-assert 200) - (target-count int8 :offset-assert 202) + (target-count int8 :offset-assert 202) ;; Desired maximum live children. (spawner-count int8 :offset-assert 203) (creature-type-count int8 :offset-assert 204) (spawner-array battlecontroller-spawner 8 :inline :offset-assert 208) - (spawn-period time-frame :offset-assert 464) - (path-spawn path-control :offset-assert 472) + (spawn-period time-frame :offset-assert 464) + (path-spawn path-control :offset-assert 472) (creature-type-array battlecontroller-creature-type 4 :inline :offset-assert 476) (final-pickup-type pickup-type :offset-assert 604) (prespawn symbol :offset-assert 608) @@ -25558,39 +33849,111 @@ :flag-assert #x1d0210027c ;; inherited inspect of process-drawable (:methods + (relocate :override-doc + "Relocate each initialized spawner path and the optional bulk-spawn path, then relocate the + process through the parent method.") + (deactivate :override-doc + "Restore encounter music and linked kill actors before ordinary process deactivation.") + (init-from-entity! :override-doc + "Initialize the controller as an enemy process with a transform root, read its encounter + paths and parameters, and enter the state selected by persistent completion.") (battlecontroller-method-20 () none) ;; 20 - (battlecontroller-idle () _type_ :state) ;; 21 - (battlecontroller-play-intro-camera () _type_ :state) ;; 22 + (battlecontroller-idle + "Wait for the target to enter activation range, optionally prepopulate the paths, begin the + encounter, and advance to the introduction-camera state." + () _type_ :state) ;; 21 + (battlecontroller-play-intro-camera + "Keep the controller alive while a subtype performs its introduction camera, then enter the + active encounter. The base implementation advances immediately." + () _type_ :state) ;; 22 (battlecontroller-method-23 () none) ;; 23 - (battlecontroller-active () _type_ :state) ;; 24 + (battlecontroller-active + "Maintain linked spawners and ocean visibility while periodically adding enemies up to the + live target. Finish after all configured enemies have spawned and no child remains." + () _type_ :state) ;; 24 (battlecontroller-method-25 () none) ;; 25 - (battlecontroller-die () _type_ :state) ;; 26 - (battlecontroller-method-27 (_type_) none) ;; 27 ;; has pairs - (cleanup-if-finished! (_type_) none) ;; 28 + (battlecontroller-die + "End the encounter, notify linked actors, persist task completion, award an uncollected final + fuel cell, wait for all children to leave, and mark the controller dead." + () _type_ :state) ;; 26 + (setup-paths-and-params! + "Create the encounter's paths and default drop, bind linked spawner actors, and read enemy + counts, weighted types, per-type pickup limits, delay, final pickup, and prespawn mode from + the entity resources." + (_type_) none) ;; 27 ;; has pairs + (cleanup-if-finished! + "Enter the completion state when this encounter was already finished, otherwise wait idle." + (_type_) none) ;; 28 ) ) ;; - Functions -(define-extern battlecontroller-task-completed? (function symbol :behavior battlecontroller)) -(define-extern battlecontroller-off (function none :behavior battlecontroller)) -(define-extern battlecontroller-camera-on (function object :behavior battlecontroller)) -(define-extern battlecontroller-spawn-creature-random-spawner (function none :behavior battlecontroller)) -(define-extern battlecontroller-disable-ocean (function none :behavior battlecontroller)) -(define-extern battlecontroller-update-spawners (function none :behavior battlecontroller)) -(define-extern battlecontroller-fill-all-spawners (function none :behavior battlecontroller)) -(define-extern battlecontroller-battle-begin (function none :behavior battlecontroller)) -(define-extern battlecontroller-spawn-creature-at-spawner (function int int none :behavior battlecontroller)) -(define-extern battlecontroller-spawn-creature (function vector vector handle :behavior battlecontroller)) -(define-extern battlecontroller-spawners-full? (function symbol :behavior battlecontroller)) -(define-extern battlecontroller-default-event-handler (function process int symbol event-message-block object :behavior battlecontroller)) -(define-extern battlecontroller-draw-debug (function none :behavior battlecontroller)) -(define-extern battlecontroller-camera-off (function none :behavior battlecontroller)) -(define-extern battlecontroller-battle-end (function none :behavior battlecontroller)) -(define-extern battlecontroller-special-contents? (function symbol :behavior battlecontroller)) -(define-extern battlecontroller-special-contents-collected? (function symbol :behavior battlecontroller)) -(define-extern battlecontroller-set-special-contents-collected (function none :behavior battlecontroller)) -(define-extern battlecontroller-set-task-completed (function none :behavior battlecontroller)) +(define-extern battlecontroller-task-completed? + "Return whether the encounter has reached either persistent completion stage." + (function symbol :behavior battlecontroller)) +(define-extern battlecontroller-off + "Remove danger music and allow the linked kill actors to be born again." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-camera-on + "Switch to the optional camera-name entity once and remember that the encounter camera is active." + (function object :behavior battlecontroller)) +(define-extern battlecontroller-spawn-creature-random-spawner + "Choose one entrance, disable it when its blocker is complete, notify its trigger actor, and + spawn at the beginning of its path when it is enabled and empty." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-disable-ocean + "Apply this encounter's whole-, middle-, and near-ocean visibility settings." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-update-spawners + "Advance each waiting creature through its entrance path one cue at a time. After the final + point, release it to chase and free the entrance for another spawn." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-fill-all-spawners + "Populate every entrance at path point one. Also create one immediately chasing enemy at each + point of the optional pathspawn path." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-battle-begin + "Start danger music, suppress the linked kill actors, trigger the linked start actors, and clear + the current level hint." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-spawn-creature-at-spawner + "If entrance is empty and the total limit permits it, create an enemy at path-point facing the + following point and remember the next cue index." + (function int int none :behavior battlecontroller)) +(define-extern battlecontroller-spawn-creature + "Choose a weighted enemy type, create and initialize it at spawn-position facing cue-point, apply + the Misty ground-probe mode when requested, and configure its ordinary or limited special + pickup. Return its handle, or false when creation fails." + (function vector vector handle :behavior battlecontroller)) +(define-extern battlecontroller-spawners-full? + "Return whether every configured entrance contains a nonfalse creature handle." + (function symbol :behavior battlecontroller)) +(define-extern battlecontroller-default-event-handler + "Count child deaths. On the last configured death, remember its position and replace its ordinary + drop when the final reward is not a fuel cell. A trigger event ends the encounter immediately." + (function process int symbol event-message-block object :behavior battlecontroller)) +(define-extern battlecontroller-draw-debug + "Draw every configured entrance path." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-camera-off + "Clear the encounter's camera entity and active flag." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-battle-end + "Play the Citadel completion line when applicable, then restore music and linked kill actors." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-special-contents? + "Return whether the final reward is a separately spawned fuel cell." + (function symbol :behavior battlecontroller)) +(define-extern battlecontroller-special-contents-collected? + "Return whether persistent stage two records collection of the final fuel cell." + (function symbol :behavior battlecontroller)) +(define-extern battlecontroller-set-special-contents-collected + "Persist stage two after the final fuel cell has left the controller's child list." + (function none :behavior battlecontroller)) +(define-extern battlecontroller-set-task-completed + "Persist stage one when the enemy encounter ends." + (function none :behavior battlecontroller)) ;; ---------------------- @@ -25602,6 +33965,8 @@ ;; - Types (deftype citb-part (part-spawner) + "Citadel particle-spawner subtype. The placed citb-part-1 transform also marks the destination + used when Jak returns through the Citadel warp gate." () :method-count-assert 21 :size-assert #xd0 @@ -25611,8 +33976,17 @@ ;; - Functions -(define-extern check-drop-level-firehose-pops (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern birth-func-random-rot (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern check-drop-level-firehose-pops + "Kill a falling firehose particle below its user-float Y threshold, then launch the spark burst + and flash at the point where it crossed the threshold." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern birth-func-random-rot + "Spread a robot-boss shield sheet around its circular barrier. Choose a yaw within one full turn + from the particle's user-float, move the launch point 28.55 metres radially, rotate velocity and + acceleration with it, and turn the sheet another quarter-turn so it faces along the ring. The + packed cone rotation stores xyz and reconstructs a nonnegative w, so select the equivalent + quaternion sign before accumulating the new orientation." + (function sparticle-system sparticle-cpuinfo sparticle-launchinfo none)) ;; ---------------------- @@ -25624,197 +33998,383 @@ ;; - Types (deftype citb-arm-section (process-drawable) + "Shared motion and visibility control for the rotating arms around the Citadel robot. A signed + synchronization period chooses rotation direction; sections hide when their configured cull + direction points away from the camera, and rideable variants disable collision with them." ((sync sync-info :inline :offset-assert 176) - (cull-dir-local vector :inline :offset-assert 192) - (cull-dot float :offset-assert 208) - (rot-scale float :offset-assert 212) - (y-angle float :offset-assert 216) + (cull-dir-local vector :inline :offset-assert 192) ;; Local direction whose camera-facing side is visible. + (cull-dot float :offset-assert 208) ;; Visibility cone threshold. + (rot-scale float :offset-assert 212) ;; One or negative one, selected by the period sign. + (y-angle float :offset-assert 216) ;; Current synchronized yaw. ) :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc (:methods - (init-root! (_type_) none) ;; 20 - (setup-new-process! (_type_) none) ;; 21 - (idle () _type_ :state) ;; 22 + (init-from-entity! :override-doc + "Create the appropriate root, initialize the drawable from its entity, configure synchronized + rotation and visibility, and enter the subtype's idle state.") + (init-root! + "Create the plain transform root used by non-rideable arm sections." + (_type_) none) ;; 20 + (setup-new-process! + "Load synchronized rotation parameters, preserve the period magnitude while recording its + direction, initialize animation, and configure the arm's camera-facing visibility cone." + (_type_) none) ;; 21 + (idle + "Rotate with the shared synchronization phase. Force the distant LOD while Jak is more than + thirty metres below, and hide the section whenever its rotated front lies outside the + camera-facing cone." + () _type_ :state) ;; 22 ) ) (deftype citb-arm (citb-arm-section) + "Rideable Citadel arm section with a sticky mesh collision surface." ((root collide-shape-moving :override)) :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc + (:methods + (init-root! :override-doc + "Create the arm's indestructible sticky ride surface on skeleton transform 3, with a + ten-metre collision sphere and one rider slot.") + (setup-new-process! :override-doc + "Apply the shared synchronized setup and use skeleton joint 4 as the drawable origin.") + (idle :override-doc + "Run shared arm rotation and visibility, disabling the ride collision while the arm is + hidden and otherwise updating attached riders.") + ) ) (deftype citb-arm-shoulder (citb-arm-section) + "Non-rideable shoulder section for the Citadel robot arm assembly." () :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc + (:methods + (setup-new-process! :override-doc + "Apply the shared synchronized setup, use skeleton joint 4 as the drawable origin, and widen + the diagonal camera-facing cone used by the shoulder art.") + ) ) (deftype citb-arm-a (citb-arm) + "First rideable arm section, using the A skeleton and a collision centre 45 metres along + negative local Z." () :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc + (:methods + (setup-new-process! :override-doc + "Initialize the A skeleton, apply shared rideable-arm setup, and place the collision sphere + centre 45 metres along negative local Z.") + ) ) (deftype citb-arm-b (citb-arm) + "Second rideable arm section, using the B skeleton and a collision centre 55 metres along + negative local Z." () :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc + (:methods + (setup-new-process! :override-doc + "Initialize the B skeleton, apply shared rideable-arm setup, and place the collision sphere + centre 55 metres along negative local Z.") + ) ) (deftype citb-arm-c (citb-arm) + "Third rideable arm section, using the C skeleton and a collision centre 65 metres along + negative local Z." () :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc + (:methods + (setup-new-process! :override-doc + "Initialize the C skeleton, apply shared rideable-arm setup, and place the collision sphere + centre 65 metres along negative local Z.") + ) ) (deftype citb-arm-d (citb-arm) + "Fourth rideable arm section, using the D skeleton and a collision centre 75 metres along + negative local Z." () :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc + (:methods + (setup-new-process! :override-doc + "Initialize the D skeleton, apply shared rideable-arm setup, and place the collision sphere + centre 75 metres along negative local Z.") + ) ) (deftype citb-arm-shoulder-a (citb-arm-shoulder) + "First visual shoulder section of the Citadel robot arm." () :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc + (:methods + (setup-new-process! :override-doc + "Initialize the first shoulder skeleton and apply shared shoulder motion and visibility.") + ) ) (deftype citb-arm-shoulder-b (citb-arm-shoulder) + "Second visual shoulder section of the Citadel robot arm." () :method-count-assert 23 :size-assert #xdc :heap-base #x70 :flag-assert #x17007000dc + (:methods + (setup-new-process! :override-doc + "Initialize the second shoulder skeleton and apply shared shoulder motion and visibility.") + ) ) (deftype citb-disc (process-drawable) + "Base for the four synchronized rotating disc platforms. The sign of the configured period + selects rotation direction, while its magnitude sets the shared phase speed." ((root collide-shape-moving :override) (sync sync-info :inline :offset-assert 176) - (rot-scale float :offset-assert 184) + (rot-scale float :offset-assert 184) ;; One or negative one, selected by the period sign. ) :method-count-assert 22 :size-assert #xbc :heap-base #x50 :flag-assert #x16005000bc (:methods - (init! (_type_) none) ;; 20 - (citb-disc-method-21 (_type_) none) ;; 21 + (init-from-entity! :override-doc + "Create the ride collision, initialize the placed drawable and subtype skeleton, load the + synchronized rotation parameters, start the rotating-platform sound, and enter idle.") + (init! + "Create an indestructible sticky mesh platform on skeleton transform 0 with one rider slot + and a twelve-metre collision sphere." + (_type_) none) ;; 20 + (init-skel! + "Initialize the disc skeleton. The base definition is intentionally empty; each lettered + variant selects its own art group." + (_type_) none) ;; 21 ) (:states - citb-disc-idle) + (citb-disc-idle + (:event + "Suppress target look-around for a quarter-second whenever the target touches the disc." + :code + "Rotate the platform from its synchronized phase and update its ambient sound."))) ) (deftype citb-disc-a (citb-disc) + "Rotating disc variant using the A skeleton." () :method-count-assert 22 :size-assert #xbc :heap-base #x50 :flag-assert #x16005000bc + (:methods + (init-skel! :override-doc "Initialize the A disc skeleton.") + ) ) (deftype citb-disc-b (citb-disc) + "Rotating disc variant using the B skeleton." () :method-count-assert 22 :size-assert #xbc :heap-base #x50 :flag-assert #x16005000bc + (:methods + (init-skel! :override-doc "Initialize the B disc skeleton.") + ) ) (deftype citb-disc-c (citb-disc) + "Rotating disc variant using the C skeleton." () :method-count-assert 22 :size-assert #xbc :heap-base #x50 :flag-assert #x16005000bc + (:methods + (init-skel! :override-doc "Initialize the C disc skeleton.") + ) ) (deftype citb-disc-d (citb-disc) + "Rotating disc variant using the D skeleton." () :method-count-assert 22 :size-assert #xbc :heap-base #x50 :flag-assert #x16005000bc + (:methods + (init-skel! :override-doc "Initialize the D disc skeleton.") + ) ) (deftype citb-iris-door (eco-door) + "Citadel iris door with a four-metre wall collision mesh and automatic distance-based closing." () :method-count-assert 27 :size-assert #x104 :heap-base #xa0 :flag-assert #x1b00a00104 + (:methods + (setup-collision! :override-doc + "Create the indestructible wall mesh on skeleton transform 0 with a four-metre collision + sphere and install it as the door root.") + (setup-skel-and-params! :override-doc + "Initialize the iris skeleton, open within eight metres, close beyond twelve metres, enable + automatic closing, and keep permanent entity state synchronized.") + ) ) (deftype citb-button (basebutton) + "Citadel floor button with a three-metre mesh contact surface and a posed up or down skeleton." () :method-count-assert 32 :size-assert #x100 :heap-base #x90 :flag-assert #x2000900100 + (:methods + (setup-skel-and-anim! :override-doc + "Initialize the button skeleton and pose its first animation channel at the final frame when + down or the first frame when up, then configure its speed and timeout.") + (setup-collision! :override-doc + "Create the button's indestructible moving mesh on skeleton transform 3 with a three-metre + collision sphere and install it as the root.") + ) ) (deftype citb-launcher (plat) + "Citadel launch platform paired with a spring launcher child. While the platform follows a path, + it forwards its base transform to that launcher." ((launcher (pointer launcher) :offset-assert 264) ) :method-count-assert 33 :size-assert #x10c :heap-base #xa0 :flag-assert #x2100a0010c + (:methods + (get-unlit-skel :override-doc "Return the Citadel launcher platform skeleton.") + (plat-path-active :override-doc + "Run the parent platform post behavior, then forward the platform's base transform to the + spring launcher child.") + (configure-options! :override-doc + "Spawn the paired spring launcher from the resource spring-height and mode, narrow the + platform collision sphere to 4.5 metres, and keep it moving while actors are paused.") + ) ) (deftype citb-robotboss (process-drawable) + "The shielded robot shell surrounding the Citadel lift. Its visible body is assembled from eight + child manipulators; the parent owns the collision, looping shield particles, sound, and events." ((root collide-shape :override) - (shield-on symbol :offset-assert 176) + (shield-on symbol :offset-assert 176) ;; Enables shield particles, sound, and palette light. ) :method-count-assert 20 :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 + (:methods + (init-from-entity! :override-doc + "Build the door's collision mesh and skeleton, find its paired door, and choose an initial + state from the player's side of the doorway, the task state, and the paired door's state.") + ) (:states - citb-robotboss-die - citb-robotboss-idle) + (citb-robotboss-die + (:code + "Clean up the assembled robot and deactivate it.")) + (citb-robotboss-idle + (:event + "Handle shield control, death, and shield-contact shove events." + :code + "Assemble and draw the eight robot sections, then maintain the shield effect while + enabled."))) + (:methods + (init-from-entity! :override-doc + "Create the robot's indestructible shell collision, initialize its skeleton and shield + effects, and remove it when the associated task is invalid; otherwise enter idle.") + ) ) (deftype citb-coil (process-drawable) - ((part-off sparticle-launch-control :offset-assert 176) + "Breakable Citadel power coil. It loops a live glow, records completion when triggered, plays its + break animation, then continually emits the powered-off effect from the dead coil." + ((part-off sparticle-launch-control :offset-assert 176) ;; Powered-off particle controller. ) :method-count-assert 20 :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 (:states - citb-coil-broken - citb-coil-idle - citb-coil-break) + (citb-coil-broken + (:code + "Pose the dead coil, then continuously emit its powered-off particles.")) + (citb-coil-idle + (:event + "Begin breaking the coil when it receives a trigger." + :code + "Loop the current live animation until a trigger begins the break." + :post + "Emit the live coil glow and update its animation.")) + (citb-coil-break + (:code + "Persist completion, blend into the death animation, and enter the broken state."))) + (:methods + (relocate :override-doc + "Relocate the powered-off particle controller when present, then relocate the drawable.") + (deactivate :override-doc + "Free powered-off particles when present, then deactivate the drawable.") + (init-from-entity! :override-doc + "Initialize the coil skeleton and live and powered-off particle controls, then enter the + broken or live state selected by the linked state actor's completion bit.") + ) ) (deftype citb-hose (process-drawable) + "Animated Citadel hose that can spit on a spawn event and permanently collapse on a trigger." () :method-count-assert 20 :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the energy-base drawable and start or stop it according to the energy-ball task.") + ) (:states - citb-hose-die - citb-hose-idle - citb-hose-spawn) + (citb-hose-die + (:code + "Persist completion, play the death animation, then remain in its final pose.")) + (citb-hose-idle + (:code + "Loop the hose's idle animation while accepting spawn and trigger events.")) + (citb-hose-spawn + (:code + "Blend into the hose spit animation once, then return to idle."))) + (:methods + (init-from-entity! :override-doc + "Initialize the hose transform and skeleton, then enter its dead or idle state according to + the linked state actor's persistent completion bit.") + ) ) (deftype citb-chains (process-hidden) @@ -25825,53 +34385,115 @@ ) (deftype citb-generator (process-drawable) + "Breakable Citadel generator. Four named generators carry an offset mushroom effect; every + generator owns intact and broken looks, particles, collision, hints, persistence, linked actor + activation, and an optional fuel-cell reward." ((root collide-shape :override) - (normal-look lod-set :inline :offset-assert 176) - (broken-look lod-set :inline :offset-assert 212) - (mushroom-pos vector :inline :offset-assert 256) - (mushroom symbol :offset-assert 272) - (birth-fuel-cell symbol :offset-assert 276) + (normal-look lod-set :inline :offset-assert 176) ;; Intact generator LODs. + (broken-look lod-set :inline :offset-assert 212) ;; Destroyed generator LODs. + (mushroom-pos vector :inline :offset-assert 256) ;; Offset particle position for named generators 1-4. + (mushroom symbol :offset-assert 272) ;; This generator carries the mushroom effect. + (birth-fuel-cell symbol :offset-assert 276) ;; Award a fuel cell after breaking. (trigger-others symbol :offset-assert 280) ; a guess - (part-broken sparticle-launch-control :offset-assert 284) - (part-mushroom sparticle-launch-control :offset-assert 288) + (part-broken sparticle-launch-control :offset-assert 284) ;; Broken-state particles. + (part-mushroom sparticle-launch-control :offset-assert 288) ;; Offset mushroom particles. ) :method-count-assert 22 :size-assert #x124 :heap-base #xc0 :flag-assert #x1600c00124 (:methods - (init! (_type_) none) ;; 20 - (citb-generator-method-21 (_type_) none) ;; 21 + (relocate :override-doc + "Relocate both optional particle controllers, then relocate the drawable.") + (deactivate :override-doc + "Free particles from both optional controllers, then deactivate the drawable.") + (init-from-entity! :override-doc + "Create collision, initialize the placed drawable and generator setup, then enter the broken + or intact state selected by the linked state actor's completion bit.") + (init! + "Create an indestructible one-metre spherical attack target centred one metre above the + generator." + (_type_) none) ;; 20 + (setup! + "Initialize intact and broken art, linked actors, fuel-cell eligibility, named mushroom + placement, all particle controllers, and the generator's ambient sound." + (_type_) none) ;; 21 ) (:states - citb-generator-broken - citb-generator-idle - citb-generator-break) + (citb-generator-broken + (:code + "Switch to broken art, award and await an optional fuel cell, trigger the two linked actor + groups in sequence, and remain in the final pose." + :post + "Emit the broken generator particles and update its animation.")) + (citb-generator-idle + (:event + "Begin breaking on attack and acknowledge a trigger without changing state." + :exit + "Stop the intact generator's ambient sound." + :code + "Maintain intact art, sound, particles, palette glow, and nearby hints until an attack + begins the break.")) + (citb-generator-break + (:code + "Open linked actors, persist completion, launch the destruction effect, and enter the + broken state."))) ) (deftype citadelcam (process-drawable) + "Controller for the Citadel staircase reveal. It waits for the blue, red, and yellow Sage tasks, + triggers the stair actors, plays the reveal camera, and presents the staircase hint." () :method-count-assert 20 :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 (:states - citadelcam-idle - citadelcam-stair-plats) + (citadelcam-idle + (:event + "Begin the staircase reveal when a trigger arrives after the blue, red, and yellow Sage + tasks are all complete." + :code + "Remain actor-paused while waiting for the staircase trigger.")) + (citadelcam-stair-plats + (:code + "Trigger every linked stair actor, wait for the staircase camera to finish, show the + platform hint, and return to the waiting state."))) + (:methods + (init-from-entity! :override-doc + "Initialize the placed transform, allow trigger handling while actor-pause is active, and + enter the waiting state.") + ) ) (deftype citb-battlecontroller (battlecontroller) + "Citadel enemy encounter variant with a thirty-five-metre activation radius and a bunny ambush + introduction camera." () :method-count-assert 29 :size-assert #x27c :heap-base #x210 :flag-assert #x1d0210027c + (:methods + (battlecontroller-play-intro-camera :override-doc + "Show the Citadel battle hint, play the bunny ambush camera, clear target invulnerability + while that camera is alive, then enter the active encounter.") + (battlecontroller-die :override-doc + "Persist encounter completion before running the base completion behavior.") + (setup-paths-and-params! :override-doc + "Apply the shared encounter resource setup and use a thirty-five-metre activation distance.") + ) ) ;; - Functions -(define-extern citb-generator-trigger-others (function none :behavior citb-generator)) -(define-extern citb-hose-event-handler (function process int symbol event-message-block object :behavior citb-hose)) +(define-extern citb-generator-trigger-others + "Trigger every alt-actor, wait half a second outside movie playback, then trigger every + trigger-actor. Birth a linked actor and retry its event when it is not already available." + (function none :behavior citb-generator)) +(define-extern citb-hose-event-handler + "Send spawn events to the hose's spit state and trigger events to its permanent death state." + (function process int symbol event-message-block object :behavior citb-hose)) ;; - Unknowns @@ -25913,8 +34535,10 @@ ;; - Types (deftype citb-base-plat (process-drawable) + "Base for Citadel platforms that sleep until Jak approaches. Active platforms update riders and + return to idle after Jak moves two metres beyond their activation radius." ((root collide-shape-moving :override) - (idle-distance float :offset-assert 176) + (idle-distance float :offset-assert 176) ;; Distance at which the platform becomes active. ) :method-count-assert 25 :size-assert #xb4 @@ -25922,32 +34546,84 @@ :flag-assert #x19005000b4 ;; inherited inspect of process-drawable (:methods - (citb-base-plat-idle () _type_ :state) ;; 20 ;; state - (citb-base-plat-method-21 (_type_) none) ;; 21 - (citb-base-plat-method-22 (_type_) none) ;; 22 - (citb-base-plat-active () _type_ :state) ;; 23 ;; state - (citb-base-plat-method-24 (_type_) none) ;; 24 + (init-from-entity! :override-doc + "Create collision and drawable state, use a sixty-metre activation radius, initialize the + subtype skeleton, enable animation, and enter the subtype's initial state.") + (citb-base-plat-idle + () _type_ :state + (:trans + "Enter the active state when Jak comes within idle-distance." + :code + "Animate while waiting for Jak.")) ;; 20 ;; state + (setup-collision! + "Create one indestructible sticky ground mesh on skeleton transform 0 with a five-metre + collision sphere and one rider slot, then install its moving shape as root." + (_type_) none) ;; 21 + (setup-skeleton! + "Initialize the ordinary Citadel platform skeleton." + (_type_) none) ;; 22 + (citb-base-plat-active + () _type_ :state + (:trans + "Return to idle when Jak leaves the activation radius by more than two metres, and update + attached riders otherwise." + :code + "Animate while the platform is active." + :post + "Update attached riders.")) ;; 23 ;; state + (go-initial-state! + "Enter the proximity-waiting idle state." + (_type_) none) ;; 24 ) ) (deftype citb-plat-eco (plat-eco) + "Citadel blue-eco platform with level-specific lit and unlit skeletons, a sticky ride surface, + and a two-metre notice distance." () :method-count-assert 33 :size-assert #x165 :heap-base #x100 :flag-assert #x2101000165 + (:methods + (setup-collision! :override-doc + "Create one indestructible sticky ground mesh on skeleton transform 0 with a three-metre + collision sphere and one rider slot, then install its moving shape as root.") + (configure-options! :override-doc + "Keep the platform active during actor pause and use a two-metre blue-eco notice distance.") + (get-unlit-skel :override-doc "Return the unlit Citadel blue-eco platform skeleton.") + (get-lit-skel :override-doc "Return the blue-eco-lit Citadel platform skeleton.") + ) ) (deftype citb-plat (plat) - ((trans-offset vector :inline :offset-assert 272) + "Citadel path platform with a resource-defined uniform scale and translation offset." + ((trans-offset vector :inline :offset-assert 272) ;; Translation added after path evaluation. ) :method-count-assert 33 :size-assert #x120 :heap-base #xb0 :flag-assert #x2100b00120 + (:methods + (get-unlit-skel :override-doc "Return the ordinary Citadel path-platform skeleton.") + (setup-collision! :override-doc + "Create one indestructible sticky ground mesh on skeleton transform 0 with a three-metre + collision sphere and one rider slot, then install its moving shape as root.") + (configure-options! :override-doc + "Keep the platform active during actor pause, apply its resource scale to art and collision, + and read the translation added to every evaluated path point.") + (plat-path-active + () _type_ :replace :state + (:trans + "Evaluate the wrapping or mirrored path phase, add the resource translation offset, play + the hover sound while the platform is within twenty metres of the listener, and move + attached riders.")) + ) ) (deftype citb-stair-plat (citb-base-plat) + "One hidden section of the Citadel staircase. A trigger reveals it after a configurable delay, + fades it in during the first twenty metres of a hundred-metre rise, and leaves it active." ((idle-height float :offset-assert 180) (rise-height float :offset-assert 184) (delay time-frame :offset-assert 192) @@ -25957,83 +34633,253 @@ :size-assert #xcc :heap-base #x60 :flag-assert #x19006000cc + (:methods + (setup-skeleton! :override-doc + "Initialize the Citadel platform skeleton, save its raised height, start it one hundred + metres below, clear its trigger, convert the delay resource to frames, and scale it by 1.5.") + (go-initial-state! :override-doc + "Start raised when the blue, red, and yellow Sage tasks are already complete; otherwise wait + hidden for the staircase trigger.") + (citb-base-plat-idle + () _type_ :replace :state + (:event + "On trigger, allow updates during actor pause and mark this stair section to rise." + :code + "Wait hidden for the trigger and configured delay, then rise for three seconds with an + ease-out curve. Fade in over the first twenty metres and enter active at full height.")) + (citb-base-plat-active + () _type_ :replace :state + (:code + "Hold the raised height, refresh collision transforms once, allow actor pausing again, and + animate in place.")) + ) ) (deftype citb-chain-plat (rigid-body-platform) - ((orig-trans vector :inline :offset-assert 736) - (orig-quat quaternion :inline :offset-assert 752) - (beam-end vector :inline :offset-assert 768) - (float-offset float :offset-assert 784) - (idle-offset float :offset-assert 788) + "Blue-eco-powered chain platform simulated as a rigid body. Rather than moving it directly, blue + eco raises a synthetic buoyancy surface sampled by five control points; a travelling wave makes + the suspended platform bob, while a beam links it to the anchor below. Losing eco lowers that + surface, then blends the platform back to its placed transform before returning to sleep." + ((orig-trans vector :inline :offset-assert 736) ;; Placed transform used as the restoring anchor. + (orig-quat quaternion :inline :offset-assert 752) ;; Placed orientation restored after floating. + (beam-end vector :inline :offset-assert 768) ;; Blue-eco beam endpoint below the anchor. + (float-offset float :offset-assert 784) ;; Powered height offset from the anchor. + (idle-offset float :offset-assert 788) ;; Unpowered height offset. ) :method-count-assert 35 :heap-base #x2b0 :size-assert #x318 :flag-assert #x2302b00318 + (:methods + (float-height-at :override-doc + "Return the placed Y plus the current float offset and a half-metre travelling wave. The wave + grows with the first ten metres of offset and varies with simulation time and X/Z position.") + (accumulate-forces! :override-doc + "Accumulate the ordinary buoyancy, drag, gravity, and player forces for this step, then add a + horizontal restoring force toward the placed anchor.") + (apply-restoring-force! :override-doc + "Apply no horizontal centering force inside 0.2 metres of the anchor; ramp the force over the + next metre and clamp it beyond that distance.") + (init-collision! :override-doc + "Create one indestructible sticky ground mesh on skeleton transform 3 with a five-metre + collision sphere and one rider slot, then install its moving shape as root-overlay.") + (init-platform! :override-doc + "Initialize art, cache the placed transform, put the beam endpoint twelve metres below it, + configure rigid-body constants and powered height, create the hover sound, and arrange five + control points on a four-metre ring.") + (rigid-body-platform-idle + () _type_ :replace :state + (:trans + "Every tenth of a second, begin floating when Jak is within seventy metres and carries blue + eco." + :code + "Animate while waiting for blue eco.")) + (rigid-body-platform-float + () _type_ :replace :state + (:enter + "Start the one-second blue-projectile window." + :exit + "Stop the hover sound." + :trans + "While nearby blue eco remains, raise the float offset at two metres per second, draw the + beam, update the hover sound, and briefly emit blue projectiles. Otherwise lower at four + metres per second and settle after reaching the idle offset." + :code + "Animate while the rigid-body post step simulates the platform.")) + ) (:states - citb-chain-plat-settle) + (citb-chain-plat-settle + (:code + "Blend position and orientation back to the placed transform over a quarter-second, reset + the rigid body there, then return to the blue-eco waiting state."))) ) (deftype citb-rotatebox (citb-base-plat) + "Large proximity-activated Citadel box whose active animation turns the ride surface." () :method-count-assert 25 :size-assert #xb4 :heap-base #x50 :flag-assert #x19005000b4 + (:methods + (setup-collision! :override-doc + "Create one indestructible sticky ground mesh on skeleton transform 3, centred five metres + below the origin with a ten-metre sphere and one rider slot.") + (setup-skeleton! :override-doc "Initialize the rotating-box skeleton.") + (citb-base-plat-active + () _type_ :replace :state + (:code + "Play complete animation cycles while Jak remains nearby, moving attached riders through + the inherited transition handler; return to idle after Jak leaves.")) + ) ) (deftype citb-donut (citb-base-plat) + "Ten-metre rotating ring platform driven by a synchronized thirty-second phase." ((sync sync-info :inline :offset-assert 180) ) :method-count-assert 25 :size-assert #xbc :heap-base #x50 :flag-assert #x19005000bc + (:methods + (setup-collision! :override-doc + "Create one indestructible sticky ground mesh on skeleton transform 0 with a ten-metre + collision sphere and one rider slot.") + (setup-skeleton! :override-doc + "Initialize the ring skeleton, configure its synchronized phase, create the rotation sound, + and keep it active during actor pause.") + (citb-base-plat-active + () _type_ :replace :state + (:post + "Update the rotation sound, rotate the root about Y from the synchronized phase, and update + attached riders.")) + ) ) (deftype citb-stopbox (plat) + "Citadel path platform that always wraps its phase rather than mirroring at the path ends." () :method-count-assert 33 :size-assert #x108 :heap-base #xa0 :flag-assert #x2100a00108 + (:methods + (get-unlit-skel :override-doc "Return the Citadel stop-box skeleton.") + (setup-collision! :override-doc + "Create one indestructible sticky rider platform on skeleton transform 0, centred two metres + below the origin with a 5.5-metre collision sphere.") + (configure-options! :override-doc + "Force wrapping path phase and keep the platform active during actor pause.") + (plat-path-active + () _type_ :replace :state + (:trans + "Evaluate the wrapping path phase, play the hover sound while within twenty metres of the + listener, and move attached riders.")) + ) ) (deftype citb-firehose (process-drawable) + "Periodic Citadel flame jet. It wakes within seventy metres, blasts whenever its synchronized + three-second phase wraps, and exposes three attack spheres only during the flame animation." ((root collide-shape :override) - (idle-distance float :offset-assert 176) + (idle-distance float :offset-assert 176) ;; Distance at which phase tracking begins. (sync sync-info :inline :offset-assert 180) - (last-sync float :offset-assert 188) - (blast-pos vector :inline :offset-assert 192) + (last-sync float :offset-assert 188) ;; Previous synchronized phase. + (blast-pos vector :inline :offset-assert 192) ;; Current flame position at skeleton node 5. ) :method-count-assert 20 :size-assert #xd0 :heap-base #x60 :flag-assert #x14006000d0 + (:methods + (init-from-entity! :override-doc + "Create the flame collision volume and three attack spheres, initialize drawable and + skeleton state, configure a three-second synchronized phase and seventy-metre activation + radius, create smoke particles, disable attacks, and enter idle.") + ) (:states - citb-firehose-idle - citb-firehose-active - citb-firehose-blast) + (citb-firehose-idle + (:trans + "Begin tracking the synchronized phase when Jak comes within seventy metres." + :code + "Sleep while the flame jet is out of range.")) + (citb-firehose-active + (:trans + "Return to idle outside seventy-two metres; otherwise start a blast whenever the + synchronized phase wraps." + :code + "Sleep between synchronized blasts.")) + (citb-firehose-blast + (:event + "Convert a touch from an enabled attack sphere into a damaging attack that shoves the + target six metres back and three metres up." + :code + "Play the opening animation, enable attack collision, emit two looping flame passes from + skeleton node 5, disable attacks, and play the closing animation before resuming phase + tracking."))) ) (deftype citb-exit-plat (plat-button) - ((idle-height float :offset-assert 240) - (rise-height float :offset-assert 244) - (activated symbol :offset-assert 248) + "Persistent Citadel exit elevator. Before activation it waits hidden seventy metres below its + path endpoint; a trigger raises it over two seconds, after which it behaves as a platform + button and carries Jak while constraining him to a thirty-metre radius." + ((idle-height float :offset-assert 240) ;; Hidden waiting height. + (rise-height float :offset-assert 244) ;; Path endpoint height. + (activated symbol :offset-assert 248) ;; Linked state actor has completed. ) :method-count-assert 33 :size-assert #xfc :heap-base #x90 :flag-assert #x21009000fc + (:methods + (can-activate? :override-doc + "Allow the exit platform to activate whenever no movie is playing.") + (setup-collision! :override-doc + "Create a thirty-metre moving collision group with one rider slot and two indestructible + sticky meshes on skeleton transforms 4 and 3, then install it as root.") + (configure-movement! :override-doc + "Force birth and prevent distance culling, read activation from the linked state actor, + choose and evaluate the proper path endpoint, and place an inactive platform seventy metres + below it. A finalboss continue starts the platform raised and records its local progress.") + (setup-skeleton! :override-doc "Initialize the Citadel exit-platform skeleton.") + (go-initial-state! :override-doc + "Enter the ordinary raised platform-button idle state when already activated; otherwise wait + hidden below the endpoint.") + (plat-button-move-downward + () _type_ :replace :state + (:trans + "Run the parent movement transition, then apply the platform displacement and radial + correction to Jak.")) + (plat-button-move-upward + () _type_ :replace :state + (:trans + "Run the parent movement transition, then apply the platform displacement and radial + correction to Jak.")) + ) (:states - citb-exit-plat-idle - citb-exit-plat-rise) + (citb-exit-plat-idle + (:event + "On trigger, record local progress and begin rising." + :code + "Wait hidden with collision disabled.")) + (citb-exit-plat-rise + (:code + "Reveal collision and rise from the hidden height to the endpoint over two seconds with an + ease-out curve, then enter the ordinary platform-button idle state."))) ) ;; - Functions -(define-extern citb-exit-plat-move-player (function vector none :behavior citb-exit-plat)) -(define-extern citb-firehose-blast-particles (function object :behavior citb-firehose)) +(define-extern citb-exit-plat-move-player + "Move Jak by the platform displacement since previous-position. When his planar offset from the + new platform centre exceeds thirty metres, also pull him back to that radius, then reset his + height tracking." + (function vector none :behavior citb-exit-plat)) +(define-extern citb-firehose-blast-particles + "Emit sixteen flame particles across a half-circle fan at blast-pos, then emit the attached smoke + group there." + (function object :behavior citb-firehose)) ;; - Unknowns @@ -26059,6 +34905,8 @@ (declare-type citb-sage process-taskable) (deftype citb-sagecage (process-drawable) + "Animated energy cage surrounding one captive Sage. Its twelve bar emitters follow skeleton + joint 3, while the collision mesh switches independently between barred and open variants." ((parent-override (pointer citb-sage) :score 100 :offset 12) (root collide-shape-moving :override) (bar-array vector 12 :inline :score 100 :offset-assert 176) @@ -26071,14 +34919,31 @@ :heap-base #x110 :flag-assert #x160110017c (:methods - (citb-sagecage-method-20 (_type_) none) ;; 20 - (citb-sagecage-method-21 (_type_) none) ;; 21 + (init-collision! + "Create the cage's moving, indestructible sticky collision sphere on skeleton transform 3, + allocate one rider slot, and install it as the drawable root." + (_type_) none) ;; 20 + (init-cage! + "Initialize cage art, bar-emitter positions, ambient sound, task-dependent bar collision, + and animation cloning from the captive Sage." + (_type_) none) ;; 21 ) (:states - citb-sagecage-idle) + (citb-sagecage-idle + (:event + "Enable or disable the visible bars and collision mesh, or start and stop copying the + captive Sage's joint animation. Stopping a clone returns the cage to its idle animation." + :code + "Copy and remap the captive Sage's joints while cloning; otherwise loop the cage animation." + :post + "Move attached riders, then update the cage hum and emit all twelve bars while enabled.")) + ) ) (deftype citb-sage (process-taskable) + "Shared captive-Sage actor. It owns an animated cage, aims a particle beam from a skeleton joint + toward the Citadel robot, and supplies the common task and cutscene behavior used by all four + Sages." ((spawn-pos vector :inline :offset-assert 384) (target-pos vector :inline :offset-assert 400) (dir vector :inline :offset-assert 416) @@ -26100,33 +34965,124 @@ :size-assert #x1e8 :heap-base #x180 :flag-assert #x35018001e8 + (:methods + (play-anim! :override-doc + "Return the configured resolution animation. commit? is accepted for compatibility with + taskable characters whose selection changes progression.") + (get-art-elem :override-doc + "Return the idle art element normally. Once the green-Sage task is invalid, enable the beam + and return the attack art element instead.") + (should-display? :override-doc + "Keep the captive Sages visible until the green-Sage task becomes invalid.") + (goto-initial-state! :override-doc + "Enter hidden when the Sages should no longer display; otherwise enter idle.") + (play-reminder :override-doc + "Finish common Sage setup: create the cage, sound and beam endpoints, select the linked + alternate actor or Citadel robot fallback, and enlarge the particle bounds to span the + complete beam.") + (process-taskable-method-45 :override-doc + "Record the current root position as the beam origin. Colored Sage overrides also copy the + computed yaw and pitch into their beam particle templates.") + (hidden + () _type_ :replace :state + (:enter + "Disable the cage bars, stop cage animation cloning, and run the ordinary hidden-state + entry behavior.")) + (play-anim + () _type_ :replace :state + (:event + "Forward disable-bars to the cage and pass other events to the taskable animation state.")) + (idle + () _type_ :replace :state + (:event + "Open the cage on an open event and pass other events to the taskable idle state." + :trans + "Hide when the shared Sage-display condition becomes false, then run the ordinary taskable + transition behavior." + :post + "Run the taskable post step and draw the beam while it is enabled.")) + ) ) (deftype red-sagecage (citb-sage) + "Red Sage captive, with red beam particles, speech, shadow bounds, and resolution animation." () :method-count-assert 53 :size-assert #x1e8 :heap-base #x180 :flag-assert #x35018001e8 + (:methods + (setup-shadow-settings! :override-doc + "Set the Red Sage shadow's bottom and top clipping planes to 2 and -1 metres, and use + world-space planes without top scissoring.") + (process-taskable-method-45 :override-doc + "Copy the current beam yaw and pitch into the Red Sage beam, glow, and impact templates.") + (play-reminder :override-doc + "Configure Red Sage art indices, beam joint and particles, resolution camera commands, and + beam sound, then perform the common captive-Sage setup.") + (try-play-ambient-chatter :override-doc + "When the beam is off, try a thirty-second, thirty-metre ambient gate and choose one of three + Red Sage lines with equal probability.") + (init-from-entity! :override-doc + "Initialize the Red Sage taskable actor, task control, animation and beam settings, red Sage + music flavor, and initial visible or hidden state.") + ) ) (deftype blue-sagecage (citb-sage) + "Blue Sage captive, with blue beam particles, speech, shadow bounds, and resolution animation." () :method-count-assert 53 :size-assert #x1e8 :heap-base #x180 :flag-assert #x35018001e8 + (:methods + (setup-shadow-settings! :override-doc + "Set the Blue Sage shadow's bottom and top clipping planes to 2.45 and -1 metres, and use + world-space planes without top scissoring.") + (process-taskable-method-45 :override-doc + "Copy the current beam yaw and pitch into the Blue Sage beam, glow, and impact templates.") + (play-reminder :override-doc + "Configure Blue Sage art indices, beam joint and particles, resolution camera and shadow + commands, and beam sound, then perform the common captive-Sage setup.") + (try-play-ambient-chatter :override-doc + "When the beam is off, try a thirty-second, thirty-metre ambient gate and choose one of three + Blue Sage lines with equal probability.") + (init-from-entity! :override-doc + "Initialize the Blue Sage taskable actor, task control, animation and beam settings, blue + Sage music flavor, and initial visible or hidden state.") + ) ) (deftype yellow-sagecage (citb-sage) + "Yellow Sage captive, with yellow beam particles, speech, shadow bounds, and resolution animation." () :method-count-assert 53 :size-assert #x1e8 :heap-base #x180 :flag-assert #x35018001e8 + (:methods + (setup-shadow-settings! :override-doc + "Set the Yellow Sage shadow's bottom and top clipping planes to 1.5 and -1 metres, and use + world-space planes without top scissoring.") + (process-taskable-method-45 :override-doc + "Copy the current beam yaw and pitch into the Yellow Sage beam, glow, and impact templates.") + (play-reminder :override-doc + "Configure Yellow Sage art indices, beam joint and particles, resolution camera commands, and + beam sound, then perform the common captive-Sage setup.") + (try-play-ambient-chatter :override-doc + "When the beam is off, try a thirty-second, thirty-metre ambient gate and choose one of three + Yellow Sage lines with equal probability.") + (init-from-entity! :override-doc + "Initialize the Yellow Sage taskable actor, task control, animation and beam settings, yellow + Sage music flavor, and initial visible or hidden state.") + ) ) (deftype green-sagecage (citb-sage) + "Green Sage captive and Citadel finale controller. It selects the rescue introduction and + pre-boss cinematics, creates temporary Gol and Maia actors and the robot boss, and hands control + to the Citadel elevator continuation." ((which-movie int32 :offset-assert 488) (evilbro handle :offset-assert 496) (evilsis handle :offset-assert 504) @@ -26137,14 +35093,58 @@ :size-assert #x210 :heap-base #x1a0 :flag-assert #x3501a00210 + (:methods + (process-taskable-method-45 :override-doc + "Copy the current beam yaw and pitch into the Green Sage beam, glow, and impact templates.") + (play-reminder :override-doc + "Configure Green Sage art indices, beam joint and particles, resolution camera commands, and + beam sound, then perform the common captive-Sage setup.") + (play-anim! :override-doc + "Select the Green Sage introduction, rescue, or pre-boss cinematic. When commit? is true, + close the rescue tasks, advance which-movie, enlarge the cinematic bounds, and create the + temporary Gol and Maia actors needed by the pre-boss scene.") + (should-display? :override-doc + "Display the Green Sage until both of his Citadel cinematics have been selected.") + (init-from-entity! :override-doc + "Initialize the Green Sage taskable actor and beam settings, clear temporary actor handles, + derive cinematic progress from task completion, and enter the initial state.") + (play-anim + () _type_ :replace :state + (:event + "On spawn-robot, create the final robot-boss animation actor and enlarge its draw bounds; + pass other events to the captive-Sage animation state." + :exit + "Deactivate temporary cinematic actors, lower the Citadel robot's shield after completed + progression, handle the PC cutscene-skip continuation, and advance into the blackout or + elevator continuation for the selected movie." + :trans + "Keep the pre-boss animation spooled, begin drawing the Green Sage beam after frame 1200, + lower the Citadel robot's shield after frame 1310, and run the taskable transition.")) + (idle + () _type_ :replace :state + (:trans + "Start the rescue introduction when Jak reaches the lower Citadel and the task needs a + hint, or start the pre-boss movie after the rescue movie has completed.")) + ) ) ;; - Functions -(define-extern citb-sage-draw-beam (function object :behavior citb-sage)) -(define-extern citb-sagecage-init-by-other (function citb-sage none :behavior citb-sagecage)) -(define-extern citb-sagecage-update-collision (function none :behavior citb-sagecage)) -(define-extern citb-sagecage-draw-bars (function none :behavior citb-sagecage)) +(define-extern citb-sage-draw-beam + "Aim the Sage beam from beam-joint to target-pos, update its particle-template direction, launch + the beam and impact effects, and play the beam sound while the listener is within 100 metres." + (function object :behavior citb-sage)) +(define-extern citb-sagecage-init-by-other + "Create a cage for parent-sage, copy its root transform, initialize cage art and collision, and + enter the cloning idle state." + (function citb-sage none :behavior citb-sagecage)) +(define-extern citb-sagecage-update-collision + "Select the barred collision mesh while bars-on is true and the open mesh otherwise." + (function none :behavior citb-sagecage)) +(define-extern citb-sagecage-draw-bars + "Orient the cage bars toward the camera and launch one bar particle at each of the twelve + skeleton-relative emitter positions." + (function none :behavior citb-sagecage)) ;; - Unknowns @@ -26167,6 +35167,9 @@ ;; - Types (deftype snow-bunny (nav-enemy) + "Hopping Snowy Mountain enemy. It patrols between path vertices, notices Jak with a vertical + leap, chases and retreats in ballistic hops, and either flees or lunges when a dangerous player + is close and approaching." ((patrol-rand-distraction int32 :offset-assert 400) (base-hop-dist float :offset-assert 404) (halfway-dist float :offset-assert 408) @@ -26193,16 +35196,149 @@ :heap-base #x190 :flag-assert #x4d01900200 (:methods - (nav-enemy-method-51 (_type_ vector vector) symbol :replace) ;; 51 - (nav-enemy-method-52 (_type_) symbol :replace) ;; 52 - (nav-enemy-method-54 (_type_) symbol :replace) ;; 54 - (nav-enemy-method-57 (_type_) symbol :replace) ;; 57 - (nav-enemy-method-60 (_type_) none :replace) ;; 60 - (snow-bunny-method-76 (_type_ symbol) none) ;; 76 + (nav-enemy-idle + () _type_ :replace :state + (:enter + "Restore the grounded shadow and run the ordinary enemy idle entry behavior." + :code + "Loop the idle animation from a random frame at a random 0.75-to-1.25 playback speed.")) + (nav-enemy-notice + () _type_ :replace :state + (:enter + "Mark the bunny hostile, enable neck tracking, skip repeated notice reactions, lower the + airborne shadow plane, and launch upward at 25-to-32 metres per second." + :trans + "Refresh the danger timer." + :code + "Play the notice takeoff, fall under gravity while turning toward Jak, play the landing, + and begin chasing.")) + (nav-enemy-patrol + () _type_ :replace :state + (:code + "Resume in the distance-appropriate idle, patrol, or notice state.")) + (initialize-collision :override-doc + "Create a moving enemy shape with one body group, two touch spheres, and one joint-6 attack + sphere. Configure a half-metre navigation radius and retain two collision iterations.") + (post-init-setup! :override-doc + "Initialize skeleton and navigation tuning, select retreat or lunge defense from resource + mode, configure jump, neck, shadow and patrol defaults, and reset the danger timer.") + (nav-enemy-method-51 + "Probe background ground below in-point. Begin gnd-popup above the point, search 10 metres + farther down, reject a missing or unsuitable surface, and write the snapped point to + out-point." + (_type_ vector vector) symbol :replace) ;; 51 + (nav-enemy-method-52 + "Choose and validate the next chase hop toward Jak. Use a random 4.4-to-5.4-metre hop, + introduce a lateral arc unless the destination is near, and honor a navigation jump event." + (_type_) symbol :replace) ;; 52 + (nav-enemy-method-53 :override-doc + "Search the patrol path from a random vertex for a grounded point at least 1.5 metres away. + Save the destination, halfway distance, and a random 1.5-to-5.4-metre base hop.") + (nav-enemy-method-54 + "Choose and validate the next patrol hop toward final-dest. Scale hop length down near the + beginning and end of the trip, add a randomized lateral arc, and honor a navigation jump + event." + (_type_) symbol :replace) ;; 54 + (nav-enemy-method-55 :override-doc + "Try two retreat headings based on Jak's facing and the direction away from him. Prefer a + complete viable hop, otherwise keep the longest grounded partial hop.") + (set-jump-height-factor! :override-doc + "Select jump animation, minimum height, distance-height factor, and animation start frame for + patrol mode 0, chase mode 1, or retreat mode 2.") + (nav-enemy-method-57 + "Return true when Jak is dangerous, within eighteen metres, and has been approaching long + enough that his estimated arrival falls inside the bunny's 0.36-second defense window." + (_type_) symbol :replace) ;; 57 + (nav-enemy-method-58 :override-doc + "Refresh last-nondangerous-time whenever Jak is not in a dangerous state.") + (nav-enemy-method-60 + "Initialize the Snow Bunny skeleton and use joint 3 as its drawable origin." + (_type_) none :replace) ;; 60 + (snow-bunny-attack + () _type_ :replace :state + (:enter + "Clear translation velocity, lower the airborne shadow plane, and start the attack." + :trans + "Face Jak while falling under gravity and move with ground collision." + :code + "Play the attack animation, wait to land, and retreat.")) + (snow-bunny-chase-hop + () _type_ :replace :state + (:enter + "Validate Jak and chase range, defend if needed, choose a chase hop, configure its + animation and ballistic motion, and lower the airborne shadow plane." + :exit + "Re-enable ordinary rotation and travel and clear the temporary navigation flag." + :trans + "Remember a pending defense response and refresh the danger timer." + :code + "Execute the hop, accept a jump-event polygon, defend when requested, and choose the next + chase hop.")) + (snow-bunny-defend + () _type_ :replace :state + (:code + "Enter retreat-hop for defensive mode 1 and lunge otherwise.")) + (snow-bunny-lunge + () _type_ :replace :state + (:enter + "Restore the grounded shadow." + :trans + "Return to patrol without a target, chase beyond eighteen metres or when Jak stops being + dangerous, and retreat when a dangerous Jak is outside notice range." + :code + "Loop the grounded idle animation.")) + (snow-bunny-nav-resume + () _type_ :replace :state + (:code + "Choose idle beyond the actor idle distance, patrol beyond notice distance, notice when Jak + is in range, and idle when there is no target.")) + (snow-bunny-patrol-hop + () _type_ :replace :state + (:enter + "Choose a patrol hop or return to idle, defend if needed, configure patrol jump motion, and + lower the airborne shadow plane." + :exit + "Re-enable ordinary rotation and travel and clear the temporary navigation flag." + :trans + "Refresh the danger timer." + :code + "Execute the hop, accept a jump-event polygon, and either pause at the destination or + continue hopping.")) + (snow-bunny-patrol-idle + () _type_ :replace :state + (:enter + "Restore the grounded shadow, clear hostility, enable turning, and start the short notice + poll timer." + :trans + "Defend when required, otherwise poll for idle distance or noticing and refresh the danger + timer." + :code + "Wait in place with randomized idle animation and periodically choose a grounded patrol + vertex to begin hopping.")) + (snow-bunny-retreat-hop + () _type_ :replace :state + (:enter + "Start or expire the mode-specific retreat timeout, choose a retreat hop or remain in + place, configure its ballistic motion, and lower the airborne shadow plane." + :exit + "Re-enable ordinary rotation and travel and clear the temporary navigation flag." + :trans + "Refresh the danger timer." + :code + "Execute the retreat hop, accept a jump-event polygon, and choose the next retreat hop.")) + (snow-bunny-tune-spheres + () _type_ :replace :state + (:code + "Do no state work while collision spheres are being tuned.")) + (set-shadow-airborne! + "Use a five-metre shadow bottom plane while airborne and the ordinary one-metre plane while + grounded." + (_type_ symbol) none) ;; 76 ) ) (deftype snow-bunny-retreat-work (structure) + "Temporary selection state for comparing the bunny's two candidate retreat hops." ((found-best basic :offset-assert 0) (using-jump-event? basic :offset-assert 4) (best-travel-dist float :offset-assert 8) @@ -26216,9 +35352,17 @@ ;; - Functions -(define-extern snow-bunny-execute-jump (function none :behavior snow-bunny)) -(define-extern snow-bunny-initialize-jump (function vector none :behavior snow-bunny)) -(define-extern snow-bunny-default-event-handler (function process int symbol event-message-block object :behavior snow-bunny)) +(define-extern snow-bunny-execute-jump + "Execute the configured Snow Bunny jump animation and solved ballistic motion." + (function none :behavior snow-bunny)) +(define-extern snow-bunny-initialize-jump + "Solve a standing Snow Bunny jump to destination using the selected height tuning and fixed + downward acceleration." + (function vector none :behavior snow-bunny)) +(define-extern snow-bunny-default-event-handler + "Die on attack, counter a successful touch with an airborne attack, and record jump-event + destinations supplied by navigation." + (function process int symbol event-message-block object :behavior snow-bunny)) ;; - Unknowns @@ -26236,13 +35380,24 @@ ;; - Types (deftype citb-bunny (snow-bunny) + "Citadel Snow Bunny variant with level-specific art, much longer notice and chase ranges, and + updates enabled during actor pause." () :method-count-assert 77 :size-assert #x200 :heap-base #x190 :flag-assert #x4d01900200 (:methods - (nav-enemy-method-48 (_type_ object) none :replace) ;; 48 ;; object passed to method 60 + (post-init-setup! + "Initialize Citadel Bunny skeleton and navigation tuning, select retreat or lunge defense + from resource mode, configure jump, neck, shadow and patrol defaults, and keep updating + during actor pause." + (_type_ object) none :replace) ;; 48 + (set-jump-height-factor! :override-doc + "Select Citadel patrol, chase, or retreat jump tuning. Patrol uses animation 6 with a 0.6 + distance factor; chase uses animation 5 with 0.6; retreat uses animation 5 with 0.4.") + (nav-enemy-method-60 :override-doc + "Initialize the Citadel Bunny skeleton and use joint 3 as its drawable origin.") ) ) @@ -26253,14 +35408,16 @@ ;; ---------------------- -;; File - citb-drop-plat-CIT -;; Source Path - levels/citadel/citb-drop-plat-CIT.gc +;; File - citb-drop-plat +;; Source Path - levels/citadel/citb-drop-plat.gc ;; Containing DGOs - ['CIT'] ;; Version - 3 ;; - Types (deftype drop-plat (process-drawable) + "A colored Citadel floor tile that rises into place, reports player contact to its controller, + and eventually tumbles into the pit." ((root collide-shape-moving :override) (spin-axis vector :inline :offset-assert 176) (spin-angle float :offset-assert 192) @@ -26275,18 +35432,45 @@ :heap-base #x80 :flag-assert #x16008000e1 (:methods - (drop-plat-method-20 (_type_) none) ;; 20 - (drop-plat-method-21 (_type_) none) ;; 21 + (setup-collision! + "Create the tile's moving collision shape, sticky rider mesh, and navigation radius." + (_type_) none) ;; 20 + (init-skeleton-and-spin! + "Select the skeleton for this color and choose a random tumble axis and speed." + (_type_) none) ;; 21 ) (:states - drop-plat-spawn - drop-plat-die - drop-plat-idle - drop-plat-drop - (drop-plat-rise draw-control)) + (drop-plat-spawn + (:event + "Die immediately when the controller drops this tile before it has risen." + :code + "Wait below the controller for the per-tile delay, then reveal the tile and begin rising.")) + (drop-plat-die + (:code + "Remove the tile and release its process resources.")) + (drop-plat-idle + (:event + "Begin falling on drop, or report this tile's color when Jak touches or attacks it." + :code + "Keep the tile fixed in place until its configured lifetime expires.")) + (drop-plat-drop + (:code + "Wobble briefly when still seated, then tumble downward under gravity until out of view." + :post + "Apply the tumble rotation, height fade, and drawable transform.")) + (drop-plat-rise + (:event + "Begin falling immediately when the controller sends drop." + :code + "Rise from fifty metres below the controller with an ease-out motion while slowing the + initial tumble." + :post + "Apply the tumble rotation, height fade, and drawable transform.") + draw-control)) ) (deftype handle-inline-array (inline-array-class) + "Inline storage for the controller's dynamically sized child-handle array." ((data handle :dynamic :offset-assert 16) ) :method-count-assert 9 @@ -26295,6 +35479,7 @@ ) (deftype citb-drop-plat (process-drawable) + "Controller for a rectangular grid of colored drop tiles." ((x-count int32 :offset-assert 176) (z-count int32 :offset-assert 180) (child-count int32 :offset-assert 184) @@ -26313,18 +35498,44 @@ :size-assert #x120 :heap-base #xb0 :flag-assert #x1400b00120 + (:methods + (init-from-entity! :override-doc + "Build the tile-grid transform and child storage from entity resources, center the grid at + four-metre spacing, and enter its idle state.") + (relocate :override-doc + "Adjust the optional inline child-array pointer by offset, then relocate the base drawable + process.")) (:states - citb-drop-plat-idle - citb-drop-plat-active) + (citb-drop-plat-idle + (:event + "Spawn a new tile grid when triggered." + :code + "Drop any remaining children and wait for activation.")) + (citb-drop-plat-active + (:event + "Drop tiles matching the stepped color, or clear the grid when triggered." + :code + "Run the tile grid until its lifetime expires, Jak leaves, or all children are gone."))) ) ;; - Functions -(define-extern citb-drop-plat-spawn-children (function none :behavior citb-drop-plat)) -(define-extern citb-drop-plat-drop-children (function int none :behavior citb-drop-plat)) -(define-extern citb-drop-plat-drop-all-children (function symbol :behavior citb-drop-plat)) -(define-extern drop-plat-init-by-other (function vector time-frame time-frame int none :behavior drop-plat)) -(define-extern drop-plat-set-fade (function none :behavior drop-plat)) +(define-extern citb-drop-plat-spawn-children + "Spawn the colored tile grid one row at a time, beginning on the side nearest Jak." + (function none :behavior citb-drop-plat)) +(define-extern citb-drop-plat-drop-children + "Drop all live child tiles whose color matches color. Color 6 leaves every tile in place." + (function int none :behavior citb-drop-plat)) +(define-extern citb-drop-plat-drop-all-children + "Drop every live child tile and clear its stored handle." + (function symbol :behavior citb-drop-plat)) +(define-extern drop-plat-init-by-other + "Initialize a child tile at position with its spawn delay, lifetime, and color." + (function vector time-frame time-frame int none :behavior drop-plat)) +(define-extern drop-plat-set-fade + "Fade the tile through the last twenty metres before it reaches fifty metres below its + controller." + (function none :behavior drop-plat)) ;; - Unknowns @@ -26344,11 +35555,33 @@ ;; - Types (deftype assistant-lavatube-end (process-taskable) + "Keira's end-of-Lava-Tube task character, shown until the Citadel rescue sequence begins." () :method-count-assert 53 :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (play-anim! :override-doc + "Select the Lava Tube introduction or resolution animation for the current task stage, and + close the current stage when commit? is true.") + (hidden + () _type_ :replace :state + (:trans + "Prefetch the current animation, run the shared hidden transition, and test whether Jak is + within fifteen metres while reward speech remains open.")) + (idle + () _type_ :replace :state + (:enter + "Run the shared idle entry and request the resolution animation when reward speech is due." + :code + "Keep the ordinary idle animation playing on the active root channel.")) + (should-display? :override-doc + "Display Keira only for reward speech or an invalid task stage, and hide her once the Green + Sage rescue has reached need-hint.") + (init-from-entity! :override-doc + "Initialize Keira as the Lava Tube task character, bind the village4-button task, and enter + the initial taskable state.")) ) ;; - Unknowns @@ -26365,6 +35598,8 @@ ;; - Types (deftype cavecrystal (process-drawable) + "An attack-activated Dark Cave crystal that drives one slot of the shared crystal lighting and + updates connected cave lights." ((root collide-shape :override) (is-master? symbol :offset-assert 176) (crystal-id int32 :offset-assert 180) @@ -26387,12 +35622,38 @@ :heap-base #xd0 :flag-assert #x1600d00140 (:methods - (update-connected-crystals! (_type_) none) ;; 20 - (compute-glow (_type_) float) ;; 21 + (deactivate :override-doc + "Stop the crystal sound, then perform ordinary drawable deactivation.") + (init-from-entity! :override-doc + "Create crystal collision, assign its linked-light index and master role, initialize art and + lighting, start the ambient sound, and enter idle.") + (update-connected-crystals! + "Have the master crystal update connected lighting at most once per game tick." + (_type_) none) ;; 20 + (compute-glow + "Compute glow intensity after activation: ramp to two, settle to a pulsing one, hold until + timeout, then fade to zero." + (_type_) float) ;; 21 ) (:states - cavecrystal-active - cavecrystal-idle) + (cavecrystal-active + (:event + "Restart the glow only for a new player attack id." + :enter + "Enable active updates and reset the glow timing." + :exit + "Stop the crystal sound and let non-master crystals pause again." + :trans + "Update crystal colors and shared light intensity, returning to idle after the fade." + :code + "Sleep until the next state transition.")) + (cavecrystal-idle + (:event + "Activate when attacked." + :trans + "Offer the nearby lighting hint and let the master update connected lights." + :code + "Sleep while inactive."))) ) ;; - Unknowns @@ -26411,7 +35672,10 @@ ;; - Functions (declare-type static-screen process) -(define-extern static-screen-spawn (function int texture-id texture-id texture-id time-frame symbol process-tree (pointer static-screen))) +(define-extern static-screen-spawn + "Spawn a three-texture static screen for owner, keep it for duration, and optionally allow + dismissal after one second." + (function int texture-id texture-id texture-id time-frame symbol process-tree (pointer static-screen))) ;; ---------------------- @@ -26423,6 +35687,8 @@ ;; - Types (deftype static-screen (process) + "A full-screen card assembled from three screen-space particles and faded through background + alpha settings." ((part sparticle-launch-control 1 :offset-assert 112) (state-time time-frame :offset-assert 120) ) @@ -26431,13 +35697,28 @@ :heap-base #x10 :flag-assert #xf00100080 (:methods - (idle (int time-frame symbol) _type_ :state) ;; 14 + (relocate :override-doc + "Relocate the process allocation and its particle launch-control pointer.") + (deactivate :override-doc + "Free the screen particles, then perform ordinary process deactivation.") + (idle + (int time-frame symbol) _type_ :state + (:enter + "Fade the background out and select the requested common texture page." + :trans + "Hide the HUD and spawn the three screen particles." + :code + "Wait for duration or an allowed button dismissal, fade the background back in, and + release the texture page.")) ;; 14 ) ) ;; - Functions -(define-extern static-screen-init-by-other (function int texture-id texture-id texture-id time-frame symbol none :behavior static-screen)) +(define-extern static-screen-init-by-other + "Bind the three texture ids to the shared screen particle group and enter idle with the requested + page, duration, and dismissal policy." + (function int texture-id texture-id texture-id time-frame symbol none :behavior static-screen)) ;; ---------------------- @@ -26450,6 +35731,7 @@ ;; definition of type robotboss-dda (deftype robotboss-dda (structure) + "Difficulty-dependent timing and attack-count tuning for the robot boss's color phases." ((blue-bomb-time float :offset-assert 0) (num-blobs int32 :offset-assert 4) (green-bomb-time float :offset-assert 8) @@ -26469,6 +35751,7 @@ ) (deftype robotboss (process-drawable) + "State shared by the Final Citadel robot boss's four color phases and cinematics." ((root collide-shape-moving :override) ;; custom (alts entity-actor 13 :offset-assert 176) (desired-loc vector :inline :offset-assert 240) @@ -26505,7 +35788,18 @@ :size-assert #x1d0 :flag-assert #x15016001d0 (:methods - (ease-loc-t (_type_) float) ;; 20 + (relocate :override-doc + "Relocate the boss's particle controllers, looping sounds, optional gun joint modifier, and + inherited drawable state.") + (deactivate :override-doc + "Free the boss's particle controllers, stop its looping sounds, and deactivate the inherited + drawable state.") + (init-from-entity! :override-doc + "Build the boss collision meshes and navigation controls, bind its art and alternate actors, + create its particle and sound controls, initialize fight state, and enter the blue phase.") + (ease-loc-t + "Apply a clamped sine ease to the boss's current location interpolation parameter." + (_type_) float) ;; 20 ) (:states robotboss-blue-wait @@ -26529,7 +35823,9 @@ ;; - Functions -(define-extern target-has-all-the-cells? (function symbol :behavior process)) +(define-extern target-has-all-the-cells? + "Return true when Jak exists and reports at least 100 fuel cells." + (function symbol :behavior process)) ;; ---------------------- @@ -26540,8 +35836,12 @@ ;; - Functions -(define-extern check-drop-level-eichar-lighteco-pops (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern check-drop-level-bigdoor-open-pops (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-eichar-lighteco-pops + "Kill a falling light-eco particle below its stored height and launch its two impact effects." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-bigdoor-open-pops + "Kill a falling big-door particle below its stored height and launch its two impact effects." + (function sparticle-system sparticle-cpuinfo vector none)) ;; ---------------------- @@ -26553,6 +35853,7 @@ ;; - Types (deftype light-eco-child (process-drawable) + "A collectible white-eco fragment launched from the larger eco source." ((root collide-shape :override) (angle-bit int32 :offset-assert 176) (ground-y float :offset-assert 180) @@ -26568,7 +35869,9 @@ :flag-assert #x1500b00118 ;; inherited inspect of process-drawable (:methods - (common-trans (_type_) none) ;; 20 + (common-trans + "Update the fragment's tumbling orientation and particle trail once per frame." + (_type_) none) ;; 20 ) (:states light-eco-child-grabbed @@ -26580,6 +35883,7 @@ ) (deftype light-eco-mother (process-drawable) + "The large white-eco source that periodically launches collectible fragments around itself." ((player-got-eco? symbol :offset-assert 176) (angle-mask int64 :offset-assert 184) (delay-til-spawn int32 :offset-assert 192) @@ -26592,8 +35896,16 @@ :heap-base #x70 :flag-assert #x16007000d8 (:methods - (spawn-child-eco (_type_) symbol) ;; 20 - (common-trans (_type_) none) ;; 21 + (deactivate :override-doc + "Free the growing particle controller, then perform the inherited projectile cleanup.") + (relocate :override-doc + "Relocate the growing particle controller and inherited projectile state.") + (spawn-child-eco + "Try four random unoccupied directions and launch one fragment away from Jak." + (_type_) symbol) ;; 20 + (common-trans + "Update the source's rotation, particles, sound, and delayed fragment spawning once per frame." + (_type_) none) ;; 21 ) (:states light-eco-mother-discipate @@ -26604,12 +35916,24 @@ ;; - Functions -(define-extern light-eco-child-init-by-other (function entity-actor vector vector int none :behavior light-eco-child)) -(define-extern check-drop-level-lighteco-big-pops (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern check-drop-level-lighteco-pops (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern light-eco-child-default-event-handler (function process int symbol event-message-block object :behavior light-eco-child)) -(define-extern light-eco-mother-default-event-handler (function process int symbol event-message-block object :behavior light-eco-mother)) -(define-extern light-eco-mother-init-by-other (function entity-actor vector none :behavior light-eco-mother)) +(define-extern light-eco-child-init-by-other + "Initialize a fragment's collision, trajectory, tumble, particles, and occupied direction bit." + (function entity-actor vector vector int none :behavior light-eco-child)) +(define-extern check-drop-level-lighteco-big-pops + "Kill a falling large light-eco particle below its stored height and launch its impact effects." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-lighteco-pops + "Kill a falling light-eco particle below its stored height and launch its impact effects." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern light-eco-child-default-event-handler + "Let Jak collect the fragment, notify its source, and enter the grabbed state." + (function process int symbol event-message-block object :behavior light-eco-child)) +(define-extern light-eco-mother-default-event-handler + "Release occupied directions, report the first collected white eco, or begin dissipating." + (function process int symbol event-message-block object :behavior light-eco-mother)) +(define-extern light-eco-mother-init-by-other + "Initialize the white-eco source, its skeleton, particles, sound, and reserved spawn directions." + (function entity-actor vector none :behavior light-eco-mother)) ;; - Unknowns @@ -26626,6 +35950,7 @@ ;; - Types (deftype torus (structure) + "A collision and debug-drawing torus defined by a center, axis, ring radius, and tube radius." ((origin vector :inline :offset-assert 0) (axis vector :inline :offset-assert 16) (radius-primary float :offset-assert 32) @@ -26635,10 +35960,20 @@ :size-assert #x28 :flag-assert #xd00000028 (:methods - (torus-method-9 (_type_ vector) none) ;; 9 - (torus-method-10 (_type_ collide-prim-core vector) symbol) ;; 10 - (torus-method-11 (_type_ vector) symbol) ;; 11 - (torus-method-12 (_type_ vector) vector) ;; 12 + (debug-draw + "Draw the torus as wireframe rings in the given color." + (_type_ vector) none) ;; 9 + (prim-overlaps? + "Return true when a collision primitive's world sphere overlaps the torus tube, writing the + closest-axis delta to the output vector." + (_type_ collide-prim-core vector) symbol) ;; 10 + (target-overlaps? + "Return true when any of Jak's collision primitives overlaps the torus, writing the hit delta + to the output vector." + (_type_ vector) symbol) ;; 11 + (random-surface-point + "Generate and return a random point on the torus surface in the output vector." + (_type_ vector) vector) ;; 12 ) ) @@ -26694,6 +36029,7 @@ ) (deftype redshot (arcing-shot) + "A rotating red-eco ring projectile that stalls, expands around Jak, and tests torus contact." ((flight-time time-frame :offset-assert 224) (stall-time time-frame :offset-assert 232) (ring torus :inline :offset-assert 240) @@ -26706,6 +36042,11 @@ :size-assert #x130 :heap-base #xc0 :flag-assert #x1400c00130 + (:methods + (relocate :override-doc + "Relocate both particle controllers and the inherited arcing-shot state.") + (deactivate :override-doc + "Free both particle controllers, then perform inherited arcing-shot cleanup.")) (:states redshot-idle redshot-wait @@ -26728,7 +36069,9 @@ (define-extern arcing-shot-setup (function vector vector float float :behavior arcing-shot)) (define-extern arcing-shot-calculate (function vector float float :behavior arcing-shot)) (define-extern redshot-trans (function time-frame none :behavior redshot)) -(define-extern redshot-particle-callback (function part-tracker none)) +(define-extern redshot-particle-callback + "Scale the red-shot particle ring from the owning shot's current primary radius." + (function part-tracker none)) (define-extern darkecobomb-explode-if-player-high-enough (function none :behavior darkecobomb)) (define-extern arcing-shot-draw (function symbol :behavior arcing-shot)) (define-extern darkecobomb-handler (function process int symbol event-message-block object :behavior darkecobomb)) @@ -26754,6 +36097,7 @@ ;; - Types (deftype ecoclaw-part-info (structure) + "One tracked particle effect and its launch position on the robot boss's eco claw." ((tracker handle :offset-assert 0) (kind basic :offset-assert 8) (trans vector :inline :offset-assert 16) @@ -26764,18 +36108,23 @@ ) (deftype ecoclaw (process-drawable) + "The robot boss's eco claw and its three tracked beam particle effects." ((particles ecoclaw-part-info 3 :inline :offset-assert 176) ) :method-count-assert 20 :size-assert #x110 :heap-base #xa0 :flag-assert #x1400a00110 + (:methods + (init-from-entity! :override-doc + "Initialize the claw skeleton, clear its tracked particle slots, and publish the active claw.")) (:states ecoclaw-idle ecoclaw-activate) ) (deftype silodoor (process-drawable) + "The animated final-boss silo door and its four-piece moving collision platform." ((part-opened float :offset-assert 176) ) :method-count-assert 22 @@ -26783,26 +36132,42 @@ :heap-base #x50 :flag-assert #x16005000b4 (:methods + (init-from-entity! :override-doc + "Build the four-piece rider collision, initialize the door skeleton and movement sound, and + enter the visible idle state.") (idle () _type_ :state) ;; 20 (hidden () _type_ :state) ;; 21 ) ) (deftype finalbosscam (process-taskable) + "A task-controlled final-boss cinematic actor that can animate a cloned robot boss." ((robotboss handle :offset-assert 384) ) :method-count-assert 53 :size-assert #x188 :heap-base #x120 :flag-assert #x3501200188 + (:methods + (get-art-elem :override-doc + "Return the third art-group element used by the cinematic actor.") + (should-display? :override-doc + "Keep this task actor itself hidden.") + (play-anim! :override-doc + "Optionally spawn and configure a cloned robot boss, then return the white-eco cinematic + animation.")) ) ;; - Functions (define-extern robotboss-manipy-trans-hook (function none :behavior robotboss)) -(define-extern ecoclaw-beam-particle-callback (function part-tracker none)) +(define-extern ecoclaw-beam-particle-callback + "Aim the claw's beam particle launchers along the tracked projectile segment." + (function part-tracker none)) (define-extern ecoclaw-handler (function process int symbol event-message-block object :behavior ecoclaw)) -(define-extern finalbosscam-init-by-other (function entity-actor none :behavior finalbosscam)) +(define-extern finalbosscam-init-by-other + "Initialize the final-boss cinematic actor and bind it to the final-boss movie task." + (function entity-actor none :behavior finalbosscam)) ;; - Unknowns @@ -26822,6 +36187,8 @@ ;; - Types (deftype green-eco-lurker (nav-enemy) + "A green-eco blob enemy that chooses an appearance point from its path, jumps into the arena, + and attacks Jak on contact." ((played-sound? symbol :offset-assert 400) (sound-delay int32 :offset-assert 404) (appear-dest vector :inline :offset-assert 416) @@ -26832,7 +36199,30 @@ :heap-base #x170 :flag-assert #x4c017001d8 (:methods - (nav-enemy-method-51 (_type_ vector) symbol :replace) ;; 51 + (attack-handler :override-doc + "Attack Jak on contact and notify the generator on a successful hit; otherwise use the + inherited directional hit response.") + (nav-enemy-attack-handler :override-doc + "Attack Jak and notify the generator during jump states; delegate other attackers.") + (touch-handler :override-doc + "Apply the blob's contact attack when its enabled touch sphere overlaps Jak.") + (nav-enemy-touch-handler :override-doc + "Apply the blob's contact attack through the jump-state touch-handler slot.") + (initialize-collision :override-doc + "Create the blob's moving collision shape with three body touch spheres and four joint attack + spheres, a two-metre navigation radius, and two collision iterations.") + (post-init-setup! :override-doc + "Initialize the blob skeleton, navigation tuning, appearance shadow, and neck joint indices.") + (appear-dest-valid? + "Return whether a candidate path point is far enough from Jak and unblocked for appearance." + (_type_ vector) symbol :overlay-at nav-enemy-method-51) ;; 51 + (pick-appear-dest? + "Scan path vertices from a random starting point and write the first valid appearance point." + (_type_ vector) symbol :overlay-at nav-enemy-method-52) ;; 52 + (update-appear-shadow! + "Show and clamp the appearance shadow around the destination at full visible LOD; otherwise + hide it." + (_type_) symbol :overlay-at nav-enemy-method-53) ;; 53 ) (:states green-eco-lurker-appear @@ -26842,6 +36232,7 @@ ) (deftype green-eco-lurker-gen (process-drawable) + "Spawns a fixed number of green-eco blobs, at most three alive at once, and reports completion." ((num-to-spawn int32 :offset-assert 176) (num-spawned int32 :offset-assert 180) (num-alive int32 :offset-assert 184) @@ -26856,8 +36247,12 @@ ;; - Functions -(define-extern green-eco-lurker-init-by-other (function entity-actor green-eco-lurker-gen vector none :behavior green-eco-lurker)) -(define-extern green-eco-lurker-gen-init-by-other (function entity-actor vector int none :behavior green-eco-lurker-gen)) +(define-extern green-eco-lurker-init-by-other + "Initialize one blob at the requested position and enter its hidden appearance search." + (function entity-actor green-eco-lurker-gen vector none :behavior green-eco-lurker)) +(define-extern green-eco-lurker-gen-init-by-other + "Initialize a blob generator at the requested position with the total spawn count." + (function entity-actor vector int none :behavior green-eco-lurker-gen)) ;; - Unknowns @@ -26892,28 +36287,72 @@ ;; - Functions -(define-extern robotboss-always-trans (function (state robotboss) none :behavior robotboss)) ;; CFG problems TODO -(define-extern robotboss-shooting-trans (function int none :behavior robotboss)) -(define-extern robotboss-blue-done (function object :behavior robotboss)) -(define-extern robotboss-blue-beam (function int symbol none :behavior robotboss)) -(define-extern robotboss-position (function object :behavior robotboss)) -(define-extern robotboss-cut-cam (function float float int none :behavior robotboss)) -(define-extern robotboss-set-dda (function none :behavior robotboss)) ;; TODO - what structure type does this return? -(define-extern robotboss-cut-cam-exit (function none :behavior robotboss)) -(define-extern robotboss-setup-for-hits (function int int object :behavior robotboss)) -(define-extern robotboss-yellow-eco-on (function none :behavior robotboss)) -(define-extern robotboss-yellow-eco-off (function none :behavior robotboss)) -(define-extern robotboss-greenshot (function vector float int symbol none :behavior robotboss)) -(define-extern robotboss-handler (function process int symbol event-message-block object :behavior robotboss)) -(define-extern robotboss-darkecobomb (function vector float (pointer part-tracker) :behavior robotboss)) -(define-extern robotboss-is-red-hit (function symbol :behavior robotboss)) -(define-extern robotboss-redshot-fill-array (function redshot-launch-array none :behavior robotboss)) -(define-extern robotboss-redshot (function redshot-launch-info symbol sound-id :behavior robotboss)) ;; run-func-in-process edge-case -(define-extern robotboss-time-to-shoot-yellow (function symbol :behavior robotboss)) -(define-extern robotboss-is-yellow-hit (function symbol :behavior robotboss)) -(define-extern robotboss-yellowshot (function none :behavior robotboss)) -(define-extern robotboss-bomb-handler (function process int symbol event-message-block object :behavior robotboss)) -(define-extern robotboss-anim-blend-loop (function art-joint-anim none :behavior robotboss)) +(define-extern robotboss-always-trans + "Update the boss's smoke and palette fade, manage fight cameras, and permit the debug state jump." + (function (state robotboss) none :behavior robotboss)) ;; CFG problems TODO +(define-extern robotboss-shooting-trans + "Move the active shot attractor to the selected skeleton joint." + (function int none :behavior robotboss)) +(define-extern robotboss-blue-done + "Turn off the yellow-eco pieces and reveal the dark-eco bomb actor after the blue phase." + (function object :behavior robotboss)) +(define-extern robotboss-blue-beam + "Update the blue beam and impact effects from a skeleton joint and apply their contact attacks." + (function int symbol none :behavior robotboss)) +(define-extern robotboss-position + "Ease the boss between arena offsets, face it toward the arena center, and update the camera pivot." + (function object :behavior robotboss)) +(define-extern robotboss-cut-cam + "Use the boss camera joint during the selected animation frame interval unless Jak skips the shot." + (function float float int none :behavior robotboss)) +(define-extern robotboss-set-dda + "Select the boss attack timings and counts from the saved final-boss difficulty value." + (function none :behavior robotboss)) ;; TODO - what structure type does this return? +(define-extern robotboss-cut-cam-exit + "Release Jak and restore normal camera and skeleton state after a boss cutaway." + (function none :behavior robotboss)) +(define-extern robotboss-setup-for-hits + "Reset the current hit target and spawn the visible shot-attractor marker." + (function int int object :behavior robotboss)) +(define-extern robotboss-yellow-eco-on + "Show the four yellow-eco pieces." + (function none :behavior robotboss)) +(define-extern robotboss-yellow-eco-off + "Hide the four yellow-eco pieces." + (function none :behavior robotboss)) +(define-extern robotboss-greenshot + "Launch a green shot toward an arena-relative destination, optionally with launch effects." + (function vector float int symbol none :behavior robotboss)) +(define-extern robotboss-handler + "Handle the boss's palette flash and vulnerable-part attack events." + (function process int symbol event-message-block object :behavior robotboss)) +(define-extern robotboss-darkecobomb + "Launch a dark-eco bomb toward an arena-relative destination." + (function vector float (pointer part-tracker) :behavior robotboss)) +(define-extern robotboss-is-red-hit + "Return whether either red-damage animation is playing." + (function symbol :behavior robotboss)) +(define-extern robotboss-redshot-fill-array + "Generate six separated red-shot destinations and staggered flight and stall times." + (function redshot-launch-array none :behavior robotboss)) +(define-extern robotboss-redshot + "Launch one configured red shot and optionally play its launch effect and sound." + (function redshot-launch-info symbol sound-id :behavior robotboss)) ;; run-func-in-process edge-case +(define-extern robotboss-time-to-shoot-yellow + "Return whether the yellow gun's randomized shot delay has elapsed." + (function symbol :behavior robotboss)) +(define-extern robotboss-is-yellow-hit + "Return whether either yellow-damage animation is playing." + (function symbol :behavior robotboss)) +(define-extern robotboss-yellowshot + "Launch a yellow shot toward Jak and play its launch effects." + (function none :behavior robotboss)) +(define-extern robotboss-bomb-handler + "Handle palette flashes and dark-bomb progress events." + (function process int symbol event-message-block object :behavior robotboss)) +(define-extern robotboss-anim-blend-loop + "Blend indefinitely between the requested animation and the current channel as location easing advances." + (function art-joint-anim none :behavior robotboss)) ;; - Unknowns @@ -26931,6 +36370,7 @@ ;; - Types (deftype fin-door (process-hidden) + "Hidden final-door controller." () :method-count-assert 15 :size-assert #x70 @@ -26938,6 +36378,7 @@ ) (deftype final-door (process-drawable) + "Base for the paired final-boss doors." () :method-count-assert 23 :size-assert #xb0 @@ -26945,13 +36386,18 @@ :flag-assert #x17004000b0 ;; not enough basic ops (:methods + (init-from-entity! :override-doc + "Build the door collision mesh, bind its entity, initialize the subtype skeleton, and enter idle.") (idle () _type_ :state) ;; 20 ;; state - (final-door-method-21 (_type_) none) ;; 21 + (setup-skeleton! + "Initialize the door's subtype-specific skeleton." + (_type_) none) ;; 21 (open (symbol) _type_ :state) ;; 22 ) ) (deftype power-left (final-door) + "Left half of the paired final-boss door." () :method-count-assert 23 :size-assert #xb0 @@ -26960,6 +36406,7 @@ ) (deftype power-right (final-door) + "Right half of the paired final-boss door." () :method-count-assert 23 :size-assert #xb0 @@ -26968,6 +36415,7 @@ ) (deftype powercellalt (process-drawable) + "A temporary fuel-cell duplicate that jumps from Jak to a door skeleton joint." ((root collide-shape-moving :override) (jump-pos vector :inline :offset-assert 176) (base vector :inline :offset-assert 192) @@ -26986,7 +36434,9 @@ ;; - Functions -(define-extern powercellalt-init-by-other (function entity-actor vector vector int none :behavior powercellalt)) +(define-extern powercellalt-init-by-other + "Initialize a fuel-cell duplicate at its launch point and send it toward a door joint." + (function entity-actor vector vector int none :behavior powercellalt)) ;; - Unknowns @@ -27004,6 +36454,7 @@ ;; - Types (deftype plat-eco-finalboss (plat-eco) + "A final-boss eco platform that moves between path endpoints based on Jak's position and contact." ((force-dest float :offset-assert 360) (targ-dest float :offset-assert 364) (dest float :offset-assert 368) @@ -27014,9 +36465,18 @@ :size-assert #x180 :heap-base #x110 :flag-assert #x2101100180 + (:methods + (get-unlit-skel :override-doc + "Return the unlit final-boss eco-platform skeleton group.") + (get-lit-skel :override-doc + "Return the lit final-boss eco-platform skeleton group.") + (configure-options! :override-doc + "Reset path targets and speed, enable actor updates, and keep the platform alive offscreen.") + ) ) (deftype sage-finalboss-particle (structure) + "One controllable particle effect used by the final-boss cinematic." ((part sparticle-launch-control :offset-assert 0) (active symbol :offset-assert 4) ) @@ -27027,6 +36487,7 @@ ) (deftype sage-finalboss (process-taskable) + "Coordinates the final-boss cinematics, sages, doors, credits, and their particle effects." ((redsage handle :offset-assert 384) (bluesage handle :offset-assert 392) (yellowsage handle :offset-assert 400) @@ -27049,15 +36510,41 @@ :size-assert #x270 :heap-base #x200 :flag-assert #x3502000270 + (:methods + (relocate :override-doc + "Relocate the cinematic particle controls and inherited taskable state.") + (deactivate :override-doc + "Free all cinematic particle controls and deactivate the inherited taskable process.") + (play-reminder :override-doc + "Spawn the red, blue, and yellow sage doubles used by the current cinematic.") + (setup-assistant! + "Spawn and configure the assistant double used by the final-boss cinematics." + (_type_) symbol :overlay-at process-taskable-method-45) + (play-anim! :override-doc + "Select the cinematic for the current task stage; commit? applies the associated task and + actor setup when playback begins.") + (get-art-elem :override-doc + "Return the sage cage art element used for taskable animation playback.") + (should-display? :override-doc + "Keep this cinematic controller hidden during ordinary idle processing.") + (init-from-entity! :override-doc + "Initialize the taskable cinematic controller, particle controls, actor handles, and task state.") + ) (:states sage-finalboss-credits) ) ;; - Functions -(define-extern sage-finalboss-extra-enter (function none :behavior sage-finalboss)) -(define-extern sage-finalboss-extra-trans (function none :behavior sage-finalboss)) -(define-extern sage-finalboss-credit-particle (function none :behavior sage-finalboss)) +(define-extern sage-finalboss-extra-enter + "Start pending door or credits sequences when the controller enters an idle state." + (function none :behavior sage-finalboss)) +(define-extern sage-finalboss-extra-trans + "Start a reminder cinematic when the final-boss task requests one." + (function none :behavior sage-finalboss)) +(define-extern sage-finalboss-credit-particle + "Update and launch the fading two-dimensional credits mist." + (function none :behavior sage-finalboss)) ;; - Unknowns @@ -27077,20 +36564,38 @@ ;; - Types (deftype evilbro (process-taskable) + "Gol's taskable actor for the Misty Island closing cinematic." ((evilsis entity-actor :offset-assert 380) ) :method-count-assert 53 :heap-base #x110 :size-assert #x180 :flag-assert #x3501100180 + (:methods + (play-anim! :override-doc + "Select Gol's Misty Island cinematic; commit? advances the task and starts Maia's clone.") + (get-art-elem :override-doc + "Return Gol's active root animation art element.") + (init-from-entity! :override-doc + "Initialize Gol's taskable actor and bind the alternate Maia actor.") + ) ) (deftype evilsis (process-taskable) + "Maia's taskable actor for the Misty Island closing cinematic." () :method-count-assert 53 :heap-base #x110 :size-assert #x17c :flag-assert #x350110017c + (:methods + (play-anim! :override-doc + "Return Maia's current art element; committing is invalid because Gol drives this clone.") + (get-art-elem :override-doc + "Return Maia's active root animation art element.") + (init-from-entity! :override-doc + "Initialize Maia's taskable actor for the leaving-Misty task.") + ) ) ;; - Unknowns @@ -27108,6 +36613,7 @@ ;; - Types (deftype eggtop (process-drawable) + "The Blue Eco vent cap, which closes after its fuel cell is collected and plays the reveal camera." ((root collide-shape-moving :override) (cam-tracker handle :offset-assert 176) (sound-id sound-id :offset-assert 184) @@ -27116,17 +36622,28 @@ :size-assert #xbc :heap-base #x50 :flag-assert #x14005000bc + (:methods + (init-from-entity! :override-doc + "Build the rideable cap collision, bind its art and effects, and enter the completed or active state.") + ) (:states (eggtop-close symbol) eggtop-idle) ) (deftype jng-iris-door (eco-door) + "The Jungle Temple's proximity-operated iris door." () :method-count-assert 27 :size-assert #x104 :heap-base #xa0 :flag-assert #x1b00a00104 + (:methods + (setup-collision! :override-doc + "Build and install the iris door's solid mesh collision.") + (setup-skel-and-params! :override-doc + "Initialize the iris-door skeleton, opening distances, and initial transforms.") + ) ) ;; - Unknowns @@ -27144,6 +36661,7 @@ ;; - Types (deftype plat-flip (process-drawable) + "A timed flipping platform synchronized across instances, with a brief vertical smush response." ((root collide-shape-moving :override) (path-pos float :offset-assert 176) (before-turn-down-time float :offset-assert 180) @@ -27159,6 +36677,10 @@ :size-assert #x100 :heap-base #x90 :flag-assert #x1400900100 + (:methods + (init-from-entity! :override-doc + "Build the rideable collision, read flip delays and synchronization phase, and enter the flip loop.") + ) (:states plat-flip-idle) ) @@ -27177,19 +36699,33 @@ ;; - Types (deftype aphid (nav-enemy) + "A spiked lurker whose vulnerable phases and attack cadence vary with the encounter's try count." ((try int32 :offset-assert 400) ) :method-count-assert 76 :size-assert #x194 :heap-base #x130 :flag-assert #x4c01300194 + (:methods + (attack-handler :override-doc + "Die and credit the attacker while vulnerable; otherwise use the inherited touch response.") + (initialize-collision :override-doc + "Create the aphid's moving collision shape and body sphere.") + (post-init-setup! :override-doc + "Initialize the aphid skeleton, navigation tuning, and neck joint axes.")) ) ;; - Functions -(define-extern aphid-invulnerable (function none :behavior aphid)) -(define-extern aphid-vulnerable (function none :behavior aphid)) -(define-extern aphid-init-by-other (function nav-enemy vector vector none :behavior aphid)) +(define-extern aphid-invulnerable + "Make the aphid invulnerable and switch its contact sphere to indestructible." + (function none :behavior aphid)) +(define-extern aphid-vulnerable + "Make the aphid vulnerable and restore its touch offense." + (function none :behavior aphid)) +(define-extern aphid-init-by-other + "Initialize an aphid spawned by another enemy, face its target, and begin chasing." + (function nav-enemy vector vector none :behavior aphid)) ;; - Unknowns @@ -27207,6 +36743,7 @@ (declare-type plant-boss process-drawable) (deftype plant-boss-arm (process-drawable) + "One of the plant boss's separately animated arms, vines, or roots." ((parent-override (pointer plant-boss) :score 100 :offset 12) (root collide-shape :override) (side int32 :offset-assert 176) @@ -27231,6 +36768,7 @@ ) (deftype plant-boss-leaf (process-drawable) + "A rideable leaf that opens, bounces under Jak, closes, and can be disabled with the boss." ((root collide-shape-moving :override) (side int32 :offset-assert 176) (state-object symbol :offset-assert 180) @@ -27251,6 +36789,7 @@ ) (deftype plant-boss (process-drawable) + "The Forbidden Jungle plant boss and the controller for its body parts, aphids, camera, and battle phases." ((root collide-shape :override) (neck joint-mod :offset-assert 176) (body joint-mod :offset-assert 180) @@ -27276,6 +36815,11 @@ :heap-base #xc0 :size-assert #x124 :flag-assert #x1400c00124 + (:methods + (relocate :override-doc + "Relocate the boss's joint modifiers and stored collision primitives, then relocate the process.") + (init-from-entity! :override-doc + "Build the boss collision, skeleton, body parts, joint modifiers, and initial battle state.")) (:states plant-boss-eat (plant-boss-dead symbol) @@ -27293,14 +36837,30 @@ ;; - Functions -(define-extern plant-boss-arm-init (function vector float int none :behavior plant-boss-arm)) -(define-extern plant-boss-back-arms-init (function vector float int none :behavior plant-boss-arm)) -(define-extern plant-boss-vine-init (function vector vector float int none :behavior plant-boss-arm)) -(define-extern plant-boss-root-init (function vector vector vector int none :behavior plant-boss-arm)) -(define-extern plant-boss-leaf-init (function vector float int none :behavior plant-boss-leaf)) -(define-extern plant-boss-generic-event-handler (function process int symbol event-message-block object :behavior plant-boss)) -(define-extern plant-boss-post (function none :behavior plant-boss)) -(define-extern plant-boss-default-event-handler (function process int symbol event-message-block object :behavior plant-boss)) +(define-extern plant-boss-arm-init + "Build and place one of the boss's front arms, then enter its idle state." + (function vector float int none :behavior plant-boss-arm)) +(define-extern plant-boss-back-arms-init + "Build and place the boss's paired rear arms, then enter their idle state." + (function vector float int none :behavior plant-boss-arm)) +(define-extern plant-boss-vine-init + "Place, orient, and scale a boss vine, then enter its idle state." + (function vector vector float int none :behavior plant-boss-arm)) +(define-extern plant-boss-root-init + "Place, orient, and scale a boss root, then enter its idle state." + (function vector vector vector int none :behavior plant-boss-arm)) +(define-extern plant-boss-leaf-init + "Build and place a rideable boss leaf, then enter its closed idle state." + (function vector float int none :behavior plant-boss-leaf)) +(define-extern plant-boss-generic-event-handler + "Handle child deaths, encounter queries, pickup bookkeeping, and target death notifications." + (function process int symbol event-message-block object :behavior plant-boss)) +(define-extern plant-boss-post + "Aim the boss's neck and body at Jak, then update its transforms." + (function none :behavior plant-boss)) +(define-extern plant-boss-default-event-handler + "Handle vulnerable contact attacks and forward other messages to the encounter handler." + (function process int symbol event-message-block object :behavior plant-boss)) ;; - Unknowns @@ -27322,6 +36882,7 @@ ;; - Types (deftype jungle-elevator (plat-button) + "The elevator between Jungle and Jungle B, including level streaming and endpoint teleport thresholds." ((bottom-height float :offset-assert 240) (teleport-if-below-y float :offset-assert 244) (teleport-if-above-y float :offset-assert 248) @@ -27330,6 +36891,13 @@ :size-assert #xfc :heap-base #x90 :flag-assert #x21009000fc + (:methods + (can-activate? :override-doc + "Allow activation after the Jungle Tower task is complete and the base endpoint rules permit it.") + (configure-movement! :override-doc + "Sample camera-height thresholds along the path and configure one-way, automatic player transport.") + (should-teleport? :override-doc + "Return whether the camera crossed the height threshold for swapping to the opposite endpoint.")) ) @@ -27342,6 +36910,7 @@ ;; - Types (deftype springbox (process-drawable) + "A trampoline platform that compresses under Jak and launches him when bonked or flopped." ((spring-height meters :offset-assert 176) (smush float :offset-assert 180) ) @@ -27349,6 +36918,9 @@ :size-assert #xb8 :heap-base #x50 :flag-assert #x14005000b8 + (:methods + (init-from-entity! :override-doc + "Build the trampoline collision and skeleton, connect it to navigation, and read its launch height.")) (:states bouncer-wait bouncer-fire @@ -27369,6 +36941,7 @@ ;; - Types (deftype hopper (nav-enemy) + "A jumping lurker that patrols and chases in discrete hops while keeping its shadow on the ground." ((jump-length float :offset-assert 400) (shadow-min-y float :offset-assert 404) ) @@ -27376,13 +36949,26 @@ :size-assert #x198 :heap-base #x130 :flag-assert #x4c01300198 + (:methods + (common-post :override-doc + "Keep the shadow's bottom plane at the stored ground height, then run the inherited post.") + (initialize-collision :override-doc + "Create the hopper's moving collision shape and two touch spheres.") + (post-init-setup! :override-doc + "Initialize the hopper skeleton, navigation tuning, and starting shadow floor.")) ) ;; - Functions -(define-extern hopper-do-jump (function none :behavior hopper)) -(define-extern hopper-jump-to (function vector none :behavior hopper)) -(define-extern hopper-find-ground (function vector object :behavior hopper)) +(define-extern hopper-do-jump + "Navigate toward the current target, clamp the hop distance, and jump." + (function none :behavior hopper)) +(define-extern hopper-jump-to + "Ground the destination, execute a custom jump, and keep the shadow floor below the arc." + (function vector none :behavior hopper)) +(define-extern hopper-find-ground + "Probe downward for background geometry and replace the point with the ground hit." + (function vector object :behavior hopper)) ;; - Unknowns @@ -27399,6 +36985,7 @@ ;; - Types (deftype junglesnake-twist-joint (structure) + "Per-joint yaw state and the permitted angular lag from the preceding body joint." ((joint-index int32 :offset-assert 0) (ry float :offset-assert 4) (drag-delta-ry float :offset-assert 8) @@ -27410,6 +36997,7 @@ ) (deftype junglesnake-tilt-joint (structure) + "A head joint affected by procedural tilt, optionally using the mirrored rotation." ((joint-index int32 :offset-assert 0) (flip-it symbol :offset-assert 4) ) @@ -27420,6 +37008,7 @@ ) (deftype junglesnake (process-drawable) + "A stationary ambush snake whose body yaw and head tilt procedurally track Jak." ((root collide-shape :override) (state-time2 time-frame :offset-assert 176) ;; changed (hit-player symbol :offset 184) @@ -27439,11 +37028,23 @@ :heap-base #x220 :flag-assert #x190220028c (:methods - (junglesnake-method-20 (_type_) symbol) ;; 20 - (junglesnake-method-21 (_type_) symbol) ;; 21 - (junglesnake-method-22 (_type_ float) symbol) ;; 22 - (junglesnake-method-23 (_type_) none) ;; 23 - (junglesnake-method-24 (_type_) none) ;; 24 + (init-from-entity! :override-doc + "Build the snake's collision and skeleton, initialize procedural joints, and enter its hidden state.") + (update-tracking-and-twist! + "Seek the snake's yaw toward Jak and propagate the turn down its body with joint lag." + (_type_) symbol) ;; 20 + (init-tilt-joints! + "Initialize the three procedural head-tilt joints and their mirrored orientation." + (_type_) symbol) ;; 21 + (init-twist-joints! + "Initialize the 24 body joints with their skeleton indices, base yaw, and drag limits." + (_type_ float) symbol) ;; 22 + (enable-lethal! + "Enable the head attack by removing its solid collision response." + (_type_) none) ;; 23 + (disable-lethal! + "Disable the head attack, restore solid collision, and push overlapping actors away." + (_type_) none) ;; 24 ) (:states junglesnake-sleeping @@ -27456,8 +37057,12 @@ ;; - Functions -(define-extern junglesnake-joint-callback (function junglesnake none)) -(define-extern junglesnake-default-event-handler (function process int symbol event-message-block object :behavior junglesnake)) +(define-extern junglesnake-joint-callback + "Apply procedural body yaw and head tilt to the snake's bound joint transforms." + (function junglesnake none)) +(define-extern junglesnake-default-event-handler + "Handle lethal head contact, ordinary shove contact, and incoming attacks." + (function process int symbol event-message-block object :behavior junglesnake)) ;; - Unknowns @@ -27474,6 +37079,7 @@ ;; - Types (deftype darkvine (process-drawable) + "An attackable jungle vine that strikes nearby actors, retreats when hit, and dies with the plant boss." ((root collide-shape :override) (speed float :offset-assert 176) (tip-index int8 :offset-assert 180) @@ -27487,6 +37093,11 @@ :size-assert #xd4 :heap-base #x70 :flag-assert #x14007000d4 + (:methods + (init-from-entity! :override-doc + "Build the vine's collision and skeleton, connect it to navigation, and enter its current encounter state.") + (run-logic? :override-doc + "Keep updating while active, recently visible and nearby, blending animation channels, or forcing skeleton updates.")) (:states (darkvine-die symbol) darkvine-idle @@ -27495,7 +37106,9 @@ ;; - Functions -(define-extern darkvine-event-handler (function process int symbol event-message-block object :behavior darkvine)) +(define-extern darkvine-event-handler + "Attack actors touching a dangerous vine and retreat once per distinct player attack." + (function process int symbol event-message-block object :behavior darkvine)) ;; - Unknowns @@ -27519,27 +37132,35 @@ ) (deftype logtrap (process-drawable) + "A rolling log trap that waits, drops onto its path, and rolls away." ((root collide-shape-moving :override)) :method-count-assert 21 :size-assert #xb0 :heap-base #x40 :flag-assert #x15004000b0 (:methods + (init-from-entity! :override-doc + "Build the moving log collision and skeleton, then enter its waiting state.") (idle () _type_ :state) ;; 20 ) ) (deftype towertop (process-drawable) + "The animated top section of the Forbidden Jungle precursor tower." ((root-override trsq :score 100 :offset 112)) :method-count-assert 20 :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Create the tower transform, initialize its drawable and skeleton, and enter its animation state.")) (:states towertop-idle) ) (deftype lurkerm-tall-sail (process-drawable) + "The large rideable sail in the Jungle machinery." ((root collide-shape-moving :override) (speed float :offset-assert 176) (alt-actor entity-actor :offset-assert 180) @@ -27548,11 +37169,15 @@ :size-assert #xb8 :heap-base #x50 :flag-assert #x14005000b8 + (:methods + (init-from-entity! :override-doc + "Build the rideable sail collision and skeleton and restore its saved movement state.")) (:states lurkerm-tall-sail-idle) ) (deftype lurkerm-short-sail (process-drawable) + "The smaller rideable sail in the Jungle machinery." ((root collide-shape-moving :override) (speed float :offset-assert 176) (alt-actor entity-actor :offset-assert 180) @@ -27561,11 +37186,15 @@ :size-assert #xb8 :heap-base #x50 :flag-assert #x14005000b8 + (:methods + (init-from-entity! :override-doc + "Build the rideable sail collision and skeleton and restore its saved movement state.")) (:states lurkerm-short-sail-idle) ) (deftype lurkerm-piston (process-drawable) + "A synchronized rideable piston with entity-configured travel height and timing." ((root collide-shape-moving :override) (sync sync-info :inline :offset-assert 176) (base vector :inline :offset-assert 192) @@ -27577,11 +37206,15 @@ :size-assert #xe8 :heap-base #x80 :flag-assert #x14008000e8 + (:methods + (init-from-entity! :override-doc + "Build the piston collision and skeleton, read its height and timing parameters, and enter its loop.")) (:states lurkerm-piston-idle) ) (deftype accordian (process-drawable) + "An animated Jungle machinery section linked to an alternate actor." ((speed float :offset-assert 176) (alt-actor entity-actor :offset-assert 180) ) @@ -27589,6 +37222,9 @@ :size-assert #xb8 :heap-base #x50 :flag-assert #x14005000b8 + (:methods + (init-from-entity! :override-doc + "Initialize the machinery transform, skeleton, alternate actor, and saved movement state.")) (:states accordian-idle) ) @@ -27609,6 +37245,7 @@ ) (deftype precurbridge (process-drawable) + "The segmented precursor bridge that rises into place after activation." ((root collide-shape-moving :override) (smush smush-control :inline :offset-assert 176) (base vector :inline :offset-assert 208) @@ -27619,6 +37256,9 @@ :size-assert #x110 :heap-base #xa0 :flag-assert #x1400a00110 + (:methods + (init-from-entity! :override-doc + "Build the bridge collision and skeleton, initialize its spans and activation point, and choose its saved state.")) (:states (precurbridge-active symbol) precurbridge-idle @@ -27626,6 +37266,7 @@ ) (deftype maindoor (process-drawable) + "The Jungle temple's main door, opened by Blue Eco or persistent completion." ((root collide-shape :override) (thresh vector :inline :offset-assert 176) ) @@ -27633,21 +37274,31 @@ :size-assert #xc0 :heap-base #x50 :flag-assert #x14005000c0 + (:methods + (init-from-entity! :override-doc + "Build the door collision and skeleton and select its open or closed state.")) (:states (maindoor-open symbol) (maindoor-closed symbol)) ) (deftype sidedoor (eco-door) + "A Jungle side door using the shared Eco-door controller." () :method-count-assert 27 :size-assert #x104 :heap-base #xa0 :flag-assert #x1b00a00104 + (:methods + (setup-collision! :override-doc + "Build and install the side door's solid collision mesh.") + (setup-skel-and-params! :override-doc + "Initialize the side door skeleton, trigger distances, and movement speed.")) ) ;; I think unused! (deftype jngpusher (process-drawable) + "A synchronized Jungle pusher platform with a separately toggled rear collision primitive." ((root trsqv :override) (sync sync-info :inline :offset-assert 176) (back-prim collide-shape-prim :offset-assert 184) @@ -27656,16 +37307,25 @@ :size-assert #xbc :heap-base #x50 :flag-assert #x14005000bc + (:methods + (relocate :override-doc + "Relocate the stored rear collision primitive, then relocate the process.") + (init-from-entity! :override-doc + "Build the pusher collision and skeleton and initialize its synchronized animation.")) (:states jngpusher-idle) ) (deftype jungle-water (water-anim) + "The animated Jungle water surface with its level-specific tint and ripple pattern." () :method-count-assert 30 :size-assert #xdc :heap-base #x70 :flag-assert #x1e007000dc + (:methods + (setup-water! :override-doc + "Run the base water setup, then install the Jungle ripple controller and water tint.")) ) ;; - Unknowns @@ -27696,6 +37356,7 @@ (declare-type reflector process-drawable) (deftype periscope (process-drawable) + "The Jungle beam periscope, including its player controls, reflector chain, and moving grips." ((root collide-shape :override) (y-offset meters :offset-assert 176) (y-offset-grips meters :offset-assert 180) @@ -27726,6 +37387,13 @@ :size-assert #x184 :heap-base #x120 :flag-assert #x1401200184 + (:methods + (relocate :override-doc + "Relocate the periscope's joint and particle controls, then relocate the drawable process.") + (deactivate :override-doc + "Free the alignment particles before deactivating the drawable process.") + (init-from-entity! :override-doc + "Build the periscope collision, reflector chain, skeleton, controls, sounds, and initial state.")) (:states (periscope-power-on) (periscope-wait-for-player) @@ -27736,6 +37404,7 @@ ) (deftype reflector (process-drawable) + "A beam segment controlled by a periscope." ((parent-override (pointer periscope) :score 100 :offset 12) (root collide-shape :override)) :method-count-assert 20 @@ -27747,6 +37416,7 @@ ) (deftype reflector-origin (process-drawable) + "The fixed origin of a Jungle reflector chain." ((reflector-trans vector :inline :offset-assert 176) (next-reflector-trans vector :inline :offset-assert 192) (reflector uint32 :offset-assert 208) @@ -27757,11 +37427,15 @@ :size-assert #xdc :heap-base #x70 :flag-assert #x14007000dc + (:methods + (init-from-entity! :override-doc + "Initialize the reflector origin, its actor link, and the blocking actor that powers it.")) (:states (reflector-origin-idle)) ) (deftype reflector-mirror (process-drawable) + "The destructible final mirror in the Jungle reflector chain." ((root collide-shape :override) (beam-end vector :inline :offset-assert 176) ) @@ -27769,6 +37443,9 @@ :size-assert #xc0 :heap-base #x50 :flag-assert #x14005000c0 + (:methods + (init-from-entity! :override-doc + "Build the mirror collision and skeleton and restore its broken or active state.")) (:states (reflector-mirror-broken symbol) (reflector-mirror-idle)) @@ -27777,7 +37454,9 @@ ;; - Functions (define-extern peri-beamcam-init-by-other (function string (pointer pov-camera) :behavior process)) -(define-extern draw-power-beam (function vector vector none)) +(define-extern draw-power-beam + "Draw a powered beam from start to end and give the player Blue Eco when the beam intersects them." + (function vector vector none)) (define-extern reflector-origin-update (function entity-actor none :behavior reflector-origin)) (define-extern reflector-init-by-other (function vector none :behavior reflector)) (define-extern periscope-find-next (function none :behavior periscope)) @@ -27790,6 +37469,9 @@ (define-extern periscope-test-task-complete? (function symbol :behavior periscope)) (define-extern periscope-draw-beam-impact (function none :behavior periscope)) (define-extern periscope-set-target-direction (function vector none :behavior periscope)) +(define-extern target-close-to-point? + "Return true when the player is within radius of point." + (function vector float symbol)) (define-extern periscope-post (function none :behavior periscope)) (define-extern periscope-debug-trans (function none :behavior periscope)) (define-extern target-close-to-point? (function vector float symbol)) @@ -27811,11 +37493,17 @@ ;; - Types (deftype junglefish (nav-enemy) + "A small aquatic enemy that patrols and attacks while following the Jungle water surface." () :method-count-assert 76 :size-assert #x190 :heap-base #x120 :flag-assert #x4c01200190 + (:methods + (init-from-entity! :override-doc + "Build the fish collision and skeleton, initialize navigation and water tracking, and begin idling.") + (common-post :override-doc + "Update the fish's water state before running the inherited enemy post.")) ) ;; - Unknowns @@ -27833,6 +37521,7 @@ ;; - Types (deftype fisher-bank (basic) + "Fishing-game dimensions and completion thresholds shared by the fisherman and fish." ((width meters :offset-assert 4) (net-radius meters :offset-assert 8) (max-caught int32 :offset-assert 12) @@ -27844,6 +37533,7 @@ ) (deftype fisher-params (structure) + "Difficulty-specific timing, speed, and fish-type probabilities for the fishing game." ((timeout time-frame :offset-assert 0) (vel float :offset-assert 8) (swing-min time-frame :offset-assert 16) @@ -27861,6 +37551,7 @@ ) (deftype fisher (process-taskable) + "The Forbidden Jungle fisherman and fishing-minigame controller." ((paddle-end vector 2 :inline :offset-assert 384) (paddle-pos vector :inline :offset-assert 416) (paddle float :offset-assert 432) @@ -27889,12 +37580,37 @@ :size-assert #x260 :heap-base #x1f0 :flag-assert #x3501f00260 + (:methods + (init-from-entity! :override-doc + "Initialize the fisherman, fishing path and task state, difficulty, paddle geometry, and starting state.") + (get-art-elem :override-doc + "Return the art element on the active root animation channel.") + (play-anim! :override-doc + "Select the fisherman's animation for the current fishing-task stage and apply progression changes when commit? is true.") + (get-accept-anim :override-doc + "Return the fishing-task accept animation, committing the accepted choice when requested.") + (get-reject-anim :override-doc + "Return the fishing-task reject animation.") + (goto-post-anim-state! :override-doc + "Enter query or play-anim for the remaining fishing-task steps, otherwise use the inherited transition.") + (initialize-collision :override-doc + "Build the fisherman's solid collision sphere at center-joint.") + (try-play-ambient-chatter :override-doc + "Play fishing-specific reminder or ambient speech when its distance and cooldown permit.") + (target-above-threshold? :override-doc + "Return true during the fishing task or while hard mode is enabled.") + (draw-npc-shadow :override-doc + "Update the fisherman's shadow when its highest-detail geometry was drawn, otherwise disable it.") + (setup-shadow-settings! :override-doc + "Set the fisherman's shadow-control bottom and top planes.") + ) (:states fisher-playing fisher-done) ) (deftype fisher-fish (process-drawable) + "One fish moving along the fishing stream." ((dir vector :inline :offset-assert 176) (offset float :offset-assert 192) (pos float :offset-assert 196) @@ -27906,6 +37622,11 @@ :size-assert #xd4 :heap-base #x70 :flag-assert #x14007000d4 + (:methods + (init-from-entity! :override-doc + "Initialize the nest's drawable, path, rat population, durability, and spawn timing from its + entity settings and the player's progress.") + ) (:states fisher-fish-fall fisher-fish-caught @@ -27941,6 +37662,7 @@ ;; - Types (deftype jungle-part (part-spawner) + "The Forbidden Jungle's level-specific particle spawner." () :method-count-assert 21 :size-assert #xd0 @@ -27958,6 +37680,7 @@ ;; - Types (deftype launcherdoor (process-drawable) + "A level-streaming door that opens vertically and can notify the player after passage." ((root collide-shape :override) (notify-player-passed-thru? symbol :offset-assert 176) (thresh-y float :offset-assert 180) @@ -27969,6 +37692,9 @@ :size-assert #xc4 :heap-base #x60 :flag-assert #x14006000c4 + (:methods + (init-from-entity! :override-doc + "Build the door collision and skeleton, read its height, speed, and loading mode, and select its initial state.")) (:states (launcherdoor-open symbol) (launcherdoor-closed symbol)) @@ -27989,6 +37715,7 @@ ;; - Types (deftype racer-info (basic) + "The player's shared racing-bike motion, suspension, heat, boost, animation, and sound state." ((entity entity-actor :offset-assert 4) (bike-trans vector :inline :offset-assert 16) (bike-quat vector :inline :offset-assert 32) @@ -28083,6 +37810,7 @@ ) (deftype racer-bank (basic) + "Shared racing-bike heat, boost, handling, and projectile tuning." ((slide-hold-time seconds :offset-assert 8) (heat-max float :offset-assert 16) (hotcoals-heat-inc float :offset-assert 20) @@ -28122,29 +37850,53 @@ ;; - Types (deftype hud-bike-heat (hud) + "The racing-bike heat gauge." () :method-count-assert 27 :size-assert #x118 :heap-base #xb0 :flag-assert #x1b00b00118 + (:methods + (hud-update :override-doc + "Update the gauge from the player's current racing-bike heat.") + (init-particles! :override-doc + "Create the heat gauge's backing, dial, needle, and colored heat slices.")) ) (deftype hud-bike-speed (hud) + "The racing-bike speed gauge." () :method-count-assert 27 :size-assert #x118 :heap-base #xb0 :flag-assert #x1b00b00118 + (:methods + (hud-update :override-doc + "Update the gauge from the player's horizontal racing speed.") + (init-particles! :override-doc + "Create the speed gauge's dial, needle, and foreground particles.")) ) ;; - Functions -(define-extern zoomer-heat-slice-color (function matrix float none)) -(define-extern part-hud-racer-speed-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-racer-heat-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-zoomer-heat-slice-01-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-zoomer-heat-slice-02-func (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern part-hud-zoomer-heat-slice-03-func (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern zoomer-heat-slice-color + "Set a heat-slice particle's color from its normalized heat value." + (function matrix float none)) +(define-extern part-hud-racer-speed-func + "Rotate the racing speed needle toward the player's normalized horizontal speed." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-racer-heat-func + "Rotate and color the racing heat needle from the player's normalized heat." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-zoomer-heat-slice-01-func + "Update the first racing heat slice." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-zoomer-heat-slice-02-func + "Update the second racing heat slice." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-zoomer-heat-slice-03-func + "Update the third racing heat slice." + (function sparticle-system sparticle-cpuinfo matrix none)) ;; ---------------------- @@ -28156,6 +37908,7 @@ ;; - Types (deftype racer (process-drawable) + "A placed racing-bike pickup, return point, and task-gated launcher." ((parent-override (pointer target) :score 100 :offset 12) (root collide-shape-moving :override) (extra-trans vector :inline :offset-assert 176) @@ -28172,6 +37925,10 @@ :heap-base #x70 :flag-assert #x18007000e0 (:methods + (relocate :override-doc + "Relocate the two stored path controllers, then relocate the drawable process.") + (init-from-entity! :override-doc + "Build the pickup collision and art, load its condition and two paths, and select the active blocking plane.") (wait-for-start () _type_ :state) ;; 20 (idle () _type_ :state) ;; 21 (pickup ((state collectable)) _type_ :state) ;; 22 @@ -28183,7 +37940,9 @@ (define-extern blocking-plane-spawn (function curve-control none :behavior process)) (define-extern racer-effect (function none :behavior racer)) -(define-extern blocking-plane-destroy (function none)) +(define-extern blocking-plane-destroy + "Deactivate every blocking-plane child of the current process." + (function none)) ;; - Unknowns @@ -28200,7 +37959,7 @@ ;; - Functions -(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector cshape-moving-flags)) +(define-extern racer-collision-reaction (function control-info collide-shape-intersect vector vector collide-status)) (define-extern racer-service-slide (function none :behavior target)) (define-extern racer-xz (function float float none :behavior target)) (define-extern racer-thrust (function basic float none :behavior target)) @@ -28249,6 +38008,7 @@ ;; - Types (deftype blocking-plane (process-drawable) + "An invisible collision wall built across alternating segments of a path." () :method-count-assert 20 :size-assert #xb0 @@ -28276,6 +38036,7 @@ ;; - Types (deftype flutflut (process-drawable) + "A placed Flut Flut mount, pickup point, and return point." ((parent-override (pointer target) :score 100 :offset 12) (root collide-shape-moving :override) (extra-trans vector :inline :offset-assert 176) @@ -28294,6 +38055,10 @@ :flag-assert #x18007000e0 ;; inherited inspect of process-drawable (:methods + (relocate :override-doc + "Relocate the two stored path controllers, then relocate the drawable process.") + (init-from-entity! :override-doc + "Build Flut Flut's collision and art, load its condition and paths, and enter its waiting state.") (wait-for-start () _type_ :state) ;; 20 (idle () _type_ :state) ;; 21 (pickup ((state flutflut)) _type_ :state) ;; 22 @@ -28372,11 +38137,27 @@ ;; - Types (deftype farmer (process-taskable) + "The farmer who gives the village Yakow-herding task." () :method-count-assert 53 :heap-base #x110 :size-assert #x17c :flag-assert #x350110017c + (:methods + (play-anim! :override-doc + "Choose the Farmer's conversation animation for the current Yakow-task stage. When commit? is + true, apply the corresponding introduction, reminder, or reward progression.") + (get-art-elem :override-doc + "Return the Farmer art element appropriate for the current task stage.") + (try-play-ambient-chatter :override-doc + "When the target is within thirty metres and the thirty-second cooldown has elapsed, choose + one of four Farmer idle lines or remain silent.") + (initialize-collision :override-doc + "Build the Farmer's solid, indestructible compound collision shape and install it as the + drawable root.") + (init-from-entity! :override-doc + "Initialize the Farmer for the village Yakow task, connect him to navigation, and enter his + initial taskable state.")) ) ;; - Unknowns @@ -28393,11 +38174,31 @@ ;; - Types (deftype explorer (process-taskable) + "The explorer who trades a Power Cell for Precursor orbs in Sandover Village." () :method-count-assert 53 :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (setup-shadow-settings! :override-doc + "Set the Explorer's shadow clipping planes around his root position.") + (draw-npc-shadow :override-doc + "Update the Explorer's shadow and sun direction when his highest-detail geometry was drawn; + otherwise disable the shadow.") + (play-anim! :override-doc + "Choose the Explorer's conversation animation for the current orb-trade stage. When commit? + is true, apply the corresponding introduction, reminder, payment, or reward progression.") + (get-art-elem :override-doc + "Return the Explorer's active art element.") + (try-play-ambient-chatter :override-doc + "When the target is within thirty metres and the thirty-second cooldown has elapsed, choose + one of seven Explorer lines; two task-specific lines are silent after their reminder closes.") + (target-above-threshold? :override-doc + "Return whether the target is west of and north of the Explorer's interaction boundary.") + (init-from-entity! :override-doc + "Initialize the Explorer for the village orb-trade task, configure his music and lighting, + and enter his initial taskable state.")) ) ;; - Unknowns @@ -28414,17 +38215,38 @@ ;; - Types (deftype assistant (process-taskable) + "Keira at the Sandover Village workshop." ((sound-id sound-id :offset-assert 380) ) :method-count-assert 53 :size-assert #x180 :heap-base #x110 :flag-assert #x3501100180 + (:methods + (setup-shadow-settings! :override-doc + "Set Keira's shadow clipping planes around her root position.") + (draw-npc-shadow :override-doc + "Update Keira's shadow and sun direction when her highest-detail geometry was drawn; + otherwise disable the shadow.") + (play-anim! :override-doc + "Choose Keira's conversation animation for the current Blue Eco switch or Zoomer stage. When + commit? is true, apply the corresponding introduction or reminder progression.") + (get-art-elem :override-doc + "Return Keira's active art element.") + (try-play-ambient-chatter :override-doc + "When the target is within thirty metres, the thirty-second cooldown has elapsed, and the + target is not more than four metres below her, choose one of five workshop lines.") + (init-from-entity! :override-doc + "Initialize Keira's workshop actor, welding particles, task state, sound, and lighting, then + enter idle or deactivate her according to Fire Canyon progress.")) ) ;; - Functions -(define-extern check-drop-level-assistant (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-assistant + "Kill a welding spark below its drop height and launch a small impact burst, occasionally playing + a water-drop sound." + (function sparticle-system sparticle-cpuinfo vector none)) ;; - Unknowns @@ -28440,6 +38262,7 @@ ;; - Types (deftype sage (process-taskable) + "Samos in the Sandover Village hut." ((reminder-played basic :offset-assert 380) (assistant handle :offset-assert 384) ) @@ -28447,6 +38270,27 @@ :size-assert #x188 :heap-base #x120 :flag-assert #x3501200188 + (:methods + (play-anim! :override-doc + "Choose Samos's animation for the introduction, Blue Eco vent, Misty cannon, reminder, or + village-resolution stage. When commit? is true, apply the associated task and actor setup.") + (reminder-due? + "Return whether a closed task's reminder is unseen, or a played reminder should reset after + the camera moves away." + (_type_) symbol :overlay-at process-taskable-method-45) + (get-art-elem :override-doc + "Update Samos's reminder selection when needed and return the corresponding idle art element.") + (try-play-ambient-chatter :override-doc + "When the target is within thirty metres, the thirty-second cooldown has elapsed, and the + target is not more than three metres above him, choose one of five hut lines.") + (should-display? :override-doc + "Return whether the Sages have not yet been kidnapped.") + (initialize-collision :override-doc + "Build Samos's solid, indestructible compound collision shape at center-joint and install it + as the drawable root.") + (init-from-entity! :override-doc + "Initialize Samos's task, reminder, music, assistant handle, and lighting, then enter his + initial taskable state.")) ) ;; - Unknowns @@ -28495,6 +38339,7 @@ ) (deftype yakow (process-drawable) + "A Yakow herded into the farmer's pen for the village task." ((root collide-shape-moving :override) (fact fact-info-enemy :override) (player-attack-id int32 :offset-assert 176) @@ -28528,6 +38373,10 @@ yakow-notice yakow-kicked yakow-die) + (:methods + (init-from-entity! :override-doc + "Build the Yakow's collision, navigation, combat, skeleton, shadow, link, and water controls; + restore its pen destination when already complete, otherwise begin the herding task.")) ) ;; - Functions @@ -28539,7 +38388,9 @@ (define-extern yakow-facing-direction? (function vector float symbol :behavior yakow)) (define-extern yakow-generate-travel-vector (function vector :behavior yakow)) (define-extern yakow-common-post (function none :behavior yakow)) -(define-extern yakow-cam (function none)) +(define-extern yakow-cam + "Spawn the Yakow-task completion camera at this actor's alternate camera marker." + (function none)) (define-extern yakow-default-event-handler (function process-drawable int symbol event-message-block object :behavior yakow)) (define-extern yakow-simple-post (function none :behavior yakow)) (define-extern yakow-run-post (function none :behavior yakow)) @@ -28561,6 +38412,7 @@ ;; - Types (deftype windmill-sail (process-drawable) + "The Village windmill sail, including its synchronized rotation, particles, and ambient sound." ((root-override trsq :score 100 :offset 112) (sync sync-info :inline :offset-assert 176) (blade-normal vector :inline :offset-assert 192) @@ -28572,11 +38424,16 @@ :size-assert #xe8 :heap-base #x80 :flag-assert #x14008000e8 + (:methods + (init-from-entity! :override-doc + "Initialize the sail skeleton, rotation axis, particle launchers, and ambient sound from its + placed entity.")) (:states windmill-sail-idle) ) (deftype sagesail (process-drawable) + "The rotating sail on the Village sage's hut." ((root-override trsq :score 100 :offset 112) (sync sync-info :inline :offset-assert 176) (blade-normal vector :inline :offset-assert 192) @@ -28586,11 +38443,15 @@ :size-assert #xe0 :heap-base #x70 :flag-assert #x14007000e0 + (:methods + (init-from-entity! :override-doc + "Initialize the sail skeleton and its synchronized rotation axis from the placed entity.")) (:states sagesail-idle) ) (deftype windspinner (process-drawable) + "A wind-driven Village propeller whose angular speed follows the local wind field." ((blade-normal vector :inline :offset-assert 176) (orig-quat quaternion :inline :offset-assert 192) (angle float :offset-assert 208) @@ -28600,22 +38461,33 @@ :size-assert #xd8 :heap-base #x70 :flag-assert #x14007000d8 + (:methods + (run-logic? :override-doc + "Return true while the spinner must update because it is active, visible, animating, or + explicitly requests skeleton updates.") + (init-from-entity! :override-doc + "Initialize the spinner skeleton, rotation axis, and starting angular velocity.")) (:states windspinner-idle) ) (deftype mayorgears (process-drawable) + "The Mayor's animated gear mechanism." ((alt-actor entity-actor :offset-assert 176) ) :method-count-assert 20 :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 + (:methods + (init-from-entity! :override-doc + "Initialize the gear skeleton and enter its idle animation.")) (:states mayorgears-idle) ) (deftype reflector-middle (process-drawable) + "An intermediate eco-beam reflector linked to the next reflector in the chain." ((reflector-trans vector :inline :offset-assert 176) (next-reflector-trans vector :inline :offset-assert 192) ) @@ -28623,49 +38495,71 @@ :size-assert #xd0 :heap-base #x60 :flag-assert #x14006000d0 + (:methods + (init-from-entity! :override-doc + "Initialize the reflector and cache the raised beam endpoints for this reflector and the next + linked entity.")) (:states reflector-middle-idle) ) (deftype reflector-end (process-drawable) + "The terminal placed object in a Village eco-beam reflector chain." () :method-count-assert 20 :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the terminal reflector from its placed entity.")) (:states reflector-end-idle) ) (deftype villa-starfish (process-drawable) + "A stationary starfish spawner with a configurable child limit." ((child-count int8 :offset-assert 176) ) :method-count-assert 20 :size-assert #xb1 :heap-base #x50 :flag-assert #x14005000b1 + (:methods + (init-from-entity! :override-doc + "Initialize the spawner, read its child limit, and attach its spawn path.")) (:states villa-starfish-idle) ) (deftype starfish (nav-enemy) + "A small path-following Village starfish spawned near the player." () :method-count-assert 76 :size-assert #x190 :heap-base #x120 :flag-assert #x4c01200190 + (:methods + (initialize-collision :override-doc + "Create the starfish moving collision shape and navigation radius.") + (post-init-setup! :override-doc + "Initialize the starfish skeleton and apply its navigation defaults.")) (:states starfish-idle starfish-patrol) ) (deftype village-fish (process-drawable) + "The base drawable for the Village fish props." ((child-count int8 :offset-assert 176) ) :method-count-assert 20 :size-assert #xb1 :heap-base #x50 :flag-assert #x14005000b1 + (:methods + (init-from-entity! :override-doc + "Initialize the fish drawable and enter its idle state.")) (:states village-fish-idle) ) @@ -28687,6 +38581,7 @@ ) (deftype cyclegen (structure) + "A wrapping phase accumulator used for simple periodic prop motion." ((output float :offset-assert 0) (inc float :offset-assert 4) ) @@ -28697,6 +38592,7 @@ ) (deftype hutlamp (process-drawable) + "A hanging Village lamp whose pivot swings on a periodic clock." ((pivot joint-mod-set-local :offset-assert 176) (clock cyclegen :inline :offset-assert 180) ) @@ -28704,58 +38600,84 @@ :size-assert #xbc :heap-base #x50 :flag-assert #x14005000bc + (:methods + (init-from-entity! :override-doc + "Initialize the lamp skeleton and pivot, then start its periodic swing at a random phase.")) (:states hutlamp-idle) ) (deftype revcycleprop (process-drawable) + "An animated Village rev-cycle prop." () :method-count-assert 21 :size-assert #xb0 :heap-base #x40 :flag-assert #x15004000b0 (:methods + (init-from-entity! :override-doc + "Initialize the prop skeleton and enter its idle animation.") (idle () _type_ :state) ;; 20 ) ) (deftype revcycle (process-drawable) + "The animated Village rev-cycle display." () :method-count-assert 21 :size-assert #xb0 :heap-base #x40 :flag-assert #x15004000b0 (:methods + (init-from-entity! :override-doc + "Initialize the rev-cycle skeleton and enter its idle animation.") (idle () _type_ :state) ;; 20 ) ) (deftype villagea-water (water-anim) + "The animated Village water surface with its level-specific tint and ripple pattern." () :method-count-assert 30 :size-assert #xdc :heap-base #x70 :flag-assert #x1e007000dc + (:methods + (setup-water! :override-doc + "Run the base water setup, then install the Village ripple controller and water tint.")) ) (deftype evilplant (process-drawable) + "The PAL Village evil-plant prop." () :method-count-assert 21 :size-assert #xb0 :heap-base #x40 :flag-assert #x15004000b0 (:methods + (init-from-entity! :override-doc + "Initialize the evil-plant skeleton and enter its idle animation.") (idle () _type_ :state) ;; 20 ) ) ;; - Functions -(define-extern set-period (function cyclegen int float)) -(define-extern update-clock (function cyclegen float)) -(define-extern process-drawable-child-count (function int :behavior process-drawable)) -(define-extern starfish-spawn-child (function (pointer starfish) :behavior starfish)) -(define-extern starfish-init-by-other (function starfish vector none :behavior starfish)) +(define-extern set-period + "Set the phase increment so the cycle advances five units over period updates." + (function cyclegen int float)) +(define-extern update-clock + "Advance the cycle by its time-scaled increment, wrap it to [0, 1), and return the new phase." + (function cyclegen float)) +(define-extern process-drawable-child-count + "Count the process's direct children." + (function int :behavior process-drawable)) +(define-extern starfish-spawn-child + "Spawn a starfish at a random point on this spawner's path." + (function (pointer starfish) :behavior starfish)) +(define-extern starfish-init-by-other + "Initialize a spawned starfish from its parent and requested position." + (function starfish vector none :behavior starfish)) ;; - Unknowns @@ -28810,11 +38732,14 @@ :size-assert #xa4 :flag-assert #xe000000a4 (:methods - (get-point-count (_type_) int) ;; 9 - (nth-point (_type_ int vector) vector) ;; 10 - (distance-to-next-point (_type_ int vector) vector) ;; 11 - (add-point! (_type_ float float float float) none) ;; 12 - (debug-draw (_type_) symbol) ;; 13 + (get-point-count "Return the number of points stored in this path." (_type_) int) ;; 9 + (nth-point "Copy point index into result and return result." (_type_ int vector) vector) ;; 10 + (distance-to-next-point + "Return in result the normalized horizontal direction from point index to the following + wrapping path point." (_type_ int vector) vector) ;; 11 + (add-point! "Append one packed path point when the ten-point array has room." + (_type_ float float float float) none) ;; 12 + (debug-draw "Draw the path segments, stored velocity vectors, and point indices." (_type_) symbol) ;; 13 ) ) @@ -28841,14 +38766,21 @@ :size-assert #x8c :flag-assert #x110000008c (:methods - (init! (_type_ vehicle-path (pointer float) (pointer float) int float) none) ;; 9 - (vehicle-controller-method-10 (_type_ vector float int) none) ;; 10 - (vehicle-controller-method-11 (_type_) none) ;; 11 - (vehicle-controller-method-12 (_type_ int vector) none) ;; 12 - (move-to-next-point (_type_ vector) none) ;; 13 - (vehicle-controller-method-14 (_type_ vector vector) none) ;; 14 - (vehicle-controller-method-15 (_type_ collide-shape-moving) none) ;; 15 - (vehicle-controller-method-16 (_type_) none) ;; 16 + (init! "Attach the path and calibration tables and initialize the steering-circle radius." + (_type_ vehicle-path (pointer float) (pointer float) int float) none) ;; 9 + (record-turning-sample! + "Measure one speed sample's turn radius and store its radius and throttle." (_type_ vector float int) none) ;; 10 + (dump-tables "Print the calibrated turning-radius and throttle tables as GOAL source." (_type_) none) ;; 11 + (set-dest-point! + "Select a destination path point and construct its steering circle from the current position." + (_type_ int vector) none) ;; 12 + (move-to-next-point "Advance to the next wrapping path point." (_type_ vector) none) ;; 13 + (compute-target-point + "Compute the tangent steering target from from-pos to the selected destination circle." + (_type_ vector vector) none) ;; 14 + (drive! "Advance the path when needed and update automatic throttle and steering." + (_type_ collide-shape-moving) none) ;; 15 + (debug-draw "Draw the path, destination circle, and steering target." (_type_) none) ;; 16 ) ) @@ -28884,6 +38816,18 @@ :size-assert #x520 :heap-base #x4b0 :flag-assert #x2304b00520 + (:methods + (accumulate-forces! :override-doc + "Apply buoyancy, drag, stabilization, dock tether, and engine thrust for one physics tick.") + (relocate :override-doc + "Relocate the embedded controller and optional propeller modifier, then relocate the boat.") + (init-collision! :override-doc + "Create the boat's rider platform collision group and mesh.") + (init-platform! :override-doc + "Initialize the boat skeleton, path, controller, physics points, stabilizers, engine, and + docking state.") + (init-from-entity! :override-doc + "Create the boat from its placed entity and enter the docked state for the current level.")) (:states fishermans-boat-docked-village fishermans-boat-docked-misty @@ -28939,10 +38883,18 @@ ;; - Functions -(define-extern bird-bob-func (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern sparticle-seagull-moon (function sparticle-system sparticle-cpuinfo matrix none)) -(define-extern check-drop-level-village1-fountain-nosplash (function sparticle-system sparticle-cpuinfo vector vector)) -(define-extern check-drop-level-village1-fountain (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern bird-bob-func + "Bob a bird particle beneath its owning drawable with a three-hundred-frame sine wave." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-seagull-moon + "Copy the seagull particle's wrapped omega value into its transform." + (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern check-drop-level-village1-fountain-nosplash + "Kill a particle below the fountain surface and return its clamped impact position." + (function sparticle-system sparticle-cpuinfo vector vector)) +(define-extern check-drop-level-village1-fountain + "Kill a particle below the fountain surface and launch the two splash effects." + (function sparticle-system sparticle-cpuinfo vector none)) ;; ---------------------- @@ -28953,7 +38905,10 @@ ;; - Functions -(define-extern check-drop-level-sagehut (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-sagehut + "Kill a particle below the sage-hut water surface, optionally play a drop sound, and launch its + splash effects." + (function sparticle-system sparticle-cpuinfo vector none)) ;; ---------------------- @@ -28965,6 +38920,7 @@ ;; - Types (deftype sequenceA-village1 (process-taskable) + "The opening Village-to-Misty cutscene controller." ((boat handle :offset-assert 384) (side handle :offset-assert 392) ) @@ -28972,12 +38928,23 @@ :size-assert #x190 :heap-base #x120 :flag-assert #x3501200190 + (:methods + (play-anim! :override-doc + "Build the opening cutscene animation and, when setup-scene? is true, prepare its camera, + time of day, and boat.") + (get-art-elem :override-doc + "Return the boat art element used by the cutscene.") + (should-display? :override-doc + "Keep the cutscene controller itself hidden.")) ) ;; - Functions (define-extern sequenceA-village1-init-by-other (function entity-actor none :behavior sequenceA-village1)) (define-extern sequenceA-village1-trans-hook (function none :behavior sequenceA-village1)) +(define-extern start-sequence-a + "Black out the display and spawn the opening Village cutscene controller." + (function none)) ;; - Unknowns @@ -28993,14 +38960,19 @@ ;; - Types (deftype training-water (water-anim) + "The Training level's animated water surface." () :method-count-assert 30 :size-assert #xdc :heap-base #x70 :flag-assert #x1e007000dc + (:methods + (setup-water! :override-doc + "Run the shared animated-water setup, then install the Training ripple controller and tint.")) ) (deftype training-cam (process) + "A proximity trigger that presents one Training hint and its camera view." ((root trsq :offset-assert 112) (range meters :offset-assert 116) (index int32 :offset-assert 120) @@ -29011,28 +38983,49 @@ :heap-base #x20 :flag-assert #xf00200088 (:methods + (relocate :override-doc + "Relocate the optional transform and then the process.") + (init-from-entity! :override-doc + "Initialize the hint trigger position, range, and hint index from its placed entity.") (idle () _type_ :state) ;; 14 ) ) (deftype tra-pontoon (rigid-body-platform) + "A floating Training pontoon tethered to its initial position." ((anchor-point vector :inline :offset-assert 736) ) :method-count-assert 35 :size-assert #x2f0 :heap-base #x280 :flag-assert #x23028002f0 + (:methods + (init-from-entity! :override-doc + "Create the pontoon from its placed entity and enter the rigid-body idle state.") + (accumulate-forces! :override-doc + "Apply the shared platform forces, then pull the pontoon toward its anchor.") + (init-collision! :override-doc + "Create the pontoon's moving rider collision mesh.") + (init-platform! :override-doc + "Initialize the pontoon skeleton, physics constants, buoyancy points, and anchor.")) ) (deftype tra-iris-door (eco-door) + "The Training level's precursor iris door." () :method-count-assert 27 :size-assert #x104 :heap-base #xa0 :flag-assert #x1b00a00104 + (:methods + (setup-collision! :override-doc + "Create and install the iris door's solid collision mesh.") + (setup-skel-and-params! :override-doc + "Initialize the iris-door skeleton, transforms, and opening distances.")) ) (deftype scarecrow-a (process-drawable) + "The first Training attack dummy." ((root collide-shape :override) (incomming-attack-id uint64 :offset-assert 176) (intersection vector :inline :offset-assert 192) @@ -29042,12 +39035,15 @@ :heap-base #x60 :flag-assert #x16006000d0 (:methods + (init-from-entity! :override-doc + "Create the dummy collision, initialize its skeleton, and enter idle.") (idle () _type_ :state) ;; 20 (hit (float vector symbol) _type_ :state) ;; 21 ) ) (deftype scarecrow-b (process-drawable) + "The second Training attack dummy." ((root collide-shape :override) (incomming-attack-id uint64 :offset-assert 176) (intersection vector :inline :offset-assert 192) @@ -29057,6 +39053,8 @@ :heap-base #x60 :flag-assert #x16006000d0 (:methods + (init-from-entity! :override-doc + "Create the dummy collision, initialize its skeleton, and enter idle.") (idle () _type_ :state) ;; 20 (hit (float vector symbol) _type_ :state) ;; 21 ) @@ -29093,10 +39091,18 @@ ;; - Functions -(define-extern check-drop-level-training-mist (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern check-drop-level-training-spout-rain (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern tra-bird-bob-func (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern tra-sparticle-seagull-moon (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern check-drop-level-training-mist + "Kill a mist particle after it falls below its configured height." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-training-spout-rain + "Kill rain below the spout surface, optionally play a drop sound, and launch splash effects." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern tra-bird-bob-func + "Bob a Training bird particle beneath its owning drawable." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern tra-sparticle-seagull-moon + "Copy the Training seagull particle's wrapped omega value into its transform." + (function sparticle-system sparticle-cpuinfo matrix none)) ;; ---------------------- @@ -29108,6 +39114,7 @@ ;; - Types (deftype boatpaddle (process-drawable) + "Paddle-wheel scenery that turns continuously and throws water particles from the moving blade." () :method-count-assert 20 :size-assert #xb0 @@ -29115,9 +39122,13 @@ :flag-assert #x14004000b0 (:states boatpaddle-idle) + (:methods + (init-from-entity! :override-doc + "Initialize the placed paddle, its skeleton, and water-particle launcher, then begin turning.")) ) (deftype windturbine (process-drawable) + "Wind-driven scenery whose rotation rate follows the local wind field and may emit particles." ((spawn-particle-enable symbol :offset-assert 176) (angle-speed float :offset-assert 180) ) @@ -29127,9 +39138,15 @@ :flag-assert #x14005000b8 (:states windturbine-idle) + (:methods + (init-from-entity! :override-doc + "Initialize the placed turbine and skeleton, read whether it emits particles, and begin + following the local wind speed.")) ) (deftype mis-bone-bridge (process-drawable) + "Attackable bone bridge that bends, breaks after repeated hits, and leaves a permanent completion + state once it falls." ((root collide-shape-moving :override) (particle-group sparticle-launch-group :offset-assert 176) (player-attack-id int32 :offset-assert 180) @@ -29145,17 +39162,27 @@ mis-bone-bridge-idle mis-bone-bridge-hit mis-bone-bridge-bump) + (:methods + (init-from-entity! :override-doc + "Create the bridge collision, initialize its art and selected break animation, and enter the + intact or already-broken state from persistent progress.")) ) (deftype breakaway (process-drawable) + "Linked bone platform segment that warns its neighbors, then falls after Jak steps on it." ((root collide-shape-moving :override)) :method-count-assert 22 :size-assert #xb0 :heap-base #x40 :flag-assert #x16004000b0 (:methods - (init! (_type_ res-lump int) none) ;; 20 - (go-idle (_type_) none) ;; 21 + (init! + "Initialize the segment from source-res and create its moving collision mesh on + transform-index." + (_type_ res-lump int) none) ;; 20 + (go-idle + "Enter the waiting state." + (_type_) none) ;; 21 ) (:states breakaway-idle @@ -29169,6 +39196,9 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x16004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the right segment, its skeleton, and its waiting state.")) ) (deftype breakaway-mid (breakaway) @@ -29177,6 +39207,9 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x16004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the middle segment, its skeleton, and its waiting state.")) ) (deftype breakaway-left (breakaway) @@ -29185,15 +39218,31 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x16004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the left segment, its skeleton, and its waiting state.")) ) (deftype bone-platform (rigid-body-platform) + "Floating bone platform tethered horizontally to its placed anchor." ((anchor-point vector :inline :offset-assert 736) ) :method-count-assert 35 :size-assert #x2f0 :heap-base #x280 :flag-assert #x23028002f0 + (:methods + (accumulate-forces! :override-doc + "Accumulate the ordinary platform forces, then pull the body horizontally toward its anchor.") + (apply-restoring-force! :override-doc + "Apply no horizontal centering force within one metre of target-position, ramp the force + across the next metre, and clamp it beyond that distance.") + (init-collision! :override-doc + "Create one indestructible sticky ground mesh on skeleton transform 3 with a five-metre + collision sphere and one rider slot, then install it as root-overlay.") + (init-platform! :override-doc + "Initialize the skeleton and platform constants, lower its resting height by one metre, + arrange five control points around a three-metre ring, and save its placed anchor.")) ) (deftype mistycam (process-hidden) @@ -29204,14 +39253,19 @@ ) (deftype misty-battlecontroller (battlecontroller) + "Misty Island ambush controller with the level's temporary collision behavior enabled." () :method-count-assert 29 :size-assert #x27c :heap-base #x210 :flag-assert #x1d0210027c + (:methods + (setup-paths-and-params! :override-doc + "Apply the shared encounter setup and enable the Misty ambush collision behavior.")) ) (deftype boat-fuelcell (process-drawable) + "Misty boat power cell that plays the balloon camera when collected for the first time." ((play-cutscene? symbol :offset-assert 176) ) :method-count-assert 20 @@ -29222,13 +39276,23 @@ boat-fuelcell-spawn boat-fuelcell-idle boat-fuelcell-die) + (:methods + (init-from-entity! :override-doc + "Initialize the placed power cell and enter its waiting or already-collected state.")) ) ;; - Functions -(define-extern mis-bone-bridge-event-handler (function process int symbol event-message-block object :behavior mis-bone-bridge)) -(define-extern actor-wait-for-period (function time-frame symbol)) -(define-extern misty-cam-restore (function symbol)) +(define-extern mis-bone-bridge-event-handler + "React once to each attack: fall when a red-eco strike hits the front, otherwise play the hit or + bump response." + (function process int symbol event-message-block object :behavior mis-bone-bridge)) +(define-extern actor-wait-for-period + "Suspend until duration has elapsed." + (function time-frame symbol)) +(define-extern misty-cam-restore + "Restore the saved Misty debug camera position, field of view, and display statistics." + (function symbol)) ;; - Unknowns @@ -29252,6 +39316,7 @@ ;; - Types (deftype silostep (process-drawable) + "Linked arena stair segment that plays the warehouse camera and rises permanently when triggered." ((anim-limit float :offset-assert 176) (cam-tracker handle :offset-assert 184) ) @@ -29263,20 +39328,34 @@ (silostep-rise symbol) silostep-idle silostep-camera) + (:methods + (init-from-entity! :override-doc + "Create the moving stair collision, initialize its art and configured rise distance, and + enter the raised or waiting state from persistent progress.")) ) (deftype rounddoor (eco-door) + "One-way, auto-closing arena door with the warehouse model, collision mesh, and sounds." () :method-count-assert 27 :heap-base #xa0 :size-assert #x104 :flag-assert #x1b00a00104 + (:methods + (setup-collision! :override-doc + "Create the solid round-door mesh collision with its ten-metre bound and install it as root.") + (setup-skel-and-params! :override-doc + "Initialize the warehouse door skeleton, opening distances, sounds, speed, one-way behavior, + and outward plane.")) ) ;; - Functions -(define-extern misty-camera-view (function none :behavior silostep)) +(define-extern misty-camera-view + "Track Jak while grabbed, show the arena staircase for three seconds, then restore the base + camera after release." + (function none :behavior silostep)) ;; - Unknowns (define-extern *rounddoor-sg* skeleton-group) @@ -29292,6 +39371,7 @@ ;; - Types (deftype keg-conveyor (process-drawable) + "Misty Island keg conveyor that aligns to its path and drives a linked paddle and barrel stream." ((pivot joint-mod-spinner :offset-assert 176) (quat quaternion :inline :offset-assert 192) ) @@ -29301,9 +39381,16 @@ :flag-assert #x14006000d0 (:states keg-conveyor-idle) + (:methods + (relocate :override-doc + "Relocate the optional joint spinner, then relocate the process through the parent method.") + (init-from-entity! :override-doc + "Initialize the placed conveyor, path, skeleton, spinner, and heading, then spawn its paddle + and enter the idle state.")) ) (deftype keg-conveyor-paddle (process-drawable) + "Animated conveyor paddle that periodically releases its current keg and selects the next kind." ((root collide-shape-moving :override) (object-on-paddle (pointer bouncing-float) :offset-assert 176) (sync sync-info :inline :offset-assert 180) @@ -29317,6 +39404,8 @@ ) (deftype keg (process-drawable) + "Breakable conveyor keg that follows the paddle and path, optionally bouncing before entering the + chute." ((root collide-shape-moving :override) (sync-offset float :offset-assert 176) (keg-behavior int8 :offset-assert 180) @@ -29339,14 +39428,31 @@ ;; - Functions -(define-extern keg-conveyor-paddle-init-by-other (function keg-conveyor-paddle none :behavior keg-conveyor-paddle)) -(define-extern keg-conveyor-spawn-keg (function keg-conveyor (pointer keg))) -(define-extern keg-conveyor-spawn-bouncing-keg (function keg-conveyor (pointer keg))) -(define-extern keg-init-by-other (function keg int none :behavior keg)) -(define-extern keg-bounce-set-particle-rotation-callback (function part-tracker none)) -(define-extern keg-update-smush (function keg float none)) -(define-extern keg-event-handler (function process int symbol event-message-block object :behavior keg)) -(define-extern keg-post (function int :behavior keg)) +(define-extern keg-conveyor-paddle-init-by-other + "Create the paddle collision and path, copy its parent transform, initialize animation and timing, + and begin cycling." + (function keg-conveyor-paddle none :behavior keg-conveyor-paddle)) +(define-extern keg-conveyor-spawn-keg + "Spawn an ordinary keg under conveyor." + (function keg-conveyor (pointer keg))) +(define-extern keg-conveyor-spawn-bouncing-keg + "Spawn a bouncing keg under conveyor." + (function keg-conveyor (pointer keg))) +(define-extern keg-init-by-other + "Initialize a spawned keg's collision, art, shadow behavior, heading, sound, and conveyor mode." + (function keg int none :behavior keg)) +(define-extern keg-bounce-set-particle-rotation-callback + "Set the bounce puff rotation from the owning keg's heading." + (function part-tracker none)) +(define-extern keg-update-smush + "Apply amount as a vertical stretch and matching horizontal squash." + (function keg float none)) +(define-extern keg-event-handler + "Break the keg when its forwarded touch or attack is accepted." + (function process int symbol event-message-block object :behavior keg)) +(define-extern keg-post + "Maintain the rolling sound for ordinary nearby kegs, then update the transform." + (function int :behavior keg)) ;; - Unknowns @@ -29365,11 +39471,16 @@ ;; - Types (deftype mud (water-anim) + "Misty Island animated mud with level-specific ripple waveforms and fade distances." () :method-count-assert 30 :heap-base #x70 :size-assert #xdc :flag-assert #x1e007000dc + (:methods + (setup-water! :override-doc + "Run the animated-water setup, mark this volume as mud, create its ripple controller, and + select large or small waves and fade distances from the placed look.")) ) ;; - Unknowns @@ -29387,6 +39498,8 @@ ;; - Types (deftype muse (nav-enemy) + "The Misty Island Muse, which flees around a closed path, sparkles continuously, and starts the + capture sequence when touched or attacked." ((root collide-shape-moving :override) (current-path-index float :offset-assert 400) (prev-path-index float :offset-assert 404) @@ -29407,9 +39520,24 @@ muse-idle muse-caught ) + (:methods + (common-post :override-doc + "Keep the capture animation spooled, emit sparkle particles, then run the ordinary navigation + enemy post step.") + (touch-handler :override-doc + "Enter the caught state when another process touches the Muse.") + (attack-handler :override-doc + "Enter the caught state when another process attacks the Muse.") + (spawn-sparkle-particles! + "Emit sparkle particles at two random body joints." + (_type_) none :overlay-at nav-enemy-method-51) ;; 51 + (init-from-entity! :override-doc + "Create the Muse collision and drawable state, initialize its closed path, navigation, neck, + capture animation, and reward animation, then enter the idle state.")) ) (deftype point-on-path-segment-info (structure) + "Working values for projecting one point onto a finite path segment." ((point vector :inline :offset-assert 0) (segment vector 2 :inline :offset-assert 16) ;; TODO - guess (dir vector :inline :offset-assert 48) @@ -29425,9 +39553,17 @@ ;; - Functions -(define-extern muse-check-dest-point (function none :behavior muse)) -(define-extern analyze-point-on-path-segment (function point-on-path-segment-info float)) -(define-extern muse-get-path-point (function vector int none :behavior muse)) +(define-extern muse-check-dest-point + "Project Jak and the Muse onto the closed path and choose a destination several vertices farther + away from Jak." + (function none :behavior muse)) +(define-extern analyze-point-on-path-segment + "Project info.point onto its finite segment and store the direction, length, nearest point, + distance, and clamped 0-to-1 parameter." + (function point-on-path-segment-info float)) +(define-extern muse-get-path-point + "Evaluate the Muse path at index and write the result to output." + (function vector int none :behavior muse)) ;; - Unknowns @@ -29444,6 +39580,8 @@ ;; - Types (deftype bonelurker (nav-enemy) + "Charging Misty Island lurker that can be stunned by ordinary hits and killed by red eco or an + explosion." ((bump-player-time time-frame :offset-assert 400) ) :method-count-assert 76 @@ -29452,14 +39590,34 @@ :flag-assert #x4c01300198 (:states bonelurker-stun) + (:methods + (touch-handler :override-doc + "While its attack sphere is enabled and touching, send a generic attack and halve movement + speed after a successful hit.") + (attack-handler :override-doc + "Die from red eco or an explosion; otherwise shove the attacker and either enter stun or + briefly disable the charge attack.") + (initialize-collision :override-doc + "Create the moving body group, two touch spheres, and joint-29 attack sphere, with a two-metre + navigation radius and one collision iteration.") + (post-init-setup! :override-doc + "Initialize the skeleton, navigation defaults, and neck axes.")) ) ;; - Functions -(define-extern bonelurker-set-small-bounds-sphere (function none :behavior bonelurker)) -(define-extern bonelurker-set-large-bounds-sphere (function none :behavior bonelurker)) -(define-extern bonelurker-stunned-event-handler (function process int symbol event-message-block object :behavior bonelurker)) -(define-extern bonelurker-push-post (function none :behavior bonelurker)) +(define-extern bonelurker-set-small-bounds-sphere + "Use the three-metre idle bounds sphere." + (function none :behavior bonelurker)) +(define-extern bonelurker-set-large-bounds-sphere + "Use the six-metre active bounds sphere." + (function none :behavior bonelurker)) +(define-extern bonelurker-stunned-event-handler + "After the initial stun delay, let another attack kill the Bonelurker and credit the attacker." + (function process int symbol event-message-block object :behavior bonelurker)) +(define-extern bonelurker-push-post + "Navigate and integrate the stunned Bonelurker while it is pushed backward." + (function none :behavior bonelurker)) ;; - Unknowns @@ -29476,6 +39634,7 @@ ;; - Types (deftype quicksandlurker-missile (process-drawable) + "A quicksand lurker's explosive projectile." ((root collide-shape-moving :override) ) :method-count-assert 20 @@ -29489,6 +39648,7 @@ ) (deftype quicksandlurker-missile-init-data (structure) + "Launch position and velocity passed to a new quicksand lurker missile." ((position vector :offset-assert 0) (velocity vector :offset-assert 4) ) @@ -29498,6 +39658,7 @@ ) (deftype quicksandlurker (process-drawable) + "A Misty Island lurker that rises from the mud, tracks Jak, and spits explosive missiles." ((root collide-shape :override) (original-position vector :inline :offset-assert 176) (y-offset float :offset-assert 192) @@ -29521,20 +39682,46 @@ quicksandlurker-idle quicksandlurker-yawn ) + (:methods + (init-from-entity! :override-doc + "Initialize the lurker's art, collision, mud-relative position, and navigation, then begin + hidden below the surface.")) ) ;; - Functions -(define-extern orient-to-face-target (function quaternion :behavior quicksandlurker)) -(define-extern quicksandlurker-spit (function (pointer part-tracker) :behavior quicksandlurker)) -(define-extern spawn-quicksandlurker-missile (function process vector vector entity-actor none)) -(define-extern quicksandlurker-check-hide-transition (function none :behavior quicksandlurker)) -(define-extern inc-angle (function (pointer float) float float)) -(define-extern quicksandlurker-missile-init-by-other (function quicksandlurker-missile-init-data entity-actor none :behavior quicksandlurker-missile)) -(define-extern get-height-over-navmesh! function) ;; unused -(define-extern intersects-nav-mesh? (function nav-control vector symbol)) ;; unused -(define-extern quicksandlurker-default-event-handler (function process int symbol event-message-block object :behavior quicksandlurker)) -(define-extern quicksandlurker-post (function none :behavior quicksandlurker)) +(define-extern orient-to-face-target + "Turn toward Jak when a target is available." + (function quaternion :behavior quicksandlurker)) +(define-extern quicksandlurker-spit + "Launch the charged missile toward Jak." + (function (pointer part-tracker) :behavior quicksandlurker)) +(define-extern spawn-quicksandlurker-missile + "Spawn a missile under parent with the supplied position, velocity, and source entity." + (function process vector vector entity-actor none)) +(define-extern quicksandlurker-check-hide-transition + "Hide when Jak is too close, below the lurker, or outside the navigation mesh." + (function none :behavior quicksandlurker)) +(define-extern inc-angle + "Advance an angle and wrap values above one revolution." + (function (pointer float) float float)) +(define-extern quicksandlurker-missile-init-by-other + "Create the missile's collision and particles, apply its launch state, and enter flight." + (function quicksandlurker-missile-init-data entity-actor none + :behavior quicksandlurker-missile)) +(define-extern get-height-over-navmesh! + "When point lies on the navigation mesh, store its height above the mesh's first vertex and + return true. This helper assumes a flat mesh." + (function nav-control (pointer float) vector symbol)) ;; unused +(define-extern intersects-nav-mesh? + "Return true when point lies on the navigation mesh." + (function nav-control vector symbol)) ;; unused +(define-extern quicksandlurker-default-event-handler + "Die on attack and celebrate when a missile reports victory." + (function process int symbol event-message-block object :behavior quicksandlurker)) +(define-extern quicksandlurker-post + "Orbit and bob around the placed position, following the animated mud surface when available." + (function none :behavior quicksandlurker)) ;; - Unknowns @@ -29550,6 +39737,7 @@ ;; - Types (deftype teetertotter (process-drawable) + "Misty Island seesaw that drops a boulder onto one end to launch Jak from the other." ((launched-player basic :offset-assert 176) (in-launch-window basic :offset-assert 180) (rock-is-dangerous basic :offset-assert 184) @@ -29562,11 +39750,17 @@ teetertotter-idle teetertotter-launch teetertotter-bend) + (:methods + (init-from-entity! :override-doc + "Build the plank, boulder, launch-end, and sticky riding collision, initialize the art, and + enter the idle state.")) ) ;; - Functions -(define-extern target-on-end-of-teetertotter? (function teetertotter symbol)) +(define-extern target-on-end-of-teetertotter? + "Return whether Jak is at least two meters along the plank's launch end." + (function teetertotter symbol)) ;; - Unknowns @@ -29582,6 +39776,7 @@ ;; - Types (deftype balloonlurker-bank (basic) + "Physics and control tuning for the Misty Island balloon lurker." ((buoyancy-depth-offset meters :offset-assert 4) (player-mass float :offset-assert 8) (rudder-factor float :offset-assert 12) @@ -29599,6 +39794,7 @@ ) (deftype balloonlurker (rigid-body-platform) + "Pilotable balloon enemy with rigid-body buoyancy, rudder and propeller control, and two mines." ((explosion-force-position vector :inline :offset-assert 736) (explosion-force vector :inline :offset-assert 752) (explosion symbol :offset-assert 768) @@ -29631,9 +39827,23 @@ balloonlurker-patrol balloonlurker-die (balloonlurker-mine-explode int)) + (:methods + (relocate :override-doc "Relocate the four separately allocated joint modifiers.") + (init-from-entity! :override-doc + "Create the collision and drawable platform state, then either remain permanently destroyed + or spawn the pilot and begin patrolling.") + (accumulate-forces! :override-doc + "Apply buoyancy and drag at four hull points, rudder drag, propeller thrust, mine weight, + gravity, and pending player or explosion forces for one physics step.") + (init-collision! :override-doc + "Create the balloon body, pilot, and mine collision spheres and install the moving shape.") + (init-platform! :override-doc + "Initialize art, path following, rigid-body control points, steering joints, mines, sounds, + and the balloon's initial control state.")) ) (deftype balloonlurker-pilot (process-drawable) + "The visible pilot attached to a balloon lurker." ((parent-override (pointer balloonlurker) :score 100 :offset 12) (root collide-shape-moving :override)) :method-count-assert 22 @@ -29641,8 +39851,12 @@ :heap-base #x40 :flag-assert #x16004000b0 (:methods - (balloonlurker-pilot-method-20 (_type_) none) ;; 20 - (balloonlurker-pilot-method-21 (_type_) none) ;; 21 + (balloonlurker-pilot-method-20 + "Create the pilot's touch collision sphere." + (_type_) none) ;; 20 + (balloonlurker-pilot-method-21 + "Initialize the pilot skeleton and select its origin joint." + (_type_) none) ;; 21 ) (:states balloonlurker-pilot-idle @@ -29651,15 +39865,34 @@ ;; - Functions -(define-extern balloonlurker-pilot-init-by-other (function balloonlurker none :behavior balloonlurker-pilot)) -(define-extern balloonlurker-find-nearest-path-point (function none :behavior balloonlurker)) -(define-extern balloonlurker-snap-to-path-point (function int quaternion :behavior balloonlurker)) -(define-extern balloonlurker-get-next-path-point (function none :behavior balloonlurker)) -(define-extern balloonlurker-play-sounds (function none :behavior balloonlurker)) -(define-extern balloonlurker-player-impulse (function vector :behavior balloonlurker)) -(define-extern balloonlurker-get-path-point (function int none :behavior balloonlurker)) -(define-extern balloonlurker-event-handler (function process int symbol event-message-block object :behavior balloonlurker)) -(define-extern balloonlurker-post (function none :behavior balloonlurker)) +(define-extern balloonlurker-pilot-init-by-other + "Attach a newly spawned pilot to balloon and enter its idle state." + (function balloonlurker none :behavior balloonlurker-pilot)) +(define-extern balloonlurker-find-nearest-path-point + "Select the path control vertex nearest the balloon in the horizontal plane." + (function none :behavior balloonlurker)) +(define-extern balloonlurker-snap-to-path-point + "Move the balloon to one path control vertex and face along the path tangent." + (function int quaternion :behavior balloonlurker)) +(define-extern balloonlurker-get-next-path-point + "Advance to the next path control vertex, wrapping at the end." + (function none :behavior balloonlurker)) +(define-extern balloonlurker-play-sounds + "Update the propeller and pedal sounds while alive, or stop them after death." + (function none :behavior balloonlurker)) +(define-extern balloonlurker-player-impulse + "Record the force needed to match Jak's velocity at his contact point." + (function vector :behavior balloonlurker)) +(define-extern balloonlurker-get-path-point + "Evaluate and select one path control vertex as the current destination." + (function int none :behavior balloonlurker)) +(define-extern balloonlurker-event-handler + "Handle body contact, mine attacks, and death events." + (function process int symbol event-message-block object :behavior balloonlurker)) +(define-extern balloonlurker-post + "Update automatic or player steering, propeller and rudder joints, rigid-body simulation, sounds, + and drawable transforms." + (function none :behavior balloonlurker)) ;; - Unknowns @@ -29712,6 +39945,14 @@ :method-count-assert 53 :size-assert #x1e0 :flag-assert #x35017001e0 + (:methods + (init-from-entity! :override-doc + "Initialize the first Misty Island intro sequence, attach it to the intro task, clear the + handles for its cloned characters, and enter the current task state.") + (play-anim! :override-doc + "Return the first Misty Island intro animation. When commit? is true, hide Daxter, spawn the + Bonelurker and background army, and prepare the cloned characters for animation playback.") + ) ) (deftype sequenceC (process-taskable) @@ -29723,6 +39964,14 @@ :method-count-assert 53 :size-assert #x1b1 :flag-assert #x35015001b1 + (:methods + (init-from-entity! :override-doc + "Initialize the second Misty Island intro sequence, attach it to the intro task, clear its + cloned-character handles, and install the dark-eco splash hook.") + (play-anim! :override-doc + "Return the second Misty Island intro animation. When commit? is true, spawn the cloned + Bonelurker and dark-eco can and prepare the can's glow and particle effects.") + ) ) (deftype army-info (structure) @@ -29738,11 +39987,22 @@ ;; - Functions -(define-extern sequenceC-trans-hook (function none :behavior sequenceC)) -(define-extern sequenceC-can-trans-hook (function none :behavior sequenceC)) -(define-extern sequenceC-can-trans-hook-2 (function none :behavior sequenceC)) -(define-extern evilsib-trans-hook-wait (function none :behavior evilbro)) -(define-extern evilsib-trans-hook-hover (function none :behavior evilbro)) +(define-extern sequenceC-trans-hook + "Launch the dark-eco splash at animation frame 1655, then disable this transition hook." + (function none :behavior sequenceC)) +(define-extern sequenceC-can-trans-hook + "At animation frame 1055, switch the dark-eco can to its glowing model and start its particle + effect." + (function none :behavior sequenceC)) +(define-extern sequenceC-can-trans-hook-2 + "Emit particles from the moving dark-eco can, then launch its explosion at animation frame 1590." + (function none :behavior sequenceC)) +(define-extern evilsib-trans-hook-wait + "Launch the sibling's appearance effect at animation frame 425, then leave its hook idle." + (function none :behavior evilbro)) +(define-extern evilsib-trans-hook-hover + "Leave the cloned sibling's transition hook idle." + (function none :behavior evilbro)) ;; - Unknowns @@ -29784,6 +40044,20 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (play-anim! :override-doc + "Return the Fire Canyon resolution animation. When commit? is true, close the current task + stage; an unexpected task status is reported and falls back to the current art element.") + (get-art-elem :override-doc + "Return the alternate idle art while this task is invalid, otherwise return the active root + animation channel.") + (should-display? :override-doc + "Select the first applicable task stage and return whether the Fire Canyon reward speech is + ready.") + (init-from-entity! :override-doc + "Initialize the Fire Canyon assistant, attach her task control, select its current stage, and + enter the corresponding taskable state.") + ) ) ;; - Unknowns @@ -29809,7 +40083,10 @@ ;; - Functions -(define-extern check-drop-level-sagehut2 (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-sagehut2 + "When a droplet falls below its stored surface height, kill it, occasionally play the water-drop + sound, and launch a splash at the same X/Z position on the surface." + (function sparticle-system sparticle-cpuinfo vector none)) ;; ---------------------- @@ -29827,6 +40104,10 @@ :heap-base #x80 :size-assert #xe8 :flag-assert #x1e008000e8 + (:methods + (set-stack-size! :override-doc + "Set the Village 2 cutscene camera's process stack to 512 bytes.") + ) ) (deftype pontoon (rigid-body-platform) @@ -29841,6 +40122,14 @@ (:states pontoon-die pontoon-hidden) + (:methods + (init-from-entity! :override-doc + "Initialize a pontoon's collision, drawable, buoyancy setup, and task gates, then select its + hidden, idle, or dead state.") + (accumulate-forces! :override-doc + "Accumulate the ordinary rigid-body platform forces, then pull the pontoon back toward its + anchor point.") + ) ) (deftype pontoonfive (pontoon) @@ -29849,6 +40138,13 @@ :heap-base #x290 :size-assert #x2f2 :flag-assert #x23029002f2 + (:methods + (init-collision! :override-doc + "Create the five-meter pontoon's moving sticky collision sphere and rider slot.") + (init-platform! :override-doc + "Initialize the five-meter pontoon's skeleton and physics constants, place its four buoyancy + control points, and connect it to navigation.") + ) ) (deftype pontoonten (pontoon) @@ -29857,6 +40153,13 @@ :heap-base #x290 :size-assert #x2f2 :flag-assert #x23029002f2 + (:methods + (init-collision! :override-doc + "Create the ten-meter pontoon's moving sticky collision sphere and rider slot.") + (init-platform! :override-doc + "Initialize the ten-meter pontoon's skeleton and physics constants, place its four buoyancy + control points, and connect it to navigation.") + ) ) (deftype allpontoons (process-drawable) @@ -29869,6 +40172,10 @@ (:states allpontoons-idle (allpontoons-be-clone handle)) + (:methods + (init-from-entity! :override-doc + "Initialize the all-pontoons cutscene prop, attach its task and wake trail, and enter idle.") + ) ) (deftype fireboulder (process-drawable) @@ -29884,6 +40191,11 @@ fireboulder-idle fireboulder-hover (fireboulder-be-clone handle)) + (:methods + (init-from-entity! :override-doc + "Build the fire boulder's collision group, initialize its drawable and skeleton, configure + the hovering variant, and select its initial task state.") + ) ) (deftype ceilingflag (process-drawable) @@ -29894,6 +40206,10 @@ :flag-assert #x14004000b0 (:states ceilingflag-idle) + (:methods + (init-from-entity! :override-doc + "Initialize the ceiling flag's drawable and skeleton and enter its idle animation.") + ) ) (deftype exit-chamber-dummy (process-drawable) @@ -29905,7 +40221,12 @@ :heap-base #x60 :flag-assert #x15006000c8 (:methods - (skip-reminder? (_type_) symbol) ;; 20 + (init-from-entity! :override-doc + "Initialize the exit-chamber marker above its authored position, prepare its animation, and + wait until the fuel cell may appear.") + (skip-reminder? + "Return true once reminder stage two is active and Sunken Precursor City is not loaded." + (_type_) symbol) ;; 20 ) (:states exit-chamber-dummy-wait-to-appear @@ -29922,6 +40243,11 @@ (:states ogreboss-village2-idle ogreboss-village2-throw) + (:methods + (init-from-entity! :override-doc + "Build the Village 2 ogre's collision, initialize and scale its skeleton, and enter its idle + boulder-throwing state.") + ) ) (deftype villageb-ogreboss (ogreboss-village2) @@ -29938,21 +40264,32 @@ :size-assert #xdc :heap-base #x70 :flag-assert #x1e007000dc + (:methods + (setup-water! :override-doc + "Run the base water setup, then install Village 2's ripple waveform, fade distances, scale, + and blue-green color.") + ) ) ;; - Functions -(define-extern boulder1-trans (function none :behavior fireboulder)) -(define-extern boulder2-trans (function none :behavior fireboulder)) -(define-extern boulder3-trans (function none :behavior fireboulder)) -(define-extern boulder4-trans (function none :behavior fireboulder)) -(define-extern boulder4-trans-2 (function none :behavior fireboulder)) -(define-extern boulder4-trans-3 (function none :behavior fireboulder)) -(define-extern boulder3-trans-2 (function none :behavior fireboulder)) -(define-extern boulder2-trans-2 (function none :behavior fireboulder)) -(define-extern fireboulder-disable-blocking-collision (function none :behavior fireboulder)) -(define-extern fireboulder-hover-stuff (function object :behavior fireboulder)) -(define-extern ogreboss-village2-trans (function none :behavior ogreboss-village2)) +(define-extern boulder1-trans "Trail the first boulder and launch its final splash." (function none :behavior fireboulder)) +(define-extern boulder2-trans "Trail the second boulder and launch its wall impact." (function none :behavior fireboulder)) +(define-extern boulder3-trans "Trail the third boulder and launch its wall impact." (function none :behavior fireboulder)) +(define-extern boulder4-trans "Trail the fourth boulder and launch its first wall impact." (function none :behavior fireboulder)) +(define-extern boulder4-trans-2 "Launch the fourth boulder's second wall impact." (function none :behavior fireboulder)) +(define-extern boulder4-trans-3 "Launch the fourth boulder's final splash." (function none :behavior fireboulder)) +(define-extern boulder3-trans-2 "Launch the third boulder's final splash." (function none :behavior fireboulder)) +(define-extern boulder2-trans-2 "Launch the second boulder's final splash." (function none :behavior fireboulder)) +(define-extern fireboulder-disable-blocking-collision + "Disable the boulder's blocking primitive and tighten its root bounds for hovering." + (function none :behavior fireboulder)) +(define-extern fireboulder-hover-stuff + "Keep the hover particle tracker at the boulder center, creating it when necessary." + (function object :behavior fireboulder)) +(define-extern ogreboss-village2-trans + "Remove the ogre when the levitator task becomes invalid." + (function none :behavior ogreboss-village2)) ;; - Unknowns @@ -29986,6 +40323,19 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize the Gambler for the rolling race and money tasks, configure his music and + lighting, and enter the current taskable state.") + (play-anim! :override-doc + "Choose the Gambler's introduction, reminder, or reward animation. When commit? is true, + advance the corresponding task and collect the money payment when applicable.") + (get-art-elem :override-doc + "Return the Gambler's active root animation channel.") + (try-play-ambient-chatter :override-doc + "After the ambient cooldown and distance checks pass, choose one of thirteen Gambler lines; + suppress GAM-AM10 after the ogre-boss reminder is complete.") + ) ) ;; - Unknowns @@ -30007,6 +40357,28 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize the Warrior for the Village 2 money task, configure his music and lighting, and + enter the current taskable state.") + (get-art-elem :override-doc + "Return the Warrior's active root animation channel.") + (play-anim! :override-doc + "Choose the Warrior's introduction, reminder, or money-task reward animation. When commit? is + true, advance the task, collect the payment, start the pontoon clone animation, and remove + the alternate actors.") + (initialize-collision :override-doc + "Build the Warrior's indestructible collision group from one root group and two sphere + primitives.") + (try-play-ambient-chatter :override-doc + "After the two-second ambient cooldown and distance check pass, choose one of three Warrior + idle lines.") + (draw-npc-shadow :override-doc + "Enable and orient the Warrior's shadow only when its highest-detail mesh was drawn this + frame; disable it otherwise.") + (setup-shadow-settings! :override-doc + "Set the Warrior's shadow bottom and top clip planes relative to his root Y position.") + ) ) ;; - Unknowns @@ -30028,6 +40400,19 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize the Geologist for the mole and money tasks, configure her music and lighting, + and enter the current taskable state.") + (get-art-elem :override-doc + "Return the Geologist's active root animation channel.") + (play-anim! :override-doc + "Choose the Geologist's introduction, reminder, or reward animation for the mole and money + tasks. When commit? is true, apply the corresponding task progress and payment.") + (try-play-ambient-chatter :override-doc + "After the ambient cooldown and distance check pass, choose a Geologist idle line, subject + to the current mole and money task progress.") + ) ) ;; - Unknowns @@ -30079,8 +40464,8 @@ :size-assert #x14 :flag-assert #xb00000014 (:methods - (init! (_type_ int int float) none) ;; 9 - (update-timer! (_type_) none) ;; 10 + (init! "Initialize the random value's time range and symmetric value range." (_type_ int int float) none) ;; 9 + (update-timer! "Choose a new timer and random value when the current interval expires." (_type_) none) ;; 10 ) ) @@ -30097,8 +40482,8 @@ :size-assert #x18 :flag-assert #xb00000018 (:methods - (init! (_type_ float float float float) none) ;; 9 - (swamp-rope-oscillator-method-10 (_type_ float) none) ;; 10 + (init! "Initialize a damped scalar oscillator at its target." (_type_ float float float float) none) ;; 9 + (update! "Advance the damped scalar oscillator toward target plus target-offset." (_type_ float) none) ;; 10 ) ) @@ -30114,8 +40499,8 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (init! (_type_ int int float float) none) ;; 9 - (update-timer! (_type_) none) ;; 10 + (init! "Initialize the random vector's time and component ranges." (_type_ int int float float) none) ;; 9 + (update-timer! "Choose a new timer and random vector when the current interval expires." (_type_) none) ;; 10 ) ) @@ -30132,8 +40517,8 @@ :size-assert #x3c :flag-assert #xb0000003c (:methods - (init! (_type_ vector float float float) none) ;; 9 - (swamp-blimp-oscillator-method-10 (_type_ vector) none) ;; 10 + (init! "Initialize a damped vector oscillator at its target." (_type_ vector float float float) none) ;; 9 + (update! "Advance the damped vector oscillator toward target plus target-offset." (_type_ vector) none) ;; 10 ) ) @@ -30149,6 +40534,10 @@ :size-assert #xf4 :heap-base #x90 :flag-assert #x14009000f4 + (:methods + (init-from-entity! :override-doc + "Initialize a tether rock's collision, skeleton, pickup, blimp link, and task-dependent + starting state.")) (:states swamp-tetherrock-die swamp-tetherrock-hide @@ -30171,6 +40560,10 @@ :size-assert #x114 :heap-base #xb0 :flag-assert #x1400b00114 + (:methods + (init-from-entity! :override-doc + "Initialize a precursor arm's collision, skeleton, motion state, and task-dependent starting + state.")) (:states precursor-arm-idle precursor-arm-die @@ -30198,7 +40591,9 @@ :heap-base #xb0 :flag-assert #x1500b00120 (:methods - (swamp-rope-method-20 (_type_) basic) ;; 20 ;; ret - entity-actor | symbol + (still-tethered? + "Return whether the rope's other entity exists and its task still needs a reminder." + (_type_) basic) ;; 20 ;; ret - entity-actor | symbol ) (:states swamp-rope-idle-rock @@ -30230,6 +40625,12 @@ :size-assert #x260 :heap-base #x1f0 :flag-assert #x1401f00260 + (:methods + (relocate :override-doc + "Relocate the blimp's saved initial position along with the drawable.") + (init-from-entity! :override-doc + "Initialize the blimp's collision, skeleton, oscillators, rope links, joint modifiers, and + idle state.")) (:states swamp-blimp-idle swamp-blimp-bye-bye) @@ -30239,14 +40640,20 @@ (define-extern swamp-rope-init-by-other (function vector entity-actor none :behavior swamp-rope)) (define-extern swamp-blimp-setup (function int :behavior swamp-blimp)) -(define-extern tetherrock-get-info (function entity tetherrock-info)) +(define-extern tetherrock-get-info + "Return the camera, rope-joint, connection, and damping settings for a tether rock's task." + (function entity tetherrock-info)) (define-extern swamp-rope-post (function none :behavior swamp-rope)) (define-extern swamp-rope-break-code (function quaternion :behavior swamp-rope)) (define-extern swamp-rope-update-bounding-spheres (function none :behavior swamp-rope)) -(define-extern precursor-arm-slip (function float float)) +(define-extern precursor-arm-slip + "Clamp progress to zero through one and apply a quadratic ease-out." + (function float float)) (define-extern swamp-rope-trans (function none :behavior swamp-rope)) (define-extern blimp-trans (function float :behavior swamp-blimp)) -(define-extern bustarock (function int object)) +(define-extern bustarock + "Send five yellow-eco attacks to the numbered swamp tether rock for debugging." + (function int object)) ;; - Unknowns @@ -30276,6 +40683,25 @@ :size-assert #x190 :heap-base #x120 :flag-assert #x3501200190 + (:methods + (init-from-entity! :override-doc + "Initialize the Village 2 Assistant for the levitator task, connect the Blue Sage, and enter + the current taskable state.") + (get-art-elem :override-doc + "Return the Assistant's active root animation.") + (play-anim! :override-doc + "Choose the Assistant's levitator introduction or current task reminder. When commit? is + true, advance task progress and coordinate the Blue Sage and Flut Flut.") + (should-display? :override-doc + "Return whether the Assistant should remain visible for the current levitator task progress.") + (try-play-ambient-chatter :override-doc + "After the ambient cooldown and distance check pass, choose one of two welding lines.") + (play-reminder :override-doc + "Return whether the Assistant wants to talk and the target is inside the Blue Hut approach + region.") + (target-above-threshold? :override-doc + "Coordinate with the Blue Sage and return which character should speak to the target.") + ) ) (deftype sage-bluehut (process-taskable) @@ -30286,6 +40712,27 @@ :size-assert #x184 :heap-base #x120 :flag-assert #x3501200184 + (:methods + (init-from-entity! :override-doc + "Initialize the Blue Sage for the plant and precursor-arm tasks, connect his assistant, and + enter the current taskable state.") + (get-art-elem :override-doc + "Select the current reminder topic and return the corresponding Blue Sage animation.") + (play-anim! :override-doc + "Choose the Blue Sage's introduction or reminder animation. When commit? is true, advance + the relevant plant or precursor-arm tasks and notify his assistant.") + (should-display? :override-doc + "Return whether the levitator introduction is complete and the Sages have not been kidnapped.") + (try-play-ambient-chatter :override-doc + "After the ambient cooldown and distance check pass, choose one of five Blue Sage idle lines.") + (play-reminder :override-doc + "Return whether the Sage wants to talk and the target is inside the Blue Hut approach region.") + (should-play-reminder? + "Return whether a task reminder is due or the camera has moved away after a reminder." + (_type_) symbol :overlay-at process-taskable-method-45) + (target-above-threshold? :override-doc + "Return whether reminder speech may start and the assistant is not already talking.") + ) ) ;; - Unknowns @@ -30307,6 +40754,17 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize Flut Flut for the Village 2 levitator task and enter the current taskable state.") + (get-art-elem :override-doc + "Return Flut Flut's idle animation.") + (play-anim! :override-doc + "Return Flut Flut's idle animation; report an error when asked to commit unsupported task + speech.") + (should-display? :override-doc + "Return whether the levitator introduction and beach Flut Flut resolution are complete.") + ) ) ;; - Unknowns @@ -30330,6 +40788,29 @@ :size-assert #x190 :heap-base #x120 :flag-assert #x3501200190 + (:methods + (relocate :override-doc + "Relocate each live particle launch control along with the Assistant.") + (deactivate :override-doc + "Free the Assistant's particle launch controls before deactivating it.") + (init-from-entity! :override-doc + "Initialize the levitator Assistant, its boulder link, beam effects, sound, and starting + state.") + (get-art-elem :override-doc + "Return the post-task or working animation for the levitator Assistant.") + (play-anim! :override-doc + "Return the levitator reward animation and, when commit? is true, close the task and start the + boulder's clone animation.") + (should-display? :override-doc + "Return whether the levitator Assistant should be shown for the current task status.") + (target-above-threshold? :override-doc + "Return whether the levitator task is waiting for its reward speech.") + (draw-npc-shadow :override-doc + "Enable and orient the Assistant's shadow only when its highest-detail mesh was drawn this + frame; disable it otherwise.") + (setup-shadow-settings! :override-doc + "Set the Assistant's shadow clip planes relative to its root Y position.") + ) (:states just-particles) ) @@ -30338,7 +40819,10 @@ (define-extern assistant-levitator-blue-glow (function none :behavior assistant-levitator)) (define-extern assistant-levitator-blue-beam (function none :behavior assistant-levitator)) -(define-extern check-drop-level-assistant-bluehut (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-assistant-bluehut + "Remove a welding droplet below its stored water height and occasionally launch a splash and + sound." + (function sparticle-system sparticle-cpuinfo vector none)) ;; - Unknowns @@ -30363,6 +40847,18 @@ :heap-base #x90 :size-assert #xfc :flag-assert #x21009000fc + (:methods + (pose-skeleton! :override-doc + "Pose the button animation at its first frame when the platform can activate, or its final + frame otherwise, then post the pose and update collision transforms.") + (configure-movement! :override-doc + "Compute the camera-height thresholds at forty and sixty percent along the elevator path.") + (should-teleport? :override-doc + "Return whether the camera has crossed the endpoint-specific height threshold and the + elevator should swap directly to the other endpoint.") + (setup-skeleton! :override-doc + "Initialize the Sunken Elevator skeleton.") + ) ) ;; - Unknowns @@ -30389,7 +40885,9 @@ :heap-base #x50 :flag-assert #x15005000c0 (:methods - (init! (_type_) symbol) ;; 20 + (init-from-entity! :override-doc + "Initialize a timed swamp spike and enter its idle state.") + (init! "Initialize the spike's collision, skeleton, phase synchronization, and gate state." (_type_) symbol) ;; 20 ) (:states swamp-spike-idle) @@ -30401,6 +40899,9 @@ :size-assert #xc0 :heap-base #x50 :flag-assert #x15005000c0 + (:methods + (init-from-entity! :override-doc + "Initialize the swamp gate and select its open or closed state from saved completion.")) (:states swamp-spike-gate-down swamp-spike-gate-up) @@ -30419,6 +40920,10 @@ :size-assert #xc8 :heap-base #x60 :flag-assert #x14006000c8 + (:methods + (init-from-entity! :override-doc + "Initialize the balance platform's collision, skeleton, link, vertical motion, and travel + distance.")) (:states balance-plat-idle) ) @@ -30429,6 +40934,10 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize a destructible swamp rock at its authored scale with collision, navigation, and + explosion effects.")) (:states swamp-rock-idle swamp-rock-break) @@ -30442,6 +40951,17 @@ :size-assert #x2f4 :heap-base #x290 :flag-assert #x23029002f4 + (:methods + (float-height-at :override-doc + "Return the tar platform's base float height plus its offset and position-dependent bobbing.") + (accumulate-forces! :override-doc + "Accumulate the standard rigid-body forces, then pull the platform toward its anchor point.") + (init-collision! :override-doc + "Create and install the tar platform's moving, sticky collision shape.") + (init-platform! :override-doc + "Initialize the tar platform constants and skeleton, arrange four control points around the + platform, and save its anchor point.") + ) ) (deftype swamp-barrel (barrel) @@ -30469,7 +40989,9 @@ ;; - Functions -(define-extern swamp-spike-set-particle-rotation-callback (function part-tracker none)) +(define-extern swamp-spike-set-particle-rotation-callback + "Orient the swamp-spike particles from the owning spike's Y rotation." + (function part-tracker none)) (define-extern swamp-spike-default-event-handler (function process int symbol event-message-block object :behavior swamp-spike)) (define-extern swamp-spike-post (function none :behavior swamp-spike)) (define-extern swamp-rock-init-by-other (function vector none :behavior swamp-rock)) @@ -30501,7 +41023,9 @@ :size-assert #x30 :flag-assert #xa00000030 (:methods - (swamp-bat-idle-path-method-9 (_type_ vector float) vector) ;; 9 + (eval-point! + "Write the point at path-param around this elliptical idle path to out-position." + (_type_ vector float) vector) ;; 9 ) ) @@ -30522,6 +41046,11 @@ :size-assert #x10b :heap-base #xa0 :flag-assert #x1400a0010b + (:methods + (relocate :override-doc + "Relocate both path controls along with the swamp-bat controller.") + (init-from-entity! :override-doc + "Initialize the swamp-bat controller, its two paths, enemy facts, and configured slave bats.")) (:states swamp-bat-idle swamp-bat-launch-slaves) @@ -30546,7 +41075,9 @@ :heap-base #xb0 :flag-assert #x1500b00118 (:methods - (swamp-bat-slave-method-20 (_type_) float) ;; 20 + (get-path-position + "Return the current path position as synchronization phase times the path point count." + (_type_) float) ;; 20 ) (:states swamp-bat-slave-idle @@ -30603,6 +41134,19 @@ :size-assert #x1f0 :heap-base #x180 :flag-assert #x4c018001f0 + (:methods + (integrate-and-collide! :override-doc + "Integrate the rat's motion against the ground, then clamp it above the water floor.") + (common-post :override-doc + "Align the rat's up vector to its contact surface before the standard navigation post step.") + (touch-handler :override-doc + "Attack a touching process and notify the parent, or enter victory, when the attack succeeds.") + (initialize-collision :override-doc + "Create the rat's moving enemy collision sphere.") + (post-init-setup! :override-doc + "Initialize the rat's skeleton, navigation defaults, neck joints, movement timing, and water + control.") + ) (:states swamp-rat-spawn) ) @@ -30670,8 +41214,12 @@ :heap-base #x60 :flag-assert #x16006000cc (:methods - (swamp-rat-nest-dummy-method-20 (_type_) none) ;; 20 - (swamp-rat-nest-dummy-method-21 (_type_) int) ;; 21 + (init-collision-and-skeleton! + "Build this nest shell's collision shape and initialize its skeleton." + (_type_) none) ;; 20 + (init-spawn-joints! + "Configure this nest shell's rat spawn joints and destruction particles." + (_type_) int) ;; 21 ) (:states swamp-rat-nest-dummy-idle @@ -30745,7 +41293,11 @@ :method-count-assert 9 :size-assert #x3a :flag-assert #x90000003a - (:methods (new (symbol type kermit int function int int) _type_) ;; 0 + (:methods + (new + "Create a joint tracker for one skeleton joint and install its callback." + (symbol type kermit int function int int) _type_) ;; 0 + (relocate :override-doc "Adjust the tracked Kermit pointer after its process allocation moves.") ) ) @@ -30779,6 +41331,15 @@ :size-assert #x1bc :heap-base #x150 :flag-assert #x4c015001bc + (:methods + (relocate :override-doc + "Relocate the tongue tracker and charging-particle control before relocating the enemy.") + (deactivate :override-doc "Free the charging particles before deactivating Kermit.") + (common-post :override-doc "Run the standard enemy post-processing.") + (init-from-entity! :override-doc + "Initialize Kermit's collision, skeleton, navigation, tongue controller, and particles from + the entity.") + ) (:states kermit-idle kermit-chase @@ -30793,27 +41354,33 @@ ;; - Functions -(define-extern kermit-get-tongue-target-callback (function vector vector)) +(define-extern kermit-get-tongue-target-callback + "Copy the player's tongue target into out." + (function vector vector)) (define-extern kermit-disable-tongue (function none :behavior kermit)) (define-extern kermit-hop (function float symbol :behavior kermit)) (define-extern kermit-set-nav-mesh-target (function vector vector :behavior kermit)) (define-extern kermit-set-rotate-dir-to-player (function vector :behavior kermit)) (define-extern kermit-simple-post (function none :behavior kermit)) -(define-extern kermit-player-target-pos (function vector)) -(define-extern kermit-tongue-pos (function kermit vector)) +(define-extern kermit-player-target-pos "Return the player's tongue target position." (function vector)) +(define-extern kermit-tongue-pos "Return Kermit's tongue-joint position." (function kermit vector)) (define-extern kermit-check-tongue-is-clear? (function symbol :behavior kermit)) (define-extern kermit-enable-tongue (function none :behavior kermit)) -(define-extern spawn-kermit-pulse (function kermit vector entity none)) +(define-extern spawn-kermit-pulse "Spawn a tongue pulse at position as Kermit's child." (function kermit vector entity none)) (define-extern kermit-check-to-hit-player? (function float symbol :behavior kermit)) -(define-extern kermit-get-head-dir-xz (function kermit vector vector)) +(define-extern kermit-get-head-dir-xz "Write Kermit's horizontal head direction to out." (function kermit vector vector)) (define-extern kermit-set-rotate-dir-to-nav-target (function vector :behavior kermit)) (define-extern kermit-get-new-patrol-point (function vector :behavior kermit)) (define-extern kermit-long-hop (function symbol :behavior kermit)) (define-extern kermit-short-hop (function symbol :behavior kermit)) (define-extern kermit-pulse-init-by-other (function vector entity-actor none :behavior kermit-pulse)) -(define-extern joint-mod-tracker-callback (function cspace transformq none)) -(define-extern build-matrix-from-up-and-forward-axes! (function matrix vector int vector int matrix)) -(define-extern kermit-get-head-dir (function kermit vector vector)) +(define-extern joint-mod-tracker-callback + "Aim and scale the tracked joint toward its current target." + (function cspace transformq none)) +(define-extern build-matrix-from-up-and-forward-axes! + "Build an orthonormal matrix whose selected axes follow the supplied up and forward vectors." + (function matrix vector int vector int matrix)) +(define-extern kermit-get-head-dir "Write Kermit's head direction to out." (function kermit vector vector)) (define-extern kermit-post (function none :behavior kermit)) ;; - Unknowns @@ -30869,6 +41436,17 @@ :size-assert #x1c0 :heap-base #x150 :flag-assert #x35015001c0 + (:methods + (relocate :override-doc "Adjust the three optional path-control pointers after this process moves.") + (goto-post-anim-state! :override-doc + "After play-anim, query for reminders, replay for a reward speech, or use the default + post-animation state.") + (try-play-ambient-chatter :override-doc + "Occasionally play a random Billy ambient line while he is idle.") + (init-from-entity! :override-doc + "Initialize Billy as a taskable character, create his three paths and sidekick, and enter the + appropriate initial state.") + ) (:states billy-playing billy-done) @@ -30905,7 +41483,9 @@ (define-extern billy-kill-all-but-farthy (function symbol :behavior billy)) (define-extern billy-game-update (function none :behavior billy)) (define-extern billy-snack-init-by-other (function vector none :behavior billy-snack)) -(define-extern rat-about-to-eat? (function billy-rat billy symbol)) +(define-extern rat-about-to-eat? + "Return whether rat is headed for a live snack while Billy still has snacks remaining." + (function billy-rat billy symbol)) (define-extern billy-game-update-wave (function none :behavior billy)) (define-extern billy-rat-init-by-other (function billy vector vector none :behavior billy-rat)) @@ -30948,18 +41528,32 @@ :size-assert #x170 :flag-assert #xf00000170 (:methods - (cavecrystal-light-control-method-9 (_type_ int float process-drawable) none) ;; 9 - (cavecrystal-light-control-method-10 (_type_ vector) float) ;; 10 - (inc-intensities! (_type_) none) ;; 11 - (cavecrystal-light-control-method-12 (_type_) none) ;; 12 - (create-connection! (_type_ process-drawable res-lump (function object object object object object) int float) connection) ;; 13 ;; TODO - process-drawable is often a cavecrystal - (execute-connections (_type_) int) ;; 14 + (set-crystal-light! + "Set or clear one crystal light, maintain the active list, and update its palette fade." + (_type_ int float process-drawable) none) ;; 9 + (light-intensity-at + "Return the strongest distance-attenuated crystal light at probe-pos, clamped to 2." + (_type_ vector) float) ;; 10 + (inc-intensities! + "Rebuild the linked list of lights with positive intensity and update the active count." + (_type_) none) ;; 11 + (prune-dead-lights! + "Initialize the light slots on first use, then once per frame remove lights whose source + process is gone." + (_type_) none) ;; 12 + (create-connection! + "Connect a drawable to the crystal-light engine when its resource enables crystal lighting." + (_type_ process-drawable res-lump (function object object object object object) int float) connection) ;; 13 ;; TODO - process-drawable is often a cavecrystal + (execute-connections "Run the cave-crystal lighting connections." (_type_) int) ;; 14 ) ) ;; - Functions -(define-extern cavecrystal-light-control-default-callback (function (pointer process-drawable) int float none)) +(define-extern cavecrystal-light-control-default-callback + "Blend a drawable from dim gray to white using the crystal-light intensity at its selected joint + or root position." + (function (pointer process-drawable) int float none)) ;; - Unknowns @@ -30981,6 +41575,10 @@ :size-assert #xe8 :heap-base #x80 :flag-assert #x1e008000e8 + (:methods + (set-stack-size! :override-doc + "Reserve a 512-byte stack for the scripted snow camera.") + ) ) (deftype cave-water (water-anim) @@ -30999,6 +41597,10 @@ :flag-assert #x14004000b0 (:states cavecrusher-idle) + (:methods + (init-from-entity! :override-doc + "Build the crusher collision mesh, skeleton, animation channel, and ambient sound, then enter +its idle animation.")) ) (deftype cavetrapdoor (process-drawable) @@ -31010,6 +41612,9 @@ :heap-base #x50 :flag-assert #x16005000b4 (:methods + (init-from-entity! :override-doc + "Build the moving trapdoor collision mesh and skeleton, set its authored delay and crystal +lighting, and enter the idle state.") (idle () _type_ :state) ;; 20 (trigger () _type_ :state) ;; 21 ) @@ -31029,8 +41634,17 @@ :size-assert #xf0 :heap-base #x80 :flag-assert #x14008000f0 + (:methods + (init-from-entity! :override-doc + "Initialize the wall platform's collision, skeleton, retracted and extended positions, and + optional synchronized motion.") + ) (:states caveflamepots-active) + (:methods + (init-from-entity! :override-doc + "Build the flame-pot collision primitives and launch points, load its authored timing and +shove settings, and enter the active state.")) ) (deftype cavespatula (process-drawable) @@ -31043,6 +41657,10 @@ :flag-assert #x14005000b8 (:states cavespatula-idle) + (:methods + (init-from-entity! :override-doc + "Build the rotating platform collision mesh, choose its level-specific skeleton, initialize +its animation phase and sound, and enter the idle state.")) ) (deftype cavespatulatwo (process-drawable) @@ -31055,6 +41673,10 @@ :flag-assert #x14005000b8 (:states cavespatulatwo-idle) + (:methods + (init-from-entity! :override-doc + "Build the second rotating platform's collision mesh, skeleton, animation phase, and sound, +then enter the idle state.")) ) (deftype caveelevator (process-drawable) @@ -31074,8 +41696,15 @@ :heap-base #xe0 :flag-assert #x1600e00150 (:methods - (caveelevator-method-20 (_type_) none) ;; 20 - (caveelevator-method-21 (_type_) float) ;; 21 + (init-from-entity! :override-doc + "Build the elevator platform, skeleton, wheel callback, lighting, animation mode, and cycle +parameters, then enter the selected elevator state.") + (update-bounce! + "Apply the smush bounce displacement once per frame." + (_type_) none) ;; 20 + (update-draw-bounds! + "Center the drawable bounds on joint 3 relative to the platform root." + (_type_) float) ;; 21 ) (:states caveelevator-cycle-active @@ -31087,8 +41716,12 @@ ;; - Functions -(define-extern caveelevator-joint-callback (function caveelevator none)) -(define-extern cavecrystal-light-control-caveelevator-callback (function (pointer cavecrystal) int float vector)) +(define-extern caveelevator-joint-callback + "Rotate the two elevator wheel joints in opposite directions as the platform moves." + (function caveelevator none)) +(define-extern cavecrystal-light-control-caveelevator-callback + "Apply crystal lighting sampled at an elevator joint or at its root." + (function (pointer cavecrystal) int float vector)) ;; - Unknowns @@ -31128,7 +41761,10 @@ ;; - Functions -(define-extern check-drop-level-maincave-drip (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-maincave-drip + "Kill a falling cave drip at its stored water height, occasionally play its impact sound, and +launch the splash and expanding ring particles." + (function sparticle-system sparticle-cpuinfo vector none)) ;; ---------------------- @@ -31150,11 +41786,17 @@ spiderwebs-idle spiderwebs-bounce ) + (:methods + (init-from-entity! :override-doc + "Build the web's collision mesh and skeleton, load its authored spring height, initialize its +animation channel, and enter the idle state.")) ) ;; - Functions -(define-extern spiderwebs-default-event-handler (function process int symbol event-message-block object :behavior spiderwebs)) +(define-extern spiderwebs-default-event-handler + "Bounce a process that bonks, lands near the web surface, or attacks it with a flop." + (function process int symbol event-message-block object :behavior spiderwebs)) ;; - Unknowns @@ -31185,8 +41827,17 @@ :heap-base #x90 :flag-assert #x1600900100 (:methods - (dark-crystal-method-20 (_type_) none) ;; 20 - (dark-crystal-method-21 (_type_) symbol) ;; 21 + (init-from-entity! :override-doc + "Build the crystal's collision mesh and skeleton, load its explosion settings, initialize its +colors and animation, and enter the appropriate state for its saved completion status.") + (damage-nearby-target! + "Damage Jak when he is within the explosion radius and no background surface blocks the +blast." + (_type_) none) ;; 20 + (record-crystal-destroyed! + "Record this numbered crystal in the task reminder and return true when all five crystals +have been destroyed." + (_type_) symbol) ;; 21 ) (:states dark-crystal-spawn-fuel-cell @@ -31225,8 +41876,12 @@ :size-assert #x28 :flag-assert #xb00000028 (:methods - (init! (_type_ symbol symbol symbol symbol int int symbol) none) ;; 9 - (set-delay! (_type_ time-frame) none) ;; 10 + (init! + "Set the spawn mode, visibility lifetime, pickup reward, and death event." + (_type_ symbol symbol symbol symbol int int symbol) none) ;; 9 + (set-delay! + "Set how long an unseen spider may live before it dies." + (_type_ time-frame) none) ;; 10 ) ) @@ -31257,12 +41912,39 @@ baby-spider-resume baby-spider-die-fast ) + (:methods + (init-from-entity! :override-doc + "Create collision and drawable state from the entity, run subtype setup, and enter the idle +state.") + (integrate-and-collide! :override-doc + "Integrate the spider's velocity while following the background ground surface.") + (common-post :override-doc + "Align the spider's up vector to the ground normal, update its orientation, and run the +ordinary enemy post step.") + (touch-handler :override-doc + "Attack a process touching the spider's offensive collision primitive.") + (initialize-collision :override-doc + "Create the spider's moving collision shape and offensive sphere.") + (post-init-setup! :override-doc + "Initialize the skeleton, navigation parameters, shadow, scale, neck joints, and chase +defaults.") + (nav-enemy-method-51 :override-doc + "Randomize the chase wiggle period, amplitude, and speed.") + (nav-enemy-method-52 :override-doc + "Offset the navigation target sideways with the current chase wiggle.") + (nav-enemy-method-53 :override-doc + "Return true when an unseen spawned spider has exceeded its visibility lifetime.")) ) ;; - Functions -(define-extern baby-spider-default-event-handler (function process int symbol event-message-block object :behavior baby-spider)) -(define-extern baby-spider-init-by-other (function baby-spider vector vector baby-spider-spawn-params none :behavior baby-spider)) +(define-extern baby-spider-default-event-handler + "Handle victory locally and delegate other events to the standard navigation-enemy handler." + (function process int symbol event-message-block object :behavior baby-spider)) +(define-extern baby-spider-init-by-other + "Initialize a spawned spider at the supplied position and heading using the given spawn +parameters." + (function baby-spider vector vector baby-spider-spawn-params none :behavior baby-spider)) ;; - Unknowns @@ -31380,18 +42062,21 @@ :heap-base #x180 :flag-assert #x20018001f0 (:methods - (mother-spider-method-20 (_type_ vector vector) symbol) ;; 20 - (mother-spider-method-21 (_type_ vector float symbol) symbol) ;; 21 - (mother-spider-method-22 (_type_ matrix vector) float) ;; 22 - (mother-spider-method-23 (_type_) none) ;; 23 - (shadow-handler (_type_) number) ;; 24 - (letgo-player? (_type_) symbol) ;; 25 - (grab-player? (_type_) symbol) ;; 26 - (mother-spider-method-27 (_type_) none) ;; 27 - (mother-spider-method-28 (_type_) none) ;; 28 - (mother-spider-method-29 (_type_ symbol symbol) none) ;; 29 - (spawn-child (_type_ vector vector symbol) int) ;; 30 - (is-player-stuck? (_type_) symbol) ;; 31 + (init-from-entity! :override-doc "Initialize the boss collision, skeleton, thread, navigation, effects, and starting state.") + (run-logic? :override-doc "Run while active, nearby, blending animation, or requiring a skeleton update.") + (relocate :override-doc "Relocate the neck modifier before relocating the drawable.") + (mother-spider-method-20 "Choose a nearby navigable egg landing point and normal." (_type_ vector vector) symbol) ;; 20 + (mother-spider-method-21 "Apply a swing impulse, optionally detach two legs, and return whether all legs are gone." (_type_ vector float symbol) symbol) ;; 21 + (mother-spider-method-22 "Orient a thread-joint matrix toward the next point." (_type_ matrix vector) float) ;; 22 + (mother-spider-method-23 "Update thread extension and swing physics." (_type_) none) ;; 23 + (shadow-handler "Probe the ground and update the boss shadow." (_type_) number) ;; 24 + (letgo-player? "Return whether Jak has left the boss's release bounds." (_type_) symbol) ;; 25 + (grab-player? "Return whether Jak is inside the boss's capture bounds." (_type_) symbol) ;; 26 + (mother-spider-method-27 "Run the empty pre-update hook." (_type_) none) ;; 27 + (mother-spider-method-28 "Run the empty post-update hook." (_type_) none) ;; 28 + (mother-spider-method-29 "Perform the once-per-frame boss, shadow, effects, and look-at update." (_type_ symbol symbol) none) ;; 29 + (spawn-child "Spawn a baby spider and increment the live-child count." (_type_ vector vector symbol) int) ;; 30 + (is-player-stuck? "Track and report abrupt changes in Jak's vertical offset from the web anchor." (_type_) symbol) ;; 31 ) (:states (mother-spider-die-wait-for-children) @@ -31435,7 +42120,10 @@ :flag-assert #x1600e00150 (:methods (mother-spider-egg-method-20 (_type_) none) ;; 20 - (draw-egg-shadow (_type_ vector symbol) symbol) ;; 21 + (draw-egg-shadow + "Probe the ground below the egg, update its shadow clip planes, and return true when the +probe hits." + (_type_ vector symbol) symbol) ;; 21 ) (:states (mother-spider-egg-falling) @@ -31448,7 +42136,10 @@ ;; - Functions -(define-extern mother-spider-egg-init-by-other (function entity-actor vector vector vector none :behavior mother-spider-egg)) +(define-extern mother-spider-egg-init-by-other + "Create a falling egg at the supplied position with its destination, landing normal, collision, +shadow, navigation, and trajectory." + (function entity-actor vector vector vector none :behavior mother-spider-egg)) ;; - Unknowns @@ -31473,11 +42164,24 @@ :size-assert #x1b0 :flag-assert #x1d014001b0 ;; inherited inspect of projectile + (:methods + (update-projectile-effects! :override-doc + "Update the particle trail and tracking sound, then draw the projectile's pulsing ground +shadow.") + (init-projectile-collision! :override-doc + "Create the projectile's moving collision sphere, collision masks, and touched event.") + (init-projectile-settings! :override-doc + "Configure the projectile's homing speed, turn rate, target, particles, timeout, and sounds.") + (update-target! :override-doc + "Refresh the homing target from Jak's position and lead it using his horizontal velocity.")) ) ;; - Functions -(define-extern mother-spider-proj-update-velocity (function mother-spider-proj none)) +(define-extern mother-spider-proj-update-velocity + "Steer the projectile toward its target until it passes the target relative to its launcher, +flattening the correction along a touched surface." + (function mother-spider-proj none)) ;; ---------------------- @@ -31488,10 +42192,18 @@ ;; - Functions -(define-extern mother-spider-leg-init-by-other (function mother-spider vector vector vector none :behavior mother-spider-leg)) -(define-extern mother-spider-full-joint-callback (function mother-spider none)) -(define-extern mother-spider-default-event-handler (function process int symbol event-message-block object :behavior mother-spider)) -(define-extern mother-spider-death-event-handler (function process int symbol event-message-block object :behavior mother-spider)) +(define-extern mother-spider-leg-init-by-other + "Launch a detached leg from the supplied joint position and directions." + (function mother-spider vector vector vector none :behavior mother-spider-leg)) +(define-extern mother-spider-full-joint-callback + "Lay out the web-thread joints and hide joints belonging to detached legs." + (function mother-spider none)) +(define-extern mother-spider-default-event-handler + "Handle boss attacks, child triggers, and child-count updates." + (function process int symbol event-message-block object :behavior mother-spider)) +(define-extern mother-spider-death-event-handler + "Handle egg triggers and the boss death pickup and visibility events." + (function process int symbol event-message-block object :behavior mother-spider)) ;; - Unknowns @@ -31586,17 +42298,38 @@ :heap-base #x560 :flag-assert #x1f056005d0 (:methods - (gnawer-method-20 (_type_ int) matrix) ;; 20 - (gnawer-method-21 (_type_ int bounding-box symbol float) float) ;; 21 - (gnawer-method-22 (_type_ float) symbol) ;; 22 - (gnawer-method-23 (_type_) none) ;; 23 - (gnawer-method-24 (_type_) none) ;; 24 - (gnawer-method-25 (_type_) symbol) ;; 25 - (gnawer-method-26 (_type_) none) ;; 26 - (gnawer-method-27 (_type_) none) ;; 27 - (gnawer-method-28 (_type_ int int) symbol) ;; 28 - (gnawer-method-29 (_type_ int vector vector) float) ;; 29 - (gnawer-method-30 (_type_ process-drawable) uint) ;; 30 + (deactivate :override-doc "Stop the segment particles and ambient sound before deactivating the drawable.") + (relocate :override-doc "Relocate the particle and ambient-sound controls before the parent relocation.") + (init-from-entity! :override-doc "Initialize the segmented body, collision, path, pickups, effects, and starting post.") + (copy-segment-from-prev! + "Copy the previous segment's world position and orientation into this segment." + (_type_ int) matrix) ;; 20 + (place-segment-along-route! + "Place one segment at a distance along the run route, orient it to the post surface, and extend the bounding box." + (_type_ int bounding-box symbol float) float) ;; 21 + (update-segments! + "Place all body segments along the route and return true when every active segment reaches the destination." + (_type_ float) symbol) ;; 22 + (hide! "Hide the gnawer, disable collision, and park every segment at the post." (_type_) none) ;; 23 + (pick-route! + "Choose the farthest of three random source/destination point pairs and construct the route around the post." + (_type_) none) ;; 24 + (take-damage! + "Remove up to three hit points, shed the corresponding body segments, and return true when dead." + (_type_) symbol) ;; 25 + (unhide! "Restore collision, drawing, and the joint callback after leaving the post." (_type_) none) ;; 26 + (maybe-pick-green-eco-pickup! + "Depending on death count and Jak's health, mark one unoccupied pickup position for green eco." + (_type_) none) ;; 27 + (pick-random-free-bit + "Return a random unset bit among num-bits positions, or zero when none is available." + (_type_ int int) symbol) ;; 28 + (compute-pickup-position! + "Compute a path-point pickup position and an outward, upward launch vector." + (_type_ int vector vector) float) ;; 29 + (claim-nearest-pickup! + "Clear the persisted pickup bit nearest the collecting drawable and return the updated mask." + (_type_ process-drawable) uint) ;; 30 ) (:states gnawer-put-items-at-dest @@ -31611,8 +42344,12 @@ ;; - Functions -(define-extern gnawer-falling-segment-init-by-other (function gnawer vector vector none :behavior gnawer-falling-segment)) -(define-extern gnawer-joint-callback (function gnawer none)) +(define-extern gnawer-falling-segment-init-by-other + "Launch a detached body segment from position in the supplied outward direction." + (function gnawer vector vector none :behavior gnawer-falling-segment)) +(define-extern gnawer-joint-callback + "Transform each skeleton-joint group by its body segment's orientation and world position." + (function gnawer none)) ;; - Unknowns @@ -31661,14 +42398,29 @@ :heap-base #xc0 :flag-assert #x1c00c00128 (:methods - (driller-lurker-method-20 (_type_ symbol target) symbol) ;; 20 + (relocate :override-doc "Relocate the neck, drill, and secondary sound controls before relocating the drawable.") + (deactivate :override-doc "Stop the secondary drilling sound before deactivating the drawable.") + (init-from-entity! :override-doc "Initialize collision, path movement, joints, sounds, and the starting drilling state.") + (update-movement-and-drill! + "Advance along the path, update body aim and drill spin, and manage drilling sound and target tracking." + (_type_ symbol target) symbol) ;; 20 (driller-lurker-method-21 (_type_) none) ;; 21 (driller-lurker-method-22 (_type_) none) ;; 22 - (driller-lurker-method-23 (_type_) float) ;; 23 - (driller-lurker-method-24 (_type_) symbol) ;; 24 - (driller-lurker-method-25 (_type_) symbol) ;; 25 - (driller-lurker-method-26 (_type_) symbol) ;; 26 - (driller-lurker-method-27 (_type_) object) ;; 27 + (update-player-path-u + "Project Jak onto the lurker's path once per frame and return the cached path position." + (_type_) float) ;; 23 + (in-attack-range? + "Return whether Jak is close enough in height, distance, or path position to attack." + (_type_) symbol) ;; 24 + (should-start-chase? + "Return whether Jak is within the detection height and range and roughly in front." + (_type_) symbol) ;; 25 + (lost-player? + "Return whether Jak has moved outside the chase height or distance limits." + (_type_) symbol) ;; 26 + (spawn-drill-debris + "Spawn drilling debris just ahead of the drill-tip joint." + (_type_) object) ;; 27 ) (:states driller-lurker-idle-drilling @@ -31683,7 +42435,9 @@ ;; - Functions -(define-extern driller-lurker-default-event-handler (function process int symbol event-message-block object :behavior driller-lurker)) +(define-extern driller-lurker-default-event-handler + "Handle target contact and attacks, including drill damage and death transitions." + (function process int symbol event-message-block object :behavior driller-lurker)) ;; - Unknowns @@ -31758,6 +42512,8 @@ :heap-base #x80 :flag-assert #x16008000f0 (:methods + (init-from-entity! :override-doc + "Initialize the tube slide path from an entity and begin watching for Jak.") (slide-control-watch () _type_ :state) ;; 20 (slide-control-ride () _type_ :state) ;; 21 ) @@ -31765,12 +42521,28 @@ ;; - Functions -(define-extern find-target-point (function vector float :behavior slide-control)) -(define-extern distance-from-tangent (function path-control float vector vector vector vector float)) -(define-extern target-tube-post (function none :behavior target)) -(define-extern target-tube-turn-anim (function none :behavior target)) -(define-extern tube-thrust (function float float none :behavior target)) -(define-extern tube-sounds (function sound-id :behavior target)) +(define-extern find-target-point + "Search forward along the tube path for the tangent line nearest the target position, cache the + selected path frame, and return its path position." + (function vector float :behavior slide-control)) +(define-extern distance-from-tangent + "Evaluate a path frame and return the query point's signed horizontal distance from its tangent + line. The path point, tangent, and perpendicular side vectors are returned through the supplied + vectors." + (function path-control float vector vector vector vector float)) +(define-extern target-tube-post + "Run Jak's tube movement, collision, animation, shadow, and powerup updates for one frame." + (function none :behavior target)) +(define-extern target-tube-turn-anim + "Smooth Jak's tube-turn animation toward the steering target and evaluate its animation frame." + (function none :behavior target)) +(define-extern tube-thrust + "Apply tube-aligned movement from the lateral and longitudinal analog inputs, including wall + response, slope acceleration, friction, and speed limiting." + (function float float none :behavior target)) +(define-extern tube-sounds + "Update the tube slide-loop volume and pitch from surface contact and movement speed." + (function sound-id :behavior target)) ;; - Unknowns @@ -31803,6 +42575,20 @@ :size-assert #x10c :heap-base #xa0 :flag-assert #x2100a0010c + (:methods + (get-unlit-skel :override-doc + "Return the Sunken side-to-side platform skeleton group.") + (setup-collision! :override-doc + "Create a moving collision shape with one sticky, indestructible 3.2-metre ground mesh, + allocate one rider slot, and install it as the platform root.") + (setup-part! :override-doc + "Create and save the side-to-side platform particle launch control.") + (configure-options! :override-doc + "Cache the platform yaw, rotated by half a turn, for its particle emitters.") + (spawn-part! :override-doc + "Apply the cached yaw to both particle definitions and spawn the platform particles at the + collision root.") + ) ) (deftype sunkencam (pov-camera) @@ -31813,6 +42599,9 @@ :size-assert #xe8 :heap-base #x80 :flag-assert #x1e008000e8 + (:methods + (set-stack-size! :override-doc "Set the camera process stack to 512 bytes.") + ) ) (deftype seaweed (process-drawable) @@ -31822,6 +42611,10 @@ :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 + (:methods + (init-from-entity! :override-doc + "Initialize the seaweed skeleton at a random animation frame and give it a random sway speed.") + ) (:states seaweed-idle) ) @@ -31850,6 +42643,11 @@ :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 + (:methods + (init-from-entity! :override-doc + "Initialize the hot-pipe hazard's collision, path, transform offsets, skeleton, and shove + strength.") + ) (:states (shover-idle)) ) @@ -31885,7 +42683,17 @@ :heap-base #xc0 :flag-assert #x1c00c00130 (:methods - (square-platform-method-27 (_type_ symbol) none) ;; 27 + (deactivate :override-doc + "Stop and free the three water particle controls before deactivating the drawable.") + (relocate :override-doc + "Relocate the three water particle controls before relocating the drawable.") + (init-from-entity! :override-doc + "Initialize the platform's collision, skeleton, raised and lowered positions, water particle + controls, and linked water volume.") + (spawn-water-crossing-effects! + "Spawn breach splashes while rising or bubbles and a splash while submerging as the platform + crosses the linked water surface." + (_type_ symbol) none) ;; 27 ) (:states square-platform-lowered @@ -31917,6 +42725,10 @@ :size-assert #x100 :heap-base #x90 :flag-assert #x1400900100 + (:methods + (init-from-entity! :override-doc + "Initialize the platform sequence timing, actor links, platform mask, and idle state.") + ) (:states square-platform-master-idle square-platform-master-activate) @@ -31953,8 +42765,16 @@ :heap-base #x90 :flag-assert #x1600900100 (:methods - (should-close? (_type_) symbol) ;; 20 - (should-open? (_type_) symbol) ;; 21 + (init-from-entity! :override-doc + "Initialize the iris door's collision, skeleton, proximity rules, scale, offset, and outward + direction.") + (should-close? + "Return whether both Jak and the camera are beyond the closing distance. A directional door + closes only when they are also on the same side." + (_type_) symbol) ;; 20 + (should-open? + "Return whether Jak or the camera is within the opening distance and any task lock is clear." + (_type_) symbol) ;; 21 ) (:states (sun-iris-door-open) @@ -31965,7 +42785,10 @@ ;; - Functions -(define-extern sun-iris-door-init-by-other (function vector quaternion symbol none :behavior sun-iris-door)) +(define-extern sun-iris-door-init-by-other + "Initialize a script-created iris door at a position and orientation, starting either open or + closed without proximity control." + (function vector quaternion symbol none :behavior sun-iris-door)) ;; - Unknowns @@ -31990,7 +42813,14 @@ :heap-base #x50 :flag-assert #x15005000b4 (:methods - (orbit-plat-bottom-method-20 (_type_ vector vector) none) ;; 20 + (relocate :override-doc + "Relocate the secondary particle control before relocating the drawable.") + (deactivate :override-doc + "Stop and free the secondary particle control before deactivating the drawable.") + (point-jet-streak! + "Aim and scale the jet-streak particle between two points, then launch it from the first + point." + (_type_ vector vector) none) ;; 20 ) (:states orbit-plat-bottom-idle) @@ -32010,8 +42840,17 @@ :heap-base #xb0 :flag-assert #x1d00b00118 (:methods - (orbit-plat-method-27 (_type_) symbol) ;; 27 - (orbit-plat-method-28 (_type_) symbol) ;; 28 + (init-from-entity! :override-doc + "Initialize the paired orbit platform's collision, skeleton, navigation, reset position, + particles, scale, and timeout.") + (reset-step! + "Advance one reset frame toward the home position while coordinating orbit direction and + position with the paired platform." + (_type_) symbol) ;; 27 + (reset-timeout? + "Return true after the reset timeout when Jak is absent, more than twenty-five metres away + in XZ, or more than four metres below the orbit platform." + (_type_) symbol) ;; 28 ) (:states orbit-plat-wait-for-other @@ -32024,9 +42863,17 @@ ;; - Functions -(define-extern orbit-plat-bottom-init-by-other (function entity-actor orbit-plat none :behavior orbit-plat-bottom)) -(define-extern get-rotate-point! (function vector vector vector vector float float vector)) -(define-extern get-nav-point! (function vector orbit-plat vector float vector)) +(define-extern orbit-plat-bottom-init-by-other + "Initialize the visual and particle attachment beneath an orbit platform." + (function entity-actor orbit-plat none :behavior orbit-plat-bottom)) +(define-extern get-rotate-point! + "Write a point one frame of tangential rotation from point around center, preserving radius and + limiting motion by speed." + (function vector vector vector vector float float vector)) +(define-extern get-nav-point! + "Write the platform's next navigation-limited XZ step toward destination. The intermediate Y + component is scratch; callers restore the intended platform height." + (function vector orbit-plat vector float vector)) ;; - Unknowns @@ -32052,6 +42899,10 @@ :size-assert #x8c :heap-base #x20 :flag-assert #xe0020008c + (:methods + (init-from-entity! :override-doc + "Initialize the shared center and counter-rotating inner and outer platform angles.") + ) (:states wedge-plat-master-idle) ) @@ -32066,7 +42917,13 @@ :heap-base #x80 :flag-assert #x1c008000f0 (:methods - (wedge-plat-method-27 (_type_) symbol) ;; 27 + (init-from-entity! :override-doc + "Initialize the inner wedge platform's collision, skeleton, master link, orbit offset, and + radius.") + (update-tip-state? + "Update the platform's orbit transform from the master angle and return whether it is at a + tipping orientation." + (_type_) symbol) ;; 27 ) (:states wedge-plat-idle @@ -32079,6 +42936,11 @@ :size-assert #xf0 :heap-base #x80 :flag-assert #x1c008000f0 + (:methods + (init-from-entity! :override-doc + "Initialize the outer wedge platform's collision, skeleton, master link, orbit offset, and + radius.") + ) (:states wedge-plat-outer-idle wedge-plat-outer-tip) @@ -32150,6 +43012,26 @@ :size-assert #x300 :heap-base #x290 :flag-assert #x2302900300 + (:methods + (init-from-entity! :override-doc + "Initialize collision, drawable state, and the platform controls, then wait for the puzzle + master.") + (float-height-at :override-doc + "Return the anchor height plus the float offset and a position- and time-dependent + half-metre wave.") + (accumulate-forces! :override-doc + "Accumulate the standard rigid-body forces, then pull the platform toward its anchor point.") + (init-collision! :override-doc + "Create the platform's moving collision shape, one rider slot, and sticky ground mesh.") + (init-platform! :override-doc + "Initialize the skeleton and physics constants, place the four corner control points, and + link the puzzle master.") + (sync-on-state! :override-doc + "Match the platform's logical and visible lit state to its master, playing the corresponding + light sound when it changes.") + (notify-master-ridden! :override-doc + "Notify the puzzle master that Jak stepped onto this platform.") + ) (:states qbert-plat-wait-for-master qbert-plat-on-mimic @@ -32174,7 +43056,12 @@ :heap-base #x90 :flag-assert #x1500900100 (:methods - (plat-state-set? (_type_ uint) symbol) ;; 20 + (init-from-entity! :override-doc + "Initialize puzzle state, discover the platform and door links, set the reset bounds, and + restore saved completion state.") + (plat-state-set? + "Return whether the bit for platform-index is set in the current puzzle state." + (_type_ uint) symbol) ;; 20 ) (:states qbert-plat-master-wait-for-door @@ -32184,8 +43071,13 @@ ;; - Functions -(define-extern qbert-plat-on-init-by-other (function entity-actor qbert-plat none :behavior qbert-plat)) -(define-extern qbert-plat-event-handler (function process int symbol event-message-block object :behavior qbert-plat)) +(define-extern qbert-plat-on-init-by-other + "Initialize the lit child visual attached to parent-platform." + (function entity-actor qbert-plat none :behavior qbert-plat)) +(define-extern qbert-plat-event-handler + "Resynchronize the platform's lit state on notify events, and delegate other events to the + rigid-body platform handler." + (function process int symbol event-message-block object :behavior qbert-plat)) ;; - Unknowns @@ -32230,8 +43122,23 @@ :heap-base #xf0 :flag-assert #x1600f00160 (:methods - (steam-cap-method-20 (_type_) none) ;; 20 - (steam-cap-method-21 (_type_) quaternion) ;; 21 + (relocate :override-doc + "Adjust the optional plume controllers after the process allocation moves, then relocate the + parent drawable.") + (deactivate :override-doc + "Stop the optional plume particles, then perform ordinary drawable deactivation.") + (init-from-entity! :override-doc + "Initialize collision, animation, travel timing, particles, and the three independently + bouncing cap control points.") + (shove-target-off! + "Shove Jak away when he overlaps the cap's path but is not registered as a rider, preventing + the moving cap from trapping him." + (_type_) none) ;; 20 + (update-motion! + "Advance the cap's three control points through the synchronized falling, rising, and resting + phases; apply bounce physics, particles, and sounds; then update the averaged root position + and surface orientation." + (_type_) quaternion) ;; 21 ) (:states (steam-cap-idle)) @@ -32263,7 +43170,9 @@ :heap-base #x80 :flag-assert #x15008000f0 (:methods - (blue-eco-charger-orb-method-20 (_type_ float) vector) ;; 20 + (randomize-target-orbit-rotv! + "Choose a new random angular-velocity target for each orbit axis, scaled by rotv-scale." + (_type_ float) vector) ;; 20 ) (:states blue-eco-charger-orb-idle @@ -32281,8 +43190,15 @@ :heap-base #x50 :flag-assert #x16005000bc (:methods - (blue-eco-charger-method-20 (_type_) object) ;; 20 - (blue-eco-charger-method-21 (_type_ symbol) object) ;; 21 + (init-from-entity! :override-doc + "Initialize collision, animation, navigation, the orbiting visual, master link, and ambient + sound for a blue-eco charger.") + (target-near-with-blue-eco? + "Return true when Jak is within four metres and currently carries blue eco." + (_type_) object) ;; 20 + (notify-master! + "Notify the exit-chamber master that this charger became active or inactive." + (_type_ symbol) object) ;; 21 ) (:states blue-eco-charger-idle @@ -32322,11 +43238,23 @@ :heap-base #x90 :flag-assert #x1900900100 (:methods - (exit-chamber-method-20 (_type_ float) float) ;; 20 - (exit-chamber-method-21 (_type_ exit-chamber-items) vector) ;; 21 + (init-from-entity! :override-doc + "Initialize chamber collision, animation, puzzle state, attached door and button, fuel cell, + movement sound, and the state selected by saved progress.") + (bob-on-waves! + "Bob the chamber vertically around its original position using wave-scale." + (_type_ float) float) ;; 20 + (compute-item-placements! + "Compute the attached door, button, and fuel-cell placements from the chamber's top bone." + (_type_ exit-chamber-items) vector) ;; 21 (exit-chamber-method-22 (_type_) none) ;; 22 - (exit-chamber-method-23 (_type_ symbol) object) ;; 23 - (exit-chamber-method-24 (_type_ float) none) ;; 24 + (reposition-items! + "Refresh bounds and move the attached door and button with the chamber. Move Jak when + requested by state, and optionally keep the fuel cell above its chamber-relative target." + (_type_ symbol) object) ;; 23 + (spawn-water-drips! + "Spawn a water drip at a random point on a ring of radius around the chamber's top bone." + (_type_ float) none) ;; 24 ) (:states exit-chamber-charger-puzzle @@ -32347,8 +43275,12 @@ ;; - Functions -(define-extern exit-chamber-button-init-by-other (function vector quaternion entity-actor symbol none :behavior exit-chamber-button)) -(define-extern blue-eco-charger-orb-init-by-other (function entity-actor blue-eco-charger-orb none :behavior blue-eco-charger-orb)) +(define-extern exit-chamber-button-init-by-other + "Initialize the chamber's attached button at the supplied placement." + (function vector quaternion entity-actor symbol none :behavior exit-chamber-button)) +(define-extern blue-eco-charger-orb-init-by-other + "Initialize the orbiting blue-eco visual attached to parent-charger." + (function entity-actor blue-eco-charger none :behavior blue-eco-charger-orb)) ;; - Unknowns @@ -32373,6 +43305,11 @@ :size-assert #xec :heap-base #x80 :flag-assert #x1b008000ec + (:methods + (init-from-entity! :override-doc + "Initialize collision, path and launcher controls, animation, trigger height, and the + platform's resting transform.") + ) (:states (floating-launcher-idle) (floating-launcher-ready) @@ -32408,7 +43345,16 @@ :heap-base #xd0 :flag-assert #x1f00d00140 (:methods - (draw-ripple (_type_) symbol) ;; 30 + (setup-water! :override-doc + "Run animated-water setup, select the safe or deadly tint, disable the ordinary ambient + sound, and create the ripple controller and 100-vertex particle query.") + (setup-from-res! :override-doc + "Run animated-water resource setup, initialize safe and deadly colors, and configure whether + the deadly interval follows sync phase or a fixed resource setting.") + (draw-ripple + "Request a sparse rotating set of ripple vertices and launch deadly-water particles at every + returned point." + (_type_) symbol) ;; 30 ) ) @@ -32437,7 +43383,14 @@ :heap-base #x60 :flag-assert #x15006000cc (:methods - (whirlpool-method-20 (_type_ float) cshape-moving-flags) ;; 20 + (deactivate :override-doc + "Stop the whirlpool sound, then perform ordinary drawable deactivation.") + (init-from-entity! :override-doc + "Initialize collision, animation, synchronized spin speeds, particles, and ambient sound.") + (swirl-target! + "Within ten metres, rotate and pull Jak toward the center with squared falloff, apply the + resulting velocity through collision, and restore his pre-step collision status." + (_type_ float) collide-status) ;; 20 ) (:states (whirlpool-idle)) @@ -32496,9 +43449,24 @@ :heap-base #x230 :flag-assert #x17023002a0 (:methods - (sunken-pipegame-method-20 (_type_) uint) ;; 20 - (sunken-pipegame-method-21 (_type_ symbol) symbol) ;; 21 - (sunken-pipegame-method-22 (_type_ symbol) none) ;; 22 + (deactivate :override-doc + "Stop and free every prize's suction and blow particle controls, then deactivate the + drawable.") + (relocate :override-doc + "Relocate every optional prize particle control, then relocate the parent drawable.") + (init-from-entity! :override-doc + "Initialize saved challenge state, prize paths and particles, uncollected prizes, and the + three puzzle buttons.") + (build-completed-challenges-mask + "Return a three-bit mask identifying the fuel-cell and two buzzer challenges already + completed." + (_type_) uint) ;; 20 + (set-actor-pause! + "Set or clear actor-pause on the pipe game and each child process." + (_type_ symbol) symbol) ;; 21 + (set-active-prize-collision! + "Restore or clear collision on the prize for the currently selected challenge." + (_type_ symbol) none) ;; 22 ) (:states sunken-pipegame-start-up @@ -32510,7 +43478,9 @@ ;; - Functions -(define-extern sunken-pipegame-button-init-by-other (function vector quaternion entity-actor symbol none :behavior sunken-pipegame-button)) +(define-extern sunken-pipegame-button-init-by-other + "Initialize one pipe-game button at its path-derived placement." + (function vector quaternion entity-actor symbol none :behavior sunken-pipegame-button)) ;; ---------------------- @@ -32555,7 +43525,14 @@ :heap-base #x90 :flag-assert #x15009000f4 (:methods - (bully-method-20 (_type_) float) ;; 20 + (relocate :override-doc + "Relocate the optional neck joint modifier, then relocate the parent drawable.") + (init-from-entity! :override-doc + "Initialize collision, animation, navigation, particles, pickup data, and neck tracking.") + (update-spin-velocity! + "Build velocity from heading and speed, reflect from avoidance spheres or mesh boundaries, + apply gravity, and record a bounce when direction changes." + (_type_) float) ;; 20 ) (:states (bully-idle symbol) @@ -32568,9 +43545,15 @@ ;; - Functions -(define-extern bully-broken-cage-init-by-other (function entity-actor none :behavior bully-broken-cage)) -(define-extern bully-default-event-handler (function process int symbol event-message-block object :behavior bully)) -(define-extern bully-post (function none :behavior bully)) +(define-extern bully-broken-cage-init-by-other + "Initialize the detached cage visual from its bully parent and play the explosion." + (function entity-actor none :behavior bully-broken-cage)) +(define-extern bully-default-event-handler + "Handle bully-to-bully bounces, player shoves and attacks, death, and forwarded touch attacks." + (function process int symbol event-message-block object :behavior bully)) +(define-extern bully-post + "Restore collision offense after the attack window, then post the bully transform." + (function none :behavior bully)) ;; - Unknowns @@ -32592,6 +43575,15 @@ ((parent-process (pointer double-lurker) :score 100 :offset 12) (fall-dest vector :inline :offset-assert 400) ) + (:methods + (initialize-collision :override-doc + "Create the upper lurker's moving body, touch, and attack spheres, then disable contact until + it separates from the lower lurker.") + (post-init-setup! :override-doc + "Initialize the upper skeleton and navigation settings at its parent's transform.") + (nav-enemy-method-51 :override-doc + "Restore the upper lurker's collision and navigation participation after separation.") + ) :method-count-assert 76 :size-assert #x1a0 :heap-base #x130 @@ -32611,8 +43603,24 @@ (buddy-handle handle :offset-assert 416) ; double-lurker-top ) (:methods - (initialize-collision (_type_) collide-shape-moving :replace) ;; 47 - (double-lurker-method-53 (_type_ vector) symbol :overlay-at nav-enemy-method-53) ;; 53 + (init-from-entity! :override-doc + "Create both halves from the entity's persistent separation and death state, then enter idle + or wait invisibly for the surviving child.") + (initialize-collision + "Create the combined lurker's moving body, touch, and joint-bound attack spheres." + (_type_) collide-shape-moving :replace) ;; 47 + (post-init-setup! :override-doc + "Initialize the lower skeleton, persistent state, navigation settings, and upper-lurker + child, placing a previously separated buddy at a valid path point.") + (nav-enemy-method-51 :override-doc + "Disable the combined body's upper collision primitives and convert the remaining + indestructible touch spheres after the two lurkers separate.") + (nav-enemy-method-52 :override-doc + "Find a grounded landing point ahead of the hit direction for the upper lurker.") + (find-buddy-spawn-point! + "Search path vertices from a random starting index for an unblocked place to spawn the + already-separated upper lurker." + (_type_ vector) symbol :overlay-at nav-enemy-method-53) ;; 53 ) :method-count-assert 76 :size-assert #x1a8 @@ -32631,8 +43639,14 @@ ;; - Functions -(define-extern double-lurker-top-init-by-other (function entity double-lurker symbol vector none :behavior double-lurker-top)) -(define-extern double-lurker-default-event-handler (function process int symbol event-message-block object :behavior double-lurker)) +(define-extern double-lurker-top-init-by-other + "Initialize the upper lurker either attached to its parent's shoulders or independently at the + supplied position." + (function entity double-lurker symbol vector none :behavior double-lurker-top)) +(define-extern double-lurker-default-event-handler + "Handle ordinary touches and attacks, including knocking the pair apart or knocking only the + upper lurker from its buddy's shoulders." + (function process int symbol event-message-block object :behavior double-lurker)) ;; - Unknowns @@ -32653,6 +43667,11 @@ (deftype helix-slide-door (process-drawable) ((root collide-shape :override)) + (:methods + (init-from-entity! :override-doc + "Create the sliding door mesh collision and skeleton at the entity transform, then leave the + door open until triggered.") + ) :method-count-assert 20 :size-assert #xb0 :heap-base #x40 @@ -32671,6 +43690,11 @@ (down-y float :offset-assert 192) (spawn-trans vector :inline :offset-assert 208) ) + (:methods + (init-from-entity! :override-doc + "Resolve the water and door entities, create the moving button and rider collision, and save + its camera and depressed positions.") + ) :method-count-assert 20 :size-assert #xe0 :heap-base #x70 @@ -32704,8 +43728,16 @@ :heap-base #x60 :flag-assert #x16006000c8 (:methods + (relocate :override-doc + "Relocate the alternate-actor array, then relocate the parent drawable.") + (init-from-entity! :override-doc + "Create the rising water and dark-eco volume, collect the ordered actors it can consume, and + establish the start and end heights.") (helix-water-method-20 (_type_) none) ;; 20 - (helix-water-method-21 (_type_) object) ;; 21 + (consume-next-submerged-actor! + "Advance through the ordered alternate actors as the water reaches them, killing babaks and + launchers or hiding eco-vent particles." + (_type_) object) ;; 21 ) (:states helix-water-idle @@ -32754,7 +43786,7 @@ (picked-point-time time-frame :offset-assert 272) (pick-new-point-delay time-frame :offset-assert 280) (last-on-screen-time time-frame :offset-assert 288) - (buddy process-drawable :offset-assert 296) ;; what is this, its very likely wrong! + (buddy entity-actor :offset-assert 296) (nice-look lod-set :inline :offset-assert 300) (mean-look lod-set :inline :offset-assert 336) (dest-pos vector :inline :offset-assert 384) @@ -32765,18 +43797,53 @@ :heap-base #x130 :flag-assert #x2001300198 (:methods - (puffer-method-20 (_type_ vector) none) ;; 20 - (puffer-method-21 (_type_) none) ;; 21 - (puffer-method-22 (_type_) symbol) ;; 22 - (puffer-method-23 (_type_ symbol) symbol) ;; 23 - (puffer-method-24 (_type_ vector) symbol) ;; 24 - (puffer-method-25 (_type_ float) symbol) ;; 25 - (puffer-method-26 (_type_) none) ;; 26 - (puffer-method-27 (_type_) none) ;; 27 - (puffer-method-28 (_type_) none) ;; 28 - (flip-look! (_type_ symbol) none) ;; 29 - (puffer-method-30 (_type_) vector) ;; 30 - (puffer-method-31 (_type_) vector) ;; 31 + (relocate :override-doc + "Relocate the optional neck controller, then relocate the parent drawable.") + (init-from-entity! :override-doc + "Initialize collision, navigation, animation, patrol heights, paired-enemy behavior, and + synchronized inflation from the entity resources.") + (update-horizontal-travel! + "Steer toward the destination at patrol or attack speed, turn away from impending navigation + boundaries and obstacle spheres, and update horizontal velocity and facing." + (_type_ vector) none) ;; 20 + (initialize-collision! + "Create the moving body and three joint-bound touch spheres, then select the deflated + collision size." + (_type_) none) ;; 21 + (buddy-nearby? + "Return whether the paired puffer is alive and within the nearby-buddy distance." + (_type_) symbol) ;; 22 + (pick-patrol-point! + "Pick a path point at least 2.5 metres away. When requested, prefer a direction away from the + paired puffer; otherwise search from a random path index." + (_type_ symbol) symbol) ;; 23 + (point-in-notice-volume? + "Return whether a point overlaps the navigation mesh and lies below the notice ceiling." + (_type_ vector) symbol) ;; 24 + (target-eligible-within? + "Return whether Jak is vulnerable, inside the puffer's vertical and navigation bounds, within + max-distance, and a better attacker than the paired puffer." + (_type_ float) symbol) ;; 25 + (update-animation! + "Drive the synchronized inflate-deflate animation, nice or mean appearance, attack variant, + and matching collision size." + (_type_) none) ;; 26 + (update-vertical-travel! + "Track Jak's height while attacking; otherwise oscillate between the configured patrol floor + and ceiling with acceleration and bounded per-frame travel." + (_type_) none) ;; 27 + (update-shadow! + "Probe for ground below the visible nearest-LOD puffer and update or hide its shadow planes." + (_type_) none) ;; 28 + (flip-look! + "Switch between the nice and mean LOD sets when the requested look changes." + (_type_ symbol) none) ;; 29 + (set-deflated-collision! + "Select the ordinary body and touch-sphere sizes." + (_type_) vector) ;; 30 + (set-inflated-collision! + "Enlarge the leading touch sphere for the inflated animation." + (_type_) vector) ;; 31 ) (:states puffer-idle @@ -32800,8 +43867,12 @@ ;; - Functions -(define-extern puffer-default-event-handler (function process int symbol event-message-block object :behavior puffer)) -(define-extern puffer-post (function none :behavior puffer)) +(define-extern puffer-default-event-handler + "Handle attacks and player contact, dying while deflated and shoving Jak once per attack window." + (function process int symbol event-message-block object :behavior puffer)) +(define-extern puffer-post + "Rearm the touch offense after Jak leaves the attack window, then post the transform." + (function none :behavior puffer)) ;; - Unknowns @@ -32838,14 +43909,35 @@ :heap-base #xd0 :flag-assert #x1c00d00140 (:methods - (sunkenfisha-method-20 (_type_) float) ;; 20 - (sunkenfisha-method-21 (_type_ vector float vector) vector) ;; 21 - (sunkenfisha-method-22 (_type_) none) ;; 22 - (sunkenfisha-method-23 (_type_) quaternion) ;; 23 - (sunkenfisha-method-24 (_type_) vector) ;; 24 - (sunkenfisha-method-25 (_type_) none) ;; 25 - (sunkenfisha-method-26 (_type_) float) ;; 26 - (sunkenfisha-method-27 (_type_) float) ;; 27 + (init-from-entity! :override-doc + "Initialize the fish and spawn the resource-specified school size as child fish.") + (reverse-direction! + "Reverse progress along the path, choose a new speed and turn time, and redirect the local + offset far enough across the path." + (_type_) float) ;; 20 + (evaluate-swim-position! + "Evaluate the path at normalized progress, apply the authored translation, rotate the local + offset by the path tangent, and store the resulting world position." + (_type_ vector float vector) vector) ;; 21 + (sunkenfisha-method-22 "Do nothing." (_type_) none) ;; 22 + (update-facing! + "Turn pitch and yaw smoothly toward the current velocity and update the root quaternion." + (_type_) quaternion) ;; 23 + (update-path-offset! + "Choose a distant random local offset when needed and steer the current offset toward it at a + bounded angular and linear rate." + (_type_) vector) ;; 24 + (advance-path! + "Seek the current path speed toward its target, advance normalized progress, and reverse at + either endpoint." + (_type_) none) ;; 25 + (initialize-appearance! + "Create the transform, select one of three fish color variants, and start its idle animation." + (_type_) float) ;; 26 + (initialize-swim-path! + "Load path offsets and speed limits, randomize initial progress and local offset, and orient + the fish along the curve tangent." + (_type_) float) ;; 27 ) (:states sunkenfisha-idle) @@ -32853,7 +43945,9 @@ ;; - Functions -(define-extern sunkenfisha-init-by-other (function entity-actor none :behavior sunkenfisha)) +(define-extern sunkenfisha-init-by-other + "Initialize a child fish from the same entity resource as its parent." + (function entity-actor none :behavior sunkenfisha)) ;; - Unknowns @@ -32899,6 +43993,11 @@ ((sync sync-info-paused :inline :offset-assert 180) (cyl cylinder :inline :offset-assert 208) ) + (:methods + (init-from-entity! :override-doc + "Create the pusher collision and skeleton, load its synchronized animation range, and build + the camera-to-player occlusion capsule.") + ) :method-count-assert 20 :size-assert #xf8 :heap-base #x90 @@ -32910,6 +44009,10 @@ (deftype gorge-pusher (pusher-base) ((min-frame float :offset-assert 180) ) + (:methods + (init-from-entity! :override-doc + "Create the gorge pusher and load its open and closed animation frames from the entity.") + ) :method-count-assert 20 :size-assert #xb8 :heap-base #x50 @@ -32922,10 +44025,20 @@ ((num-alts int32 :offset-assert 176) (alts entity-actor 4 :offset-assert 180) ) + (:methods + (init-from-entity! :override-doc + "Initialize the plant, particles, and up to four linked plants, then select its state from the + rolling-plants task.") + ) :method-count-assert 20 :size-assert #xc4 :heap-base #x60 :flag-assert #x14006000c4 + (:methods + (init-from-entity! :override-doc + "Create the egg-top collision and skeleton, then either expose the completed chamber or spawn + its fuel cell and wait for activation.") + ) (:states dark-plant-gone dark-plant-startup @@ -32938,6 +44051,11 @@ ((root collide-shape :override) (alt-actor entity-actor :offset-assert 176) ) + (:methods + (init-from-entity! :override-doc + "Create the plant collision and skeleton, link its dark-plant chain, and restore the opened or + unresolved task state.") + ) :method-count-assert 20 :size-assert #xb4 :heap-base #x50 @@ -32991,6 +44109,10 @@ (timer-pos-offset int32 :offset-assert 280) (ticker ticky :inline :offset-assert 288) ) + (:methods + (init-from-entity! :override-doc + "Initialize the race start volume, task control, banner handles, and timer position.") + ) :method-count-assert 20 :size-assert #x140 :heap-base #xd0 @@ -33026,6 +44148,11 @@ (deftype rolling-water (water-anim) () + (:methods + (setup-water! :override-doc + "Run the ordinary water setup, install the rolling-course ripple waveform and tint, and + disable water particles.") + ) :method-count-assert 30 :size-assert #xdc :heap-base #x70 @@ -33034,32 +44161,62 @@ ;; - Functions -(define-extern gorge-init (function vector vector float float float :behavior gorge)) -(define-extern gorge-in-front (function gorge symbol)) +(define-extern gorge-init + "Build the world-to-gorge coordinate frame and store its radial and longitudinal bounds." + (function vector vector float float float :behavior gorge)) +(define-extern gorge-in-front + "Return whether Jak is inside the bounded volume immediately in front of the gorge plane." + (function gorge symbol)) (define-extern gorge-start-launch-start-banner (function handle :behavior gorge-start)) -(define-extern gorge-trans (function none)) +(define-extern gorge-trans "Do nothing." (function none)) (define-extern gorge-start-draw-time (function symbol symbol none :behavior gorge-start)) -(define-extern gorge-behind (function gorge symbol)) -(define-extern seconds->race-time (function race-time time-frame none)) +(define-extern gorge-behind + "Return whether Jak is inside the radial bounds behind the gorge plane." + (function gorge symbol)) +(define-extern seconds->race-time + "Clamp a 300 Hz time value to 9:59.99 and split it into minute, second, tenth, and hundredth + display digits." + (function race-time time-frame none)) ;; PAL version is better ;;(define-extern race-time-read (function race-time int task-control time-frame none)) -(define-extern race-time-read (function race-time task-control time-frame none)) +(define-extern race-time-read + "Read five race-time digits from task reminders, using the fallback time when the saved value is + absent or below one hundredth of a second." + (function race-time task-control time-frame none)) (define-extern rolling-start-init-by-other (function vector float none :behavior rolling-start)) (define-extern gorge-finish-init-by-other (function vector vector float none :behavior gorge-finish)) (define-extern gorge-abort-init-by-other (function vector vector float none :behavior gorge-abort)) -(define-extern race-time->string (function race-time string)) -(define-extern race-time-less-than (function race-time race-time symbol)) +(define-extern race-time->string + "Format a race time as S.TT or M:SS.TT." + (function race-time string)) +(define-extern race-time-less-than + "Compare two race times lexicographically from minutes through hundredths." + (function race-time race-time symbol)) ;; PAL version is better ;;(define-extern race-time-save (function race-time int task-control symbol)) -(define-extern race-time-save (function race-time task-control symbol)) -(define-extern dark-plants-all-done (function dark-plant symbol)) -(define-extern dark-plant-randomize (function dark-plant vector)) -(define-extern dark-plant-check-target (function dark-plant symbol)) -(define-extern dark-plant-has-bad-neighbor (function dark-plant symbol)) +(define-extern race-time-save + "Store the five race-time digits in task reminder slots." + (function race-time task-control symbol)) +(define-extern dark-plants-all-done + "Follow the linked plant chain and return true when every reachable plant is gone." + (function dark-plant symbol)) +(define-extern dark-plant-randomize + "Randomize a plant's yaw and small horizontal offset from its entity transform." + (function dark-plant vector)) +(define-extern dark-plant-check-target + "Return true when nearby Jak responds to a green-eco powerup query." + (function dark-plant symbol)) +(define-extern dark-plant-has-bad-neighbor + "Return whether any linked plant process still exists outside the gone state." + (function dark-plant symbol)) (define-extern pusher-base-init (function collide-shape-moving :behavior pusher-base)) (define-extern dark-plant-trans (function none :behavior dark-plant)) -(define-extern race-time-copy! (function race-time race-time symbol)) -(define-extern race-time->seconds (function race-time int)) +(define-extern race-time-copy! + "Copy all five display digits from source to destination." + (function race-time race-time symbol)) +(define-extern race-time->seconds + "Convert the five display digits to a 300 Hz time value." + (function race-time int)) ;; - Unknowns @@ -33126,6 +44283,15 @@ ((debug-vector vector :inline :offset-assert 528) (alt-actor entity-actor :offset-assert 544) ) + (:methods + (attack-handler :override-doc + "Count an attack from the attacking process, launch it upward, and make the mole yelp.") + (touch-handler :override-doc + "Launch the touching process upward and make the mole yelp.") + (init-from-entity! :override-doc + "Initialize the mole's collision, skeleton, navigation, linked actor, and fleeing parameters, + then restore its task state.") + ) :method-count-assert 76 :size-assert #x224 :heap-base #x1c0 @@ -33142,6 +44308,10 @@ (deftype peeper (process-drawable) () + (:methods + (init-from-entity! :override-doc + "Initialize the peeper's transform, shared mole skeleton, dirt particles, and ambient sound.") + ) :method-count-assert 20 :size-assert #xb0 :heap-base #x40 @@ -33156,17 +44326,34 @@ ;; - Functions (define-extern lightning-mole-task-complete? (function symbol :behavior lightning-mole)) -(define-extern fleeing-nav-enemy-clip-travel (function fleeing-nav-enemy vector symbol)) -(define-extern fleeing-nav-enemy-adjust-travel (function fleeing-nav-enemy object vector)) ;; unused second arg +(define-extern fleeing-nav-enemy-clip-travel + "Clip desired-travel to the navigation boundary. Deflect or reflect it according to approach + angle and boundary distance, returning true when a reflection starts." + (function fleeing-nav-enemy vector symbol)) +(define-extern fleeing-nav-enemy-adjust-travel + "Rotate saved travel toward desired travel at the configured rate, restore its full travel + distance, and update the navigation target." + (function fleeing-nav-enemy object vector)) ;; unused second arg (define-extern fleeing-nav-enemy-chase-post-func (function float :behavior fleeing-nav-enemy)) (define-extern fleeing-nav-enemy-adjust-nav-info (function float :behavior fleeing-nav-enemy)) -(define-extern find-adjacent-bounds-one (function nav-mesh nav-poly int (array int8) (array int8) vector symbol)) -(define-extern find-adjacent-bounds (function nav-mesh clip-travel-vector-to-mesh-return-info none)) +(define-extern find-adjacent-bounds-one + "Walk boundary-connected triangles away from one endpoint of start-edge and store the next + boundary endpoint in result. Return false if the starting edge is invalid or the walk fails." + (function nav-mesh nav-poly int (array int8) (array int8) vector symbol)) +(define-extern find-adjacent-bounds + "Find the boundary segments immediately before and after a clipped edge, compute their outward + normals, and draw the three-edge debug display." + (function nav-mesh clip-travel-vector-to-mesh-return-info none)) (define-extern fleeing-nav-enemy-chase-post (function none :behavior fleeing-nav-enemy)) (define-extern lightning-mole-hole-post (function none :behavior lightning-mole)) (define-extern lightning-mole-run-code (function none :behavior lightning-mole)) -(define-extern check-drop-level-rolling-dirt (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern check-drop-level-rolling-dirt-finish (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-rolling-dirt + "Kill a falling dirt particle below its stored ground height and launch its landing particle." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern check-drop-level-rolling-dirt-finish + "Kill a falling dirt particle below its stored ground height, sometimes play its impact sound, + and launch the final landing particle." + (function sparticle-system sparticle-cpuinfo vector none)) ;; - Unknowns @@ -33200,6 +44387,11 @@ (last-ambient-time time-frame :offset-assert 264) (time-to-next-ambient time-frame :offset-assert 272) ) + (:methods + (init-from-entity! :override-doc + "Initialize the robber's collision, skeleton, closed curve, task link, hover height, and saved + challenge state.") + ) :method-count-assert 20 :size-assert #x118 :heap-base #xb0 @@ -33218,14 +44410,35 @@ ;; - Functions -(define-extern robber-find-ground (function symbol :behavior robber)) -(define-extern robber-move (function float :behavior robber)) -(define-extern robber-calc-speed (function float float float float symbol float :behavior robber)) -(define-extern robber-rotate (function target float vector :behavior robber)) -(define-extern robber-calc-anim-speed (function float :behavior robber)) -(define-extern robber-task-complete? (function symbol :behavior robber)) -(define-extern fuel-cell-init-as-spline-slider (function handle float float int none :behavior fuel-cell)) -(define-extern robber-event-handler (function process int symbol event-message-block object :behavior robber)) +(define-extern robber-find-ground + "Probe for ground below the robber and set its desired hover offset when the surface is safely + separated from the water." + (function symbol :behavior robber)) +(define-extern robber-move + "Advance and wrap the robber's curve position, evaluate its new position, and ease its vertical + hover offset." + (function float :behavior robber)) +(define-extern robber-calc-speed + "Choose a signed curve speed from Jak's distance, interpolating between the near and far speeds + and optionally fleeing along the shorter direction." + (function float float float float symbol float :behavior robber)) +(define-extern robber-rotate + "Turn toward Jak or the active curve direction by at most max-angle and update the animation + blend from the signed turn." + (function target float vector :behavior robber)) +(define-extern robber-calc-anim-speed + "Map the robber's absolute curve speed to a clamped animation playback rate." + (function float :behavior robber)) +(define-extern robber-task-complete? + "Mark this robber complete and return whether every linked robber has completed its subtask." + (function symbol :behavior robber)) +(define-extern fuel-cell-init-as-spline-slider + "Initialize a fuel cell to follow the robber's closed curve from progress at speed, then award the + supplied pickup amount when it slows to a stop." + (function handle float float int none :behavior fuel-cell)) +(define-extern robber-event-handler + "Enter the robber's death state when it receives an attack event." + (function process int symbol event-message-block object :behavior robber)) ;; - Unknowns @@ -33251,6 +44464,11 @@ (cyl cylinder-flat :inline :offset-assert 240) (old-hips vector :inline :offset-assert 288) ) + (:methods + (init-from-entity! :override-doc + "Initialize the linked ring, collision cylinder, particles, sound, timeout, orientation, and + saved race state.") + ) :method-count-assert 20 :size-assert #x130 :heap-base #xc0 @@ -33263,10 +44481,18 @@ ;; - Functions -(define-extern first-ring? (function race-ring symbol)) -(define-extern last-ring? (function race-ring symbol)) -(define-extern race-ring-blue-set-particle-rotation-callback (function part-tracker none)) -(define-extern race-ring-set-particle-rotation-callback (function part-tracker none)) +(define-extern first-ring? + "Return whether this ring has no alternate actor and therefore begins the linked sequence." + (function race-ring symbol)) +(define-extern last-ring? + "Return whether this ring has no next linked ring." + (function race-ring symbol)) +(define-extern race-ring-blue-set-particle-rotation-callback + "Copy the blue ring's yaw into the shared particle launch specifications." + (function part-tracker none)) +(define-extern race-ring-set-particle-rotation-callback + "Copy the purple ring's yaw into the shared particle launch specifications." + (function part-tracker none)) ;; - Unknowns @@ -33283,6 +44509,10 @@ (deftype balloon (process-drawable) ((root collide-shape :override)) + (:methods + (init-from-entity! :override-doc + "Initialize the balloon's collision sphere, skeleton, and pop particles.") + ) :method-count-assert 20 :size-assert #xb0 :heap-base #x40 @@ -33296,6 +44526,10 @@ ((root collide-shape :override) (num-alts int32 :offset-assert 176) ) + (:methods + (init-from-entity! :override-doc + "Initialize the spike's four collision primitives, skeleton, and linked-spike count.") + ) :method-count-assert 20 :size-assert #xb4 :heap-base #x50 @@ -33313,6 +44547,8 @@ :heap-base #x40 :flag-assert #x16004000b0 (:methods + (init-from-entity! :override-doc + "Initialize the dark-eco crate cluster's collision mesh and skeleton.") (idle () _type_ :state) ;; 20 (die () _type_ :state) ;; 21 ) @@ -33364,6 +44600,11 @@ (hit-boss symbol :offset-assert 248) (tumble-quat quaternion :inline :offset-assert 256) ) + (:methods + (relocate :override-doc + "Adjust the optional joint-modifier pointer when the process moves, then relocate the + inherited drawable state.") + ) :method-count-assert 20 :heap-base #xa0 :size-assert #x110 @@ -33460,6 +44701,11 @@ (submerged symbol :offset-assert 436) (try-counted symbol :offset-assert 440) ) + (:methods + (init-from-entity! :override-doc + "Initialize the Ogre boss's collision, skeleton, arena targets, difficulty, placed geometry, + and saved encounter state.") + ) :method-count-assert 20 :heap-base #x150 :size-assert #x1bc @@ -33480,7 +44726,9 @@ ;; - Functions (define-extern ogreboss-get-targets (function none :behavior ogreboss)) -(define-extern ogreboss-reset-camera (function none)) +(define-extern ogreboss-reset-camera + "Camera reset hook; this version does nothing." + (function none)) (define-extern ogreboss-trigger-steps (function symbol :behavior ogreboss)) (define-extern ogreboss-submerge (function time-frame float none :behavior ogreboss)) (define-extern ogreboss-post (function none :behavior ogreboss)) @@ -33488,13 +44736,17 @@ (define-extern ogreboss-update-shuffling (function none :behavior ogreboss)) (define-extern ogreboss-player-inside-range? (function float symbol :behavior ogreboss)) (define-extern ogreboss-super-boulder-init-by-other (function vector float entity-actor none :behavior ogreboss-super-boulder)) -(define-extern ogreboss-set-stage2-camera (function none)) +(define-extern ogreboss-set-stage2-camera + "Stage-two camera hook; this version does nothing." + (function none)) (define-extern ogreboss-move-far (function time-frame float none :behavior ogreboss)) (define-extern ogreboss-roll-boulder (function none :behavior ogreboss)) (define-extern ogreboss-update-super-boulder (function none :behavior ogreboss)) (define-extern ogreboss-blend-hit-anim (function none :behavior ogreboss)) (define-extern ogreboss-bounce-boulder-init-by-other (function int entity-actor none :behavior ogreboss-bounce-boulder)) -(define-extern ogreboss-set-stage1-camera (function none)) +(define-extern ogreboss-set-stage1-camera + "Stage-one camera hook; this version does nothing." + (function none)) (define-extern ogreboss-move-near (function time-frame float none :behavior ogreboss)) (define-extern ogreboss-shoot-boulder (function pickup-type none :behavior ogreboss)) (define-extern ogreboss-inc-try-count (function none :behavior ogreboss)) @@ -33504,11 +44756,18 @@ (define-extern ogreboss-idle-loop (function none :behavior ogreboss)) (define-extern ogreboss-super-boulder-impact-effect (function none :behavior ogreboss-super-boulder)) (define-extern ogreboss-super-boulder-play-hit-anim (function object :behavior ogreboss-super-boulder)) -(define-extern ogreboss-rock-explosion-effect (function basic handle)) -(define-extern ogreboss-missile-scale-explosion (function handle none)) +(define-extern ogreboss-rock-explosion-effect + "Play the rock explosion at position, emit its particles and camera impact, and return the handle + of a randomly rotated breaking-boulder prop." + (function basic handle)) +(define-extern ogreboss-missile-scale-explosion + "Shrink the breaking-boulder prop toward zero scale once per frame." + (function handle none)) (define-extern ogreboss-super-boulder-event-handler (function process int symbol event-message-block object :behavior ogreboss-super-boulder)) (define-extern ogreboss-bounce-boulder-event-handler (function process int symbol event-message-block object :behavior ogreboss-bounce-boulder)) -(define-extern ogreboss-debug-adjust-difficulty (function none)) +(define-extern ogreboss-debug-adjust-difficulty + "Difficulty-adjustment debug hook; this version does nothing." + (function none)) (define-extern ogreboss-attack-event-handler (function process int symbol event-message-block object :behavior ogreboss)) ;; - Unknowns @@ -33540,6 +44799,9 @@ :heap-base #x40 :flag-assert #x16004000b0 (:methods + (init-from-entity! :override-doc + "Initialize the barrel's collision and skeleton, brighten its model, and enter the idle + state.") (idle () _type_ :state) ;; 20 (die (symbol) _type_ :state) ;; 21 ) @@ -33553,6 +44815,17 @@ (active symbol :offset-assert 768) (triggered entity-actor :offset-assert 772) ) + (:methods + (accumulate-forces! :override-doc + "Apply the inherited forces for sim-time, then pull the platform horizontally toward its + anchor point.") + (init-collision! :override-doc + "Create the moving collision shape, rider slot, and sticky ground mesh used by an Ogre + platform.") + (init-platform! :override-doc + "Set the initial float height, distribute control points around the collision sphere, save + the anchor position, and clear the activation state.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33561,6 +44834,14 @@ (deftype ogre-step (ogre-plat) () + (:methods + (init-platform! :override-doc + "Configure an Ogre step's vertical offsets and physics constants, initialize the base + platform, and activate it when its linked alternate actor is complete.") + (go-initial-state :override-doc + "Enter the floating state when this step is already active; otherwise enter the hidden idle + state.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33569,6 +44850,10 @@ (deftype ogre-step-a (ogre-step) () + (:methods + (init-platform! :override-doc + "Set step A's collision sphere and skeleton, then initialize the shared step behavior.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33577,6 +44862,10 @@ (deftype ogre-step-b (ogre-step) () + (:methods + (init-platform! :override-doc + "Set step B's collision sphere and skeleton, then initialize the shared step behavior.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33585,6 +44874,11 @@ (deftype ogre-step-c (ogre-step) () + (:methods + (init-platform! :override-doc + "Set step C's larger collision sphere and skeleton, then initialize the shared step + behavior.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33593,6 +44887,11 @@ (deftype ogre-step-d (ogre-step) () + (:methods + (init-platform! :override-doc + "Set step D's collision sphere and reused step-B skeleton, then initialize the shared step + behavior.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33601,6 +44900,11 @@ (deftype ogre-isle (ogre-plat) () + (:methods + (init-platform! :override-doc + "Configure the isle's vertical offsets and physics constants, initialize the base platform, + and leave it active.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33609,6 +44913,11 @@ (deftype ogre-isle-b (ogre-isle) () + (:methods + (init-platform! :override-doc + "Offset isle B, set its collision sphere and skeleton, then initialize the shared isle + behavior.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33617,6 +44926,11 @@ (deftype ogre-isle-c (ogre-isle) () + (:methods + (init-platform! :override-doc + "Offset isle C, set its collision sphere and reused isle-B skeleton, then initialize the + shared isle behavior.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33625,6 +44939,11 @@ (deftype ogre-isle-d (ogre-isle) () + (:methods + (init-platform! :override-doc + "Offset isle D in X and Z, set its collision sphere and skeleton, then initialize the shared + isle behavior.") + ) :method-count-assert 35 :size-assert #x308 :heap-base #x2a0 @@ -33636,6 +44955,13 @@ (joint-mod-array joint-mod 8 :offset-assert 176) (dead-joint-count int8 :offset-assert 208) ) + (:methods + (relocate :override-doc + "Relocate the eight optional joint modifiers, then relocate the inherited drawable state.") + (init-from-entity! :override-doc + "Initialize the bridge's segmented collision, skeleton, joint modifiers, and saved encounter + state.") + ) :method-count-assert 20 :size-assert #xd1 :heap-base #x70 @@ -33649,6 +44975,10 @@ (deftype ogre-bridgeend (process-drawable) ((root collide-shape :override)) + (:methods + (init-from-entity! :override-doc + "Initialize the bridge-end collision and skeleton, then enter its idle state.") + ) :method-count-assert 20 :size-assert #xb0 :heap-base #x40 @@ -33661,6 +44991,11 @@ ((idle-anim int32 :offset-assert 220) (anim int32 :offset-assert 224) ) + (:methods + (setup-water! :override-doc + "Set up the animated water, install the Ogre lava ripple waveform, mark it as lava rather than + ordinary particle water, and use the lava attack event.") + ) :method-count-assert 30 :size-assert #xe4 :heap-base #x80 @@ -33671,6 +45006,11 @@ ((root collide-shape :override) (broken-look lod-set :inline :offset-assert 176) ) + (:methods + (init-from-entity! :override-doc + "Initialize the boulder's collision and intact skeleton, prepare its broken appearance, and + enter the idle state.") + ) :method-count-assert 20 :size-assert #xd1 :heap-base #x70 @@ -33717,6 +45057,11 @@ ((alt-actor entity-actor :offset-assert 176) (got-hit symbol :offset-assert 180) ) + (:methods + (init-from-entity! :override-doc + "Initialize the plunger lurker's collision and skeleton, find its linked actor, and enter the + active or finished state for the task.") + ) :method-count-assert 20 :size-assert #xb8 :heap-base #x50 @@ -33754,7 +45099,13 @@ :heap-base #xc0 :flag-assert #x1500c00130 (:methods - (flying-lurker-method-20 (_type_) none) ;; 20 + (init-from-entity! :override-doc + "Initialize the flying lurker's path, skeleton, shadow, linked actor, race state, and starting + behavior.") + (update-shadow! + "Probe for ground below the lurker, update its shadow planes, and expand its draw bounds to + include the projected shadow." + (_type_) none) ;; 20 ) (:states flying-lurker-die @@ -33767,15 +45118,35 @@ ;; - Functions -(define-extern play-movie? (function symbol)) -(define-extern flying-lurker-move (function none :behavior flying-lurker)) -(define-extern flying-lurker-rotate (function quaternion :behavior flying-lurker)) -(define-extern first? (function symbol :behavior flying-lurker)) -(define-extern flying-lurker-handler (function process int symbol event-message-block object :behavior flying-lurker)) -(define-extern flying-lurker-play-intro (function none :behavior flying-lurker)) -(define-extern flying-lurker-inc-try-count (function none :behavior flying-lurker)) -(define-extern flying-lurker-calc-anim-speed (function float :behavior flying-lurker)) -(define-extern flying-lurker-calc-speed (function meters meters meters meters none :behavior flying-lurker)) +(define-extern play-movie? + "Return true while the plunger-lurker task is waiting for its encounter movie." + (function symbol)) +(define-extern flying-lurker-move + "Advance along the race path and smoothly approach the desired vertical offset." + (function none :behavior flying-lurker)) +(define-extern flying-lurker-rotate + "Aim the lurker along the current path tangent and return its root rotation." + (function quaternion :behavior flying-lurker)) +(define-extern first? + "Return true when this is the first flying lurker in its actor-link chain." + (function symbol :behavior flying-lurker)) +(define-extern flying-lurker-handler + "Propagate the fly-away event through the linked racers, select this lurker's rank-dependent pace, + and begin the race." + (function process int symbol event-message-block object :behavior flying-lurker)) +(define-extern flying-lurker-play-intro + "Run the plunger-lurker encounter movie and release the player into the flying-lurker race." + (function none :behavior flying-lurker)) +(define-extern flying-lurker-inc-try-count + "Increment and save this encounter's capped retry count once per attempt." + (function none :behavior flying-lurker)) +(define-extern flying-lurker-calc-anim-speed + "Return the flight animation playback rate derived from current movement speed." + (function float :behavior flying-lurker)) +(define-extern flying-lurker-calc-speed + "Adjust flight speed from race pace, rank, the player's position, and the supplied minimum and + maximum speeds. The two distance arguments are retained by the interface but unused here." + (function meters meters meters meters none :behavior flying-lurker)) ;; - Unknowns @@ -33811,6 +45182,11 @@ (deftype villagec-lava (water-anim) () + (:methods + (setup-water! :override-doc + "Set up the animated water, install the Village 3 lava ripple waveform, mark it as lava + rather than ordinary particle water, and use the lava attack event.") + ) :method-count-assert 30 :size-assert #xdc :heap-base #x70 @@ -33827,6 +45203,9 @@ :heap-base #x80 :flag-assert #x17008000f0 (:methods + (init-from-entity! :override-doc + "Initialize the gondola's moving collision, skeleton, shadow, and starting direction from the + player's side of the route.") (idle (symbol) _type_ :state) ;; 20 (ride-up () _type_ :state) ;; 21 (ride-down () _type_ :state) ;; 22 @@ -33840,6 +45219,9 @@ :heap-base #x40 :flag-assert #x16004000b0 (:methods + (init-from-entity! :override-doc + "Initialize the piston skeleton and generator sound, then enter the saved inactive or active + state.") (idle () _type_ :state) ;; 20 (active (handle symbol) _type_ :state) ;; 21 ) @@ -33852,6 +45234,8 @@ :heap-base #x40 :flag-assert #x15004000b0 (:methods + (init-from-entity! :override-doc + "Initialize the cable skeleton, restore its saved visible effect state, and enter idle.") (idle () _type_ :state) ;; 20 ) ) @@ -33887,12 +45271,18 @@ :heap-base #x50 :flag-assert #x15005000c0 (:methods + (init-from-entity! :override-doc + "Create four phase-offset copies of this rail cart, then initialize the placed cart at phase + zero.") (idle () _type_ :state) ;; 20 )) ;; - Functions -(define-extern minecartsteel-initialize-by-other (function entity-actor float object :behavior minecartsteel)) +(define-extern minecartsteel-initialize-by-other + "Initialize one rail cart's collision, skeleton, synchronized animation phase, track selection, + and rolling sound." + (function entity-actor float object :behavior minecartsteel)) ;; - Unknowns @@ -33913,6 +45303,20 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize the tall miner as a task-controlled character for the village trade sequence.") + (get-art-elem :override-doc + "Return the art element on the active root animation channel.") + (play-anim! :override-doc + "Select the tall miner's animation for the current task stage. If commit? is true, report the + invalid request because this character does not drive task progression.") + (draw-npc-shadow :override-doc + "Update the projected shadow when the highest-detail model was drawn this frame; otherwise + disable it.") + (setup-shadow-settings! :override-doc + "Set the projected shadow's vertical clipping planes relative to the miner's height.") + ) ) (deftype minershort (process-taskable) @@ -33922,6 +45326,23 @@ :size-assert #x180 :heap-base #x110 :flag-assert #x3501100180 + (:methods + (init-from-entity! :override-doc + "Initialize the short miner, candle particles, task control, paired tall miner, and dialogue + music.") + (get-art-elem :override-doc + "Return the art element on the active root animation channel.") + (play-anim! :override-doc + "Select dialogue animation for the current task stage. If commit? is true, also apply the + associated task, reward, reminder, and paired-character side effects.") + (draw-npc-shadow :override-doc + "Update the projected shadow when the highest-detail model was drawn this frame; otherwise + disable it.") + (setup-shadow-settings! :override-doc + "Set the projected shadow's vertical clipping planes relative to the miner's height.") + (try-play-ambient-chatter :override-doc + "Try to play one of the miners' ambient voice lines after the chatter cooldown.") + ) ) (deftype cavegem (process-drawable) @@ -33931,14 +45352,20 @@ :heap-base #x40 :flag-assert #x15004000b0 (:methods + (init-from-entity! :override-doc + "Initialize this cave gem's drawable and looping skeleton animation.") (idle () _type_ :state) ;; 20 ) ) ;; - Functions -(define-extern minershort-trans-hook (function none :behavior minershort)) -(define-extern miners-anim-loop (function object :behavior process-taskable)) +(define-extern minershort-trans-hook + "Move the short miner's candle particles to the candle joint after a transition." + (function none :behavior minershort)) +(define-extern miners-anim-loop + "Keep the current miner animation looping and periodically try to play ambient chatter." + (function object :behavior process-taskable)) ;; - Unknowns @@ -33961,6 +45388,26 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize the village assistant as a task-controlled character.") + (get-art-elem :override-doc + "Return the art element on the active root animation channel.") + (play-anim! :override-doc + "Select the assistant's animation for the final-sage task stage; report an invalid committed + request while the introduction is pending.") + (should-display? :override-doc + "Return true after the village button introduction closes and before the sages are kidnapped.") + (target-above-threshold? :override-doc + "Return true when the target is above the assistant's interaction-height threshold.") + (draw-npc-shadow :override-doc + "Update the projected shadow when the highest-detail model was drawn this frame; otherwise + disable it.") + (setup-shadow-settings! :override-doc + "Set the projected shadow's vertical clipping planes relative to the assistant's height.") + (try-play-ambient-chatter :override-doc + "Try to play one of the assistant's ambient voice lines after the chatter cooldown.") + ) ) ;; - Unknowns @@ -33985,6 +45432,24 @@ :size-assert #x194 :heap-base #x130 :flag-assert #x3501300194 + (:methods + (init-from-entity! :override-doc + "Initialize Samos as a task-controlled character and find the paired assistant entity.") + (get-art-elem :override-doc + "Return the art element on the active root animation channel.") + (play-anim! :override-doc + "Select Samos's animation for the current village task stage. If commit? is true, apply task + progression and coordinate the assistant and temporary siblings used by the introduction.") + (should-display? :override-doc + "Return true once the village button hint is closed and the sages have not been kidnapped; + otherwise prefetch the next dialogue animation.") + (target-above-threshold? :override-doc + "Return true when the target is inside Samos's village interaction region.") + (draw-npc-shadow :override-doc + "Draw Samos's projected shadow with world-space clipping disabled and a fixed bottom plane.") + (try-play-ambient-chatter :override-doc + "Try to play a task-appropriate Samos ambient voice line after the chatter cooldown.") + ) ) ;; - Unknowns @@ -34015,7 +45480,15 @@ :heap-base #x70 :flag-assert #x15007000e0 (:methods - (cave-trap-method-20 (_type_) symbol) ;; 20 + (init-from-entity! :override-doc + "Initialize the cave trap's collision, navigation, path, and alternate spawn actors.") + (relocate :override-doc + "Relocate the alternate-actor array and the rest of this process allocation.") + (try-spawn-baby-spider + "Rank alternate spawn actors by whether they are nearby eggs, nearby and visible, visible, or + simply available, then spawn a baby spider at the best candidate." + (_type_) + symbol) ;; 20 ) (:states cave-trap-idle @@ -34030,6 +45503,10 @@ :size-assert #xb8 :heap-base #x50 :flag-assert #x14005000b8 + (:methods + (init-from-entity! :override-doc + "Initialize this spider vent and begin accepting spawn queries.") + ) (:states spider-vent-idle) ) @@ -34053,7 +45530,9 @@ ;; - Functions -(define-extern cave-trap-default-event-handler (function process int symbol event-message-block object :behavior cave-trap)) +(define-extern cave-trap-default-event-handler + "Track spawned spiders and activate the trap when a spider egg reports a notification." + (function process int symbol event-message-block object :behavior cave-trap)) ;; ---------------------- @@ -34073,6 +45552,11 @@ :size-assert #xd5 :heap-base #x70 :flag-assert #x14007000d5 + (:methods + (init-from-entity! :override-doc + "Initialize this egg's collision, intact and broken looks, grounded pose, notification actor, + and idle animation.") + ) (:states (spider-egg-idle symbol) spider-egg-hatch @@ -34127,7 +45611,9 @@ ;; - Functions -(define-extern target-snowball-post (function none :behavior target)) +(define-extern target-snowball-post + "Run the target post step once per display time-ratio iteration while in snowball mode." + (function none :behavior target)) ;; - Unknowns @@ -34165,8 +45651,59 @@ :heap-base #x180 :flag-assert #x4c018001f0 (:methods - (ice-cube-method-51 (_type_ vector vector) symbol :overlay-at nav-enemy-method-51) ;; 51 - (ice-cube-method-53 (_type_ vector vector) symbol :overlay-at nav-enemy-method-53) ;; 53 + (deactivate :override-doc + "Stop all four particle launchers, then deactivate the drawable.") + (relocate :override-doc + "Relocate the three additional particle-launch controls, then relocate the process through + the parent method.") + (init-from-entity! :override-doc + "Create the particle launchers and collision, finish enemy setup, validate the path, and begin + searching for an appearance point.") + (initialize-collision :override-doc + "Create the moving collision group with three body spheres and two joint-attached attack + spheres, then select the retracted-spike shape.") + (post-init-setup! :override-doc + "Initialize the drawable, skeleton, navigation defaults, and neck-joint indices.") + (snap-point-to-ground + "Probe downward from input-point to background ground and store the ground point in + output-point. Return false for a miss or lava surface." + (_type_ vector vector) + symbol + :overlay-at nav-enemy-method-51) ;; 51 + (valid-appear-point? + "Return true when candidate-point is in the desired distance band, has an unobstructed jump + path, and is visible." + (_type_ vector) + symbol + :overlay-at nav-enemy-method-52) ;; 52 + (pick-appear-point-and-facing + "Search the path for an acceptable appearance point, storing its grounded position and a + normalized facing direction toward the target." + (_type_ vector vector) + symbol + :overlay-at nav-enemy-method-53) ;; 53 + (pick-charge-target-point! + "Search the path for a grounded point far enough from the ice cube, store it as target-pt, and + return whether one was found. The vector argument is unused." + (_type_ vector) + symbol + :overlay-at nav-enemy-method-54) ;; 54 + (set-spikes-retracted-collision! + "Select the smaller harmless collision spheres used while the spikes are retracted." + (_type_) + none + :overlay-at nav-enemy-method-57) ;; 57 + (set-spikes-extended-collision! + "Select the larger damaging collision spheres used while the spikes are extended." + (_type_) + none + :overlay-at nav-enemy-method-58) ;; 58 + (seek-heading-to-target? + "Optionally refresh target-pt from the player, turn toward it, and return whether the heading + error is within the facing threshold." + (_type_ symbol) + symbol + :overlay-at nav-enemy-method-60) ;; 60 ) (:states ice-cube-face-player @@ -34184,7 +45721,10 @@ ;; - Functions -(define-extern ice-cube-default-event-handler (function process int symbol event-message-block object :behavior ice-cube)) +(define-extern ice-cube-default-event-handler + "Handle attacks and collision contacts, switching to the appropriate reaction state and tracking + whether the extended spikes struck the target." + (function process int symbol event-message-block object :behavior ice-cube)) ;; - Unknowns @@ -34251,9 +45791,20 @@ :heap-base #xe0 :flag-assert #x1700e00150 (:methods - (follow-path (_type_) none) ;; 20 - (play-landing-sound (_type_ float) sound-id) ;; 21 - (snow-ball-roller-method-22 (_type_ process-drawable) none) ;; 22 + (follow-path + "Update the roller's path target, horizontal motion, fade-in, and end-of-path fall state for + its current path position." + (_type_) + none) ;; 20 + (play-landing-sound + "Play the landing sound at a volume derived from the magnitude of the vertical impact speed." + (_type_ float) + sound-id) ;; 21 + (attack-target! + "Bounce the roller upward and shove target away with an attack event. Keep the shove at least + 60 degrees away from the roller's path direction." + (_type_ process-drawable) + none) ;; 22 ) (:states snow-ball-roller-idle) @@ -34272,8 +45823,22 @@ :heap-base #x20 :flag-assert #x100020008c (:methods - (snow-ball-method-14 (_type_ (inline-array snow-ball-junction) float int) symbol) ;; 14 - (snow-ball-method-15 (_type_ (inline-array snow-ball-junction) int) symbol) ;; 15 + (relocate :override-doc + "Relocate the process and adjust both path-control pointers before calling the parent method.") + (init-from-entity! :override-doc + "Create both snowball paths, initialize path-selection history, and begin spawning rollers.") + (compute-junction-times! + "Fill four junction intervals with the times at which a roller traveling at path-speed will + enter and leave the path's crossing regions. The normalized crossing positions differ + between the two paths." + (_type_ (inline-array snow-ball-junction) float int) + symbol) ;; 14 + (junctions-clear? + "Return true when the proposed crossing intervals do not overlap any active roller. Rollers + on the same path also compare their fourth interval; rollers on opposite paths only compare + the three shared crossings." + (_type_ (inline-array snow-ball-junction) int) + symbol) ;; 15 ) (:states snow-ball-idle) @@ -34336,6 +45901,11 @@ :size-assert #xf0 :heap-base #x80 :flag-assert #x14008000f0 + (:methods + (init-from-entity! :override-doc + "Select the pusher's sound and collision-mesh variant from entity resources, initialize its + animation timing, and start the synchronized piston motion.") + ) (:states snowpusher-idle) ) @@ -34348,6 +45918,11 @@ :size-assert #x130 :heap-base #xc0 :flag-assert #x1b00c00130 + (:methods + (init-from-entity! :override-doc + "Create the rotating platform collision, initialize its synchronized phase, and save its + starting orientation.") + ) (:states snow-spatula-idle) ) @@ -34363,6 +45938,15 @@ :size-assert #xe0 :heap-base #x70 :flag-assert #x14007000e0 + (:methods + (deactivate :override-doc + "Stop the gate's auxiliary particles before performing normal drawable deactivation.") + (relocate :override-doc + "Adjust the gate's auxiliary particle-controller pointers before relocating the process.") + (init-from-entity! :override-doc + "Create the gate collision, particle controllers, endpoints, ambient sound, and initial open + or closed state from snowball-task completion.") + ) (:states snow-fort-gate-idle-open snow-fort-gate-idle-closed @@ -34376,7 +45960,12 @@ :heap-base #x40 :flag-assert #x15004000b0 (:methods - (snow-gears-method-20 (_type_) none) ;; 20 + (init-from-entity! :override-doc + "Initialize the gear skeleton, dripping-water particles, and ambient engine sound.") + (spawn-drip-particles + "Spawn the dripping-water particle group above the gears each frame while they are running." + (_type_) + none) ;; 20 ) (:states snow-gears-idle @@ -34395,6 +45984,11 @@ :size-assert #xd0 :heap-base #x60 :flag-assert #x14006000d0 + (:methods + (init-from-entity! :override-doc + "Create the switch collision and skeleton, remember its raised position, and spawn its fuel + cell unless the snowball task is already complete.") + ) (:states snow-switch-idle-down snow-switch-idle-up @@ -34409,6 +46003,11 @@ :size-assert #xb4 :heap-base #x50 :flag-assert #x14005000b4 + (:methods + (init-from-entity! :override-doc + "Create the log platform collision and skeleton, hide it, connect it to navigation, and bind + it to its master actor.") + ) (:states snow-log-wait-for-master snow-log-active @@ -34425,6 +46024,11 @@ :size-assert #xd0 :heap-base #x60 :flag-assert #x14006000d0 + (:methods + (init-from-entity! :override-doc + "Create the log button collision and skeleton, remember its raised position, and bind it to + the log actor it triggers.") + ) (:states snow-log-button-idle-down snow-log-button-idle-up @@ -34433,8 +46037,12 @@ ;; - Functions -(define-extern snow-switch-event-handler (function process int symbol event-message-block object :behavior snow-switch)) -(define-extern snow-log-button-event-handler (function process int symbol event-message-block object :behavior snow-log-button)) +(define-extern snow-switch-event-handler + "Handle player contact with the snow switch and answer whether it has already been pressed." + (function process int symbol event-message-block object :behavior snow-switch)) +(define-extern snow-log-button-event-handler + "Handle player contact with the log button and answer the linked log's completion query." + (function process int symbol event-message-block object :behavior snow-log-button)) ;; - Unknowns @@ -34474,6 +46082,14 @@ :size-assert #x180 :heap-base #x110 :flag-assert #x2101100180 + (:methods + (configure-options! :override-doc + "Apply the common flutflut-platform resource options, links, path state, appearance endpoints, + and rise and fall timings.") + (get-lit-skel :override-doc + "Return true as a skeleton-group sentinel once this platform's task is complete, recording + the completion on the entity when necessary.") + ) (:states elevator-idle-at-cave elevator-travel-to-cave @@ -34497,6 +46113,11 @@ :size-assert #xf0 :heap-base #x80 :flag-assert #x14008000f0 + (:methods + (init-from-entity! :override-doc + "Create the button collision and skeleton, load its timeout and previous-button link, and + begin the ordered fuel-cell button sequence.") + ) (:states snow-button-up-idle snow-button-deactivate @@ -34509,6 +46130,17 @@ :size-assert #x180 :heap-base #x110 :flag-assert #x2101100180 + (:methods + (get-unlit-skel :override-doc "Return the small flutflut platform skeleton.") + (setup-part! :override-doc "Create and save the small platform's particle launch control.") + (spawn-part! :override-doc + "Spawn the small platform's configured particles at its collision root when particles are + enabled.") + (configure-options! :override-doc + "Configure the common platform options and derive the particle rotation from its orientation.") + (setup-collision! :override-doc + "Create the small platform's moving, sticky collision mesh and allocate one rider slot.") + ) ) (deftype flutflut-plat-med (flutflut-plat) @@ -34517,6 +46149,12 @@ :size-assert #x180 :heap-base #x110 :flag-assert #x2101100180 + (:methods + (get-unlit-skel :override-doc "Return the medium flutflut platform skeleton.") + (setup-part! :override-doc "Create and save the medium platform's particle launch control.") + (setup-collision! :override-doc + "Create the medium platform's moving, sticky collision mesh and allocate one rider slot.") + ) ) (deftype flutflut-plat-large (flutflut-plat) @@ -34525,6 +46163,17 @@ :size-assert #x180 :heap-base #x110 :flag-assert #x2101100180 + (:methods + (get-unlit-skel :override-doc "Return the large flutflut platform skeleton.") + (setup-part! :override-doc "Create and save the large platform's particle launch control.") + (spawn-part! :override-doc + "Spawn the large platform's configured particles at its collision root when particles are + enabled.") + (configure-options! :override-doc + "Configure the common platform options and derive the particle rotation from its orientation.") + (setup-collision! :override-doc + "Create the large platform's moving, sticky collision mesh and allocate one rider slot.") + ) ) ;; - Unknowns @@ -34555,8 +46204,19 @@ :heap-base #x60 :flag-assert #x16006000c8 (:methods + (deactivate :override-doc + "Stop the shove-particle controller before performing normal drawable deactivation.") + (relocate :override-doc + "Adjust the shove-particle controller pointer before relocating the process.") + (init-from-entity! :override-doc + "Create the bumper collision, skeleton, particle controllers, navigation link, task link, and + ambient sound, then select its active or completed state.") (snow-bumper-method-20 (_type_) none) ;; 20 - (shove-player (_type_ process-drawable) none) ;; 21 + (shove-player + "Push target away from the bumper. Clamp the horizontal shove direction around the configured + base angle, aim the shove particles to match, and record a successful shove time." + (_type_ process-drawable) + none) ;; 21 ) (:states snow-bumper-spawn-fuel-cell @@ -34593,9 +46253,27 @@ :heap-base #x70 :flag-assert #x17007000e0 (:methods - (ram-method-20 (_type_) object) ;; 20 - (ram-method-21 (_type_) object) ;; 21 - (ram-method-22 (_type_) symbol) ;; 22 + (deactivate :override-doc + "Stop the wheel-puff controller before ordinary drawable deactivation.") + (relocate :override-doc + "Adjust the wheel-puff controller pointer before relocating the drawable.") + (init-from-entity! :override-doc + "Build the rideable ram collision shape, skeleton, particles, and fuel-cell cutscene settings. + Restore persistent completion state and spawn the associated ram boss when this placement has + a navigation mesh.") + (spawn-wall-hit-particles! + "Spawn the wall-impact dust burst in front of the ram during its slam." + (_type_) + object) ;; 20 + (spawn-wheel-puffs! + "Spawn dust puffs beside both rear wheels during the ram's slam." + (_type_) + object) ;; 21 + (complete-ram-task! + "Mark this ram complete, update the snow-ram reminder progress, and return whether this ram + should award the fuel cell." + (_type_) + symbol) ;; 22 ) (:states ram-fun-idle @@ -34626,6 +46304,25 @@ :size-assert #x1d0 :heap-base #x160 :flag-assert #x1d016001d0 + (:methods + (update-projectile-effects! :override-doc + "Spin the bolus, update its ground shadow, emit flight particles, and move its tracking sound + to the current projectile position.") + (go-moving! :override-doc + "Begin the bolus charge-up and launch sequence.") + (init-projectile-collision! :override-doc + "Create the bolus moving collision shape and damaging sphere.") + (init-projectile-settings! :override-doc + "Configure the bolus particles, homing motion, attack mode, tracking sound, and charging state + on its owning boss.") + (deactivate :override-doc + "Stop the bolus's secondary particles and charge sound before ordinary projectile deactivation.") + (relocate :override-doc + "Adjust the secondary particle-controller pointer before relocating the projectile.") + (update-target! :override-doc + "Lead the target by the player's velocity and refresh the bolus target point unless the player + is invulnerable.") + ) (:states ram-boss-proj-launch ram-boss-proj-growing) @@ -34653,9 +46350,51 @@ :heap-base #x190 :flag-assert #x4c019001f4 (:methods - (ram-boss-method-51 (_type_ vector) symbol :overlay-at nav-enemy-method-51) ;; 51 - (ram-boss-method-52 (_type_) symbol :overlay-at nav-enemy-method-52) ;; 52 - (ram-boss-method-57 (_type_ float) float :overlay-at nav-enemy-method-57) ;; 57 + (deactivate :override-doc + "Stop the boss's secondary particles before ordinary enemy deactivation.") + (relocate :override-doc + "Adjust the secondary particle-controller pointer before relocating the enemy.") + (initialize-collision :override-doc + "Create the boss's moving collision group with three body spheres and one shield sphere.") + (post-init-setup! :override-doc + "Initialize the boss skeleton, navigation defaults, particles, shield joint modifier, and + shield and neck state.") + (disarm-shield-collision! + "Make the body spheres touch-sensitive and disable the detached shield's collision." + (_type_) + symbol + :overlay-at nav-enemy-method-53) ;; 53 + (get-throw-point! + "Transform the local muzzle offset through joint 18 and store the bolus launch point." + (_type_ vector) + symbol + :overlay-at nav-enemy-method-54) ;; 54 + (line-of-sight-to-target? + "Probe from the boss's eye to the player and return true when the path is clear." + (_type_) + symbol + :overlay-at nav-enemy-method-55) ;; 55 + (turn-needed-to-throw? + "Return true while the boss must keep turning toward throw-direction. Once it is within about + 60 degrees, nudge the direction toward the current facing and return false." + (_type_ vector) + symbol + :overlay-at nav-enemy-method-51) ;; 51 + (enable-ground-combat-collision! + "Resize the body spheres and arm the shield sphere as a solid attacking surface for ground + combat." + (_type_) + symbol + :overlay-at nav-enemy-method-52) ;; 52 + (target-pitch-interp + "Return a smoothed 0-to-1 blend between the forward and upward defense animations from the + pitch angle to the player." + (_type_ float) + float + :overlay-at nav-enemy-method-57) ;; 57 + (set-jump-height-factor! :override-doc + "Allow or suppress preparing a bolus throw while airborne. When allowed and the cooldown has + elapsed, create the charging projectile; otherwise keep the current projectile stoked.") ) (:states ram-boss-tracking @@ -34674,9 +46413,15 @@ ;; - Functions -(define-extern snow-ram-proj-update-velocity (function ram-boss-proj none)) -(define-extern ram-boss-on-ground-event-handler (function process int symbol event-message-block object :behavior ram-boss)) -(define-extern ram-boss-init-by-other (function basic nav-enemy symbol none :behavior ram-boss)) +(define-extern snow-ram-proj-update-velocity + "Update the bolus velocity by turning its facing direction toward its current homing target." + (function ram-boss-proj none)) +(define-extern ram-boss-on-ground-event-handler + "Handle the boss's ground-combat attacks, contacts, shield hits, and death transition." + (function process int symbol event-message-block object :behavior ram-boss)) +(define-extern ram-boss-init-by-other + "Initialize a ram boss spawned by a parent ram and select its shielded or unshielded setup." + (function basic nav-enemy symbol none :behavior ram-boss)) ;; - Unknowns @@ -34714,8 +46459,13 @@ ;; - Functions -(define-extern snow-bird-bob-func (function sparticle-system sparticle-cpuinfo vector none)) -(define-extern sparticle-snow-birds-moon (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern snow-bird-bob-func + "Bob a snow bird around its owner's height with a half-meter, one-second sine wave." + (function sparticle-system sparticle-cpuinfo vector none)) +(define-extern sparticle-snow-birds-moon + "Center the particle's packed angular phase around a quarter turn and store its signed value in + the orbit matrix." + (function sparticle-system sparticle-cpuinfo matrix none)) ;; ---------------------- @@ -34734,6 +46484,17 @@ :size-assert #x198 :heap-base #x130 :flag-assert #x4c01300198 + (:methods + (initialize-collision :override-doc + "Create the slave's moving collision shape with two body spheres and one joint-attached attack + sphere.") + (post-init-setup! :override-doc + "Initialize the slave skeleton, navigation defaults, origin joint, and neck joints.") + (deactivate :override-doc + "Stop the appearance-particle controller before ordinary drawable deactivation.") + (relocate :override-doc + "Adjust the appearance-particle controller pointer before parent relocation.") + ) (:states yeti-slave-appear-jump-up yeti-slave-appear-land @@ -34754,8 +46515,20 @@ :heap-base #x60 :flag-assert #x16006000c8 (:methods - (yeti-method-20 (_type_ vector vector) symbol) ;; 20 - (aggro? (_type_ vector) symbol) ;; 21 + (init-from-entity! :override-doc + "Initialize the yeti population controller from its path and placement settings, then wait for + the player's first approach or restore the completed population.") + (find-slave-spawn-point! + "Search the path control vertices for a point clear of the player and existing slaves. Write + the selected position and a normalized facing direction, then return true; return false when + no control vertex is suitable." + (_type_ vector vector) + symbol) ;; 20 + (aggro? + "Return true when candidate-position is at least six meters from the player and every existing + slave, making it suitable for a new spawn." + (_type_ vector) + symbol) ;; 21 ) (:states yeti-resuming-start @@ -34765,8 +46538,13 @@ ;; - Functions -(define-extern yeti-slave-init-by-other (function entity yeti vector vector symbol none :behavior yeti-slave)) -(define-extern yeti-slave-default-event-handler (function process int symbol event-message-block object :behavior yeti-slave)) +(define-extern yeti-slave-init-by-other + "Initialize a slave at spawn-position facing spawn-direction, then enter ordinary idle or play its + appearance jump." + (function entity yeti vector vector symbol none :behavior yeti-slave)) +(define-extern yeti-slave-default-event-handler + "Kill the slave when attacked and forward touch collisions through ordinary enemy attack handling." + (function process int symbol event-message-block object :behavior yeti-slave)) ;; - Unknowns @@ -34787,6 +46565,10 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the lava-base drawable and skeleton, then start its looping idle animation.") + ) (:states lavabase-idle) ) @@ -34797,6 +46579,10 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the lavafall drawable and skeleton, then start its looping idle animation.") + ) (:states lavafall-idle) ) @@ -34807,6 +46593,10 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the shortcut drawable and skeleton, then start its looping idle animation.") + ) (:states lavashortcut-idle) ) @@ -34844,6 +46634,11 @@ :size-assert #x1b0 :heap-base #x140 :flag-assert #x14014001b0 + (:methods + (init-from-entity! :override-doc + "Initialize the rotating energy hub, find its three linked actors, arrange five arms around + it, and select the active or stopped state from the energy-ball task.") + ) (:states darkecobarrel-mover-move darkecobarrel-mover-die) @@ -34858,6 +46653,13 @@ :size-assert #xc8 :heap-base #x60 :flag-assert #x14006000c8 + (:methods + (relocate :override-doc + "Adjust the cumulative spawn-time array pointer before parent relocation.") + (init-from-entity! :override-doc + "Initialize the barrel spawner's path speed, sound, cumulative spawn schedule, synchronization + phase, and any movers that should already be active.") + ) (:states darkecobarrel-spawner) ) @@ -34868,6 +46670,10 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the sewer-A lavafall drawable and skeleton, then start its looping animation.") + ) (:states lavafallsewera-idle) ) @@ -34878,6 +46684,10 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the sewer-B lavafall drawable and skeleton, then start its looping animation.") + ) (:states lavafallsewerb-idle) ) @@ -34889,6 +46699,9 @@ :heap-base #x40 :flag-assert #x16004000b0 (:methods + (init-from-entity! :override-doc + "Create the chain mine's collision sphere, skeleton, and ambient chain sound, then enter its + attackable idle state.") (die () _type_ :state) ;; 20 (idle () _type_ :state) ;; 21 ) @@ -34903,6 +46716,9 @@ :heap-base #x50 :flag-assert #x16005000b4 (:methods + (init-from-entity! :override-doc + "Create the balloon collision sphere, skeleton, death particles, and optional path motion, + converting its configured travel speed to angular phase per gameplay tick.") (idle () _type_ :state) ;; 20 (die () _type_ :state) ;; 21 ) @@ -34914,6 +46730,11 @@ :size-assert #xdc :heap-base #x70 :flag-assert #x1e007000dc + (:methods + (setup-water! :override-doc + "Perform ordinary animated-water setup, attach the lavatube ripple waveform, mark the volume + as lava rather than particle water, and make contact send heat.") + ) ) (deftype lavayellowtarp (process-drawable) @@ -34922,20 +46743,40 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the yellow tarp drawable and skeleton, then start its looping idle animation.") + ) (:states lavayellowtarp-idle) ) ;; - Functions -(define-extern darkecobarrel-base-init (function res-lump path-control-flag :behavior darkecobarrel-base)) -(define-extern darkecobarrel-base-time (function time-frame :behavior darkecobarrel-base)) -(define-extern darkecobarrel-cycle-time (function int :behavior darkecobarrel)) ;; likely to darkecobarrels -(define-extern darkecobarrel-advance-curspawn (function none :behavior darkecobarrel)) -(define-extern darkecobarrel-mover-init-by-other (function res-lump float time-frame time-frame none :behavior darkecobarrel-mover)) -(define-extern darkecobarrel-base-done? (function float symbol :behavior darkecobarrel-base)) -(define-extern darkecobarrel-base-pos (function time-frame float :behavior darkecobarrel-base)) -(define-extern darkecobarrel-mover-pos (function none :behavior darkecobarrel-mover)) +(define-extern darkecobarrel-base-init + "Initialize a dark-eco barrel drawable, skeleton, path, collision shape, and path-debug flags." + (function res-lump path-control-flag :behavior darkecobarrel-base)) +(define-extern darkecobarrel-base-time + "Return the synchronized barrel clock." + (function time-frame :behavior darkecobarrel-base)) +(define-extern darkecobarrel-cycle-time + "Return the total duration of the spawner's cumulative barrel schedule." + (function int :behavior darkecobarrel)) ;; likely to darkecobarrels +(define-extern darkecobarrel-advance-curspawn + "Advance the next-spawn index and wrap it at the end of the cumulative schedule." + (function none :behavior darkecobarrel)) +(define-extern darkecobarrel-mover-init-by-other + "Initialize a moving barrel at the requested path speed, start time, and synchronization phase." + (function res-lump float time-frame time-frame none :behavior darkecobarrel-mover)) +(define-extern darkecobarrel-base-done? + "Return true when a normalized barrel position has passed its endpoint in the current direction." + (function float symbol :behavior darkecobarrel-base)) +(define-extern darkecobarrel-base-pos + "Evaluate the barrel's normalized path position at a synchronized start time." + (function time-frame float :behavior darkecobarrel-base)) +(define-extern darkecobarrel-mover-pos + "Update a moving barrel's path position, bobbing orientation, and leak particles." + (function none :behavior darkecobarrel-mover)) ;; - Unknowns @@ -34981,6 +46822,10 @@ :size-assert #xb0 :heap-base #x40 :flag-assert #x14004000b0 + (:methods + (init-from-entity! :override-doc + "Initialize the energy-lava drawable and start its looping animation.") + ) (:states energybase-stopped energybase-idle @@ -35057,16 +46902,38 @@ ;; - Functions -(define-extern energyarm-init-by-other (function vector float none :behavior energyarm)) -(define-extern energyhub-set-lava-height (function float float :behavior energyhub)) -(define-extern energyhub-trans (function quaternion :behavior energyhub)) -(define-extern energyarm-init (function energyarm sparticle-launch-control)) -(define-extern energyball-init-by-other (function vector none :behavior energyball)) -(define-extern energyarm-trans (function vector :behavior energyarm)) -(define-extern energyball-init (function energyball collide-shape-moving)) -(define-extern energydoor-player-dist (function float :behavior energydoor)) -(define-extern energydoor-open-handler (function process int symbol event-message-block object :behavior energydoor)) -(define-extern energydoor-closed-handler (function process int symbol event-message-block object :behavior energydoor)) +(define-extern energyarm-init-by-other + "Attach an arm at the given hub-local offset and yaw, initialize its motion, and create its ball + unless the energy-ball task is already complete." + (function vector float none :behavior energyarm)) +(define-extern energyhub-set-lava-height + "Fade the hub's palette flash toward neutral and enforce the linked lava drawable's horizontal + scale. The requested height is retained by the interface but is unused by the shipped code." + (function float float :behavior energyhub)) +(define-extern energyhub-trans + "Advance the hub's yaw, add its slow vertical rocking motion, and update its matrix and quaternion." + (function quaternion :behavior energyhub)) +(define-extern energyarm-init + "Create an energy arm's collision mesh and particle launcher." + (function energyarm sparticle-launch-control)) +(define-extern energyball-init-by-other + "Initialize an energy ball at the supplied position and start its idle state." + (function vector none :behavior energyball)) +(define-extern energyarm-trans + "Position and orient an arm from its parent hub, chatter, recovery, and falling rotations." + (function vector :behavior energyarm)) +(define-extern energyball-init + "Make an energy ball attackable and create its moving collision sphere." + (function energyball collide-shape-moving)) +(define-extern energydoor-player-dist + "Return the player's signed displacement along the door's local first matrix axis." + (function float :behavior energydoor)) +(define-extern energydoor-open-handler + "Answer open? events while the door is open." + (function process int symbol event-message-block object :behavior energydoor)) +(define-extern energydoor-closed-handler + "Begin opening on an open event and answer open? events while the door is closed." + (function process int symbol event-message-block object :behavior energydoor)) ;; - Unknowns @@ -35109,6 +46976,19 @@ :size-assert #x17c :heap-base #x110 :flag-assert #x350110017c + (:methods + (init-from-entity! :override-doc + "Initialize the taskable assistant, bind the lavatube-start task control, select its first + available item, and enter the appropriate initial state.") + (get-art-elem :override-doc + "Return the art element on the active root animation channel.") + (play-anim! :override-doc + "Return the resolution cutscene while the task awaits its reward speech. When commit? is + true, close the current task item before playback; other task states report an error and + fall back to the active art element.") + (should-display? :override-doc + "Select the first available task item and return whether it is waiting for reward speech.") + ) ) ;; - Unknowns @@ -35141,6 +47021,8 @@ :size-assert #xf0 :flag-assert #x18008000f0 (:methods + (relocate :override-doc + "Adjust the optional main-joint controller pointer, then relocate the drawable allocation.") (idle () _type_ :state) ;; 20 (startup () _type_ :state) ;; 21 (hidden () _type_ :state) ;; 22 @@ -35157,14 +47039,23 @@ :size-assert #xb4 :flag-assert #x15005000b4 (:methods + (relocate :override-doc + "Adjust the optional main-joint controller pointer, then relocate the drawable allocation.") (idle () _type_ :state) ;; 20 ) ) ;; - Functions -(define-extern logo-slave-init-by-other (function entity-actor skeleton-group none :behavior logo-slave)) -(define-extern logo-init-by-other (function entity-actor vector symbol none :behavior logo)) +(define-extern logo-slave-init-by-other + "Initialize a title-sequence drawable from the requested skeleton group, configure its shadow + and title effect, and attach optional joint control for the volume and blackout layers." + (function entity-actor skeleton-group none :behavior logo-slave)) +(define-extern logo-init-by-other + "Initialize a title-sequence controller at position. mode selects the ordinary logo sequence or + the NDI intro, including its skeleton, lighting, streamed animation commands, linked drawables, + and initial state." + (function entity-actor vector symbol none :behavior logo)) ;; - Unknowns @@ -35239,4 +47130,3 @@ (define-extern *cavegeyserrock-sg* skeleton-group) (define-extern cavecrystal-light-control-cavegeyserrock-callback (function (pointer process-drawable) int float object vector none)) - diff --git a/decompiler/config/jak1/jp/label_types.jsonc b/decompiler/config/jak1/jp/label_types.jsonc index 805dcc2441..157ab90946 100644 --- a/decompiler/config/jak1/jp/label_types.jsonc +++ b/decompiler/config/jak1/jp/label_types.jsonc @@ -151,7 +151,7 @@ "collide-probe": [ ["L100", "vector"], - ["L102", "vector"] + ["L102", "vu-function"] ], "collide-cache": [ diff --git a/decompiler/config/jak1/ntsc_v1/anonymous_function_types.jsonc b/decompiler/config/jak1/ntsc_v1/anonymous_function_types.jsonc index 1753ce992a..690459e8ef 100644 --- a/decompiler/config/jak1/ntsc_v1/anonymous_function_types.jsonc +++ b/decompiler/config/jak1/ntsc_v1/anonymous_function_types.jsonc @@ -342,8 +342,8 @@ [333, "(function task-control symbol :behavior process-taskable)"], [334, "(function task-control symbol :behavior process-taskable)"], [335, "(function task-control symbol :behavior process-taskable)"], - [336, "(function task-control task-control symbol)"], - [337, "(function task-control task-control symbol)"], + [336, "(function task-control symbol :behavior process-taskable)"], + [337, "(function task-control symbol :behavior process-taskable)"], [338, "(function task-control symbol :behavior process-taskable)"], [339, "(function task-control symbol :behavior process-taskable)"], [340, "(function task-control symbol :behavior process-taskable)"], @@ -368,10 +368,10 @@ [359, "(function task-control symbol :behavior process-taskable)"], [360, "(function task-control symbol :behavior process-taskable)"], [361, "(function task-control symbol :behavior process-taskable)"], - [362, "(function task-control task-control symbol)"], - [363, "(function task-control task-control symbol)"], - [364, "(function task-control task-control symbol)"], - [365, "(function task-control task-control symbol)"], + [362, "(function task-control symbol :behavior process-taskable)"], + [363, "(function task-control symbol :behavior process-taskable)"], + [364, "(function task-control symbol :behavior process-taskable)"], + [365, "(function task-control symbol :behavior process-taskable)"], [366, "(function task-control symbol :behavior process-taskable)"], [367, "(function task-control symbol :behavior process-taskable)"], [368, "(function task-control symbol :behavior process-taskable)"], @@ -420,8 +420,8 @@ [411, "(function task-control symbol :behavior process-taskable)"], [412, "(function task-control symbol :behavior process-taskable)"], [413, "(function task-control symbol :behavior process-taskable)"], - [414, "(function task-control task-control symbol)"], - [415, "(function task-control task-control symbol)"], + [414, "(function task-control symbol :behavior process-taskable)"], + [415, "(function task-control symbol :behavior process-taskable)"], [416, "(function task-control symbol :behavior process-taskable)"], [417, "(function task-control symbol :behavior process-taskable)"], [418, "(function task-control symbol :behavior process-taskable)"], @@ -431,40 +431,40 @@ [422, "(function task-control symbol :behavior process-taskable)"], [423, "(function task-control symbol :behavior process-taskable)"], [424, "(function task-control symbol :behavior process-taskable)"], - [425, "(function task-control task-control symbol)"], - [426, "(function task-control task-control symbol)"], + [425, "(function task-control symbol :behavior process-taskable)"], + [426, "(function task-control symbol :behavior process-taskable)"], [427, "(function task-control symbol :behavior process-taskable)"], [428, "(function task-control symbol :behavior process-taskable)"], [429, "(function task-control symbol :behavior process-taskable)"], [430, "(function task-control symbol :behavior process-taskable)"], [431, "(function task-control symbol :behavior process-taskable)"], - [432, "(function task-control task-control symbol)"], - [433, "(function task-control task-control symbol)"], - [434, "(function task-control task-control symbol)"], + [432, "(function task-control symbol :behavior process-taskable)"], + [433, "(function task-control symbol :behavior process-taskable)"], + [434, "(function task-control symbol :behavior process-taskable)"], [435, "(function task-control symbol :behavior process-taskable)"], - [436, "(function task-control task-control symbol)"], - [437, "(function task-control task-control symbol)"], - [438, "(function task-control task-control symbol)"], + [436, "(function task-control symbol :behavior process-taskable)"], + [437, "(function task-control symbol :behavior process-taskable)"], + [438, "(function task-control symbol :behavior process-taskable)"], [439, "(function task-control symbol :behavior process-taskable)"], [440, "(function task-control symbol :behavior process-taskable)"], [441, "(function task-control symbol :behavior process-taskable)"], [442, "(function task-control symbol :behavior process-taskable)"], - [443, "(function task-control task-control symbol)"], - [444, "(function task-control task-control symbol)"], + [443, "(function task-control symbol :behavior process-taskable)"], + [444, "(function task-control symbol :behavior process-taskable)"], [445, "(function task-control symbol :behavior process-taskable)"], - [446, "(function task-control task-control symbol)"], - [447, "(function task-control task-control symbol)"], - [448, "(function task-control task-control symbol)"], + [446, "(function task-control symbol :behavior process-taskable)"], + [447, "(function task-control symbol :behavior process-taskable)"], + [448, "(function task-control symbol :behavior process-taskable)"], [449, "(function task-control symbol :behavior process-taskable)"], [450, "(function task-control symbol :behavior process-taskable)"], [451, "(function task-control symbol :behavior process-taskable)"], [452, "(function task-control symbol :behavior process-taskable)"], - [453, "(function task-control task-control symbol)"], - [454, "(function task-control task-control symbol)"], + [453, "(function task-control symbol :behavior process-taskable)"], + [454, "(function task-control symbol :behavior process-taskable)"], [455, "(function task-control symbol :behavior process-taskable)"], - [456, "(function task-control task-control symbol)"], - [457, "(function task-control task-control symbol)"], - [458, "(function task-control task-control symbol)"], + [456, "(function task-control symbol :behavior process-taskable)"], + [457, "(function task-control symbol :behavior process-taskable)"], + [458, "(function task-control symbol :behavior process-taskable)"], [459, "(function task-control symbol :behavior process-taskable)"], [460, "(function task-control symbol :behavior process-taskable)"], [461, "(function task-control symbol :behavior process-taskable)"], @@ -480,10 +480,10 @@ [471, "(function task-control symbol :behavior process-taskable)"], [472, "(function task-control symbol :behavior process-taskable)"], [473, "(function task-control symbol :behavior process-taskable)"], - [474, "(function task-control task-control symbol)"], - [475, "(function task-control task-control symbol)"], - [476, "(function task-control task-control symbol)"], - [477, "(function task-control task-control symbol)"], + [474, "(function task-control symbol :behavior process-taskable)"], + [475, "(function task-control symbol :behavior process-taskable)"], + [476, "(function task-control symbol :behavior process-taskable)"], + [477, "(function task-control symbol :behavior process-taskable)"], [478, "(function task-control symbol :behavior process-taskable)"], [479, "(function task-control symbol :behavior process-taskable)"], [480, "(function task-control symbol :behavior process-taskable)"], @@ -694,7 +694,7 @@ ] ], - "projectiles": [[27, "(function projectile int)"]], + "projectiles": [[27, "(function process int)"]], "sidekick-human": [ [7, "(function sparticle-launch-control :behavior sequenceC)"], diff --git a/decompiler/config/jak1/ntsc_v1/hacks.jsonc b/decompiler/config/jak1/ntsc_v1/hacks.jsonc index 7717155354..35df7d3275 100644 --- a/decompiler/config/jak1/ntsc_v1/hacks.jsonc +++ b/decompiler/config/jak1/ntsc_v1/hacks.jsonc @@ -230,16 +230,11 @@ "(method 12 collide-mesh)", - // process-drawable BUG - "cspace-inspect-tree", //"(method 19 process-drawable)", // ambient "ambient-inspect", - // target2 BUG - "look-for-points-of-interest", // Failed to split nested sc - looks like dead code to me - // collide-cache "(method 10 collide-puss-work)", // CFG "(method 9 collide-puss-work)", // decompiler crash diff --git a/decompiler/config/jak1/ntsc_v1/label_types.jsonc b/decompiler/config/jak1/ntsc_v1/label_types.jsonc index 1da3f91c39..28ab87b736 100644 --- a/decompiler/config/jak1/ntsc_v1/label_types.jsonc +++ b/decompiler/config/jak1/ntsc_v1/label_types.jsonc @@ -1959,7 +1959,7 @@ "collide-probe": [ ["L100", "vector"], - ["L102", "vector"] + ["L102", "vu-function"] ], "collide-cache": [ diff --git a/decompiler/config/jak1/ntsc_v1/stack_structures.jsonc b/decompiler/config/jak1/ntsc_v1/stack_structures.jsonc index 61beb032b9..915d814e99 100644 --- a/decompiler/config/jak1/ntsc_v1/stack_structures.jsonc +++ b/decompiler/config/jak1/ntsc_v1/stack_structures.jsonc @@ -147,7 +147,7 @@ "screen-gradient": [[16, "draw-context"]], "(method 10 oscillating-vector)": [[16, "vector"]], "show-mc-info": [[16, "mc-slot-info"]], - "update-mood-erase-color2": [[16, "mood-fog"]], + "update-mood-erase-color2": [[16, "vector"]], "make-light-kit": [[16, "matrix"]], "matrix<-parented-transformq!": [[16, "vector"]], "(method 20 trsqv)": [[16, "vector"]], @@ -333,7 +333,7 @@ "(method 18 tracking-spline)": [ [16, "tracking-spline-sampler"], - [32, "tracking-spline-sampler"] + [32, "vector"] ], "draw-ocean-transition": [[16, "sphere"]], @@ -1545,7 +1545,7 @@ ], "cam-string-line-of-sight": [ - [16, "clip-travel-vector-to-mesh-return-info"], + [16, "collide-los-result"], [176, "vector"], [192, "vector"], [208, "vector"], @@ -3322,7 +3322,7 @@ "(trans launcher-active)": [[16, "event-message-block"]], - "(code touch-tracker-idle)": [[16, "touching-shapes-entry"]], + "(code touch-tracker-idle)": [[16, "overlaps-others-params"]], "(event manipy-idle)": [[16, "matrix"]], @@ -3702,7 +3702,9 @@ "(method 44 collide-shape)": [[16, "pull-rider-info"]], - "(method 12 collide-mesh)": [[16, "matrix"]], + "(method 12 collide-mesh)": [[16, "sopt-work"]], + + "(method 11 collide-mesh)": [[16, "spat-work"]], "target-attack-up": [ [16, "vector"], @@ -3919,7 +3921,7 @@ [48, "vector"] ], - "(method 10 collide-mesh)": [[16, "matrix"]], + "(method 10 collide-mesh)": [[16, "oot-work"]], "(method 22 collide-shape-prim-mesh)": [[16, "collide-tri-result"]], diff --git a/decompiler/config/jak1/ntsc_v1/type_casts.jsonc b/decompiler/config/jak1/ntsc_v1/type_casts.jsonc index 8e38cac8db..d57989c3c4 100644 --- a/decompiler/config/jak1/ntsc_v1/type_casts.jsonc +++ b/decompiler/config/jak1/ntsc_v1/type_casts.jsonc @@ -1926,7 +1926,8 @@ ], "build-continue-menu": [ [4, "v1", "symbol"], - [[5, 15], "v1", "level-load-info"] + [5, "v1", "level-load-info"], + [[7, 15], "v1", "continue-point"] ], "(method 26 basebutton)": [[31, "v1", "art-joint-anim"]], "debug-menu-item-var-make-float": [ @@ -2006,8 +2007,11 @@ ], "(method 11 beach-rock)": [[77, "v1", "int"]], "(anon-function 27 projectiles)": [ + [16, "s5", "process-drawable"], [27, "s4", "collide-shape"], - [36, "s4", "collide-shape"] + [36, "s4", "collide-shape"], + [53, "s5", "process-drawable"], + [57, "s5", "process-drawable"] ], "projectile-update-velocity-space-wars": [[60, "a0", "target"]], "projectile-init-by-other": [ @@ -2021,6 +2025,7 @@ ], "(method 28 projectile-yellow)": [ [26, "a0", "target"], + [88, "a0", "collide-shape"], [118, "a1", "target"] ], "(method 27 projectile-blue)": [ @@ -4182,12 +4187,16 @@ "(method 54 collide-shape)": [[[18, 33], "v1", "collide-shape-prim-group"]], "(method 45 collide-shape)": [ [18, "v1", "connection"], + [79, "v1", "int"], [[19, 146], "s3", "collide-shape-moving"], [146, "v1", "connection"], + [207, "v1", "int"], [[147, 272], "s3", "collide-shape-moving"], [272, "v1", "connection"], + [333, "v1", "int"], [[273, 398], "s3", "collide-shape-moving"], [398, "v1", "connection"], + [459, "v1", "int"], [[399, 497], "s3", "collide-shape-moving"] ], "(method 55 collide-shape)": [ @@ -4497,8 +4506,8 @@ [16, "gp", "process-drawable"] ], "next-level": [ - [7, "a1", "level-load-info"], - [10, "a1", "level-load-info"] + [6, "a1", "symbol"], + [[7, 14], "a1", "level-load-info"] ], "target-generic-event-handler": [ [10, "v1", "float"], @@ -5218,9 +5227,7 @@ ], "(method 23 joint-exploder)": [ [[12, 102], "s3", "joint-exploder-joint"], - [[144, 146], "v1", "joint-exploder-list"], - [148, "v1", "matrix"], - [152, "v1", "matrix"] + [[144, 146], "v1", "joint-exploder-list"] ], "(method 20 joint-exploder)": [ [[8, 10], "a3", "joint-exploder-joint"], @@ -5619,17 +5626,17 @@ [[319, 324], "v1", "dma-packet"], [[356, 362], "a0", "dma-packet"], [[365, 371], "a0", "gs-gif-tag"], - [376, "a0", "(pointer gs-reg64)"], + [376, "a0", "(pointer gs-alpha)"], [378, "a0", "(pointer gs-reg64)"], [[382, 387], "v1", "dma-packet"], [[415, 421], "a0", "dma-packet"], [[424, 430], "a0", "gs-gif-tag"], - [435, "a0", "(pointer gs-reg64)"], + [435, "a0", "(pointer gs-alpha)"], [437, "a0", "(pointer gs-reg64)"], [[441, 446], "v1", "dma-packet"], [[474, 480], "a0", "dma-packet"], [[483, 489], "a0", "gs-gif-tag"], - [494, "a0", "(pointer gs-reg64)"], + [494, "a0", "(pointer gs-alpha)"], [496, "a0", "(pointer gs-reg64)"], [[500, 505], "v1", "dma-packet"] ], @@ -6159,11 +6166,19 @@ [124, "v1", "terrain-context"] ], "target-collision-reaction": [ - ["_stack_", 96, "cshape-moving-flags"], + ["_stack_", 96, "collide-status"], ["_stack_", 104, "cshape-reaction-flags"] ], + "cspace-inspect-tree": [ + [[27, 105], "s2", "cspace"], + [[106, 138], "s2", "pair"] + ], "target-collision-low-coverage": [ ["_stack_", 32, "cshape-reaction-flags"], - ["_stack_", 40, "cshape-moving-flags"] + ["_stack_", 40, "collide-status"] + ], + "poly-find-nearest-edge": [ + [72, "v1", "vector"], + [81, "v1", "vector"] ] } diff --git a/decompiler/config/jak1/ntsc_v1/var_names.jsonc b/decompiler/config/jak1/ntsc_v1/var_names.jsonc index 33dedb0f1f..527312ee9d 100644 --- a/decompiler/config/jak1/ntsc_v1/var_names.jsonc +++ b/decompiler/config/jak1/ntsc_v1/var_names.jsonc @@ -1,7 +1,232 @@ { - "identity": { + "dma-sync-fast": { + "args": ["bank"] + }, + "dma-send-no-scratch": { + "args": ["bank", "memory-address", "quadword-count"] + }, + "dma-sync-with-count": { + "args": ["bank", "poll-count"] + }, + "dma-count-until-done": { + "args": ["bank", "poll-count"] + }, + "dma-sync-hang": { + "args": ["bank"] + }, + "dma-sync-crash": { + "args": ["bank"], + "vars": { + "v1-0": "polls-remaining" + } + }, + "dma-send": { + "args": ["bank", "memory-address", "quadword-count"] + }, + "dma-send-chain": { + "args": ["bank", "tag-address"] + }, + "dma-send-chain-no-tte": { + "args": ["bank", "tag-address"] + }, + "dma-send-chain-no-flush": { + "args": ["bank", "tag-address"] + }, + "dma-send-to-spr": { + "args": ["scratchpad-address", "memory-address", "quadword-count", "wait-for-completion?"], + "vars": { + "s5-0": "bank" + } + }, + "dma-send-to-spr-no-flush": { + "args": ["scratchpad-address", "memory-address", "quadword-count", "wait-for-completion?"], + "vars": { + "s5-0": "bank" + } + }, + "dma-send-from-spr": { + "args": ["memory-address", "scratchpad-address", "quadword-count", "wait-for-completion?"], + "vars": { + "s5-0": "bank" + } + }, + "dma-send-from-spr-no-flush": { + "args": ["memory-address", "scratchpad-address", "quadword-count", "wait-for-completion?"], + "vars": { + "s5-0": "bank" + } + }, + "clear-vu0-mem": { + "vars": { + "v1-0": "memory", + "a0-0": "i" + } + }, + "clear-vu1-mem": { + "vars": { + "v1-0": "memory", + "a0-0": "i" + } + }, + "dump-vu1-mem": { + "vars": { + "gp-0": "memory", + "s5-0": "i" + } + }, + "dump-vu1-range": { + "args": ["start-quadword", "quadword-count"], + "vars": { + "s4-0": "memory", + "s3-0": "i", + "s2-0": "quadword-index" + } + }, + "ultimate-memcpy": { + "args": ["dst", "src", "byte-count"], + "vars": { + "s2-0": "quadwords-remaining", + "s1-0": "transfer-quadwords", + "s4-0": "spr-to-bank", + "s3-0": "spr-from-bank" + } + }, + "symlink2": { + "args": ["object-data", "link-object", "relocation-table"] + }, + "symlink3": { + "args": ["object-data", "link-object", "relocation-table"] + }, + "(method 0 dma-buffer)": { + "args": ["allocation", "type-to-make", "byte-capacity"], + "vars": { + "v0-0": "buffer" + } + }, + "(method 4 dma-buffer)": { "args": ["this"] }, + "(method 5 dma-buffer)": { + "args": ["this"] + }, + "dma-buffer-inplace-new": { + "args": ["buffer", "byte-capacity"] + }, + "dma-buffer-length": { + "args": ["buffer"] + }, + "dma-buffer-free": { + "args": ["buffer"] + }, + "dma-buffer-add-vu-function": { + "args": ["buffer", "vu-program", "flush-path-3"], + "vars": { + "t1-1": "buffer-2", + "v1-0": "function-data", + "a3-0": "quadwords-remaining", + "a1-1": "instruction-origin", + "t0-1": "transfer-quadwords", + "t2-0": ["packet", "dma-packet"] + } + }, + "dma-buffer-send": { + "args": ["bank", "buffer"] + }, + "dma-buffer-send-chain": { + "args": ["bank", "buffer"] + }, + "kernel-copy-function": { + "args": ["unused", "source", "dest", "word-count"] + }, + "kernel-copy-to-kernel-ram": { + "args": ["unused", "source", "dest", "word-count"] + }, + "kernel-write-function": { + "args": ["unused", "dest", "value"] + }, + "kernel-write": { + "args": ["unused", "dest", "value"] + }, + "kernel-read-function": { + "args": ["unused", "source"] + }, + "kernel-read": { + "args": ["unused", "source"] + }, + "install-default-debug-handler": { + "args": ["handler"] + }, + "return-from-exception": { + "args": ["regs"] + }, + "kernel-set-exception-vector": { + "args": ["exception", "handler"] + }, + "kernel-set-interrupt-vector": { + "args": ["interrupt", "handler"] + }, + "kernel-set-level2-vector": { + "args": ["vector-number", "handler"] + }, + "deinstall-debug-handler": { + "args": ["exception"] + }, + "resend-exception": { + "args": ["status", "cause", "epc", "bad-vaddr", "bad-paddr", "regs"] + }, + "(method 4 string)": { + "vars": { + "v1-0": "cursor" + } + }, + "copy-string<-string": { + "args": ["dst", "src"], + "vars": { + "v1-0": "dst-ptr", + "a1-1": "src-ptr" + } + }, + "(method 0 string)": { + "args": ["allocation", "type-to-make", "size", "other"], + "vars": { + "s2-1": "desired-size", + "a0-4": "new-string", + "v0-2": "new-string" + } + }, + "name=": { + "args": ["left", "right"] + }, + "clear": { + "args": ["str"] + }, + "string-skip-to-char": { + "args": ["cursor", "char"] + }, + "string-skip-whitespace": { + "args": ["cursor"] + }, + "string-strip-leading-whitespace!": { + "args": ["str"], + "vars": { + "a1-0": "content-start" + } + }, + "string-strip-whitespace!": { + "args": ["str"] + }, + "string->float": { + "args": ["str"] + }, + "string-get-int32!!": { + "args": ["result", "args"] + }, + "string-get-float!!": { + "args": ["result", "args"] + }, + "identity": { + "args": ["value"] + }, "1/": { "args": ["x"] }, @@ -27,7 +252,7 @@ "args": ["x", "y"] }, "abs": { - "args": ["x"] + "args": ["value"] }, "min": { "args": ["x", "y"] @@ -48,7 +273,7 @@ "args": ["x", "y"] }, "lognot": { - "args": ["x"] + "args": ["value"] }, "basic-type?": { "args": ["this", "parent-type"], @@ -72,7 +297,7 @@ } }, "ref": { - "args": ["lst", "index"], + "args": ["list", "index"], "vars": { "v1-0": "count" } @@ -84,28 +309,28 @@ } }, "last": { - "args": ["lst"], + "args": ["list"], "vars": { "v0-0": "iter" } }, "member": { - "args": ["this", "lst"], + "args": ["item", "list"], "vars": { "v1-0": "iter" } }, "nmember": { - "args": ["this", "lst"] + "args": ["item", "list"] }, "assoc": { - "args": ["item", "alist"], + "args": ["key", "alist"], "vars": { "v1-0": "iter" } }, "assoce": { - "args": ["item", "alist"], + "args": ["key", "alist"], "vars": { "v1-0": "iter" } @@ -129,27 +354,27 @@ } }, "delete!": { - "args": ["item", "lst"], + "args": ["item", "list"], "vars": { "a2-0": "iter", "v1-1": "iter-prev" } }, "delete-car!": { - "args": ["item", "lst"], + "args": ["item", "list"], "vars": { "a2-0": "iter", "v1-2": "iter-prev" } }, "insert-cons!": { - "args": ["kv", "alist"], + "args": ["entry", "alist"], "vars": { "a3-0": "updated-list" } }, "sort": { - "args": ["lst", "compare-func"], + "args": ["list", "compare-func"], "vars": { "s4-0": "unsorted-count", "s3-0": "iter", @@ -159,36 +384,60 @@ } }, "(method 0 inline-array-class)": { - "args": ["allocation", "type-to-make", "size"], + "args": ["allocation", "type-to-make", "count"], "vars": { "v0-0": "this" } }, "(method 0 array)": { - "args": ["allocation", "type-to-make", "content-type", "len"], + "args": ["allocation", "type-to-make", "content-type", "count"], "vars": { "v0-1": "this" } }, "(method 2 array)": { "vars": { - "v1-1": "content-type-sym" + "v1-1": "content-type-sym", + "s5-0": "i", + "s5-1": "i", + "s5-2": "i", + "s5-3": "i", + "s5-4": "i", + "s5-5": "i", + "s5-6": "i", + "s5-7": "i", + "s5-8": "i", + "s5-9": "i", + "s5-10": "i", + "s5-11": "i" } }, "(method 3 array)": { "vars": { - "v1-1": "content-type-sym" + "v1-1": "content-type-sym", + "s5-0": "i", + "s5-1": "i", + "s5-2": "i", + "s5-3": "i", + "s5-4": "i", + "s5-5": "i", + "s5-6": "i", + "s5-7": "i", + "s5-8": "i", + "s5-9": "i", + "s5-10": "i", + "s5-11": "i" } }, "mem-copy!": { - "args": ["dst", "src", "size"], + "args": ["dst", "src", "byte-count"], "vars": { "v0-0": "result", "v1-0": "i" } }, "qmem-copy<-!": { - "args": ["dst", "src", "size"], + "args": ["dst", "src", "byte-count"], "vars": { "v0-0": "result", "v1-1": "qwc", @@ -196,7 +445,7 @@ } }, "qmem-copy->!": { - "args": ["dst", "src", "size"], + "args": ["dst", "src", "byte-count"], "vars": { "v0-0": "result", "v1-1": "qwc", @@ -206,14 +455,14 @@ } }, "mem-set32!": { - "args": ["dst", "size", "value"], + "args": ["dst", "word-count", "value"], "vars": { "v0-0": "result", "v1-0": "i" } }, "mem-or!": { - "args": ["dst", "src", "size"], + "args": ["dst", "src", "byte-count"], "vars": { "v0-0": "result", "v1-0": "i" @@ -222,6 +471,18 @@ "fact": { "args": ["x"] }, + "print": { + "args": ["object"] + }, + "printl": { + "args": ["object"], + "vars": { + "a0-1": "value" + } + }, + "inspect": { + "args": ["object"] + }, "mem-print": { "args": ["data", "word-count"], "vars": { @@ -234,6 +495,9 @@ "s4-0": "i" } }, + "breakpoint-range-set!": { + "args": ["debug-control", "break-address", "address-mask"] + }, "valid?": { "args": ["this", "expected-type", "name", "allow-false", "print-dest"], "vars": { @@ -261,14 +525,26 @@ "seek": { "args": ["x", "target", "diff"], "vars": { - "f2-0": "err" + "f2-0": "delta" } }, + "truncate": { + "args": ["x"] + }, + "integral?": { + "args": ["x"] + }, + "fractional-part": { + "args": ["x"] + }, + "log2": { + "args": ["x"] + }, "lerp": { "args": ["minimum", "maximum", "amount"] }, "lerp-scale": { - "args": ["min-out", "max-out", "in", "min-in", "max-in"], + "args": ["min-out", "max-out", "input", "min-in", "max-in"], "vars": { "f0-1": "scale" } @@ -276,23 +552,120 @@ "lerp-clamp": { "args": ["minimum", "maximum", "amount"] }, + "seekl": { + "args": ["x", "target", "diff"], + "vars": { + "v1-0": "delta", + "a3-0": "distance" + } + }, + "rand-vu-init": { + "args": ["seed"] + }, + "rand-vu-float-range": { + "args": ["minimum", "maximum"] + }, + "rand-vu-percent?": { + "args": ["probability"] + }, "rand-vu-int-range": { "args": ["first", "second"], "vars": { "f0-4": "float-in-range" } }, + "rand-vu-int-count": { + "args": ["maximum"] + }, + "rand-uint31-gen": { + "args": ["generator"] + }, "(method 0 bit-array)": { "args": ["allocation", "type-to-make", "length"], "vars": { "v0-0": "this" } }, + "(method 9 bit-array)": { + "args": ["this", "i"], + "vars": { + "v1-2": "byte" + } + }, + "(method 10 bit-array)": { + "args": ["this", "i"] + }, + "(method 11 bit-array)": { + "args": ["this", "i"] + }, "(method 12 bit-array)": { "vars": { - "v1-2": "idx" + "v1-2": "i" } }, + "vector-dot": { + "args": ["a", "b"] + }, + "vector-dot-vu": { + "args": ["a", "b"], + "vars": { + "v0-0": "result" + } + }, + "vector4-dot": { + "args": ["a", "b"] + }, + "vector4-dot-vu": { + "args": ["a", "b"], + "vars": { + "v0-0": "result" + } + }, + "vector+!": { + "args": ["dst", "a", "b"] + }, + "vector-!": { + "args": ["dst", "a", "b"] + }, + "vector-zero!": { + "args": ["dst"] + }, + "vector-reset!": { + "args": ["dst"] + }, + "vector-copy!": { + "args": ["dst", "src"] + }, + "matrix-copy!": { + "args": ["dst", "src"], + "vars": { + "v1-0": "row0", + "a2-0": "row1", + "a3-0": "row2", + "a1-1": "row3" + } + }, + "(method 9 bounding-box)": { + "args": ["this", "spheres", "count"] + }, + "(method 10 bounding-box)": { + "args": ["this", "point"] + }, + "(method 11 bounding-box)": { + "args": ["this", "point", "offset"] + }, + "(method 12 bounding-box)": { + "args": ["this", "point", "offset", "padding"] + }, + "(method 13 bounding-box)": { + "args": ["this", "source-sphere"] + }, + "(method 14 bounding-box)": { + "args": ["this", "spheres", "count"] + }, + "(method 15 bounding-box)": { + "args": ["this", "other-box"] + }, "box-vector-enside?": { "args": ["box", "pt"] }, @@ -419,7 +792,10 @@ "vars": { "s4-0": "arg-word-start", "s4-1": "arg-end", - "v1-3": "arg-start" + "v1-3": "arg-start", + "a1-3": "next-arg", + "v1-11": "arg-start", + "a1-9": "next-arg" } }, "string->int": { @@ -457,8 +833,8 @@ "v1-2": "child" } }, - "matrix-identity": { - "args": ["mat"], + "matrix-identity!": { + "args": ["dst"], "vars": { "f0-0": "one" } @@ -530,21 +906,21 @@ "args": ["dst", "scale", "src"] }, "matrix-rotate-x!": { - "args": ["dst", "rot-deg"], + "args": ["dst", "angle"], "vars": { "f30-0": "rot-sin", "f0-0": "rot-cos" } }, "matrix-rotate-y!": { - "args": ["dst", "rot-deg"], + "args": ["dst", "angle"], "vars": { "f30-0": "rot-sin", "f0-0": "rot-cos" } }, "matrix-rotate-z!": { - "args": ["dst", "rot-deg"], + "args": ["dst", "angle"], "vars": { "f30-0": "rot-sin", "f0-0": "rot-cos" @@ -602,6 +978,12 @@ "matrix-rotate-yx!": { "args": ["dst", "rot-y-deg", "rot-x-deg"] }, + "matrix-axis-sin-cos-vu!": { + "args": ["dst", "axis", "sin-angle", "cos-angle"] + }, + "matrix-axis-sin-cos!": { + "args": ["dst", "axis", "sin-angle", "cos-angle"] + }, "matrix-axis-angle!": { "args": ["dst", "axis", "angle-deg"] }, @@ -611,6 +993,9 @@ "matrix-3x3-determinant": { "args": ["mat"] }, + "matrix3-determinant": { + "args": ["mat"] + }, "matrix-3x3-inverse!": { "args": ["dst", "src"] }, @@ -621,7 +1006,7 @@ "args": ["dst", "src"] }, "matrix-4x4-determinant": { - "args": ["dst", "src"] + "args": ["mat"] }, "matrix-4x4-inverse-transpose!": { "args": ["dst", "src"] @@ -638,19 +1023,336 @@ } }, "transform-matrix-calc!": { - "args": ["tf", "dst-mat"] + "args": ["tf", "dst-mat"], + "vars": { + "s4-0": "step-mat", + "s3-0": "accum-mat" + } }, "transform-matrix-parent-calc!": { - "args": ["tf", "dst-mat", "inv-scale"] + "args": ["tf", "dst-mat", "inv-scale"], + "vars": { + "s4-0": "step-mat", + "s3-0": "accum-mat" + } }, "trs-matrix-calc!": { "args": ["tf", "dst-mat"] }, "quaternion-axis-angle!": { - "args": ["quat", "x", "y", "z", "angle"] + "args": ["dst", "x", "y", "z", "angle"], + "vars": { + "f28-0": "half-angle", + "f30-0": "sin-half-angle", + "f0-1": "cos-half-angle" + } }, "quaternion-vector-angle!": { - "args": ["quat", "axis", "angle"] + "args": ["dst", "axis", "angle"], + "vars": { + "f28-0": "half-angle", + "f30-0": "sin-half-angle", + "f0-1": "cos-half-angle" + } + }, + "vector-angle<-quaternion!": { + "args": ["dst", "src"], + "vars": { + "f30-0": "inverse-axis-length", + "f0-3": "angle-rad" + } + }, + "quaternion-zero!": { + "args": ["dst"] + }, + "quaternion-identity!": { + "args": ["dst"] + }, + "quaternion-i!": { + "args": ["dst"] + }, + "quaternion-j!": { + "args": ["dst"] + }, + "quaternion-k!": { + "args": ["dst"] + }, + "quaternion-copy!": { + "args": ["dst", "src"] + }, + "quaternion-set!": { + "args": ["dst", "x", "y", "z", "w"] + }, + "quaternion+!": { + "args": ["dst", "a", "b"] + }, + "quaternion-!": { + "args": ["dst", "a", "b"] + }, + "quaternion-negate!": { + "args": ["dst", "src"] + }, + "quaternion-conjugate!": { + "args": ["dst", "src"] + }, + "quaternion-float*!": { + "args": ["dst", "src", "scalar"] + }, + "quaternion-float/!": { + "args": ["dst", "src", "divisor"] + }, + "quaternion-norm2": { + "args": ["q"] + }, + "quaternion-norm": { + "args": ["q"] + }, + "quaternion-normalize!": { + "args": ["q"] + }, + "quaternion-inverse!": { + "args": ["dst", "src"] + }, + "quaternion-dot": { + "args": ["a", "b"] + }, + "quaternion*!": { + "args": ["dst", "a", "b"] + }, + "quaternion-right-mult-matrix!": { + "args": ["dst-mat", "q"] + }, + "quaternion-left-mult-matrix!": { + "args": ["dst-mat", "q"] + }, + "quaternion->matrix": { + "args": ["dst-mat", "q"] + }, + "matrix->quaternion": { + "args": ["dst", "src-mat"], + "vars": { + "f0-2": "trace", + "a2-0": "largest-axis", + "a3-0": "next-axis", + "v1-1": "previous-axis", + "f0-12": "diagonal-root" + } + }, + "matrix-with-scale->quaternion": { + "args": ["dst", "src-mat"], + "vars": { + "v1-0": "rotation-mat", + "f0-2": "row0-norm2", + "f1-3": "row1-norm2", + "f2-4": "row2-norm2", + "f0-4": "inverse-row0-length", + "f1-5": "inverse-row1-length", + "f2-6": "inverse-row2-length" + } + }, + "quaternion-vector-len": { + "args": ["q"] + }, + "quaternion-log!": { + "args": ["dst", "src"], + "vars": { + "f30-0": "imaginary-length", + "f0-9": "angle-scale" + } + }, + "quaternion-exp!": { + "args": ["dst", "src"], + "vars": { + "f30-0": "imaginary-length", + "s5-0": "sincos", + "f0-6": "sin-over-length" + } + }, + "quaternion-slerp!": { + "args": ["dst", "a", "b", "alpha"], + "vars": { + "f0-0": "cos-angle", + "f30-0": "hemisphere-sign", + "v1-2": "a-weight", + "v1-3": "b-weight", + "f1-6": "sin-angle", + "f0-6": "atan-argument", + "f28-0": "inverse-sin-angle", + "f0-7": "angle-rad", + "s2-0": "blend-angles" + } + }, + "quaternion-pseudo-slerp!": { + "args": ["dst", "a", "b", "alpha"], + "vars": { + "f1-0": "cos-angle", + "f0-0": "hemisphere-sign", + "v1-2": "a-weight", + "v1-3": "b-weight" + } + }, + "quaternion-zxy!": { + "args": ["dst", "angles"], + "vars": { + "s4-0": "half-angles-rad", + "gp-0": "sin-angles", + "s5-0": "cos-angles" + } + }, + "vector-x-quaternion!": { + "args": ["dst", "q"], + "vars": { + "s5-0": "rotation-mat" + } + }, + "vector-y-quaternion!": { + "args": ["dst", "q"], + "vars": { + "s5-0": "rotation-mat" + } + }, + "vector-z-quaternion!": { + "args": ["dst", "q"], + "vars": { + "s5-0": "rotation-mat" + } + }, + "quaternion-y-angle": { + "args": ["q"], + "vars": { + "v1-1": "forward" + } + }, + "quaternion-vector-y-angle": { + "args": ["q", "direction"], + "vars": { + "f30-0": "facing-angle", + "f0-2": "target-angle" + } + }, + "quaternion-rotate-local-x!": { + "args": ["dst", "src", "angle"], + "vars": { + "a2-1": "increment" + } + }, + "quaternion-rotate-local-y!": { + "args": ["dst", "src", "angle"], + "vars": { + "a2-1": "increment" + } + }, + "quaternion-rotate-local-z!": { + "args": ["dst", "src", "angle"], + "vars": { + "a2-1": "increment" + } + }, + "quaternion-rotate-y!": { + "args": ["dst", "src", "angle"], + "vars": { + "a1-2": "increment" + } + }, + "quaternion-rotate-x!": { + "args": ["dst", "src", "angle"], + "vars": { + "a1-3": "increment" + } + }, + "quaternion-rotate-z!": { + "args": ["dst", "src", "angle"], + "vars": { + "a1-3": "increment" + } + }, + "quaternion-delta-y": { + "args": ["a", "b"] + }, + "quaternion-rotate-y-to-vector!": { + "args": ["dst", "src", "direction", "max-angle"], + "vars": { + "s5-0": "delta", + "t9-0": "normalize-xz-fn", + "a0-1": "flat-direction", + "s0-0": "target-direction" + } + }, + "vector-rotate-y!": { + "args": ["dst", "src", "angle"], + "vars": { + "a1-2": "rotation", + "s4-0": "rotation-mat" + } + }, + "vector-y-angle": { + "args": ["vec"] + }, + "vector-x-angle": { + "args": ["vec"] + }, + "quaterion<-rotate-y-vector": { + "args": ["dst", "direction"] + }, + "quaternion-validate": { + "args": ["q"], + "vars": { + "f0-0": "magnitude" + } + }, + "quaternion-xz-angle": { + "args": ["q"], + "vars": { + "gp-0": "rotation-mat", + "s5-0": "forward" + } + }, + "set-eul!": { + "args": ["dst", "angle0", "angle1", "angle2", "order"] + }, + "eul->matrix": { + "args": ["dst-mat", "src"], + "vars": { + "s5-0": "working-angles", + "f0-2": "angle-swap", + "f26-0": "cos0", + "f30-0": "cos1", + "f22-0": "cos2", + "f24-0": "sin0", + "f28-0": "sin1", + "f4-0": "sin2", + "f0-17": "cos0-cos2", + "f1-1": "cos0-sin2", + "f2-0": "sin0-cos2", + "f3-0": "sin0-sin2", + "v1-12": "parity", + "a1-2": "axis0", + "a0-21": "axis1", + "v1-17": "axis2" + } + }, + "matrix->eul": { + "args": ["dst", "src-mat", "order"], + "vars": { + "v1-4": "parity", + "s3-0": "axis0", + "s2-0": "axis1", + "s1-0": "axis2", + "f30-0": "middle-sine-magnitude", + "f30-1": "middle-cosine-magnitude" + } + }, + "eul->quat": { + "args": ["dst", "src"], + "vars": { + "s5-0": "rotation-mat" + } + }, + "quat->eul": { + "args": ["dst", "src", "order"], + "vars": { + "s5-0": "rotation-mat" + } }, "vector-flatten!": { "args": ["dst", "src", "plane-normal"] @@ -667,6 +1369,135 @@ "vector-reflect-flat-above!": { "args": ["dst", "src", "plane-normal"] }, + "vector-segment-distance-point!": { + "args": ["point", "segment-start", "segment-end", "closest-point"] + }, + "vector-line-distance": { + "args": ["point", "line-point", "line-point-2"], + "vars": { + "a1-3": "line-direction", + "gp-1": "point-offset", + "f0-1": "distance-along-line", + "v1-3": "projected-offset" + } + }, + "vector-line-distance-point!": { + "args": ["point", "line-point", "line-point-2", "closest-point"], + "vars": { + "a1-3": "line-direction", + "s4-1": "point-offset", + "f0-1": "distance-along-line", + "v1-4": "projected-offset" + } + }, + "vector-orient-by-quat!": { + "args": ["dst", "src", "rotation"] + }, + "forward-down->inv-matrix": { + "args": ["dst", "forward", "down"] + }, + "forward-down-nopitch->inv-matrix": { + "args": ["dst", "forward", "down"] + }, + "forward-up-nopitch->inv-matrix": { + "args": ["dst", "forward", "up"] + }, + "forward-up-nopitch->quaternion": { + "args": ["dst", "forward", "up"] + }, + "forward-up->quaternion": { + "args": ["dst", "forward", "up"] + }, + "quaternion-from-two-vectors!": { + "args": ["dst", "from", "to"] + }, + "quaternion-from-two-vectors-max-angle!": { + "args": ["dst", "from", "to", "max-angle"] + }, + "matrix-from-two-vectors!": { + "args": ["dst", "from", "to"] + }, + "matrix-from-two-vectors-max-angle!": { + "args": ["dst", "from", "to", "max-angle"] + }, + "matrix-from-two-vectors-max-angle-partial!": { + "args": ["dst", "from", "to", "max-angle", "fraction"] + }, + "matrix-from-two-vectors-partial-linear!": { + "args": ["dst", "from", "to", "fraction"] + }, + "matrix-remove-z-rot": { + "args": ["rotation", "reference"] + }, + "matrix-rot-diff!": { + "args": ["axis", "from", "to"] + }, + "quaternion-seek": { + "args": ["value", "from", "to", "unused-rate", "max-angle"] + }, + "vector-deg-seek": { + "args": ["dst", "from", "to", "max-angle"] + }, + "vector-deg-slerp": { + "args": ["dst", "from", "to", "t"] + }, + "vector-vector-deg-slerp!": { + "args": ["dst", "from", "to", "t", "up"] + }, + "normal-of-plane": { + "args": ["dst", "point-a", "point-b", "point-c"] + }, + "vector-3pt-cross!": { + "args": ["dst", "origin", "point-a", "point-b"] + }, + "closest-pt-in-triangle": { + "args": ["dst", "point", "triangle", "normal"] + }, + "point-in-triangle-cross": { + "args": ["point", "normal", "vertex-a", "vertex-b", "vertex-c"] + }, + "point-in-plane-<-point+normal!": { + "args": ["dst", "point", "normal"] + }, + "circle-circle-xz-intersect": { + "args": ["circle-a", "circle-b", "intersection-a", "intersection-b"] + }, + "vector-circle-tangent-new": { + "args": ["point-a", "point-b", "tangent-a", "tangent-b"] + }, + "vector-circle-tangent": { + "args": ["point", "circle", "tangent-a", "tangent-b"] + }, + "find-knot-span": { + "args": ["first-span", "last-span", "value", "knots"] + }, + "calculate-basis-functions-vector!": { + "args": ["dst", "span", "value", "knots"] + }, + "curve-get-pos!": { + "args": ["dst", "input", "curve-data"] + }, + "curve-length": { + "args": ["curve-data"] + }, + "curve-copy!": { + "args": ["dst", "src"] + }, + "curve-closest-point": { + "args": ["curve-data", "point", "initial-input", "search-distance", "iterations", "input-padding"] + }, + "vector-plane-distance": { + "args": ["point", "plane-data", "normal"] + }, + "radmod": { + "args": ["angle"] + }, + "deg-": { + "args": ["angle", "reference"] + }, + "deg-diff": { + "args": ["from", "to"] + }, "deg-seek": { "args": ["in", "target", "max-diff"], "vars": { @@ -686,6 +1517,90 @@ "deg-lerp-clamp": { "args": ["min-val", "max-val", "in"] }, + "sin": { + "args": ["angle"] + }, + "sin-rad": { + "args": ["angle"], + "vars": { + "f12-0": "result" + } + }, + "vector-sin-rad!": { + "args": ["dst", "src"] + }, + "cos-rad": { + "args": ["angle"], + "vars": { + "f12-0": "result" + } + }, + "vector-cos-rad!": { + "args": ["dst", "src"] + }, + "vector-sincos-rad!": { + "args": ["dst-sin", "dst-cos", "src"] + }, + "sincos-rad!": { + "args": ["out", "angle"] + }, + "sincos!": { + "args": ["out", "angle"] + }, + "vector-rad<-vector-deg!": { + "args": ["out", "in"] + }, + "vector-rad<-vector-deg/2!": { + "args": ["out", "in"] + }, + "vector-sincos!": { + "args": ["out-sin", "out-cos", "in"] + }, + "tan-rad": { + "args": ["angle"] + }, + "cos": { + "args": ["angle"] + }, + "tan": { + "args": ["angle"] + }, + "atan0": { + "args": ["y", "x"] + }, + "atan-series-rad": { + "args": ["reduced"], + "vars": { + "f18-1": "result" + } + }, + "atan-rad": { + "args": ["value"] + }, + "sign": { + "args": ["value"] + }, + "atan2-rad": { + "args": ["y", "x"] + }, + "exp": { + "args": ["value"] + }, + "atan": { + "args": ["y", "x"] + }, + "asin": { + "args": ["value"] + }, + "acos": { + "args": ["value"] + }, + "acos-rad": { + "args": ["value"] + }, + "sinerp": { + "args": ["minimum", "maximum", "amount"] + }, "sinerp-clamp": { "args": ["minimum", "maximum", "amount"] }, @@ -704,154 +1619,205 @@ "ease-in-out": { "args": ["total", "progress"] }, - "dma-send-to-spr": { - "args": ["sadr", "madr", "qwc", "sync"] + "timer-init": { + "args": ["timer", "mode"] }, - "dma-send-to-spr-no-flush": { - "args": ["sadr", "madr", "qwc", "sync"] + "timer-reset": { + "args": ["timer"] }, - "dma-send-from-spr": { - "args": ["madr", "sadr", "qwc", "sync"] + "timer-count": { + "args": ["timer"] }, - "dma-send-from-spr-no-flush": { - "args": ["madr", "sadr", "qwc", "sync"] + "stopwatch-init": { + "args": ["watch"] }, - "dump-vu1-range": { - "args": ["start", "total-count"] + "stopwatch-reset": { + "args": ["watch"] }, - "ultimate-memcpy": { - "args": ["dst", "src", "size-bytes"], - "vars": { - "s2-0": "qwc-remaining", - "s1-0": "qwc-transferred-now", - "s4-0": "spr-to-bank", - "s3-0": "spr-from-bank" - } + "stopwatch-start": { + "args": ["watch"] }, - "dma-buffer-add-vu-function": { - "args": ["dma-buf", "vu-func"], - "vars": { - "t1-1": "dma-buf-2", - "v1-0": "func-ptr", - "a3-0": "qlen", - "a1-1": "origin", - "t0-1": "qwc-now", - "t2-0": ["buf-ptr", "dma-packet"] - } + "stopwatch-stop": { + "args": ["watch"] + }, + "stopwatch-begin": { + "args": ["watch"] + }, + "stopwatch-end": { + "args": ["watch"] + }, + "stopwatch-elapsed-ticks": { + "args": ["watch"] + }, + "stopwatch-elapsed-seconds": { + "args": ["watch"] }, "dma-buffer-add-buckets": { - "args": ["dma-buf", "count"], + "args": ["buffer", "count"], "vars": { + "v0-0": "first-bucket", "a2-0": "i", - "v1-0": ["current-bucket", "dma-bucket"] + "v1-0": ["bucket", "dma-bucket"] } }, "dma-buffer-patch-buckets": { - "args": ["bucket", "count"], + "args": ["buckets", "count"], "vars": { "v1-1": "i" } }, "dma-bucket-insert-tag": { - "args": ["base", "idx", "tag-start", "tag-end"], + "args": ["buckets", "bucket-index", "tag-start", "tag-end"], "vars": { "v1-1": "bucket" } }, "disasm-vif-details": { - "args": ["stream", "data", "kind", "count"], + "args": ["stream", "packet", "command", "element-count"], "vars": { - "s4-0": "count2", - "s3-0": "data-ptr", - "s2-0": "i" + "s4-0": "element-count-2", + "s3-0": "payload", + "s3-1": "payload", + "s3-2": "payload", + "s3-3": "payload", + "s3-4": "payload", + "s3-5": "payload", + "s3-6": "payload", + "s2-0": "i", + "s2-1": "i", + "s2-2": "i", + "s2-3": "i", + "s2-4": "i", + "s2-5": "i", + "s2-6": "i" } }, "disasm-vif-tag": { - "args": ["data", "words", "stream", "details"], + "args": ["packet", "word-count", "stream", "details?"], "vars": { - "gp-0": "byte-idx", - "v1-0": "cmd-template-idx", + "gp-0": "bytes-consumed", + "v1-0": "template-index", "a0-12": "print-kind", - "s1-0": "first-tag", - "s0-0": "packet-size", + "s1-0": "tag", + "s0-0": "packet-bytes", "t1-1": ["stcycl-imm", "vif-stcycl-imm"], "sv-16": "cmd", - "sv-32": "data-ptr", - "sv-48": "data-idx", + "sv-32": "payload", + "sv-48": "i", "sv-64": "unpack-imm" } }, + "disasm-dma-tag": { + "args": ["tag", "stream"] + }, "disasm-dma-list": { - "args": ["data", "mode", "verbose", "stream", "expected-size"], + "args": ["start-packet", "vif-mode", "verbose?", "stream", "tag-limit"], "vars": { - "sv-16": "addr", - "sv-32": "data-2", - "sv-48": "qwc", - "sv-64": "ra-1", - "sv-80": "ra-2", + "sv-16": "transfer-data", + "sv-32": "packet", + "sv-48": "quadword-count", + "sv-64": "return-address-0", + "sv-80": "return-address-1", "sv-96": "call-depth", - "sv-112": "current-tag", - "s2-0": "mode-2", - "s3-0": "verbose-2", - "gp-0": "stream-2", - "s1-0": "expected-size-2", + "sv-112": "tag", + "s2-0": "active-vif-mode", + "s3-0": "active-verbose?", + "gp-0": "output", + "s1-0": "active-tag-limit", "s0-0": "end-condition", - "s4-0": "total-qwc", - "s5-0": "total-tags" + "s4-0": "total-quadwords", + "s5-0": "total-tags", + "v0-10": "tte-overshoot-bytes", + "v1-123": "return-depth" } }, "cpad-invalid!": { - "args": ["pad"] + "args": ["pad"], + "vars": { + "v1-2": "i", + "v1-14": "i", + "v1-17": "i" + } }, "(method 0 cpad-info)": { - "args": ["alloction", "type-to-make", "idx"], + "args": ["allocation", "type-to-make", "pad-index"], "vars": { "s5-0": "this" } }, - "analog-input": { - "args": ["in", "offset", "center-val", "max-val", "out-range"], + "(method 0 cpad-list)": { + "args": ["allocation", "type-to-make"], "vars": { - "f1-1": "offset-in", + "gp-0": "this" + } + }, + "analog-input": { + "args": ["raw-value", "center-offset", "dead-zone", "full-scale", "output-range"], + "vars": { + "f1-1": "centered-value", "f0-3": "magnitude", - "v1-0": "max-magnitude" + "v1-0": "usable-range" } }, "cpad-set-buzz!": { - "args": ["pad", "buzz-idx", "buzz-amount", "duration"] + "args": ["pad", "motor-index", "amount", "duration"] }, "service-cpads": { "vars": { "gp-0": "pad-list", - "s5-0": "pad-idx", + "s5-0": "pad-index", "s4-0": "pad", - "s3-0": "buzz-idx", - "v1-29": "current-button0" + "s3-0": "motor-index", + "v1-10": "active-motor-index", + "v1-29": "current-buttons", + "f30-0": "stick-x", + "f28-0": "stick-y" } }, "buzz-stop!": { - "args": ["idx"] + "args": ["pad-index"] + }, + "psm-size": { + "args": ["texture-format"] + }, + "psm-page-height": { + "args": ["texture-format"] + }, + "psm->string": { + "args": ["texture-format"] }, "default-buffer-init": { - "args": ["buff"], + "args": ["buffer"], "vars": { - "v1-0": "buff-ptr", - "v1-1": "buff-ptr2", - "v1-3": "buff-ptr3", - "v1-4": "buff-ptr4", + "v1-0": "buffer-reset", + "v1-1": "buffer-dma", + "v1-3": "buffer-data", + "v1-4": "buffer-ret", "a1-4": ["packet", "dma-gif-packet"], "a1-6": ["gif-tag", "gs-gif-tag"], "a1-8": ["data", "(pointer uint64)"], "a0-1": ["ret-packet", "dma-packet"], - "v1-2": "buff-ptr5" + "v1-2": "buffer-gif" } }, + "(method 0 gif-packet)": { + "args": ["allocation", "type-to-make", "register-count"] + }, + "open-gif-packet": { + "args": ["packet"] + }, "add-reg-gif-packet": { - "args": ["packet", "reg-idx", "reg-val"], + "args": ["packet", "register-id", "register-value"], "vars": { "v1-0": "tag" } }, + "close-gif-packet": { + "args": ["packet", "end-of-packet"] + }, + "put-draw-env": { + "args": ["packet"] + }, "(method 9 font-context)": { "args": ["this", "mat"] }, @@ -919,20 +1885,82 @@ "color-0" ], "vars": { - "v0-0": "this" + "v0-0": "this", + "v1-3": "scaled-y", + "a0-2": "scaled-height" } }, "(method 0 display)": { - "args": ["allocation", "type-to-make", "psm", "w", "h", "ztest", "zpsm"], + "args": [ + "allocation", + "type-to-make", + "color-format", + "width", + "height", + "depth-test", + "depth-format" + ], "vars": { "gp-0": "this" } }, "(method 0 ripple-control)": { + "args": ["allocation", "type-to-make"], "vars": { "v0-0": "this" } }, + "merc-fragment-fp-data": { + "args": ["fragment"] + }, + "vector-cross!": { + "args": ["out", "a", "b"] + }, + "vector+float!": { + "args": ["out", "value", "addend"] + }, + "vector*!": { + "args": ["out", "a", "b"] + }, + "vector+*!": { + "args": ["out", "base", "value", "scale"] + }, + "vector-*!": { + "args": ["out", "base", "value", "scale"] + }, + "vector/!": { + "args": ["out", "numerator", "denominator"] + }, + "vector-float*!": { + "args": ["out", "value", "scale"] + }, + "vector-average!": { + "args": ["out", "a", "b"] + }, + "vector+float*!": { + "args": ["out", "base", "value", "scale"] + }, + "vector--float*!": { + "args": ["out", "base", "value", "scale"] + }, + "vector-float/!": { + "args": ["out", "value", "divisor"] + }, + "vector-negate!": { + "args": ["out", "value"] + }, + "vector-negate-in-place!": { + "args": ["value"] + }, + "vector=": { + "args": ["a", "b"] + }, + "vector-delta": { + "args": ["a", "b"] + }, + "vector-seek!": { + "args": ["value", "target", "max-step"] + }, "vector-seek-2d-xz-smooth!": { "args": ["vec", "target", "max-step", "alpha"], "vars": { @@ -975,6 +2003,18 @@ "f1-4": "min-step" } }, + "vector-identity!": { + "args": ["value"] + }, + "vector-seconds": { + "args": ["out", "seconds"] + }, + "vector-seconds!": { + "args": ["seconds"] + }, + "vector-v!": { + "args": ["velocity"] + }, "vector-v+!": { "args": ["result", "position", "velocity"] }, @@ -990,6 +2030,116 @@ "vector-v*float++!": { "args": ["position", "velocity", "scale"] }, + "vector-to-ups!": { + "args": ["out", "per-frame"] + }, + "vector-from-ups!": { + "args": ["out", "per-second"] + }, + "vector-length": { + "args": ["value"] + }, + "vector-length-squared": { + "args": ["value"] + }, + "vector-xz-length-squared": { + "args": ["value"] + }, + "vector-xz-length": { + "args": ["value"] + }, + "vector-vector-distance": { + "args": ["a", "b"] + }, + "vector-vector-distance-squared": { + "args": ["a", "b"] + }, + "vector-vector-xz-distance": { + "args": ["a", "b"] + }, + "vector-vector-xz-distance-squared": { + "args": ["a", "b"] + }, + "vector-normalize!": { + "args": ["value", "target-length"], + "vars": { + "f0-0": "old-length", + "v1-1": "scale" + } + }, + "vector-normalize-ret-len!": { + "args": ["value", "target-length"], + "vars": { + "f0-0": "old-length", + "v1-1": "scale" + } + }, + "vector-normalize-copy!": { + "args": ["out", "value", "target-length"], + "vars": { + "f0-0": "old-length", + "v1-1": "scale" + } + }, + "vector-xz-normalize!": { + "args": ["value", "target-length"], + "vars": { + "f0-0": "old-length", + "v1-1": "scale" + } + }, + "vector-length-max!": { + "args": ["value", "maximum"], + "vars": { + "f0-0": "current-length" + } + }, + "vector-xz-length-max!": { + "args": ["value", "maximum"], + "vars": { + "f0-0": "current-length" + } + }, + "vector-rotate-around-y!": { + "args": ["out", "value", "angle"], + "vars": { + "f26-0": "z", + "f30-0": "x", + "f28-0": "cosine", + "f0-0": "sine" + } + }, + "rotate-y<-vector+vector": { + "args": ["from", "to"] + }, + "vector-cvt.w.s!": { + "args": ["out", "value"] + }, + "vector-cvt.s.w!": { + "args": ["out", "value"] + }, + "rot-zxy-from-vector!": { + "args": ["out", "forward"], + "vars": { + "f28-0": "z", + "f30-0": "x", + "f0-0": "yaw", + "f26-0": "inverse-yaw", + "f0-4": "horizontal-length", + "f0-5": "pitch" + } + }, + "rot-zyx-from-vector!": { + "args": ["out", "forward"], + "vars": { + "f28-0": "z", + "f30-0": "negative-y", + "f0-1": "pitch", + "f26-0": "inverse-pitch", + "f0-5": "horizontal-length", + "f0-6": "yaw" + } + }, "vector-lerp!": { "args": ["out", "a", "b", "alpha"] }, @@ -1003,10 +2153,59 @@ "args": ["out", "a", "b", "alpha"] }, "vector-deg-lerp-clamp!": { - "args": ["out", "min-val", "max-val", "in"] + "args": ["out", "minimum", "maximum", "amount"] + }, + "vector-degi": { + "args": ["out", "rotations"] + }, + "vector-degf": { + "args": ["out", "packed-angles"] + }, + "vector-degmod": { + "args": ["out", "angles"] + }, + "vector-deg-diff": { + "args": ["out", "a", "b"] + }, + "vector3s-copy!": { + "args": ["out", "value"] + }, + "vector3s+!": { + "args": ["out", "a", "b"] + }, + "vector3s*float!": { + "args": ["out", "value", "scale"] + }, + "vector3s-!": { + "args": ["out", "a", "b"] + }, + "spheres-overlap?": { + "args": ["a", "b"], + "vars": { + "a0-1": "radius-squared", + "v1-0": "distance-squared" + } + }, + "sphere<-vector!": { + "args": ["out", "center"] + }, + "sphere<-vector+r!": { + "args": ["out", "center", "radius"] + }, + "rand-vu-sphere-point!": { + "args": ["out", "radius"] + }, + "(method 0 file-stream)": { + "args": ["allocation", "type-to-make", "name", "mode"], + "vars": { + "a0-1": "stream" + } + }, + "file-stream-read-string": { + "args": ["stream", "destination"] }, "make-file-name": { - "args": ["kind", "name", "art-group-version"] + "args": ["kind", "name", "art-group-version", "unused"] }, "make-vfile-name": { "args": ["kind", "name"] @@ -1015,17 +2214,18 @@ "args": ["info", "kind", "version-override"], "vars": { "s5-0": "expected-version", + "v1-1": "kind-value", "s4-0": "kind-name" } }, "(method 0 load-dir)": { - "args": ["allocation", "type-to-make", "length", "unk"], + "args": ["allocation", "type-to-make", "length", "lev"], "vars": { "s4-0": "this" } }, "(method 0 load-dir-art-group)": { - "args": ["allocation", "type-to-make", "length", "unk"], + "args": ["allocation", "type-to-make", "length", "lev"], "vars": { "v0-0": "this" } @@ -1037,12 +2237,16 @@ } }, "(method 0 external-art-control)": { + "args": ["allocation", "type-to-make"], "vars": { "gp-0": "this", - "s4-0": "buff-idx", - "v1-9": "rec-idx" + "s4-0": "i", + "v1-9": "i" } }, + "texture-mip->segment": { + "args": ["mip-level", "mip-count"] + }, "(method 9 display)": { "args": ["this", "slowdown"], "vars": { @@ -1051,19 +2255,31 @@ } }, "set-draw-env-offset": { - "args": ["env", "x", "y"] + "args": ["env", "x", "y", "field-parity"] }, "set-display-env": { - "args": ["env", "psm", "width", "height", "dx", "dy", "fbp"] + "args": ["env", "pixel-format", "width", "height", "display-x", "display-y", "framebuffer-base"] }, "set-draw-env": { - "args": ["env", "psm", "width", "height", "ztest", "zpsm", "fbp"] + "args": ["env", "pixel-format", "width", "height", "depth-test", "depth-format", "framebuffer-base"] }, "set-display": { - "args": ["disp", "psm", "w", "h", "ztest", "zpsm"] + "args": ["disp", "pixel-format", "width", "height", "depth-test", "depth-format"], + "vars": { + "v1-0": "draw-env-gif-tag" + } }, "set-display2": { - "args": ["disp", "psm", "w", "h", "ztest", "zpsm"] + "args": ["disp", "pixel-format", "width", "height", "depth-test", "depth-format"] + }, + "put-display-alpha-env": { + "args": ["env"], + "vars": { + "v1-0": "gs" + } + }, + "allocate-dma-buffers": { + "args": ["disp"] }, "(method 11 profile-bar)": { "args": ["this", "name", "color"], @@ -1080,41 +2296,72 @@ "gs-set-default-store-image": { "args": [ "packet", - "src-fbp", - "src-w", - "src-psm", - "ssax", - "ssay", - "rrw", - "rrh" + "source-base", + "source-buffer-width", + "source-format", + "source-x", + "source-y", + "read-width", + "read-height" ] }, "store-image": { - "args": ["oddeven"], + "args": ["field-order"], "vars": { - "s4-0": "buff0", - "s1-0": "buff1", + "s4-0": "field0-buffer", + "s1-0": "field1-buffer", "s0-0": "packet", - "gp-0": "file", + "gp-0": "output", "s3-0": "width", "s2-0": "height", - "s0-1": "ptr-0", - "sv-16": "ptr-1", - "sv-32": "y-idx", - "sv-48": "y-idx-2" + "s0-1": "field0-pixels", + "sv-16": "field1-pixels", + "sv-32": "i", + "sv-48": "i" } }, "draw-context-set-xy": { - "args": ["ctxt", "x", "y"] + "args": ["context", "x", "y"], + "vars": { + "v0-0": "scaled-y" + } + }, + "(method 8 texture-page)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-7": "bytes", + "a0-6": "i" + } + }, + "texture-bpp": { + "args": ["texture-format"] }, "texture-qwc": { - "args": ["w", "h", "tex-format"] + "args": ["width", "height", "texture-format"], + "vars": { + "v1-0": "bits-per-pixel" + } + }, + "physical-address": { + "args": ["address"] }, "gs-find-block": { - "args": ["bx", "by", "tex-format"] + "args": ["block-x", "block-y", "texture-format"] + }, + "gs-page-width": { + "args": ["texture-format"] + }, + "gs-page-height": { + "args": ["texture-format"] + }, + "gs-block-width": { + "args": ["texture-format"] + }, + "gs-block-height": { + "args": ["texture-format"] }, "gs-largest-block": { - "args": ["tex-width", "tex-height", "tex-format"], + "args": ["texture-width", "texture-height", "texture-format"], "vars": { "s5-0": "block-width", "v1-0": "block-height", @@ -1128,14 +2375,16 @@ } }, "gs-blocks-used": { - "args": ["tex-width", "tex-height", "tex-format"], + "args": ["texture-width", "texture-height", "texture-format"], "vars": { "s4-0": "page-width", "v1-0": "page-height", "a0-6": "real-width", "a1-4": "real-height", "s3-0": "width-blocks", - "s1-0": "height-blocks" + "s1-0": "height-blocks", + "a0-9": "remaining-width", + "a1-7": "remaining-height" } }, "dma-buffer-add-ref-texture": { @@ -1151,30 +2400,45 @@ } }, "(method 15 texture-pool)": { - "args": ["this", "word-count"] + "args": ["this", "word-count"], + "vars": { + "v0-0": "start" + } }, "(method 22 texture-pool)": { "args": ["this", "tpage-id"] }, + "(method 9 texture-pool)": { + "args": ["this"], + "vars": { + "v1-6": "i", + "v1-9": "i" + } + }, "(method 10 texture-page)": { - "args": ["this", "segment-count", "additional-size"] + "args": ["this", "segment-count", "additional-size"], + "vars": { + "v1-0": "total-size", + "a2-1": "i" + } }, "(method 16 texture-pool)": { "args": ["this", "segment", "size"] }, "(method 9 texture-page)": { - "args": ["this", "seg"] + "args": ["this", "heap"] }, "texture-page-default-allocate": { - "args": ["pool", "page", "seg", "tpage-id"], + "args": ["pool", "page", "heap", "tpage-id"], "vars": { "s3-0": "seg-id" } }, "texture-page-common-allocate": { - "args": ["pool", "page", "seg", "tpage-id"], + "args": ["pool", "page", "heap", "tpage-id"], "vars": { - "s4-0": "seg-id" + "s4-0": "seg-id", + "s5-0": "next-dest" } }, "(method 12 texture-page)": { @@ -1231,7 +2495,10 @@ "a1-4": "upload-chunks", "a2-3": "chunk-idx", "v1-2": "modified-chunk-count", - "a3-8": "vram-chunk" + "a3-8": "vram-chunk", + "v1-0": "block-data", + "t0-0": "unused-zero", + "a3-5": "block-data" } }, "upload-vram-pages-pris": { @@ -1254,7 +2521,7 @@ } }, "texture-page-near-allocate-0": { - "args": ["pool", "page", "heap", "mode"], + "args": ["pool", "page", "heap", "tpage-id"], "vars": { "s3-0": "common-dest", "s2-0": "page-seg-idx", @@ -1264,7 +2531,7 @@ } }, "texture-page-near-allocate-1": { - "args": ["pool", "page", "heap", "mode"], + "args": ["pool", "page", "heap", "tpage-id"], "vars": { "s4-0": "seg2-size", "a1-1": "seg2-dest", @@ -1273,7 +2540,7 @@ } }, "texture-page-level-allocate": { - "args": ["pool", "page", "heap", "mode"], + "args": ["pool", "page", "heap", "tpage-id"], "vars": { "s2-0": "common-id", "v1-6": "level-idx" @@ -1288,11 +2555,17 @@ "s4-1": "entry-idx", "s3-0": "entry-page", "s2-0": "entry-link", - "s1-0": "entry-list-length" + "s1-0": "entry-list-length", + "t9-9": "print-func", + "a0-12": "output", + "a1-10": "format-string", + "a2-11": "texture-index", + "a3-7": "link-count", + "v1-40": "current-shader" } }, "texture-page-size-check": { - "args": ["pool", "level", "hide-prints"], + "args": ["pool", "lev", "hide-prints"], "vars": { "gp-0": "oversize", "s3-0": "tfrag-page", @@ -1304,7 +2577,7 @@ } }, "(method 13 texture-pool)": { - "args": ["this", "level", "max-page-kind", "id-array"], + "args": ["this", "lev", "max-page-kind", "id-array"], "vars": { "v1-0": "page-idx", "v1-5": "tfrag-dir-entry", @@ -1316,7 +2589,7 @@ } }, "(method 14 texture-pool)": { - "args": ["this", "level", "tex-page-kind"], + "args": ["this", "lev", "tex-page-kind"], "vars": { "s3-0": "tfrag-page", "s2-0": "tfrag-bucket", @@ -1340,6 +2613,7 @@ "args": ["this", "dma-buff", "mode"], "vars": { "sv-16": "total-size", + "v1-0": "upload-mode", "v1-7": "start-segment", "s5-0": "chunk-count", "s4-0": "current-dest", @@ -1350,6 +2624,9 @@ "a0-5": "gs-reg-data" } }, + "(method 14 texture-page)": { + "args": ["this", "mode"] + }, "texture-relocate": { "args": ["dma-buff", "tex", "dest-loc", "dest-fmt", "clut-dst"], "vars": { @@ -1378,10 +2655,51 @@ "s0-2": "font-tx-3-fmt", "s2-3": "font-tx-2", "s1-3": "font-tx-2-dest", - "s0-3": "font-tx-2-fmt" + "s0-3": "font-tx-2-fmt", + "v1-6": "buffer" + } + }, + "(method 21 texture-pool)": { + "args": ["this", "lev"], + "vars": { + "v1-0": "i", + "a2-0": "page" + } + }, + "(method 7 texture-page-dir)": { + "args": ["this", "heap", "name"] + }, + "(method 7 texture-page)": { + "args": ["this", "heap", "name"], + "vars": { + "s4-0": "dir-entry", + "v1-2": "lev", + "a3-0": "tpage-id", + "v1-19": "delayed-relocation" + } + }, + "relocate-later": { + "vars": { + "s5-0": "entry", + "s4-0": "page" + } + }, + "lookup-texture-by-id": { + "args": ["id"], + "vars": { + "v1-0": "entry" + } + }, + "(method 20 texture-pool)": { + "args": ["this", "page"], + "vars": { + "v1-0": "directory", + "a0-1": "i", + "a0-2": "found-index" } }, "link-texture-by-id": { + "args": ["id", "shader"], "vars": { "s4-0": "dir-entry" } @@ -1406,15 +2724,78 @@ "vars": { "s3-0": "debug-buf", "gp-0": "disp", - "s5-2": "debug-txt-buf" + "s5-2": "debug-txt-buf", + "v1-13": "current-level-name", + "a0-8": "music-level-index", + "a1-6": "music-level", + "s5-1": "ear-sphere", + "v1-28": "terrain-ctxt", + "s4-1": "ambient-level-index", + "v1-32": "ambient-level", + "s4-2": "ambient-index", + "v1-112": "perf-read-data", + "a0-54": "read-counter-0", + "a0-56": "read-counter-1", + "v1-123": "perf-reset-data", + "a0-60": "perf-reset-control", + "v1-152": "post-sync-perf-data", + "a0-73": "post-sync-counter-0", + "a0-75": "post-sync-counter-1", + "s4-3": "debug-packet-start", + "v1-172": "cnt-dma-buf", + "a0-77": "cnt-packet", + "v1-173": "gif-dma-buf", + "a0-79": "gif-packet", + "v1-174": "register-dma-buf", + "a0-81": "gs-registers", + "s2-0": "bar-index", + "s1-0": "bar", + "a3-6": "debug-packet-end", + "v1-188": "debug-next-tag", + "s3-1": "text-buf", + "s4-4": "text-packet-start", + "a3-8": "console-y", + "a3-9": "text-packet-end", + "v1-215": "text-next-tag", + "v1-220": "dma-usage", + "v1-228": "particle-perf-data", + "a0-112": "particle-perf-control", + "s2-1": "draw-string-fn" } }, "adgif-shader-login": { - "args": "shader", + "args": ["shader"], "vars": { "s5-0": "tex" } }, + "adgif-shader<-texture!": { + "args": ["shader", "tex"] + }, + "adgif-shader-update!": { + "args": ["shader", "tex"], + "vars": { + "s5-0": "lod-scale", + "v1-2": "mip-shift" + } + }, + "adgif-shader-login-no-remap": { + "args": ["shader"], + "vars": { + "s5-0": "tex" + } + }, + "adgif-shader-login-no-remap-fast": { + "args": ["shader"], + "vars": { + "v1-4": "tex-id", + "a1-7": "dir-entry", + "s5-0": "tex" + } + }, + "adgif-shader<-texture-simple!": { + "args": ["shader", "tex"] + }, "adgif-shader-login-fast": { "args": ["shader"], "vars": { @@ -1428,9 +2809,19 @@ "vars": { "s5-0": "dir-entry", "s4-0": "old-alloc-func", - "s3-0": "file-name" + "s3-0": "file-name", + "s2-0": "page" } }, + "(method 10 drawable-tree-actor)": { + "args": ["this", "tree", "frame"] + }, + "(method 10 drawable-tree-ambient)": { + "args": ["this", "tree", "frame"] + }, + "(method 16 drawable-tree-ambient)": { + "args": ["this", "destination", "source"] + }, "(method 9 __assert-info-private-struct)": { "args": ["this", "filename", "line-num", "column-num"] }, @@ -1459,11 +2850,11 @@ "f1-3": "x-rat", "f0-7": "y-rat", "v1-3": "cull-info", - "f2-2": "unused-x-thing", - "f2-5": "y-thing", - "f3-11": "one-plus-2x-squared", - "f3-14": "one-plus-2y-squared", - "f2-9": "temp3", + "f2-2": "horizontal-guard-projection-scale", + "f2-5": "vertical-guard-projection-scale", + "f3-11": "horizontal-frustum-guard-dot", + "f3-14": "vertical-frustum-guard-dot", + "f2-9": "vertical-guard-separation", "a0-2": "elim3", "f2-11": "near-x", "f1-5": "near-y", @@ -1472,29 +2863,30 @@ "f1-8": "near-z", "f0-12": "fog-contsant-3", "a0-6": "elim4", - "f1-12": "dx-rat-2", - "f0-14": "d-temp-2", - "f2-13": "dx-rat-times-4", - "f3-21": "d-temp-3", - "f4-21": "inverse-x-len", - "f5-11": "inverse-x-len-2", + "f1-12": "visible-x-at-near", + "f0-14": "visible-x-z", + "f2-13": "guard-x-at-near", + "f3-21": "guard-x-z", + "f4-21": "inverse-visible-x-length", + "f5-11": "inverse-guard-x-length", "f0-16": "temp5", "a0-7": "elim5", - "f1-15": "dy-rat", - "f0-18": "d-temp-4", - "f2-15": "dy-rat-times-4", - "f3-22": "d-temp-5", - "f4-26": "inverse-y-len", - "f5-16": "inverse-y-len-2", + "f1-15": "visible-y-at-near", + "f0-18": "visible-y-z", + "f2-15": "guard-y-at-near", + "f3-22": "guard-y-z", + "f4-26": "inverse-visible-y-length", + "f5-16": "inverse-guard-y-length", "f0-20": "temp6", "v1-4": "elim6", "v0-2": "cam-mat", - "f2-16": "fog-constant-1", - "f3-23": "fog-constant-2", - "f0-24": "fog-at-near-plane", - "f1-22": "fog-factor-2", - "f4-35": "cam-fov-mult", - "f5-19": "corrected-fog", + "f0-21": "unused-full-depth-range", + "f2-16": "min-depth", + "f3-23": "max-depth", + "f0-24": "fog-slope", + "f1-22": "depth-buffer-half-range", + "f4-35": "fov-scale", + "f5-19": "depth-projective-scale", "f5-23": "hvdf-x", "f6-29": "hvdf-y", "f2-18": "hvdf-z", @@ -1509,12 +2901,21 @@ "f1-37": "temp7", "v1-16": "elim7", "v1-24": "pfog", - "a0-12": "vis-gif-0", - "a0-13": "vis-gif-1", - "a0-14": "vis-gif-1-again", - "a0-15": "vis-gif-1-again-again" + "a0-12": "giftex", + "a0-13": "gifgr", + "a0-14": "giftex-overwrite", + "a0-15": "giftex-final-overwrite" } }, + "(method 0 math-camera)": { + "args": ["allocation", "type-to-make"], + "vars": { + "gp-0": "camera" + } + }, + "math-cam-start-smoothing": { + "args": ["duration", "start-t"] + }, "move-target-from-pad": { "args": ["trans", "pad-idx"], "vars": { @@ -1523,6 +2924,35 @@ "s3-0": "cam-rot-mat" } }, + "transform-point-vector!": { + "args": ["out", "point"], + "vars": { + "v1-7": "clip-flags" + } + }, + "transform-point-qword!": { + "args": ["out", "point"], + "vars": { + "v1-7": "clip-flags" + } + }, + "transform-point-vector-scale!": { + "args": ["out", "point"], + "vars": { + "v0-0": "perspective-scale", + "v1-7": "clip-flags" + } + }, + "init-for-transform": { + "args": ["object-matrix"], + "vars": { + "gp-0": "normal-matrix", + "s5-0": "transform-matrix", + "s4-0": "constant-vectors", + "s3-0": "ambient-vector", + "s2-0": "basis-vectors" + } + }, "(method 13 profile-bar)": { "args": ["this", "buf", "bar-pos"], "vars": { @@ -1535,11 +2965,12 @@ "a3-1": "screen-y", "t2-0": ["direct-tag", "dma-packet"], "t2-2": ["start-gif-tag", "gs-gif-tag"], - "t1-4": "block" + "t1-4": "block", + "f30-0": "utilization-percent" } }, "draw-sprite2d-xy": { - "args": ["buf", "x", "y", "w", "h", "color"], + "args": ["dma-buf", "x", "y", "width", "height", "color"], "vars": { "t2-1": "context", "a0-3": "draw-x", @@ -1554,7 +2985,7 @@ } }, "draw-quad2d": { - "args": ["buf", "context"], + "args": ["dma-buf", "context"], "vars": { "a2-1": "draw-x", "a3-7": "draw-y", @@ -1567,8 +2998,14 @@ "a1-11": "total-qwc" } }, + "screen-gradient": { + "args": ["dma-buf", "top-left", "top-right", "bottom-left", "bottom-right"], + "vars": { + "a1-2": "context" + } + }, "set-display-gs-state": { - "args": ["dma-buf", "fbp", "scx", "scy", "fb-msk", "psm"], + "args": ["dma-buf", "framebuffer-base", "width", "height", "framebuffer-mask", "pixel-format"], "vars": { "t3-0": ["dma", "dma-packet"], "t3-2": ["gif", "gs-gif-tag"], @@ -1579,13 +3016,13 @@ "set-display-gs-state-offset": { "args": [ "dma-buf", - "fbp", + "framebuffer-base", "width", "height", - "fb-msk", - "psm", - "off-x", - "off-y" + "framebuffer-mask", + "pixel-format", + "offset-x", + "offset-y" ], "vars": { "t4-0": "fbw", @@ -1595,24 +3032,51 @@ } }, "reset-display-gs-state": { - "args": ["disp", "dma-buf", "oddeven"], + "args": ["disp", "dma-buf", "field-parity"], "vars": { - "a3-0": "onscreen", - "v1-0": "hoff", - "a2-6": "fbp", + "a3-0": "on-screen-index", + "v1-0": "field-y-offset", + "a2-6": "framebuffer-base", "t0-0": ["dma", "dma-packet"], "t0-2": ["gif", "gs-gif-tag"], "a3-3": ["gif-data", "(pointer uint64)"] } }, "(method 0 engine)": { - "args": ["allocation", "type-to-make", "name", "length"], + "args": ["allocation", "type-to-make", "name", "capacity"], "vars": { "v0-0": "this", - "v1-11": "idx-to-link", - "a0-1": "end-idx" + "v1-11": "i", + "a0-1": "last-interior-index" } }, + "(method 9 connection)": { + "args": ["this"] + }, + "(method 10 connection)": { + "args": ["this"] + }, + "(method 11 connection)": { + "args": ["this", "target-engine"] + }, + "(method 12 connection)": { + "args": ["this", "proc"] + }, + "(method 13 connection)": { + "args": ["this"], + "vars": { + "v1-1": "owner-engine" + } + }, + "(method 21 engine)": { + "args": ["this"] + }, + "(method 22 engine)": { + "args": ["this"] + }, + "(method 23 engine)": { + "args": ["this", "node"] + }, "(method 10 engine)": { "args": ["this", "f"], "vars": { @@ -1627,16 +3091,21 @@ } }, "(method 12 engine)": { + "args": ["this", "execute-arg"], "vars": { - "s4-0": ["ct", "connection"] + "s4-0": ["current", "connection"] } }, "(method 13 engine)": { + "args": ["this", "execute-arg"], "vars": { - "s4-0": ["ct", "connection"], + "s4-0": ["current", "connection"], "v1-2": "result" } }, + "(method 14 engine)": { + "args": ["this", "execute-arg"] + }, "(method 19 engine)": { "args": ["this", "p1-value"], "vars": { @@ -1654,20 +3123,206 @@ "connection-process-apply": { "args": ["proc", "func"], "vars": { - "s5-0": "iter" + "s5-0": "current" } }, "(method 15 engine)": { "args": ["this", "proc", "func", "p1", "p2", "p3"], "vars": { - "v1-0": "con" + "v1-0": "slot" + } + }, + "(method 16 engine)": { + "args": ["this", "proc"], + "vars": { + "s5-0": ["current", "connection"] + } + }, + "(method 17 engine)": { + "args": ["this", "predicate"], + "vars": { + "s4-0": "current", + "s3-0": "next" + } + }, + "(method 18 engine)": { + "args": ["this"], + "vars": { + "a0-1": "current", + "s5-0": "next" + } + }, + "process-disconnect": { + "args": ["proc"], + "vars": { + "v0-1": "result", + "gp-0": "current" + } + }, + "(method 0 setting-control)": { + "args": ["allocation", "type-to-make", "max-connections"], + "vars": { + "s4-0": "this" + } + }, + "(method 9 setting-control)": { + "args": ["this", "owner", "setting-name", "request-param1", "request-param2", "request-param3"] + }, + "(method 10 setting-control)": { + "args": ["this", "owner", "setting-name", "request-param1", "request-param2", "request-param3"] + }, + "(method 11 setting-control)": { + "args": ["this", "owner", "setting-name"], + "vars": { + "s5-0": "settings-engine", + "s4-0": "request-link" + } + }, + "(method 12 setting-control)": { + "args": ["this"], + "vars": { + "gp-0": "current-settings", + "s5-0": "desired-settings" + } + }, + "(method 13 setting-control)": { + "args": ["this"], + "vars": { + "gp-0": "current-settings", + "s5-1": "desired-settings", + "v1-60": "display-frame", + "f0-39": "background-alpha" + } + }, + "(top-level-login settings)": { + "vars": { + "gp-0": "default-settings", + "s5-0": "current-settings", + "f0-2": "system-volume" + } + }, + "make-light-kit": { + "args": ["group", "heading", "dir0-level", "dir1-level", "dir2-level"], + "vars": { + "s4-0": "rotation", + "v1-0": "dir0", + "v1-2": "dir1", + "v1-4": "dir2" + } + }, + "make-village1-light-kit": { + "args": ["context"], + "vars": { + "s5-0": "group", + "v1-0": "dir2" + } + }, + "make-misty-light-kit": { + "args": ["context"], + "vars": { + "gp-0": "group" + } + }, + "make-village2-light-kit": { + "args": ["context"], + "vars": { + "v1-0": "group", + "a0-1": "directional", + "a0-3": "directional", + "a0-5": "directional", + "v1-2": "group", + "a0-7": "directional", + "a0-9": "directional", + "s5-0": "group", + "s5-1": "group", + "v1-6": "group", + "a0-13": "directional", + "v1-8": "group" + } + }, + "make-rolling-light-kit": { + "args": ["context"], + "vars": { + "s5-0": "group", + "v1-0": "directional", + "s5-1": "group", + "v1-2": "directional", + "s5-2": "group", + "v1-4": "directional", + "s5-3": "group", + "v1-6": "directional", + "s5-4": "group", + "v1-8": "directional", + "gp-1": "group", + "v1-10": "directional" + } + }, + "make-village3-light-kit": { + "args": ["context"], + "vars": { + "v1-0": "group", + "a1-0": "directional", + "a1-2": "directional", + "v1-2": "group", + "a0-1": "directional", + "a0-3": "directional" + } + }, + "update-mood-shadow-direction": { + "args": ["lights"], + "vars": { + "v1-0": "shadow-direction", + "f0-8": "horizontal-scale" + } + }, + "update-mood-erase-color": { + "args": ["fog", "lights"], + "vars": { + "s5-0": "erase-color", + "f0-8": "fog-blend" + } + }, + "update-mood-erase-color2": { + "args": ["fog", "lights-a", "lights-b"], + "vars": { + "s5-0": "erase-color", + "s4-0": "other-erase-color", + "f0-15": "fog-blend" } }, "surface-interp!": { - "args": ["dst", "src0", "src1", "amount"] + "args": ["dst", "src0", "src1", "amount"], + "vars": { + "v1-0": "i", + "v1-3": "i", + "v1-6": "i" + } }, "surface-mult!": { - "args": ["dst", "src0", "src1"] + "args": ["dst", "src0", "src1"], + "vars": { + "v1-0": "i", + "v1-3": "i", + "v1-6": "i" + } + }, + "calc-terminal-vel": { + "args": ["acceleration", "constant-drag", "drag-coefficient"] + }, + "calc-terminal2-vel": { + "args": ["acceleration", "constant-drag", "drag-coefficient", "reserved"], + "vars": { + "f0-4": "speed" + } + }, + "calc-terminal4-vel": { + "args": ["acceleration", "constant-drag", "drag-coefficient"], + "vars": { + "f0-5": "speed" + } + }, + "surface-clamp-speed": { + "args": ["dst", "src0", "src1", "pass"] }, "(method 0 collide-shape-prim)": { "args": ["allocation", "type-to-make", "cshape", "prim-id", "size-bytes"] @@ -1720,28 +3375,82 @@ } }, "cspace-by-name-no-fail": { + "args": ["drawable", "name"], "vars": { "v0-0": ["result", "cspace"] } }, + "cspace-index-by-name-no-fail": { + "args": ["drawable", "name"], + "vars": { + "v0-0": "index" + } + }, + "num-func-none": { + "args": ["channel", "unused0", "unused1"] + }, + "num-func-+!": { + "args": ["channel", "rate", "unused"], + "vars": { + "f0-1": "frame" + } + }, + "num-func--!": { + "args": ["channel", "rate", "unused"], + "vars": { + "f0-1": "frame" + } + }, "num-func-loop!": { - "args": ["chan", "inc"], + "args": ["channel", "rate", "unused"], "vars": { "f0-1": "duration", "f1-2": "after-inc", "f0-3": "wrapped" } }, + "num-func-seek!": { + "args": ["channel", "target-frame", "rate"], + "vars": { + "f0-3": "frame" + } + }, + "num-func-blend-in!": { + "args": ["channel", "rate", "unused"], + "vars": { + "f30-0": "blend" + } + }, + "num-func-chan": { + "args": ["channel", "source-channel", "unused"], + "vars": { + "f0-2": "source-frame" + } + }, + "num-func-identity": { + "args": ["channel", "unused0", "unused1"] + }, + "(method 0 effect-control)": { + "args": ["allocation", "type-to-make", "drawable"], + "vars": { + "v0-1": "this" + } + }, + "(method 13 effect-control)": { + "args": ["this", "channel-offset"] + }, "shrubbery-login-post-texture": { "args": ["this"], "vars": { - "v1-1": "shader-count", - "a1-1": ["dst", "qword"], - "a2-5": ["tex-dst", "qword"], - "a3-0": ["src", "qword"], - "a2-6": ["text-dst2", "qword"], - "a3-1": ["src-2", "qword"], - "a3-2": ["src-3", "qword"] + "v1-1": "shader-pair-count", + "a1-1": ["state-dst", "qword"], + "a2-5": ["texture-dst", "qword"], + "a3-0": ["shader-pair", "qword"], + "a0-1": "i", + "a2-6": ["second-texture-dst", "qword"], + "a3-1": ["state-head", "qword"], + "a3-2": ["source-cursor", "qword"], + "t0-4": "quad-index" } }, "(method 20 actor-link-info)": { @@ -1753,6 +3462,35 @@ "a1-1": "msg-block" } }, + "(method 21 actor-link-info)": { + "args": ["this", "message"], + "vars": { + "s4-0": "iter", + "s5-0": "result", + "a0-1": "proc", + "a1-1": "msg-block" + } + }, + "(method 23 actor-link-info)": { + "args": ["this", "message"], + "vars": { + "a0-1": "actor", + "a0-2": "proc" + } + }, + "(method 24 actor-link-info)": { + "args": ["this", "message"], + "vars": { + "a0-1": "actor", + "a0-2": "proc" + } + }, + "(method 22 actor-link-info)": { + "args": ["this", "message"] + }, + "(method 19 actor-link-info)": { + "args": ["this", "message"] + }, "lookup-level-info": { "args": ["name"], "vars": { @@ -1767,20 +3505,297 @@ "v1-1": "cmd-lst" } }, + "remap-level-name": { + "args": ["info"] + }, + "(method 28 level)": { + "args": ["this", "name"], + "vars": { + "s4-0": "i" + } + }, + "add-bsp-drawable": { + "args": ["bsp-data", "level-data", "unused", "display-frame-data"] + }, + "(method 7 bsp-header)": { + "args": ["this", "heap", "name"], + "vars": { + "s5-0": "loading-level" + } + }, + "(method 26 level)": { + "args": ["this"], + "vars": { + "v1-0": "i", + "v1-3": "i" + } + }, + "load-vis-info": { + "args": ["vis-name", "old-vis-name"], + "vars": { + "s4-0": "i", + "s3-0": "active-level" + } + }, + "(method 25 level)": { + "args": ["this"], + "vars": { + "s5-0": "self-vis", + "s5-1": "i", + "s3-0": "vis-index", + "s4-0": "neighbor-vis" + } + }, + "(method 11 level-group)": { + "args": ["this", "name", "want-status"], + "vars": { + "s5-1": ["selected-level", "level"], + "s3-0": "info", + "s2-0": "load-name", + "s1-0": "matching-level", + "a0-7": "disposable-level" + } + }, + "(method 25 level-group)": { + "args": ["this", "level-name"], + "vars": { + "v1-1": "loaded-level" + } + }, + "(method 23 level)": { + "args": ["this", "want-status"], + "vars": { + "v1-40": "i" + } + }, + "(method 17 level)": { + "args": ["this"], + "vars": { + "sv-16": ["last-object-name", "symbol"], + "a0-15": "loaded-object", + "a0-26": "load-destination" + } + }, + "(method 18 level)": { + "args": ["this"], + "vars": { + "s4-0": "buffer-a", + "s5-2": "buffer-b" + } + }, + "(method 19 level)": { + "args": ["this"], + "vars": { + "v1-7": "bsp-data", + "s5-0": "adgifs", + "s4-0": "i" + } + }, + "(method 22 level)": { + "args": ["this"], + "vars": { + "s5-0": "previous-loading-heap", + "s4-0": "previous-loading-level", + "s3-1": "previous-login-bsp" + } + }, + "(method 9 level)": { + "args": ["this"], + "vars": { + "v1-19": "i", + "v1-22": "i", + "a0-14": "vis-record" + } + }, + "(method 10 level)": { + "args": ["this", "drawable-index"], + "vars": { + "v1-0": "vis-bits", + "a0-1": "byte-index", + "v1-2": "vis-byte", + "a0-2": "bit-index", + "a0-3": "bit-shift" + } + }, + "(method 27 level)": { + "args": ["this", "position", "output"], + "vars": { + "s3-0": "boxes", + "s2-0": "box-cursor", + "s1-0": "i" + } + }, + "(method 8 level)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-8": "entity-bytes", + "v1-18": "ambient-bytes", + "v1-30": "code-bytes", + "s3-0": "i", + "s3-1": "vis-index", + "s2-0": "vis-record", + "v1-50": "vis-bytes", + "v1-61": "vis-bytes" + } + }, + "(method 18 level-group)": { + "args": ["this", "compact-level-heaps"], + "vars": { + "s5-1": "heap-size", + "s4-0": "i", + "s3-0": "level-heap" + } + }, + "(method 10 level-group)": { + "args": ["this", "status"], + "vars": { + "v1-0": "i" + } + }, + "(method 26 level-group)": { + "args": ["this"], + "vars": { + "v1-0": "i", + "v1-6": "i", + "v1-12": "i", + "v1-18": "i", + "v0-0": ["candidate", "level"] + } + }, + "(method 9 level-group)": { + "args": ["this", "name"], + "vars": { + "v1-0": "i" + } + }, + "(method 20 level-group)": { + "args": ["this", "name"], + "vars": { + "s4-0": "level-index", + "s3-0": "loaded-level", + "s2-0": "art-index" + } + }, + "(method 12 level-group)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 17 level-group)": { + "args": ["this"], + "vars": { + "s5-0": "target-position", + "v1-2": "continue-level-name", + "a0-2": "i", + "a1-3": "active-level", + "s4-0": ["inside-level", "level"], + "f30-0": "unused-distance-limit", + "s3-0": "i", + "s2-0": "active-level", + "f0-0": "distance", + "v1-20": "i", + "a0-8": "active-level", + "v0-1": ["selected-level", "level"], + "f0-1": "unused-distance-limit", + "v1-23": "i", + "a0-13": "active-level" + } + }, + "(method 19 level-group)": { + "args": ["this", "commands"] + }, + "(method 8 level-group)": { + "args": ["this", "usage", "flags"], + "vars": { + "s3-0": "i" + } + }, + "bg": { + "args": ["level-name"], + "vars": { + "v1-2": "info", + "s5-0": "packages", + "a0-8": "package", + "gp-1": "loaded-level" + } + }, + "play": { + "args": ["vis-enabled", "initialize-progress"], + "vars": { + "v1-0": "boot-message", + "s5-0": "startup-level-name", + "s4-1": "startup-level" + } + }, + "(method 10 load-state)": { + "args": ["this"], + "vars": { + "v1-0": "discarded-level", + "s5-0": "level-index", + "s4-0": "loaded-level", + "a0-6": "requested", + "a1-2": "request-index", + "s5-1": "ordinary-slots-empty", + "a0-20": "need-level0", + "v1-5": "need-level1", + "a1-12": "level-index", + "a2-9": "loaded-level", + "a1-17": "level-index", + "a2-17": "loaded-level", + "s4-1": "request-to-load", + "s3-0": "requested-level", + "s5-2": "request-index", + "s4-2": "level-index", + "s3-1": "loaded-level", + "s5-3": "loaded-vis-nick", + "v1-121": "level-index", + "a0-55": "active-level", + "s4-3": "level-index", + "v1-133": "active-level" + } + }, + "show-level": { + "args": ["level-name"] + }, "(method 0 shadow-control)": { "args": [ "allocation", "type-to-make", "bottom-offset", "top-offset", - "dir", - "center", - "fade" + "dist-to-locus", + "flags", + "fade-dist" ], "vars": { "v0-0": "this" } }, + "(method 9 shadow-control)": { + "args": ["this"] + }, + "(method 10 shadow-control)": { + "args": ["this"] + }, + "(method 11 shadow-control)": { + "args": ["this", "y"] + }, + "(method 12 shadow-control)": { + "args": ["this", "y"] + }, + "shadow-queue-append": { + "args": ["queue"], + "vars": { + "v0-0": "next-index" + } + }, + "shadow-queue-reset": { + "args": ["queue"] + }, + "wind-get-hashed-index": { + "args": ["position"] + }, "(method 0 res-lump)": { "args": ["allocation", "type-to-make", "data-count", "data-size"], "vars": { @@ -1788,14 +3803,38 @@ } }, "(method 20 res-lump)": { - "args": ["this", "time", "result", "buf"], + "args": ["this", "time", "tag-pair", "buf"], "vars": { "t0-2": "tag-lo", "t1-2": "tag-hi", "v1-6": "elt-count", "f0-2": "interp", "a1-6": "src-lo", - "a2-13": "src-hi" + "a2-13": "src-hi", + "a0-4": "lower-tag", + "a1-4": "lump", + "a2-7": "lower-tag", + "a0-16": "interp-factor", + "a0-17": "inverse-interp", + "t0-17": "src-lo-address", + "t0-19": "src-hi-address", + "a0-19": "lower-tag", + "a0-8": "i", + "a0-9": "fixed-interp", + "a0-10": "fixed-interp", + "a0-11": "fixed-interp", + "a0-12": "fixed-interp", + "a0-13": "fixed-interp", + "a0-14": "fixed-interp", + "a0-15": "fixed-interp", + "t0-9": "i", + "t0-10": "i", + "t0-11": "i", + "t0-12": "i", + "t0-13": "i", + "t0-14": "i", + "t0-15": "i", + "a0-18": "i" } }, "(method 3 res-lump)": { @@ -1822,7 +3861,8 @@ "a2-1": "tag-pair", "s1-0": "tag", "s0-0": "tag-type", - "gp-1": "data" + "gp-1": "data", + "a0-2": "tag-index" } }, "(method 12 res-lump)": { @@ -1831,7 +3871,10 @@ "a2-1": "tag-pair", "s1-0": "tag", "s0-0": "tag-type", - "gp-1": "data" + "gp-1": "data", + "a0-2": "tag-index", + "v1-8": "unsigned-value", + "v1-11": "signed-value" } }, "(method 16 res-lump)": { @@ -1846,19 +3889,50 @@ } }, "(method 15 res-lump)": { + "args": ["this", "tag"], "vars": { "s5-0": ["tag-pair", "res-tag-pair"], "s2-0": "existing-tag", "s3-0": "data-size", - "v1-25": "resource-mem" + "v1-25": "resource-mem", + "s4-1": ["tag", "res-tag"], + "a0-22": "tag-before-offset" } }, "(method 17 res-lump)": { + "args": ["this", "tag", "data"], "vars": { "a0-2": "new-tag", - "s4-0": "tag-mem" + "s4-0": "tag-mem", + "v1-2": "lump", + "a1-1": "stored-tag", + "a2-1": "byte-count" } }, + "(method 18 res-lump)": { + "args": ["this", "tag", "value"], + "vars": { + "sv-16": "value-copy", + "v1-0": "input-tag", + "a1-4": "inline-tag" + } + }, + "(method 21 res-lump)": { + "args": ["this", "curve-target", "points-name", "knots-name", "time"], + "vars": { + "s5-0": "result", + "sv-16": ["points-tag", "res-tag"], + "a0-2": "curve-data", + "sv-32": ["knots-tag", "res-tag"], + "a0-6": "curve-data" + } + }, + "(method 13 res-lump)": { + "args": ["this", "i"] + }, + "(method 14 res-lump)": { + "args": ["this", "tag"] + }, "(method 8 res-lump)": { "args": ["this", "block", "flags"], "vars": { @@ -1866,35 +3940,208 @@ "s2-0": "mem-use-name", "v1-22": "obj-size", "s1-0": "tag-idx", - "s0-0": "tag-data" + "s0-0": "tag-data", + "sv-16": "i", + "a1-4": "lump", + "a0-15": "tag-index", + "v1-47": "object-size", + "v1-63": "object-size", + "a0-58": "element", + "v1-88": "object-size" } }, "(method 0 fact-info-target)": { + "args": ["allocation", "type-to-make", "owner", "kind", "amount"], "vars": { "gp-0": "this" } }, "(method 0 fact-info-enemy)": { + "args": ["allocation", "type-to-make", "owner", "kind", "amount"], "vars": { "gp-0": "this", - "s5-0": "entity" + "s5-0": "entity-lump" } }, "(method 0 fact-info)": { - "args": ["allocation", "type-to-make", "proc", "pkup-type", "pkup-amount"], + "args": ["allocation", "type-to-make", "owner", "kind", "amount"], "vars": { "gp-0": ["this", "fact-info"], - "s5-0": "ent", - "sv-16": "tag" + "s5-0": "entity-lump", + "sv-16": "tag", + "v1-6": "eco-info", + "a0-6": "eco-info-count" } }, + "(method 11 fact-info)": { + "args": ["this", "kind", "amount", "source-handle"] + }, + "pickup-type->string": { + "args": ["kind"] + }, "(method 0 align-control)": { + "args": ["allocation", "type-to-make", "owner"], "vars": { "v0-0": ["this", "align-control"] } }, + "(method 9 align-control)": { + "args": ["this"], + "vars": { + "a0-9": "disable-alignment?", + "s5-0": "active-channel-count", + "s4-0": "channel-index", + "a0-3": "channel", + "v1-5": "channel-frame-group", + "a0-4": "channel-command", + "a1-0": "stack-command", + "a2-0": "stack-command?", + "a0-8": "root-channel", + "v1-16": "current-frame-group", + "f0-0": "current-frame", + "a2-5": "previous-matrix-vectors", + "a3-0": "prior-matrix-samples", + "v1-19": "current-matrix-row-0", + "a0-18": "current-matrix-row-1", + "a1-12": "current-matrix-row-2", + "a3-1": "current-matrix-row-3", + "s5-1": "alignment-joint", + "v1-23": "matrix-samples", + "a3-2": "bone-matrix-vectors", + "a0-21": "bone-matrix-row-0", + "a1-14": "bone-matrix-row-1", + "a2-6": "bone-matrix-row-2", + "a3-3": "bone-matrix-row-3", + "a2-8": "inverse-scale-matrix", + "a1-24": "inverse-previous-rotation" + } + }, + "(method 10 align-control)": { + "args": ["this", "options", "x-scale", "y-scale", "z-scale"], + "vars": { + "a0-1": "owner", + "t9-0": "apply-alignment-method", + "v1-4": "alignment-delta", + "t1-0": "motion-scale" + } + }, + "(method 11 align-control)": { + "args": ["this", "options", "desired-travel", "unused", "y-scale", "animation-speed-scale"], + "vars": { + "s5-0": "alignment-delta", + "s3-0": "velocity", + "f0-8": "speed", + "t9-2": "normalize-xz!" + } + }, + "(method 12 align-control)": { + "args": ["this"] + }, + "(method 13 align-control)": { + "args": ["this"] + }, + "(method 26 trsqv)": { + "args": ["this", "flags", "desired-travel", "max-speed"], + "vars": { + "gp-0": "velocity", + "f0-4": "limited-speed" + } + }, + "sound-name-with-material": { + "args": ["base-name", "ground-surface", "suffix"], + "vars": { + "gp-0": "format-fn", + "a0-2": "name-buffer", + "a1-1": "name-template", + "v1-1": "material" + } + }, + "effect-param->sound-spec": { + "args": ["specification", "parameters", "value-count"] + }, + "(method 9 effect-control)": { + "args": ["this"], + "vars": { + "a0-1": "skel-controller", + "v1-3": "channel", + "s5-0": "frame-group", + "f30-0": "artist-frame", + "a0-3": "frame-function", + "f28-0": "previous-frame", + "f26-0": "current-frame", + "v1-6": "first-effect-tag-index", + "f0-6": "seek-frame" + } + }, + "(method 14 effect-control)": { + "args": ["this", "lower-frame", "upper-frame", "exact-frame"], + "vars": { + "s2-0": "tag-cursor", + "f0-0": "key-frame", + "a0-1": "controller", + "t9-0": "dispatch-effect", + "v1-7": "resource-lump", + "a1-1": "tag-data" + } + }, + "(method 10 effect-control)": { + "args": ["this", "effect-name", "frame", "joint-index"], + "vars": { + "s3-0": "effect-value", + "s5-0": "resolved-joint-index", + "v0-0": "joint-property", + "v1-10": "effect-name-string", + "v1-18": "group-name-string", + "s3-1": "root-transform", + "v1-14": "moving-root", + "t1-1": "ground-surface-value", + "v0-5": "launch-group-pointer", + "v1-67": "draw-state", + "a1-42": "vertex-skip", + "a0-55": "death-timer", + "a2-29": "run-time" + } + }, + "(method 11 effect-control)": { + "args": ["this", "effect-name", "frame", "joint-index", "resource-lump", "ground-surface"], + "vars": { + "s1-0": "effect-sound", + "a0-4": "run-time", + "a0-13": "land-poof-controller", + "t9-8": "dispatch-land-poof", + "v1-15": "land-poof-material", + "a0-14": "run-poof-controller", + "t9-9": "dispatch-run-poof", + "v1-20": "run-poof-material", + "a0-15": "footprint-controller", + "t9-10": "dispatch-footprint", + "v1-24": "footprint-material", + "a0-16": "just-poof-controller", + "t9-11": "dispatch-just-poof", + "v1-29": "just-poof-material", + "a0-19": "slide-poof-controller", + "t9-12": "dispatch-slide-poof", + "v1-33": "slide-poof-material", + "v1-36": "droppings-material", + "v1-61": "jump-droppings-material", + "s0-0": "droppings-particle", + "s0-1": "jump-droppings-particle" + } + }, + "(method 12 effect-control)": { + "args": ["this", "effect-name", "frame", "joint-index", "resource-lump", "effect-sound"], + "vars": { + "sv-144": "lump", + "s0-0": "sound-to-play", + "gp-0": "specification", + "s5-0": "joint-position", + "sv-112": "parameter-tag", + "a1-7": "parameter-data", + "sv-128": "sound-name-address" + } + }, "str-load": { - "args": ["name", "chunk-id", "address", "len"], + "args": ["name", "chunk-id", "address", "max-length"], "vars": { "s2-0": ["cmd", "load-chunk-msg"] } @@ -1906,7 +4153,7 @@ } }, "str-play-async": { - "args": ["name", "addr"], + "args": ["name", "id"], "vars": { "s4-0": "cmd" } @@ -1944,7 +4191,7 @@ } }, "dgo-load-begin": { - "args": ["name", "buffer1", "buffer2", "current-heap"], + "args": ["name", "buffer1", "buffer2", "buffer-top"], "vars": { "s2-0": "cmd" } @@ -1957,7 +4204,7 @@ } }, "dgo-load-continue": { - "args": ["current-heap"], + "args": ["buffer-top"], "vars": { "gp-0": "cmd" } @@ -1979,17 +4226,25 @@ "s4-0": "obj-data" } }, + "destroy-mem": { + "args": ["start", "end"] + }, "ramdisk-load": { - "args": ["file-id", "offset", "length", "buffer"], + "args": ["file-id", "offset", "length", "destination"], "vars": { "v1-1": "cmd" } }, + "mc-sync": { + "vars": { + "v0-0": "result" + } + }, "show-mc-info": { "args": ["dma-buf"], "vars": { "s5-0": "info", - "s4-0": "slot-idx" + "s4-0": "slot" } }, "(method 19 res-lump)": { @@ -2057,25 +4312,78 @@ "(method 9 collide-history)": { "args": ["this", "cshape", "xs", "transv", "transv-out"] }, - "add-debug-sphere-from-table": { + "make-debug-sphere-table": { + "args": ["table"], "vars": { - "s1-0": ["points", "(inline-array vector)"] + "s5-0": "unit-center", + "f30-0": "unit-radius", + "s4-0": "point-index", + "s3-0": "latitude-index", + "f28-0": "ring-radius", + "f26-0": "next-ring-radius", + "s2-0": "cell-point", + "s1-0": "longitude-neighbor", + "s0-0": "latitude-neighbor", + "sv-80": "longitude-index" + } + }, + "add-debug-sphere-from-table": { + "args": ["bucket", "center", "radius", "color"], + "vars": { + "s4-0": "cell-point", + "s3-0": "longitude-neighbor", + "s2-0": "latitude-neighbor", + "s1-0": ["points", "(inline-array vector)"], + "s0-0": "i" } }, "entity-actor-lookup": { - "args": ["lump", "name", "idx"] + "args": ["lump", "name", "idx"], + "vars": { + "v1-1": "refs" + } }, "(method 0 actor-link-info)": { "args": ["allocation", "type-to-make", "proc"], "vars": { "s5-0": "this", - "a0-1": "ent" + "a0-1": "ent", + "a0-2": "prev-ent" + } + }, + "(method 11 actor-link-info)": { + "args": ["this"], + "vars": { + "a0-1": "ent", + "a0-2": "ent" + } + }, + "(method 16 actor-link-info)": { + "args": ["this", "callback", "context"], + "vars": { + "s3-0": "actor" + } + }, + "(method 17 actor-link-info)": { + "args": ["this", "callback", "context"], + "vars": { + "s3-0": "actor" + } + }, + "(method 18 actor-link-info)": { + "args": ["this", "callback", "context"], + "vars": { + "s4-0": "actor", + "a0-2": "current", + "a0-4": "current" } }, "(method 25 actor-link-info)": { "vars": { "s5-0": "actor", - "gp-0": "count" + "gp-0": "count", + "a0-2": "current", + "a0-3": "current" } }, "(method 9 actor-link-info)": { @@ -2083,21 +4391,42 @@ "vars": { "s3-0": "actor", "s5-0": "mask", - "s4-0": "current-bit" + "s4-0": "current-bit", + "a0-2": "current", + "a0-3": "current" } }, "(method 10 actor-link-info)": { "vars": { "s5-0": "this-actor", "s4-0": "actor", - "gp-0": "count" + "gp-0": "count", + "a0-2": "current", + "a0-3": "current" } }, "alt-actor-list-subtask-incomplete-count": { + "args": ["proc"], "vars": { "s4-0": "alt-actor-count", "gp-0": "incomplete-count", - "s3-0": "alt-actor-idx" + "s3-0": "i", + "a0-3": "alt-actor" + } + }, + "actor-link-subtask-complete-hook": { + "args": ["actor", "result"] + }, + "actor-link-dead-hook": { + "args": ["actor", "result"] + }, + "sound-name=": { + "args": ["left-name", "right-name"] + }, + "current-str-pos": { + "args": ["id"], + "vars": { + "v0-0": "position" } }, "check-irx-version": { @@ -2106,16 +4435,20 @@ } }, "sound-bank-load": { + "args": ["name"], "vars": { + "gp-0": "id", "v1-1": ["cmd", "sound-rpc-load-bank"] } }, "sound-bank-unload": { + "args": ["name"], "vars": { "v1-1": ["cmd", "sound-rpc-unload-bank"] } }, "sound-music-load": { + "args": ["name"], "vars": { "v1-1": ["cmd", "sound-rpc-load-music"] } @@ -2131,6 +4464,7 @@ } }, "set-language": { + "args": ["language"], "vars": { "v1-1": ["cmd", "sound-rpc-set-language"] } @@ -2140,17 +4474,54 @@ "v1-1": ["cmd", "sound-rpc-list-sounds"] } }, + "sound-command->string": { + "args": ["command"] + }, + "sound-buffer-dump": { + "vars": { + "gp-0": "command-count", + "s5-0": "command-size", + "s4-0": "i", + "s3-0": ["cmd", "sound-rpc-play"], + "a3-0": "command-name" + } + }, + "swap-sound-buffers": { + "args": ["ear-position", "camera-position", "camera-angle"], + "vars": { + "a0-2": ["command-buffer", "rpc-buffer"] + } + }, + "sound-basic-cb": { + "args": ["value", "result"] + }, + "sound-trans-convert": { + "args": ["dest", "src"], + "vars": { + "v1-0": "position" + } + }, + "sound-angle-convert": { + "args": ["angle"], + "vars": { + "f0-3": "signed-angle", + "v0-0": "degrees" + } + }, "sound-set-volume": { + "args": ["group", "volume"], "vars": { "v1-0": ["cmd", "sound-rpc-set-master-volume"] } }, "sound-set-reverb": { + "args": ["reverb", "left", "right", "core"], "vars": { "v1-0": ["cmd", "sound-rpc-set-reverb"] } }, "sound-set-ear-trans": { + "args": ["ear-position", "camera-position", "camera-angle"], "vars": { "gp-0": ["cmd", "sound-rpc-set-ear-trans"] } @@ -2164,61 +4535,77 @@ } }, "sound-play-by-spec": { - "args": ["spec", "id", "trans"], + "args": ["spec", "id", "sound-trans"], "vars": { "s5-0": ["cmd", "sound-rpc-play"], "s3-1": ["proc", "process-drawable"] } }, "sound-pause": { + "args": ["id"], "vars": { "v1-0": ["cmd", "sound-rpc-pause-sound"] } }, "sound-stop": { + "args": ["id"], "vars": { "v1-0": ["cmd", "sound-rpc-stop-sound"] } }, "sound-continue": { + "args": ["id"], "vars": { "v1-0": ["cmd", "sound-rpc-continue-sound"] } }, "sound-group-pause": { + "args": ["group"], "vars": { "v1-0": ["cmd", "sound-rpc-pause-group"] } }, "sound-group-stop": { + "args": ["group"], "vars": { "v1-0": ["cmd", "sound-rpc-stop-group"] } }, "sound-group-continue": { + "args": ["group"], "vars": { "v1-0": ["cmd", "sound-rpc-continue-group"] } }, "sound-set-falloff-curve": { + "args": ["curve", "falloff", "ease"], "vars": { "v1-0": ["cmd", "sound-rpc-set-falloff-curve"] } }, "sound-set-sound-falloff": { + "args": ["name", "falloff-min", "falloff-max", "curve"], "vars": { "v1-0": ["cmd", "sound-rpc-set-sound-falloff"] } }, "sound-set-flava": { + "args": ["flava"], "vars": { "v1-0": ["cmd", "sound-rpc-set-flava"] } }, "(method 0 ambient-sound)": { + "args": ["allocation", "type-to-make", "src", "sound-trans"], "vars": { "s5-1": ["this", "ambient-sound"], - "v1-2": "bc" + "v1-2": "effect-name", + "sv-16": ["spec", "sound-spec"], + "sv-32": ["name", "sound-name"], + "sv-48": ["sound-times", "(pointer float)"], + "sv-52": ["params", "sound-play-parms"], + "sv-56": ["param-count", "int"], + "sv-64": ["tag", "res-tag"] } }, "(method 9 ambient-sound)": { @@ -2228,18 +4615,41 @@ } }, "(method 11 ambient-sound)": { + "args": ["this", "sound-trans"], "vars": { "gp-0": ["cmd", "sound-rpc-set-param"] } }, "(method 12 ambient-sound)": { + "args": ["this", "volume"], "vars": { "v1-2": ["cmd", "sound-rpc-set-param"] } }, - "sound-buffer-dump": { + "(method 10 ambient-sound)": { + "args": ["this", "name"] + }, + "show-iop-info": { + "args": ["buf"], "vars": { - "s3-0": ["cmd", "sound-rpc-play"] + "s5-0": "channel", + "s5-1": "channel" + } + }, + "show-iop-memory": { + "args": ["buf"] + }, + "make-sqrt-table": { + "vars": { + "gp-0": "i", + "f0-2": "root", + "a2-0": "rounded-root" + } + }, + "flava-lookup": { + "args": ["music", "event"], + "vars": { + "v1-0": "i" } }, "(method 0 path-control)": { @@ -2257,6 +4667,9 @@ "vars": { "gp-0": "this", "s3-1": "ent", + "v1-2": "curve-name", + "s2-0": "knot-name", + "s2-1": "intern-symbol", "v1-3": "lookup-entity" } }, @@ -2281,9 +4694,22 @@ "a0-3": "ent" } }, + "(method 10 nav-control)": { + "args": ["this", "point"], + "vars": { + "v1-1": "bounds" + } + }, + "(method 15 nav-control)": { + "args": ["this", "pos"] + }, + "has-nav-mesh?": { + "args": ["ent"] + }, "add-debug-point": { "args": ["enable-draw", "bucket", "pt"], "vars": { + "s5-0": "point-data", "a0-6": ["a0-6", "(pointer uint64)"], "a0-7": ["a0-7", "dma-packet"], "a3-0": ["a3-0", "dma-packet"], @@ -2296,9 +4722,18 @@ } }, "internal-draw-debug-line": { + "args": ["bucket", "p0", "p1", "first-color", "mode", "second-color"], "vars": { - "s2-0": ["s2-0", "rgba"], - "s5-0": ["s5-0", "rgba"], + "sv-80": ["end-point", "vector"], + "s2-0": ["line-color", "rgba"], + "s3-0": "line-mode", + "s5-0": ["line-color2", "rgba"], + "a0-4": "dma-buff", + "s4-0": "projected-points", + "s1-0": "colors", + "v1-28": "line-dma-buff", + "f0-3": "depth-scale", + "f0-7": "depth-scale", "a3-1": ["a3-1", "dma-packet"], "a3-3": ["a3-3", "gs-gif-tag"], "a1-43": ["a1-43", "(inline-array vector4w-2)"], @@ -2307,7 +4742,11 @@ } }, "add-debug-flat-triangle": { + "args": ["enable-draw", "bucket", "p0", "p1", "p2", "color"], "vars": { + "s5-0": "projected-points", + "s4-0": "colors", + "v1-9": "dma-buff", "a3-1": ["a3-1", "dma-packet"], "a3-3": ["a3-3", "gs-gif-tag"], "a3-5": ["a3-5", "(inline-array vector4w-3)"], @@ -2316,7 +4755,11 @@ } }, "add-debug-line2d": { + "args": ["enable-draw", "bucket", "p0", "p1", "color"], "vars": { + "s4-0": "dma-buff", + "s2-0": "projected-p0", + "v1-7": "projected-p1", "a2-3": ["a2-3", "dma-packet"], "a2-5": ["a2-5", "gs-gif-tag"], "a2-7": ["a2-7", "(inline-array vector4w)"], @@ -2326,27 +4769,229 @@ } }, "debug-percent-bar": { + "args": ["enable-draw", "bucket", "x", "y", "fraction", "color"], "vars": { + "s0-0": "dma-buff", + "s5-0": "packet-start", + "a3-3": "packet-end", "v1-5": ["v1-5", "dma-packet"] } }, "debug-pad-display": { + "args": ["pad"], "vars": { + "gp-0": ["history", "(inline-array vector)"], + "v1-0": "i", + "s5-1": "i", + "s3-0": "dma-buff", "v1-12": ["v1-12", "dma-packet"] } }, "internal-draw-debug-text-3d": { + "args": ["bucket", "text", "location", "font-color-id", "offset"], "vars": { + "s2-0": "projected", + "s3-0": "dma-buff", + "a2-2": ["font-ctx", "font-context"], + "v1-9": ["ctx", "font-context"], "v1-11": ["v1-11", "dma-packet"] } }, + "transform-float-point": { + "args": ["in", "out"] + }, + "add-debug-triangle-normal": { + "args": ["enable-draw", "bucket", "p0", "p1", "p2", "color"], + "vars": { + "s4-0": "center", + "s3-0": "normal-end" + } + }, + "debug-draw-buffers": { + "vars": { + "gp-0": "i", + "v1-1": ["line", "debug-line"], + "gp-1": "i", + "v1-8": ["text", "debug-text-3d"] + } + }, + "add-debug-line": { + "args": ["enable-draw", "bucket", "p0", "p1", "color", "mode", "color2"], + "vars": { + "v1-2": ["line", "debug-line"] + } + }, + "add-debug-box": { + "args": ["enable-draw", "bucket", "min-point", "max-point", "color"], + "vars": { + "s5-0": "start", + "s1-0": "end" + } + }, + "add-debug-x": { + "args": ["enable-draw", "bucket", "center", "color"], + "vars": { + "s3-0": "start", + "s2-0": "end" + } + }, + "add-debug-text-3d": { + "args": ["enable-draw", "bucket", "text", "location", "font-color-id", "offset"], + "vars": { + "v1-2": ["buffered-text", "debug-text-3d"], + "a0-6": "length", + "a1-2": "src", + "v1-4": "dst" + } + }, + "add-debug-sphere-with-transform": { + "args": ["enable-draw", "bucket", "point", "radius", "xform", "color"], + "vars": { + "a2-1": ["world-point", "vector"] + } + }, + "add-debug-sphere": { + "args": ["enable-draw", "bucket", "center", "radius", "color"] + }, + "add-debug-text-sphere": { + "args": ["enable-draw", "bucket", "center", "radius", "text", "color"] + }, + "add-debug-spheres": { + "args": ["enable-draw", "bucket", "centers", "count", "color"], + "vars": { + "s4-0": "center", + "s3-0": "remaining" + } + }, + "add-debug-circle": { + "args": ["enable-draw", "bucket", "center", "radius", "color", "orientation"], + "vars": { + "f30-0": "angle", + "s1-0": "start-point", + "s0-0": "end-point", + "sv-48": "i", + "sv-64": ["start", "vector"], + "sv-80": ["end", "vector"] + } + }, + "add-debug-vector": { + "args": ["enable-draw", "bucket", "origin", "direction", "length", "color"], + "vars": { + "v1-2": "end" + } + }, + "add-debug-matrix": { + "args": ["enable-draw", "bucket", "xform"] + }, + "add-debug-rot-matrix": { + "args": ["enable-draw", "bucket", "rotation", "origin"] + }, + "add-debug-yrot-vector": { + "args": ["enable-draw", "bucket", "origin", "yrot", "length", "color"], + "vars": { + "sv-32": "angle", + "s0-0": "draw-length", + "s3-0": "draw-color", + "s1-0": "end" + } + }, + "add-debug-arc": { + "args": ["enable-draw", "bucket", "center", "start-angle", "end-angle", "radius", "color", "orientation"], + "vars": { + "f30-0": "angle", + "sv-48": ["start-point", "vector"], + "sv-64": ["end-point", "vector"], + "sv-80": "i", + "sv-96": ["start", "vector"], + "sv-112": ["end", "vector"] + } + }, + "add-debug-curve": { + "args": ["enable-draw", "bucket", "cverts", "num-cverts", "knots", "num-knots", "color"], + "vars": { + "s0-0": "previous", + "sv-48": ["current", "vector"], + "sv-64": "segment-count", + "sv-80": "i" + } + }, + "add-debug-curve2": { + "args": ["enable-draw", "bucket", "curve-data", "color", "unused-option"] + }, + "add-debug-points": { + "args": ["enable-draw", "bucket", "points", "count", "color", "fixed-y", "highlight-index"], + "vars": { + "s0-0": "i", + "sv-96": ["point", "vector"], + "sv-32": "draw-text", + "sv-48": "draw-enabled", + "sv-64": "draw-bucket" + } + }, + "add-debug-light": { + "args": ["enable-draw", "bucket", "light-data", "origin", "label"], + "vars": { + "s2-1": "position", + "s1-0": "packed-color", + "t0-2": "text" + } + }, + "add-debug-lights": { + "args": ["enable-draw", "bucket", "lights", "origin"] + }, + "drawable-frag-count": { + "args": ["drawable-data"], + "vars": { + "gp-0": "count", + "s4-0": "i" + } + }, + "(method 3 debug-vertex-stats)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "s4-0": ["vertex", "debug-vertex"] + } + }, + "history-init": { + "args": ["history", "num-points"] + }, + "history-draw-and-update": { + "args": ["history", "draw-enabled", "position"], + "vars": { + "s5-1": "i" + } + }, + "dma-timeout-cam": { + "vars": { + "a0-0": "position", + "a1-0": "rotation" + } + }, + "display-file-info": { + "vars": { + "gp-0": "i", + "v1-7": ["level-data", "level"], + "s5-0": ["bsp-data", "bsp-header"] + } + }, + "generic-dma-foreground-sink-init": { + "args": ["sink"] + }, "generic-init-buffers": { "vars": { "v1-8": ["packet", "dma-packet"], - "gp-0": ["gp-0", "gs-zbuf"], - "s5-0": ["s5-0", "gs-zbuf"] + "gp-0": ["normal-zbuf", "gs-zbuf"], + "s5-0": ["water-zbuf", "gs-zbuf"], + "s4-0": "i", + "s1-0": "sink", + "s3-0": "bucket", + "s0-0": "dma-buf" } }, + "generic-sink": { + "args": ["i"] + }, "level-update-after-load": { "args": ["loaded-level", "level-login-state"], "vars": { @@ -2356,39 +5001,122 @@ "v1-5": "elapsed-timer", "s2-0": "current-login-pos", "s2-1": ["current-drawable", "drawable-tree"], - "s1-0": "idx-in-drawable" + "s1-0": "drawable-index", + "sv-16": ["current-prototype", "prototype-bucket-tie"], + "sv-32": ["geometry-index", "int"], + "v1-39": "art-index", + "s2-2": "current-art-group", + "s1-1": "queued-drawable", + "s0-0": "batch-index", + "s1-2": "prototypes", + "s0-1": "batch-index", + "a0-28": "tie-geometry", + "s2-3": "prototype-index", + "s0-2": "envmap-shader", + "v1-115": "bsp-data", + "a0-36": "actor-data", + "f0-0": "close-distance", + "f1-0": "far-distance", + "v1-154": "final-timer" } }, "(method 9 setting-data)": { + "args": ["this", "settings-engine"], "vars": { - "s3-0": ["conn", "connection"] + "s3-0": ["request", "connection"], + "s4-0": ["previous-request", "connectable"] } }, "(method 12 level)": { + "args": ["this"], "vars": { - "s5-3": ["s5-3", "pair"] + "s5-0": "art-index", + "s4-0": "current-art-group", + "s5-1": "texture-index", + "v1-27": "common-index", + "s5-2": "buffer-index", + "v1-41": "pending-file", + "s5-3": ["packages", "pair"], + "a0-29": "package", + "v1-64": "level-heap" } }, "update-sound-banks": { "vars": { - "t0-0": ["t0-0", "symbol"] + "gp-0": "required-bank-a", + "s5-0": "required-bank-b", + "s4-0": "level-index", + "v1-5": "active-level", + "s3-0": "banks", + "t0-0": ["bank", "symbol"] } }, "(method 16 level-group)": { + "args": ["this"], "vars": { - "s1-0": ["s1-0", "continue-point"] + "s5-0": "load-slot", + "s5-1": "level-index", + "s4-0": "active-level", + "s5-2": "level-index", + "s4-1": "active-level", + "s3-0": "nearest-continue", + "s2-0": "target-position", + "s4-2": "continues", + "s1-0": ["candidate-continue", "continue-point"], + "v1-67": "level-index", + "a0-26": "active-level", + "a1-10": "vis-index", + "s5-3": "level-index", + "s4-3": "active-level", + "s3-1": "border-flags", + "s2-1": "neighbor-index", + "v1-88": "neighbor-info", + "s5-4": "level-index", + "s4-4": "active-level", + "v1-125": "level-index", + "a0-44": "active-level", + "a1-17": "vis-index", + "a2-18": "vis-record", + "a0-46": "self-vis", + "a0-48": "self-vis", + "a0-50": "adjacent-vis", + "s5-5": "level-index", + "s4-5": "active-level", + "v1-142": "target-level-name", + "t9-16": "format-function", + "a0-53": "output", + "a1-49": "format-string", + "a2-24": "vis-nick" } }, "(method 20 level)": { + "args": ["this"], "vars": { - "s3-0": ["s3-0", "ramdisk-rpc-fill"] + "v1-10": "other-vis", + "s4-0": "vis-filename", + "s3-0": ["request", "ramdisk-rpc-fill"], + "s5-0": "ramdisk-id" + } + }, + "(top-level-login level)": { + "vars": { + "gp-0": "level-group-data", + "s5-0": "i", + "s4-0": "level-data", + "v1-36": "i", + "a0-50": "level-data", + "a1-46": "sink-index" } }, "(method 9 game-info)": { "args": ["this", "cause", "save-to-load", "continue-point-override"], "vars": { + "v0-0": "death-count", "v1-0": "selected-cause", - "s4-1": "lev-info" + "s4-1": "level-info", + "v1-50": "i", + "v1-53": "i", + "v1-65": "mode" } }, "(method 10 game-info)": { @@ -2400,9 +5128,112 @@ "s4-2": "buzz-index", "f30-0": "buzz-count", "s3-0": "ctrl", - "s5-2": "buzz-bits" + "s5-2": "buzz-bits", + "s5-1": "task", + "v1-58": "i" } }, + "(method 9 border-plane)": { + "args": ["this"], + "vars": { + "v1-0": "action", + "s5-0": "color" + } + }, + "(method 10 border-plane)": { + "args": ["this", "point"] + }, + "(method 11 game-info)": { + "args": ["this", "task"] + }, + "(method 17 game-info)": { + "args": ["this"], + "vars": { + "gp-0": "continue" + } + }, + "(method 18 game-info)": { + "args": ["this", "name"], + "vars": { + "s5-0": "level-list", + "s4-0": "continue-list", + "s3-0": "continue" + } + }, + "(method 19 game-info)": { + "args": ["this", "continue"], + "vars": { + "s5-0": "old-continue", + "v1-5": "named-continue", + "s4-3": "default-continue" + } + }, + "(method 13 game-info)": { + "args": ["this", "task"] + }, + "(method 23 game-info)": { + "args": ["this", "task", "index"] + }, + "(method 20 game-info)": { + "args": ["this", "task"], + "vars": { + "v1-1": "buzzer-bits", + "v0-2": "count", + "a0-4": "i" + } + }, + "(method 21 game-info)": { + "args": ["this", "text"] + }, + "(method 22 game-info)": { + "args": ["this", "text"] + }, + "(method 26 game-info)": { + "args": ["this", "text"] + }, + "(method 10 fact-info-target)": { + "args": ["this", "field"] + }, + "(method 12 game-info)": { + "args": ["this", "aid"], + "vars": { + "v1-0": "perms", + "a0-1": "i" + } + }, + "(method 9 continue-point)": { + "args": ["this"], + "vars": { + "a3-2": "forward" + } + }, + "trsq->continue-point": { + "args": ["transform"], + "vars": { + "a2-0": "target-level", + "gp-1": "camera" + } + }, + "game-task->string": { + "args": ["task"] + }, + "(method 16 game-info)": { + "args": ["this", "category"], + "vars": { + "s4-0": "i", + "s5-1": "perms", + "s4-1": "i" + } + }, + "(method 27 game-info)": { + "args": ["this", "per-level?"], + "vars": { + "v1-13": "deaths" + } + }, + "(method 28 game-info)": { + "args": ["this", "unused"] + }, "(method 14 game-info)": { "args": ["this", "lev"], "vars": { @@ -2426,9 +5257,47 @@ "args": ["this", "save"], "vars": { "v1-0": ["save-data", "game-save-tag"], + "a0-1": "setting-kind", "s4-0": ["data", "game-save-tag"], "v1-9": "old-base-frame", - "v1-10": "frame-counter-diff" + "v1-10": "frame-counter-diff", + "v1-34": "count", + "a0-76": "i", + "v1-38": "count", + "a0-80": "i", + "s3-2": "count", + "s2-0": "i", + "s3-4": "count", + "s2-1": "i", + "v1-61": "byte-count", + "a0-94": "saved-byte-count", + "a1-35": "i", + "v1-65": "hint-data", + "a0-99": "i", + "v1-79": "count", + "a0-122": "i", + "v1-83": "count", + "a0-126": "i", + "v1-87": "count", + "a0-130": "i", + "v1-92": "count", + "a0-133": "i", + "s4-1": "i", + "a1-68": "lev", + "s5-1": "task", + "s4-2": "last-task" + } + }, + "(method 0 game-save)": { + "args": ["allocation", "type-to-make", "tag-capacity"], + "vars": { + "v0-0": "save" + } + }, + "(method 9 game-save)": { + "args": ["this", "filename"], + "vars": { + "s5-0": "stream" } }, "(method 10 game-save)": { @@ -2444,26 +5313,167 @@ "vars": { "s4-0": ["tag", "game-save-tag"], "s3-0": "tag-idx", + "v1-0": "tag-kind", "s2-1": "prog-lev-idx", - "a2-13": "lev-name" + "a2-13": "lev-name", + "s2-2": "prog-lev-idx", + "a2-14": "lev-name", + "s2-3": "prog-lev-idx", + "a2-15": "lev-name", + "s2-4": "task", + "a2-16": "task-name" } }, - "debug-menu-func-decode": { + "(method 24 game-info)": { + "args": ["this", "save", "save-name"], "vars": { - "v0-0": ["ret-val", "symbol"] + "s3-0": "i", + "a1-1": "lev", + "s3-1": "clock", + "s3-2": "tag-base", + "s2-0": "name-tag", + "v1-37": "base-time-pos", + "a0-15": "base-time-tag", + "v1-38": "real-time-pos", + "a0-16": "real-time-tag", + "v1-39": "game-time-pos", + "a0-17": "game-time-tag", + "v1-40": "integral-time-pos", + "a0-18": "integral-time-tag", + "s4-1": "continue-pos", + "s3-3": "continue-name", + "s2-1": "continue-tag", + "v1-50": "life-pos", + "a0-24": "life-tag", + "v1-51": "buzzer-total-pos", + "a0-25": "buzzer-total-tag", + "v1-52": "fuel-cell-pos", + "a0-26": "fuel-cell-tag", + "v1-53": "death-movie-pos", + "a0-27": "death-movie-tag", + "v1-54": "money-pos", + "a0-28": "money-tag", + "v1-55": "money-total-pos", + "a0-29": "money-total-tag", + "v1-56": "money-per-level-pos", + "a0-30": "money-per-level-tag", + "v1-57": "money-per-level-data", + "a0-31": "i", + "v1-58": "level-open-pos", + "a0-34": "level-open-tag", + "v1-59": "level-open-data", + "a0-35": "i", + "v1-60": "perm-list-pos", + "s4-2": "perm-count", + "a0-39": "perm-list-tag", + "s3-4": "perm-data", + "s2-2": "i", + "v1-68": "task-list-pos", + "s4-3": "task-count", + "a0-45": "task-list-tag", + "s3-5": "task-data", + "s2-3": "i", + "a0-49": "text-list-pos", + "v1-79": "text-byte-count", + "a1-46": "text-list-tag", + "a0-50": "text-data", + "a1-47": "i", + "a0-51": "hint-list-pos", + "v1-84": "hint-count", + "a1-51": "hint-list-tag", + "a0-52": "hint-data", + "a1-52": "i", + "v1-86": "auto-save-count-pos", + "a0-54": "auto-save-count-tag", + "v1-87": "total-deaths-pos", + "a0-55": "total-deaths-tag", + "v1-88": "continue-deaths-pos", + "a0-56": "continue-deaths-tag", + "v1-89": "fuel-cell-deaths-pos", + "a0-57": "fuel-cell-deaths-tag", + "v1-90": "game-start-time-pos", + "a0-58": "game-start-time-tag", + "v1-91": "continue-time-pos", + "a0-59": "continue-time-tag", + "v1-92": "death-time-pos", + "a0-60": "death-time-tag", + "v1-93": "hit-time-pos", + "a0-61": "hit-time-tag", + "v1-94": "fuel-cell-pickup-time-pos", + "a0-62": "fuel-cell-pickup-time-tag", + "v1-95": "fuel-cell-time-pos", + "a0-63": "fuel-cell-time-tag", + "v1-96": "fuel-cell-time-data", + "a0-64": "i", + "v1-97": "deaths-per-level-pos", + "a0-67": "deaths-per-level-tag", + "v1-98": "deaths-per-level-data", + "a0-68": "i", + "v1-99": "enter-level-time-pos", + "a0-71": "enter-level-time-tag", + "v1-100": "enter-level-time-data", + "a0-72": "i", + "v1-101": "in-level-time-pos", + "a0-75": "in-level-time-tag", + "v1-102": "in-level-time-data", + "a0-76": "i", + "v1-103": "sfx-volume-pos", + "a0-79": "sfx-volume-tag", + "v1-104": "music-volume-pos", + "a0-80": "music-volume-tag", + "v1-105": "dialog-volume-pos", + "a0-81": "dialog-volume-tag", + "v1-106": "language-pos", + "a0-82": "language-tag", + "v1-107": "screenx-pos", + "a0-83": "screenx-tag", + "v1-108": "screeny-pos", + "a0-84": "screeny-tag", + "v1-109": "vibration-pos", + "a0-85": "vibration-tag", + "v1-110": "play-hints-pos", + "a0-86": "play-hints-tag", + "v1-111": "video-mode-pos", + "a0-87": "video-mode-tag", + "a1-121": "video-mode", + "v1-112": "aspect-ratio-pos", + "a0-88": "aspect-ratio-tag", + "a1-125": "aspect-ratio" + } + }, + "game-save-elt->string": { + "args": ["elt"] + }, + "progress-level-index->string": { + "args": ["progress-level-index"] + }, + "debug-menu-func-decode": { + "args": ["value"], + "vars": { + "v0-0": ["result", "symbol"], + "v1-1": "value-type" } }, "letterbox": { "vars": { "s5-0": "dma-buf", - "v1-5": ["pkt", "dma-packet"] + "gp-0": "packet-start", + "a3-2": "packet-end", + "v1-5": ["packet", "dma-packet"] } }, + "set-letterbox-frames": { + "args": ["duration"] + }, + "set-blackout-frames": { + "args": ["duration"] + }, "blackout": { "vars": { "s5-0": "dma-buf", - "gp-0": "sprite-dma-data", - "v1-4": ["pkt", "dma-packet"] + "gp-0": "packet-start", + "a3-1": "packet-end", + "v1-4": ["packet", "dma-packet"] } }, "set-master-mode": { @@ -2478,8 +5488,9 @@ "v1-158": "cheatmode-debug-state", "v1-303": "cheat-language-state", "v1-394": "cheat-pal-state", - "s5-9": "dma-buff", + "s5-9": "dma-buf", "gp-9": "dma-start", + "a3-9": "dma-end", "v1-533": ["dma-pkt", "dma-packet"], "gp-10": "timeout", "v1-548": "inactive-timeout", @@ -2487,12 +5498,18 @@ } }, "load-game-text-info": { - "args": ["txt-name", "curr-text", "heap"], + "args": ["group-name", "destination-symbol", "heap"], "vars": { - "sv-16": "heap-sym-heap", - "sv-24": "lang", - "sv-32": "load-status", - "sv-40": "heap-free" + "v0-2": "result", + "sv-16": "loaded-text", + "sv-24": "language-id", + "sv-32": "load-size", + "sv-40": "heap-free", + "v1-16": "text-heap", + "s3-0": "load-function", + "v1-20": "loader-status", + "s2-1": "link-address", + "s3-1": "link-function" } }, "(method 13 art-group)": { @@ -2512,6 +5529,7 @@ } }, "(method 16 process-drawable)": { + "args": ["this", "options", "animation-root", "motion-scale"], "vars": { "s3-0": "body-T-world", "s0-0": "world-T-body", @@ -2530,115 +5548,379 @@ "f0-10": "dpos" } }, + "(method 9 cam-float-seeker)": { + "args": ["this", "initial-value", "accel", "max-vel", "max-partial"] + }, + "(method 10 cam-float-seeker)": { + "args": ["this", "source"] + }, + "(method 12 cam-float-seeker)": { + "args": ["this", "offset"] + }, + "(method 9 cam-vector-seeker)": { + "args": ["this", "initial-value", "accel", "max-vel", "max-partial"] + }, + "(method 10 cam-vector-seeker)": { + "args": ["this", "offset"], + "vars": { + "gp-0": "error", + "f30-1": "partial-velocity-limit", + "f0-4": "velocity", + "f1-2": "velocity-limit" + } + }, + "float-save-redline": { + "args": ["value"] + }, + "float-lookup-redline": { + "args": ["position"], + "vars": { + "a0-3": "index" + } + }, + "float-save-blueline": { + "args": ["value"] + }, + "float-lookup-blueline": { + "args": ["position"], + "vars": { + "a0-3": "index" + } + }, + "float-save-greenline": { + "args": ["value"] + }, + "float-lookup-greenline": { + "args": ["position"], + "vars": { + "a0-3": "index" + } + }, + "float-save-yellowline": { + "args": ["value"] + }, + "float-lookup-yellowline": { + "args": ["position"], + "vars": { + "a0-3": "index" + } + }, + "float-save-timeplot": { + "args": ["value"] + }, + "float-lookup-timeplot": { + "args": ["position"], + "vars": { + "a0-3": "index" + } + }, "(method 9 trsqv)": { - "args": ["this", "dir", "vel", "frame-count"], + "args": ["this", "heading", "max-yaw-rate", "response-time"], "vars": { "f0-0": "yaw-error", "f1-2": "yaw-limit", "f30-0": "saturated-yaw", - "a1-2": "quat", + "a1-2": "rotation", "f0-2": "old-diff" } }, + "(method 10 trsqv)": { + "args": ["this", "heading"], + "vars": { + "s3-0": "rotation" + } + }, + "(method 11 trsqv)": { + "args": ["this", "target-point", "max-yaw-rate", "response-time"] + }, + "(method 12 trsqv)": { + "args": ["this", "target-point"], + "vars": { + "s3-0": "rotation" + } + }, "(method 13 trsqv)": { - "args": ["this", "yaw", "vel", "frame-count"] + "args": ["this", "yaw", "max-yaw-rate", "response-time"], + "vars": { + "s2-0": "heading" + } + }, + "(method 14 trsqv)": { + "args": ["this", "yaw"], + "vars": { + "s4-0": "heading" + } + }, + "(method 15 trsqv)": { + "args": ["this", "roll-offset"] }, "(method 16 trsqv)": { + "args": ["this", "roll-offset"], "vars": { - "s5-0": "quat", - "s1-0": "grav", - "s3-0": "rot-mat", - "s4-0": "dir-z", - "a0-4": "dir-x" + "s5-0": "rotation", + "s1-0": "world-up", + "s3-0": "rotation-matrix", + "s4-0": "forward", + "a0-4": "right", + "a1-5": "roll-matrix" } }, "(method 25 trsqv)": { "vars": { - "s5-0": "quat", - "gp-0": "dir-z", - "s5-1": "dir-y", - "a1-2": "dir-grav", - "v1-2": "grav-z-plane", - "f0-1": "grav-dot" + "s5-0": "rotation", + "gp-0": "forward", + "s5-1": "up", + "a1-2": "world-up", + "v1-2": "projected-up", + "f0-1": "roll-cosine" } }, "(method 17 trsqv)": { "args": ["this", "target", "y-rate", "z-rate"], "vars": { - "gp-0": "quat", - "s5-0": "temp-quat" + "gp-0": "rotation", + "s5-0": "increment" } }, + "(method 18 trsqv)": { + "args": ["this", "rotation"] + }, + "(method 19 trsqv)": { + "args": ["this", "heading"] + }, + "(method 20 trsqv)": { + "args": ["this", "target-point"] + }, + "transformq-copy!": { + "args": ["dst", "src"] + }, + "matrix<-transformq!": { + "args": ["dst", "src"] + }, + "matrix<-no-trans-transformq!": { + "args": ["dst", "src"] + }, + "matrix<-transformq+trans!": { + "args": ["dst", "src", "local-offset"] + }, + "matrix<-transformq+world-trans!": { + "args": ["dst", "src", "world-offset"] + }, + "matrix<-parented-transformq!": { + "args": ["dst", "src", "parent-scale"], + "vars": { + "v1-0": ["inverse-parent-scale", "vector"] + } + }, + "(method 23 trsqv)": { + "args": ["this", "point"] + }, + "(method 24 trsqv)": { + "args": ["this", "point"] + }, "raw-ray-sphere-intersect": { + "args": ["radius"], "vars": { "v0-0": ["result", "float"], "v1-0": ["v1-0", "float"] } }, "ray-sphere-intersect": { - "args": ["ray-origin", "ray-dir", "sph-origin", "radius"] + "args": ["ray-origin", "ray-direction", "sphere-origin", "radius"] }, "ray-circle-intersect": { - "args": ["ray-origin", "ray-dir", "circle-origin", "radius"] + "args": ["ray-origin", "ray-direction", "circle-origin", "radius"] }, "ray-cylinder-intersect": { "args": [ "ray-origin", - "ray-dir", - "cyl-origin", - "cyl-axis", - "cyl-rad", - "cyl-len" + "ray-direction", + "cylinder-origin", + "cylinder-axis", + "radius", + "cylinder-length", + "axis-point-out" ] }, - "(method 10 cylinder)": { - "args": ["this", "probe-origin", "probe-dir"], + "ray-plane-intersect": { + "args": [ + "intersection-out", + "normal-out", + "ray-origin", + "ray-direction", + "plane-a", + "plane-b", + "plane-c" + ] + }, + "ray-triangle-intersect": { + "args": [ + "ray-origin", + "ray-direction", + "radius", + "triangle", + "intersection-out", + "normal-out" + ] + }, + "collide-do-primitives": { + "args": [ + "sphere-start", + "sphere-motion", + "radius", + "triangle", + "contact-out" + ] + }, + "moving-sphere-triangle-intersect": { + "args": [ + "sphere-start", + "sphere-motion", + "radius", + "triangle", + "contact-out", + "normal-out" + ] + }, + "moving-sphere-sphere-intersect": { + "args": ["sphere-start", "sphere-motion", "static-sphere", "contact-out"], "vars": { - "f30-0": "result", - "f0-5": "u-origin-sph", - "s4-0": "end-pt", - "f0-8": "u-end-sphere" + "f30-0": ["contact-fraction", "float"], + "s3-1": ["contact-offset", "vector"] + } + }, + "moving-sphere-moving-sphere-intersect": { + "args": [ + "first-sphere", + "first-motion", + "second-sphere", + "second-motion", + "contact-out" + ], + "vars": { + "f30-0": ["contact-fraction", "float"], + "s3-1": ["contact-offset", "vector"] + } + }, + "(method 10 cylinder)": { + "args": ["this", "probe-origin", "probe-displacement"], + "vars": { + "t2-0": "axis-point", + "f30-0": "contact-fraction", + "f0-5": "origin-cap-fraction", + "s4-0": "end-center", + "f0-8": "end-cap-fraction" } }, "(method 10 cylinder-flat)": { - "args": ["this", "probe-origin", "probe-dir"], + "args": ["this", "probe-origin", "probe-displacement"], "vars": { - "f30-0": "result", - "f0-5": "u-origin-circle", - "s5-0": "end-pt", - "f0-8": "u-end-circle" + "gp-0": "axis-point", + "f30-0": "contact-fraction", + "f0-5": "origin-cap-fraction", + "s5-0": "end-center", + "f0-8": "end-cap-fraction" } }, "ray-arbitrary-circle-intersect": { - "args": [ - "probe-origin", - "probe-dir", - "circle-origin", - "circle-normal", - "radius" - ] + "args": ["probe-origin", "probe-displacement", "circle-origin", "circle-normal", "radius"], + "vars": { + "v1-1": "center-offset", + "f0-2": "contact-fraction", + "a0-7": "radial-offset" + } }, "print-tr-stat": { "args": ["stat", "name", "dest"] }, + "clear-tr-stat": { + "args": ["stat"] + }, + "print-terrain-stats": { + "vars": { + "gp-0": "i", + "s5-0": "lev" + } + }, "update-subdivide-settings!": { - "args": ["settings", "math-cam", "idx"] + "args": ["settings", "math-cam", "idx"], + "vars": { + "f0-3": "band-unit", + "f0-7": "camera-scale", + "v1-5": "i" + } + }, + "set-tfrag-dists!": { + "args": ["dists"], + "vars": { + "f2-0": "far-0", + "f1-0": "boundary-1", + "f0-0": "near-2", + "f4-1": "inverse-span-0", + "f3-2": "inverse-span-1", + "f2-1": "y-intercept-0", + "f5-7": "y-intercept-1" + } + }, + "(method 10 perf-stat)": { + "args": ["this", "name", "stream"] + }, + "perf-stat-bucket->string": { + "args": ["bucket"] }, "start-perf-stat-collection": { "vars": { "v1-2": "frame-idx", + "gp-0": "selection-state", "v1-5": "bucket", "a0-2": "which-stat", - "a0-7": "stat-idx" + "a0-7": "stat-idx", + "v1-22": "i", + "v1-27": "i", + "a1-63": ["counter-pair", "perf-counter-pair"], + "a0-64": "control", + "v1-31": "stats", + "a0-76": "all-code-control" + } + }, + "end-perf-stat-collection": { + "vars": { + "v1-1": "stats", + "a0-1": "counter-0", + "a0-3": "counter-1", + "v1-3": "i", + "a2-0": "counter-pair", + "a1-8": "accum-0", + "a0-15": "accum-1" + } + }, + "print-perf-stats": { + "vars": { + "gp-0": "i" } }, "ja-play-spooled-anim": { + "args": ["request", "idle-anim", "exit-anim", "break-func"], "vars": { + "v0-39": "stream-pos", "sv-16": "spool-part", + "sv-24": "part-audio-start", "sv-28": "old-skel-status", - "sv-64": "spool-sound" + "sv-32": "old-stream-pos", + "sv-40": "good-time", + "sv-48": "old-time", + "sv-56": "good-count", + "sv-64": "spool-sound", + "sv-72": "stream-pos", + "s2-4": "loaded-anim", + "f30-0": "frames-per-stream-unit", + "f28-0": "part-audio-end", + "f0-14": "anim-frame" } }, + "ja-abort-spooled-anim": { + "args": ["request", "exit-anim", "completed-part"] + }, "(method 3 anim-tester)": { "vars": { "s5-0": ["s5-0", "anim-test-obj"], @@ -2647,32 +5929,86 @@ } }, "anim-test-obj-item-valid?": { + "args": ["obj", "item"], "vars": { - "s5-0": ["s5-0", "anim-test-sequence"] + "a0-4": "item-node", + "s5-0": ["cur-seq", "anim-test-sequence"], + "v1-0": "seq-list", + "v1-13": "sequence-node", + "v1-7": "item-list", + "v1-8": "first-item" } }, "anim-test-obj-remove-invalid": { + "args": ["obj"], "vars": { - "v1-31": ["v1-31", "anim-test-sequence"], - "s3-0": ["s3-0", "anim-test-seq-item"], - "s2-0": ["s2-0", "anim-test-seq-item"] + "a0-13": "list", + "a0-16": "end-flag", + "a0-20": "sequence-node", + "a0-21": "next-node", + "a0-23": "sequence-node", + "s2-0": ["next-item", "anim-test-seq-item"], + "s3-0": ["cur-item", "anim-test-seq-item"], + "s4-0": "next-seq", + "s5-0": ["cur-seq", "anim-test-sequence"], + "v1-0": "seq-list", + "v1-1": "cur-node", + "v1-13": "item-node", + "v1-18": "item-list", + "v1-19": "only-end-item?", + "v1-21": "yes?", + "v1-25": "sequence-node", + "v1-30": "seq-list", + "v1-31": ["cur-seq", "anim-test-sequence"], + "v1-5": "item-list", + "v1-6": "item-node" } }, "anim-tester-reset": { "vars": { - "v1-1": ["v1-1", "anim-test-obj"] + "a0-15": "jgeo", + "a1-4": "mgeo", + "v1-0": "obj-list", + "v1-1": ["obj", "anim-test-obj"], + "v1-16": "white-quad", + "v1-18": "zero-quad" } }, "anim-tester-save-object-seqs": { + "args": ["obj"], "vars": { - "s4-2": ["s4-2", "anim-test-seq-item"] + "gp-0": "fmt", + "gp-2": "file", + "s2-0": "name", + "s3-0": "fmt-str", + "s4-0": "dest", + "s4-2": ["cur-item", "anim-test-seq-item"], + "s5-1": ["cur-seq", "anim-test-sequence"], + "v1-11": "item-list", + "v1-21": "sequence-node", + "v1-30": "item-node", + "v1-5": "seq-list" } }, "sprite-setup-header": { "args": ["hdr", "num-sprites"] }, "(method 0 sprite-aux-list)": { - "args": ["allocation", "type-to-make", "size"] + "args": ["allocation", "type-to-make", "size"], + "vars": { + "v0-0": "result" + } + }, + "(method 3 sprite-aux-list)": { + "vars": { + "s5-0": "i" + } + }, + "add-to-sprite-aux-list": { + "args": ["system", "cpuinfo", "sprite-data"], + "vars": { + "v1-0": "aux-list" + } }, "sprite-setup-frame-data": { "args": ["data", "tbp-offset"] @@ -2682,7 +6018,8 @@ "vars": { "v1-0": "sprite-count", "s4-0": "vec-data-size", - "a2-3": "adgif-data-size" + "a2-3": "adgif-data-size", + "v0-0": "result" } }, "(method 0 sprite-array-3d)": { @@ -2690,29 +6027,45 @@ "vars": { "v1-0": "sprite-count", "s4-0": "vec-data-size", - "a2-3": "adgif-data-size" + "a2-3": "adgif-data-size", + "v0-0": "result" } }, - "sprite-set-3d-quaternion": { - "args": ["data", "quat"] + "sprite-set-3d-quaternion!": { + "args": ["sprite-data", "quat"] }, - "sprite-get-3d-quaternion": { - "args": ["data", "quat"] + "sprite-get-3d-quaternion!": { + "args": ["quat", "sprite-data"], + "vars": { + "f0-0": "x", + "f1-0": "y", + "f3-0": "z" + } }, "sprite-add-matrix-data": { "args": ["dma-buff", "matrix-mode"], "vars": { - "v1-0": "count", + "v1-0": "vu-address", "a2-1": ["pkt1", "dma-packet"], "a1-2": ["mtx", "matrix"], + "t1-0": "camera-matrix", + "a2-4": "camera-row-0", + "a3-4": "camera-row-1", + "t0-4": "camera-row-2", + "t1-1": "camera-row-3", "a2-9": ["pkt2", "dma-packet"], - "a1-11": "mtx2", - "a1-20": "hvdf-idx" + "a1-11": "screen-matrix", + "f1-0": "perspective-x", + "f2-0": "perspective-y", + "f0-1": "screen-scale-x", + "a1-16": ["screen-offset", "vector"], + "a1-20": "i" } }, "sprite-add-frame-data": { "args": ["dma-buff", "tbp-offset"], "vars": { + "s5-0": "frame-qwc", "a0-1": ["pkt", "dma-packet"] } }, @@ -2773,7 +6126,7 @@ "a1-14": "in-vec-data", "a1-15": "qwc-pkt3", "a0-11": ["pkt3", "dma-packet"], - "s2-1": "si", + "s2-1": "i", "s1-0": "dma-adgif-data", "s0-0": "in-adgif-data", "v1-21": ["pkt4", "dma-packet"] @@ -2801,11 +6154,46 @@ "v1-31": "mem-use" } }, + "sprite-allocate-user-hvdf": { + "vars": { + "v1-0": "i" + } + }, + "sprite-release-user-hvdf": { + "args": ["index"] + }, + "sprite-get-user-hvdf": { + "args": ["index"] + }, "mem-usage-bsp-tree": { - "args": ["header", "node", "mem-use", "flags"] + "args": ["header", "node", "mem-use", "flags"], + "vars": { + "v1-3": "node-bytes" + } }, "(method 8 bsp-header)": { - "args": ["this", "mem-use", "flags"] + "args": ["this", "mem-use", "flags"], + "vars": { + "v1-8": "file-info-bytes", + "v1-27": "header-bytes", + "v1-36": "visibility-bytes", + "v1-46": "texture-remap-bytes", + "v1-56": "texture-id-bytes", + "v1-68": "unknown-array-bytes", + "v1-80": "adgif-bytes", + "v1-92": "box-bytes", + "v1-105": "split-box-index-bytes", + "v1-118": "actor-index-bytes", + "v1-125": "pat-bytes", + "s3-0": "cameras", + "s2-0": "i" + } + }, + "(method 9 bsp-header)": { + "vars": { + "s5-0": "shaders", + "s4-0": "i" + } }, "(method 10 bsp-header)": { "args": ["this", "other-draw", "disp-frame"], @@ -2815,14 +6203,80 @@ "v1-15": "vis-list-qwc2", "a0-9": ["vis-list-spad", "(pointer uint128)"], "a1-5": ["vis-list-lev", "(pointer uint128)"], - "a2-4": "current-qw" + "a2-4": "current-qw", + "a3-3": "scratch-quad", + "a3-4": "inverted-quad", + "t0-2": "all-visible-quad", + "a3-5": "flipped-quad", + "at-0": "math-cam", + "a1-7": "trees", + "s5-1": "frame" + } + }, + "(method 15 bsp-header)": { + "args": ["this", "other-draw", "disp-frame"], + "vars": { + "s4-0": "lev", + "a2-1": "vis-list-qwc", + "at-0": "math-cam", + "a1-3": "trees" + } + }, + "(method 14 bsp-header)": { + "vars": { + "v1-0": "lev", + "a2-0": "vis-list-qwc", + "at-0": "math-cam" } }, "bsp-camera-asm": { - "args": ["bsp-hdr", "camera-pos"], + "args": ["header", "camera-position"], "vars": { "v1-0": ["next-node", "bsp-node"], - "a1-1": "real-node" + "a1-1": "node", + "v1-1": ["plane-side", "int"], + "a2-0": "side-flags" + } + }, + "(method 11 bsp-header)": { + "args": ["this", "length", "result"], + "vars": { + "s4-0": "trees", + "s3-0": "i" + } + }, + "(method 12 bsp-header)": { + "args": ["this", "length", "result"], + "vars": { + "s4-0": "trees", + "s3-0": "i" + } + }, + "(method 13 bsp-header)": { + "args": ["this", "length", "result"], + "vars": { + "s4-0": "trees", + "s3-0": "i" + } + }, + "(method 17 bsp-header)": { + "args": ["this", "query-sphere", "length", "result"], + "vars": { + "s3-0": "trees", + "s2-0": "i" + } + }, + "clear-cl-stat": { + "args": ["stat"] + }, + "print-cl-stat": { + "args": ["stat", "label"] + }, + "print-collide-stats": { + "vars": { + "gp-0": "total-ticks", + "s4-0": "cache-fill-ticks", + "s5-0": "ray-poly-ticks" } }, "level-remap-texture": { @@ -2830,67 +6284,649 @@ "vars": { "v1-1": "bsp-hdr", "a3-0": "table-size", - "v1-2": ["table-data-start", "(pointer uint64)"], - "t0-0": "table-data-ptr", - "a1-1": "mask1", - "a2-1": "masked-tex-id", - "a3-2": "table-data-end", + "v1-2": ["search-start", "(pointer uint64)"], + "t0-0": "table-start", + "a1-1": "entry-align-mask", + "a2-1": "lookup-id", + "a3-2": "search-end", "t0-3": "midpoint", "t1-1": "diff" } }, - "debug-menu-make-from-template": { + "(method 9 tie-fragment)": { + "args": ["this"], "vars": { - "s5-1": ["s5-1", "string"] + "s5-0": "shaders", + "s4-0": "shader-count", + "s3-0": "i" + } + }, + "(method 3 drawable-inline-array-instance-tie)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 9 drawable-tree-instance-tie)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 3 prototype-tie)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 9 prototype-tie)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 8 drawable-tree-instance-tie)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-7": "header-bytes", + "s3-0": "i" + } + }, + "(method 8 tie-fragment)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-3": "color-bytes", + "a0-2": "color-category", + "v1-21": "header-bytes", + "v1-26": "shader-bytes", + "v1-31": "point-bytes", + "v1-36": "draw-point-bytes", + "v1-41": "generic-bytes", + "s4-0": "i", + "v1-52": "debug-line-bytes" + } + }, + "(method 8 instance-tie)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "instance-bytes", + "s3-0": "bucket", + "s2-0": "i", + "a0-10": "geometry", + "v1-29": "geometry-index" + } + }, + "(method 8 drawable-inline-array-instance-tie)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-7": "header-bytes", + "s3-0": "i" + } + }, + "(method 8 prototype-tie)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-7": "header-bytes", + "s3-0": "i" + } + }, + "tie-init-consts": { + "args": ["consts", "alpha-blend"], + "vars": { + "f1-0": "gif-buffer-a", + "f2-0": "gif-buffer-b", + "f0-0": "gif-buffer-c" + } + }, + "tie-init-engine": { + "args": ["dma-buf", "test-state", "alpha-blend"], + "vars": { + "a0-2": ["direct-packet", "dma-packet"], + "a0-4": ["direct-gif", "gs-gif-tag"], + "a0-6": "test-data", + "s4-1": "constant-qwc", + "a0-8": ["constant-packet", "dma-packet"], + "a0-12": ["init-packet", "dma-packet"], + "a0-14": ["row-packet", "dma-packet"], + "v1-11": ["row-data", "(pointer uint32)"] + } + }, + "tie-end-buffer": { + "args": ["dma-buf"], + "vars": { + "a1-0": ["direct-packet", "dma-packet"], + "a1-2": ["direct-gif", "gs-gif-tag"], + "a1-4": "test-data", + "a1-6": ["mask-packet", "dma-packet"], + "a0-1": ["reset-data", "(pointer uint32)"] + } + }, + "tie-int-reg": { + "args": ["register-index"], + "vars": { + "v1-0": "i" + } + }, + "tie-float-reg": { + "args": ["register-index"], + "vars": { + "v1-0": "i" + } + }, + "tie-ints": { + "vars": { + "gp-0": ["register-data", "(pointer uint32)"], + "s5-0": "i" + } + }, + "tie-floats": { + "vars": { + "gp-0": ["register-data", "(pointer uint32)"], + "s5-0": "i" + } + }, + "tie-near-init-consts": { + "args": ["consts", "alpha-blend"], + "vars": { + "f1-0": "gif-buffer-a", + "f2-0": "gif-buffer-b", + "f0-0": "gif-buffer-c", + "v1-41": "camera" + } + }, + "tie-near-init-engine": { + "args": ["dma-buf", "test-state", "alpha-blend"], + "vars": { + "s4-0": "constant-qwc", + "a0-2": ["constant-packet", "dma-packet"], + "a0-6": ["init-packet", "dma-packet"], + "a0-8": ["row-packet", "dma-packet"], + "v1-7": ["row-data", "(pointer uint32)"] + } + }, + "tie-near-end-buffer": { + "args": ["dma-buf"], + "vars": { + "a1-6": ["mask-packet", "dma-packet"], + "a0-1": ["reset-data", "(pointer uint32)"] + } + }, + "tie-near-make-perspective-matrix": { + "args": ["out-matrix"] + }, + "tie-near-int-reg": { + "args": ["register-index"], + "vars": { + "v1-0": "i" + } + }, + "tie-near-float-reg": { + "args": ["register-index"], + "vars": { + "v1-0": "i" + } + }, + "debug-menu-make-from-template": { + "args": ["context", "template"], + "vars": { + "s5-0": "result", + "s4-0": "kind", + "s5-1": ["name", "string"], + "s4-1": "submenu", + "gp-1": "children", + "a1-3": "child-template", + "a1-4": "child", + "gp-2": "children", + "a1-6": "child-template", + "a1-7": "child" } }, "debug-menu-item-var-render": { + "args": ["item", "x", "y", "submenus", "selected"], "vars": { - "v1-14": ["v1-14", "dma-packet"] + "s5-0": "font", + "s1-0": "dma-buf", + "v1-14": ["packet", "dma-packet"] + } + }, + "generic-setup-constants": { + "args": ["constants", "alpha-blend"], + "vars": { + "a2-0": ["camera", "math-camera"] } }, "generic-add-constants": { + "args": ["dma-buf", "alpha-blend"], "vars": { - "a0-1": ["a0-1", "dma-packet"] + "a2-0": "qword-count", + "v1-0": "buffer", + "a0-1": ["packet", "dma-packet"] } }, "generic-init-buf": { + "args": ["dma-buf", "alpha-blend", "zbuf"], "vars": { - "a0-2": ["a0-2", "dma-packet"], - "a0-4": ["a0-4", "gs-gif-tag"], - "a0-9": ["a0-9", "dma-packet"], - "v1-7": ["v1-7", "(pointer int32)"] + "v1-3": "buffer", + "a0-2": ["upload-packet", "dma-packet"], + "v1-4": "buffer", + "a0-4": ["direct-tag", "gs-gif-tag"], + "v1-5": "buffer", + "a0-6": "gs-registers", + "v1-6": "buffer", + "a0-9": ["start-packet", "dma-packet"], + "v1-7": ["vif-state", "(pointer int32)"] } }, - "(anon-function 1 cam-combiner)": { + "generic-reset-buffers": { + "args": ["dma-buf", "output-buffer", "input-buffer"], "vars": { - "pp": ["pp", "process"] + "a3-0": ["output-addresses", "vector4w"], + "v1-3": ["input-offsets", "vector4w"], + "t0-0": "buffer", + "t1-0": ["packet", "dma-packet"], + "t0-1": ["control", "(pointer uint32)"], + "a1-3": "output-address", + "v1-5": "input-offset", + "v1-6": ["mscalf-entry-12", "uint"] } }, - "(anon-function 2 cam-combiner)": { + "generic-work-init": { + "args": ["sink"], "vars": { - "a0-3": ["vec", "(pointer vector)"] + "gp-1": ["envmap-shader", "adgif-shader"], + "a1-1": "envmap-texture" + } + }, + "generic-upload-vu0": { + "vars": { + "gp-0": ["dma-buf", "dma-buffer"], + "v1-0": ["buffer", "dma-buffer"], + "v1-1": ["buffer", "dma-buffer"], + "a0-5": ["end-tag", "(pointer int64)"] + } + }, + "upload-vu0-program": { + "args": ["func", "wait-counter"] + }, + "generic-initialize-without-sink": { + "args": ["camera-transform", "lights"], + "vars": { + "a2-0": ["work-matrix", "matrix"], + "v1-1": ["right", "uint128"], + "a0-3": ["up", "uint128"], + "a1-2": ["forward", "uint128"], + "a3-0": ["translation", "uint128"] + } + }, + "generic-initialize": { + "args": ["sink", "camera-transform", "lights"], + "vars": { + "a2-1": ["work-matrix", "matrix"], + "v1-1": ["right", "uint128"], + "a0-2": ["up", "uint128"], + "a1-1": ["forward", "uint128"], + "a3-0": ["translation", "uint128"] + } + }, + "generic-wrapup": { + "args": ["sink"] + }, + "generic-dma-from-spr": { + "args": ["scratch-address", "qwc"] + }, + "generic-light": { + "args": ["gsf-buf", "shaders"] + }, + "generic-no-light": { + "args": ["gsf-buf", "shaders"] + }, + "generic-no-light+envmap": { + "args": ["gsf-buf", "shaders"] + }, + "generic-post-debug": { + "vars": { + "gp-0": ["buffer", "gsf-buffer"], + "s5-0": "i", + "v1-2": ["row-base", "gsf-buffer"] + } + }, + "generic-merc-add-to-cue": { + "args": ["sink"] + }, + "generic-merc-execute-all": { + "args": ["dma-buf"], + "vars": { + "gp-0": "global-buffer-start", + "s4-0": "i", + "s3-0": "sink", + "s1-0": "global-buf", + "s2-0": "chain-start", + "a3-0": "chain-tail", + "v1-38": ["next-tag", "dma-packet"], + "v1-64": "dma-usage" + } + }, + "generic-tie-execute": { + "args": ["sink", "dma-buf", "input-chain"], + "vars": { + "s4-0": "output-start", + "v1-24": ["shadow", "generic-tie-shadow"], + "v1-26": ["calls", "generic-tie-calls"], + "v1-37": "dma-usage" + } + }, + "(method 5 shadow-geo)": { + "args": ["this"] + }, + "(method 8 shadow-geo)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-5": "byte-size" + } + }, + "shadow-dma-init": { + "args": ["dma-buf"], + "vars": { + "a1-2": "framebuffer-page", + "t3-0": "texture-width", + "t2-0": "screen-height", + "a2-0": "x-offset", + "a3-0": "screen-min-y", + "t0-0": "screen-max-y", + "t1-0": "strip-count", + "t5-0": "y-offset", + "v1-11": "chain-start", + "t2-10": "x", + "t3-11": "i", + "a2-10": "qwc" + } + }, + "shadow-dma-end": { + "args": ["dma-buf"], + "vars": { + "v1-5": "framebuffer-page", + "a2-0": "texture-width", + "a3-0": "screen-height", + "a1-5": "x-offset", + "t0-1": "screen-min-y", + "t1-3": "strip-count", + "a2-3": "y-offset", + "t3-13": "x", + "t4-23": "u", + "t5-18": "i" + } + }, + "shadow-vu0-upload": { + "vars": { + "gp-0": ["dma-buf", "dma-buffer"], + "a0-5": ["end-tag", "(pointer int64)"] + } + }, + "shadow-execute-all": { + "args": ["dma-buf", "queue"], + "vars": { + "v1-12": "has-shadow?", + "a0-6": "i", + "s4-0": ["global-buf", "dma-buffer"], + "s5-0": "chain-start", + "v1-17": ["workspace", "shadow-dcache"], + "s3-0": "i", + "v1-21": "run", + "a3-0": "chain-tail", + "v1-25": ["next-tag", "dma-packet"], + "gp-1": ["workspace", "shadow-dcache"] + } + }, + "(method 14 shadow-control)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-direction" + } + }, + "(method 15 shadow-control)": { + "args": ["this", "origin", "bottom-offset", "top-offset", "cast-length"], + "vars": { + "s4-0": ["hit", "collide-tri-result"], + "v1-0": ["ray-start", "vector"], + "a2-1": ["ray", "vector"] + } + }, + "shadow-vu1-add-constants": { + "args": ["dma-buf"], + "vars": { + "a2-0": "qwc", + "a1-0": ["upload-packet", "dma-packet"], + "v1-0": "packet-buffer", + "v1-1": ["constants", "shadow-vu1-constants"], + "a3-4": ["camera", "math-camera"], + "a2-4": ["shadow-state", "shadow-data"], + "a1-2": ["tri-template", "shadow-vu1-gifbuf-template"], + "a1-4": ["gif-upload", "dma-packet"], + "v1-4": "gif-upload-buffer", + "a1-6": ["gif-template", "shadow-vu1-gifbuf-template"], + "v1-5": "gif-template-buffer" + } + }, + "shadow-vu1-add-matrix": { + "args": ["dma-buf", "camera"], + "vars": { + "v1-0": "qwc", + "a3-0": ["upload-packet", "dma-packet"], + "a2-4": "packet-buffer", + "v1-5": ["matrix-out", "matrix"], + "a2-5": "right", + "a3-1": "up", + "t0-4": "forward", + "a1-1": "translation" + } + }, + "shadow-vu1-init-buffer": { + "args": ["dma-buf"], + "vars": { + "v1-0": "packet-buffer", + "a0-4": ["start-packet", "dma-packet"] + } + }, + "depth-cue-set-stencil": { + "args": ["dma-buf", "framebuffer-page", "depth", "field-offset", "color"], + "vars": { + "v1-0": "packet-buffer", + "t1-0": ["direct-packet", "dma-packet"], + "v1-1": "tag-buffer", + "t1-2": ["gif-tag", "gs-gif-tag"], + "v1-2": "state-buffer", + "t1-4": "state-out", + "a3-7": ["packet-data", "(inline-array vector4w)"], + "v1-3": "x", + "a1-8": "sprite-width", + "v0-0": ["cursor", "(inline-array vector4w)"], + "a3-8": "i", + "t1-10": "j" + } + }, + "depth-cue-draw-depth": { + "args": ["dma-buf", "depth", "sharpness", "alpha", "on-screen-fbp", "field-offset"], + "vars": { + "v1-1": "scaled-width", + "a2-1": "scaled-height", + "a3-4": "x-offset", + "t2-0": "strip-width", + "t3-0": "temp-fbp", + "t4-0": "i", + "t5-0": "packet-buffer", + "t6-0": ["direct-packet", "dma-packet"], + "t5-1": "tag-buffer", + "t6-2": ["gif-tag", "gs-gif-tag"], + "t5-2": "state-buffer", + "t6-4": "state-out", + "t5-3": ["temp-strip", "(inline-array vector4w)"], + "t5-7": "packet-buffer", + "t6-16": ["direct-packet", "dma-packet"], + "t5-8": "tag-buffer", + "t6-18": ["gif-tag", "gs-gif-tag"], + "t5-9": "state-buffer", + "t6-20": "state-out", + "t5-10": ["texture-strip", "(inline-array vector4w)"] + } + }, + "depth-cue-draw-front": { + "args": ["dma-buf", "depth", "sharpness", "alpha", "on-screen-fbp", "field-offset"], + "vars": { + "v1-1": "scaled-width", + "a2-1": "scaled-height", + "a3-4": "x-offset", + "t2-0": "strip-width", + "t3-0": "temp-fbp", + "t4-0": "i", + "t5-0": "packet-buffer", + "t6-0": ["direct-packet", "dma-packet"], + "t5-1": "tag-buffer", + "t6-2": ["gif-tag", "gs-gif-tag"], + "t5-2": "state-buffer", + "t6-4": "state-out", + "t5-3": ["temp-strip", "(inline-array vector4w)"], + "t5-7": "packet-buffer", + "t6-16": ["direct-packet", "dma-packet"], + "t5-8": "tag-buffer", + "t6-18": ["gif-tag", "gs-gif-tag"], + "t5-9": "state-buffer", + "t6-20": "state-out", + "t5-10": ["texture-strip", "(inline-array vector4w)"] + } + }, + "depth-cue-calc-z": { + "args": ["camera-z"] + }, + "depth-cue": { + "args": ["disp"], + "vars": { + "gp-0": "dma-start", + "s4-0": ["dma-buf", "dma-buffer"], + "s5-0": "chain-start", + "v1-9": "screen-index", + "a1-7": "packet-buffer", + "a2-0": ["direct-packet", "dma-packet"], + "a1-8": "tag-buffer", + "a2-2": ["gif-tag", "gs-gif-tag"], + "a1-9": "state-buffer", + "a2-4": "state-out", + "s3-0": "field-offset", + "s2-0": "on-screen-fbp", + "v1-19": "packet-buffer", + "a0-2": ["direct-packet", "dma-packet"], + "v1-20": "tag-buffer", + "a0-4": ["gif-tag", "gs-gif-tag"], + "v1-21": "state-buffer", + "a0-6": "state-out", + "a3-18": "chain-tail", + "v1-22": ["next-packet", "dma-packet"], + "v0-0": "bucket-tag", + "v1-27": ["usage", "memory-usage-block"] + } + }, + "(event cam-combiner-active)": { + "vars": { + "t9-2": "print-error-fn", + "a0-15": "output-stream", + "a1-3": "error-message", + "v1-7": "argument", + "t9-3": "type-check-fn", + "v1-8": "argument", + "t9-4": "print-error-fn", + "a0-18": "output-stream", + "a1-5": "error-message", + "v1-10": "argument", + "gp-1": ["source-slave", "camera-slave"], + "gp-2": ["source-position", "vector"], + "t9-10": "print-error-fn", + "a0-27": "output-stream", + "a1-11": "error-message", + "v1-23": "argument", + "t9-11": "type-check-fn", + "v1-24": "argument", + "t9-12": "print-error-fn", + "a0-30": "output-stream", + "a1-13": "error-message", + "v1-25": "argument", + "gp-3": "source-slave", + "a2-17": "destination-tracker", + "a3-3": "source-tracker", + "v1-36": "row-0", + "a0-37": "row-1", + "a1-16": "row-2", + "a3-4": "row-3" + } + }, + "(code cam-combiner-active)": { + "vars": { + "s5-0": "source-slave", + "s4-0": "destination-slave", + "f30-0": "blend", + "gp-0": "previous-position", + "a2-4": "output-matrix", + "a3-2": "combined-tracker", + "v1-20": "row-0", + "a0-10": "row-1", + "a1-6": "row-2", + "a3-3": "row-3", + "sv-160": "source-tracker", + "s2-0": "source-position", + "s5-1": "destination-tracker", + "s0-0": "destination-position", + "s1-0": "rotation-work", + "v1-35": "i", + "s4-1": "rotation-axis", + "s3-0": "rotation-matrix", + "f26-0": "row-0-delta", + "f28-0": "row-1-delta", + "f0-13": "row-2-delta", + "f0-16": "row-0-axis-dot", + "f1-2": "row-1-axis-dot", + "f2-2": "row-2-axis-dot", + "f28-1": "rotation-angle", + "f30-1": "remaining-angle", + "v1-143": "output-matrix", + "a3-8": "combined-tracker", + "a0-80": "row-0", + "a1-45": "row-1", + "a2-21": "row-2", + "a3-9": "row-3", + "v1-144": "output-matrix", + "a3-10": "source-tracker", + "a0-82": "row-0", + "a1-46": "row-1", + "a2-22": "row-2", + "a3-11": "row-3" } }, "(method 14 sync-info)": { - "args": ["this", "period", "phase"], + "args": ["this", "period", "phase", "ease-out", "ease-in"], "vars": { "f0-1": "period-float", - "f1-1": "value" + "f1-1": "phase-ticks" } }, "(method 14 sync-info-eased)": { - "args": ["this", "period", "phase", "out-param", "in-param"], + "args": ["this", "period", "phase", "ease-out", "ease-in"], "vars": { "f0-9": "total-easing-phase", "f1-11": "total-normal-phase", "f0-1": "period-float", - "f1-1": "value", + "f1-1": "phase-ticks", + "f0-10": "tlo", + "f1-12": "thi", + "f2-5": "ylo", + "f3-3": "y-at-thi", + "f4-3": "m2", "f3-4": "y-end" } }, "(method 14 sync-info-paused)": { - "args": ["this", "period", "phase", "out-param", "in-param"] + "args": ["this", "period", "phase", "pause-after-out", "pause-after-in"], + "vars": { + "f0-1": "period-float", + "f1-1": "phase-ticks" + } }, "(method 15 sync-info)": { "args": [ @@ -2898,9 +6934,13 @@ "proc", "default-period", "default-phase", - "default-out", - "default-in" - ] + "default-ease-out", + "default-ease-in" + ], + "vars": { + "sv-16": "sync-tag", + "v1-1": "params" + } }, "(method 15 sync-info-eased)": { "args": [ @@ -2908,9 +6948,13 @@ "proc", "default-period", "default-phase", - "default-out", - "default-in" - ] + "default-ease-out", + "default-ease-in" + ], + "vars": { + "sv-16": "sync-tag", + "v1-1": "params" + } }, "(method 15 sync-info-paused)": { "args": [ @@ -2918,9 +6962,13 @@ "proc", "default-period", "default-phase", - "default-out", - "default-in" - ] + "default-pause-after-out", + "default-pause-after-in" + ], + "vars": { + "sv-16": "sync-tag", + "v1-1": "params" + } }, "(method 10 sync-info)": { "vars": { @@ -2930,15 +6978,15 @@ } }, "(method 16 sync-info)": { - "args": ["this", "user-time-offset"], + "args": ["this", "phase-now"], "vars": { "a2-0": "period", "f0-1": "period-float", - "v1-0": "wrapped-user-offset", + "v1-0": "wrapped-phase-now", "f1-4": "current-time", - "f1-6": "current-time-wrapped", - "f1-10": "combined-offset", - "f0-3": "combined-offset-wrapped" + "f1-6": "current-phase", + "f1-10": "new-offset", + "f0-3": "wrapped-offset" } }, "(method 11 sync-info)": { @@ -2957,7 +7005,7 @@ } }, "(method 9 sync-info)": { - "args": ["this", "max-val"], + "args": ["this", "max-value"], "vars": { "v1-0": "period", "f0-1": "period-float", @@ -2970,8 +7018,8 @@ "v1-0": "period", "f1-0": "period-float", "f2-2": "current-time", - "f0-1": "max-val", - "f0-2": "phase-out-of-2" + "f0-1": "mirror-scale", + "f0-2": "mirrored-phase" } }, "(method 13 sync-info-eased)": { @@ -2979,110 +7027,798 @@ "vars": { "v1-0": "period", "f1-0": "period-float", - "f0-1": "max-val", + "f0-1": "mirror-scale", "f2-2": "current-time", - "f0-2": "current-val", - "v1-2": "in-mirror?", + "f0-2": "leg-phase", + "v1-2": "returning?", "f1-4": "tlo", - "f0-7": "eased-phase" + "f1-7": "remaining-phase", + "f0-7": "phase" } }, - "(method 12 sync-info)": { - "args": ["this", "max-out-val"], + "(method 13 sync-info-paused)": { + "args": ["this"], "vars": { "v1-0": "period", "f1-0": "period-float", - "f0-1": "max-val", + "f0-1": "mirror-scale", "f2-2": "current-time", - "f0-2": "current-val" + "f0-2": "mirrored-phase", + "f1-3": "return-duration", + "f2-7": "outward-duration" + } + }, + "(method 12 sync-info)": { + "args": ["this", "max-value"], + "vars": { + "v1-0": "period", + "f1-0": "period-float", + "f0-1": "mirror-scale", + "f2-2": "current-time", + "f0-2": "mirrored-phase" } }, "(method 12 sync-info-eased)": { - "args": ["this", "max-out-val"] + "args": ["this", "max-value"] }, "(method 12 sync-info-paused)": { - "args": ["this", "max-out-val"] + "args": ["this", "max-value"] + }, + "(method 9 sync-info-paused)": { + "args": ["this", "max-value"] }, "(method 9 delayed-rand-float)": { - "args": ["this", "min-tim", "max-time", "max-times-two"] + "args": ["this", "min-delay", "max-delay", "value-range"] }, "(method 10 oscillating-float)": { "args": ["this", "target-offset"], "vars": { - "f0-3": "acc" + "f0-3": "acceleration" } }, "(method 9 oscillating-float)": { - "args": ["this", "init-val", "accel", "max-vel", "damping"] + "args": ["this", "initial-value", "accel", "max-vel", "damping"] }, "(method 9 bouncing-float)": { "args": [ "this", - "init-val", - "max-val", - "min-val", - "elast", + "initial-value", + "max-value", + "min-value", + "elasticity", "accel", "max-vel", "damping" ] }, + "(method 10 bouncing-float)": { + "args": ["this", "target-offset"] + }, "(method 9 delayed-rand-vector)": { - "args": ["this", "min-time", "max-time", "xz-range", "y-range"] + "args": ["this", "min-delay", "max-delay", "xz-range", "y-range"] }, "(method 9 oscillating-vector)": { - "args": ["this", "init-val", "accel", "max-vel", "damping"] + "args": ["this", "initial-value", "accel", "max-vel", "damping"] }, "(method 10 oscillating-vector)": { "args": ["this", "target-offset"], "vars": { - "f0-2": "vel" + "s5-0": "acceleration", + "f0-2": "speed" } }, "(method 9 trajectory)": { - "args": ["this", "time", "result"] + "args": ["this", "elapsed-time", "result"] }, "(method 10 trajectory)": { - "args": ["this", "time", "result"] + "args": ["this", "elapsed-time", "result"] }, "(method 11 trajectory)": { - "args": ["this", "from", "to", "duration", "grav"], + "args": ["this", "start", "destination", "duration", "gravity"], "vars": { - "f0-3": "xz-vel" + "f0-3": "xz-speed" } }, "(method 12 trajectory)": { - "args": ["this", "from", "to", "xz-vel", "grav"], + "args": ["this", "start", "destination", "xz-speed", "gravity"], "vars": { "f0-1": "duration" } }, "(method 13 trajectory)": { - "args": ["this", "from", "to", "y-vel", "grav"] + "args": ["this", "start", "destination", "initial-y-velocity", "gravity"], + "vars": { + "f1-3": "discriminant", + "f0-3": "duration", + "f0-4": "sqrt-discriminant" + } + }, + "(method 14 trajectory)": { + "args": ["this", "start", "destination", "apex-height", "gravity"], + "vars": { + "f1-2": "apex-y", + "f1-5": "initial-y-speed-squared", + "f0-3": "initial-y-velocity" + } }, "(method 15 trajectory)": { "vars": { - "s5-0": "prev-pos", - "s4-0": "pos", + "s5-0": "previous-position", + "s4-0": "position", "s3-0": "num-segments", - "f0-1": "t-eval" + "s2-0": "i", + "f0-1": "sample-time" + } + }, + "(method 8 game-text-info)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "info-bytes", + "s4-0": "i", + "v1-18": "string-bytes" + } + }, + "(method 3 game-text-info)": { + "vars": { + "s5-0": "i" + } + }, + "(method 9 game-text-info)": { + "args": ["this", "id", "return-false?"], + "vars": { + "a1-1": "lower-index", + "a3-0": "upper-index", + "v1-2": "i", + "t0-0": "previous-index" + } + }, + "load-level-text-files": { + "args": ["level-index"] + }, + "draw-debug-text-box": { + "args": ["context"], + "vars": { + "s5-0": "line-color", + "gp-0": "corners", + "s4-0": "corner" } }, "set-font-color-alpha": { - "args": ["idx", "alpha"] + "args": ["color-index", "alpha"] }, "print-game-text-scaled": { - "args": ["str", "scale", "font-ctxt", "alpha"] + "args": ["str", "scale", "context", "alpha"], + "vars": { + "f26-0": "original-width", + "f30-0": "original-height", + "f24-0": "original-x", + "f22-0": "original-y", + "f28-0": "original-scale", + "f0-1": "scaled-width", + "f1-2": "scaled-height" + } }, "print-game-text": { - "args": ["str", "font-ctxt", "opaque", "alpha", "line-height"] + "args": ["str", "font-ctxt", "no-draw", "alpha", "line-height"], + "vars": { + "gp-0": "layout-context", + "sv-112": "saved-matrix-x", + "sv-116": "saved-matrix-y", + "sv-120": "saved-relative-x-scale", + "sv-124": "saved-relative-y-scale", + "sv-128": "saved-relative-x-reciprocal", + "sv-132": "saved-relative-y-reciprocal", + "sv-136": "text-scale", + "sv-140": "input-cursor", + "sv-144": "line-end-x", + "sv-148": "line-start-x", + "sv-152": "max-x", + "sv-156": "max-y", + "sv-160": "space-width", + "sv-164": "line-step", + "sv-168": "line-count", + "sv-176": "current-char", + "sv-184": "word-length", + "sv-192": "line-length", + "sv-200": "line-index", + "sv-208": "word-complete?", + "sv-212": "line-complete?", + "f30-0": "saved-width", + "f28-0": "saved-height", + "f30-1": "word-start-x", + "f0-49": "word-width", + "f1-14": "word-end-x", + "f30-2": "next-line-y", + "s1-1": "dma-buf", + "s2-1": "dma-start", + "a3-3": "dma-end", + "v1-127": "end-tag-packet" + } + }, + "creates-new-method?": { + "args": ["type-to-check", "method-id"], + "vars": { + "v1-1": "parent-method-count" + } + }, + "overrides-parent-method?": { + "args": ["type-to-check", "method-id"] + }, + "describe-methods": { + "args": ["type-to-describe"], + "vars": { + "s5-0": "method-count", + "s4-0": "i", + "s3-0": "owner-type" + } + }, + "indent-to": { + "args": ["space-count"], + "vars": { + "s5-0": "i" + } + }, + "probe-traverse-draw-node": { + "args": ["node", "indent"], + "vars": { + "s4-0": "children", + "s3-0": "i" + } + }, + "probe-traverse-inline-array-node": { + "args": ["inline-node", "indent"], + "vars": { + "s4-0": "length", + "s3-0": "i" + } + }, + "probe-traverse-collide-fragment": { + "args": ["tree", "indent"], + "vars": { + "s4-0": "length", + "s3-0": "i" + } + }, + "collide-probe-node": { + "args": ["nodes", "node-count", "result"] + }, + "print-out": { + "args": ["value"] + }, + "collide-probe-instance-tie": { + "args": ["drawables", "drawable-count", "result", "draw-node-span?"] + }, + "collide-probe-collide-fragment-tree-make-list": { + "args": ["tree", "result"], + "vars": { + "v1-1": "root-node-array" + } + }, + "collide-probe-instance-tie-tree-make-list": { + "args": ["tree", "result"], + "vars": { + "v1-2": "root-node-array", + "v1-7": "instance-array" + } + }, + "collide-probe-make-list": { + "args": ["level-to-probe", "result"], + "vars": { + "s5-0": "level-bsp", + "s5-1": "drawable-trees", + "s4-0": "i", + "v1-3": "tree", + "a2-0": "result", + "v1-4": "root-node-array", + "v1-6": "instance-array", + "a2-1": "result", + "v1-9": "root-node-array" + } + }, + "distc": { + "args": ["a", "b"] + }, + "interpolate": { + "args": ["x", "x0", "y0", "x1", "y1"], + "vars": { + "f0-1": "x-range", + "f1-2": "y-range", + "f3-1": "x-offset" + } + }, + "misty-ambush-height": { + "args": ["position"], + "vars": { + "a1-0": "arena-center", + "f0-0": "radius" + } + }, + "misty-ambush-height-probe": { + "args": ["position", "probe-length"], + "vars": { + "f0-0": "ground-height" + } + }, + "(method 9 drawable-tree-collide-fragment)": { + "args": ["this"] + }, + "(method 10 drawable-tree-collide-fragment)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "s4-0": "i" + } + }, + "(method 16 drawable-tree-collide-fragment)": { + "args": ["this", "destination", "source"] + }, + "(method 11 drawable-tree-collide-fragment)": { + "args": ["this", "count", "result"] + }, + "(method 12 drawable-tree-collide-fragment)": { + "args": ["this", "count", "result"] + }, + "(method 13 drawable-tree-collide-fragment)": { + "args": ["this", "count", "result"] + }, + "(method 8 collide-fragment)": { + "args": ["this", "usage", "flags"], + "vars": { + "s5-0": "category", + "s4-0": "mesh", + "v1-11": "combined-header-bytes", + "v1-22": "polygon-data-bytes", + "v1-31": "vertex-data-bytes", + "v0-2": "new-vertex-total" + } + }, + "(method 9 drawable-inline-array-collide-fragment)": { + "args": ["this"] + }, + "(method 10 collide-fragment)": { + "args": ["this", "submitted-fragment", "frame"] + }, + "(method 10 drawable-inline-array-collide-fragment)": { + "args": ["this", "submitted-array", "frame"], + "vars": { + "s4-0": "i", + "s3-0": "fragment" + } + }, + "(method 11 drawable-inline-array-collide-fragment)": { + "args": ["this", "count", "result"] + }, + "(method 12 drawable-inline-array-collide-fragment)": { + "args": ["this", "count", "result"] + }, + "(method 13 drawable-inline-array-collide-fragment)": { + "args": ["this", "count", "result"] + }, + "(method 8 drawable-inline-array-collide-fragment)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-7": "header-bytes", + "s3-0": "i" + } + }, + "(method 0 drawable-group)": { + "args": ["allocation", "type-to-make", "length"], + "vars": { + "v0-0": "result" + } + }, + "(method 3 drawable-group)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 2 drawable-group)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 4 drawable-group)": { + "args": ["this"] + }, + "(method 5 drawable-group)": { + "args": ["this"] + }, + "(method 8 drawable-group)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "allocated-size", + "s3-0": "i" + } + }, + "(method 9 drawable-group)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 10 drawable-group)": { + "args": ["this", "draw-data", "frame"], + "vars": { + "s3-0": "i" + } + }, + "(method 14 drawable-group)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 15 drawable-group)": { + "args": ["this", "draw-data", "frame"], + "vars": { + "s3-0": "i" + } + }, + "(method 16 drawable-group)": { + "args": ["this", "destination", "source"], + "vars": { + "s4-0": "i" + } + }, + "(method 4 drawable-inline-array)": { + "args": ["this"] + }, + "(method 9 drawable-inline-array)": { + "args": ["this"] + }, + "(method 10 drawable-inline-array)": { + "args": ["this", "draw-data", "frame"] + }, + "(method 14 drawable-inline-array)": { + "args": ["this"] + }, + "(method 15 drawable-inline-array)": { + "args": ["this", "draw-data", "frame"] + }, + "(method 10 drawable-tree-array)": { + "args": ["this", "draw-data", "frame"], + "vars": { + "v1-1": "level-index", + "s3-0": "i" + } + }, + "(method 14 drawable-tree-array)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 15 drawable-tree-array)": { + "args": ["this", "draw-data", "frame"], + "vars": { + "s3-0": "i" + } + }, + "(method 16 drawable-tree)": { + "args": ["this", "destination", "source"], + "vars": { + "t5-1": "next-vis-byte", + "v1-0": "top-array", + "a3-1": "top-byte-offset", + "t0-0": "top-node-count", + "v1-1": "destination-byte", + "a3-3": "top-byte-count", + "t0-1": "i", + "t1-0": "vis-byte", + "v1-5": "node-depth-count", + "a3-5": "depth", + "t0-4": "parent-array", + "t2-0": "child-array", + "t1-5": "parent-byte-offset", + "t2-2": "child-byte-offset", + "t0-5": "parent-count", + "t1-6": "parent-vis", + "t2-3": "child-vis", + "t3-0": "parent-mask-byte", + "t4-0": "parent-bit" + } + }, + "(method 9 prototype-array-tie)": { + "args": ["this"], + "vars": { + "s5-0": "prototype-index", + "s4-0": "prototype", + "s3-0": "geometry-index", + "a0-1": "geometry", + "s4-1": "envmap-shader" + } + }, + "(method 9 prototype-inline-array-shrub)": { + "args": ["this"], + "vars": { + "s5-0": "prototype-index", + "s4-0": "prototype", + "s3-0": "geometry-index", + "a0-1": "geometry" + } + }, + "(method 8 prototype-array-tie)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-8": "array-bytes", + "s3-0": "i" + } + }, + "(method 8 prototype-bucket-tie)": { + "args": ["this", "usage", "flags"], + "vars": { + "s3-0": "geometry-index", + "a0-1": "geometry", + "v1-13": "name-bytes", + "v1-25": "palette-bytes" + } + }, + "(method 8 prototype-inline-array-shrub)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-8": "array-bytes", + "s3-0": "i" + } + }, + "(method 8 prototype-bucket-shrub)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-5": "prototype-bytes", + "s3-0": "geometry-index", + "a0-5": "geometry", + "v1-22": "name-bytes" + } + }, + "sphere-cull": { + "args": ["sphere"] + }, + "guard-band-cull": { + "args": ["sphere"] + }, + "sphere-in-view-frustum?": { + "args": ["sphere"], + "vars": { + "v1-0": "view-camera", + "v1-1": "distance-bits", + "v1-2": "outside-bits", + "v1-3": "packed-outside" + } + }, + "line-in-view-frustum?": { + "args": ["start", "end"], + "vars": { + "v1-0": "view-camera", + "v1-1": "start-distance-bits", + "v1-2": "start-outside-bits", + "v1-3": "start-outside-mask", + "a0-1": "end-distance-bits", + "a0-2": "end-outside-bits", + "a0-3": "end-outside-mask" + } + }, + "vis-cull": { + "args": ["id"] + }, + "error-sphere": { + "args": ["item", "name"] + }, + "(method 9 drawable)": { + "args": ["this"] + }, + "(method 10 drawable)": { + "args": ["this", "draw-data", "frame"] + }, + "(method 11 drawable)": { + "args": ["this", "count", "result"] + }, + "(method 12 drawable)": { + "args": ["this", "count", "result"] + }, + "(method 13 drawable)": { + "args": ["this", "count", "result"] + }, + "(method 17 drawable)": { + "args": ["this", "query-sphere", "count", "result"] + }, + "(method 14 drawable)": { + "args": ["this"] + }, + "(method 15 drawable)": { + "args": ["this", "draw-data", "frame"] + }, + "(method 10 drawable-error)": { + "args": ["this", "item", "frame"] + }, + "(method 16 drawable)": { + "args": ["this", "destination", "source"] + }, + "find-instance-by-name": { + "args": ["name"], + "vars": { + "s5-0": "level-index", + "v1-3": "active-level", + "s4-0": "drawable-trees", + "s3-0": "tree-index", + "v1-7": "tree", + "s2-0": "shrub-prototypes", + "s1-0": "prototype-index", + "s2-1": "tie-prototypes", + "s1-1": "prototype-index" + } + }, + "find-instance-by-index": { + "args": ["tree-type", "prototype-index", "bsp-filter"], + "vars": { + "v1-0": "level-index", + "a3-3": "active-level", + "a3-4": "level-bsp", + "a3-5": "drawable-trees", + "t0-5": "tree-index", + "t1-3": "tree", + "v1-2": "shrub-prototypes", + "v1-5": "tie-prototypes" + } + }, + "prototype-bucket-type": { + "args": ["prototype"] + }, + "prototype-bucket-recalc-fields": { + "args": ["prototype"] + }, + "draw-instance-info": { + "args": ["output"], + "vars": { + "s5-0": "prototype", + "s2-0": "instance-type", + "s4-0": "geometry-bytes", + "v1-26": "prototype-bytes", + "s3-1": "total-triangles", + "s4-2": "total-displayed-vertices", + "f30-0": "estimated-cost", + "s1-1": "shrub-geometry", + "s2-1": "shrub-instance-count", + "s0-0": "fragment-index", + "sv-16": "shrub-triangle-count", + "sv-32": "shrub-displayed-vertex-count", + "sv-48": "shrub-texture-count", + "sv-144": "visible-instance-count", + "sv-64": "lod", + "sv-80": "last-lod", + "v1-65": "tie-geometry", + "sv-96": "tie-triangle-count", + "sv-112": "tie-displayed-vertex-count", + "sv-128": "tie-texture-count", + "a0-23": "fragment-index", + "s1-2": "displayed-triangle-total", + "s0-1": "displayed-vertex-total", + "s2-2": "texture-total" + } + }, + "dma-add-process-drawable-hud": { + "args": ["actor", "control", "flag", "dma-buf"], + "vars": { + "v1-6": "scratch-lights", + "a0-3": "hud-lights" + } + }, + "add-process-drawable": { + "args": ["actor", "control", "flag", "dma-buf"] + }, + "foreground-engine-execute": { + "args": ["draw-engine", "frame", "level-index", "sink-index"], + "vars": { + "s4-0": "merc-dma-start", + "a1-2": "sink-group", + "s2-1": "global-buf", + "v1-14": "cache-base", + "v1-24": "dma-usage", + "s4-1": "generic-dma-start", + "a0-25": "generic-sink", + "a0-26": "dma-usage", + "v1-41": "shadow-queue" + } + }, + "real-main-draw-hook": { + "vars": { + "v1-2": "delay-index", + "gp-0": "level-index", + "s5-0": "active-level", + "gp-1": "level-index", + "a1-2": "active-level", + "gp-2": "level-index", + "a1-3": "active-level", + "gp-3": "level-index", + "a1-4": "active-level", + "gp-4": "level-index", + "a1-5": "active-level", + "s5-1": "uploaded-common", + "gp-5": "level-index", + "a1-8": "active-level", + "v1-150": "level-index", + "a0-59": "active-level", + "a1-38": "sink-index", + "gp-8": "level-index", + "v1-193": "active-level", + "gp-9": "foreground-buffer" + } + }, + "debug-init-buffer": { + "args": ["debug-bucket", "zbuf", "test"], + "vars": { + "t0-0": "global-buf", + "v1-3": "segment-start", + "a3-3": "global-buf", + "t1-0": "packet-head", + "a3-4": "global-buf", + "t1-2": "gif-head", + "a3-5": "global-buf", + "t1-4": "register-data", + "a3-6": "tail-tag", + "a1-4": "tail-packet" + } + }, + "marks-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "eddie-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "gregs-jungle-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "gregs-village1-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "gregs-texture-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "gregs-texture2-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "cave-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "paals-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } }, "display-frame-start": { "args": ["disp", "new-frame-idx", "odd-even"], "vars": { "f30-0": "time-ratio", - "s3-0": "scaled-seconds", - "s3-1": "new-frame" + "s3-0": "scaled-ticks", + "s3-1": "new-frame", + "s2-0": "bar-index", + "v1-56": "global-buf", + "v1-59": "debug-buf", + "v1-60": "calc-buf", + "v1-61": "calc-buf", + "a2-1": "default-regs", + "a0-28": "reset-call" } }, "display-frame-finish": { @@ -3110,7 +7846,7 @@ } }, "draw-string": { - "args": ["str-in", "context"], + "args": ["str", "buf", "ctxt"], "vars": { "v1-5": "fw", "a1-1": "dma-out", @@ -3146,50 +7882,102 @@ "r0-3": "r0" } }, + "get-string-length": { + "args": ["str", "ctxt"] + }, + "draw-string-adv": { + "args": ["str", "buf", "ctxt"] + }, + "draw-string-xy": { + "args": ["str", "buf", "x", "y", "color", "flags"], + "vars": { + "a2-2": "ctxt" + } + }, "add-debug-outline-triangle": { - "args": ["enable", "bucket", "p0", "p1", "p2", "color"] + "args": ["enable-draw", "bucket", "p0", "p1", "p2", "color"] }, "unpack-comp-rle": { - "args": ["out", "in"], + "args": ["dst", "src"], "vars": { - "v1-2": "current-input", + "v1-2": "control", "a2-0": "repeated-value", "v1-3": "copy-length", - "a2-1": "src-val" + "a2-1": "literal-value" + } + }, + "unpack-comp-huf": { + "args": ["dst", "src", "dictionary-base", "root"], + "vars": { + "t1-0": "zero-child", + "a2-1": "indexed-node-base", + "t2-0": "one-child", + "v1-4": "bit-mask", + "t0-0": "input-byte", + "t3-0": "bit", + "t1-1": "child", + "t2-1": "child-minus-end", + "t3-1": "child-offset", + "t3-2": ["node", "(pointer uint16)"] } }, "(method 16 level)": { - "args": ["this", "vis-info"], + "args": ["this", "vis-info", "unused", "bsp-vis-base"], "vars": { - "a0-1": "cam-leaf-idx", - "v1-1": "curr-vis-str", - "s4-0": "desired-vis-str", - "s4-1": "vis-buffer", - "s3-1": "vis-load-result", - "v1-28": "dest-bits", - "a1-3": "len", - "a0-19": "bsp-bits", - "a1-5": "len-qw", + "a0-1": "camera-leaf-index", + "v1-1": "current-vis-offset", + "s4-0": "desired-vis-offset", + "s4-1": "vis-data", + "s3-1": "ramdisk-id", + "v1-28": "output-bits", + "a1-3": "list-length", + "a0-19": "all-visible-bits", + "a1-5": "list-qwc", + "a2-1": "i", "s2-0": "lower-flag-bits", "s1-0": "spad-start", "s0-0": "spad-end", - "s3-2": "list-len", + "s3-2": "list-length", "v1-49": "list-qwc", + "v1-55": "list-qwc", + "a0-28": "i", + "a0-32": "i", + "s2-1": "vis-check", + "s1-1": "all-visible-check", + "v1-67": "invalid-bits?", + "s0-1": "i", + "v1-71": "vis-data", + "a0-47": "output-bits", + "a1-22": "all-visible-bits", + "a2-11": "list-qwc", + "a3-8": "i", + "t0-2": "vis-quad", + "t1-1": "all-visible-quad", + "t0-3": "masked-quad", "v0-1": "result" } }, "(method 9 merc-fragment)": { + "args": ["this"], "vars": { "s5-0": "fp-data", "s4-0": "eye-ctrl", "s3-0": "shader", - "v1-7": "eye-tex-block", - "v1-34": "eye-tex-block-2", + "s2-0": "shader-index", + "v1-7": "eye-texture-block", + "v1-34": "eye-texture-block", "v1-57": "tex", "a0-36": "seg" } }, + "(method 3 merc-fragment-control)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, "(method 9 merc-effect)": { + "args": ["this"], "vars": { "v1-0": "data", "v1-1": "tex", @@ -3211,6 +7999,7 @@ } }, "(method 8 merc-ctrl)": { + "args": ["this", "usage", "flags"], "vars": { "s4-0": "ctrl-mem", "s3-0": "effect-idx", @@ -3219,42 +8008,691 @@ "v1-35": "effect-mem", "a0-15": "effect-idx2", "a1-9": ["bctrl", "merc-blend-ctrl"], - "a2-1": "blend-frag-idx" + "a2-1": "blend-frag-idx", + "v1-36": "size-through-target-data", + "a0-28": "eye-ctrl", + "v1-47": "eye-bytes" + } + }, + "(method 3 merc-ctrl)": { + "args": ["this"], + "vars": { + "s5-0": "effect-index" } }, "(method 9 merc-ctrl)": { + "args": ["this"], "vars": { - "v1-3": "seg", + "v1-1": "seg", "s5-0": "effect-idx", - "a0-4": "idx-with-bit1", - "a0-7": "this-effect", + "a0-4": "translucent-effect-index", + "a1-1": "effect-count", + "v1-11": "effect-index", + "v1-16": "effect-word-count", + "a0-7": "translucent-effect", "a1-5": "last-effect", - "a2-6": "copy-idx" + "a2-6": "word-index", + "a3-2": "effect-word", + "s5-1": "eye-ctrl", + "s4-0": "shader-index", + "v1-25": "tex", + "a0-11": "seg" + } + }, + "merc-stats-display": { + "args": ["ctrl"], + "vars": { + "s5-0": "st-int-scale", + "s4-0": "st-scale", + "s5-1": "effect-index", + "s3-0": "effect", + "a2-4": "fragment-count", + "s4-1": "triangle-count", + "f30-0": "fragment-count-float", + "f28-0": "dvert-count-float", + "f26-0": "triangle-count-float" + } + }, + "merc-stats": { + "vars": { + "gp-0": "level-index", + "s5-0": "level-art-group", + "s4-0": "group-index", + "s3-0": "art-list", + "s2-0": "art-index", + "s1-0": "art", + "a0-3": "merc" + } + }, + "merc-edge-stats": { + "vars": { + "gp-0": "level-index", + "s5-0": "level-art-group", + "s4-0": "group-index", + "s3-0": "art-list", + "s2-0": "art-index", + "s1-0": "art", + "v1-10": "merc" + } + }, + "merc-vu1-initialize-chain": { + "args": ["dma"], + "vars": { + "gp-0": "cursor", + "s5-0": "low-memory", + "v1-20": "start-packet" } }, "merc-vu1-init-buffer": { - "args": ["dma-bucket", "test"], + "args": ["dma-bucket", "test", "unused"], "vars": { "gp-0": "bucket", - "s4-0": "dma-buf" + "s4-0": "dma-buf", + "s3-1": "draw-data-start", + "v1-8": "buffer-for-vif-tag", + "a0-6": "vif-packet", + "v1-9": "buffer-for-gif-tag", + "a0-8": "gif-packet", + "v1-10": "buffer-for-test", + "a0-10": "test-packet", + "v1-11": "chain-tail" + } + }, + "ripple-make-request": { + "args": ["waveform", "effect"], + "vars": { + "v1-1": "request-count", + "a2-1": "requests", + "a3-0": "already-queued", + "t0-1": "i" + } + }, + "ripple-update-waveform-offs": { + "args": ["wave-set"], + "vars": { + "f0-1": "elapsed-frames", + "v1-4": "i", + "a1-4": "wave" + } + }, + "ripple-execute": { + "vars": { + "gp-0": "request-index", + "s5-0": "request-count", + "s4-0": "requests", + "s3-0": "match-index", + "s2-0": "waveform" + } + }, + "ripple-add-debug-sphere": { + "args": ["drawable", "grid-point", "x-slope", "z-slope"], + "vars": { + "f30-0": "negative-yaw", + "s5-0": "world-position", + "f28-0": "local-x", + "f26-0": "local-z" + } + }, + "ripple-slow-add-sine-waves": { + "args": ["wave-set", "grid-x", "grid-z"], + "vars": { + "f30-0": "height", + "s3-0": "i", + "v1-3": "wave", + "f0-2": "phase" + } + }, + "ripple-find-height": { + "args": ["drawable", "unused", "point"], + "vars": { + "f30-0": "base-height", + "v1-1": "draw", + "a1-5": "effects", + "a1-6": "extra-info", + "s4-0": "ripple-info", + "gp-0": "ripple-control", + "s5-0": "wave-set", + "f28-0": "local-x", + "f26-0": "local-z", + "f22-0": "grid-angle", + "f24-0": "angle-cos", + "f1-3": "angle-sin", + "f0-4": "rotated-x", + "f1-5": "rotated-z", + "f2-3": "inverse-grid-size", + "f28-1": "grid-x", + "f26-1": "grid-z", + "f22-1": "cell-x", + "f24-1": "cell-z", + "f20-0": "height-00", + "sv-16": "height-10", + "sv-32": "height-01", + "f1-6": "height-11", + "f0-22": "interp-x0", + "f1-9": "interp-x1", + "f1-12": "interpolated-height", + "f0-23": "ripple-scale" } }, "(method 9 screen-filter)": { + "args": ["this"], "vars": { - "v1-4": ["v1-4", "dma-packet"], - "s5-0": "buf" + "v1-4": ["packet", "dma-packet"], + "s5-0": "buf", + "gp-0": "packet-start", + "a3-1": "packet-end" + } + }, + "(anon-function 4 main)": { + "vars": { + "gp-0": "shutdown-start" + } + }, + "on": { + "args": ["release-mode"], + "vars": { + "s5-0": "display-proc", + "t9-2": "activate-method", + "gp-1": "entity-cam" + } + }, + "off": { + "vars": { + "gp-0": "i", + "a0-2": "lev" + } + }, + "(method 9 collide-cache)": { + "args": ["obj"], + "vars": { + "gp-0": "tri", + "s4-0": "tris-left", + "t1-0": "tri-color", + "gp-1": "prim", + "s5-1": "prims-left", + "t0-1": "prim-color" + } + }, + "(method 17 collide-cache)": { + "args": ["obj"] + }, + "(method 21 collide-cache)": { + "args": ["obj", "bsp-find-mesh-func", "import-mesh-func"], + "vars": { + "s4-1": "probe-level-index", + "a0-2": "probe-level", + "s3-0": "bsp-level-index", + "v1-21": "bsp-level", + "a0-28": "tri-count", + "v1-55": "prims", + "a1-17": "background-prim" + } + }, + "(method 25 collide-cache)": { + "args": ["obj", "water"], + "vars": { + "v1-28": "bottom-y", + "a1-6": "prim-index", + "a2-8": "triangles", + "v1-33": "water-prim", + "a1-10": "cache-prim" + } + }, + "(method 13 collide-cache)": { + "args": ["obj", "box", "kinds", "proc", "ignore-pat"] + }, + "collide-cache-using-box-test": { + "args": ["bsphere"], + "vars": { + "v1-0": "work", + "v1-1": ["result-bits", "int"] + } + }, + "(method 11 collide-fragment)": { + "args": ["obj", "count", "clist"], + "vars": { + "s3-0": "cwork", + "s2-0": "i", + "v1-5": "item" + } + }, + "(method 11 instance-tie)": { + "args": ["obj", "count", "clist"], + "vars": { + "s3-0": "instance-index", + "s2-0": "frag-list", + "s1-0": "frag", + "s0-0": "fragment-index", + "v1-12": "item" + } + }, + "(method 16 collide-cache)": { + "args": ["obj", "probe-origin", "probe-length", "kinds", "proc", "ignore-pat"], + "vars": { + "v1-0": "cwork" + } + }, + "collide-cache-using-y-probe-test": { + "args": ["bsphere"], + "vars": { + "a1-0": "cwork" + } + }, + "(method 12 collide-fragment)": { + "args": ["obj", "count", "clist"], + "vars": { + "s3-0": "i", + "v1-5": "item" + } + }, + "(method 12 instance-tie)": { + "args": ["obj", "count", "clist"], + "vars": { + "s3-0": "instance-index", + "s2-0": "frag-list", + "s1-0": "frag", + "s0-0": "fragment-index", + "v1-11": "item" + } + }, + "(method 14 collide-cache)": { + "args": ["obj", "start-pt", "move-vec", "radius", "kinds", "proc", "ignore-pat"], + "vars": { + "v1-0": "axis-threshold", + "v1-1": "cwork", + "s2-0": "query-box", + "t0-1": "move-words", + "t0-2": "abs-move-words", + "a0-2": "long-axis-mask", + "a0-3": "packed-long-axis-mask", + "a0-4": "has-long-axis?", + "a0-7": ["direction-x-bits", "int"] + } + }, + "collide-cache-using-line-sphere-test": { + "args": ["bsphere"], + "vars": { + "a1-0": "cwork" + } + }, + "(method 13 collide-fragment)": { + "args": ["obj", "count", "clist"], + "vars": { + "s3-0": "i", + "v1-5": "item" + } + }, + "(method 13 instance-tie)": { + "args": ["obj", "count", "clist"], + "vars": { + "s3-0": "instance-index", + "s2-0": "frag-list", + "s1-0": "frag", + "s0-0": "fragment-index", + "v1-10": "item" + } + }, + "(method 22 collide-cache)": { + "args": ["obj"] + }, + "(method 23 collide-cache)": { + "args": ["obj"] + }, + "(method 24 collide-cache)": { + "args": ["obj"] + }, + "(method 12 collide-shape-prim)": { + "args": ["obj", "ccache"] + }, + "(method 12 collide-shape-prim-sphere)": { + "args": ["obj", "ccache"] + }, + "(method 12 collide-shape-prim-group)": { + "args": ["obj", "ccache"] + }, + "(method 13 collide-shape-prim)": { + "args": ["obj", "ccache"] + }, + "(method 13 collide-shape-prim-sphere)": { + "args": ["obj", "ccache"] + }, + "(method 13 collide-shape-prim-group)": { + "args": ["obj", "ccache"] + }, + "(method 14 collide-shape-prim)": { + "args": ["obj", "ccache"] + }, + "(method 14 collide-shape-prim-sphere)": { + "args": ["obj", "ccache"] + }, + "(method 14 collide-shape-prim-group)": { + "args": ["obj", "ccache"] + }, + "(method 12 collide-cache)": { + "args": ["obj", "probe-origin", "probe-length", "kinds", "proc", "tri-out", "ignore-pat"] + }, + "(method 20 collide-cache)": { + "args": ["obj", "probe-origin", "probe-length", "kinds", "tri-out", "ignore-pat"], + "vars": { + "gp-0": "work", + "s2-0": "cprim", + "s1-0": "prims-left", + "f0-1": "best-u" + } + }, + "(method 31 collide-cache)": { + "args": ["obj", "work", "cprim"], + "vars": { + "f0-1": "hit-u", + "gp-0": "tri-out", + "a0-11": "tangent", + "a2-5": "bitangent" + } + }, + "(method 10 collide-cache)": { + "args": ["obj", "start-pt", "move-vec", "radius", "kinds", "proc", "tri-out", "ignore-pat"] + }, + "(method 18 collide-cache)": { + "args": ["obj", "start-pt", "move-vec", "radius", "kinds", "tri-out", "ignore-pat"], + "vars": { + "s4-0": "work", + "s3-0": "cprim", + "f30-0": "best-u", + "s2-0": "prims-left", + "f0-0": "hit-u", + "f0-1": "hit-u" + } + }, + "(method 11 collide-cache)": { + "args": ["obj", "params"] + }, + "(method 15 collide-cache)": { + "args": ["obj", "params"], + "vars": { + "s4-0": "query-box" + } + }, + "(method 19 collide-cache)": { + "args": ["obj", "params"], + "vars": { + "v1-12": "hit?", + "s5-0": "work", + "a3-0": "max-spheres", + "a2-0": "num-spheres", + "v1-0": "work-spheres", + "a1-1": "input-spheres", + "a3-1": "excess-spheres", + "a2-1": "spheres-left", + "a1-2": "next-input-sphere", + "v1-1": "next-work-sphere", + "s4-0": "cprim", + "s3-0": "kinds", + "s2-0": "prims-left" + } + }, + "test-closest-pt-in-triangle": { + "args": ["cache"], + "vars": { + "gp-0": "nearest-point", + "f30-0": "best-distance-squared", + "s5-0": "tri", + "s4-0": "target-position", + "s3-0": "closest-point", + "s2-0": "normal", + "s1-0": "triangles-left", + "f0-0": "distance-squared" + } + }, + "make-collide-list-using-line-sphere-inst-test": { + "args": ["frag", "inst"], + "vars": { + "v1-0": "cwork", + "a2-0": "max-scale-q12", + "a3-0": "translation-packed", + "t2-0": "row-0-packed", + "t0-0": "row-1-packed", + "a3-2": "row-2-packed", + "a3-1": "translation-lanes", + "t1-0": "translation-shifted", + "t2-1": "row-0-lanes", + "t2-2": "row-0-words", + "t0-1": "row-1-lanes", + "t0-2": "row-1-words", + "a3-3": "row-2-lanes", + "a3-4": "row-2-words", + "a0-1": "query-min", + "a1-1": "query-max", + "v1-1": "high-corner-words", + "a2-1": "low-corner-words", + "a1-2": "above-box", + "v1-2": "below-box", + "v1-3": "separated", + "v1-4": "separated-packed" + } + }, + "(method 7 process)": { + "vars": { + "v1-0": "context", + "v1-5": "owner-entity", + "v1-7": "conn", + "a0-14": "previous-link", + "a0-19": "param1-value", + "a0-24": "param2-value", + "a0-29": "param3-value", + "v1-10": "self-pointer", + "v1-15": "parent-pointer", + "s4-0": "heap-object", + "a2-4": "allocation-size", + "a1-22": "allocation-start" + } + }, + "(method 7 process-drawable)": { + "vars": { + "v1-0": "context" + } + }, + "(method 7 collide-sticky-rider-group)": { + "vars": { + "v1-0": "i", + "a2-2": "rider" + } + }, + "(method 7 collide-shape-prim-group)": { + "vars": { + "v1-2": "i" + } + }, + "(method 7 draw-control)": { + "vars": { + "v1-14": "shadow-ctrl" + } + }, + "(method 7 joint-control)": { + "vars": { + "v1-6": "i" + } + }, + "(method 7 cspace-array)": { + "vars": { + "v1-0": "i", + "a2-2": "space", + "a3-6": "param1-value", + "a3-11": "param2-value" + } + }, + "(method 7 sparticle-launch-control)": { + "vars": { + "v1-2": "i", + "a0-3": "launch-state", + "a2-0": "origin-pointer" + } + }, + "(anon-function 6 relocate)": { + "args": ["particle-system", "cpuinfo"], + "vars": { + "v1-1": "relocation-offset" + } + }, + "(method 3 memory-usage-block)": { + "args": ["this"], + "vars": { + "s5-0": "used-total", + "s4-0": "aligned-total", + "s3-0": "i", + "v1-2": "info" + } + }, + "(method 10 memory-usage-block)": { + "args": ["this"], + "vars": { + "v0-0": "total", + "v1-0": "i" + } + }, + "(method 9 memory-usage-block)": { + "args": ["this"], + "vars": { + "v1-0": "i" + } + }, + "mem-size": { + "args": ["value", "print?", "flags"], + "vars": { + "gp-0": "usage" + } + }, + "(method 14 level)": { + "args": ["this", "force?"] + }, + "(method 8 process-tree)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-0": "name-category", + "a0-1": "name-pool-list", + "a3-0": "name-pool-symbol", + "s5-0": "dead-category", + "s4-0": "dead-pool-list", + "v1-4": "dead-pool-symbol", + "a0-5": "pool-root" + } + }, + "(anon-function 3 memory-usage)": { + "args": ["pool-object"], + "vars": { + "gp-0": "usage", + "s5-0": "category" + } + }, + "(anon-function 2 memory-usage)": { + "args": ["proc"], + "vars": { + "gp-0": "usage", + "s4-0": "pool-category", + "v1-23": "process-size", + "v1-34": "heap-used", + "v1-45": "process-data-size", + "v1-55": "heap-header-size", + "v1-65": "thread-size", + "v1-78": "root-size", + "v1-91": "root-prim-size", + "v1-103": "cspace-size", + "v1-115": "draw-control-size", + "v1-129": "skeleton-size", + "v1-141": "joint-control-size", + "v1-153": "particle-control-size", + "v1-165": "nav-size", + "v1-177": "path-size", + "v1-189": "volume-size" + } + }, + "(method 11 memory-usage-block)": { + "args": ["this", "lev", "destination"], + "vars": { + "s3-0": "level-heap-used", + "v1-2": "adjacent-vis-bytes", + "s2-0": "level-heap-budget", + "s1-0": "frame-dma-bytes", + "s2-2": "heap-stats-destination" } }, "(method 11 fact-info-target)": { "args": ["this", "kind", "amount", "source-handle"], "vars": { "f0-29": "buzz-count", - "f30-0": "eco-lev" + "f30-0": "old-eco-level", + "s4-2": "task", + "s5-1": "owner", + "s4-3": "tracker" + } + }, + "(anon-function 6 game-info)": { + "args": ["effect-owner"] + }, + "(anon-function 17 game-info)": { + "args": ["mode", "cause", "continue", "save"] + }, + "(top-level-login game-info)": { + "vars": { + "gp-0": "game", + "v1-15": "task-perms", + "a0-24": "i" } }, "auto-save-init-by-other": { "args": ["desired-mode", "notify-proc", "card-idx", "file-idx"] }, + "auto-save-post": { + "vars": { + "gp-0": "debug-context", + "gp-1": "save-context", + "s5-2": "print-text" + } + }, + "(code done auto-save)": { + "vars": { + "gp-0": "slot-info" + } + }, + "(code error auto-save)": { + "args": ["status"], + "vars": { + "s5-0": "slot-info" + } + }, + "(code restore auto-save)": { + "vars": { + "gp-0": "poll-value", + "v1-10": "buffer", + "v1-22": "result", + "v1-34": "save", + "gp-1": "i" + } + }, + "(code save auto-save)": { + "vars": { + "gp-0": "old-loading-level", + "v1-14": "buffer", + "v1-24": "result" + } + }, + "(code create-file auto-save)": { + "vars": { + "v1-12": "buffer" + } + }, + "(code format-card auto-save)": { + "vars": { + "v1-4": "result" + } + }, + "(code get-heap auto-save)": { + "vars": { + "a0-1": "buffer" + } + }, + "auto-save-command": { + "args": ["mode", "card", "file", "notify-proc"] + }, "debug-menu-item-var-make-int": { "args": [ "item", @@ -3278,7 +8716,11 @@ ] }, "(method 0 debug-menu-item-var)": { - "args": ["allocation", "type-to-make", "name", "id", "max-width"] + "args": ["allocation", "type-to-make", "name", "id", "max-width"], + "vars": { + "gp-0": "item", + "v1-2": "max-chars" + } }, "debug-menu-context-grab-joypad": { "args": ["ctxt", "callback-arg", "callback-func"] @@ -3314,19 +8756,48 @@ }, "(anon-function 82 default-menu)": { "vars": { - "s4-0": ["s4-0", "texture-id"] + "s4-0": ["tex-id", "texture-id"], + "gp-0": "tex", + "v1-3": "page-link", + "s5-1": "shader-cursor" } }, "process-status-bits": { + "args": ["proc", "stream"], "vars": { - "s3-0": ["proc-draw", "process-drawable"] + "s5-0": "status-proc", + "s3-0": ["drawable-proc", "process-drawable"], + "s5-1": "format-fn", + "s4-0": "format-string", + "a2-0": "run-char", + "a3-0": "draw-char", + "t0-0": "lod-char", + "v1-15": "lod" } }, "(method 29 entity-actor)": { - "args": ["this", "mode", "expected-type"] + "args": ["this", "mode", "expected-type"], + "vars": { + "s4-0": "entity-type", + "t0-3": "level-name", + "s3-2": "proc", + "s4-2": "drawable-proc", + "t9-4": "format-fn", + "a0-5": "stream", + "a1-5": "format-string", + "a2-4": "aid", + "a3-3": "task" + } }, "(method 13 level-group)": { - "args": ["this", "mode", "expected-type"] + "args": ["this", "mode", "expected-type"], + "vars": { + "s3-0": "level-index", + "s2-0": "lev", + "s1-0": "i", + "s2-1": "links", + "s1-1": "i" + } }, "(method 24 entity)": { "args": ["this", "lev-group", "lev", "aid"], @@ -3336,6 +8807,101 @@ "t1-1": "other-front" } }, + "(method 25 entity)": { + "args": ["this", "group"], + "vars": { + "v1-0": "link" + } + }, + "(method 26 entity)": { + "vars": { + "v1-0": "i", + "a1-3": "lev" + } + }, + "entity-by-name": { + "args": ["name"], + "vars": { + "s5-0": "level-index", + "s4-0": "lev", + "s3-0": "actors", + "s2-0": "i", + "s1-0": "actor", + "s3-1": "ambients", + "s2-1": "i", + "s1-1": "ambient", + "s4-1": "cameras", + "s3-2": "i", + "s2-2": "camera" + } + }, + "entity-by-type": { + "args": ["entity-type"], + "vars": { + "s5-0": "level-index", + "v1-3": "lev", + "s4-0": "actors", + "s3-0": "i", + "s2-0": "actor" + } + }, + "entity-by-aid": { + "args": ["aid"], + "vars": { + "v1-0": "level-index", + "a1-3": "lev", + "a1-4": "links", + "a2-4": "lo", + "a3-2": "hi", + "t0-3": "mid", + "t1-2": "link", + "t2-0": "mid-aid" + } + }, + "entity-by-meters": { + "args": ["x", "y", "z"], + "vars": { + "v1-0": "level-index", + "a3-3": "lev", + "a3-5": "actors", + "t0-4": "i", + "t1-3": "actor", + "t2-1": "translation" + } + }, + "process-by-ename": { + "args": ["name"], + "vars": { + "v1-0": "ent" + } + }, + "entity-process-count": { + "args": ["mode"], + "vars": { + "gp-0": "count", + "s4-0": "level-index", + "s3-0": "lev", + "s2-0": "links", + "s1-0": "i", + "v1-9": "ent" + } + }, + "entity-count": { + "vars": { + "v0-0": "count", + "v1-0": "level-index", + "a0-3": "lev", + "a0-6": "links", + "a1-3": "i" + } + }, + "entity-remap-names": { + "args": ["remaps"], + "vars": { + "s5-0": "remap", + "a0-2": "ent" + } + }, "update-actor-vis-box": { "args": ["proc", "min-pt", "max-pt"], "vars": { @@ -3343,8 +8909,97 @@ "f0-0": "radius" } }, + "(method 22 level-group)": { + "vars": { + "v1-10": "spill-result", + "sv-16": "drawable-proc", + "s5-0": "level-index", + "v1-3": "lev", + "s4-0": "links", + "s3-0": "i", + "s0-0": "ent", + "v0-0": "vis-volume", + "s2-0": "min-point", + "s1-0": "max-point", + "s0-1": "proc", + "s0-2": "child-link", + "sv-32": "update-box", + "sv-48": "child-proc" + } + }, + "(method 23 level-group)": { + "vars": { + "s5-0": "level-index", + "v1-3": "lev", + "s4-0": "links", + "s3-0": "i", + "sv-32": "ent", + "v0-0": "vis-volume", + "s1-0": "min-point", + "s2-0": "max-point", + "s0-0": "translation", + "sv-16": "nav-entity", + "v0-1": "linked-nav-entity", + "f1-0": "min-padding", + "f0-0": "max-padding" + } + }, + "(method 24 level-group)": { + "vars": { + "s5-0": "level-index", + "v1-3": "lev", + "s4-0": "links", + "s3-0": "i", + "sv-80": "ent", + "s1-0": "vis-volume", + "f30-0": "vis-distance", + "s2-0": "translation", + "sv-16": "entity-type", + "s0-0": "min-point", + "s1-1": "max-point" + } + }, + "expand-vis-box-with-point": { + "args": ["ent", "point"], + "vars": { + "v1-1": "vis-volume", + "a0-2": "min-point", + "v1-2": "max-point" + } + }, + "(method 15 level-group)": { + "vars": { + "s5-1": "frame-time", + "f0-5": "target-pause-distance", + "sv-16": "camera-position", + "sv-24": "actor-changes", + "s5-2": "level-index", + "s4-2": "lev", + "s4-3": "links", + "s3-1": "link-count", + "s2-0": "i", + "v1-44": "link", + "s3-2": "links", + "s2-1": "link-count", + "s1-0": "i", + "s0-0": "link", + "s4-4": "links", + "s3-3": "link-count", + "s2-2": "i", + "v1-84": "link", + "s4-5": "links", + "s3-4": "link-count", + "s2-3": "i", + "s1-1": "link", + "s3-5": "links", + "s2-4": "link-count", + "s0-1": "low-memory?", + "s1-2": "i", + "sv-32": "link" + } + }, "init-entity": { - "args": ["proc", "ent"] + "args": ["proc", "ent", "entity-type"] }, "(method 22 entity-actor)": { "vars": { @@ -3353,8 +9008,14 @@ "s4-0": "entity-process" } }, + "entity-deactivate-handler": { + "args": ["proc", "actor"] + }, "(method 18 bsp-header)": { "vars": { + "s5-0": "birth-start-cycles", + "v1-71": "birth-end-cycles", + "a3-3": "elapsed-cycles", "a2-0": "actor-count", "s4-0": "birth-idx", "a0-4": "idx-to-birth", @@ -3363,7 +9024,1056 @@ "s4-1": "amb-array", "s3-0": "bsp-ambs", "a0-10": "amb-to-birth", - "s4-2": "cams" + "s4-2": "cams", + "s2-0": "i", + "s3-1": "i" + } + }, + "(method 23 entity-actor)": { + "vars": { + "a0-1": "proc" + } + }, + "(method 8 drawable-actor)": { + "vars": { + "v1-6": "allocation-size" + } + }, + "(method 8 drawable-inline-array-actor)": { + "vars": { + "v1-7": "header-size", + "s3-0": "i" + } + }, + "(anon-function 46 entity)": { + "args": ["proc"] + }, + "(method 19 bsp-header)": { + "vars": { + "s5-0": "actors", + "s4-0": "i", + "s3-0": "actor", + "s5-1": "cameras", + "s4-1": "i", + "s5-2": "child-link", + "s4-2": "heap-base", + "s3-1": "heap-end", + "s2-0": "proc", + "v1-28": "tracker", + "s1-0": "candidate", + "v1-34": "drawable-proc" + } + }, + "process-drawable-from-entity!": { + "args": ["proc", "actor"] + }, + "(method 9 entity-perm)": { + "args": ["this", "mode", "clear-mask"] + }, + "reset-actors": { + "args": ["mode"], + "vars": { + "v1-0": "reset-mode", + "s5-0": "clear-mask", + "s4-0": "game-state", + "s3-0": "level-index", + "v1-4": "lev", + "s2-0": "links", + "s1-0": "i", + "s0-0": "ent", + "s3-1": "task-perms", + "s2-1": "i", + "s4-1": "perms", + "s3-2": "i" + } + }, + "(anon-function 10 entity)": { + "args": ["proc"] + }, + "reset-cameras": { + "vars": { + "gp-0": "level-index", + "v1-5": "lev", + "s5-0": "cameras", + "s4-0": "i" + } + }, + "(method 9 entity-links)": { + "args": ["this", "camera-position"] + }, + "entity-birth-no-kill": { + "args": ["ent"], + "vars": { + "gp-0": "link" + } + }, + "entity-task-complete-on": { + "args": ["ent"], + "vars": { + "v1-0": "link" + } + }, + "entity-task-complete-off": { + "args": ["ent"], + "vars": { + "v1-0": "link" + } + }, + "(method 30 entity-actor)": { + "args": ["this", "status-mask", "enabled?"], + "vars": { + "v1-0": "link" + } + }, + "process-entity-status!": { + "args": ["proc", "status-mask", "enabled?"], + "vars": { + "v1-6": "link" + } + }, + "entity-speed-test": { + "args": ["entity-name"], + "vars": { + "gp-0": "ent", + "s4-0": "birth-cycles" + } + }, + "(method 9 path-control)": { + "vars": { + "s5-0": "draw-text", + "s4-0": "enabled", + "s3-0": "debug-bucket", + "a0-5": "control", + "s5-1": "i", + "s4-1": "point", + "s3-1": "draw-text", + "s2-1": "enabled", + "s1-0": "debug-bucket" + } + }, + "(method 9 curve-control)": { + "vars": { + "s5-0": "draw-text", + "s4-0": "enabled", + "s3-0": "debug-bucket", + "a0-5": "control", + "s5-1": "i", + "s4-1": "point", + "s3-1": "draw-text", + "s2-1": "enabled", + "s1-0": "debug-bucket" + } + }, + "(method 16 path-control)": { + "vars": { + "f30-0": "total-distance", + "s5-0": "i" + } + }, + "(method 16 curve-control)": { + "vars": { + "f0-0": "cached-length" + } + }, + "(method 10 path-control)": { + "args": ["this", "result", "vertex-progress", "mode"], + "vars": { + "a1-1": "num-cverts", + "f0-3": "vertex-index" + } + }, + "(method 11 path-control)": { + "args": ["this", "result"], + "vars": { + "s4-0": "random-index" + } + }, + "(method 13 path-control)": { + "args": ["this", "result", "percent", "mode"] + }, + "(method 13 curve-control)": { + "args": ["this", "result", "percent", "mode"] + }, + "(method 10 curve-control)": { + "args": ["this", "result", "vertex-progress", "mode"] + }, + "(method 12 path-control)": { + "args": ["this", "result", "vertex-progress"], + "vars": { + "v1-3": "num-cverts", + "f0-3": "vertex-index", + "f0-4": "capped-index" + } + }, + "(method 14 path-control)": { + "args": ["this", "result", "percent"] + }, + "(method 14 curve-control)": { + "args": ["this", "result", "percent"], + "vars": { + "s4-0": "nearby-point" + } + }, + "(method 12 curve-control)": { + "args": ["this", "result", "vertex-progress"] + }, + "(method 19 path-control)": { + "vars": { + "s5-0": "segment-start", + "s4-0": "segment-end", + "s3-0": "target-point", + "f30-0": "closest-distance", + "f28-0": "closest-progress", + "s2-0": "closest-point", + "s1-1": "i", + "f0-5": "distance" + } + }, + "plane-volume-intersect-dist": { + "args": ["plane-data", "origin", "direction"], + "vars": { + "f0-1": "origin-distance", + "f1-1": "direction-dot" + } + }, + "(method 9 plane-volume)": { + "args": ["this", "volume-type", "point-array", "normal-array"], + "vars": { + "s3-0": "plane-index", + "sv-176": "plane-point", + "sv-192": "edge-direction", + "sv-208": "toward-face", + "sv-224": "edge-end", + "s1-0": "centroid-sum", + "s0-0": "endpoint-count", + "s2-0": "planes", + "sv-240": "other-index", + "f0-4": "to-face-distance", + "sv-144": "edge-start", + "sv-148": "edge-span", + "sv-152": "clip-count", + "sv-160": "clip-plane", + "sv-256": "clip-index", + "f30-0": "clip-distance", + "v1-70": "check-index" + } + }, + "(method 10 plane-volume)": { + "vars": { + "v1-0": "volume-type", + "s5-0": "line-color", + "s4-0": "point-cursor", + "s3-0": "i" + } + }, + "(method 11 plane-volume)": { + "args": ["this", "point", "tolerance"], + "vars": { + "v1-0": "i" + } + }, + "(method 9 vol-control)": { + "vars": { + "a0-1": "control", + "s5-0": "saved-pp", + "s4-0": "plane-total", + "v1-8": "positive-count-index", + "v1-11": "cutout-count-index", + "s5-1": "positive-init-index", + "s5-2": "cutout-init-index", + "s5-3": "positive-draw-index", + "s5-4": "cutout-draw-index" + } + }, + "(method 10 vol-control)": { + "args": ["this", "point"], + "vars": { + "s4-0": "cutout-index", + "s4-1": "positive-index" + } + }, + "entity-nav-login": { + "args": ["entity"], + "vars": { + "gp-0": "mesh", + "sv-16": "sphere-tag", + "v1-11": "sphere-data" + } + }, + "(top-level-login navigate)": { + "vars": { + "gp-0": "mesh" + } + }, + "(method 20 nav-mesh)": { + "args": ["this", "poly", "color"], + "vars": { + "s5-0": "origin", + "s2-0": "vertices", + "gp-0": "line-start", + "s4-0": "line-end" + } + }, + "(method 10 nav-mesh)": { + "args": ["this", "poly", "result"] + }, + "(method 9 nav-mesh)": { + "args": ["this", "poly", "result"] + }, + "inc-mod3": { + "args": ["index"], + "vars": { + "v0-0": "next-index", + "v1-0": "last-index", + "v1-1": "past-end", + "v0-1": "result" + } + }, + "dec-mod3": { + "args": ["index"], + "vars": { + "v0-0": "previous-index", + "v1-0": "last-index", + "a0-1": "before-start", + "v0-1": "result" + } + }, + "(method 21 nav-mesh)": { + "args": ["this", "poly", "point"] + }, + "(method 24 nav-mesh)": { + "args": ["this", "poly", "result", "point"], + "vars": { + "s2-0": "vertices", + "s1-0": "candidate", + "s5-0": "closest-point", + "f30-0": "closest-distance", + "s0-0": "i", + "a1-1": "edge-start", + "f0-0": "distance" + } + }, + "(method 26 nav-mesh)": { + "args": ["this", "poly", "result", "point"] + }, + "point-inside-rect?": { + "args": ["node", "point", "y-threshold"] + }, + "(method 27 nav-mesh)": { + "args": ["this", "point", "y-threshold"], + "vars": { + "a0-6": "cache-hit", + "a2-3": "equal-words", + "a2-4": "packed-equality", + "s2-0": "available-cache-index", + "s3-0": "now", + "v1-3": "i", + "a3-0": "cache-entry", + "a2-1": "query-point", + "a1-3": "xyz-mask", + "a3-1": "cached-quad", + "a1-4": "high-lane-mask", + "a2-2": "point-quad", + "v1-12": "poly-index", + "a0-24": "write-entry" + } + }, + "circle-triangle-intersection-proc?": { + "args": ["center", "radius", "vertices"], + "vars": { + "v1-0": "outside-edge-mask", + "a3-0": "edge-index", + "t0-4": "edge-start", + "t1-4": "edge-end", + "f0-1": "edge-normal-x", + "f1-2": "edge-normal-z", + "f2-2": "point-offset-x", + "f3-2": "point-offset-z", + "f4-5": "edge-length", + "f4-7": "inverse-edge-length", + "f0-2": "unit-normal-x", + "f1-3": "unit-normal-z", + "f0-4": "signed-distance", + "t0-15": "test-vertex", + "a3-5": "selected-index", + "t0-16": "selected-edge-start", + "v1-18": "selected-edge-end", + "f1-8": "edge-x", + "f0-7": "edge-z", + "f2-7": "start-projection", + "f0-9": "end-projection", + "v1-28": "selected-vertex", + "f0-14": "distance-squared" + } + }, + "circle-triangle-intersection?": { + "args": ["center", "radius", "vertices"], + "vars": { + "v1-0": "center", + "f0-0": "radius", + "a0-1": "vertices", + "a1-1": "outside-edge-mask", + "a2-1": "edge-index", + "a3-4": "edge-start", + "t0-4": "edge-end", + "f1-1": "edge-normal-x", + "f2-2": "edge-normal-z", + "f3-2": "point-offset-x", + "f4-2": "point-offset-z", + "f5-5": "edge-length", + "f5-7": "inverse-edge-length", + "f1-2": "unit-normal-x", + "f2-3": "unit-normal-z", + "f1-4": "signed-distance", + "a3-15": "test-vertex", + "a2-6": "selected-index", + "a3-16": "selected-edge-start", + "a1-18": "selected-edge-end", + "f2-7": "edge-x", + "f1-7": "edge-z", + "f3-7": "start-projection", + "f1-9": "end-projection", + "a0-2": "selected-vertex", + "f1-14": "distance-squared" + } + }, + "(method 18 nav-mesh)": { + "args": ["this", "from-poly", "source-centroid", "current-poly", "visited", "depth"], + "vars": { + "s1-1": "current-poly-data", + "s0-0": "neighbor-centroid", + "sv-32": "edge-index", + "sv-48": "neighbor-index", + "v0-3": "visible" + } + }, + "(method 23 nav-mesh)": { + "args": ["this", "poly", "start-position", "result-travel", "desired-travel", "portal"], + "vars": { + "s1-0": "vertices", + "s0-0": "clipped-edge", + "a0-8": "edge-start", + "a1-7": "edge-end", + "f0-1": "edge-normal-x", + "f1-2": "edge-normal-z", + "f2-4": "edge-distance", + "f0-3": "travel-projection", + "f0-4": "fraction", + "v1-11": "neighbor-index", + "v1-1": "edge-index", + "v1-32": "wrapped-next-edge", + "a0-14": "before-first-edge", + "a0-17": "past-last-edge", + "a1-10": "wrapped-previous-edge", + "sv-16": "edge-end-vertex", + "a1-8": "edge-start-vertex", + "a1-9": "previous-edge", + "v1-28": "last-edge-index", + "v1-31": "next-edge", + "a0-16": "last-edge-index" + } + }, + "(method 25 nav-mesh)": { + "args": ["this", "poly", "result", "point"], + "vars": { + "s3-0": "normal", + "s4-0": "triangle", + "v1-0": "i" + } + }, + "(method 17 nav-control)": { + "args": ["this", "result", "point"], + "vars": { + "s5-0": "mesh", + "s3-1": "point-local", + "sv-32": "find-flags", + "a1-5": "poly" + } + }, + "(method 18 nav-control)": { + "args": ["this", "point"] + }, + "(method 20 nav-control)": { + "args": ["this", "poly", "result", "point"] + }, + "(method 25 nav-control)": { + "args": ["this", "point", "radius"], + "vars": { + "v1-1": "point-local", + "a1-1": "mesh" + } + }, + "(method 9 nav-control)": { + "args": ["this"], + "vars": { + "a0-1": "control", + "s5-0": "mesh", + "s4-0": "temporary-point", + "s3-0": "vertex-index", + "s3-1": "node-index", + "a1-4": "node", + "a0-15": "node-center", + "v1-20": "node-radius", + "sv-192": "corner-0", + "s2-0": "corner-1", + "s1-0": "corner-2", + "s0-0": "corner-3", + "sv-208": "box-color", + "s3-2": "poly-index", + "s2-1": "poly", + "s1-1": "text-function", + "s0-1": "text-enabled", + "sv-224": "text-bucket", + "s3-3": "static-sphere-index", + "s2-2": "static-sphere", + "s1-2": "sphere-text-function", + "s0-2": "sphere-text-enabled", + "sv-272": "sphere-text-bucket", + "v1-80": "origin", + "a2-22": "portal-start", + "a3-13": "portal-end", + "s3-4": "sphere-index", + "v1-95": "obstacle-sphere" + } + }, + "(method 8 nav-mesh)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "object-bytes", + "v1-16": "vertex-bytes", + "v1-26": "poly-bytes", + "v1-38": "route-bytes" + } + }, + "(method 14 nav-control)": { + "args": ["this", "poly"] + }, + "(method 31 nav-control)": { + "args": ["this", "point", "direction", "segment-start", "segment-end"] + }, + "add-nav-sphere": { + "args": ["control", "world-sphere"], + "vars": { + "s4-0": "destination", + "f1-0": "distance-squared", + "f0-1": "combined-radius" + } + }, + "add-collide-shape-spheres": { + "args": ["control", "shape", "body-sphere"], + "vars": { + "s4-0": "body-control", + "s3-0": "body-sphere-input", + "s2-0": "body-destination", + "f1-0": "body-distance-squared", + "f0-2": "body-combined-radius", + "s5-1": "extra-sphere", + "s4-1": "extra-destination", + "f1-1": "extra-distance-squared", + "f0-4": "extra-combined-radius" + } + }, + "(method 16 nav-mesh)": { + "args": ["this", "start-position", "poly", "travel", "slide?", "max-length", "info"], + "vars": { + "s0-0": "ray", + "sv-96": "done", + "sv-112": "clip-count", + "sv-128": "iteration", + "v1-10": "walk-done", + "v1-22": "edge-start", + "a0-15": "edge-end", + "f2-2": "edge-normal-x", + "f3-1": "edge-normal-z", + "f1-5": "travel-x", + "f0-4": "travel-z", + "f2-1": "raw-normal-x", + "f3-0": "raw-normal-z", + "f4-4": "edge-length", + "f4-6": "inverse-edge-length", + "f4-9": "into-wall", + "f1-6": "slide-x", + "f0-5": "slide-z" + } + }, + "(method 14 nav-mesh)": { + "args": ["this", "ray"], + "vars": { + "v1-0": "exit-edge", + "f0-1": "move-x", + "f1-2": "move-z", + "a2-0": "edge-index", + "a3-1": "edge-start", + "t0-7": "edge-end", + "f4-0": "edge-normal-x", + "f3-2": "edge-normal-z", + "f2-4": "outward-projection", + "f3-4": "edge-distance", + "f2-6": "fraction", + "f2-9": "advance-length", + "a2-6": "next-edge-index", + "a3-2": "last-edge-index", + "a3-3": "past-last-edge", + "a2-7": "adjacent-edge-index", + "a2-9": "neighbor-index" + } + }, + "init-ray": { + "args": ["ray"] + }, + "init-ray-local": { + "args": ["ray", "poly", "start-position", "destination"] + }, + "init-ray-dir-local": { + "args": ["ray", "poly", "start-position", "direction", "distance"] + }, + "(method 15 nav-mesh)": { + "args": ["this", "poly", "start-position", "direction", "distance"], + "vars": { + "gp-0": "ray", + "s4-0": "iteration", + "v1-2": "done" + } + }, + "nav-ray-test": { + "args": ["mesh", "poly", "start-position", "destination"], + "vars": { + "s4-1": "start-local", + "s3-1": "direction", + "f30-0": "distance" + } + }, + "nav-ray-test-local?": { + "args": ["mesh", "poly", "start-position", "destination"], + "vars": { + "gp-0": "ray", + "s4-0": "iteration", + "v1-2": "done" + } + }, + "nav-mesh-update-route-table": { + "args": ["mesh", "from-poly", "to-poly", "edge-value"], + "vars": { + "a1-1": "bit-position", + "v1-3": "byte-index", + "a2-2": "bit-shift", + "a1-4": "keep-mask", + "v0-0": "new-byte" + } + }, + "nav-mesh-lookup-route": { + "args": ["mesh", "to-poly", "from-poly"], + "vars": { + "v1-3": "bit-position" + } + }, + "(method 17 nav-mesh)": { + "args": ["this"], + "vars": { + "s5-0": "centroid", + "s4-0": "visited", + "s3-0": "poly-index", + "s2-0": "poly", + "s1-0": "edge-index", + "a3-0": "neighbor-index" + } + }, + "point-triangle-distance-min": { + "args": ["point", "max-distance", "vertices"], + "vars": { + "v1-0": "outside-edge-mask", + "f0-0": "best-distance", + "a3-0": "edge-index", + "t0-4": "edge-start", + "t1-4": "edge-end", + "f1-1": "edge-normal-x", + "f2-2": "edge-normal-z", + "f3-2": "point-offset-x", + "f4-2": "point-offset-z", + "f5-5": "edge-length", + "f5-7": "inverse-edge-length", + "f1-2": "unit-normal-x", + "f2-3": "unit-normal-z", + "f1-4": "signed-distance", + "t0-14": "corner-region", + "a3-5": "feature-index", + "t0-15": "segment-start", + "v1-17": "segment-end", + "f2-8": "segment-x", + "f1-7": "segment-z", + "f3-7": "start-projection", + "f1-9": "end-projection", + "v1-27": "corner", + "f0-14": "corner-distance" + } + }, + "(method 28 nav-mesh)": { + "args": ["this", "point", "y-threshold", "flags"], + "vars": { + "v1-1": "fast-poly", + "s3-1": "best-poly", + "s2-0": "triangle-vertices", + "f30-0": "best-distance", + "s1-0": "poly-index", + "s0-0": "poly", + "f1-2": "y-distance", + "f0-2": "distance" + } + }, + "(method 12 nav-mesh)": { + "args": ["this", "current-poly", "target-poly", "portal"], + "vars": { + "v1-3": "bit-position", + "v1-8": "route-edge", + "a2-9": "neighbor-index", + "a2-12": "vertices", + "t0-5": "next-edge-index", + "t1-0": "last-edge-index", + "t1-1": "past-last-edge", + "t0-6": "next-vertex-slot" + } + }, + "(method 11 nav-mesh)": { + "args": ["this", "current-poly", "target-poly", "vertex-pair"], + "vars": { + "v1-3": "bit-position", + "a2-6": "route-edge", + "v1-12": "neighbor-index", + "t0-5": "next-edge-index", + "t1-0": "last-edge-index", + "t1-1": "past-last-edge", + "t0-6": "next-vertex-slot" + } + }, + "(method 19 nav-mesh)": { + "args": ["this", "minimum", "maximum"], + "vars": { + "f0-0": "huge", + "f1-0": "negative-huge", + "v1-1": "vertex-index", + "a3-1": "vertex" + } + }, + "(method 13 nav-mesh)": { + "args": ["this"], + "vars": { + "sv-32": "normal", + "s5-0": "poly-count", + "s3-0": "vertex-count", + "s1-0": "zero-area-count", + "s2-0": "inverted-count", + "s4-0": "gap-count", + "gp-0": "warned", + "sv-48": "poly-index", + "v1-4": "poly", + "a1-2": "vertex-0", + "a2-2": "vertex-1", + "a3-0": "vertex-2" + } + }, + "(method 22 nav-mesh)": { + "args": ["this", "poly-a", "poly-b"], + "vars": { + "v1-1": "a-index", + "a0-1": "b-index", + "a3-6": "next-vertex", + "t0-3": "other-b-index" + } + }, + "ray-ccw-line-segment-intersection?": { + "args": ["point", "direction", "segment-start", "segment-end"], + "vars": { + "f0-2": "start-cross", + "f2-4": "end-cross", + "f3-4": "point-cross", + "v0-0": "intersects", + "f1-7": "denominator", + "f2-5": "end-to-point", + "f3-5": "point-to-start", + "f0-7": "orientation" + } + }, + "ray-line-segment-intersection?": { + "args": ["point", "direction", "segment-start", "segment-end"], + "vars": { + "f1-3": "start-cross", + "f0-4": "end-cross", + "f2-6": "point-cross", + "gp-0": "intersects", + "f30-0": "denominator", + "f0-5": "end-to-point", + "f1-4": "point-to-start", + "f2-11": "start-dot", + "f3-11": "end-dot", + "f28-0": "point-dot" + } + }, + "clip-vector-to-halfspace!": { + "args": ["travel", "normal-x", "normal-z", "limit"], + "vars": { + "f0-2": "projection", + "f0-3": "fraction" + } + }, + "(method 30 nav-control)": { + "args": ["this", "ray-origin", "ray-direction", "hit-position"], + "vars": { + "s5-0": "best-sphere", + "f30-0": "best-hit-distance", + "s1-0": "sphere-index", + "s0-0": "obstacle-sphere", + "f0-1": "hit-distance" + } + }, + "(method 28 nav-control)": { + "args": ["this", "collision-mask"], + "vars": { + "s4-0": "user-list", + "s3-0": "candidate-sphere", + "s1-0": "target-control", + "v1-71": "user-connection", + "s2-2": "next-connection", + "s0-3": "other-shape", + "s2-0": "player-nav", + "s0-0": "player-body-sphere", + "sv-32": "player-destination-control", + "sv-48": "player-body-destination", + "f1-0": "player-body-distance-squared", + "f0-2": "player-body-combined-radius", + "s1-1": "player-extra-sphere", + "s0-1": "player-extra-destination", + "f1-1": "player-extra-distance-squared", + "f0-4": "player-extra-combined-radius", + "s2-1": "static-sphere-index", + "s1-2": "static-destination-control", + "s0-2": "static-sphere", + "sv-64": "static-destination", + "f1-2": "static-distance-squared", + "f0-6": "static-combined-radius", + "s1-3": "other-nav", + "s0-4": "other-extra-sphere", + "sv-128": "other-extra-destination", + "f1-4": "other-extra-distance-squared", + "f0-11": "other-extra-combined-radius" + } + }, + "(method 35 nav-control)": { + "args": ["this", "result-travel", "world-position", "desired-travel", "fallback-direction", "unused"], + "vars": { + "v1-0": "local-position" + } + }, + "(method 32 nav-control)": { + "args": ["this", "result-travel", "start-position", "desired-travel", "fallback-direction", "unused"], + "vars": { + "gp-0": "work", + "s0-0": "sphere-index", + "sv-208": "obstacle-sphere", + "v1-31": "i", + "f0-21": "turn-cost", + "s1-1": "side", + "v1-38": "hit-sphere", + "v1-40": "j", + "s2-1": "inside-sphere", + "f30-2": "blend", + "f30-3": "primary-dot", + "f28-0": "fallback-dot", + "v0-3": "deflected", + "a0-29": "right-dot-sign", + "a3-7": "tangent-right-dot-sign", + "a1-9": "first-obstacle-sphere", + "a0-28": "right-dot-bits", + "a0-30": "candidate-side", + "f0-23": "side-sign", + "a1-22": "tangent-direction", + "a0-39": "input-direction", + "a3-4": "right-direction", + "a2-10": "sign-selector", + "a3-6": "tangent-right-dot-bits", + "f0-24": "candidate-turn-cost" + } + }, + "(method 23 nav-control)": { + "args": ["this", "travel-direction", "info"], + "vars": { + "s2-1": "body-local", + "f30-0": "best-hit-distance", + "s3-0": "best-sphere-index", + "s1-0": "sphere-index", + "s0-0": "obstacle-sphere", + "f0-1": "hit-distance", + "v1-5": "to-center", + "a1-4": "hit-sphere", + "v1-19": "sphere-world" + } + }, + "(method 33 nav-control)": { + "args": ["this", "result-travel", "start-position", "desired-travel", "fallback-direction", "unused"], + "vars": { + "f30-0": "original-length", + "f0-0": "new-length" + } + }, + "circle-tangent-directions": { + "args": ["point", "circle-center", "result-left", "result-right"], + "vars": { + "s2-0": "to-center", + "s3-0": "center-direction", + "s5-0": "perpendicular-direction", + "f0-4": "radius", + "f1-1": "center-distance", + "f2-4": "tangent-length", + "f3-4": "inverse-distance", + "f1-3": "along-fraction", + "f30-0": "perpendicular-fraction", + "s2-1": "along-component" + } + }, + "find-closest-circle-ray-intersection": { + "args": ["start-position", "direction", "length", "sphere-count", "spheres", "ignore-mask"], + "vars": { + "f30-0": "best-hit", + "gp-0": "best-index", + "s1-0": "travel", + "s0-0": "sphere-index", + "v1-7": "obstacle-sphere", + "f0-2": "hit" + } + }, + "sign-bit": { + "args": ["value"], + "vars": { + "v1-0": "value-copy", + "v1-1": "shifted-sign" + } + }, + "compute-dir-parm": { + "args": ["direction", "input-direction", "right-direction"], + "vars": { + "v1-0": "sign-selector", + "a2-2": "right-dot-bits", + "a2-3": "right-dot-sign" + } + }, + "debug-nav-validate-current-poly": { + "args": ["mesh", "current-poly", "point"], + "vars": { + "s3-0": "projected-point" + } + }, + "(method 19 nav-control)": { + "args": ["this", "result-position", "body", "goal", "turn-speed"], + "vars": { + "f30-0": "max-turn", + "s0-0": "body-coordinates", + "s1-0": "goal-position", + "f28-0": "angle-difference", + "s2-1": "new-direction" + } + }, + "(method 16 nav-control)": { + "args": ["this", "world-point"] + }, + "(method 21 nav-control)": { + "args": ["this", "world-point"] + }, + "(method 22 nav-control)": { + "args": ["this", "world-point", "y-tolerance"] + }, + "(method 27 nav-control)": { + "args": ["this"], + "vars": { + "s4-0": "mesh", + "s5-0": "ray", + "s3-0": "iteration-count", + "v1-7": "done" + } + }, + "(method 24 nav-control)": { + "args": ["this", "max-distance", "info"], + "vars": { + "v1-0": "body-local" + } + }, + "(method 13 nav-control)": { + "args": ["this", "destination", "previous-travel"], + "vars": { + "sv-80": "body-local", + "sv-84": "current-position", + "sv-88": "clip-poly", + "sv-92": "target-point", + "sv-96": "portal", + "sv-100": "in-corridor", + "s4-0": "target-local", + "s5-1": "clip-info", + "v1-82": "delta", + "a0-18": "portal-vertex-index" + } + }, + "(method 12 nav-control)": { + "args": ["this", "gap-info"], + "vars": { + "s4-0": "poly", + "s3-1": "body-local", + "s2-0": "landing-point" + } + }, + "(method 11 nav-control)": { + "args": ["this", "destination"], + "vars": { + "s5-1": "gap-info" + } + }, + "test-xz-point-on-line-segment?": { + "args": ["point", "segment-start", "segment-end", "tolerance"], + "vars": { + "v0-2": "within-tolerance", + "f0-3": "segment-x", + "f1-2": "segment-z", + "f2-5": "segment-length", + "f3-3": "nonzero-segment-length", + "f3-5": "inverse-segment-length", + "f4-2": "normal-x", + "f5-0": "normal-z", + "f3-7": "point-offset-x", + "f6-2": "point-offset-z", + "f0-5": "projection" + } + }, + "choose-travel-portal-vertex": { + "args": ["mesh", "portal", "target-poly", "target-point"], + "vars": { + "f0-1": "edge-x", + "f1-2": "edge-z", + "s2-0": "walk-portal", + "s1-0": "chosen-vertex", + "s0-0": "done", + "f2-6": "edge-length", + "f2-8": "inverse-edge-length", + "f30-0": "bisector-normal-x", + "f28-0": "bisector-normal-z", + "f26-0": "bisector-offset", + "v1-18": "far-side-count", + "a0-2": "vertex-index", + "v1-22": "nearer-vertex" + } + }, + "start-collect-nav": { + "vars": { + "v1-1": "stats", + "a0-0": "control" + } + }, + "end-collect-nav": { + "vars": { + "v1-1": "stats", + "a0-1": "counter-0", + "a0-3": "counter-1" + } + }, + "nav-sphere-from-cam": { + "vars": { + "v1-0": "camera-position" } }, "(code falling beach-rock)": { @@ -3372,41 +10082,148 @@ "s5-1": ["s5-1", "handle"] } }, + "adjust-pos": { + "args": ["value", "threshold"] + }, "draw-percent-bar": { + "args": ["x", "y", "fraction", "color"], "vars": { - "v1-3": ["v1-3", "dma-packet"] + "s2-0": "packet-buffer", + "gp-0": "bucket-start", + "a3-3": "bucket-tail", + "v1-3": ["packet", "dma-packet"] } }, - "(dummy-17 progress)": { + "print-language-name": { + "args": ["language-index", "font", "x-offset", "move-right?"], "vars": { - "v1-20": ["v1-20", "dma-packet"], - "v1-81": ["v1-81", "dma-packet"] + "s5-0": "signed-offset", + "f30-0": "opacity" + } + }, + "(method 17 progress)": { + "vars": { + "f30-0": "hud-x", + "s5-0": "transition-offset", + "f28-0": "opacity", + "s3-0": "packet-buffer", + "s4-0": "bucket-start", + "s2-0": "draw-money", + "s2-1": "draw-power-cells", + "s2-2": "draw-scout-flies", + "a3-4": "bucket-tail", + "v1-20": ["packet", "dma-packet"], + "s4-2": "font", + "a0-31": "percent-font", + "s3-3": "print-percent", + "f28-1": "button-radius", + "s3-4": "button-center-x", + "s4-3": "button-center-y", + "s2-5": "button-transition", + "f26-3": "button-scale", + "f24-0": "button-x-angle", + "f24-2": "button-square-angle", + "f24-4": "button-triangle-angle", + "f26-5": "button-circle-angle", + "a0-46": "autosave-text", + "s3-5": "debug-packet-buffer", + "s4-4": "debug-bucket-start", + "a3-9": "debug-bucket-tail", + "v1-81": ["debug-packet", "dma-packet"], + "a0-52": "small-orb-root", + "f28-2": "in-out-fraction", + "f30-1": "icon-slide" } }, "make-current-level-available-to-progress": { "vars": { - "a0-0": "cur-lev", - "v1-7": "lev-idx" + "a0-0": "current-level", + "v1-7": "level-index" } }, "make-levels-with-tasks-available-to-progress": { "vars": { - "gp-0": "i", - "s4-0": "ii", - "s5-0": "tasks" + "gp-0": "level-index", + "s4-0": "task-index", + "s5-0": "level-tasks" + } + }, + "set-credits-font-color": { + "args": ["brightness"], + "vars": { + "v1-0": "i", + "f0-2": "red-value", + "f0-5": "green-value", + "f0-8": "blue-value" + } + }, + "draw-title-credits": { + "args": ["credit-progress"], + "vars": { + "s4-0": "timeline-length", + "f30-0": "timeline-position", + "s5-0": "timeline-index", + "gp-0": "font", + "s5-1": "group-start", + "f0-10": "group-phase", + "f30-1": "opacity", + "s4-1": "i", + "s2-0": "text-index", + "s3-0": "text" + } + }, + "draw-end-credits": { + "args": ["scroll-offset"], + "vars": { + "v1-13": "draw-line-height", + "s4-0": "y", + "gp-0": "text-index", + "s3-0": "skip-line-height", + "s2-0": "first-line?", + "s5-0": "font", + "a0-8": "skip-text", + "a0-11": "draw-text" + } + }, + "get-game-count": { + "args": ["level-index"] + }, + "init-game-options": { + "args": ["this"], + "vars": { + "v1-0": "i", + "v1-3": "boot-mode" } }, "get-next-task-up": { - "args": ["cur-task-idx", "lev-idx"] + "args": ["current-task-index", "level-index"], + "vars": { + "gp-0": "result-task-index", + "s4-0": "candidate-task-index", + "s3-0": "level-tasks" + } }, "get-next-task-down": { - "args": ["cur-task-idx", "lev-idx"] + "args": ["current-task-index", "level-index"], + "vars": { + "gp-0": "result-task-index", + "s4-0": "candidate-task-index", + "s3-0": "level-tasks" + } }, "get-next-level-up": { - "args": ["lev-idx"] + "args": ["level-index"], + "vars": { + "gp-0": "result-level-index", + "s4-0": "candidate-level-index" + } }, "get-next-level-down": { - "args": ["lev-idx"] + "args": ["level-index"], + "vars": { + "v0-0": "result-level-index", + "v1-0": "candidate-level-index" + } }, "calculate-completion": { "args": ["the-progress"], @@ -3416,44 +10233,377 @@ "sv-56": "total-orbs", "sv-16": "current-cells", "sv-24": "current-buzzers", - "sv-32": "current-orbs" + "sv-32": "current-orbs", + "s5-0": "level-index", + "s4-0": "level-tasks", + "s3-0": "task-index", + "v1-20": "buzzer-task-index" + } + }, + "(method 24 progress)": { + "args": ["this", "level-index"], + "vars": { + "s5-0": "level-record", + "sv-112": "task-start-x", + "sv-128": "task-spacing", + "s0-0": "particle-index", + "s2-0": "horizontal-offset", + "s4-1": "vertical-offset", + "f30-0": "opacity", + "s1-0": "selected-text-index", + "s3-0": "selected-task-complete?", + "sv-144": "icon-index", + "a0-18": "icon-root", + "sv-192": "task-x", + "sv-208": "task-index", + "v0-4": "status", + "v1-59": "text-index", + "a0-25": "complete?", + "v1-77": "unused-slot-index", + "s0-1": "task-font", + "a0-49": "completion-font" + } + }, + "(method 25 progress)": { + "args": ["this", "level-index"], + "vars": { + "v1-1": "icon-offset", + "s4-0": "vertical-offset", + "f30-0": "opacity", + "s3-0": "text-offset", + "a0-15": "orb-root", + "s4-1": "font", + "s3-1": "print-level-count", + "s5-2": "print-total-count" + } + }, + "(method 26 progress)": { + "args": ["this", "level-index"], + "vars": { + "v1-2": "level-record", + "a0-3": "icon-offset", + "s4-0": "vertical-offset", + "f30-0": "opacity", + "s3-0": "text-offset", + "s2-0": "level-count", + "a1-8": "task-index", + "s4-1": "font", + "s3-1": "print-level-count", + "s5-2": "print-total-count" + } + }, + "(method 27 progress)": { + "args": ["this"], + "vars": { + "a1-1": "font" + } + }, + "(method 28 progress)": { + "args": ["this", "base-y", "row-spacing", "base-scale"], + "vars": { + "sv-464": "language-count", + "s3-0": "options", + "s2-1": "row-y", + "s1-0": "option-number", + "sv-112": "font", + "s0-0": "i", + "sv-912": "option-text", + "sv-128": "x-offset", + "sv-144": "y-offset", + "v1-18": "option-type", + "a0-19": "label-font", + "v1-82": "bar-color-base", + "f0-12": "slider-fraction", + "a0-34": "bar-color-alpha", + "a3-5": "bar-color", + "sv-512": "old-language", + "sv-448": "new-language", + "a0-62": "language-font", + "sv-480": "next-language", + "a0-66": "previous-language", + "v1-153": "next-next-language", + "sv-496": "previous-previous-language", + "a2-22": "previous-x", + "a2-23": "incoming-next-x", + "a2-24": "outgoing-previous-x", + "a2-25": "incoming-previous-x", + "a2-26": "outgoing-next-x", + "a2-27": "next-x", + "a0-75": "selected-language-font", + "sv-784": "format-option", + "sv-800": "format-output", + "sv-816": "format-template", + "sv-832": "option-name", + "f0-23": "transition-opacity", + "v1-235": "option-font" } }, "(method 48 progress)": { "args": ["this", "screen", "option"] }, + "(method 45 progress)": { + "vars": { + "v1-0": "stack-depth" + } + }, + "(method 46 progress)": { + "vars": { + "v1-0": "stack-depth", + "a2-0": "previous-depth" + } + }, + "(method 51 progress)": { + "args": ["this", "transition-offset"] + }, + "progress-init-by-other": { + "vars": { + "v1-6": "i", + "gp-0": "icon-rotation" + } + }, "activate-progress": { - "args": ["creator", "screen"] + "args": ["creator", "screen"], + "vars": { + "s5-1": "progress-ptr", + "s4-1": "current-level" + } + }, + "deactivate-progress": { + "vars": { + "gp-0": "i" + } + }, + "hide-progress-icons": { + "vars": { + "v1-0": "particle-index", + "a0-0": "i" + } + }, + "(method 7 progress)": { + "vars": { + "v1-0": "i" + } + }, + "(method 21 progress)": { + "vars": { + "f0-1": "in-out-fraction", + "s5-0": "i" + } + }, + "(method 22 progress)": { + "vars": { + "v1-0": "i" + } }, "(method 23 progress)": { "args": ["this", "aspect", "video-mode"] }, - "(method 35 progress)": { + "(method 32 progress)": { "vars": { - "s4-0": ["s4-0", "text-id"] + "v1-2": "current-screen", + "a1-1": "starting-screen" } }, - "(method 43 progress)": { + "(code progress-waiting)": { "vars": { - "s4-0": ["s4-0", "text-id"] + "gp-0": "i" + } + }, + "(method 53 progress)": { + "args": ["this", "requested-screen"], + "vars": { + "s4-0": "card-info", + "gp-0": "selected-screen" + } + }, + "(method 31 progress)": { + "vars": { + "s5-0": "card-info" + } + }, + "(method 29 progress)": { + "vars": { + "s5-0": "options", + "v1-34": "moved-up?", + "v1-69": "moved-down?", + "s4-5": "changed-left?", + "v1-157": "adjusted-left?", + "f30-0": "left-slider-volume", + "v1-217": "changed-right?", + "v1-243": "maximum-language", + "v1-263": "adjusted-right?", + "f30-1": "right-slider-volume" + } + }, + "(method 30 progress)": { + "vars": { + "s5-0": "previous-level-index", + "s5-2": "previous-level-index", + "s5-8": "previous-task-index", + "s5-10": "previous-task-index" + } + }, + "(event progress-normal)": { + "vars": { + "v0-0": ["next-screen-value", "object"], + "gp-1": "saved-auto-save" + } + }, + "(code progress-normal)": { + "vars": { + "gp-0": "task-id", + "gp-1": "has-next-level?", + "v1-62": "has-previous-level?", + "s5-0": "level-index", + "v1-74": "current-screen" + } + }, + "(post progress-normal)": { + "vars": { + "a1-0": "level-index", + "gp-0": "level-tasks", + "s5-0": "draw-level-title?", + "v1-98": "title-slide-offset", + "f30-0": "title-opacity", + "s5-1": "title-font" + } + }, + "(method 35 progress)": { + "args": ["this", "font"], + "vars": { + "s4-0": ["title-id", "text-id"], + "s3-0": "print-title", + "s4-1": "print-space-required" + } + }, + "(method 36 progress)": { + "args": ["this", "font"] + }, + "(method 37 progress)": { + "args": ["this", "font"], + "vars": { + "s4-0": "print-no-data" } }, "(method 38 progress)": { + "args": ["this", "font"], "vars": { - "a1-1": ["a1-1", "text-id"] + "a1-1": ["status-text-id", "text-id"], + "s4-1": "print-warning" } }, + "(method 39 progress)": { + "args": ["this", "font"], + "vars": { + "s4-0": "print-prompt" + } + }, + "(method 40 progress)": { + "args": ["this", "font"], + "vars": { + "s4-0": "slide-offset", + "f0-13": "opacity", + "s4-1": "alpha", + "s3-3": "card-info", + "s2-0": "particle-index", + "s1-0": "slot-index", + "a0-17": "default-color-font", + "a0-28": "card-color-font", + "s0-2": "print-cell-count", + "s0-3": "print-orb-count", + "s0-4": "print-scout-fly-count", + "s0-5": "print-completion", + "s0-6": "print-cell-total", + "sv-80": "format-cell-total", + "s0-7": "print-orb-total", + "s0-8": "print-scout-fly-total", + "s0-10": "print-day-first-date", + "s0-11": "print-month-first-date" + } + }, + "(method 41 progress)": { + "args": ["this", "font"], + "vars": { + "s4-1": "print-card-check" + } + }, + "(method 42 progress)": { + "args": ["this", "font"], + "vars": { + "s4-0": "print-removed" + } + }, + "(method 43 progress)": { + "args": ["this", "font"], + "vars": { + "s4-0": ["title-id", "text-id"], + "s3-0": "print-title", + "s4-1": "print-card-check" + } + }, + "(method 49 progress)": { + "args": ["this", "font"], + "vars": { + "s4-0": "print-title" + } + }, + "(method 50 progress)": { + "args": ["this", "font"] + }, + "(method 54 progress)": { + "args": ["this", "font"] + }, + "(method 55 progress)": { + "args": ["this", "font"] + }, + "(method 56 progress)": { + "args": ["this", "font"] + }, + "(method 57 progress)": { + "args": ["this", "font"] + }, + "(method 58 progress)": { + "args": ["this", "font"] + }, "(post progress-debug)": { "vars": { - "v1-7": ["v1-7", "dma-packet"], - "v1-16": ["v1-16", "dma-packet"], - "v1-25": ["v1-25", "dma-packet"], - "v1-34": ["v1-34", "dma-packet"] + "s5-0": "header-buffer", + "gp-0": "header-bucket-start", + "s4-0": "draw-header", + "s3-0": "format-header", + "a0-4": "header-text", + "a1-0": "header-template", + "v1-4": "language", + "a3-4": "header-bucket-tail", + "v1-7": ["header-packet", "dma-packet"], + "s5-1": "string-help-buffer", + "gp-1": "string-help-bucket-start", + "s4-1": "draw-string-help", + "a3-6": "string-help-bucket-tail", + "v1-16": ["string-help-packet", "dma-packet"], + "s5-2": "group-help-buffer", + "gp-2": "group-help-bucket-start", + "s4-2": "draw-group-help", + "a3-8": "group-help-bucket-tail", + "v1-25": ["group-help-packet", "dma-packet"], + "s5-3": "language-help-buffer", + "gp-3": "language-help-bucket-start", + "s4-3": "draw-language-help", + "a3-10": "language-help-bucket-tail", + "v1-34": ["language-help-packet", "dma-packet"], + "gp-4": "font" } }, "voicebox-track": { "vars": { - "a0-1": "target" + "gp-0": "camera-position", + "s5-0": "target-position", + "a2-0": "target-forward", + "gp-1": "facing", + "gp-2": "target-control", + "s4-2": "voicebox-position", + "f0-8": "side-angle", + "a1-9": "blocked-side-query" } }, "citb-drop-plat-drop-children": { @@ -3463,23 +10613,573 @@ }, "master-track-target": { "vars": { - "v0-1": ["v0-1", "symbol"], - "v1-14": ["v1-14", "handle"] + "gp-0": "tracked-target", + "v1-24": "target-rotation", + "a3-0": "bone-matrix", + "a0-17": "row-0", + "a1-4": "row-1", + "a2-0": "row-2", + "a3-1": "row-3", + "a2-1": "target-facing", + "a3-2": "rotation-source", + "v1-26": "row-0", + "a0-18": "row-1", + "a1-5": "row-2", + "a3-3": "row-3", + "a2-3": "target-facing", + "a3-4": "rotation-source", + "v1-31": "row-0", + "a0-21": "row-1", + "a1-9": "row-2", + "a3-5": "row-3", + "v1-32": "ground-adjust", + "f0-2": "vertical-delta", + "f0-3": "ground-pitch-adjust", + "gp-1": "trail-point", + "s4-2": "probe-result", + "gp-5": "probe-offset", + "s5-2": "probe-start", + "f0-20": "hit-fraction", + "gp-6": "tracking-delta", + "f30-0": "air-vertical-delta", + "f0-30": "target-height-step", + "f0-32": "adjusted-vertical-delta", + "f0-33": "air-pitch-adjust", + "f0-35": "shadow-vertical-delta", + "f0-36": "fall-speed-limit", + "f0-38": "ground-vertical-delta", + "f0-42": "ground-adjust-delta", + "f0-43": "ground-pitch-adjust", + "v1-196": "water-flags", + "f0-45": "minimum-underwater-y", + "gp-7": "trail-point", + "v1-207": "shadow-delta", + "f0-50": "shadow-clearance", + "f0-51": "clearance-adjust", + "v0-1": ["options-without-drawable", "symbol"], + "v1-14": ["drawable-handle", "handle"] } }, - "cam-los-spline-collide": { + "reset-target-tracking": { "vars": { - "s3-0": ["s3-0", "(inline-array collide-cache-tri)"] + "gp-1": "trail-point" + } + }, + "reset-drawable-follow": { + "vars": { + "v1-2": "tracked-target" + } + }, + "reset-drawable-tracking": { + "vars": { + "gp-0": "tracked-target", + "v1-6": "target-rotation", + "a3-0": "bone-matrix", + "a0-4": "row-0", + "a1-4": "row-1", + "a2-0": "row-2", + "a3-1": "row-3", + "v1-8": "target-facing", + "a3-2": "rotation-source", + "a0-5": "row-0", + "a1-5": "row-1", + "a2-1": "row-2", + "a3-3": "row-3", + "v1-11": "target-facing", + "a3-4": "rotation-source", + "a0-10": "row-0", + "a1-7": "row-1", + "a2-2": "row-2", + "a3-5": "row-3", + "gp-1": "trail-point" + } + }, + "in-cam-entity-volume?": { + "args": ["point", "source-entity", "margin", "property-name"], + "vars": { + "sv-16": "sample-tag", + "s2-0": "sample-time", + "v1-1": "plane-data", + "a0-2": "i" + } + }, + "master-base-region": { + "args": ["region"], + "vars": { + "s5-0": "point-of-interest" + } + }, + "setup-slave-for-hopefull": { + "args": ["candidate"] + }, + "master-is-hopeful-better?": { + "args": ["current-best", "new-candidate"] + }, + "master-switch-to-entity": { + "args": ["region"], + "vars": { + "v0-21": "alternate-result", + "gp-0": "best-slave", + "sv-16": "alternates-tag", + "sv-112": "alternate-process", + "s4-0": "region-state", + "s3-0": "primary-process", + "t9-3": "activate-fn", + "s4-2": "alternate-names", + "s3-2": "i", + "s2-0": "alternate-region", + "s0-0": "alternate-state", + "s1-0": "alternate-slave", + "v1-48": "blend-frames" + } + }, + "master-check-regions": { + "vars": { + "v1-17": "connection", + "gp-5": "next-connection", + "s5-1": "region" + } + }, + "cam-master-init": { + "vars": { + "v1-5": "i", + "gp-0": "string-limits", + "a1-3": "trail-point" + } + }, + "cam-circular-position-into-max-angle": { + "args": ["current-direction", "ideal-direction", "approach-scale"], + "vars": { + "f30-0": "current-length", + "f26-0": "ideal-length", + "f0-1": "direction-dot", + "f28-0": "angle", + "s3-0": "rotation", + "f24-0": "horizontal-input", + "f1-2": "vertical-input", + "s2-0": "input-rotation", + "v1-20": "side-cross", + "f0-9": "side", + "f1-3": "requested-orbit", + "f1-5": "orbit-step", + "f0-15": "updated-dot", + "s2-1": "rotation-axis" + } + }, + "cam-circular-position": { + "args": ["approach-slowly?"], + "vars": { + "gp-0": "orbit-direction", + "s5-0": "current-direction", + "f0-1": "radius-error" + } + }, + "cam-circular-code": { + "vars": { + "a2-1": "target-from-pivot" + } + }, + "cam-string-find-position-rel!": { + "args": ["out-offset"], + "vars": { + "s5-0": "default-offset", + "s4-0": "target-offset", + "s3-0": "probe-result", + "f30-0": "search-angle", + "s2-0": "rotation" + } + }, + "cam-string-set-position-rel!": { + "args": ["relative-offset"], + "vars": { + "v0-3": "options-without-jump" } }, "cam-draw-collide-cache": { + "args": ["cache"], "vars": { - "gp-0": ["gp-0", "(inline-array collide-cache-tri)"] + "gp-0": ["triangles", "(inline-array collide-cache-tri)"], + "s5-0": "i", + "t1-0": "color" + } + }, + "dist-info-init": { + "args": ["info"] + }, + "dist-info-valid?": { + "args": ["info"] + }, + "dist-info-append": { + "args": ["info", "point"] + }, + "dist-info-print": { + "args": ["info", "label"] + }, + "los-cw-ccw": { + "args": [ + "triangle", + "sightline-direction", + "flat-sightline-direction", + "flat-sightline-length", + "obstruction-result", + "hit-position", + "tight-hit-fraction" + ], + "vars": { + "sv-128": "saved-flat-length", + "sv-144": "saved-hit-position", + "sv-160": "point-delta", + "sv-176": "side-cross", + "sv-192": "lateral-delta", + "sv-208": "i", + "gp-0": "result", + "s4-0": "saved-tight-hit", + "s5-0": "projected-points", + "f30-0": "previous-side", + "s0-0": "straddles?", + "f28-0": "side", + "s4-1": "i", + "s4-2": "i", + "s4-3": "i" + } + }, + "cam-los-spline-collide": { + "args": ["trail-point", "camera-position", "surface-filter"], + "vars": { + "s5-0": "displacement", + "s4-0": "cache", + "f30-0": "earliest-hit", + "f0-2": "segment-length", + "f28-0": "maximum-hit-fraction", + "f0-3": "margin-fraction", + "f0-4": "cutoff-fraction", + "s3-0": ["triangles", "(inline-array collide-cache-tri)"], + "s2-0": "intersection", + "s1-0": "normal", + "s4-1": "i", + "f0-7": "hit-fraction" + } + }, + "cam-los-setup-lateral": { + "args": ["obstruction-result", "lateral-move", "sightline"], + "vars": { + "f30-0": "clockwise-edge", + "f28-0": "counterclockwise-edge", + "v0-45": "lateral-valid" } }, "cam-los-collide": { + "args": ["camera-position", "sightline", "obstruction-result", "surface-filter"], "vars": { - "s1-1": ["s1-1", "(inline-array collide-cache-tri)"] + "s1-3": "last-clear-index", + "s2-2": "trail-index", + "f2-1": "normal-dot", + "sv-224": "hit-normal", + "sv-240": "hit-position", + "s4-0": "flat-sightline", + "s2-0": "sightline-direction", + "s0-0": "cache", + "f26-0": "sightline-length", + "f30-0": "flat-sightline-length", + "s1-1": ["triangles", "(inline-array collide-cache-tri)"], + "f28-0": "near-threshold", + "f26-1": "far-threshold", + "s0-1": "i", + "f0-7": "hit-fraction", + "f1-2": "zero", + "v1-21": "sightline-copy", + "t1-2": "tight-normal", + "t0-2": "tight-position", + "f24-0": "tight-hit-fraction", + "t1-4": "tight-normal", + "t0-4": "tight-position", + "f24-1": "tight-hit-fraction", + "s4-1": "lateral-move", + "a1-22": "jump-displacement", + "f0-11": "view-length", + "f30-1": "trail-hit-fraction", + "a1-38": "jump-displacement", + "f0-14": "view-length", + "s3-1": "trail-segment", + "f28-1": "trail-segment-length", + "f30-2": "recovery-fraction", + "s2-3": "target-to-trail" + } + }, + "cam-string-follow": { + "vars": { + "f30-0": "previous-length", + "gp-0": "lateral-target-motion", + "s5-0": "string-side", + "v1-9": "target-motion", + "f28-0": "current-length", + "f0-3": "pushed-length", + "f26-0": "maximum-length", + "f0-4": "minimum-length", + "a0-17": "target-motion", + "f0-6": "target-speed" + } + }, + "cam-string-line-of-sight": { + "vars": { + "gp-0": "obstruction-result", + "s5-0": "sightline", + "f30-0": "string-length", + "a0-6": "target-motion", + "s4-0": "escape-direction", + "s5-1": "current-direction", + "s3-0": "rotation", + "f0-12": "maximum-angle" + } + }, + "cam-dist-analog-input": { + "args": ["input-value", "scale"], + "vars": { + "f0-0": "rate" + } + }, + "cam-string-joystick": { + "vars": { + "f28-0": "distance-input", + "f0-2": "distance-parameter", + "f30-0": "saved-view-parameter", + "f26-0": "clamped-distance-parameter", + "f0-3": "height-parameter", + "f0-6": "compressed-height-parameter", + "f1-10": "minimum-height", + "f2-3": "maximum-height", + "v1-28": "camera-from-target", + "f0-12": "camera-height", + "f0-16": "nonnegative-distance-parameter", + "f0-17": "maximum-out-step", + "f0-19": "new-distance-parameter", + "f0-29": "orbit-input", + "s4-0": "rotation", + "gp-2": "current-direction", + "s5-2": "target-backward", + "f0-34": "current-distance", + "f0-40": "current-distance", + "f0-47": "facing-angle" + } + }, + "cam-string-find-hidden": { + "vars": { + "s4-0": "probe-result", + "s5-0": "sightline", + "gp-0": "clear-offset" + } + }, + "cam-string-move": { + "vars": { + "s5-1": "motion-direction", + "s4-1": "string-direction", + "gp-1": "motion-cross", + "s3-0": "target-motion", + "f30-2": "remaining-fraction", + "s5-2": "step", + "gp-2": "collision-count", + "s4-2": "probe-result", + "s3-1": "surface-normal", + "f28-1": "hit-fraction", + "f1-7": "backoff-fraction", + "f0-24": "advance-fraction", + "gp-3": "camera-from-target", + "f30-3": "old-string-length", + "f28-3": "blocked-string-length", + "a0-43": "remaining-motion" + } + }, + "cam-string-code": { + "vars": { + "gp-0": "camera-offset", + "a1-1": "jump-displacement", + "f0-2": "jump-string-length" + } + }, + "set-string-parms": { + "vars": { + "v0-0": "maximum-values" + } + }, + "cam-stick-code": { + "vars": { + "gp-0": "camera-offset", + "v1-3": "spring-step", + "gp-1": "acceleration", + "f30-1": "remaining-fraction", + "gp-2": "step", + "s5-0": "surface-normal", + "s4-0": "iterations-left", + "s2-0": "blocked?", + "s3-0": "probe-result", + "f28-0": "hit-fraction", + "gp-3": "camera-from-target", + "f0-14": "blocked-distance-parameter" + } + }, + "cam-calc-bike-follow!": { + "args": ["tracker", "position", "snap?"] + }, + "cam-bike-code": { + "vars": { + "s4-0": "steering-rotation", + "gp-0": "current-direction", + "s5-0": "target-backward", + "gp-1": "camera-offset", + "f30-0": "target-speed", + "v1-20": "spring-step", + "gp-2": "acceleration", + "f30-2": "remaining-fraction", + "gp-3": "step", + "s5-3": "iterations-left", + "s4-3": "probe-result", + "f28-0": "hit-fraction", + "s3-2": "camera-from-target" + } + }, + "(code cam-fixed)": { + "vars": { + "gp-0": "curve-forward" + } + }, + "(enter cam-fixed-read-entity)": { + "vars": { + "gp-0": "point-of-interest" + } + }, + "(code cam-pov)": { + "vars": { + "v1-5": "tracking", + "a3-0": "bone-transform", + "a0-8": "row-0", + "a1-9": "row-1", + "a2-0": "row-2", + "a3-1": "row-3" + } + }, + "(code cam-pov180)": { + "vars": { + "gp-0": "previous-position", + "s5-0": "previous-forward", + "s4-0": "first-valid-frame?", + "v1-11": "initial-transform", + "s0-0": "bone-transform", + "s1-0": "bone-scale", + "s3-0": "forward", + "s2-0": "position" + } + }, + "(enter cam-pov-track)": { + "vars": { + "gp-0": "point-of-interest" + } + }, + "(enter cam-standoff-read-entity)": { + "vars": { + "gp-0": "authored-position", + "s5-0": "authored-align", + "gp-2": "point-of-interest" + } + }, + "(enter cam-eye)": { + "vars": { + "v1-3": "camera-offset" + } + }, + "(code cam-eye)": { + "vars": { + "gp-0": "last-input-time", + "s4-0": "rotation-step", + "s5-0": "rotation", + "f30-0": "horizontal-input", + "f0-0": "vertical-input", + "v1-44": "input-ramp", + "f30-1": "vertical-forward-component", + "v1-76": "camera-offset" + } + }, + "(enter cam-billy)": { + "vars": { + "v1-3": "camera-offset" + } + }, + "(code cam-billy)": { + "vars": { + "s5-0": "yaw-step", + "s4-0": "limit-side", + "s3-0": "limit-forward", + "s2-0": "flat-forward", + "gp-0": "rotation", + "f1-0": "horizontal-input", + "f0-14": "yaw-from-limit", + "f0-18": "clamped-yaw-step" + } + }, + "(enter cam-spline)": { + "vars": { + "gp-0": "authored-position", + "a0-8": "spline-offset-data", + "s5-1": "curve-start", + "gp-1": "curve-end", + "gp-2": "point-of-interest" + } + }, + "(code cam-decel)": { + "vars": { + "s5-0": "current-outro-position", + "gp-0": "next-outro-position" + } + }, + "(code cam-endlessfall)": { + "vars": { + "gp-0": "horizontal-seeker", + "f30-0": "vertical-speed", + "s4-0": "horizontal-position", + "s5-0": "horizontal-velocity" + } + }, + "(enter cam-circular)": { + "vars": { + "gp-0": "authored-offset", + "gp-3": "point-of-interest" + } + }, + "(event cam-string)": { + "vars": { + "gp-0": "clear-offset", + "v0-1": "enabled" + } + }, + "(enter cam-string)": { + "vars": { + "gp-0": "initial-offset", + "f0-7": "minimum-height", + "f1-1": "maximum-height", + "f30-0": "initial-string-length", + "f1-4": "minimum-string-length", + "f0-17": "maximum-string-length", + "f30-1": "distance-parameter", + "f0-22": "minimum-height", + "f1-7": "maximum-height", + "s4-0": "probe-result", + "s5-0": "target-head", + "gp-1": "camera-offset", + "f0-31": "hit-fraction", + "f0-32": "clear-string-length", + "gp-2": "clear-offset", + "f30-2": "distance-parameter", + "f0-36": "minimum-height", + "f1-16": "maximum-height" + } + }, + "(trans cam-stick)": { + "vars": { + "f0-0": "distance-input", + "f0-16": "orbit-input", + "gp-0": "rotation", + "s3-0": "target-backward", + "s5-0": "current-direction", + "s4-0": "desired-direction" } }, "(code plunger-lurker-plunge)": { @@ -3504,47 +11204,1115 @@ } }, "(method 14 level-group)": { + "args": ["this", "mode"], "vars": { - "s0-1": ["s0-1", "(pointer int32)"], - "s1-1": ["s1-1", "process-drawable"], - "v0-10": ["v0-10", "symbol"] + "s4-0": "level-index", + "v1-8": "lev", + "s3-0": "links", + "s2-0": "i", + "s0-0": "ent", + "s1-0": "translation", + "s1-1": ["drawable-proc", "process-drawable"], + "s0-1": ["eco-info", "(pointer int32)"], + "sv-96": "draw-text", + "sv-112": "enabled", + "sv-128": "debug-bucket", + "v0-10": ["art-name", "symbol"], + "sv-192": "draw-text", + "sv-208": "enabled", + "sv-224": "debug-bucket", + "s5-1": "vis-mode", + "s4-1": "level-index", + "s3-1": "lev", + "s2-1": "links", + "s1-2": "i", + "s0-2": "ent", + "v0-15": "vis-volume", + "a1-16": "vis-id", + "sv-240": "draw-box", + "sv-256": "enabled", + "sv-272": "debug-bucket", + "sv-288": "min-point", + "sv-304": "max-point", + "s0-3": "proc", + "s5-2": "selected-proc", + "s3-2": "selected-ent", + "s4-2": "translation", + "s5-3": "selected-ent", + "v0-35": "vis-volume", + "a1-31": "vis-id", + "s5-4": "level-index", + "s4-4": "lev", + "s3-4": "boxes", + "s2-4": "i", + "s5-5": "level-index", + "v1-214": "lev", + "s4-5": "ambients", + "s3-5": "i" } }, "level-hint-displayed?": { "vars": { - "a0-1": ["a0-1", "level-hint"] + "v1-0": "hint-pointer", + "a0-0": ["active-hint", "level-hint"] } }, "level-hint-init-by-other": { + "args": ["hint-text-id", "default-stream-name", "owner-entity"], "vars": { - "a0-6": ["a0-6", "string"] + "s5-1": "play-mode", + "a0-6": ["resolved-stream-name", "string"] } }, "(method 27 entity-ambient)": { "vars": { - "s5-0": ["s5-0", "symbol"] + "gp-0": "position", + "s5-0": ["ambient-type", "symbol"], + "s3-0": "draw-marker?", + "sv-16": "hint-text-id", + "s3-2": "draw-text", + "s2-1": "debug-enabled?", + "s1-1": "debug-bucket", + "a1-7": "location-text-id", + "t9-10": "draw-sphere", + "a0-11": "sphere-debug-enabled?", + "a1-9": "sphere-bucket", + "a2-9": "sphere-position", + "a3-7": "sphere-radius", + "v1-53": "marker-type" } }, "upload-vis-bits": { + "args": ["lev", "previous-lev", "bsp"], "vars": { "v1-2": "qwc", "a0-1": ["lev-vis-bits", "(pointer uint128)"], - "a1-1": ["all-vis", "(pointer uint128)"], - "a2-2": ["spad-vis", "(pointer uint128)"] + "a1-1": ["all-visible-bits", "(pointer uint128)"], + "a2-2": ["spad-vis-bits", "(pointer uint128)"], + "a3-2": "lev-mask", + "t0-0": "all-visible-mask", + "a3-3": "flipped-mask", + "a1-2": "vis-mask" } }, + "init-background": { + "vars": { + "v1-0": "i" + } + }, + "finish-background": { + "vars": { + "gp-0": "i", + "s5-0": "shrub-tree", + "s4-0": "shrub-lev", + "gp-1": "previous-lev", + "v1-48": "camera", + "v1-52": "highres-tree-count", + "s4-1": "previous-palette", + "s5-2": "tfrag-tree-count", + "s3-0": "i", + "s2-0": "tfrag-tree", + "s1-0": "tfrag-lev", + "a2-4": "tfrag-bsp", + "s0-0": "tfrag-palette", + "s2-1": "trans-tfrag-tree", + "s1-1": "trans-tfrag-lev", + "a2-6": "trans-tfrag-bsp", + "s0-1": "trans-tfrag-palette", + "s2-2": "dirt-tfrag-tree", + "s1-2": "dirt-tfrag-lev", + "a2-8": "dirt-tfrag-bsp", + "s0-2": "dirt-tfrag-palette", + "s2-3": "ice-tfrag-tree", + "s1-3": "ice-tfrag-lev", + "a2-10": "ice-tfrag-bsp", + "s0-3": "ice-tfrag-palette", + "s2-4": "lowres-tfrag-tree", + "s1-4": "lowres-tfrag-lev", + "a2-12": "lowres-tfrag-bsp", + "s0-4": "lowres-tfrag-palette", + "s2-5": "lowres-trans-tfrag-tree", + "s1-5": "lowres-trans-tfrag-lev", + "a2-14": "lowres-trans-tfrag-bsp", + "s0-5": "lowres-trans-tfrag-palette", + "s5-3": "i", + "s4-2": "tie-lev", + "a2-18": "tie-bsp", + "gp-2": "i", + "s5-4": "generic-sink", + "s3-1": "dma-buf", + "s4-3": "dma-start", + "a3-0": "dma-end-tag", + "v1-219": ["end-packet", "dma-packet"] + } + }, + "(method 11 draw-node)": { + "args": ["this", "count", "result"], + "vars": { + "s3-0": "i" + } + }, + "(method 8 billboard)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "byte-size" + } + }, + "mem-usage-shrub-walk": { + "args": ["nodes", "node-count", "usage", "flags"], + "vars": { + "v1-5": "node-bytes", + "s2-0": "node", + "s1-0": "i", + "a1-2": "child-count", + "v1-18": "instance-bytes" + } + }, + "(method 8 drawable-tree-instance-shrub)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-7": "tree-header-bytes", + "v1-19": "palette-bytes" + } + }, + "(method 9 generic-shrub-fragment)": { + "vars": { + "s5-0": "texture-count", + "s4-0": "i" + } + }, + "(method 8 generic-shrub-fragment)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "header-bytes", + "v1-17": "stream-bytes" + } + }, + "(method 3 prototype-shrubbery)": { + "vars": { + "s5-0": "i" + } + }, + "(method 8 prototype-shrubbery)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-7": "header-bytes", + "s3-0": "i" + } + }, + "(method 9 prototype-shrubbery)": { + "vars": { + "s5-0": "i" + } + }, + "(method 9 prototype-generic-shrub)": { + "vars": { + "s5-0": "i" + } + }, + "(method 9 shrubbery)": { + "vars": { + "s5-0": "texture-count", + "s4-0": "i" + } + }, + "(method 8 shrubbery)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "header-bytes", + "v1-16": "vertex-bytes", + "v1-26": "color-bytes", + "v1-36": "object-bytes", + "v1-46": "stq-bytes" + } + }, + "shrub-num-tris": { + "args": ["shrub"] + }, + "shrub-make-perspective-matrix": { + "args": ["out"], + "vars": { + "v1-0": "out-matrix", + "t0-0": "camera-temp", + "a1-1": "row-0", + "a2-0": "row-1", + "a3-0": "row-2", + "t0-1": "row-3", + "f0-1": "inverse-pfog0" + } + }, + "shrub-init-view-data": { + "args": ["view-data"] + }, + "shrub-upload-view-data": { + "args": ["dma-buf"], + "vars": { + "s5-0": "qwc-count", + "v1-0": "dma-state", + "a0-1": "packet" + } + }, + "shrub-time": { + "args": ["factor-a", "factor-b", "factor-c", "repeat-count", "inner-factor"] + }, + "shrub-do-init-frame": { + "args": ["dma-buf"], + "vars": { + "v1-0": "dma-state", + "a0-3": "init-packet", + "v1-1": "dma-state", + "a0-5": "vif-state-packet", + "v1-2": "vif-state" + } + }, + "shrub-init-frame": { + "args": ["dma-buf", "test"], + "vars": { + "v1-0": "dma-state", + "a0-2": "direct-packet", + "v1-1": "dma-state", + "a0-4": "giftag", + "v1-2": "test-packet" + } + }, + "shrub-upload-model": { + "args": ["shrub", "dma-buf", "start-bank"], + "vars": { + "v1-0": "dma-state", + "a3-0": "upload-packet", + "v1-2": "dma-state", + "a0-9": "run-packet", + "v1-3": "dma-state", + "a0-11": "run-packet" + } + }, + "upload-generic-shrub": { + "args": ["dma-buf", "fragment", "matrix-vu-address", "stream-vu-address"], + "vars": { + "v1-0": "dma-state", + "t0-0": "matrix-packet", + "v1-1": "matrix-dst", + "t3-0": "camera-temp", + "t0-3": "row-0", + "t1-4": "row-1", + "t2-4": "row-2", + "t3-1": "row-3", + "v1-4": "dma-state", + "t0-4": "control-data", + "v1-5": "dma-state", + "t0-6": "control-packet", + "v1-6": "dma-state", + "a2-8": "stq-packet", + "v1-7": "dma-state", + "a2-10": "color-packet", + "v1-8": "dma-state", + "a2-12": "vertex-packet", + "v1-9": "dma-state", + "a1-7": "run-packet" + } + }, + "tfrag-details": { + "args": ["fragment"], + "vars": { + "s5-0": "common-qwc", + "s4-0": "common-data", + "s5-1": "base-qwc", + "s4-1": "base-data", + "s5-2": "level-0-qwc", + "s4-2": "level-0-data", + "s5-3": "level-1-qwc", + "gp-1": "level-1-data" + } + }, + "clip-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "edge-debug-lines": { + "args": ["edge-lists"], + "vars": { + "s5-0": "i", + "s4-0": "edges", + "s3-0": "edge-index" + } + }, + "draw-drawable-tree-tfrag": { + "args": ["tree"], + "vars": { + "sv-16": "visibility-bits", + "s5-0": "last-array-index", + "s4-0": "depth-index", + "v1-7": "parent-array", + "a0-4": "child-array", + "a1-1": "parent-vis-byte-index", + "a0-6": "child-vis-byte-index", + "a1-3": "parent-visibility", + "a0-8": "child-visibility", + "v1-13": "fragment-array", + "s4-1": "fragments", + "s3-0": "fragment-count", + "s5-1": "dma-start", + "s1-0": "far-dma-buf", + "s2-0": "far-packet-start", + "v1-28": "far-perf", + "a0-17": "far-perf-control", + "v1-31": "far-perf", + "a0-20": "far-counter-0", + "a0-22": "far-counter-1", + "a3-3": "far-packet-end", + "v1-38": "far-next-packet", + "s1-1": "near-dma-buf", + "s2-1": "near-packet-start", + "v1-52": "near-perf", + "a0-35": "near-perf-control", + "v1-55": "near-perf", + "a0-38": "near-counter-0", + "a0-40": "near-counter-1", + "a3-6": "near-packet-end", + "v1-62": "near-next-packet", + "v1-69": "usage" + } + }, + "draw-drawable-tree-trans-tfrag": { + "args": ["tree"], + "vars": { + "sv-16": "visibility-bits", + "s5-0": "last-array-index", + "s4-0": "depth-index", + "v1-7": "parent-array", + "a0-4": "child-array", + "a1-1": "parent-vis-byte-index", + "a0-6": "child-vis-byte-index", + "a1-3": "parent-visibility", + "a0-8": "child-visibility", + "v1-13": "fragment-array", + "s5-1": "fragments", + "s4-1": "fragment-count", + "s2-0": "far-dma-buf", + "s3-0": "far-packet-start", + "v1-24": "far-perf", + "a0-14": "far-perf-control", + "v1-32": "far-perf", + "a0-18": "far-counter-0", + "a0-20": "far-counter-1", + "a3-3": "far-packet-end", + "v1-34": "far-next-packet", + "s2-1": "near-dma-buf", + "s3-1": "near-packet-start", + "v1-48": "near-perf", + "a0-32": "near-perf-control", + "v1-51": "near-perf", + "a0-35": "near-counter-0", + "a0-37": "near-counter-1", + "a3-6": "near-packet-end", + "v1-58": "near-next-packet" + } + }, + "draw-drawable-tree-dirt-tfrag": { + "args": ["tree"], + "vars": { + "sv-16": "visibility-bits", + "s5-0": "last-array-index", + "s4-0": "depth-index", + "v1-7": "parent-array", + "a0-4": "child-array", + "a1-1": "parent-vis-byte-index", + "a0-6": "child-vis-byte-index", + "a1-3": "parent-visibility", + "a0-8": "child-visibility", + "v1-13": "fragment-array", + "s5-1": "fragments", + "s4-1": "fragment-count", + "s2-0": "far-dma-buf", + "s3-0": "far-packet-start", + "v1-24": "far-perf", + "a0-14": "far-perf-control", + "v1-32": "far-perf", + "a0-18": "far-counter-0", + "a0-20": "far-counter-1", + "a3-3": "far-packet-end", + "v1-34": "far-next-packet", + "s2-1": "near-dma-buf", + "s3-1": "near-packet-start", + "v1-48": "near-perf", + "a0-32": "near-perf-control", + "v1-51": "near-perf", + "a0-35": "near-counter-0", + "a0-37": "near-counter-1", + "a3-6": "near-packet-end", + "v1-58": "near-next-packet" + } + }, + "draw-drawable-tree-ice-tfrag": { + "args": ["tree"], + "vars": { + "sv-16": "visibility-bits", + "s5-0": "last-array-index", + "s4-0": "depth-index", + "v1-7": "parent-array", + "a0-4": "child-array", + "a1-1": "parent-vis-byte-index", + "a0-6": "child-vis-byte-index", + "a1-3": "parent-visibility", + "a0-8": "child-visibility", + "v1-13": "fragment-array", + "s5-1": "fragments", + "s4-1": "fragment-count", + "s2-0": "far-dma-buf", + "s3-0": "far-packet-start", + "v1-24": "far-perf", + "a0-14": "far-perf-control", + "v1-32": "far-perf", + "a0-18": "far-counter-0", + "a0-20": "far-counter-1", + "a3-3": "far-packet-end", + "v1-34": "far-next-packet", + "s2-1": "near-dma-buf", + "s3-1": "near-packet-start", + "v1-48": "near-perf", + "a0-32": "near-perf-control", + "v1-51": "near-perf", + "a0-35": "near-counter-0", + "a0-37": "near-counter-1", + "a3-6": "near-packet-end", + "v1-58": "near-next-packet" + } + }, + "(method 10 drawable-tree-tfrag)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "v1-1": "queue-index", + "a1-2": "level-index", + "a1-5": "lev" + } + }, + "(method 10 drawable-tree-trans-tfrag)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "v1-1": "queue-index", + "a1-2": "level-index", + "a1-5": "lev" + } + }, + "(method 10 drawable-tree-dirt-tfrag)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "v1-1": "queue-index", + "a1-2": "level-index", + "a1-5": "lev" + } + }, + "(method 10 drawable-tree-ice-tfrag)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "v1-1": "queue-index", + "a1-2": "level-index", + "a1-5": "lev" + } + }, + "(method 10 drawable-tree-lowres-tfrag)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "v1-1": "queue-index", + "a1-2": "level-index", + "a1-5": "lev" + } + }, + "(method 10 drawable-tree-lowres-trans-tfrag)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "v1-1": "queue-index", + "a1-2": "level-index", + "a1-5": "lev" + } + }, + "(method 14 drawable-tree-tfrag)": { + "args": ["this"], + "vars": { + "v1-12": "distance-data", + "s5-0": "i" + } + }, + "(method 14 drawable-tree-lowres-tfrag)": { + "args": ["this"], + "vars": { + "v1-12": "distance-data", + "s5-0": "i" + } + }, + "(method 14 drawable-tree-trans-tfrag)": { + "args": ["this"], + "vars": { + "v1-12": "distance-data", + "s5-0": "i" + } + }, + "(method 14 drawable-tree-lowres-trans-tfrag)": { + "args": ["this"], + "vars": { + "v1-12": "distance-data", + "s5-0": "i" + } + }, + "(method 14 drawable-tree-dirt-tfrag)": { + "args": ["this"], + "vars": { + "v1-12": "distance-data", + "s5-0": "i" + } + }, + "(method 14 drawable-tree-ice-tfrag)": { + "args": ["this"], + "vars": { + "v1-12": "distance-data", + "s5-0": "i" + } + }, + "(method 14 drawable-inline-array-tfrag)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "s4-0": "fragment" + } + }, + "(method 14 drawable-inline-array-trans-tfrag)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "s4-0": "fragment" + } + }, + "(method 15 drawable-tree-tfrag)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "s4-0": "i", + "a1-1": "child" + } + }, + "(method 15 drawable-tree-trans-tfrag)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "s4-0": "i", + "a1-1": "child" + } + }, + "(method 15 drawable-inline-array-tfrag)": { + "args": ["this", "submitted-array", "frame"], + "vars": { + "s4-0": "i", + "s3-0": "fragment" + } + }, + "(method 15 tfragment)": { + "args": ["this", "submitted-fragment", "frame"] + }, + "(method 9 tfragment)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 8 tfragment)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "color-bytes", + "s4-0": "category", + "v1-22": "header-bytes", + "v1-33": "base-bytes", + "v1-43": "common-bytes", + "v1-55": "level-0-bytes", + "v1-70": "level-1-bytes", + "v1-79": "packed-color-bytes" + } + }, + "(method 3 drawable-inline-array-tfrag)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 9 drawable-inline-array-tfrag)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 8 drawable-inline-array-tfrag)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-7": "header-bytes", + "s3-0": "i" + } + }, + "(method 8 drawable-tree-tfrag)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "header-bytes", + "v1-18": "palette-bytes", + "s3-0": "i" + } + }, + "tfrag-data-setup": { + "args": ["data", "alpha-blend"], + "vars": { + "v1-0": "camera" + } + }, + "add-tfrag-mtx-0": { + "args": ["dma-buf"], + "vars": { + "a1-0": "qwc-count", + "v1-0": "dma-state", + "a0-1": "packet" + } + }, + "add-tfrag-mtx-1": { + "args": ["dma-buf"], + "vars": { + "a1-0": "qwc-count", + "v1-0": "dma-state", + "a0-1": "packet" + } + }, + "add-tfrag-data": { + "args": ["dma-buf", "alpha-blend"], + "vars": { + "a2-0": "qwc-count", + "v1-0": "dma-state", + "a0-1": "data-packet", + "v1-3": "run-packet" + } + }, + "tfrag-print-stats": { + "args": ["destination"], + "vars": { + "f0-4": "cnt-cost", + "f1-5": "data-cost", + "f2-3": "fragment-cost" + } + }, + "tfrag-init-buffer": { + "args": ["dma-buf", "test", "alpha-blend"], + "vars": { + "v1-0": "dma-state", + "a0-2": "direct-packet", + "v1-1": "dma-state", + "a0-4": "giftag", + "v1-2": "dma-state", + "a0-6": "test-packet", + "v1-3": "vif-state-packet", + "v1-5": "work" + } + }, + "tfrag-end-buffer": { + "args": ["dma-buf"], + "vars": { + "v1-0": "dma-state", + "a1-0": "mask-packet", + "v1-1": "dma-state", + "a0-1": "finish-packet" + } + }, + "tfrag-near-init-buffer": { + "args": ["dma-buf", "test", "alpha-blend"], + "vars": { + "v1-0": "dma-state", + "a0-2": "direct-packet", + "v1-1": "dma-state", + "a0-4": "giftag", + "v1-2": "dma-state", + "a0-6": "test-packet", + "v1-3": "vif-state-packet", + "v1-5": "work" + } + }, + "tfrag-near-end-buffer": { + "args": ["dma-buf"], + "vars": { + "v1-0": "dma-state", + "a1-0": "mask-packet", + "v1-1": "dma-state", + "a0-1": "finish-packet" + } + }, + "draw-prototype-inline-array-shrub": { + "args": ["prototype-count", "buckets"], + "vars": { + "sv-16": "opaque-chain", + "sv-32": "opaque-fragment", + "sv-48": "opaque-fragments-left", + "sv-64": "translucent-chain", + "sv-80": "translucent-fragment", + "sv-96": "translucent-fragments-left", + "v1-0": "bucket", + "a0-4": "dma-buf", + "a1-4": "i", + "a2-2": "opaque-count-packet", + "a2-7": "translucent-count-packet", + "s4-0": "dma-start", + "s2-0": "dma-buf", + "s3-0": "chain-start", + "v1-15": "dma-state", + "a0-13": "direct-packet", + "v1-16": "dma-state", + "a0-15": "giftag", + "v1-17": "dma-state", + "a0-17": "test-packet", + "a0-20": "near-packet", + "v1-21": "output-matrix", + "a1-15": "near-chain-tail", + "a2-13": "patched-init-tag", + "a2-14": "init-tag", + "a3-17": "init-data-0", + "a0-21": "init-data-1", + "v1-22": "after-matrix", + "a3-18": "chain-end", + "v1-23": "end-packet", + "v1-30": "usage", + "s4-1": "dma-start", + "s2-1": "dma-buf", + "s3-1": "chain-start", + "s1-0": "bucket", + "s0-0": "i", + "v1-43": "geometry", + "v1-49": "dma-state", + "a0-38": "call-packet", + "a3-22": "chain-end", + "v1-57": "end-packet", + "v1-64": "usage", + "s4-2": "dma-start", + "s2-2": "dma-buf", + "s3-2": "chain-start", + "s1-1": "bucket", + "s0-1": "i", + "v1-77": "geometry", + "v1-83": "dma-state", + "a0-56": "call-packet", + "a3-26": "chain-end", + "v1-91": "end-packet", + "v1-98": "usage", + "s4-3": "dma-start", + "v1-108": "dma-buf", + "a2-49": "chain-start", + "a0-70": "dma-state", + "a1-54": "direct-packet", + "a0-71": "dma-state", + "a1-56": "setup-packet", + "a3-34": "setup-fill", + "a0-72": "dma-state", + "a1-58": "setup-data", + "a3-36": "setup-address", + "a0-73": "output", + "a1-69": "adgif-data", + "a1-70": "billboard", + "a3-42": "distance-data", + "a3-43": "reciprocal-distance-data", + "a3-44": "next-data", + "a3-45": "count-data", + "a1-71": "last-data", + "a3-50": "chain-end", + "a0-74": "end-packet", + "v0-8": "insert-result", + "v1-114": "usage" + } + }, + "draw-drawable-tree-instance-shrub": { + "args": ["tree", "level"], + "vars": { + "v1-13": "prototypes", + "s4-0": "prototype-count", + "s3-0": "buckets", + "a1-2": "bucket-index", + "a2-3": "bucket", + "v1-19": "dma-buf", + "s5-0": "dma-start", + "v1-28": "usage" + } + }, + "(method 10 drawable-tree-instance-shrub)": { + "args": ["this", "root", "frame"], + "vars": { + "v1-1": "queue-index", + "a1-2": "level-index", + "a1-5": "owning-level" + } + }, + "(method 16 drawable-tree-instance-shrub)": { + "args": ["this", "source", "destination"] + }, + "(method 14 drawable-tree-instance-shrub)": { + "vars": { + "v1-3": "prototypes", + "gp-0": "bucket", + "s5-0": "prototype-index", + "v1-7": "near-count", + "a1-0": "near-geometry", + "a0-2": "fragment-count", + "s4-0": "opaque-count", + "v1-12": "opaque-geometry", + "s3-0": "fragment", + "s2-0": "fragment-count", + "a0-13": "triangle-count", + "v1-24": "display-vertex-count", + "s4-1": "translucent-count", + "v1-30": "translucent-geometry", + "s3-1": "fragment", + "s2-1": "fragment-count", + "a0-24": "triangle-count", + "v1-42": "display-vertex-count", + "v1-48": "billboard-count" + } + }, + "shrub-upload-test": { + "args": ["fragment"], + "vars": { + "gp-0": "dma-buf", + "v1-1": "dma-buf", + "a0-3": "packet" + } + }, + "(method 12 draw-node)": { + "args": ["this", "count", "result"], + "vars": { + "s3-0": "i" + } + }, + "(method 13 draw-node)": { + "args": ["this", "count", "result"], + "vars": { + "s3-0": "i" + } + }, + "(method 17 draw-node)": { + "args": ["this", "query-sphere", "count", "result"], + "vars": { + "s2-0": "i" + } + }, + "(method 3 drawable-inline-array-node)": { + "vars": { + "s5-0": "i" + } + }, + "(method 8 drawable-inline-array-node)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "byte-size" + } + }, + "(method 11 drawable-inline-array-node)": { + "args": ["this", "count", "result"] + }, + "(method 12 drawable-inline-array-node)": { + "args": ["this", "count", "result"] + }, + "(method 13 drawable-inline-array-node)": { + "args": ["this", "count", "result"] + }, + "(method 17 drawable-inline-array-node)": { + "args": ["this", "query-sphere", "count", "result"] + }, "(event be-clone process-taskable)": { + "args": ["proc", "argc", "message", "block"], "vars": { "v0-0": ["v0-0", "shadow-geo"] } }, "(event idle process-taskable)": { + "args": ["proc", "argc", "message", "block"], "vars": { "v0-0": ["v0-0", "symbol"] } }, + "(method 3 load-dir)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 8 load-dir)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "directory-size", + "v1-15": "name-array-size", + "v1-24": "data-array-size", + "s3-0": "i" + } + }, "(method 9 load-dir-art-group)": { - "args": ["this", "art-name", "do-reload", "heap", "version"] + "args": ["this", "art-name", "do-reload", "heap", "version"], + "vars": { + "s5-0": "name-array", + "s3-0": "i", + "v1-4": "reloaded-group", + "v0-2": "new-group" + } + }, + "(method 10 load-dir-art-group)": { + "args": ["this", "group"], + "vars": { + "s4-0": "name-array", + "s3-0": "i" + } + }, + "drawable-load": { + "args": ["source", "heap"], + "vars": { + "sp-0": "load-sp", + "s5-1": "loaded-drawable" + } + }, + "art-load": { + "args": ["name", "heap"], + "vars": { + "sp-0": "load-sp", + "s5-0": "loaded-art" + } + }, + "art-group-load-check": { + "args": ["name", "heap", "version"], + "vars": { + "sp-0": "load-sp", + "s3-1": "loaded-group" + } + }, + "(method 9 external-art-buffer)": { + "args": ["this", "name", "part", "owner", "priority"] + }, + "(method 15 external-art-buffer)": { + "args": ["this"] + }, + "(method 11 external-art-buffer)": { + "args": ["this"] + }, + "(method 12 external-art-buffer)": { + "args": ["this", "name", "part"] + }, + "(method 13 art-group)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "s3-0": "art-elt", + "s4-0": "janim", + "s2-0": "success", + "s3-1": "level-index", + "a0-14": "slot-index", + "v1-9": "janim-group" + } + }, + "(method 14 art-group)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "s3-0": "art-elt", + "s4-0": "janim", + "s3-1": "success", + "s2-0": "level-index", + "a0-5": "slot-index", + "v1-9": "janim-group" + } + }, + "(method 13 external-art-buffer)": { + "args": ["this", "group"] + }, + "(method 14 external-art-buffer)": { + "args": ["this", "group"] + }, + "(method 10 external-art-buffer)": { + "args": ["this"], + "vars": { + "v1-11": "buffer-heap", + "v1-28": "buffer-heap", + "a0-37": "file-data", + "s4-0": "loaded-group", + "s3-0": "file-name", + "v1-70": "buffer-heap", + "v1-79": "buffer-heap" + } + }, + "(method 12 external-art-control)": { + "args": ["this", "name", "part"], + "vars": { + "s3-0": "i", + "v1-3": "status" + } + }, + "(method 9 external-art-control)": { + "args": ["this", "debug-print"], + "vars": { + "v1-5": "i", + "v1-8": "i", + "s4-0": "request-index", + "s3-0": "request", + "s2-0": "buffer-index", + "s4-1": "request-index", + "s3-1": "request", + "s2-1": "buffer-index", + "s4-2": "highest-buffer", + "s4-3": "i", + "s4-4": "preload", + "s3-2": "i", + "s5-1": "i", + "s5-2": "i", + "v1-123": "owner-process", + "v1-144": "owner-process", + "v1-149": "owner-process", + "v1-152": "owner-process", + "t9-10": "print-record", + "a0-29": "console", + "a1-9": "record-format", + "a2-5": "record-index-copy", + "a3-3": "record-name", + "t0-3": "record-parts", + "t1-0": "record-priority", + "t9-11": "print-buffer", + "a0-30": "console", + "a1-10": "buffer-format", + "a2-6": "buffer-index-copy", + "a3-4": "lock-character", + "t0-4": "pending-name", + "t1-1": "pending-part", + "t2-5": "buffer-status", + "t9-13": "print-preload", + "a0-32": "console", + "a1-12": "preload-format", + "a2-8": "preload-name", + "t9-14": "print-last-preload", + "a0-33": "console", + "a1-13": "last-preload-format", + "a2-9": "last-preload-name" + } + }, + "(method 15 external-art-control)": { + "args": ["this"] + }, + "(method 13 external-art-control)": { + "args": ["this"] + }, + "(method 14 external-art-control)": { + "args": ["this", "heap"] + }, + "(method 10 external-art-control)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "v1-5": "reserved-index", + "v1-19": "i" + } + }, + "(method 16 external-art-control)": { + "args": ["this", "name", "part", "requester", "priority"], + "vars": { + "a0-2": "target-position" + } + }, + "(method 11 external-art-control)": { + "args": ["this", "name", "part", "requester", "priority"], + "vars": { + "a0-2": "target-position" + } }, "(method 15 hud-money)": { "vars": { @@ -3562,13 +12330,18 @@ } }, "anim-tester-get-playing-item": { + "args": ["seq"], "vars": { - "v0-0": ["v0-0", "anim-test-seq-item"] + "s4-0": "index", + "s5-0": "first-item", + "v0-0": ["item", "anim-test-seq-item"] } }, "light-eco-mother-default-event-handler": { + "args": ["sender", "event-id", "event", "message"], "vars": { - "v0-0": ["v0-0", "int"] + "a1-3": "angle-bit", + "v0-0": ["remaining-angle-mask", "int"] } }, "(code robotboss-white-eco-movie)": { @@ -3582,29 +12355,243 @@ } }, "cam-collision-record-save": { + "args": ["position", "velocity", "iteration", "move-kind", "slave"], "vars": { - "v1-5": ["v1-5", "cam-collision-record"] + "v1-5": ["record", "cam-collision-record"] } }, - "cam-layout-save-cam-trans": { + "cam-slave-options->string": { + "args": ["options", "output"] + }, + "cam-index-options->string": { + "args": ["options", "output"] + }, + "slave-los-state->string": { + "args": ["los-state"] + }, + "cam-line-dma": { "vars": { - "s5-1": ["s5-1", "vector"], - "s2-1": ["s2-1", "vector"] + "v1-3": "debug-buffer", + "a2-0": "packet-start", + "a0-3": "cnt-tag", + "a1-0": "write-buffer", + "a3-0": "dma-header", + "a1-1": "write-buffer", + "a3-2": "gif-header", + "a1-2": "write-buffer", + "a3-4": "vertex-packet", + "a3-6": "write-buffer", + "a1-3": "vertex-packet", + "a3-10": "qwc", + "a3-16": "next-tag", + "a0-4": "next-header" + } + }, + "camera-line2d": { + "args": ["start", "end"] + }, + "camera-plot-float-func": { + "args": ["x-min", "x-max", "y-min", "y-max", "fn", "color"], + "vars": { + "f30-0": "x-range", + "f24-0": "y-range", + "f28-0": "y-scale", + "f26-0": "x-scale", + "s3-1": "x-pixel", + "v1-62": "color-quad", + "v1-67": "previous-point-quad" + } + }, + "camera-line-setup": { + "args": ["color"], + "vars": { + "v1-0": "color-quad" + } + }, + "camera-line-draw": { + "args": ["start", "end"] + }, + "camera-line": { + "args": ["start", "end", "color"] + }, + "camera-line-rel": { + "args": ["start", "offset", "color"] + }, + "camera-line-rel-len": { + "args": ["start", "direction", "length", "color"] + }, + "camera-sphere": { + "args": ["center", "radius", "color"], + "vars": { + "s4-0": "latitude", + "s3-0": "longitude", + "f30-1": "ring-radius", + "f28-1": "next-ring-radius" + } + }, + "camera-cross": { + "args": ["axis-a", "axis-b", "center", "color", "half-length"] + }, + "camera-bounding-box-draw": { + "args": ["bounds", "unused-options", "unused-color"] + }, + "cam-debug-reset-coll-tri": { + }, + "cam-debug-add-los-tri": { + "args": ["triangles", "intersection", "color"], + "vars": { + "v1-3": "saved-triangle" + } + }, + "cam-debug-add-coll-tri": { + "args": ["triangle", "intersection", "color-data"], + "vars": { + "v1-3": "saved-triangle" + } + }, + "cam-debug-draw-tris": { + "vars": { + "gp-1": "i", + "gp-2": "i", + "v1-7": "color-quad", + "v1-34": "color-quad" + } + }, + "camera-fov-draw": { + "args": ["direction-a-address", "direction-b-address", "origin", "near-distance", "far-distance", "color"] + }, + "camera-fov-frame": { + "args": ["inverse-rotation", "origin", "half-fov", "vertical-scale", "horizontal-scale", "color"] + }, + "(method 11 tracking-spline)": { + "args": ["this", "point-index"] + }, + "(method 12 tracking-spline)": { + "args": ["this"], + "vars": { + "s5-0": "point-index" + } + }, + "(method 23 tracking-spline)": { + "args": ["this"], + "vars": { + "s5-0": "point-index", + "s4-0": "next-point-index", + "s3-0": "sample-position", + "s5-1": "corrected-move" + } + }, + "debug-euler": { + "args": ["scratch"], + "vars": { + "s4-0": "angles", + "gp-0": "reconstructed" + } + }, + "bike-cam-limit": { + "args": ["input"], + "vars": { + "f0-1": "scaled-input", + "f30-0": "clamped-input" + } + }, + "camera-slave-debug": { + "args": ["slave"], + "vars": { + "f30-0": "half-fov", + "f0-2": "half-fov", + "f0-4": "half-fov", + "s5-1": "line-end", + "s4-1": "line-start", + "s5-2": "pivot-axis-end", + "s5-3": "path-data", + "s4-2": "path-offset", + "s3-0": "previous-point", + "s2-0": "current-point", + "gp-1": "authored-line", + "s1-0": "i", + "s1-1": "i" + } + }, + "master-draw-coordinates": { + "args": ["direction"], + "vars": { + "s5-0": "axis-end", + "gp-0": "axis-origin", + "a0-1": "rotation", + "a1-2": "axis-destination", + "a1-5": "axis-destination", + "a1-8": "axis-destination", + "v1-4": "origin-copy", + "v1-5": "origin-copy", + "v1-6": "origin-copy", + "a0-3": "axis-offset", + "a0-5": "axis-offset", + "a0-7": "axis-offset" + } + }, + "cam-collision-record-step": { + "args": ["delta"] + }, + "cam-collision-record-draw": { + "vars": { + "s5-0": ["record", "cam-collision-record"], + "s4-0": "movement-color", + "gp-0": "collision-color", + "s3-1": "hit", + "f30-1": "travel", + "s2-1": "toward-start" + } + }, + "camera-master-debug": { + "args": ["cam-master"], + "vars": { + "f0-1": "half-fov", + "s4-0": "axis-end", + "s5-0": "axis-origin", + "v1-12": "last-attacker" + } + }, + "debug-set-camera-pos-rot!": { + "args": ["position", "inverse-rotation"], + "vars": { + "a2-0": "destination-rotation", + "v1-10": "row-0", + "a0-4": "row-1", + "a1-2": "row-2", + "a3-0": "row-3" + } + }, + "external-cam-reset!": { + "vars": { + "v1-6": "destination-rotation", + "a3-0": "source-rotation", + "a0-2": "row-0", + "a1-0": "row-1", + "a2-0": "row-2", + "a3-1": "row-3" + } + }, + "cam-start": { + "args": ["reset?"] + }, + "cam-layout-save-cam-trans": { + "args": ["print?", "output", "camera"], + "vars": { + "s1-0": "setup-translation", + "s5-0": "get-property-struct", + "s2-0": "property-owner", + "s5-1": ["translation-offset", "vector"], + "s2-1": ["level-translation", "vector"], + "s3-1": "final-translation" } }, "(method 15 level)": { + "args": ["this", "position"], "vars": { - "v1-5": ["v1-5", "(inline-array box8s)"] - } - }, - "(method 14 process-drawable)": { - "vars": { - "a2-10": ["a2-10", "int"] - } - }, - "joint-control-reset!": { - "vars": { - "v1-2": ["v1-2", "joint-control-channel"] + "a0-1": "boxes", + "v1-5": ["box-cursor", "(inline-array box8s)"], + "a0-2": "boxes-left" } }, "matrix-from-control!": { @@ -3612,11 +12599,6 @@ "v1-10": ["v1-10", "matrix"] } }, - "(event citb-robotboss-idle)": { - "vars": { - "v0-3": ["v0-3", "symbol"] - } - }, "(code pov-camera-playing maincavecam)": { "vars": { "gp-1": ["gp-1", "handle"] @@ -3629,78 +12611,419 @@ }, "(event cam-master-active)": { "vars": { - "v0-0": ["v0-0", "object"] + "v0-0": ["result", "object"], + "v1-0": "event-type", + "gp-1": "teleport-transform", + "s5-1": "i", + "gp-2": "aim-direction", + "a1-10": "change-state-event", + "v1-43": "start-position", + "gp-3": "aim-direction", + "v1-52": "pov-process", + "v1-56": "new-target", + "gp-4": "i", + "v1-86": "i", + "v1-91": "i", + "v1-95": "i", + "a0-75": "region", + "s1-0": "requested-state", + "s2-0": "new-slave", + "s5-2": "old-slave-to-deactivate", + "s3-0": "old-slave-state", + "s4-1": "old-slave", + "t9-22": "type-test-fn", + "t9-23": "type-test-fn", + "v1-101": "requested-camera", + "v1-103": "requested-camera", + "t9-24": "format-fn", + "a0-82": "format-destination", + "a1-25": "error-format", + "v1-106": "requested-camera", + "a1-26": "activation-event", + "v1-126": "new-slave-copy", + "gp-5": "allocated-slave", + "t9-27": "activate-fn", + "a1-33": "activation-event", + "v1-166": "new-slave-copy", + "a1-36": "tracking-event", + "v1-191": "new-slave-copy", + "a1-38": "activation-event", + "v1-228": "new-slave-copy", + "s2-1": "allocated-slave", + "t9-42": "activate-fn", + "v1-261": "tracking-status", + "v1-263": "destination-tracking-mode", + "v1-280": "destination-tracking-mode", + "v1-286": "destination-tracking-mode", + "v1-295": "destination-tracking-mode", + "f0-22": "zero-speed", + "gp-6": "i", + "a1-54": "teleport-event", + "a0-193": "first-slave", + "v1-360": "second-slave", + "a1-60": "slave-event", + "a1-61": "combiner-event", + "s3-1": "i", + "a1-62": "forwarded-event" } }, "(code pickup fuel-cell)": { + "args": ["pickup-mode", "collector-handle"], "vars": { - "v1-34": ["v1-34", "(inline-array vector)"] + "sv-96": "movie-position-tag", + "v1-34": ["movie-positions", "(inline-array vector)"], + "gp-1": "movie-position" } }, "(method 11 eco)": { + "args": ["this", "source-entity"], "vars": { - "v1-2": ["v1-2", "pickup-type"] + "v1-2": ["kind", "pickup-type"] } }, "(method 9 fact-info)": { + "args": ["this", "radial-velocity?", "destination-pool", "spawn-info", "amount-bonus"], "vars": { - "s3-0": ["s3-0", "pickup-type"] + "s3-0": ["kind", "pickup-type"], + "f30-0": "amount", + "s1-0": "death-count", + "s2-1": "spawn-position", + "s1-1": "ground-hit" } }, "(event pickup eco-collectable)": { "vars": { - "v0-1": ["v0-1", "symbol"] + "v1-3": "movie-position", + "v0-1": ["result", "symbol"] } }, "cloud-track": { + "args": [ + "source", + "destination", + "update-position", + "delay", + "transition-duration", + "destination-duration" + ], "vars": { - "s1-1": ["s1-1", "handle"], - "s2-1": ["s2-1", "handle"] + "s1-1": ["source-handle", "handle"], + "s2-1": ["destination-handle", "handle"], + "v1-8": "endpoint-missing?", + "f0-1": "blend", + "a0-18": "transition-sample", + "a0-21": "destination-sample" } }, "(method 63 collide-shape-moving)": { + "args": ["this", "vel-out", "vel-in", "step-fraction"], "vars": { - "s0-0": ["s0-0", "collide-cache-prim"] + "s0-0": ["cache-prim", "collide-cache-prim"], + "s1-1": "root-prim", + "s2-0": "move-vec", + "s2-1": "debug-in-vel", + "s5-0": "isect", + "sv-192": "prims-left", + "f30-0": "hit-u", + "t1-0": "tri-color", + "v1-4": "ccache" } }, "target-powerup-effect": { + "args": ["effect"], "vars": { - "a0-74": ["a0-74", "vector"] + "a0-74": ["a0-74", "vector"], + "v1-4": "joint-index" } }, "(code target-yellow-blast)": { "vars": { - "gp-0": ["gp-0", "handle"] + "gp-0": ["proj-handle", "handle"], + "gp-1": "proj", + "s5-2": "fire-dir" } }, "dma-add-process-drawable": { + "args": ["actor", "control", "flag", "dma-buf"], "vars": { "a0-20": ["a0-20", "terrain-context"], - "s4-0": ["s4-0", "vector"], - "v1-42": ["v1-42", "vector"], + "s4-0": ["bounds-sphere", "vector"], + "v1-42": ["camera-space-position", "vector"], "s3-1": "lod-to-use", - "f30-1": "cam-dist", - "s3-0": "tod", - "v1-17": "shadow-msk", - "a0-10": "lev-idx", - "s0-1": "lgt", - "s1-1": "cur-lgt", - "s2-0": "vu-lgt", - "a1-22": "lgt-msk-0", - "a2-14": "lgt-msk-1", - "f26-0": "lgt-interp", - "f28-0": "interp", - "f30-0": "cur-interp" + "f30-1": "camera-distance", + "s3-0": "time-of-day", + "v1-17": "shadow-mask", + "a0-10": "light-level-index", + "s0-1": "selected-light", + "s1-1": "blended-light", + "s2-0": "scratch-lights", + "a1-22": "shadow-mask-0", + "a2-14": "shadow-mask-1", + "f26-0": "shadow-interp", + "f28-0": "target-light-interp", + "f30-0": "current-light-interp", + "sv-16": ["actor", "process-drawable"] } }, "flatten-joint-control-to-spr": { + "args": ["control"], "vars": { "a1-0": ["a1-0", "(inline-array vector)"], "a1-1": ["a1-1", "(inline-array vector)"], "a1-2": ["a1-2", "(inline-array vector)"], - "s5-0": "nb-channels", - "s4-0": "upl-idx", - "s3-0": "ch" + "s5-0": "channel-count", + "s4-0": "upload-index", + "s3-0": "channel-index" + } + }, + "matrix-from-joint-anim-frame": { + "args": ["compressed", "matrix-index", "frame-index"], + "vars": { + "v1-1": "fixed-matrix", + "v0-0": "frame-matrix" + } + }, + "(method 0 joint-control)": { + "args": ["allocation", "type-to-make", "channel-capacity"], + "vars": { + "v1-4": "i" + } + }, + "(method 9 joint-control-channel)": { + "vars": { + "s5-0": "animation-group", + "f30-0": "frame", + "s4-0": "i" + } + }, + "(method 10 joint-control)": { + "args": ["this", "output"], + "vars": { + "s4-0": "i" + } + }, + "(method 3 art-joint-anim)": { + "vars": { + "s5-0": "i" + } + }, + "(method 10 art)": { + "args": ["this", "art-name", "expected-type"] + }, + "(method 11 art)": { + "args": ["this", "art-name", "expected-type"] + }, + "(method 10 art-group)": { + "args": ["this", "art-name", "expected-type"] + }, + "(method 11 art-group)": { + "args": ["this", "art-name", "expected-type"] + }, + "(method 10 art-joint-geo)": { + "args": ["this", "joint-name", "expected-type"] + }, + "(method 11 art-joint-geo)": { + "args": ["this", "joint-name", "expected-type"] + }, + "(method 9 cspace)": { + "args": ["this", "geometry"] + }, + "(method 0 cspace)": { + "args": ["allocation", "type-to-make", "geometry"], + "vars": { + "t9-0": "structure-new", + "v1-1": "requested-type" + } + }, + "matrix-from-control-channel!": { + "args": ["destination", "skeleton-joint", "channel"], + "vars": { + "s4-0": "animation-group", + "s5-0": "matrix-index", + "f30-0": "clamped-frame", + "f0-1": "frame-check", + "a2-3": "source-matrix", + "v1-7": "row0", + "a0-3": "row1", + "a1-3": "row2", + "a2-4": "row3", + "s3-1": "first-matrix", + "a2-7": "next-matrix", + "f0-9": "interpolation" + } + }, + "matrix-from-control-pair!": { + "args": ["destination", "channel", "skeleton-joint"], + "vars": { + "f30-0": "interpolation", + "a2-3": "selected-matrix" + } + }, + "matrix-from-control!": { + "args": ["stack", "skeleton-joint", "control", "mode"], + "vars": { + "s2-0": "channel-index", + "a2-1": "channel", + "v1-4": "command", + "s1-0": "matrix-size", + "v1-10": "previous-matrix", + "a3-1": "top-matrix", + "a0-10": "row0", + "a1-4": "row1", + "a2-2": "row2", + "a3-2": "row3", + "a1-8": "lower-matrix", + "v1-19": "upper-matrix", + "f0-0": "interpolation" + } + }, + "joint-anim-login": { + "args": ["animation"], + "vars": { + "s5-0": "i" + } + }, + "joint-anim-inspect-elt": { + "args": ["animation", "index"] + }, + "jacc-mem-usage": { + "args": ["compressed", "usage", "flags"], + "vars": { + "v1-7": "control-size", + "v1-17": "fixed-size", + "v1-21": "i", + "a2-15": "frame-size" + } + }, + "joint-control-channel-eval": { + "args": ["channel"] + }, + "joint-control-channel-eval!": { + "args": ["channel", "evaluate"] + }, + "joint-control-channel-group-eval!": { + "args": ["channel", "animation-group", "evaluate"] + }, + "joint-control-channel-group!": { + "args": ["channel", "animation-group", "evaluate"] + }, + "joint-control-copy!": { + "args": ["destination", "source"], + "vars": { + "v1-7": "i" + } + }, + "joint-control-remap!": { + "args": ["control", "new-art-group", "old-art-group", "renames", "selection", "new-prefix"], + "vars": { + "sv-16": "old-prefix-length", + "sv-24": "all-matched?", + "sv-32": "alias-selection", + "sv-40": "fallback-index", + "s2-1": "i", + "sv-48": "channel", + "sv-52": "aliases", + "a0-9": "alias-list", + "sv-56": "alias-index", + "sv-64": "replacement" + } + }, + "cspace<-cspace!": { + "args": ["destination", "source"], + "vars": { + "v0-0": "destination-matrix", + "a2-0": "source-matrix", + "v1-2": "row0", + "a0-1": "row1", + "a1-1": "row2", + "a2-1": "row3" + } + }, + "cspace<-rot-yxy!": { + "args": ["destination", "xform"], + "vars": { + "s5-0": "destination-matrix" + } + }, + "cspace<-transform-yxy!": { + "args": ["destination", "xform"], + "vars": { + "s4-0": "destination-matrix", + "s5-0": "rotation-matrix", + "s3-0": "composed-matrix" + } + }, + "cspace<-transformq!": { + "args": ["destination", "xform"] + }, + "cspace<-transformq+trans!": { + "args": ["destination", "xform", "translation"] + }, + "cspace<-transformq+world-trans!": { + "args": ["destination", "xform", "translation"] + }, + "cspace-calc-total-matrix!": { + "args": ["space", "destination"] + }, + "cspace<-matrix-no-push-joint!": { + "args": ["space", "control"], + "vars": { + "v1-2": "input-matrix", + "v0-1": "destination-matrix", + "a0-4": "row0", + "a1-2": "row1", + "a2-1": "row2", + "v1-3": "row3" + } + }, + "cspace<-matrix-joint!": { + "args": ["space", "input-matrix"], + "vars": { + "v0-0": "destination-matrix", + "a2-0": "source-matrix", + "v1-1": "row0", + "a0-1": "row1", + "a1-1": "row2", + "a2-1": "row3" + } + }, + "cspace<-parented-matrix-joint!": { + "args": ["space", "input-matrix"] + }, + "create-interpolated-joint-animation-frame": { + "args": ["destination", "joint-count", "drawable"] + }, + "(method 9 cylinder)": { + "args": ["this", "color"], + "vars": { + "s1-0": "radial", + "s0-0": "axis-step", + "s5-0": "vertices", + "s4-0": "rotated-vertices", + "s3-0": "rotation-matrix", + "sv-896": "rotated-origin", + "v1-5": "rotation-translation", + "sv-912": "i", + "s0-1": "cap-index", + "s2-1": "rotation-index", + "s1-1": "vertex-index", + "v1-77": "swap" + } + }, + "(method 9 cylinder-flat)": { + "args": ["this", "color"], + "vars": { + "s1-0": "radial", + "s0-0": "axis-step", + "s5-0": "vertices", + "s4-0": "rotated-vertices", + "s3-0": "rotation-matrix", + "sv-448": "rotated-origin", + "v1-5": "rotation-translation", + "sv-464": "i", + "s2-1": "rotation-index", + "s1-1": "vertex-index", + "v1-43": "swap" } }, "(event puffer-die)": { @@ -3708,49 +13031,135 @@ "v0-0": ["v0-0", "uint"] } }, - "bones-init": { + "bone-list-init": { "vars": { - "a2-1": ["a2-1", "bone-memory"], - "v1-2": ["v1-2", "bone-memory"] + "v1-0": "calculation-list" + } + }, + "vu-lights<-light-group!": { + "args": ["destination", "source"] + }, + "bones-wrapup": { + "vars": { + "v1-1": ["bone-memory", "bone-memory"], + "a0-2": "dma-buf", + "a3-0": "chain-end", + "a1-0": "end-tag" + } + }, + "dump-qword": { + "args": ["value"] + }, + "dump-mem": { + "args": ["memory", "quadword-count"], + "vars": { + "s4-0": "i" + } + }, + "draw-bones-shadow": { + "args": ["draw", "matrix-data", "packet"], + "vars": { + "v1-0": "next-tag", + "t1-0": "shadow", + "a3-4": "shadow-run", + "a2-1": "shadow-packet-data", + "t4-0": "distance", + "t0-2": "shadow-packet", + "t2-0": "joint-count", + "t3-0": "previous-link", + "t5-2": "settings", + "t6-0": "flags" + } + }, + "draw-bones-generic-merc": { + "args": ["draw", "matrix-data", "packet", "isometric"] + }, + "draw-bones-merc": { + "args": ["draw", "matrix-data", "packet", "first-fragment-entry", "first-effect-entry"] + }, + "draw-bones-check-longest-edge": { + "args": ["draw", "distance"] + }, + "draw-bones-check-longest-edge-asm": { + "args": ["draw", "distance"] + }, + "bones-init": { + "args": ["dma-buf", "sink-group"], + "vars": { + "a2-1": ["scratchpad", "bone-memory"], + "v1-2": ["bone-memory", "bone-memory"], + "gp-0": "vu0-upload", + "gp-1": "shadow-queue", + "v1-13": "shadow-run" } }, "draw-bones-mtx-calc": { + "args": ["calculation", "matrix-area", "flags"], "vars": { - "t2-0": ["t2-0", "bone-memory"] + "t2-0": ["bone-memory", "bone-memory"], + "v1-1": "calculation-list", + "t0-0": "joints", + "t1-0": "bones", + "t2-1": "bone-count" } }, "bones-mtx-calc-execute": { "vars": { - "a1-9": ["a1-9", "(inline-array vector)"], - "v1-18": ["v1-18", "(inline-array matrix)"] + "v1-8": ["bone-memory", "bone-memory"], + "v1-10": "calculation-list", + "gp-0": "identity", + "s5-0": "camera-rotation", + "s4-0": "calculation", + "v1-13": "calculation-camera", + "a1-9": ["ripple-output", "(inline-array vector)"], + "v1-18": ["matrices", "(inline-array matrix)"], + "a0-22": "bone-count" } }, "texscroll-make-request": { + "args": ["effect"], "vars": { - "a1-1": ["a1-1", "mei-texture-scroll"] + "v1-1": "request-count", + "a1-0": "extra-info", + "a1-1": ["scroll-info", "mei-texture-scroll"], + "a3-1": "clock", + "a2-3": "period-shift", + "t0-2": "period-mask", + "a2-5": "packed-time" } }, "texscroll-execute": { "vars": { - "t1-0": ["t1-0", "merc-fragment"], - "a1-2": ["a1-2", "mei-texture-scroll"], - "t1-3": ["t1-3", "(pointer int8)"], - "a2-1": ["a2-1", "merc-fragment-control"] + "v1-0": "request-index", + "a2-0": "effect", + "a0-2": "fragment-count", + "a1-1": "extra-info", + "t1-0": ["fragment", "merc-fragment"], + "a1-2": ["scroll-info", "mei-texture-scroll"], + "a2-1": ["fragment-control", "merc-fragment-control"], + "a3-2": "fragment-index", + "t0-4": "vertices", + "t2-2": "vertex-count", + "t1-3": ["st-byte", "(pointer int8)"], + "t2-4": "st-end", + "t3-3": "time-delta" } }, "draw-bones": { + "args": ["draw", "dma-buf", "distance"], "vars": { - "a2-6": ["a2-6", "bone-regs"], - "t4-0": ["t4-0", "bone-memory"], - "v1-36": ["v1-36", "mei-texture-scroll"], - "v1-6": ["v1-6", "vu-lights"] + "a2-6": ["bone-regs", "bone-regs"], + "t4-0": ["bone-memory", "bone-memory"], + "v1-36": ["scroll-info", "mei-texture-scroll"], + "v1-6": ["scratchpad-lights", "vu-lights"] } }, "draw-bones-hud": { + "args": ["draw", "dma-buf"], "vars": { - "t0-1": ["t0-1", "bone-regs"], - "t6-0": ["t6-0", "bone-memory"], - "t2-10": ["t2-10", "vu-lights"] + "t0-1": ["bone-regs", "bone-regs"], + "t6-0": ["bone-memory", "bone-memory"], + "t2-10": ["lights", "vu-lights"] } }, "(code manipy-idle)": { @@ -3759,8 +13168,25 @@ } }, "(code target-death)": { + "args": ["death-mode"], "vars": { - "s5-8": ["s5-8", "handle"] + "a0-155": "cam-proc", + "a0-98": "nodes", + "a1-44": "joint-event", + "a3-9": "my-bone-mat", + "f30-1": "cur-blend", + "f30-2": "fall-vel-cap", + "gp-0": "flat-vel", + "gp-11": "flat-vel", + "gp-13": "shark-attacker", + "gp-14": "boss-attacker", + "gp-18": "death-spool", + "gp-3": "chan", + "gp-4": "chan2", + "s5-1": "attacker-proc", + "s5-5": "joint-idx", + "s5-8": ["deathcam", "handle"], + "v1-205": "boss-bone-mat" } }, "(method 23 exit-chamber)": { @@ -3778,8 +13204,15 @@ }, "(code pelican-spit)": { "vars": { - "gp-1": ["gp-1", "handle"], - "s4-0": ["s4-0", "handle"] + "v1-21": "target-grabbed?", + "v1-31": "target-released?", + "gp-1": ["beachcam-handle", "handle"], + "s5-0": "other-camera", + "t9-4": "activate-other-camera", + "s4-0": ["clone-cell-handle", "handle"], + "s5-2": "saved-rotation", + "gp-3": "fuel-cell-process", + "s5-3": "spit-target" } }, "(code race-ring-active)": { @@ -3835,6 +13268,7 @@ } }, "mistycam-spawn": { + "args": [], "vars": { "v1-12": ["v1-12", "handle"], "v1-15": ["v1-15", "handle"], @@ -3854,42 +13288,112 @@ } }, "(code hud-collecting)": { + "args": ["hud-handle"], "vars": { - "v1-0": ["v1-0", "handle"] + "v1-0": ["v1-0", "handle"], + "s5-0": "destination-delta", + "s4-0": "hud-process", + "f30-0": "move-rate", + "f26-0": "progress", + "f28-0": "start-scale-x", + "f24-0": "start-scale-y", + "f22-0": "start-scale-z", + "f0-7": "step", + "f0-8": "previous-progress", + "a0-12": "root-transform" } }, "(method 13 touching-list)": { + "args": ["this", "shape-a", "shape-b"], "vars": { - "v0-0": ["v0-0", "touching-shapes-entry"] + "v0-0": ["candidate", "touching-shapes-entry"], + "v1-0": "free-entry", + "a3-0": "entries-left", + "t0-0": "first-shape" } }, "(method 11 touching-list)": { + "args": ["this", "chosen-step"], "vars": { - "s5-0": ["s5-0", "touching-shapes-entry"] + "s5-0": ["shape-entry", "touching-shapes-entry"], + "s4-0": "entries-left", + "s3-0": "node", + "f0-0": "contact-u", + "a1-1": "node-to-free", + "v1-7": "next-node", + "a0-1": "prev-node" } }, "recursive-inside-poly": { + "args": ["mesh", "node", "point", "y-threshold"], "vars": { - "a1-2": ["a1-2", "nav-node"] + "v1-2": "left-offset", + "s3-0": "right-offset", + "a1-2": ["left-node", "nav-node"], + "v1-3": "left-result", + "a1-3": "right-node", + "v1-7": "right-result", + "s3-1": "poly-count", + "s2-1": "poly-cursor", + "s1-0": "i", + "s0-0": "poly-index" } }, "vu-point-triangle-intersection?": { + "args": ["point", "vertex-0", "vertex-1", "vertex-2"], "vars": { - "v1-0": ["v1-0", "int"], - "a0-1": ["a0-1", "int"], - "a1-1": ["a1-1", "int"] + "v1-0": ["edge-cross-0-bits", "int"], + "a1-1": ["edge-cross-1-bits", "int"], + "a0-1": ["edge-cross-2-bits", "int"], + "v1-1": "edge-cross-0-negative", + "a1-2": "edge-cross-1-negative", + "a0-2": "edge-cross-2-negative", + "a0-3": "edge-cross-1-2-difference", + "v1-2": "edge-cross-0-1-difference", + "a0-4": "edge-cross-1-2-match", + "v1-3": "edge-cross-0-1-match" } }, "point-inside-poly?": { + "args": ["mesh", "poly-index", "point", "y-threshold"], "vars": { - "v1-6": ["v1-6", "int"], - "a0-3": ["a0-3", "int"], - "a1-6": ["a1-6", "int"] + "t0-0": "poly", + "v1-5": "vertex-0", + "a1-5": "vertex-1", + "a0-2": "vertex-2", + "f0-3": "y-distance", + "v1-6": ["edge-cross-0-bits", "int"], + "a1-6": ["edge-cross-1-bits", "int"], + "a0-3": ["edge-cross-2-bits", "int"], + "v1-7": "edge-cross-0-negative", + "a1-7": "edge-cross-1-negative", + "a0-4": "edge-cross-2-negative", + "a0-5": "edge-cross-1-2-difference", + "v1-8": "edge-cross-0-1-difference", + "a0-6": "edge-cross-1-2-match", + "v1-9": "edge-cross-0-1-match" } }, "(method 29 nav-mesh)": { + "args": ["this", "center", "radius", "y-threshold"], "vars": { - "v1-10": ["v1-10", "int"] + "v1-10": ["average-y-bits", "int"], + "s2-0": "triangle-data", + "f30-1": "one-third", + "s1-0": "poly-index", + "a0-3": "poly", + "v1-8": "vertices-base", + "a2-1": "vertex-index-0", + "a1-1": "vertex-index-1", + "a3-1": "vertex-index-2", + "a2-2": "vertex-offset-0", + "a1-2": "vertex-offset-1", + "a2-3": "vertex-offset-2", + "a0-4": "vertex-address-0", + "a1-3": "vertex-address-1", + "v1-9": "vertex-address-2", + "a0-5": "one-third-bits", + "v1-11": "average-y-distance" } }, "(method 15 snow-ball)": { @@ -3899,57 +13403,1550 @@ } }, "curve-evaluate!": { + "args": ["dst", "input", "control-points", "control-point-count", "knots", "knot-count"], "vars": { "t2-1": ["t2-1", "(pointer float)"], "v1-5": ["v1-5", "(pointer float)"] } }, - "update-mood-flames": { + "clear-mood-times": { + "args": ["context"], "vars": { - "s5-0": ["s5-0", "flames-state"] + "v1-0": "i" + } + }, + "update-light-kit": { + "args": ["group", "source-light", "level"] + }, + "update-snow": { + "args": ["target"], + "vars": { + "gp-0": "target-position", + "f0-0": "speed-blend" + } + }, + "check-drop-level-rain": { + "args": ["system", "particle", "particle-transform"], + "vars": { + "gp-0": "splash-position" + } + }, + "update-rain": { + "args": ["target"], + "vars": { + "a2-0": "horizontal-velocity", + "gp-0": "spawn-position", + "s5-0": "camera-local-to-world", + "f28-0": "drop-width", + "f30-0": "drop-height", + "f26-0": "screen-drip-amount", + "f0-10": "screen-drip-speed" + } + }, + "sparticle-track-sun": { + "args": ["system", "particle", "particle-data"], + "vars": { + "s5-0": "layer-index", + "a1-1": "camera-position", + "a2-1": "sun-data", + "v1-3": "world-position" + } + }, + "(anon-function 12 time-of-day)": { + "args": ["system", "particle"] + }, + "(code time-of-day-tick)": { + "vars": { + "f0-4": "fractional-frames", + "f0-6": "fractional-seconds", + "f0-8": "fractional-minutes", + "f0-10": "fractional-hours" + } + }, + "time-of-day-setup": { + "args": ["toggle"] + }, + "set-time-of-day": { + "args": ["hour"], + "vars": { + "v1-0": "clock", + "a0-1": "minutes" + } + }, + "init-time-of-day-context": { + "args": ["context"] + }, + "update-time-of-day": { + "args": ["context"], + "vars": { + "v1-12": "i", + "a0-4": "lev", + "s4-0": ["level-distances", "(array float)"], + "s5-0": "active-sky-count", + "f30-0": "current-blend", + "s3-0": "level-index", + "s2-0": "lev", + "f0-6": "level0-distance", + "f1-0": "level1-distance", + "f28-0": "target-blend", + "f0-7": "blend-error", + "s5-1": "current-fog", + "v1-67": "level0-fog", + "s4-1": "group-index", + "v1-88": "level1-fog", + "s4-2": "group-index", + "s4-3": "level0-fog", + "s3-1": "level1-fog", + "s4-4": "group-index", + "s3-2": "light-index", + "s2-1": "dst-light", + "s1-0": "level0-light", + "s0-0": "level1-light", + "s3-3": "dst-ambient", + "s2-2": "level0-ambient", + "s1-1": "level1-ambient", + "f0-20": "level0-sun-fade", + "s4-5": "i", + "v1-179": "current-fog", + "v1-184": "erase-color", + "v1-195": "target-light-index", + "f30-1": "target-light-blend", + "s4-6": "base-light-group", + "s5-2": "target-light-group", + "s3-4": "light-index", + "a2-30": "shadow-direction", + "f0-57": "horizontal-scale" + } + }, + "sky-set-sun-radii": { + "args": ["parms", "index", "sun-radius", "halo-radius", "aurora-radius"], + "vars": { + "v1-0": "sun-index" + } + }, + "sky-set-sun-colors": { + "args": [ + "parms", + "index", + "sun-center-color", + "sun-edge-color", + "halo-edge-color", + "aurora-edge-color" + ], + "vars": { + "v1-0": "sun-index" + } + }, + "sky-set-sun-colors-sun": { + "args": ["parms", "index", "center-color", "edge-color"], + "vars": { + "v1-0": "sun-index" + } + }, + "sky-set-sun-colors-halo": { + "args": ["parms", "index", "center-color", "edge-color"], + "vars": { + "v1-0": "sun-index" + } + }, + "sky-set-sun-colors-aurora": { + "args": ["parms", "index", "center-color", "edge-color"], + "vars": { + "v1-0": "sun-index" + } + }, + "sky-set-orbit": { + "args": [ + "parms", + "orbit-index", + "high-noon", + "tilt-degrees", + "rise-degrees", + "distance", + "min-halo", + "max-halo" + ] + }, + "sky-make-sun-data": { + "args": ["parms", "sun-index", "hour"], + "vars": { + "s4-0": "orbit-data", + "s3-0": "sun-data", + "f0-1": "phase-hours", + "f30-0": "phase-angle", + "f28-0": "sin-distance", + "f30-1": "phase-cosine", + "f24-0": "cos-distance", + "f26-0": "vertical-position", + "f24-1": "tilted-cos-distance", + "f22-0": "sin-rise", + "f0-10": "cos-rise", + "f0-14": "day-height" + } + }, + "sky-make-moon-data": { + "args": ["parms", "hour"], + "vars": { + "s5-0": "orbit-data", + "gp-0": "moon-data", + "f0-1": "phase-hours", + "f28-0": "phase-angle", + "f30-0": "sin-distance", + "f26-0": "cos-distance", + "f28-1": "vertical-position", + "f26-1": "tilted-cos-distance", + "f24-0": "sin-rise", + "f0-10": "cos-rise" + } + }, + "sky-make-light": { + "args": ["parms", "dst-light", "orbit-index", "light-color"], + "vars": { + "v1-2": "orbit-data", + "a0-1": "body-data", + "f0-0": "byte-to-float", + "f1-1": "inverse-distance", + "v1-3": "dst" + } + }, + "sky-init-upload-data": { + "args": ["parms", "sun-color"] + }, + "sky-add-frame-data": { + "args": ["dma-buf", "unused"] + }, + "sky-upload": { + "args": ["dma-buf", "unused"] + }, + "sky-draw": { + "args": ["dma-buf"] + }, + "init-sky-tng-data": { + "args": ["data"] + }, + "update-sky-tng-data": { + "args": ["time"], + "vars": { + "v1-0": "data" + } + }, + "set-tex-offset": { + "args": ["s-phase", "t-phase"] + }, + "render-sky-quad": { + "args": ["vertices", "dma-buf"] + }, + "render-sky-tri": { + "args": ["vertices", "dma-buf"] + }, + "sky-duplicate-polys": { + "args": ["dma-buf", "begin", "end"] + }, + "close-sky-buffer": { + "args": ["dma-buf"], + "vars": { + "v1-0": "terminator", + "v0-0": "cursor", + "v0-1": "next-cursor" + } + }, + "sky-tng-setup-cloud-layer": { + "args": ["inner-rotation-sin", "outer-rotation-sin", "color", "output"], + "vars": { + "f28-0": "inner-rotation-cos", + "f26-0": "outer-rotation-cos", + "s5-0": "control-vertices", + "s1-0": "i", + "f30-0": "midpoint", + "f9-0": "outer-min-x", + "f10-0": "outer-max-x", + "f11-0": "outer-min-z", + "f8-0": "outer-max-z", + "f6-0": "outer-min-st", + "f7-0": "outer-max-st", + "f12-0": "outer-min-t", + "f13-0": "outer-max-t", + "f1-4": "inner-min-x", + "f2-2": "inner-max-x", + "f4-0": "inner-min-z", + "f0-4": "inner-max-z", + "f3-5": "inner-min-factor", + "f5-2": "inner-max-factor", + "f15-1": "inner-min-t-factor", + "f14-3": "inner-max-t-factor", + "f3-7": "inner-min-st", + "f5-4": "inner-max-st", + "v1-5": "outer-corner", + "v1-6": "outer-corner", + "v1-7": "outer-corner", + "v1-8": "outer-corner", + "v1-13": "inner-corner", + "v1-14": "inner-corner", + "v1-15": "inner-corner", + "v1-16": "inner-corner", + "v1-21": "i", + "f0-14": "x", + "f1-6": "z", + "v1-24": "i", + "f0-18": "x", + "f1-8": "z", + "s3-1": "i", + "v1-51": "i", + "a0-47": "control-index" + } + }, + "sky-tng-setup-clouds": { + "vars": { + "a2-0": "layer0-color", + "gp-0": "layer1-color" + } + }, + "render-sky-tng": { + "args": ["context"], + "vars": { + "gp-0": "usage-start", + "s4-0": "dma-buf", + "s5-0": "bucket-start", + "v1-14": "state-buffer", + "a0-11": "state-header", + "v1-15": "state-buffer", + "a0-13": "state-giftag", + "v1-16": "state-buffer", + "a0-15": "state-registers", + "v1-20": "roof-buffer", + "a0-17": "roof-header", + "v1-21": "roof-buffer", + "a0-19": "roof-giftag", + "s3-0": "roof-state-buffer", + "s2-0": "roof-state", + "s3-1": "roof-packet-start", + "v1-46": "roof-qwc", + "v1-52": "cloud-buffer", + "a0-32": "cloud-header", + "v1-53": "cloud-buffer", + "a0-34": "cloud-giftag", + "s3-2": "cloud-state-buffer", + "s2-1": "cloud-state", + "s3-3": "cloud-packet-start", + "s2-2": "vertices", + "s1-4": "i", + "s1-5": "i", + "v1-83": "base-depth-bits", + "v1-84": "base-depth", + "v1-92": "cloud-qwc", + "a3-0": "end-tag", + "v1-96": "next-tag", + "v1-101": "usage" + } + }, + "copy-sky-texture": { + "args": ["dma-buf", "shader", "weight"], + "vars": { + "s5-0": "packet", + "v1-0": "modulation", + "a0-2": "sprite-data", + "s4-0": "shader-copy" + } + }, + "copy-cloud-texture": { + "args": ["dma-buf", "shader", "weight"], + "vars": { + "s5-0": "packet", + "v1-0": "modulation", + "a0-2": "sprite-data", + "s4-0": "shader-copy" + } + }, + "make-sky-textures": { + "args": ["context", "level-index"], + "vars": { + "f30-0": "level-weight", + "gp-0": ["blend-bucket", "bucket-id"], + "s1-0": "adgifs", + "s2-0": "dma-buf", + "s3-0": "packet-start", + "s0-0": "texture-index", + "f0-3": "texture-weight", + "v1-31": "finish-buffer", + "a0-19": "finish-header", + "v1-32": "finish-buffer", + "a0-21": "finish-giftag", + "v1-33": "finish-buffer", + "a0-23": "finish-alpha", + "a3-1": "end-tag", + "v1-34": "next-tag" + } + }, + "add-boundary-shader": { + "args": ["shader-texture", "dma-buf"], + "vars": { + "v1-0": "buffer", + "a1-1": "giftag", + "s5-0": "shader" + } + }, + "draw-boundary-side": { + "args": ["boundary", "start-index", "end-index", "dma-buf", "uv-phase?"], + "vars": { + "v1-2": "start", + "a1-3": "end", + "a2-2": "polygon-pos", + "a2-4": "polygon-pos", + "a2-6": "polygon-pos", + "a1-5": "polygon-pos", + "v1-4": "polygon-uv", + "v1-6": "polygon-uv", + "v1-8": "polygon-uv", + "v1-10": "polygon-uv", + "v1-12": "polygon-uv", + "v1-14": "polygon-uv", + "v1-16": "polygon-uv", + "v1-18": "polygon-uv" + } + }, + "draw-boundary-cap": { + "args": ["boundary", "plane-y", "dma-buf", "uv-phase?"], + "vars": { + "s2-0": "i", + "a1-1": "v0", + "a0-1": "v1", + "v1-15": "v2", + "a2-2": "polygon-pos", + "a1-3": "polygon-pos", + "a0-3": "polygon-pos", + "v1-17": "polygon-uv", + "v1-19": "polygon-uv", + "v1-21": "polygon-uv", + "v1-23": "polygon-uv", + "v1-25": "polygon-uv", + "v1-27": "polygon-uv" + } + }, + "boundary-set-color": { + "args": ["color-vertex", "command"], + "vars": { + "v1-1": "color", + "v1-2": "color", + "v1-4": "color", + "v1-5": "color", + "v1-6": "color", + "v1-7": "color", + "v1-8": "color" + } + }, + "render-boundary": { + "args": ["boundary"], + "vars": { + "s3-0": "uv-phase?", + "s5-0": "dma-buf", + "gp-0": "packet-start", + "v1-8": "buffer", + "a0-5": "cnt-tag", + "v1-9": "buffer", + "a0-7": "giftag", + "v1-10": "buffer", + "a0-9": "gs-state", + "s2-0": "vif-block", + "s1-0": "i", + "v1-25": "block-qwc", + "a3-2": "packet-end", + "v1-29": "next-tag" + } + }, + "format-boundary-cmd": { + "args": ["command"] + }, + "edit-load-boundaries": { + "vars": { + "gp-0": "editor", + "s5-0": "boundary", + "s3-0": "camera-right", + "s4-0": "camera-forward", + "s2-0": "selected-pos", + "f30-1": "coarse-x", + "f28-1": "coarse-z", + "f30-2": "move-x", + "f0-10": "move-z", + "v1-37": "i", + "v1-95": "previous" + } + }, + "copy-load-command!": { + "args": ["dst", "src"], + "vars": { + "v1-1": "i", + "v1-4": "i" + } + }, + "copy-load-boundary!": { + "args": ["dst", "src"] + }, + "replace-load-boundary": { + "args": ["old-boundary", "new-boundary"], + "vars": { + "v1-9": "previous" + } + }, + "lb-del": { + "vars": { + "v1-1": "selected", + "a0-5": "previous" + } + }, + "lb-add-vtx-before": { + "vars": { + "v1-0": "editor", + "gp-0": "boundary", + "s4-0": "selected-index", + "s5-0": "new-boundary", + "v1-8": "i", + "v1-9": "dst-index" + } + }, + "lb-add-vtx-after": { + "vars": { + "gp-0": "editor", + "s5-0": "boundary", + "s3-0": "selected-index", + "s4-0": "new-boundary", + "v1-7": "i", + "v1-8": "dst-index" + } + }, + "lb-del-vtx": { + "vars": { + "gp-0": "editor", + "s5-0": "boundary", + "s3-0": "selected-index", + "s4-0": "new-boundary", + "v1-7": "i", + "v1-8": "src-index" + } + }, + "save-boundary-cmd": { + "args": ["command", "key-name", "stream"] + }, + "load-boundary-from-template": { + "args": ["template"], + "vars": { + "s5-0": "point-data", + "a2-0": "vertex-count", + "v0-0": "boundary", + "v1-5": "i", + "a0-6": "vertex", + "v1-7": "command", + "a0-9": "command-template", + "v1-8": "command", + "a0-13": "command-template" + } + }, + "---lb-save": { + "vars": { + "gp-0": "stream", + "s5-0": "boundary", + "s4-0": "i" + } + }, + "lb-add": { + "vars": { + "gp-0": "boundary", + "v1-1": "camera-position" + } + }, + "lb-add-plane": { + "vars": { + "gp-0": "boundary", + "v1-1": "camera-position" + } + }, + "lb-add-load": { + "args": ["level0", "level1"], + "vars": { + "v1-0": "boundary" + } + }, + "lb-add-load-plane": { + "args": ["level0", "level1"], + "vars": { + "v1-0": "boundary" + } + }, + "lb-flip": { + "vars": { + "gp-0": "boundary", + "s5-0": "temp-command" + } + }, + "lb-set-camera": { + "vars": { + "v1-1": "boundary" + } + }, + "lb-set-player": { + "vars": { + "v1-1": "boundary" + } + }, + "lb-copy": { + "vars": { + "s5-0": "source", + "gp-0": "copy", + "v1-4": "i" + } + }, + "render-boundaries": { + "vars": { + "gp-2": "boundary" + } + }, + "find-bounding-circle": { + "args": ["boundary"], + "vars": { + "f1-0": "min-x", + "f3-0": "max-x", + "f0-0": "min-z", + "f2-0": "max-z", + "v1-0": "i", + "f3-2": "center-x", + "f2-2": "center-z", + "f1-1": "half-width", + "f0-1": "half-depth", + "f0-4": "radius" + } + }, + "triangulate-boundary": { + "args": ["boundary"], + "vars": { + "s5-0": "work", + "s4-0": "vertex-count", + "v1-7": "i", + "a0-4": "vertex-bits", + "a1-11": "lowest-index", + "f0-0": "lowest-z", + "v1-10": "i", + "v1-14": "lowest", + "a2-0": "previous", + "a0-36": "next", + "f0-2": "prev-dx", + "f1-5": "prev-dz", + "f2-3": "next-dx", + "v1-16": "i", + "a0-39": "old-prev", + "s3-0": "chain-prev", + "a0-40": "prev-index", + "v1-23": "next-index", + "a2-6": "walk-count", + "s2-0": "chain-next", + "s1-0": "saved-prev", + "s0-0": "saved-next", + "v1-37": "i" + } + }, + "try-corner": { + "args": ["boundary", "corner-index"], + "vars": { + "v1-0": "work", + "a0-3": "prev-index", + "a1-3": "next-index", + "f0-1": "diagonal-dx", + "f1-2": "diagonal-dz", + "a2-10": "test-index", + "f2-2": "test-dx", + "f3-2": "test-dz" + } + }, + "split-monotone-polygon": { + "args": ["boundary", "start-index"], + "vars": { + "s5-0": "work", + "v1-10": "triangle-index", + "s3-0": "corner-index", + "a0-13": "triangle-index", + "v1-25": "next-index" + } + }, + "fix-boundary-normals": { + "args": ["boundary"], + "vars": { + "s5-0": "i", + "a1-0": "v0", + "a2-0": "v1", + "a3-0": "v2", + "s4-0": "normal", + "v1-22": "temp-index" + } + }, + "point-in-polygon": { + "args": ["boundary", "point"], + "vars": { + "v1-0": "i", + "a2-5": "v0", + "t0-0": "v1", + "a3-10": "v2", + "f0-1": "edge20-dx", + "f1-2": "edge20-dz", + "f2-2": "point1-dx", + "f3-2": "point1-dz", + "f0-5": "point1-dx", + "f1-7": "point1-dz", + "f2-5": "edge10-dx", + "f3-5": "edge10-dz", + "f0-9": "point2-dx", + "f1-12": "point2-dz", + "f2-8": "edge20-dx", + "f3-8": "edge20-dz" + } + }, + "check-closed-boundary": { + "args": ["boundary", "current-pos", "previous-pos"], + "vars": { + "f0-6": "plane-scale", + "a1-1": "crossing-point" + } + }, + "check-open-boundary": { + "args": ["boundary", "current-pos", "previous-pos"], + "vars": { + "f0-0": "move-start-x", + "f1-0": "move-start-z", + "f2-0": "move-end-x", + "f3-0": "move-end-z", + "f6-0": "edge-start-x", + "f7-0": "edge-start-z", + "a3-0": "edge-index", + "v1-0": "net-crossings", + "f4-0": "move-dx", + "f5-0": "move-dz", + "f8-0": "edge-end-x", + "f9-0": "edge-end-z", + "f10-2": "move-numerator", + "f11-4": "edge-numerator", + "f12-5": "denominator", + "f10-3": "move-t", + "f11-5": "edge-t", + "f10-5": "crossing-y", + "f6-3": "side" + } + }, + "command-get-int": { + "args": ["value", "default"] + }, + "command-get-float": { + "args": ["value", "default"] + }, + "command-get-time": { + "args": ["value", "default"] + }, + "command-get-param": { + "args": ["value", "default"], + "vars": { + "s4-0": "result-vector" + } + }, + "command-get-quoted-param": { + "args": ["value", "default"] + }, + "load-state-want-levels": { + "args": ["level0", "level1"] + }, + "load-state-want-display-level": { + "args": ["level-name", "display-mode"] + }, + "load-state-want-vis": { + "args": ["vis-nick"] + }, + "load-state-want-force-vis": { + "args": ["level-name", "enabled?"] + }, + "command-list-get-process": { + "args": ["value"], + "vars": { + "v1-14": "named-process", + "s5-0": "child", + "s3-0": "child-process", + "s4-0": "drawable-child" + } + }, + "check-boundary": { + "args": ["boundary"], + "vars": { + "s5-0": "crossing", + "a1-0": "current-pos", + "a2-0": "previous-pos", + "f0-1": "dx", + "f1-2": "dz", + "s4-0": "command" + } + }, + "(method 9 load-state)": { + "args": ["this"], + "vars": { + "v1-1": "i" + } + }, + "(method 11 load-state)": { + "args": ["this", "level0", "level1"], + "vars": { + "v1-0": "i", + "v1-4": "slot", + "v1-10": "slot" + } + }, + "(method 12 load-state)": { + "args": ["this", "level-name", "display-mode"], + "vars": { + "v1-0": "i" + } + }, + "(method 13 load-state)": { + "args": ["this", "vis-nick"] + }, + "(method 14 load-state)": { + "args": ["this", "level-name", "enabled?"], + "vars": { + "v1-0": "i" + } + }, + "(method 15 load-state)": { + "args": ["this", "command"], + "vars": { + "v1-26": "saved-slot", + "v1-57": "saved-slot", + "s5-1": "destination", + "s4-5": "entity-name", + "gp-1": "target-entity", + "v1-25": "slot", + "a0-45": "entity-process", + "s3-4": "entity-name", + "s4-6": "target-entity", + "gp-2": "slot", + "s4-7": "entity-name", + "gp-3": "target-entity", + "v1-56": "slot", + "a0-70": "entity-name", + "s5-2": "target-entity", + "gp-4": "level-name", + "s5-4": "group-name", + "a0-81": "entity-name", + "gp-5": "target-entity", + "s4-9": "group", + "s5-5": "launch-group", + "s3-6": "entity-process", + "s4-10": "entity-drawable", + "s3-7": "tracker", + "t9-41": "activate", + "a0-86": "tracker", + "a1-40": "parent-pool", + "s5-7": "target-process", + "v1-95": "shadow-value", + "v1-99": "hour", + "v1-112": "i", + "s5-13": "target-process", + "s4-14": "message", + "gp-6": "params", + "s3-11": "event", + "a0-142": "param-list" + } + }, + "(method 16 load-state)": { + "args": ["this", "frame"], + "vars": { + "f0-0": "scheduled-frame", + "s4-0": "commands", + "a1-3": "command" + } + }, + "(method 17 load-state)": { + "args": ["this", "command-list"], + "vars": { + "s4-0": "i" + } + }, + "(method 18 load-state)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "a0-3": "tracked-entity" + } + }, + "(method 19 load-state)": { + "args": ["this"], + "vars": { + "v1-0": "i" + } + }, + "(method 20 load-state)": { + "args": ["this", "level-name", "enabled?"], + "vars": { + "v1-0": "i" + } + }, + "(method 0 load-boundary)": { + "args": ["allocation", "type-to-make", "vertex-count", "closed?", "add-to-list?"], + "vars": { + "v0-0": "boundary", + "v1-4": "i" + } + }, + "(method 10 palette-fade-controls)": { + "args": ["this", "index", "fade", "actor-distance", "trans"], + "vars": { + "v1-3": "control" + } + }, + "(method 9 palette-fade-controls)": { + "vars": { + "v1-0": "i", + "a1-2": "control" + } + }, + "set-target-light-index": { + "args": ["light-index"] + }, + "update-mood-itimes": { + "args": ["context"], + "vars": { + "v1-0": "slot0-raw", + "v1-1": "slot0-fixed", + "v1-2": "packed01", + "v1-3": "packed45", + "a1-0": "slot1-raw", + "a1-1": "slot1-fixed", + "a1-2": "packed23", + "a1-3": "packed67", + "a2-0": "slot2-raw", + "a2-1": "slot2-fixed", + "a3-0": "slot3-raw", + "a3-1": "slot3-fixed", + "t0-0": "slot4-raw", + "t0-1": "slot4-fixed", + "t1-0": "slot5-raw", + "t1-1": "slot5-fixed", + "t2-0": "slot6-raw", + "t2-1": "slot6-fixed", + "t3-0": "slot7-raw", + "t3-1": "slot7-fixed" + } + }, + "update-mood-prt-color": { + "args": ["context"], + "vars": { + "v1-0": "groups", + "s4-0": "ambient-color", + "s5-0": "directional-color", + "v0-1": "shadow-color" + } + }, + "update-mood-palette": { + "args": ["context", "hour", "level-index"], + "vars": { + "v1-0": "groups", + "s4-0": "groups", + "v1-3": "whole-hour", + "f0-7": "hour-fraction", + "f1-3": "inverse-hour-fraction", + "a0-2": "day", + "v1-7": "hour-entry", + "s3-0": "snapshot-a-index", + "s2-0": "snapshot-b-index", + "f30-0": "blend", + "v1-12": "snapshot", + "f0-14": "color-level", + "s0-0": "snapshot-a", + "s1-0": "snapshot-b", + "v1-29": "quantized-blend", + "f0-28": "color-level-a", + "f1-26": "color-level-b" + } + }, + "update-mood-sky-texture": { + "args": ["context", "hour"], + "vars": { + "v1-0": "i", + "v1-5": "whole-hour", + "f0-5": "hour-fraction", + "f1-3": "inverse-hour-fraction", + "a0-4": "day", + "v1-9": "hour-entry", + "s5-0": "snapshot-a-index", + "s4-0": "snapshot-b-index", + "f30-0": "blend", + "v0-0": "environment-color" + } + }, + "update-mood-fog": { + "args": ["context", "hour"], + "vars": { + "v1-2": "whole-hour", + "f0-4": "hour-fraction", + "f1-3": "inverse-hour-fraction", + "a1-2": "day", + "a2-1": "hour-entry", + "a1-5": "snapshot-a-index", + "v1-6": "snapshot-b-index", + "f30-0": "blend", + "gp-0": "current-fog", + "s5-0": "snapshot-a", + "s4-0": "snapshot-b" + } + }, + "update-mood-quick": { + "args": ["context", "fog-index", "sky-index", "light-index", "level-index"], + "vars": { + "v1-0": "groups", + "a1-11": "snapshot", + "f0-3": "color-level" + } + }, + "update-mood-interp": { + "args": ["result", "context-a", "context-b", "blend"], + "vars": { + "s2-0": "i", + "s1-0": "result-light", + "s0-0": "light-a", + "sv-16": "light-b" + } + }, + "update-mood-flames": { + "args": ["context", "first-slot", "slot-count", "state-offset", "base-weight", "amplitude", "duration-scale"], + "vars": { + "s5-0": ["effect-state", "flames-state"], + "s4-0": "active-slot", + "a0-1": "time", + "v1-2": "length", + "s0-0": "height", + "a3-1": "i", + "f0-13": "envelope" + } + }, + "update-mood-lightning": { + "args": ["context", "first-sky-slot", "sky-count", "state-offset", "first-light-slot", "strength", "distant?"], + "vars": { + "a3-2": "flash", + "s4-0": "effect-state", + "a1-1": "sky-slot", + "v1-3": "light-slot", + "a3-1": "flash-index", + "a2-2": "flash-frame", + "f0-1": "brightness", + "a1-11": "snapshot", + "v1-6": "directional", + "f1-4": "color-level", + "v1-24": "thunder-index", + "gp-3": "rpc-command", + "a1-23": "sound-position", + "s5-3": "drawable-process", + "gp-4": "rpc-command", + "a1-25": "sound-position", + "s5-4": "drawable-process", + "gp-5": "rpc-command", + "a1-27": "sound-position", + "s5-5": "drawable-process" + } + }, + "update-mood-light": { + "args": [ + "context", + "slot", + "fade-state-offset", + "phase-state-offset", + "base-weight", + "amplitude", + "hour", + "phase-offset" + ], + "vars": { + "gp-0": "fade-state", + "f0-1": "phase", + "f0-4": "weight", + "f30-1": "fade" } }, "update-mood-lava": { + "args": ["context", "first-slot", "state-offset", "update-slots?"], "vars": { - "s4-0": ["s4-0", "lava-state"] + "s4-0": ["effect-state", "lava-state"], + "s1-0": "time", + "s2-0": "last-index", + "s0-0": "down-light", + "f0-4": "light-level", + "s0-1": "slot-index", + "f30-2": "blend", + "v1-14": "previous-index", + "f1-11": "scale", + "f0-11": "previous-scale" } }, - "update-mood-snow": { + "update-mood-caustics": { + "args": ["context", "first-slot", "state-offset"], "vars": { - "s5-1": ["s5-1", "snow-states"] + "a2-1": "effect-state", + "v1-2": "slot-index", + "f0-1": "blend", + "a2-4": "previous-index" + } + }, + "update-mood-default": { + "args": ["context", "hour", "level-index"] + }, + "update-mood-misty": { + "args": ["context", "hour", "level-index"], + "vars": { + "s4-1": "warehouse-control", + "s3-0": "target-position", + "a1-5": "warehouse-position", + "f30-0": "warehouse-distance", + "s5-1": "reminder", + "s5-2": "secondary-group" + } + }, + "update-mood-village2": { + "args": ["context", "hour", "level-index"], + "vars": { + "a0-7": "group", + "s5-1": "group", + "s5-2": "group", + "s5-3": "group", + "s5-4": "group", + "s5-5": "local-group", + "s4-1": "direction", + "s3-0": "target-position", + "f30-0": "distance", + "f2-3": "fade", + "f0-26": "distance", + "a2-10": "fire-color", + "f0-27": "normalized-distance", + "f0-31": "fire-level", + "s5-6": "landmark-position", + "s4-2": "target-position", + "f0-37": "distance", + "f30-1": "fade", + "f0-46": "distance", + "f30-2": "fade" + } + }, + "update-mood-swamp": { + "args": ["context", "hour", "level-index"], + "vars": { + "f30-0": "upward-view", + "a2-4": "bright-fog-color", + "f0-7": "fog-alpha", + "f1-1": "full-alpha" + } + }, + "update-mood-village1": { + "args": ["context", "hour", "level-index"], + "vars": { + "s5-1": "landmark-position", + "s4-1": "target-position", + "f0-5": "distance", + "f30-0": "fade", + "f0-14": "distance", + "f30-1": "fade", + "f0-23": "distance", + "f30-2": "fade", + "f0-32": "distance", + "f30-3": "fade", + "f0-41": "distance", + "f30-4": "fade", + "f0-50": "distance", + "f30-5": "fade", + "f0-58": "distance", + "f30-6": "fade" + } + }, + "update-mood-jungle": { + "args": ["context", "hour", "level-index"] + }, + "update-mood-jungleb-blue": { + "args": ["context", "hour", "level-index"], + "vars": { + "v1-3": "fog-snapshot", + "v1-8": "sun-snapshot", + "v1-12": "light-snapshot" + } + }, + "update-mood-jungleb": { + "args": ["context", "hour", "level-index"], + "vars": { + "v1-3": "egg-top-reminder", + "s3-0": "blue-transition-time", + "v1-15": "fog-snapshot", + "v1-20": "sun-snapshot", + "v1-24": "light-snapshot", + "s5-1": "group", + "s5-2": "group", + "v1-34": "down-light", + "s4-1": "jungle-group", + "s3-1": "group", + "s5-3": "ambient-offset", + "v1-38": "down-light", + "s5-4": "landmark-position", + "s4-2": "target-position", + "f0-70": "distance", + "f0-72": "horizontal-fade", + "a2-8": "bright-ambient", + "v1-45": "groups", + "a0-19": "jungle-groups", + "f2-3": "height-fade", + "f1-6": "height-level", + "f0-76": "fire-level", + "a1-13": "down-light", + "a1-15": "down-light", + "f0-86": "distance", + "f30-0": "fade", + "f0-94": "distance", + "f30-1": "fade" + } + }, + "update-mood-sunken": { + "args": ["context", "hour", "level-index"], + "vars": { + "f30-0": "palette-blend", + "f28-0": "depth-blend", + "s5-1": "groups", + "a1-6": "dir1-shallow", + "a2-4": "dir1-deep", + "s4-1": "dir0-shallow", + "s3-0": "dir0-deep", + "v1-8": "primary-group", + "v1-9": "dir1", + "a1-8": "ambient-a-shallow", + "a2-6": "ambient-a-deep", + "s4-2": "ambient-b-shallow", + "s3-1": "ambient-b-deep", + "s1-0": "ambient-a", + "s2-0": "ambient-b", + "s2-1": "dir2-a-shallow", + "s1-1": "dir2-a-deep", + "s0-0": "dir2-b-shallow", + "sv-80": "dir2-b-deep", + "s3-2": "dir2-a", + "s4-3": "dir2-b", + "f26-3": "caustic-level", + "v1-18": "dir2" + } + }, + "update-mood-rolling": { + "args": ["context", "hour", "level-index"], + "vars": { + "a0-10": "group", + "s5-1": "i", + "s4-1": "group", + "s5-2": "combined-group", + "s5-3": "target-position", + "s4-2": "i", + "f0-7": "distance", + "f30-0": "fade", + "f0-11": "distance", + "f30-1": "fade", + "s4-3": "i", + "f0-15": "distance", + "f30-2": "fade", + "s4-4": "i", + "f0-19": "distance", + "f30-3": "fade", + "s4-5": "i", + "f0-23": "distance", + "f30-4": "fade", + "f0-27": "distance", + "f30-5": "fade" + } + }, + "update-mood-firecanyon": { + "args": ["context", "hour", "level-index"] + }, + "update-mood-training": { + "args": ["context", "hour", "level-index"] + }, + "update-mood-maincave": { + "args": ["context", "hour", "level-index"], + "vars": { + "a0-4": "landmark-position", + "a1-3": "camera-position", + "f0-8": "distance", + "f1-2": "weight" + } + }, + "update-mood-darkcave": { + "args": ["context", "hour", "level-index"], + "vars": { + "f30-0": "strongest-light", + "s4-0": "light-direction", + "s3-0": "offset", + "s2-0": "i", + "s1-0": "last-index", + "f28-0": "control-fade", + "f3-0": "distance", + "f28-1": "local-strength", + "f0-14": "ambient-blend", + "a2-1": "warm-ambient", + "a1-8": "base-ambient", + "v1-21": "shadow-direction", + "f0-23": "horizontal-scale" + } + }, + "update-mood-robocave": { + "args": ["context", "hour", "level-index"] + }, + "update-mood-snow": { + "args": ["context", "hour", "level-index"], + "vars": { + "s5-1": ["mood-state", "snow-states"], + "v1-3": "egg-top-reminder", + "s4-1": "transition-time", + "f30-0": "weather-blend", + "f0-4": "next-weather-blend" } }, "update-mood-village3": { + "args": ["context", "hour", "level-index"], "vars": { - "s0-2": ["s0-2", "village3-states"] + "s0-2": ["mood-state", "village3-states"], + "s3-0": "dark-light-color", + "s2-0": "local-light-color", + "s4-0": "dark-ambient-color", + "s5-1": "up-direction", + "v1-3": "snapshot", + "v1-9": "snapshot", + "v1-15": "snapshot", + "v1-21": "snapshot", + "s0-0": "group", + "s0-1": "group", + "v1-28": "lava-center", + "a0-8": "target-offset", + "f0-54": "distance", + "f1-18": "fade-distance", + "a1-9": "warm-color", + "a2-8": "dim-color", + "f30-0": "distance-fade", + "s1-1": "lava-light", + "f1-21": "lava-level", + "f0-66": "lava-color-level", + "f30-1": "lava-blend", + "s1-2": "landmark-position", + "a1-12": "target-position", + "f0-83": "distance", + "f30-2": "fade", + "f1-33": "height-fade", + "f30-3": "height-blend", + "v1-49": "lava-light" } }, + "update-mood-lavatube": { + "args": ["context", "hour", "level-index"] + }, "update-mood-ogre": { + "args": ["context", "hour", "level-index"], "vars": { - "s4-1": ["s4-1", "ogre-states"] + "s4-1": ["mood-state", "ogre-states"], + "s4-0": "landmark-position", + "s3-0": "camera-position", + "f30-0": "distance", + "f1-2": "distance-fade", + "f30-1": "phase-blend", + "f28-1": "lava-fade", + "s5-1": "lava-light", + "f1-6": "lava-level", + "f0-17": "lava-color-level", + "s5-2": "groups", + "s4-2": "phase-groups", + "f30-2": "distance", + "f1-13": "distance-fade", + "f30-3": "phase-blend", + "s5-3": "groups", + "s4-3": "phase-groups" } }, "update-mood-finalboss": { + "args": ["context", "hour", "level-index"], "vars": { - "s4-0": ["s4-0", "finalboss-states"] + "s4-0": ["mood-state", "finalboss-states"], + "v1-18": "i", + "f30-0": "palette-fade", + "s3-1": "groups", + "s2-0": "snapshot", + "a0-17": "arena-position", + "a1-10": "camera-position", + "f0-9": "distance", + "f2-1": "distance-fade", + "f0-12": "arena-light-level", + "v1-32": "arena-light", + "f1-14": "secret-light-time", + "f0-15": "secret-light-fade", + "a0-21": "groups", + "v1-43": "secret-light", + "v1-45": "shadow-direction", + "a0-22": "secret-light", + "f0-24": "horizontal-scale", + "f1-36": "sun-time", + "f1-38": "sun-fade", + "f0-32": "sun-fade", + "v1-56": "i", + "f1-42": "dawn-weight", + "f3-1": "current-weight", + "f1-45": "dawn-sky-weight", + "f3-3": "current-sky-weight", + "v1-72": "i", + "f30-1": "palette-fade", + "s5-1": "groups", + "s4-1": "snapshot", + "a0-57": "arena-position", + "a1-19": "camera-position", + "f0-42": "distance", + "f2-14": "distance-fade", + "v1-81": "groups", + "f0-45": "arena-light-level", + "a0-58": "arena-light" + } + }, + "update-mood-citadel": { + "args": ["context", "hour", "level-index"], + "vars": { + "s5-1": "state-data", + "f30-1": "light-flicker", + "s3-0": "light-color", + "a2-4": "warm-light-color", + "s4-0": "groups", + "v1-25": "primary-group", + "s4-1": "landmark-position", + "a1-9": "target-position", + "f0-32": "distance", + "f1-2": "distance-fade", + "f2-2": "fog-fade", + "a0-13": "shield-position", + "a1-10": "camera-position", + "f0-41": "distance", + "s4-2": "groups", + "f2-5": "distance-fade", + "f30-2": "shield-proximity", + "f28-4": "shield-flicker", + "s3-1": "shield-color", + "s2-0": "bright-shield-color", + "f30-3": "shield-fade", + "v1-49": "shield-light", + "v1-52": "shield-light", + "s5-2": "landmark-position", + "a1-13": "target-position", + "f0-98": "distance", + "s5-3": "groups", + "f1-19": "distance-fade", + "a1-14": "neutral-color", + "f0-101": "fade" } }, "(method 11 med-res-level)": { + "args": ["this", "source-entity"], "vars": { - "s4-0": ["s4-0", "(pointer sparticle-launch-group)"] + "sv-16": "art-name-tag", + "s3-0": "art-name-slot", + "s2-0": "art-name", + "s4-0": ["part-group-slot", "(pointer sparticle-launch-group)"], + "a0-7": "part-group-name", + "a0-8": "part-group", + "s4-1": "level-name", + "s3-1": "model-index" } }, "render-ocean-far": { + "args": ["dma-buf", "facing"], "vars": { - "s5-0": ["vertices", "(inline-array ocean-vertex)"] + "s5-0": ["vertices", "(inline-array ocean-vertex)"], + "s1-0": "x-cells", + "s3-0": "z-cells", + "f24-0": "start-x", + "f30-0": "surface-y", + "f22-0": "start-z", + "f28-0": "end-z", + "f26-0": "end-x", + "s2-0": "drawn?", + "sv-16": "zmin-edge-z", + "sv-32": "zmin-phase", + "sv-48": "zmin-x-cell", + "sv-64": "zmax-horizon-z", + "sv-80": "zmax-phase", + "sv-96": "zmax-x-cell", + "sv-112": "xmin-edge-x", + "sv-128": "xmin-phase", + "sv-144": "xmax-horizon-x", + "sv-160": "xmax-phase", + "f20-0": "zmin-horizon-z", + "s0-0": "any-drawn?", + "f0-23": "x0", + "f1-7": "x1", + "v1-19": "vert0", + "v1-20": "vert1", + "v1-21": "vert2", + "v1-22": "vert3", + "f20-1": "zmax-edge-z", + "s0-1": "any-drawn?", + "f0-30": "x0", + "f1-14": "x1", + "v1-43": "vert0", + "v1-44": "vert1", + "v1-45": "vert2", + "v1-46": "vert3", + "f20-2": "xmin-horizon-x", + "s1-1": "any-drawn?", + "s0-2": "z-cell", + "f1-19": "z0", + "f0-53": "z1", + "v1-66": "vert0", + "v1-67": "vert1", + "v1-68": "vert2", + "v1-69": "vert3", + "f20-3": "xmax-edge-x", + "s1-2": "any-drawn?", + "s0-3": "z-cell", + "f1-25": "z0", + "f0-60": "z1", + "v1-83": "vert0", + "v1-84": "vert1", + "v1-85": "vert2", + "v1-86": "vert3", + "f0-79": "horizon-x", + "f3-0": "horizon-z", + "f2-10": "edge-x", + "f1-30": "edge-z", + "v1-105": "vert0", + "v1-106": "vert1", + "v1-107": "vert2", + "v1-108": "vert3", + "f0-81": "edge-x", + "f2-12": "horizon-z", + "f1-33": "horizon-x", + "v1-114": "vert0", + "v1-115": "vert1", + "v1-116": "vert2", + "v1-117": "vert3", + "f0-84": "horizon-x", + "f2-14": "edge-z", + "f1-36": "horizon-z", + "v1-123": "vert0", + "v1-124": "vert1", + "v1-125": "vert2", + "v1-126": "vert3", + "f0-86": "edge-x", + "f1-37": "edge-z", + "f2-18": "horizon-x", + "f3-5": "horizon-z", + "v1-131": "vert0", + "v1-132": "vert1", + "v1-133": "vert2", + "v1-134": "vert3" } }, "(method 12 touching-list)": { "vars": { "gp-0": ["entry", "touching-shapes-entry"], "s5-0": "i", - "s4-0": "c1", - "s3-0": "c2" + "s4-0": "shape-a", + "s3-0": "shape-b", + "v1-2": "swap-shape", + "v1-4": "shape-a-self-event", + "v1-5": "shape-a-other-event", + "v1-6": "shape-b-self-event", + "v1-7": "shape-b-other-event" } }, "(code ogreboss-stage1)": { @@ -3959,6 +14956,7 @@ }, "aaaaaaaaaaaaaaaaaaaaaaa": {}, "debug-menu-context-render": { + "args": ["context"], "vars": { "s4-0": "x-pos", "s5-0": "stack-idx", @@ -3973,11 +14971,70 @@ "vars": { "gp-0": "tables", "s3-0": "entry-index", - "s5-0": "ientry-index", - "s4-0": "iterations", - "f28-0": "cam-aspx", - "f30-0": "cam-aspy", - "s2-0": "i" + "s5-0": "turn-table-index", + "s4-0": "turns", + "f28-0": "aspect-x", + "f30-0": "aspect-y", + "s2-0": "i", + "f26-0": "angle", + "s3-1": "next-entry-index", + "v1-17": "closing-offset-index" + } + }, + "sprite-init-distorter": { + "args": ["dma-buff", "frame-base-pointer"] + }, + "sprite-draw-distorters": { + "args": ["dma-buff"], + "vars": { + "sv-16": ["warp-sprite", "sprite-vec-data-2d"], + "sv-32": "center-st", + "sv-48": "warp-params", + "s0-0": "upload-tag", + "s4-0": "chunk-count", + "s5-0": "uploaded-count", + "s3-0": ["aux-list", "sprite-aux-list"], + "s2-0": "aux-count", + "s1-0": "i", + "a0-1": "packed-sprite", + "v1-25": "clip-flags", + "f0-7": "projection-y", + "f2-4": "center-t", + "f4-0": "bottom-t", + "f3-0": "visible-scale", + "f1-7": "warp-scale", + "v1-55": "scale-ratio", + "v1-62": "chunk-end", + "v1-74": "chunk-end", + "v1-75": "total-count", + "a0-8": "packet-buffer", + "a1-3": ["upload-packet", "dma-packet"], + "v1-65": "count-buffer", + "a0-9": ["count-packet", "dma-packet"], + "v1-66": "data-buffer", + "a0-11": ["count-data", "vector4w"], + "v1-67": "run-buffer", + "a0-13": ["run-packet", "dma-packet"], + "a0-15": "packet-buffer", + "a1-10": ["upload-packet", "dma-packet"], + "a0-17": "count-buffer", + "a1-12": ["count-packet", "dma-packet"], + "a0-18": "data-buffer", + "a1-14": ["count-data", "vector4w"], + "v1-77": ["run-packet", "dma-packet"] + } + }, + "(method 0 rpc-buffer)": { + "args": ["allocation", "type-to-make", "elt-size", "elt-count"], + "vars": { + "a2-2": "allocation-size", + "v0-0": "this" + } + }, + "(method 0 rpc-buffer-pair)": { + "args": ["allocation", "type-to-make", "elt-size", "elt-count", "rpc-port"], + "vars": { + "s3-0": "this" } }, "(method 10 rpc-buffer-pair)": { @@ -3992,7 +15049,7 @@ } }, "(method 9 rpc-buffer-pair)": { - "args": ["obj", "fno", "recv-buff", "recv-size"], + "args": ["this", "function-number", "receive-buffer", "receive-size"], "vars": { "s2-0": "active-buffer", "s1-0": "current-buffer" @@ -4002,17 +15059,17908 @@ "vars": { "s5-0": "active-buffer" }, - "args": ["obj", "print-stall-warning"] + "args": ["this", "print-stall-warning"] }, "(method 13 rpc-buffer-pair)": { "vars": { "gp-0": "active-buffer" } }, - "target-collision-reaction": { + "(method 0 sky-parms)": { + "args": ["allocation", "type-to-make"], "vars": { - "sv-96": "moving-flags", - "sv-104": "react-flags" + "v0-0": "result" + } + }, + "(method 0 mood-context)": { + "args": ["allocation", "type-to-make"], + "vars": { + "v0-0": "result" + } + }, + "(method 0 joint-anim-frame)": { + "args": ["allocation", "type-to-make", "joint-count"], + "vars": { + "v1-1": "extra-transform-count" + } + }, + "(top-level-login sky-h)": { + "vars": { + "gp-0": "i", + "f30-0": "angle" + } + }, + "invalidate-cache-line": { + "args": ["address"] + }, + "light-slerp": { + "args": ["out", "a", "b", "alpha"], + "vars": { + "s3-0": "clamped-alpha", + "f0-2": "a-level", + "f1-2": "b-level" + } + }, + "light-group-slerp": { + "args": ["out", "a", "b", "alpha"], + "vars": { + "s2-0": "i" + } + }, + "light-group-process!": { + "args": ["lights", "group", "vector-a", "vector-b"] + }, + "vu-lights-default!": { + "args": ["lights"] + }, + "time-to-apex": { + "args": ["upward-velocity", "gravity-acceleration"] + }, + "time-to-ground": { + "args": ["upward-velocity", "gravity-strength", "height"], + "vars": { + "f0-0": "displacement", + "v0-0": "ticks" + } + }, + "pat-material->string": { + "args": ["pat"] + }, + "pat-mode->string": { + "args": ["pat"] + }, + "pat-event->string": { + "args": ["pat"] + }, + "(method 10 smush-control)": { + "vars": { + "f30-0": "time-since-start", + "f0-2": "current-period", + "f28-0": "time-since-period-start" + } + }, + "(method 11 smush-control)": { + "vars": { + "f30-0": "time-since-start", + "f0-2": "current-period", + "f0-4": "time-since-period-start" + } + }, + "(method 12 smush-control)": { + "args": ["this", "amplitude", "period-ticks", "duration-ticks", "amplitude-scale", "period-scale"] + }, + "joint-mod-world-look-at-handler": { + "args": ["node", "local-transform"] + }, + "joint-mod-rotate-handler": { + "args": ["node", "local-transform"] + }, + "joint-mod-joint-set-handler": { + "args": ["node", "local-transform"] + }, + "joint-mod-joint-set*-handler": { + "args": ["node", "local-transform"] + }, + "joint-mod-wheel-callback": { + "args": ["node", "local-transform"] + }, + "(method 0 joint-mod-wheel)": { + "args": ["allocation", "type-to-make", "process", "joint-index", "wheel-radius", "wheel-axis"] + }, + "joint-mod-set-local-callback": { + "args": ["node", "local-transform"] + }, + "(method 0 joint-mod-set-local)": { + "args": ["allocation", "type-to-make", "process", "joint-index", "set-translation", "set-rotation", "set-scale"] + }, + "joint-mod-set-world-callback": { + "args": ["node", "local-transform"] + }, + "(method 0 joint-mod-set-world)": { + "args": ["allocation", "type-to-make", "process", "joint-index", "enable"] + }, + "joint-mod-blend-local-callback": { + "args": ["node", "local-transform"] + }, + "(method 0 joint-mod-blend-local)": { + "args": ["allocation", "type-to-make", "process", "joint-index", "enable"] + }, + "joint-mod-spinner-callback": { + "args": ["node", "local-transform"] + }, + "(method 0 joint-mod-spinner)": { + "args": ["allocation", "type-to-make", "process", "joint-index", "spin-axis", "spin-rate"] + }, + "(method 5 collide-mesh)": { + "args": ["this"] + }, + "(method 8 collide-mesh)": { + "args": ["this", "usage", "flags"], + "vars": { + "v1-6": "mesh-allocation-bytes", + "v1-16": "vertex-buffer-bytes" + } + }, + "(method 9 collide-mesh)": { + "args": ["this", "draw-owner", "joint-index"], + "vars": { + "s5-0": "triangle-record", + "s4-0": "joint-transform", + "s3-0": "triangles-left", + "a2-1": "world-vertex-0", + "a3-0": "world-vertex-1", + "t0-0": "world-vertex-2", + "t1-0": "debug-color" + } + }, + "(method 12 collide-mesh)": { + "args": ["this", "cache-tris", "result", "query-sphere", "best-distance"] + }, + "(method 11 collide-mesh)": { + "args": ["this", "cache-tris", "result", "query-sphere", "best-distance"] + }, + "(method 14 collide-mesh)": { + "args": ["this", "xform", "output"] + }, + "(method 15 collide-mesh)": { + "args": ["this", "float-xform", "integer-xform", "output"] + }, + "(method 9 collide-mesh-cache)": { + "args": ["this", "byte-count"], + "vars": { + "v1-0": "biased-byte-count", + "a1-1": "used-size", + "v1-1": "quadword-count", + "a3-0": "cache-data", + "a2-0": "max-size", + "v1-2": "aligned-byte-count", + "a3-1": "result-address", + "t1-0": "request-room", + "t0-0": "current-id", + "a1-2": "next-used-size", + "a2-2": "next-id", + "v0-0": "return-address" + } + }, + "(method 13 collide-mesh)": { + "args": ["this", "cache-tris", "xform"], + "vars": { + "t0-2": "vertex-index-0", + "t0-0": "scratch-vertices", + "v1-0": "vertices-left", + "a3-0": "source-vertices", + "t0-1": "scratch-output", + "v1-1": "triangle-record", + "a2-1": "scratch-vertices", + "a0-1": "triangles-left", + "a1-1": "cache-tri", + "a3-1": "vertex-index-1", + "t0-3": "vertex-offset-0", + "t2-0": "vertex-index-2", + "t1-0": "vertex-offset-1", + "a3-2": "triangle-pat", + "t2-1": "vertex-offset-2", + "t0-4": "vertex-address-0", + "t1-1": "vertex-address-1", + "t2-2": "vertex-address-2", + "t1-2": "next-index-0", + "t2-3": "next-index-1", + "t0-5": "next-index-2", + "t1-3": "next-offset-0", + "t2-4": "next-offset-1", + "t3-0": "next-offset-2" + } + }, + "(method 10 collide-mesh)": { + "args": ["this", "cache-tris", "query-sphere"], + "vars": { + "s5-0": "test-work", + "s4-0": "cache-tri", + "s3-0": "triangles-left", + "v1-0": "sphere-min", + "a0-1": "sphere-max", + "a2-1": "tri-min", + "a1-1": "tri-max", + "a2-2": "min-outside-mask", + "a1-2": "max-outside-mask", + "a1-3": "outside-mask", + "a1-4": "packed-outside-mask", + "a1-5": "outside?", + "a1-7": ["distance-test", "uint"], + "v0-1": "overlaps?" + } + }, + "(method 10 collide-mesh-cache)": { + "args": ["this", "cache-id"] + }, + "(method 11 collide-mesh-cache)": { + "args": ["this"], + "vars": { + "v1": "current-id", + "v0": "next-id" + } + }, + "(method 9 collide-sticky-rider)": { + "args": ["this", "rider"] + }, + "(method 0 collide-sticky-rider-group)": { + "args": ["allocation", "type-to-make", "rider-count"], + "vars": { + "v0-0": "this" + } + }, + "(method 0 collide-shape-prim)": { + "vars": { + "v0-0": "this" + } + }, + "(method 0 collide-shape-prim-group)": { + "args": ["allocation", "type-to-make", "cshape", "element-count", "prim-id"] + }, + "(method 9 collide-history)": { + "args": ["this", "shape", "intersect", "incoming-velocity", "outgoing-velocity"] + }, + "(method 42 collide-shape)": { + "args": ["this", "other-shape", "overlap-result"], + "vars": { + "a0-1": "our-root", + "a1-1": "their-root", + "a2-1": "their-action", + "a2-2": "their-edgegrab", + "a3-0": "our-with", + "a3-2": "their-solid", + "t0-0": "their-as", + "f0-1": "zero-distance", + "v0-1": "result", + "v1-0": "result-data", + "v1-2": "our-action", + "v1-3": "our-solid", + "v1-4": "spheres-apart" + } + }, + "(method 23 collide-shape-prim)": { + "args": ["this", "other-prim", "overlap-result"] + }, + "(method 23 collide-shape-prim-group)": { + "args": ["this", "other-prim", "overlap-result"], + "vars": { + "a0-1": "child-prim", + "a1-1": "child-action", + "a1-2": "child-solid", + "a1-3": "spheres-apart", + "a2-1": "child-with", + "a2-2": "with-as-overlap", + "f0-0": "zero-distance", + "s3-0": "prims-left", + "s4-0": "prim-list", + "v1-0": "their-as" + } + }, + "(method 24 collide-shape-prim)": { + "args": ["this", "other-group", "overlap-result"], + "vars": { + "a0-1": "child-action", + "a0-2": "child-solid", + "a0-3": "spheres-apart", + "a1-1": "child-prim", + "a2-1": "child-as", + "a2-2": "with-as-overlap", + "f0-0": "zero-distance", + "s3-0": "prims-left", + "s4-0": "prim-list", + "v1-0": "our-with" + } + }, + "(method 23 collide-shape-prim-mesh)": { + "args": ["this", "other-prim", "overlap-result"], + "vars": { + "f0-1": "overlap-dist", + "s2-0": "mesh-cache", + "s2-1": "tri-result", + "s3-0": "mesh", + "v1-0": "other-prim-type", + "v1-4": "cache-id", + "v1-8": "cache-tris" + } + }, + "(method 23 collide-shape-prim-sphere)": { + "args": ["this", "other-prim", "overlap-result"], + "vars": { + "a2-4": "bitangent", + "a2-11": "bitangent2", + "f0-2": "overlap-dist", + "f1-0": "separation", + "f2-0": "previous-best", + "s2-0": "mesh-cache", + "s2-1": "tri-result", + "s3-0": "hit-point", + "s3-1": "mesh", + "s3-2": "hit-point2", + "s4-1": "hit-normal", + "s4-2": "hit-normal2", + "v1-0": "other-prim-type", + "v1-3": "separation-gpr", + "v1-4": "sphere-pat", + "v1-10": "tangent", + "v1-13": "cache-id", + "v1-17": "cache-tris", + "v1-37": "tangent2" + } + }, + "(method 18 collide-shape-prim)": { + "args": ["this", "isect", "cache-prim"] + }, + "(method 18 collide-shape-prim-sphere)": { + "args": ["this", "isect", "cache-prim"], + "vars": { + "a0-2": "cache-offense", + "a0-3": "hit-pat", + "a1-2": "cache-prim-type", + "a1-3": "our-action", + "a1-4": "action-overlap", + "a1-5": "solid-bits", + "a2-2": "hit-prim", + "a3-1": "mesh-prim-type", + "a3-2": "our-offense", + "f0-1": "hit-u", + "s5-0": "tri-result", + "t0-1": "cache-prim", + "t0-2": "cache-action", + "v1-3": "zero-offense", + "v1-4": "offense-difference" + } + }, + "(method 18 collide-shape-prim-mesh)": { + "args": ["this", "isect", "cache-prim"] + }, + "(method 18 collide-shape-prim-group)": { + "args": ["this", "isect", "cache-prim"], + "vars": { + "a0-1": "child-prim", + "s2-0": "i", + "s3-0": "cache-as" + } + }, + "(method 19 collide-shape-prim)": { + "args": ["this", "isect", "cache-prim"] + }, + "(method 19 collide-shape-prim-sphere)": { + "args": ["this", "isect", "cache-prim"], + "vars": { + "a0-2": "cache-offense", + "a1-2": "our-action", + "a1-3": "action-overlap", + "a1-4": "our-offense", + "a2-2": "cache-action", + "a2-3": "cache-prim", + "a3-1": "solid-bits", + "a3-2": "hit-pat", + "f0-1": "hit-u", + "s5-0": "tri-result", + "v1-3": "zero-offense", + "v1-4": "offense-difference" + } + }, + "(method 19 collide-shape-prim-mesh)": { + "args": ["this", "isect", "cache-prim"] + }, + "(method 19 collide-shape-prim-group)": { + "args": ["this", "isect", "cache-prim"], + "vars": { + "a0-1": "child-prim", + "s2-0": "i", + "s3-0": "cache-as" + } + }, + "find-ground-point": { + "args": ["target-ctrl", "ground-result", "start-length", "max-length"], + "vars": { + "a1-1": "bbox", + "f24-0": "current-length", + "f26-0": "max-length-this-direction", + "f28-0": "probe-heading", + "f30-1": "current-heading", + "s0-0": "result-tri", + "s1-0": "probe-direction", + "s2-0": "current-position", + "sv-176": "direction-index", + "sv-192": "hit-count", + "v1-1": "axis-index" + } + }, + "target-attack-up": { + "args": ["tgt", "event-type", "attack-mode"], + "vars": { + "f30-1": "jump-distance", + "s2-1": "jump-direction", + "s4-0": "safe-ground" + } + }, + "(method 56 collide-shape-moving)": { + "args": ["this", "pat"] + }, + "default-collision-reaction": { + "args": ["cshape", "isect", "vel-out", "vel-in"], + "vars": { + "a1-1": "move-amount", + "f0-22": "lateral-speed", + "f1-4": "lateral-speed-copy", + "f28-0": "gravity-speed", + "f30-0": "remaining-impact-fraction", + "s3-1": "lateral-velocity", + "sv-64": "center-direction", + "sv-68": "surface-normal", + "sv-72": "adjusted-input-velocity", + "sv-80": ["status-mask", "collide-status"], + "sv-128": "wall?" + } + }, + "simple-collision-reaction": { + "args": ["cshape", "isect", "vel-out", "vel-in"], + "vars": { + "a1-1": "move-amount", + "f0-2": "normal-speed", + "s5-0": ["status-mask", "collide-status"], + "v0-1": "new-status", + "v1-6": "bounce-vector" + } + }, + "(method 37 collide-shape)": { + "args": ["this", "velocity"], + "vars": { + "a0-12": "shape-to-move", + "at-0": "seconds-per-frame-bits", + "f0-0": "seconds-per-frame", + "t9-0": "move-function", + "t9-1": "move-function", + "v1-1": "move-amount" + } + }, + "(method 37 collide-shape-moving)": { + "args": ["this", "velocity"], + "vars": { + "f28-0": "fraction-used", + "f30-0": "fraction-remaining", + "s4-0": "iteration" + } + }, + "(method 37 control-info)": { + "args": ["this", "velocity"], + "vars": { + "a1-6": "total-draw-offset", + "f0-4": "gravity-speed-before", + "f0-5": "lateral-length-before", + "f0-8": "gravity-speed-after", + "f0-9": "lateral-length-after", + "f0-32": "align-xz-speed", + "f1-2": "lateral-length-before-copy", + "f1-4": "lateral-length-after-copy", + "f2-0": "gravity-weight-before", + "f2-1": "gravity-weight-after", + "f30-1": "before-after-dot", + "s0-0": "lateral-before", + "s0-1": "lateral-after", + "s1-0": "before-direction", + "s2-1": "after-direction", + "s3-1": "velocity-with-anim-offset", + "s4-1": "saved-input-velocity", + "s5-1": "align-xz-direction", + "t9-7": "parent-integrate" + } + }, + "(method 61 collide-shape-moving)": { + "args": ["this", "ground-point", "velocity", "ground-normal"] + }, + "(method 57 collide-shape-moving)": { + "args": ["this", "velocity"], + "vars": { + "a0-12": "shape-to-move", + "a1-1": "move-amount", + "at-0": "seconds-per-frame-bits", + "f0-2": "seconds-per-frame", + "t9-1": "move-function" + } + }, + "(method 58 collide-shape-moving)": { + "args": ["this", "velocity"], + "vars": { + "a1-1": "overlap-params" + } + }, + "(method 64 collide-shape-moving)": { + "args": ["this", "triangle", "position"], + "vars": { + "v1-4": "triangle-normal" + } + }, + "(method 59 collide-shape-moving)": { + "args": ["this", "velocity", "ground-kind", "probe-y-offset", "revert-when-blocked?", "hover-without-ground?", "use-misty-ground?"], + "vars": { + "a1-7": "overlap-params", + "a2-3": "probe-direction", + "f0-4": "probe-u", + "s0-0": "probe-position", + "s1-0": "use-misty-ground?", + "s3-0": "hover-without-ground?", + "s5-0": "revert-when-blocked?", + "sv-128": "probe-start-height", + "sv-144": "ground-triangle" + } + }, + "(method 60 collide-shape-moving)": { + "args": ["this", "snap-up-height", "search-below", "warn-on-fail?", "ground-kind"], + "vars": { + "f0-4": "probe-u", + "f30-0": "probe-length", + "s3-0": "ground-triangle", + "s4-0": "probe-position" + } + }, + "(method 62 collide-shape-moving)": { + "args": ["this", "acceleration-out", "slopiness"], + "vars": { + "a2-1": "slope-normal", + "a2-2": "slide-acceleration", + "s4-0": "negative-gravity" + } + }, + "(method 33 collide-shape)": { + "args": ["this", "velocity", "kind"], + "vars": { + "a0-1": "move-amount", + "at-0": "seconds-per-frame-bits", + "f0-0": "seconds-per-frame", + "f0-2": "cache-radius", + "v1-0": "move-amount-pointer" + } + }, + "(method 32 collide-shape)": { + "args": ["this", "padding-distance", "kind"], + "vars": { + "s5-0": "bbox" + } + }, + "(method 36 collide-shape)": { + "args": ["this", "box", "padding-distance", "kind"], + "vars": { + "a0-1": "root-prim", + "v1-0": "padding-vector" + } + }, + "(method 20 collide-shape-prim)": { + "args": ["this", "kind"] + }, + "(method 20 collide-shape-prim-group)": { + "args": ["this", "kind"], + "vars": { + "a0-1": "child-prim", + "a0-2": "child-prim", + "s3-0": "i", + "s3-1": "i", + "s4-0": "prim-count", + "v0-1": "result", + "v1-0": "child-byte-offset", + "v1-10": "initial-min-marker", + "v1-11": "child-byte-offset", + "v1-19": "updated-max-marker" + } + }, + "(method 29 collide-shape-prim-group)": { + "args": ["this", "kind"], + "vars": { + "a0-1": "child-prim", + "s3-0": "i", + "s4-0": "prim-count", + "v1-0": "child-byte-offset", + "v1-8": "updated-max-marker" + } + }, + "(method 34 collide-shape)": { + "args": ["this", "id-to-find"] + }, + "(method 10 collide-shape-prim)": { + "args": ["this", "id-to-find"] + }, + "(method 10 collide-shape-prim-group)": { + "args": ["this", "id-to-find"], + "vars": { + "a0-1": "child-prim", + "a0-2": "found", + "s4-0": "i" + } + }, + "collide-shape-draw-debug-marks": { + "vars": { + "v1-4": "node", + "v1-19": "node", + "v1-34": "node", + "v1-49": "node", + "gp-1": "next-node", + "gp-2": "next-node", + "gp-3": "next-node", + "gp-4": "next-node", + "s5-1": "cshape", + "s5-2": "cshape", + "s5-3": "cshape", + "s5-4": "cshape" + } + }, + "(method 25 collide-shape-prim)": { + "args": ["this", "owner"], + "vars": { + "a0-1": "transform-index", + "a0-2": "world-sphere-result", + "a0-4": "world-sphere-result", + "a0-6": "world-sphere-result", + "a1-1": "nodes", + "s4-0": "i", + "v1-0": "shape", + "v1-4": "bone-transform" + } + }, + "(method 28 collide-shape)": { + "args": ["this", "offset"] + }, + "(method 9 collide-shape-prim)": { + "args": ["this", "offset"] + }, + "(method 9 collide-shape-prim-group)": { + "args": ["this", "offset"], + "vars": { + "a0-2": "child-prim", + "s4-0": "i" + } + }, + "(method 30 collide-shape)": { + "args": ["this", "destination"], + "vars": { + "v1-0": "offset" + } + }, + "(method 46 collide-shape)": { + "args": ["this", "prim"] + }, + "(method 27 collide-shape-prim)": { + "args": ["this", "kind"] + }, + "(method 27 collide-shape-prim-group)": { + "args": ["this", "kind"], + "vars": { + "s4-0": "i" + } + }, + "(method 26 collide-shape-prim)": { + "args": ["this", "kind"] + }, + "(method 26 collide-shape-prim-group)": { + "args": ["this", "kind"], + "vars": { + "s4-0": "i" + } + }, + "(method 51 collide-shape)": { + "args": ["this", "kind"] + }, + "(method 52 collide-shape)": { + "args": ["this", "kind"] + }, + "(method 28 collide-shape-prim-group)": { + "args": ["this", "prim"], + "vars": { + "v1-0": "prim-count" + } + }, + "(method 38 collide-shape)": { + "args": ["this"], + "vars": { + "a1-1": "mesh-group", + "s5-0": "failure-count", + "v1-1": "draw" + } + }, + "(method 21 collide-shape-prim)": { + "args": ["this", "mesh-group"], + "vars": { + "v0-0": "unreachable-result" + } + }, + "(method 21 collide-shape-prim-mesh)": { + "args": ["this", "mesh-group"], + "vars": { + "s4-0": "mesh-index" + } + }, + "(method 21 collide-shape-prim-group)": { + "args": ["this", "mesh-group"], + "vars": { + "gp-0": "failure-count", + "s3-0": "i" + } + }, + "(method 28 collide-shape-prim-mesh)": { + "args": ["this", "new-mesh-id"], + "vars": { + "a0-6": "cache-id", + "s4-0": "mesh-array", + "v0-5": "next-id", + "v1-3": "draw", + "v1-11": "mesh-cache" + } + }, + "(method 9 collide-shape-intersect)": { + "args": ["this", "direction"] + }, + "(method 45 collide-shape)": { + "args": ["this"], + "vars": { + "f0-3": "contact-y", + "f0-10": "contact-y", + "f0-17": "contact-y", + "f0-24": "contact-y", + "f1-2": "minimum-push-y", + "f1-5": "minimum-push-y", + "f1-8": "minimum-push-y", + "f1-11": "minimum-push-y", + "f2-0": "maximum-push-y", + "f2-1": "maximum-push-y", + "f2-2": "maximum-push-y", + "f2-3": "maximum-push-y", + "s0-0": "saved-status", + "s0-1": "saved-status", + "s0-2": "saved-status", + "s0-3": "saved-status", + "s1-0": "push-vector", + "s1-1": "push-vector", + "s1-2": "push-vector", + "s1-3": "push-vector", + "s2-0": "overlap-result", + "s2-1": "overlap-result", + "s2-2": "overlap-result", + "s2-3": "overlap-result", + "s3-0": "victim", + "s3-1": "victim", + "s3-2": "victim", + "s3-3": "victim", + "s5-0": "with-mask", + "at-0": "frames-per-second-bits", + "at-1": "frames-per-second-bits", + "at-2": "frames-per-second-bits", + "at-3": "frames-per-second-bits", + "v1-5": "node", + "v1-38": "node", + "v1-70": "node", + "v1-101": "node", + "s4-0": "next-node", + "s4-1": "next-node", + "s4-2": "next-node", + "s4-3": "next-node", + "s5-1": "iterations-left", + "s5-2": "iterations-left", + "s5-3": "iterations-left", + "s5-4": "iterations-left", + "a0-1": "current-cache-id", + "a0-2": "next-cache-id", + "v1-0": "mesh-cache", + "v1-19": "clamped-center", + "v1-52": "clamped-center", + "v1-84": "clamped-center", + "v1-115": "clamped-center", + "v1-20": "normal-side-bits", + "v1-53": "normal-side-bits", + "v1-85": "normal-side-bits", + "v1-116": "normal-side-bits", + "v1-23": "push-vector", + "v1-56": "push-vector", + "v1-88": "push-vector", + "v1-119": "push-vector", + "f0-6": "frames-per-second", + "f0-13": "frames-per-second", + "f0-20": "frames-per-second", + "f0-27": "frames-per-second" + } + }, + "(method 11 collide-shape-prim-group)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(method 40 collide-shape)": { + "args": ["this", "params"], + "vars": { + "a0-7": "other-shape", + "a0-22": "other-shape", + "a0-35": "other-shape", + "a0-48": "other-shape", + "a2-0": "other-root", + "a2-1": "other-root", + "a2-2": "other-root", + "a2-3": "other-root", + "a0-1": "current-cache-id", + "a0-2": "next-cache-id", + "a0-6": "node", + "a0-21": "node", + "a0-34": "node", + "a0-47": "node", + "s1-0": "next-node", + "s1-1": "next-node", + "s1-2": "next-node", + "s1-3": "next-node", + "a1-6": "our-process", + "a1-18": "our-process", + "a1-30": "our-process", + "a1-42": "our-process", + "a0-8": "other-process", + "a0-23": "other-process", + "a0-36": "other-process", + "a0-49": "other-process", + "a3-0": "sphere-separation-squared", + "a3-3": "sphere-separation-squared", + "a3-6": "sphere-separation-squared", + "a3-9": "sphere-separation-squared", + "a3-1": "options", + "a3-4": "options", + "a3-7": "options", + "a3-10": "options", + "f0-0": "zero-distance", + "f0-1": "zero-distance", + "f0-2": "zero-distance", + "f0-3": "zero-distance", + "a0-9": "root-overlap-option", + "a0-24": "root-overlap-option", + "a0-37": "root-overlap-option", + "a0-50": "root-overlap-option", + "a0-10": "touching-list", + "a0-25": "touching-list", + "a0-38": "touching-list", + "a0-51": "touching-list", + "v1-2": "direct-hit?", + "v1-7": "direct-hit?", + "v1-12": "direct-hit?", + "v1-17": "direct-hit?", + "s2-0": "hit?", + "s3-0": "found-any?", + "s4-0": "our-root", + "v1-0": "mesh-cache", + "v1-1": "with-mask" + } + }, + "(method 15 collide-shape-prim)": { + "args": ["this", "params", "other-prim"] + }, + "(method 15 collide-shape-prim-group)": { + "args": ["this", "params", "other-prim"], + "vars": { + "a0-1": "child-prim", + "a0-2": "child-hit?", + "a1-2": "with-as-overlap", + "f0-0": "zero-distance", + "a1-3": "spheres-apart", + "s2-0": "any-hit?", + "s3-0": "prims-left", + "s4-0": "prim-list", + "v1-0": "other-as" + } + }, + "(method 16 collide-shape-prim)": { + "args": ["this", "params", "other-group"], + "vars": { + "a0-2": "with-as-overlap", + "a0-3": "spheres-apart", + "a0-5": "child-hit?", + "a2-1": "child-prim", + "f0-0": "zero-distance", + "s2-0": "any-hit?", + "s3-0": "prims-left", + "s4-0": "prim-list", + "v1-0": "our-with" + } + }, + "(method 15 collide-shape-prim-sphere)": { + "args": ["this", "params", "other-prim"], + "vars": { + "a0-6": "touching-list", + "a0-7": "other-action", + "s2-0": "mesh-cache", + "s3-0": "mesh", + "v0-1": "result", + "v1-0": "other-prim-type", + "v1-4": "cache-id", + "v1-8": "cache-tris", + "v1-26": "our-action" + } + }, + "(method 15 collide-shape-prim-mesh)": { + "args": ["this", "params", "other-prim"], + "vars": { + "a0-7": "touching-list", + "a0-8": "other-action", + "s2-0": "mesh-cache", + "s3-0": "mesh", + "v0-1": "result", + "v1-0": "other-prim-type", + "v1-4": "cache-id", + "v1-8": "cache-tris", + "v1-26": "our-action" + } + }, + "(method 53 collide-shape)": { + "args": ["this", "prim-id-mask", "clear-kind", "set-kind"], + "vars": { + "a0-4": "i", + "a1-4": "child-prim", + "s3-0": "root-prim", + "v1-7": "group" + } + }, + "(method 54 collide-shape)": { + "args": ["this", "prim-id-mask", "offense"], + "vars": { + "a0-3": "i", + "a1-4": "child-prim", + "s4-0": "root-prim", + "v1-5": "group" + } + }, + "(method 55 collide-shape)": { + "args": ["this", "other-process", "touch-entry", "minimum-up-dot", "shove-up-velocity", "minimum-xz-velocity"], + "vars": { + "sv-144": "current-process", + "a1-8": "shove-event", + "s1-0": "touching-prims", + "s5-0": "shove-target", + "s0-1": "touched-prim", + "v1-8": "overlap-midpoint", + "v1-18": "shove-attack", + "s1-2": "shove-direction", + "s2-1": "shove-vector", + "f30-0": "xz-speed" + } + }, + "(method 41 collide-shape)": { + "args": ["this", "attack", "shove-up-amount"], + "vars": { + "f0-3": "distance-squared", + "f30-0": "best-distance-squared", + "s0-0": "i", + "s1-0": "path-point", + "s2-0": "point-count", + "s3-0": "attack-path", + "s4-0": "target-position", + "s5-0": "closest-point" + } + }, + "(method 39 collide-shape)": { + "args": ["this", "other-shape", "overlap-result"], + "vars": { + "f0-4": "root-separation", + "s4-0": "other-root", + "s5-0": "platform-root", + "v1-0": "result-data" + } + }, + "(method 22 collide-shape-prim)": { + "args": ["this", "other-prim", "overlap-result", "root-separation"] + }, + "(method 22 collide-shape-prim-group)": { + "args": ["this", "other-prim", "overlap-result", "root-separation"], + "vars": { + "f0-2": "separation", + "s1-0": "child-prim", + "s2-0": "i", + "s3-0": "other-as" + } + }, + "(method 22 collide-shape-prim-mesh)": { + "args": ["this", "other-prim", "overlap-result", "root-separation"], + "vars": { + "f0-2": "separation", + "f0-4": "separation", + "s1-0": "child-prim", + "s2-0": "i", + "s2-1": "mesh-cache", + "s2-2": "tri-result", + "s3-0": "platform-with", + "s3-1": "platform-mesh", + "v1-17": "cache-tris" + } + }, + "(method 9 collide-sticky-rider-group)": { + "args": ["this", "rider-process"], + "vars": { + "gp-0": "rider-entry", + "v1-6": "entry-data" + } + }, + "(method 35 collide-shape)": { + "args": ["this"], + "vars": { + "a0-1": "current-cache-id", + "a0-2": "next-cache-id", + "a0-11": "platform-prim", + "a0-30": "platform-prim", + "a0-49": "platform-prim", + "a0-68": "platform-prim", + "s0-0": "inverse-transform", + "s0-1": "inverse-transform", + "s0-2": "inverse-transform", + "s0-3": "inverse-transform", + "s1-0": "overlap-result", + "s1-1": "bone-transform", + "s1-2": "overlap-result", + "s1-3": "bone-transform", + "s1-4": "overlap-result", + "s1-5": "bone-transform", + "s1-6": "overlap-result", + "s1-7": "bone-transform", + "s2-0": "candidate-shape", + "s2-1": "candidate-shape", + "s2-2": "candidate-shape", + "s2-3": "candidate-shape", + "s3-0": "next-node", + "s3-1": "next-node", + "s3-2": "next-node", + "s3-3": "next-node", + "s4-0": "with-mask", + "s4-1": "rider-entry", + "s4-2": "rider-entry", + "s4-3": "rider-entry", + "s4-4": "rider-entry", + "s5-0": "rider-group", + "v1-0": "mesh-cache", + "v1-7": "node", + "v1-8": "candidate-root", + "v1-37": "node", + "v1-38": "candidate-root", + "v1-66": "node", + "v1-67": "candidate-root", + "v1-94": "node", + "v1-95": "candidate-root" + } + }, + "(method 44 collide-shape)": { + "args": ["this"], + "vars": { + "a0-1": "handle-value", + "a0-5": "sticky-prim", + "s1-0": "rider-destination", + "s2-0": "bone-transform", + "s3-0": "i", + "s4-0": "pull-info", + "s5-0": "rider-group", + "v1-2": "rider-entry" + } + }, + "(method 43 collide-shape)": { + "args": ["this", "pull-info"], + "vars": { + "at-0": "frames-per-second-bits", + "f0-2": "frames-per-second", + "f0-4": "angle-delta", + "gp-0": "rider-shape", + "s1-0": "saved-platform-collide-as", + "s2-1": "rider-velocity", + "s3-0": "move-delta", + "s3-1": "saved-status", + "s4-0": "old-position", + "v1-12": "velocity-output", + "v1-18": "actual-move" + } + }, + "(method 29 collide-shape)": { + "args": ["this", "rider-count"] + }, + "(method 0 touching-prims-entry-pool)": { + "vars": { + "gp-0": ["this", "touching-prims-entry-pool"] + } + }, + "(method 10 touching-prims-entry-pool)": { + "args": ["this"], + "vars": { + "v0-0": "free-count", + "v1-0": "node" + } + }, + "(method 9 touching-prims-entry-pool)": { + "args": ["this"], + "vars": { + "gp-0": "node", + "v1-0": "next-node" + } + }, + "(method 12 touching-prims-entry-pool)": { + "args": ["this", "node"], + "vars": { + "v1-1": "old-head" + } + }, + "(method 15 touching-shapes-entry)": { + "args": ["this"], + "vars": { + "gp-0": "node", + "s5-0": "pool", + "a1-0": "node-to-free" + } + }, + "(method 14 touching-list)": { + "args": ["this"], + "vars": { + "s5-0": "shape-entry", + "s4-0": "entries-left" + } + }, + "(method 9 touching-list)": { + "args": ["this", "prim-a", "prim-b", "step-u", "tri-a", "tri-b"], + "vars": { + "gp-0": "work", + "s2-0": "shape-entry", + "v1-4": "swap-prim", + "s0-0": "node", + "v1-12": "stored-prim-a", + "a1-2": "tri-a-result", + "v1-15": "stored-prim-b", + "a1-3": "tri-b-result", + "s0-1": "new-node", + "v1-22": "old-head", + "v1-26": "new-prim-a", + "a1-4": "new-tri-a", + "v1-29": "new-prim-b", + "a1-5": "new-tri-b" + } + }, + "(method 12 touching-shapes-entry)": { + "args": ["this", "shape", "prim-id-mask"], + "vars": { + "v1-1": "node", + "v1-4": "node" + } + }, + "(method 13 touching-shapes-entry)": { + "args": ["this", "shape", "required-actions", "rejected-actions"], + "vars": { + "v1-1": "node", + "v1-4": "node", + "a0-1": "prim", + "a0-5": "prim" + } + }, + "(method 10 touching-shapes-entry)": { + "args": ["this", "shape"] + }, + "(method 9 touching-prims-entry)": { + "args": ["this", "shape", "shape-entry"] + }, + "(method 12 touching-prims-entry)": { + "args": ["this", "shape", "shape-entry"], + "vars": { + "v0-0": "triangle", + "v1-2": "prim", + "v1-5": "prim" + } + }, + "(method 11 touching-prims-entry)": { + "args": ["this", "output"], + "vars": { + "s4-0": "prim-a", + "s3-0": "prim-b", + "gp-1": "center-offset", + "f1-2": "signed-gap" + } + }, + "(method 17 touching-shapes-entry)": { + "args": ["this", "node"] + }, + "(method 20 target)": { + "args": ["this", "ccache"], + "vars": { + "gp-0": "work", + "v1-0": "ctrl" + } + }, + "(method 9 collide-edge-work)": { + "args": ["this", "hold-list"], + "vars": { + "s4-0": "hold-item", + "s3-0": "edge", + "s2-0": "edges-left" + } + }, + "(method 19 collide-edge-work)": { + "args": ["this", "hold-item", "grab-info"], + "vars": { + "s3-0": "edge", + "s1-0": "ctri", + "s4-0": "prim-index", + "s0-0": "hand-target", + "f0-0": "right-hand-distance", + "f0-1": "left-hand-distance", + "a1-13": "probe-params", + "v1-36": "prim", + "a0-35": "actor-cshape", + "a1-19": "bone-mat", + "s5-1": "inverse-bone-mat", + "s4-1": "i" + } + }, + "(method 9 edge-grab-info)": { + "args": ["this"], + "vars": { + "v0-0": "valid?", + "s5-0": "actor-prim", + "v1-1": "prim-offset", + "a0-5": "actor-process", + "s4-0": "bone-mat", + "s3-0": "i", + "v1-14": "tri-normal-bits", + "f1-0": "minimum-up-cosine", + "v1-21": "work", + "v1-22": "work", + "a1-14": "probe-params", + "a0-24": "leap-up-state", + "v1-40": "actor-cshape" + } + }, + "(method 14 collide-edge-work)": { + "args": ["this", "output", "test-point", "prim-index"], + "vars": { + "f30-0": "best-distance", + "s2-0": "closest-point", + "s1-0": "i", + "v1-3": "edge", + "f0-0": "distance" + } + }, + "(method 17 collide-edge-work)": { + "args": ["this", "hold-item", "edge"], + "vars": { + "a3-0": "reach-min", + "t1-0": "reach-max", + "v1-0": "target-cshape", + "t0-0": "center-int", + "t1-1": "above-max-mask", + "a3-1": "below-min-mask", + "v1-1": "outside-mask", + "v1-2": "packed-outside-mask", + "f0-0": "max-outward-distance-squared", + "f1-0": "minimum-facing-cosine", + "v1-4": "outward-distance-squared", + "v1-5": "facing-cosine", + "v1-6": "rating", + "v0-0": "accepted?" + } + }, + "(method 13 collide-edge-work)": { + "args": ["this", "edge", "output"], + "vars": { + "v0-0": "result-x", + "f0-0": "zero", + "v1-0": "edge-start", + "a0-1": "edge-end", + "v1-1": "edge-length-result", + "v1-2": "inverse-edge-length-result", + "v1-3": "projected-distance-result", + "v1-4": "edge-fraction", + "f1-0": "edge-length", + "f2-0": "inverse-edge-length", + "f3-0": "projected-distance" + } + }, + "(method 10 collide-edge-work)": { + "args": ["this"], + "vars": { + "gp-0": "ignored-count", + "s4-0": "i", + "s3-0": "edge", + "a2-0": "edge-start", + "a3-0": "edge-end", + "s2-0": "edge-midpoint" + } + }, + "(method 12 collide-edge-work)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "a2-0": "vertex" + } + }, + "(method 9 collide-edge-hold-list)": { + "args": ["this"], + "vars": { + "s4-0": "item", + "s5-0": "item-count", + "s3-0": "marker", + "s2-0": "first-item?", + "s5-1": "i" + } + }, + "(method 11 collide-edge-work)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "v1-3": "ctri", + "t1-0": "tri-color" + } + }, + "(top-level-login collide-edge-grab)": { + "vars": { + "v1-1": "rotate-surface", + "v1-2": "no-walk-surface" + } + }, + "(method 13 perf-stat)": { + "args": ["this", "vu0-waits", "to-scratchpad-waits", "from-scratchpad-waits"] + }, + "inspect-bsp-tree": { + "args": ["header", "node"], + "vars": { + "s4-0": "saved-column" + } + }, + "map-bsp-tree": { + "args": ["visit", "header", "node"] + }, + "(method 0 subdivide-settings)": { + "args": ["allocation", "type-to-make", "close-distance", "far-distance"], + "vars": { + "v0-0": "this", + "v1-2": "i" + } + }, + "update-wind": { + "args": ["work", "gust-table"], + "vars": { + "f0-1": "unwrapped-heading", + "f30-1": "heading", + "s4-0": "ring-index", + "f0-4": "random-amplitude", + "v1-5": "gust-index", + "f1-6": "gust-interpolation", + "f2-4": "gust-start", + "f0-5": "force" + } + }, + "blerc-stats-init": { + "vars": { + "a0-7": "stats" + } + }, + "blerc-init": { + "vars": { + "v1-0": "state" + } + }, + "merc-blend-shape": { + "args": ["drawable"], + "vars": { + "v1-2": "root-channel", + "a3-0": "anim-group", + "a1-4": "frame-weights", + "a0-10": "merc-geo", + "a2-0": "target-count", + "t0-0": "frame", + "t1-0": "frame-index", + "v1-4": "current-frame-weights", + "a1-5": "target-weights", + "a2-1": "target-count", + "a3-5": "next-frame-weights", + "t0-1": "next-frame-scale", + "t1-1": "current-frame-scale", + "t2-0": "i", + "a3-6": "i" + } + }, + "setup-blerc-chains": { + "args": ["merc", "target-weights", "dma-buffer"], + "vars": { + "sv-16": "effect-count", + "s3-0": "target-count", + "v1-1": "chain-start", + "sv-20": "chain-header", + "a2-1": "chain-cursor", + "s2-0": "effect-index", + "sv-24": "effect-data", + "sv-28": "blend-fragment-count", + "v1-15": "fragment-geo", + "s1-0": "fragment-control", + "s0-0": "blend-deltas", + "sv-32": "blend-control", + "sv-48": "fragment-index", + "sv-64": "lump-data", + "a0-14": "target-stride", + "v1-33": "chain-header-words", + "v1-34": "chain-header-words" + } + }, + "tie-init-buffers": { + "args": ["unused-dma-buf"], + "vars": { + "gp-0": "bucket", + "s5-0": "dma-buf", + "s4-1": "init-start", + "v1-8": "next-packet", + "gp-1": "bucket", + "s4-2": "dma-buf", + "s5-1": "shutdown-start", + "v1-19": "chain-end", + "a0-17": "next-packet", + "gp-2": "bucket", + "s5-2": "dma-buf", + "s4-4": "init-start", + "v1-28": "next-packet", + "gp-3": "bucket", + "s4-5": "dma-buf", + "s5-3": "shutdown-start", + "v1-39": "chain-end", + "a0-36": "next-packet", + "gp-4": "bucket", + "s5-4": "dma-buf", + "s4-7": "init-start", + "v1-48": "next-packet", + "gp-5": "bucket", + "s4-8": "dma-buf", + "s5-5": "shutdown-start", + "v1-59": "chain-end", + "a0-55": "next-packet", + "gp-6": "bucket", + "s5-6": "dma-buf", + "s4-10": "init-start", + "v1-68": "next-packet", + "gp-7": "bucket", + "s4-11": "dma-buf", + "s5-7": "shutdown-start", + "v1-79": "chain-end", + "a0-74": "next-packet" + } + }, + "tie-debug-between": { + "args": ["min-instance", "max-instance"] + }, + "tie-debug-one": { + "args": ["min-instance", "count"] + }, + "draw-drawable-tree-instance-tie": { + "args": ["tie-tree", "lev"], + "vars": { + "s4-0": "last-array-index", + "s3-0": "depth-index", + "v1-10": "parent-array", + "a0-5": "child-array", + "a1-2": "parent-vis-byte-index", + "a0-7": "child-vis-byte-index", + "a1-4": "parent-visibility", + "a0-9": "child-visibility", + "v1-16": "instance-array", + "s4-1": "prototypes", + "s5-1": "prototype-count", + "a0-11": "i", + "a1-7": "prototype", + "s1-0": "instances", + "s0-0": "visibility", + "s3-1": "dma-buf", + "sv-16": "instance-count", + "v1-21": "gsf-base-offset", + "v1-23": "work-copy-offset", + "s2-0": "instance-dma-start", + "v1-32": "instance-perf", + "a0-28": "instance-perf-control", + "v1-35": "instance-perf", + "a0-31": "instance-counter-0", + "a0-33": "instance-counter-1", + "v1-42": "min-distance", + "a0-38": "usage", + "s2-1": "generic-dma-start", + "v1-60": "generic-perf", + "a0-43": "generic-perf-control", + "v1-63": "generic-perf", + "a0-46": "generic-counter-0", + "a0-48": "generic-counter-1", + "a0-51": "usage", + "s3-2": "tie-dma-start", + "s1-1": "tie-dma-buf", + "s2-2": "tie-packet-start", + "v1-85": "tie-perf", + "a0-59": "tie-perf-control", + "v1-88": "tie-perf", + "a0-62": "tie-counter-0", + "a0-64": "tie-counter-1", + "a3-11": "tie-packet-end", + "v1-94": "tie-next-packet", + "v1-100": "usage", + "s3-3": "near-dma-start", + "s1-2": "near-dma-buf", + "s2-3": "near-packet-start", + "v1-114": "near-perf", + "a0-79": "near-perf-control", + "v1-117": "near-perf", + "a0-82": "near-counter-0", + "a0-84": "near-counter-1", + "a3-16": "near-packet-end", + "v1-123": "near-next-packet", + "a0-92": "usage" + } + }, + "(method 10 drawable-tree-instance-tie)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "v1-1": "queue-index", + "a1-2": "level-index", + "a1-5": "owning-level" + } + }, + "(method 14 drawable-tree-instance-tie)": { + "args": ["this"], + "vars": { + "v1-8": "prototypes", + "a0-1": "i", + "a1-2": "prototype", + "a2-3": "geometry-index", + "a3-0": "last-geometry-index", + "t0-2": "instance-count", + "t2-0": "geometry", + "t1-3": "fragment", + "t2-1": "fragment-count", + "t3-9": "i", + "t5-0": "triangle-count", + "t4-5": "display-vertex-count", + "a2-9": "geometry-index", + "a3-1": "last-geometry-index", + "t0-6": "instance-count", + "t2-2": "geometry", + "t1-8": "fragment", + "t2-3": "fragment-count", + "t3-19": "i", + "t5-5": "triangle-count", + "t4-12": "display-vertex-count", + "a2-14": "instance-count", + "a3-2": "geometry", + "a1-3": "fragment", + "a3-3": "fragment-count", + "t0-19": "i", + "t2-4": "triangle-count", + "t1-15": "display-vertex-count" + } + }, + "(method 15 drawable-tree-instance-tie)": { + "args": ["this", "submitted-tree", "frame"], + "vars": { + "s5-0": "prototypes", + "s4-0": "prototype-count", + "s3-0": "i", + "a1-1": "geometry" + } + }, + "(method 11 drawable-tree-instance-tie)": { + "args": ["this", "count", "result"] + }, + "(method 12 drawable-tree-instance-tie)": { + "args": ["this", "count", "result"] + }, + "(method 13 drawable-tree-instance-tie)": { + "args": ["this", "count", "result"] + }, + "(method 11 drawable-inline-array-instance-tie)": { + "args": ["this", "count", "result"] + }, + "(method 12 drawable-inline-array-instance-tie)": { + "args": ["this", "count", "result"] + }, + "(method 13 drawable-inline-array-instance-tie)": { + "args": ["this", "count", "result"] + }, + "tie-test-cam-restore": { + "vars": { + "a0-0": "camera-position", + "a1-0": "camera-rotation" + } + }, + "drawable-sphere-box-intersect?": { + "args": ["geometry", "query-box"], + "vars": { + "v1-0": "query-min", + "a1-1": "query-max", + "a2-0": "low-corner-words", + "a0-1": "high-corner-words", + "a1-2": "above-box", + "v1-1": "below-box", + "v1-2": "separated", + "v1-3": "separated-packed", + "v1-4": "xyz-separated" + } + }, + "instance-sphere-box-intersect?": { + "args": ["fragment", "inst", "query-box"], + "vars": { + "v1-0": "max-scale-q12", + "a3-0": "translation-packed", + "t2-0": "row-0-packed", + "t0-0": "row-1-packed", + "a3-2": "row-2-packed", + "a3-1": "translation-lanes", + "t1-0": "translation-shifted", + "t2-1": "row-0-lanes", + "t2-2": "row-0-words", + "t0-1": "row-1-lanes", + "t0-2": "row-1-words", + "a3-3": "row-2-lanes", + "a3-4": "row-2-words", + "v1-2": "query-min", + "a1-1": "query-max", + "a2-1": "low-corner-words", + "a0-2": "high-corner-words", + "a1-2": "above-box", + "v1-3": "below-box", + "v1-4": "separated", + "v1-5": "separated-packed", + "v1-6": "xyz-separated" + } + }, + "instance-tfragment-add-debug-sphere": { + "args": ["geometry", "inst"], + "vars": { + "v1-0": "translation-packed", + "v1-1": "translation-lanes", + "v1-2": "translation-shifted", + "a3-0": "radius", + "a2-0": "world-center" + } + }, + "set-video-mode": { + "args": ["mode"] + }, + "set-aspect-ratio": { + "args": ["aspect"] + }, + "(method 3 sparticle-launcher)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "v1-1": "init-spec" + } + }, + "lookup-part-group-by-name": { + "args": ["name"], + "vars": { + "s5-0": "table", + "s4-0": "len", + "s3-0": "i", + "s2-0": "group" + } + }, + "lookup-part-group-pointer-by-name": { + "args": ["name"], + "vars": { + "s4-0": "table", + "s3-0": "len", + "gp-0": "i", + "v1-2": "group" + } + }, + "part-group-pointer?": { + "args": ["ptr"], + "vars": { + "v1-0": "table" + } + }, + "unlink-part-group-by-heap": { + "args": ["heap"], + "vars": { + "v1-0": "table", + "a2-0": "i", + "a1-0": "heap-start", + "a0-1": "heap-end", + "a3-2": "group" + } + }, + "(method 2 sparticle-cpuinfo)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "sp-particle-copy!": { + "args": ["dst", "src"], + "vars": { + "v1-1": "position-and-scale", + "v1-3": "rotation-and-scale", + "v1-5": "color", + "v1-6": "i" + } + }, + "(method 0 sparticle-system)": { + "args": ["allocation", "type-to-make", "group0-length", "group1-length", "is-3d?", "sprite-memory", "adgif-memory"], + "vars": { + "gp-0": "sys", + "v1-3": "group0-blocks", + "a0-2": "group1-blocks", + "a1-2": "group0-rounded-length", + "a2-2": "group1-rounded-length", + "s2-1": "total-blocks", + "s5-1": "total-length", + "v1-5": "block", + "s4-1": "i" + } + }, + "sp-get-block-size": { + "args": ["sys", "group"], + "vars": { + "v0-0": "used-blocks", + "v1-0": "block-offset", + "a2-0": "num-blocks", + "a1-3": "i" + } + }, + "sp-get-approx-alloc-size": { + "args": ["sys", "group"], + "vars": { + "a3-0": "selected-group", + "v1-0": "used-blocks", + "a1-1": "block-offset", + "a2-0": "num-blocks", + "a3-3": "i" + } + }, + "sp-free-particle": { + "args": ["sys", "slot", "cpuinfo", "sprite-data"], + "vars": { + "v1-6": "block", + "t0-4": "bit" + } + }, + "sp-get-particle": { + "args": ["sys", "group", "binding"], + "vars": { + "v1-0": "block-offset", + "t0-0": "num-blocks", + "a3-0": "block-index", + "a2-1": "i", + "a2-2": "bit-index", + "t1-15": "free-bits", + "t0-4": "slot-base", + "t2-4": "lower-32-shifted", + "t3-0": "bit-after-32", + "t1-16": "bits-after-32", + "a2-3": "bit-index-after-32", + "t2-5": "lower-16-shifted", + "t3-1": "bit-after-16", + "t1-17": "bits-after-16", + "a2-4": "bit-index-after-16", + "t2-6": "lower-8-shifted", + "t3-2": "bit-after-8", + "t1-18": "bits-after-8", + "a2-5": "bit-index-after-8", + "t2-7": "lower-4-shifted", + "t3-3": "bit-after-4", + "t1-19": "bits-after-4", + "a2-6": "bit-index-after-4", + "t2-8": "lower-2-shifted", + "t3-4": "bit-after-2", + "t1-20": "bits-after-2", + "a2-7": "bit-index-after-2", + "t1-21": "lower-1-shifted", + "t2-9": "bit-after-1", + "t3-5": "final-bits", + "a2-8": "free-bit", + "t0-5": "slot", + "v1-9": "cpuinfo" + } + }, + "sp-kill-particle": { + "args": ["sys", "cpuinfo"], + "vars": { + "a2-1": "slot" + } + }, + "sp-orbiter": { + "args": ["sys", "cpuinfo", "out-pos"], + "vars": { + "f2-0": "angle", + "f0-0": "radius", + "f4-0": "angular-velocity", + "f24-0": "plane-precession", + "f1-0": "radial-velocity", + "f3-0": "dt", + "f28-0": "new-angle", + "f30-0": "new-radius", + "f26-0": "sin-angle", + "f28-1": "cos-angle", + "f22-0": "sin-half-precession", + "f0-5": "cos-half-precession", + "a1-1": "precession", + "s4-0": "orbit-offset", + "s3-0": "rotation", + "v1-3": "center" + } + }, + "sp-copy-to-spr": { + "args": ["scratchpad-offset", "memory", "size"], + "vars": { + "a2-1": "quadword-count" + } + }, + "sp-copy-from-spr": { + "args": ["scratchpad-offset", "memory", "size"], + "vars": { + "a2-1": "quadword-count" + } + }, + "sp-process-block": { + "args": ["sys", "start-slot", "sprite-array-data", "count"], + "vars": { + "s3-0": "cpu-offset", + "s2-0": "cpu-size", + "s5-0": "sprite-size", + "sv-32": "adgif-size", + "s1-0": "sprite-offset", + "sv-16": "adgif-offset", + "t9-2": "copy-to-scratchpad", + "a1-7": "adgif-data", + "sv-80": "scratchpad-cpuinfo", + "sv-96": "scratchpad-sprite-data" + } + }, + "sp-process-particle-system": { + "args": ["sys", "group", "sprite-array-data"], + "vars": { + "s1-0": "chunk-size", + "s3-0": "start-slot", + "s4-0": "remaining" + } + }, + "forall-particles-with-key-runner": { + "args": ["key", "func", "sys"], + "vars": { + "sv-16": "bit", + "s3-0": "cpuinfo", + "s2-0": "sprite-data", + "s1-0": "total-blocks", + "s0-0": "block" + } + }, + "forall-particles-with-key": { + "args": ["key", "func", "do-2d?", "do-3d?"] + }, + "sparticle-kill-it": { + "args": ["sys", "cpuinfo"] + }, + "sparticle-kill-it-level0": { + "args": ["sys", "cpuinfo"] + }, + "sparticle-kill-it-level1": { + "args": ["sys", "cpuinfo"] + }, + "sparticle-60-to-50": { + "args": ["sys", "cpuinfo", "sprite-data"], + "vars": { + "gp-0": "rotational-step", + "s5-0": "axis-angle" + } + }, + "sparticle-50-to-60": { + "args": ["sys", "cpuinfo", "sprite-data"], + "vars": { + "gp-0": "rotational-step", + "s5-0": "axis-angle" + } + }, + "kill-all-particles-with-key": { + "args": ["key"] + }, + "forall-particles-runner": { + "args": ["func", "sys"], + "vars": { + "s4-0": "cpuinfo", + "s3-0": "sprite-data", + "s2-0": "total-blocks", + "s1-0": "block", + "s0-0": "bit" + } + }, + "forall-particles": { + "args": ["func", "do-2d?", "do-3d?"] + }, + "kill-all-particles-in-level": { + "args": ["lev"] + }, + "set-particle-frame-time": { + "args": ["ticks"] + }, + "process-particles": { + "vars": { + "gp-0": "start-cycles", + "v1-29": "end-cycles", + "v1-14": "ticks", + "a2-5": "elapsed-cycles" + } + }, + "sp-init-fields!": { + "args": ["dest", "specs", "field-id", "end-field-id", "write-missing-fields"] + }, + "particle-setup-adgif": { + "args": ["shader", "tex-id"], + "vars": { + "a1-1": "tex" + } + }, + "particle-adgif": { + "args": ["shader", "tex-id"] + }, + "sp-queue-launch": { + "args": ["sys", "launcher", "pos"], + "vars": { + "v1-0": "queue", + "a3-5": "entry", + "v0-1": "new-count" + } + }, + "sp-adjust-launch": { + "args": ["launchinfo", "cpuinfo", "init-specs"], + "vars": { + "s5-0": "local-info", + "s2-0": "rot-mat", + "s3-0": "cone-axis", + "s3-1": "yrot-mat" + } + }, + "sp-euler-convert": { + "args": ["launchinfo", "cpuinfo"], + "vars": { + "a1-1": "euler", + "s5-0": "quat", + "v1-1": "dummy0", + "v1-2": "dummy1" + } + }, + "sp-rotate-system": { + "args": ["launchinfo", "cpuinfo", "rot"], + "vars": { + "s5-0": "rot-mat", + "a1-1": "quat", + "v1-0": "dst-quat", + "a0-1": "src-rot", + "f0-0": "qx", + "f1-0": "qy", + "f3-0": "qz" + } + }, + "sp-launch-particles-var": { + "args": ["sys", "launcher", "pos", "launch-state", "launch-control", "rate"] + }, + "sp-launch-particles-death": { + "args": ["sys", "launcher", "pos"], + "vars": { + "v1-0": "max-color-bits", + "s5-0": "sprite-tmp", + "gp-0": "cpuinfo", + "a1-2": "first-spec", + "a1-3": "next-spec", + "v1-14": "adgif-q0", + "v1-16": "adgif-q1", + "v1-18": "adgif-q2", + "v1-20": "adgif-q3", + "v1-22": "adgif-q4", + "v1-26": "sprite-data", + "v1-25": "dummy0", + "v1-27": "dummy1" + } + }, + "sp-clear-queue": { + "vars": { + "gp-0": "queue", + "s5-0": "i", + "v1-4": "entry" + } + }, + "sp-relaunch-setup-fields": { + "args": ["user", "launcher", "cpuinfo", "sprite"], + "vars": { + "a1-1": "first-spec", + "s4-0": "level-flags", + "f20-0": "saved-r", + "f22-0": "saved-g", + "f24-0": "saved-b", + "f26-0": "saved-fade-r", + "f28-0": "saved-fade-g", + "f30-0": "saved-fade-b", + "a1-2": "next-spec", + "v1-16": "tod-color", + "a1-3": "next-spec" + } + }, + "sp-relaunch-particle-2d": { + "args": ["user", "launcher", "cpuinfo", "sprite"] + }, + "sp-relaunch-particle-3d": { + "args": ["user", "launcher", "cpuinfo", "sprite"], + "vars": { + "s4-0": "parent-quat", + "v1-0": "dst-quat", + "a2-1": "spr", + "f0-0": "qx", + "f1-0": "qy", + "f3-0": "qz", + "a1-1": "euler", + "s3-0": "quat", + "v1-9": "dummy0", + "v1-10": "dummy1" + } + }, + "(method 9 sparticle-launch-control)": { + "args": ["this", "group", "proc"], + "vars": { + "s5-0": "state-idx", + "s3-0": "i", + "a0-2": "item", + "a1-2": "launcher", + "v1-9": "state" + } + }, + "(method 9 sparticle-launch-group)": { + "args": ["this", "proc"], + "vars": { + "gp-0": "launch-control" + } + }, + "(method 12 sparticle-launch-control)": { + "args": ["this"], + "vars": { + "v1-0": "i", + "a0-3": "state" + } + }, + "(method 13 sparticle-launch-control)": { + "args": ["this"] + }, + "(method 10 sparticle-launch-control)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "group", + "f0-0": "bounds-radius", + "gp-1": "vis-sphere" + } + }, + "(method 11 sparticle-launch-control)": { + "args": ["this", "pos"], + "vars": { + "s4-0": "now", + "s5-0": "last-time", + "v1-8": "frame-counter", + "f30-0": "cam-dist", + "s3-1": "hour-bit", + "s2-1": "item-idx", + "a3-0": "state", + "v1-29": "item", + "a1-4": "launcher", + "f0-2": "rate", + "a0-26": "launcher-type", + "f0-4": "burst-rate", + "a2-5": "last-phase", + "a0-56": "now-phase", + "t0-2": "window-len" + } + }, + "sparticle-track-root": { + "args": ["user", "cpuinfo", "out-pos"], + "vars": { + "v1-3": "trans" + } + }, + "sparticle-track-root-prim": { + "args": ["user", "cpuinfo", "out-pos"], + "vars": { + "v1-4": "prim-core" + } + }, + "birth-func-copy-rot-color": { + "args": ["sys", "cpuinfo", "sprite3d", "launcher", "launch-state"], + "vars": { + "s5-0": "parent", + "s4-0": "quat", + "v1-0": "spr", + "f0-0": "qx", + "f1-0": "qy", + "f3-0": "qz", + "v1-3": "spr-out", + "v1-4": "dummy0", + "v1-5": "dummy1" + } + }, + "birth-func-copy2-rot-color": { + "args": ["sys", "cpuinfo", "sprite3d", "launcher", "launch-state"], + "vars": { + "s5-0": "parent", + "s4-0": "quat", + "v1-0": "spr", + "f0-0": "qx", + "f1-0": "qy", + "f3-0": "qz", + "a1-1": "euler", + "v1-14": "spr-out", + "v1-15": "dummy0", + "v1-16": "dummy1" + } + }, + "birth-func-copy-omega-to-z": { + "args": ["sys", "cpuinfo", "sprite3d", "launcher", "launch-state"] + }, + "birth-func-random-next-time": { + "args": ["sys", "cpuinfo", "sprite3d", "launcher", "launch-state"] + }, + "entity-info-lookup": { + "args": ["entity-type"], + "vars": { + "v1-1": "info-table", + "a1-0": "i" + } + }, + "(top-level-login eye-h)": { + "vars": { + "v1-5": "i" + } + }, + "(method 0 water-control)": { + "args": ["allocation", "type-to-make", "owner", "joint-index", "top-y-offset", "swim-height", "wade-height"], + "vars": { + "v0-0": "this" + } + }, + "birth-func-y->userdata": { + "args": ["system", "cpuinfo", "launch-transform"] + }, + "birth-func-ocean-height": { + "args": ["system", "cpuinfo", "launch-transform"] + }, + "check-water-level-drop": { + "args": ["system", "cpuinfo", "position"], + "vars": { + "s5-0": "surface-position" + } + }, + "check-water-level-drop-and-die": { + "args": ["system", "cpuinfo", "position"] + }, + "check-water-level-above-and-die": { + "args": ["system", "cpuinfo", "position"] + }, + "(method 10 water-control)": { + "args": ["this"], + "vars": { + "s5-0": "old-flags", + "a0-26": "volume-process", + "f30-0": "ripple-height", + "v1-36": "ripple-position", + "s4-0": "surface-position", + "f30-1": "heading", + "f28-0": "xz-speed", + "v1-124": "spray-joint-index", + "s4-1": "spray-position", + "f30-3": "swim-line-y", + "s4-2": "owner-root", + "v1-146": "root-control", + "s4-3": "recent-surface?", + "v1-200": "float-position", + "s4-4": "floating-shape", + "a1-27": "to-line-velocity", + "a1-30": "snap-position", + "s5-1": "surfacing-shape", + "f30-4": "saved-impact-velocity", + "a1-33": "attack-message", + "v1-281": "attack-id", + "v1-283": "owner-process", + "a2-15": "drip-position", + "s5-2": "candidate-joint-index", + "v1-328": "candidate-position" + } + }, + "(method 11 water-control)": { + "args": ["this", "amplitude", "period-ticks", "duration-ticks"] + }, + "part-water-splash-callback": { + "args": ["tracker"], + "vars": { + "f1-0": "surface-y", + "f0-0": "splash-scale" + } + }, + "(method 15 water-control)": { + "args": ["this"], + "vars": { + "a1-1": "query-message", + "f0-4": "ground-height", + "f30-0": "splash-scale" + } + }, + "splash-spawn": { + "args": ["scale", "position", "size"] + }, + "(method 13 water-control)": { + "args": ["this", "scale", "position", "size", "velocity"], + "vars": { + "a1-3": "splash-position" + } + }, + "(method 27 water-vol)": { + "args": ["this"], + "vars": { + "v1-7": "target-water" + } + }, + "(anon-function 13 water)": { + "args": ["other-volume"] + }, + "(method 26 water-vol)": { + "args": ["this"], + "vars": { + "v1-15": "claimed-water", + "v1-18": "attack-event", + "s5-0": "candidate-water" + } + }, + "(method 29 water-vol)": { + "args": ["this"], + "vars": { + "sv-16": "water-height-tag", + "v1-8": "heights" + } + }, + "water-vol-init-by-other": { + "args": ["source-entity"] + }, + "(method 11 water-vol)": { + "args": ["this", "source-entity"] + }, + "position-in-front-of-camera!": { + "args": ["out", "forward-distance", "up-distance"] + }, + "matrix-local->world": { + "args": ["smooth?", "unused-mode"] + }, + "camera-angle": { + "vars": { + "f0-0": "right-x", + "f1-0": "right-z" + } + }, + "camera-teleport-to-entity": { + "args": ["start-entity"], + "vars": { + "gp-0": "teleport-transform" + } + }, + "cam-slave-get-vector-with-offset": { + "args": ["source-actor", "out", "prop-name"], + "vars": { + "s3-0": "base-value", + "s2-0": "struct-getter", + "a0-6": "offset-value" + } + }, + "cam-slave-get-flags": { + "args": ["source-entity", "prop-name"], + "vars": { + "gp-0": "base-flags", + "s3-0": "value-getter", + "s2-0": "source-copy", + "s3-1": "set-flags", + "s2-1": "clear-getter", + "v1-3": "clear-flags" + } + }, + "cam-slave-get-float": { + "args": ["source-entity", "prop-name", "default-value"], + "vars": { + "f30-0": "base-value", + "s4-0": "float-getter" + } + }, + "cam-slave-get-fov": { + "args": ["source-entity"], + "vars": { + "f30-0": "base-fov", + "s5-0": "float-getter", + "f0-0": "fov-offset" + } + }, + "cam-slave-get-intro-step": { + "args": ["source-entity"], + "vars": { + "f30-0": "base-duration", + "s5-0": "float-getter", + "f0-1": "duration" + } + }, + "cam-slave-get-interp-time": { + "args": ["source-entity"], + "vars": { + "f30-0": "base-duration", + "s5-0": "float-getter", + "f0-1": "duration" + } + }, + "cam-slave-get-rot": { + "args": ["source-actor", "out-matrix"], + "vars": { + "s4-0": "struct-getter", + "s3-0": "source-copy", + "a1-3": "rotation-offset", + "s4-1": "combined-rotation" + } + }, + "cam-state-from-entity": { + "args": ["source-entity"], + "vars": { + "s5-0": "camera-path" + } + }, + "parameter-ease-none": { + "args": ["value"] + }, + "parameter-ease-clamp": { + "args": ["t"] + }, + "parameter-ease-lerp-clamp": { + "args": ["t"] + }, + "parameter-ease-sqrt-clamp": { + "args": ["t"] + }, + "fourth-power": { + "args": ["x"] + }, + "third-power": { + "args": ["x"] + }, + "parameter-ease-sqr-clamp": { + "args": ["t"] + }, + "parameter-ease-sin-clamp": { + "args": ["t"] + }, + "cam-slave-go": { + "args": ["next-state"], + "vars": { + "t9-1": "enter-fn" + } + }, + "cam-calc-follow!": { + "args": ["tracker", "camera-pos", "smooth?"], + "vars": { + "s3-0": "target-facing-flat", + "s2-0": "target-from-camera-flat", + "f30-0": "target-speed", + "s5-1": "desired-offset", + "f30-1": "lead-scale", + "f0-4": "view-facing-angle", + "f28-0": "clamped-angle", + "f0-20": "blend-factor", + "s3-2": "normal-offset", + "f0-28": "facing-dot", + "f30-2": "behind-weight", + "f0-29": "facing-dot-squared", + "f0-30": "side-weight", + "f0-33": "distance-factor", + "f0-34": "distance-upper", + "f0-35": "distance-weight" + } + }, + "mat-remove-z-rot": { + "args": ["camera-matrix", "local-down"], + "vars": { + "s4-0": "desired-up", + "s5-0": "roll-correction", + "f30-0": "up-dot", + "f0-4": "signed-sine" + } + }, + "slave-matrix-blend-2": { + "args": ["current-matrix", "options-bits", "aim-vector", "target-matrix"], + "vars": { + "s1-0": "distance-work", + "s4-0": "current-rotation", + "s2-0": "target-rotation", + "gp-0": "delta-rotation", + "f0-1": "aim-distance", + "f0-3": "distance-weight", + "f30-0": "turn-step", + "f28-0": "turn-angle" + } + }, + "vector-into-frustum-nosmooth!": { + "args": ["camera-matrix", "camera-pos", "fov"], + "vars": { + "s5-0": "correction-matrix", + "s3-0": "target-dir", + "s2-0": "frustum-edge", + "f30-0": "vertical-dot-limit", + "s4-0": "rotate-up?", + "f28-0": "horizontal-target-dot", + "sv-128": "horizontal-edge", + "sv-112": "right-axis-base", + "f0-6": "horizontal-scale", + "v1-6": "horizontal-scale-bits", + "f0-8": "horizontal-edge-dot", + "f28-1": "foot-dot", + "sv-160": "vertical-edge", + "sv-144": "up-axis", + "f0-15": "vertical-scale", + "v1-23": "vertical-scale-bits", + "f0-17": "foot-edge-dot", + "f28-2": "head-dot", + "f0-27": "head-edge-dot", + "f0-32": "opposite-head-dot", + "f0-34": "correction-angle" + } + }, + "slave-set-rotation!": { + "args": ["tracker", "camera-pos", "options-bits", "fov", "smooth?"], + "vars": { + "f0-8": "forward-down-dot", + "sv-224": "tilt-matrix", + "s1-0": "aim-vector", + "s5-0": "target-matrix", + "f30-0": "tilt-angle", + "sv-192": "point-of-interest-vector", + "f28-0": "aim-distance", + "v1-3": "blended-aim-out", + "a0-5": "base-aim", + "sv-208": "aim-direction", + "v1-11": "down-axis", + "f28-1": "down-dot", + "f0-10": "vertical-angle", + "v1-31": "output-matrix", + "a3-2": "source-matrix", + "a0-22": "row-0", + "a1-16": "row-1", + "a2-7": "row-2", + "a3-3": "row-3" + } + }, + "v-slrp2!": { + "args": ["out", "from-vector", "to-vector", "t", "plane-normal", "max-angle"], + "vars": { + "f0-10": "direction-dot", + "f28-0": "to-length", + "f30-0": "from-length", + "sv-144": "angle-limit", + "sv-160": "to-direction", + "sv-176": "rotation-matrix", + "s0-0": "from-direction", + "s3-0": "rotation-axis", + "f26-0": "axis-side", + "t9-10": "acos-fn", + "v1-18": "from-direction-copy", + "f1-3": "angle", + "f0-12": "step-angle", + "f0-13": "cos-angle" + } + }, + "v-slrp3!": { + "args": ["out", "from-vector", "to-vector", "plane-normal", "max-angle"], + "vars": { + "f0-7": "direction-dot", + "f26-0": "to-length", + "f28-0": "from-length", + "sv-144": "angle-limit", + "sv-160": "to-direction", + "s1-0": "from-direction", + "s3-0": "rotation-axis", + "f30-0": "fraction", + "s0-0": "rotation-matrix", + "f24-0": "axis-side", + "t9-10": "acos-fn", + "v1-9": "from-direction-copy", + "f0-8": "angle", + "f0-9": "cos-angle" + } + }, + "(method 9 cam-index)": { + "args": ["this", "prop-name", "source-entity", "cam-pos", "fallback-curve"], + "vars": { + "s3-2": "points-data", + "s0-1": "struct-getter", + "v0-8": "offset-vec", + "s4-1": "tmp-vec" + } + }, + "(method 10 cam-index)": { + "args": ["this", "pos"], + "vars": { + "s5-0": "delta" + } + }, + "(method 9 tracking-spline)": { + "args": ["this"], + "vars": { + "v1-0": "cur-pt", + "s4-0": "live-count", + "s5-0": "live-mask", + "v1-9": "free-pt", + "a3-1": "free-count", + "v1-21": "i" + } + }, + "(method 10 tracking-spline)": { + "args": ["this", "start-pos"], + "vars": { + "v1-6": "i" + } + }, + "(method 13 tracking-spline)": { + "args": ["this", "pt"], + "vars": { + "v1-3": "next-pt", + "v1-11": "after-pt" + } + }, + "(method 14 tracking-spline)": { + "args": ["this", "sampler"], + "vars": { + "v1-0": "cur-pt" + } + }, + "(method 15 tracking-spline)": { + "args": ["this"], + "vars": { + "s5-0": "sampler", + "a2-0": "sample-pos", + "v1-15": "cur-pt", + "a0-14": "next-pt", + "a1-1": "best-pt", + "f0-2": "best-dot", + "f1-2": "dot" + } + }, + "(method 16 tracking-spline)": { + "args": ["this", "budget"], + "vars": { + "s4-0": "sampler", + "a2-0": "sample-pos", + "s4-1": "cur-pt", + "v1-11": "next-pt" + } + }, + "(method 17 tracking-spline)": { + "args": ["this", "new-pos", "min-dist", "prune-budget", "can-prune"], + "vars": { + "s3-0": "free-pt", + "s2-0": "tail-pt" + } + }, + "(method 18 tracking-spline)": { + "args": ["this", "arc-len", "out-pos", "sampler"], + "vars": { + "f0-4": "advanced", + "s5-0": ["sample-pos", "vector"], + "a2-5": "next-pt", + "f0-7": "remaining-segment" + } + }, + "(method 19 tracking-spline)": { + "args": ["this", "arc-len", "out-pos", "sampler"] + }, + "(method 20 tracking-spline)": { + "args": ["this", "move", "stop-pt"], + "vars": { + "s3-0": "trail-dir", + "s2-0": "seg-dir", + "f0-0": "chord-len", + "f1-1": "span-boost-raw", + "f1-2": "span-boost", + "f30-0": "correction-scale", + "f0-1": "chord-to-arc", + "f0-2": "straightness-bias", + "f1-9": "straightness-scale", + "f28-0": "alignment-weight", + "v1-8": "cur-pt", + "s1-0": "next-pt", + "f0-4": "segment-len", + "f0-5": "half-segment-len", + "f26-0": "correction", + "f2-7": "forward-dot" + } + }, + "(method 21 tracking-spline)": { + "args": ["this", "pos", "accel", "max-speed"], + "vars": { + "v1-0": "cur-pt", + "f0-0": "partial", + "f1-0": "trail-len", + "f1-1": "remaining-len", + "f2-5": "desired-speed", + "f2-8": "speed-step", + "f1-8": "updated-trail-len", + "f2-14": "updated-remaining-len", + "f2-16": "sample-len-step", + "s4-0": "sampler", + "a2-3": "cursor-pt", + "s4-1": "delta", + "s3-0": "i" + } + }, + "(method 22 tracking-spline)": { + "args": ["this", "max-len"], + "vars": { + "s5-0": "sampler", + "a2-0": "tmp-pos" + } + }, + "cam-slave-init-vars": { + "vars": { + "v1-9": "tracker", + "a3-0": "combiner-matrix", + "a0-1": "matrix-row-0", + "a1-0": "matrix-row-1", + "a2-0": "matrix-row-2", + "a3-1": "matrix-row-3", + "a2-1": "init-tracker", + "a3-2": "init-matrix", + "v1-12": "init-row-0", + "a0-2": "init-row-1", + "a1-1": "init-row-2", + "a3-3": "init-row-3" + } + }, + "cam-slave-init": { + "args": ["initial-state", "camera-entity"], + "vars": { + "v1-7": "voicebox-state", + "a0-4": "call-arg", + "a1-3": "activation-event", + "t9-4": "send-event-fn", + "t9-5": "state-enter-fn", + "t9-6": "enter-state-fn" + } + }, + "cam-standard-event-handler": { + "args": ["sender", "event-id", "event-type", "message"], + "vars": { + "v1-1": "next-state-value", + "t9-0": "enter-state-fn", + "s5-0": "next-state", + "t9-2": "state-enter-fn", + "t9-3": "enter-state-fn" + } + }, + "cam-curve-pos": { + "args": ["pos", "tangent", "path", "use-follow-point?"], + "vars": { + "s5-0": "curve-offset", + "s2-0": "tangent-sample", + "f0-18": "spline-t", + "s3-1": "reference-pos" + } + }, + "cam-curve-setup": { + "args": ["camera-pos"] + }, + "merc-death-spawn": { + "args": ["effect-id", "position", "surface-normal"], + "vars": { + "v1-2": "launcher" + } + }, + "cam-free-floating-input": { + "args": ["rotation-delta", "translation-delta", "allow-roll?", "controller-index"], + "vars": { + "f28-14": "left-x-input", + "f30-14": "left-y-input", + "f24-0": "right-x-input", + "f26-0": "right-y-input" + } + }, + "cam-free-floating-move": { + "args": ["camera-matrix", "camera-position", "up", "controller-index"], + "vars": { + "s3-0": "move-info" + } + }, + "(code cam-orbit)": { + "vars": { + "f0-0": "zoom-input", + "f0-20": "orbit-input", + "gp-0": "camera-angles", + "s5-0": "target-to-camera" + } + }, + "(enter cam-orbit)": { + "vars": { + "v1-4": "target-to-camera" + } + }, + "(code cam-free-floating)": { + "vars": { + "a2-0": "up" + } + }, + "(code cam-point-watch)": { + "vars": { + "s5-0": "rotation-delta", + "gp-0": "translation-delta", + "f28-0": "left-x-input", + "f30-0": "left-y-input", + "f26-0": "right-x-input", + "f0-0": "right-y-input", + "s4-0": "forward", + "s3-0": "rotation-matrix" + } + }, + "plane-from-points": { + "args": ["planes", "edge-a", "edge-b", "point", "plane-index"], + "vars": { + "s4-0": "normal" + } + }, + "set-point": { + "args": ["point", "x", "y", "z"] + }, + "update-view-planes": { + "args": ["camera", "planes", "scale"], + "vars": { + "s5-0": "frustum", + "f30-0": "near-half-width", + "f26-0": "near-half-height", + "f28-0": "far-half-width", + "f24-0": "far-half-height", + "s2-0": "far-top-left-ray", + "s3-1": "far-top-right-ray", + "s1-0": "far-bottom-left-ray", + "s0-0": "far-bottom-right-ray", + "sv-240": "camera-position" + } + }, + "update-visible": { + "args": ["camera"], + "vars": { + "a0-16": "use-adjacent?", + "s3-0": "adjacent-vis", + "s4-0": "self-vis", + "s5-0": "i", + "v1-4": "active-level", + "gp-1": "i", + "s5-1": "active-level", + "a2-0": "quad-count", + "v1-32": "use-self?", + "v1-40": "i", + "a0-22": "vis-info", + "v1-50": "i", + "a0-27": "vis-info" + } + }, + "move-camera-from-pad": { + "args": ["camera"], + "vars": { + "v1-0": "mode", + "s5-0": "controller-index", + "s4-1": "up", + "a2-2": "destination-matrix", + "a3-1": "source-matrix", + "v1-11": "row-0", + "a0-14": "row-1", + "a1-2": "row-2", + "a3-2": "row-3" + } + }, + "update-camera": { + "vars": { + "gp-1": "i", + "s5-1": "active-level", + "a0-14": "camera-to-level", + "a2-9": "destination-matrix", + "a3-4": "source-matrix", + "v1-86": "row-0", + "a0-29": "row-1", + "a1-10": "row-2", + "a3-5": "row-3", + "a2-10": "destination-matrix", + "a3-6": "source-matrix", + "v1-87": "row-0", + "a0-30": "row-1", + "a1-11": "row-2", + "a3-7": "row-3", + "v1-100": "destination-matrix", + "a3-8": "source-matrix", + "a0-36": "row-0", + "a1-12": "row-1", + "a2-11": "row-2", + "a3-9": "row-3", + "v1-101": "destination-matrix", + "a3-10": "source-matrix", + "a0-38": "row-0", + "a1-13": "row-1", + "a2-12": "row-2", + "a3-11": "row-3", + "f0-28": "mip-fov", + "gp-2": "smooth-rotation", + "v1-124": "destination-matrix", + "a3-13": "source-matrix", + "a0-45": "row-0", + "a1-18": "row-1", + "a2-14": "row-2", + "a3-14": "row-3", + "v1-136": "previous-view-projection", + "a3-16": "view-projection", + "a0-50": "row-0", + "a1-20": "row-1", + "a2-16": "row-2", + "a3-17": "row-3", + "gp-3": "view-projection", + "s4-1": "view-matrix", + "s5-2": "inverse-view-matrix", + "s3-0": "camera-position", + "s2-0": "negative-camera-position", + "v1-148": "previous-view-projection", + "a3-18": "view-projection", + "a0-54": "row-0", + "a1-23": "row-1", + "a2-19": "row-2", + "a3-19": "row-3", + "f0-45": "fog-min", + "f1-10": "fog-max", + "f2-0": "near-distance", + "v1-160": "hvdf-offset", + "a0-56": "hvdf-offset" + } + }, + "(method 0 vol-control)": { + "args": ["allocation", "type-to-make", "owner"], + "vars": { + "gp-0": "this", + "s5-1": "resource", + "s5-2": "resource", + "s4-0": "first-tag-index", + "s4-1": "first-tag-index", + "s3-0": "tag-index", + "s3-1": "tag-index", + "s2-0": "tag", + "s2-1": "tag", + "v1-12": "plane-data", + "v1-31": "plane-data", + "a0-8": "volume-record", + "a0-19": "volume-record" + } + }, + "cam-layout-print": { + "args": ["x", "y", "text"], + "vars": { + "s5-0": "dma-buf", + "gp-0": "packet-start", + "a3-4": "tail-tag", + "v1-4": "packet" + } + }, + "cam-layout-intersect-dist": { + "args": ["plane", "point", "direction"], + "vars": { + "f0-1": "point-dot", + "f1-1": "direction-dot" + } + }, + "cam-layout-entity-volume-info-create": { + "args": ["camera", "volume-type"], + "vars": { + "s4-0": "property-index", + "sv-16": "tag", + "s3-0": "planes", + "s2-0": "descriptor", + "s1-0": "plane-index", + "sv-192": "point-on-plane", + "sv-208": "line-direction", + "sv-224": "in-plane-direction", + "sv-240": "candidate-point", + "s0-0": "point-sum", + "sv-256": "points-added", + "sv-272": "other-plane-index", + "f0-6": "line-distance", + "sv-160": "segment-start", + "sv-164": "segment-distance", + "sv-168": "clip-count", + "sv-176": "clip-plane", + "sv-288": "clip-plane-index", + "f30-0": "clip-distance", + "v1-87": "test-plane-index" + } + }, + "cam-layout-entity-volume-info": { + "vars": { + "gp-0": "volume-index", + "s5-0": "descriptor", + "a0-7": "color", + "s4-0": "segment", + "s3-0": "segment-index" + } + }, + "v-slrp!": { + "args": ["dst", "from", "to", "t"], + "vars": { + "s2-0": "from-unit", + "s1-0": "to-unit", + "s0-0": "cross", + "f30-0": "sin-angle", + "f28-0": "angle" + } + }, + "interp-test": { + "args": ["interpolator", "info"], + "vars": { + "s3-0": "current", + "gp-0": "previous", + "s2-0": "i" + } + }, + "interp-test-deg": { + "args": ["interpolator", "info"], + "vars": { + "s3-0": "current", + "gp-0": "previous", + "s2-0": "i" + } + }, + "cam-layout-entity-info": { + "args": ["camera"], + "vars": { + "s5-0": "camera-rotation", + "s4-0": "camera-position", + "s5-1": "pivot", + "s5-2": "align", + "s5-3": "interesting", + "s3-1": "camera-curve", + "s2-0": "previous-point", + "s5-4": "curve-point", + "s4-1": "camera-curve-offset", + "s1-1": "i", + "s3-2": "intro-curve", + "s2-1": "previous-point", + "s5-5": "curve-point", + "s4-2": "intro-curve-offset", + "s1-2": "camera-curve", + "s1-3": "i", + "s2-3": "camera-points", + "v1-95": "camera-points-offset", + "s4-3": "camera-point-a", + "s3-3": "camera-point-b", + "s5-6": "camera-point", + "s4-4": "focal-pull-points", + "s5-7": "focal-pull-point", + "s5-8": "test-info", + "s4-5": "test-axis" + } + }, + "clmf-input": { + "args": ["rotation-input", "translation-input", "pad-index"], + "vars": { + "s5-1": "camera-basis", + "a2-8": "world-down" + } + }, + "clmf-pos-rot": { + "args": ["position-property", "rotation-property"], + "vars": { + "s3-1": "position", + "s2-0": "rotation", + "s5-0": "rotation-input", + "s4-0": "translation-input", + "s1-1": "incremental-rotation", + "sv-192": "camera-rotation", + "s0-1": "new-rotation" + } + }, + "clmf-next-volume": { + "args": ["delta"] + }, + "clmf-next-vol-dpad": { + "vars": { + "a0-1": "delta" + } + }, + "clmf-next-entity": { + "args": ["byte-step"], + "vars": { + "v1-0": "delta", + "v1-8": "entities-left", + "a0-13": "node", + "a1-3": "next-node", + "a0-14": "camera" + } + }, + "fov->maya": { + "args": ["fov"] + }, + "cam-layout-save-cam-rot": { + "args": ["print?", "output", "camera"], + "vars": { + "s3-0": "setup-rotation", + "s5-0": "rotation-offset" + } + }, + "cam-layout-save-pivot": { + "args": ["print?", "output", "camera"], + "vars": { + "s2-0": "base-position", + "s3-0": "get-property-struct", + "s5-1": "offset", + "s3-1": "final-position" + } + }, + "cam-layout-save-align": { + "args": ["print?", "output", "camera"], + "vars": { + "s2-0": "base-position", + "s3-0": "get-property-struct", + "s5-1": "offset", + "s3-1": "final-position" + } + }, + "cam-layout-save-interesting": { + "args": ["print?", "output", "camera"], + "vars": { + "s2-0": "base-position", + "s3-0": "get-property-struct", + "s5-1": "offset", + "s3-1": "final-position" + } + }, + "cam-layout-save-fov": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-focalpull": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-flags": { + "args": ["print?", "output", "camera"] + }, + "cam-layout-save-focalpull-flags": { + "args": ["print?", "output", "camera"] + }, + "cam-layout-save-campoints-flags": { + "args": ["print?", "output", "camera"] + }, + "cam-layout-save-introsplinetime": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-introsplineexitval": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-interptime": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-splineoffset": { + "args": ["print?", "output", "camera"], + "vars": { + "s4-1": "offset" + } + }, + "cam-layout-save-spline-follow-dist-offset": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "offset" + } + }, + "cam-layout-save-campointsoffset": { + "args": ["print?", "output", "camera"], + "vars": { + "s5-0": "offset" + } + }, + "cam-layout-save-tiltAdjust": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-stringMinLength": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-stringMaxLength": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-stringMinHeight": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-stringMaxHeight": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-stringCliffHeight": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "cam-layout-save-maxAngle": { + "args": ["print?", "output", "camera"], + "vars": { + "f30-0": "base-value", + "s3-0": "get-property-value-float", + "f28-0": "offset" + } + }, + "clmf-save-single": { + "args": ["camera", "print?", "named-file?"], + "vars": { + "s4-2": "output" + } + }, + "clmf-save-one": { + "args": ["options"], + "vars": { + "s5-1": "print?", + "gp-1": "named-file?" + } + }, + "clmf-save-all": { + "args": ["options"], + "vars": { + "s5-1": "print?", + "gp-1": "named-file?", + "v1-5": "node", + "s4-0": "next-node", + "a0-4": "camera" + } + }, + "clmf-cam-flag-toggle": { + "args": ["scaled-bit-mask", "property"], + "vars": { + "s4-0": "bit", + "gp-0": "info", + "s3-0": "get-property-value", + "s2-0": "on-property-owner", + "s3-1": "get-property-value", + "s2-1": "off-property-owner" + } + }, + "clmf-cam-flag": { + "args": ["text", "scaled-bit-mask", "property"], + "vars": { + "s5-0": "bit", + "f30-0": "key", + "s3-0": "get-property-value", + "s2-0": "off-property-owner", + "s3-1": "get-property-value", + "s2-1": "on-property-owner" + } + }, + "clmf-cam-float-adjust": { + "args": ["property", "scale-pointer"], + "vars": { + "f30-0": "current-value", + "f0-0": "scale", + "f0-2": "new-value" + } + }, + "clmf-cam-meters": { + "args": ["text", "property"], + "vars": { + "f0-0": "value" + } + }, + "clmf-cam-fov": { + "args": ["text", "unused"] + }, + "clmf-cam-deg": { + "args": ["text", "property"] + }, + "clmf-cam-intro-time": { + "args": ["text", "unused"], + "vars": { + "f30-0": "intro-step" + } + }, + "clmf-cam-interp-time": { + "args": ["text", "unused"] + }, + "clmf-cam-float": { + "args": ["text", "property"] + }, + "clmf-cam-string": { + "args": ["text", "property"], + "vars": { + "sv-16": "tag", + "s5-1": "values", + "s4-0": "i" + } + }, + "cam-layout-do-action": { + "args": ["action"], + "vars": { + "s5-0": "target" + } + }, + "cam-layout-function-call": { + "args": ["function-symbol", "text", "param0", "param1"], + "vars": { + "gp-0": "resolved-function" + } + }, + "cam-layout-do-menu": { + "args": ["menu"], + "vars": { + "s5-0": "camera-name-y", + "s4-0": "camera-state", + "s3-0": "camera", + "s5-1": "title-y", + "s4-1": "item-y", + "s5-2": "item-index", + "s4-2": "list-y", + "s3-1": "list", + "s2-1": "list-item-index", + "s3-2": "item", + "s5-3": "item-index", + "s4-3": "list", + "s3-3": "delta", + "s2-2": "action-index" + } + }, + "cam-layout-init": { + "vars": { + "v1-2": "node", + "a0-2": "next-node" + } + }, + "cspace-by-name": { + "args": ["owner-drawable", "name"], + "vars": { + "s4-0": "node-count", + "s3-0": "i", + "s2-0": "node" + } + }, + "cspace-index-by-name": { + "args": ["owner-drawable", "name"], + "vars": { + "s4-0": "joint-index", + "s3-0": "node-count", + "s2-0": "i", + "v1-3": "node" + } + }, + "vector<-cspace!": { + "args": ["destination", "cspace-node"] + }, + "vector<-cspace+vector!": { + "args": ["destination", "cspace-node", "local-position"] + }, + "cspace-children": { + "args": ["owner-drawable", "parent-index"], + "vars": { + "a3-0": ["children", "pair"], + "s4-0": "i" + } + }, + "cspace-inspect-tree": { + "args": ["owner-drawable", "node", "depth", "branch-mask", "display-mode"], + "vars": { + "v0-3": "inspect-result", + "v1-11": "mode", + "s1-0": "saved-print-column", + "s2-1": ["children", "pair"], + "a0-19": "children-object", + "s1-2": "children-left", + "a1-10": "child" + } + }, + "(method 0 draw-control)": { + "args": ["allocation", "type-to-make", "owner-process", "joint-geometry"], + "vars": { + "v0-0": "control" + } + }, + "(method 10 draw-control)": { + "args": ["this", "requested-lod"], + "vars": { + "v1-1": "selected-lod" + } + }, + "(method 11 draw-control)": { + "args": ["this", "new-lods"], + "vars": { + "a1-2": "selected-lod" + } + }, + "(method 9 lod-set)": { + "args": ["this", "skeleton-group-data", "art-group-data", "owner-entity"], + "vars": { + "s4-0": "skeleton-spec", + "s5-0": "art-resources", + "v1-0": "art-element-count", + "s3-0": "max-lod", + "a0-1": "i", + "v1-13": "joint-geometry", + "sv-16": ["distance-tag", "res-tag"], + "v1-14": "distance-overrides", + "a0-6": "i" + } + }, + "make-nodes-from-jg": { + "args": ["joint-geometry", "skeleton-template", "allocation"], + "vars": { + "gp-0": "nodes", + "v0-1": "allocated-bones", + "s4-1": "bones", + "s3-0": "node-index", + "s1-0": "joint-data", + "s2-0": "parent-index", + "v1-10": "root-node", + "a0-6": "node-data", + "v1-14": "matrix-node", + "v1-17": "first-joint-node", + "a1-9": "joint-node", + "v1-29": "node" + } + }, + "fill-skeleton-cache": { + "args": ["owner-drawable"], + "vars": { + "v1-0": "nodes", + "a0-2": "bone-array", + "a1-0": "i", + "a3-0": "node", + "a2-3": "cache-record", + "t0-3": "parent-joint-number" + } + }, + "execute-math-engine": { + "vars": { + "gp-0": "matrix-engine", + "s5-0": "i", + "a0-1": "queued-drawable" + } + }, + "(method 17 process-drawable)": { + "args": ["this"], + "vars": { + "s5-0": "joint-count", + "s4-0": "frame-node-count", + "s4-1": "i", + "v1-25": "special-node", + "t9-3": "transform-function", + "s4-2": "i", + "a0-15": "matrix-node", + "a1-5": "matrix-data", + "t9-4": "transform-function", + "s4-3": "joint-node-base", + "s3-0": "i", + "a0-17": "joint-node", + "a1-7": "joint-transform", + "v1-54": "origin-joint-index" + } + }, + "(method 18 process-drawable)": { + "args": ["this"] + }, + "draw-joint-spheres": { + "args": ["owner-drawable"], + "vars": { + "s5-0": "i", + "a2-0": "position" + } + }, + "(code process-drawable-art-error)": { + "args": ["resource-kind"], + "vars": { + "s5-0": "draw-text", + "s4-0": "debug-enabled?", + "s3-0": "debug-bucket" + } + }, + "(method 14 process-drawable)": { + "args": ["this", "skeleton-group-data", "skeleton-template"], + "vars": { + "s1-0": "resource-level", + "s4-0": "art-group-data", + "sv-16": "joint-geometry", + "sv-20": "art-element-count", + "s3-0": "control", + "v0-3": "new-control", + "v1-26": "control-data", + "v1-28": "shadow-index", + "s0-0": "shadow-geometry", + "v1-32": "entity-options", + "v1-43": "texture-bucket", + "a0-39": "resource-level-index", + "a2-10": ["channel-count", "int"], + "v0-13": "new-controller", + "s2-1": "joint-controller", + "s1-1": "root-channel", + "gp-1": "collision-root" + } + }, + "(method 15 process-drawable)": { + "args": ["this", "name", "skeleton-template"], + "vars": { + "s3-0": "symbol-converter", + "s3-1": "skeleton-group-data" + } + }, + "(method 19 process-drawable)": { + "args": ["this"], + "vars": { + "gp-0": "joint-controller", + "s4-0": "channel-count", + "s3-0": "i", + "s2-0": "channel", + "s1-0": "animation", + "v1-7": "command", + "v1-16": "expected-animation-type", + "v1-26": "i", + "a0-17": "effects" + } + }, + "ja-done?": { + "args": ["channel-index"], + "vars": { + "v1-2": "channel" + } + }, + "ja-min?": { + "args": ["channel-index"] + }, + "ja-max?": { + "args": ["channel-index"], + "vars": { + "v1-2": "channel" + } + }, + "ja-num-frames": { + "args": ["channel-index"] + }, + "ja-frame-num": { + "args": ["channel-index"] + }, + "ja-aframe-num": { + "args": ["channel-index"], + "vars": { + "a0-2": "channel", + "v1-2": "animation" + } + }, + "ja-aframe": { + "args": ["artist-frame", "channel-index"], + "vars": { + "v1-3": "animation" + } + }, + "ja-speed": { + "args": ["channel-index"] + }, + "ja-step": { + "args": ["channel-index"] + }, + "ja-channel-set!": { + "args": ["channel-count"], + "vars": { + "v1-6": "i" + } + }, + "ja-channel-push!": { + "args": ["channel-count", "blend-time"], + "vars": { + "v1-26": "i", + "v1-31": "blend-channel" + } + }, + "joint-control-reset!": { + "args": ["controller", "channel"], + "vars": { + "v1-2": ["group-start", "joint-control-channel"], + "s5-0": "group-start-index", + "s4-0": "channel-sub-index" + } + }, + "ja-eval": { + "vars": { + "gp-0": "channel", + "s5-0": "channel-end", + "s4-0": "evaluation-time" + } + }, + "ja-blend-eval": { + "vars": { + "gp-0": "root-channel", + "s5-0": "channel", + "s4-0": "evaluation-time" + } + }, + "ja-post": { + "vars": { + "gp-1": "force-update?", + "v1-24": "matrix-engine" + } + }, + "rider-post": { + "vars": { + "gp-0": "root-shape" + } + }, + "pusher-post": { + "vars": { + "gp-0": "root-shape" + } + }, + "(method 9 joint-control)": { + "args": ["this"], + "vars": { + "s5-0": "channel-end", + "s4-0": "channel", + "gp-0": ["distance-stack", "(pointer float)"] + } + }, + "process-drawable-delay-player": { + "args": ["delay"] + }, + "process-drawable-fuel-cell-handler": { + "args": ["sender", "unused-param", "event", "message"] + }, + "process-drawable-birth-fuel-cell": { + "args": ["source-entity", "position", "instant-collect?"], + "vars": { + "v1-0": "spawn-entity", + "gp-0": "spawn-position", + "s5-0": "task", + "s4-0": "pickup-options" + } + }, + "process-drawable-valid?": { + "args": ["owner-drawable"], + "vars": { + "s5-0": "all-valid?", + "s4-0": "i", + "s3-0": "node", + "s4-1": "channel-count", + "s3-1": "i", + "s2-0": "channel" + } + }, + "find-hint-control-index": { + "args": ["hint-id"], + "vars": { + "gp-0": "result-index", + "v1-2": "hint-count", + "a0-2": "i" + } + }, + "start-hint-timer": { + "args": ["hint-id"], + "vars": { + "v1-0": "hint-index" + } + }, + "increment-success-for-hint": { + "args": ["hint-id"], + "vars": { + "gp-0": "hint-index" + } + }, + "can-hint-be-played?": { + "args": ["hint-id", "speaker", "text"], + "vars": { + "v1-0": "eligible?", + "v1-16": "hint-index", + "gp-1": "hint-control", + "a0-24": "time-since-last-call", + "v1-21": "delay-complete?" + } + }, + "reset-all-hint-controls": { + "vars": { + "v1-2": "hint-count", + "a0-1": "i", + "a1-2": "hint-control" + } + }, + "update-task-hints": { + "vars": { + "a0-0": "level-index", + "v1-7": "task-hint-groups", + "a0-3": "task-data-index", + "gp-0": "task-hints", + "s5-0": "time-in-level", + "s4-0": "i" + } + }, + "(method 8 drawable-ambient)": { + "vars": { + "v1-6": "object-size" + } + }, + "(method 8 drawable-inline-array-ambient)": { + "vars": { + "v1-7": "header-size", + "s3-0": "i" + } + }, + "level-hint-process-cmd": { + "args": ["commands", "command-index", "command-count"], + "vars": { + "v1-2": "command", + "gp-0": "next-index", + "a0-2": "task", + "a1-2": "selected-command", + "v1-15": "status" + } + }, + "level-hint-task-process": { + "args": ["owner-entity", "default-text-id", "text"], + "vars": { + "gp-0": "resolved-text-id", + "s5-0": "command-index", + "sv-16": "commands-tag", + "s4-1": "commands" + } + }, + "can-grab-display?": { + "args": ["requester"], + "vars": { + "v1-2": "current-owner" + } + }, + "level-hint-spawn": { + "args": ["hint-text-id", "stream-name", "owner-entity", "parent-process-tree", "task"], + "vars": { + "s3-1": "resolved-text-id" + } + }, + "ambient-hint-spawn": { + "args": ["stream-name", "position", "parent-process-tree", "mode"] + }, + "kill-current-level-hint": { + "args": ["include-modes", "exclude-modes", "event-name"], + "vars": { + "s4-0": "active-hint" + } + }, + "ambient-hint-init-by-other": { + "args": ["stream-name", "position", "mode"] + }, + "(code level-hint-sidekick)": { + "args": ["stream-name"], + "vars": { + "s5-1": "play-sound", + "s4-1": "convert-sound-name", + "s5-2": "playing-sound-id", + "s4-3": "load-start-time" + } + }, + "(code level-hint-ambient-sound)": { + "args": ["stream-name"], + "vars": { + "s5-0": "play-positional-sound", + "s4-0": "convert-positional-sound-name", + "s5-1": "play-global-sound", + "s4-2": "convert-global-sound-name", + "s5-2": "load-start-time" + } + }, + "(code level-hint-error)": { + "args": ["prefix", "suffix"], + "vars": { + "s3-0": "text-context", + "s2-0": "draw-text" + } + }, + "ambient-type-error": { + "args": ["ambient-drawable", "query-position"], + "vars": { + "s2-0": "ambient-entity" + } + }, + "ambient-type-poi": { + "args": ["ambient-drawable", "query-position"] + }, + "ambient-type-hint": { + "args": ["ambient-drawable", "query-position"], + "vars": { + "s5-0": "resolved-text-id", + "a1-3": "text-context" + } + }, + "ambient-type-sound": { + "args": ["ambient-drawable", "query-position"], + "vars": { + "s5-0": "ambient-entity", + "s4-0": "scheduled-time", + "v1-5": "cycle-speed", + "f30-0": "effect-index", + "sv-16": "effect-sound-name", + "s4-2": "spec", + "sv-112": "effect-param-tag", + "a1-7": "effect-params" + } + }, + "ambient-type-sound-loop": { + "args": ["ambient-drawable", "query-position"], + "vars": { + "s5-0": "ambient-entity", + "s2-0": "effect-sound-name", + "s3-0": "effect-param-tag", + "s4-0": "spec", + "t9-2": "apply-effect-params", + "a0-5": "sound-spec-arg", + "v1-8": "effect-entity", + "a1-2": "effect-param" + } + }, + "ambient-type-light": { + "args": ["ambient-drawable", "query-position"], + "vars": { + "s4-0": "ambient-entity", + "s5-0": "inside?", + "s3-0": "first-volume-tag-index", + "s2-0": "volume-tag-index", + "s1-0": "volume-tag", + "v1-8": "planes", + "a0-6": "i" + } + }, + "ambient-type-dark": { + "args": ["ambient-drawable", "query-position"], + "vars": { + "s4-0": "ambient-entity", + "s5-0": "inside?", + "s3-0": "first-volume-tag-index", + "s2-0": "volume-tag-index", + "s1-0": "volume-tag", + "v1-8": "planes", + "a0-6": "i" + } + }, + "ambient-type-weather-off": { + "args": ["ambient-drawable", "query-position"], + "vars": { + "s4-0": "ambient-entity", + "s5-0": "inside?", + "s3-0": "first-volume-tag-index", + "s2-0": "volume-tag-index", + "s1-0": "volume-tag", + "v1-8": "planes", + "a0-6": "i" + } + }, + "ambient-type-ocean-off": { + "args": ["ambient-drawable", "query-position"] + }, + "ambient-type-ocean-near-off": { + "args": ["ambient-drawable", "query-position"] + }, + "ambient-type-music": { + "args": ["ambient-drawable", "query-position"], + "vars": { + "gp-0": "ambient-entity", + "f0-0": "priority" + } + }, + "(method 17 drawable-ambient)": { + "args": ["this", "query-sphere", "count", "result"], + "vars": { + "s2-0": "i" + } + }, + "(method 17 drawable-inline-array-ambient)": { + "args": ["this", "query-sphere", "count", "result"] + }, + "(method 17 drawable-tree-ambient)": { + "args": ["this", "query-sphere", "count", "result"] + }, + "(method 28 entity-ambient)": { + "args": ["this"], + "vars": { + "s5-0": "effect-name", + "a0-7": "cycle-speed", + "s5-1": "first-effect-tag-index", + "s4-0": "effect-tag-index", + "v1-14": "effect-tag", + "v1-28": "effect-param-tag", + "s5-2": "poi-effect-name", + "s5-3": "hint-effect-name" + } + }, + "(method 18 drawable-ambient)": { + "args": ["this", "query-position"] + }, + "(method 14 level-hint)": { + "args": ["this"], + "vars": { + "s5-0": "text-context" + } + }, + "clone-anim-once": { + "args": ["source-handle", "origin-joint-index", "copy-transform?", "prefix"], + "vars": { + "s5-0": "source", + "s4-1": "root", + "a0-7": "collision-root", + "s5-1": "drawable-self", + "v1-37": "manipy-self", + "a0-22": "effects" + } + }, + "clone-anim": { + "args": ["source-handle", "origin-joint-index", "unused-copy-transform?", "prefix"] + }, + "(method 11 swingpole)": { + "args": ["this", "source-entity"] + }, + "(method 11 process-hidden)": { + "args": ["this", "source-entity"] + }, + "(event manipy-idle)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-0": "result", + "v1-30": "grabbed-process", + "s5-0": "rotation-matrix", + "v1-47": "was-hidden?", + "gp-1": "saved-skeleton-status", + "v1-73": "root-channel" + } + }, + "(trans manipy-idle)": { + "vars": { + "v1-20": "grabbed-process", + "gp-1": "grabbed-position" + } + }, + "(code manipy-idle)": { + "vars": { + "gp-0": "parent-drawable", + "v1-29": ["v1-29", "(pointer process)"] + } + }, + "manipy-init": { + "args": ["position", "source-entity", "skel-group", "collision-option"], + "vars": { + "s4-1": "moving-root", + "s3-1": "moving-sphere", + "s4-2": "collectable-root", + "s2-0": "collectable-sphere" + } + }, + "(method 10 part-tracker)": { + "args": ["this"] + }, + "part-tracker-notify": { + "vars": { + "gp-0": "notification", + "s5-0": "send-event-fn", + "s4-0": "parent-process" + } + }, + "(code part-tracker-process)": { + "vars": { + "gp-0": "target-process", + "gp-1": "emission-position", + "gp-2": "linger-start-time" + } + }, + "part-tracker-init": { + "args": ["launch-group", "duration", "frame-callback", "userdata", "target-process", "origin"] + }, + "command-get-process": { + "args": ["process-spec", "default-process"], + "vars": { + "v1-6": "sidekick-pointer", + "v1-9": "parent-pointer", + "v1-13": "tracker" + } + }, + "command-get-camera": { + "args": ["camera-spec", "default-camera"] + }, + "command-get-trans": { + "args": ["position-spec", "default-position"], + "vars": { + "s4-0": "target-process", + "v1-4": "joint-index" + } + }, + "process-grab?": { + "args": ["target-spec"], + "vars": { + "gp-0": "target-process" + } + }, + "process-release?": { + "args": ["target-spec"], + "vars": { + "gp-0": "target-process" + } + }, + "camera-change-to": { + "args": ["camera-spec", "transition-time", "blend-from-fixed?"], + "vars": { + "gp-0": "camera-selection" + } + }, + "camera-look-at": { + "args": ["target-spec", "joint-index"], + "vars": { + "gp-0": "target-process" + } + }, + "ja-anim-done?": { + "args": ["target-spec"], + "vars": { + "gp-0": "target-process", + "s5-0": "saved-pp", + "v0-1": "done?" + } + }, + "camera-pov-from": { + "args": ["target-spec", "joint-index"], + "vars": { + "gp-0": "target-process", + "v1-11": "camera-joint" + } + }, + "camera-anim": { + "args": ["camera-skeleton", "animation-name", "position"], + "vars": { + "s2-0": "helper-process", + "gp-0": "helper-pointer", + "t9-1": "activate-helper" + } + }, + "(method 14 camera-tracker)": { + "args": ["this", "command"], + "vars": { + "gp-0": "result", + "a2-0": "command-name", + "s4-0": "command-args", + "s3-0": "while-condition", + "s2-0": "while-body", + "a1-3": "while-command", + "s3-1": "until-condition", + "s2-1": "until-body", + "a1-5": "until-command", + "s5-1": "wait-time", + "s5-2": "recipient-process", + "s3-2": "event-name", + "s4-2": "event-params", + "gp-1": "event-block", + "a0-22": "params-to-count", + "s4-3": "callback", + "a0-38": "grab-target", + "a1-25": "camera-event-block", + "s2-2": "art-name", + "s3-3": "animation-name", + "s4-4": "position", + "s1-0": "intern-symbol", + "s2-3": "camera-skeleton", + "s1-1": "helper-process", + "t9-35": "activate-helper" + } + }, + "(event camera-tracker-process)": { + "vars": { + "v0-0": "event-value" + } + }, + "camera-tracker-init": { + "args": ["script-or-function"], + "vars": { + "gp-1": "parent-process", + "v1-17": "valid-parent-process" + } + }, + "(code med-res-level-idle)": { + "vars": { + "a0-1": "loaded-level", + "v1-3": "continue-level", + "v1-36": "draw-control", + "a0-18": "bounds-vector", + "v1-37": "bounds-x" + } + }, + "(method 11 part-spawner)": { + "args": ["this", "source-entity"], + "vars": { + "sv-16": "art-name-tag", + "s5-1": "art-name-slot", + "s2-0": "art-name", + "s3-0": "part-group-slot", + "s4-0": "part-group-name", + "a0-19": "part-group" + } + }, + "(event part-spawner-active)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-1": "position-quad" + } + }, + "cam-launcher-joystick": { + "vars": { + "s5-0": "yaw-rotation", + "gp-0": "camera-offset", + "f0-0": "stick-input", + "f1-1": "unclamped-yaw", + "f0-2": "yaw-step" + } + }, + "(enter cam-launcher-shortfall)": { + "vars": { + "gp-0": "level-forward" + } + }, + "(code cam-launcher-shortfall)": { + "vars": { + "gp-0": "start-time" + } + }, + "cam-launcher-long-joystick": { + "vars": { + "gp-0": "yaw-rotation", + "f0-0": "stick-input", + "f1-1": "unclamped-yaw", + "f0-2": "yaw-step" + } + }, + "(code cam-launcher-longfall)": { + "vars": { + "gp-0": "start-time", + "s4-0": "target-offset", + "s5-0": "lateral-offset", + "f0-4": "vertical-speed", + "f30-0": "next-vertical-speed", + "f28-0": "vertical-error", + "f28-1": "excess-error", + "f0-8": "eased-speed" + } + }, + "(method 11 launcher)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "trigger-sphere", + "s4-1": "packed-mode", + "v1-18": "level-name", + "v1-24": "camera-mode", + "v1-29": "destination-spec" + } + }, + "launcher-init-by-other": { + "args": ["position", "spring-height", "packed-mode", "active-distance"], + "vars": { + "s2-0": "root-shape", + "s1-0": "trigger-sphere", + "v1-23": "level-name", + "v1-34": "destination-spec" + } + }, + "(trans launcher-idle)": { + "vars": { + "gp-0": "launch-mode" + } + }, + "(exit launcher-active)": { + "vars": { + "v1-0": "sound-command" + } + }, + "(event touch-tracker-idle)": { + "vars": { + "v0-0": "value", + "v1-1": "owner", + "a1-5": "attack-message", + "v1-19": "attack-id", + "t0-5": "forwarded-message" + } + }, + "(code touch-tracker-idle)": { + "vars": { + "gp-0": "target-process", + "a0-4": "target-drawable", + "gp-1": "target-root", + "a0-6": "target-shape", + "a1-3": "overlap-params" + } + }, + "touch-tracker-init": { + "args": ["position", "radius", "duration"], + "vars": { + "s4-0": "tracker-shape", + "s2-0": "trigger-sphere" + } + }, + "process-drawable-random-point!": { + "args": ["drawable", "result"], + "vars": { + "v1-1": "node-count", + "s4-0": "root", + "v1-2": "node-index" + } + }, + "process-drawable-pair-random-point!": { + "args": ["first", "second", "result", "amount"], + "vars": { + "s4-0": "first-point", + "s3-0": "second-point" + } + }, + "birth-func-set-quat": { + "args": ["particle-system", "cpuinfo", "launch-info"], + "vars": { + "a0-1": "launch-info", + "v1-0": "beam-orientation", + "a0-2": "negative-orientation-x", + "a0-3": "positive-orientation-x" + } + }, + "draw-eco-beam": { + "args": ["start", "end"], + "vars": { + "s2-1": "displacement", + "gp-1": "midpoint", + "s4-0": "direction", + "s5-0": "orientation", + "s4-1": "i" + } + }, + "target-danger-set!": { + "args": ["mode", "enlarge?"], + "vars": { + "s4-0": "sphere0", + "s5-0": "sphere1", + "gp-0": "sphere2", + "f30-0": "radius-scale", + "v1-4": "i", + "v1-57": "i", + "v1-71": "i", + "v1-114": "i", + "v1-124": "i", + "v1-148": "i" + } + }, + "target-collide-set!": { + "args": ["mode", "transition"], + "vars": { + "gp-0": "control", + "v1-2": "i", + "v1-22": "i", + "v1-52": "i", + "f30-0": "duck-upright-fraction", + "f30-1": "tube-upright-fraction" + } + }, + "target-align-vel-z-adjust": { + "args": ["velocity-z"], + "vars": { + "f1-0": "slope-z" + } + }, + "(method 16 target)": { + "args": ["this", "options", "alignment-transform", "scale"], + "vars": { + "s2-0": "velocity-scale", + "s3-0": "control-to-world", + "s0-0": "world-to-control", + "s1-0": "gravity-control", + "a1-3": "velocity-control" + } + }, + "average-turn-angle": { + "args": ["target-process"], + "vars": { + "f30-0": "angle-sum", + "s5-0": "i" + } + }, + "can-jump?": { + "args": ["jump-state"] + }, + "fall-test": { + "vars": { + "v1-15": "animation-group" + } + }, + "smack-surface?": { + "args": ["include-actors?"] + }, + "can-exit-duck?": { + "vars": { + "gp-0": "params", + "s5-0": "spheres", + "s4-0": "i" + } + }, + "can-hands?": { + "args": ["require-ground?"] + }, + "vector-local+!": { + "args": ["destination", "local-vector"], + "vars": { + "s5-0": "world-vector" + } + }, + "move-forward": { + "args": ["speed"], + "vars": { + "a1-0": "local-velocity", + "gp-0": "world-velocity" + } + }, + "set-forward-vel": { + "args": ["speed"], + "vars": { + "gp-0": "local-velocity" + } + }, + "delete-back-vel": { + "vars": { + "s5-0": "facing", + "gp-0": "side-velocity", + "f30-0": "forward-speed", + "f0-3": "side-length", + "f1-0": "side-length-copy" + } + }, + "set-side-vel": { + "args": ["speed"], + "vars": { + "gp-0": "local-velocity" + } + }, + "target-timed-invulnerable": { + "args": ["duration", "target-process"] + }, + "target-timed-invulnerable-off": { + "args": ["target-process"] + }, + "(method 9 attack-info)": { + "args": ["this", "incoming"], + "vars": { + "s4-0": "mask", + "s3-0": "receiver-process", + "s2-0": "attacker-process", + "v1-39": "attacker-drawable", + "s3-1": "supplied-attacker-process", + "a0-16": "supplied-attacker-drawable" + } + }, + "ground-tween-initialize": { + "args": ["info", "base-channel", "flat-group", "up-group", "down-group", "left-group", "right-group"], + "vars": { + "s3-0": "i" + } + }, + "ground-tween-update": { + "args": ["info", "slope-z", "slope-x"], + "vars": { + "f0-1": "forward-target", + "f30-0": "side-target", + "f1-5": "forward-difference", + "f0-7": "side-difference" + } + }, + "target-pos": { + "args": ["joint-index"], + "vars": { + "a1-0": "target-process" + } + }, + "target-cam-pos": { + "vars": { + "gp-0": "target-process", + "s5-0": "position" + } + }, + "target-joint-pos": { + "vars": { + "v1-0": "target-process" + } + }, + "target-rot": { + "vars": { + "v1-0": "target-process" + } + }, + "birth-func-copy-target-y-rot": { + "args": ["particle-system", "particle", "launch-info"], + "vars": { + "v1-0": "target-process", + "s5-0": "rotation", + "f0-1": "target-yaw" + } + }, + "birth-func-ground-orient": { + "args": ["particle-system", "particle", "launch-info"], + "vars": { + "v1-11": "negative-result", + "v1-12": "positive-result", + "a1-1": "probe-position", + "s3-0": "hit", + "s5-0": "target-process", + "s2-0": "tilt-axis", + "s4-1": "orientation", + "s3-1": "yaw-rotation" + } + }, + "birth-func-target-orient": { + "args": ["particle-system", "particle", "launch-info"], + "vars": { + "v1-10": "negative-result", + "v1-11": "positive-result", + "sv-16": "target-process", + "s3-0": "tilt-axis", + "s5-0": "orientation", + "s2-0": "ground-normal", + "s3-1": "yaw-rotation" + } + }, + "birth-func-vector-orient": { + "args": ["particle-system", "particle", "launch-info"], + "vars": { + "v1-4": "negative-result", + "v1-5": "positive-result", + "s4-0": "tilt-axis", + "s5-0": "orientation", + "s3-0": "normal-data" + } + }, + "part-tracker-track-target-joint": { + "args": ["particle-system", "particle", "sprite"], + "vars": { + "v1-0": "target-process", + "v1-2": "joint-position" + } + }, + "process-drawable-burn-effect": { + "args": ["duration"], + "vars": { + "s5-1": "original-color", + "s3-0": "start-time", + "s4-1": "parent", + "s2-1": "black", + "v1-8": "elapsed", + "a2-3": "spawn-position" + } + }, + "collide-shape-moving-angle-set!": { + "args": ["cshape", "surface-normal", "velocity"] + }, + "poly-find-nearest-edge": { + "args": ["result", "vertices", "point", "preferred-direction"], + "vars": { + "sv-32": "closest-point", + "sv-36": "nearest-distance", + "sv-40": "nearest-index", + "sv-48": "best-alignment", + "s2-0": "i", + "s0-0": "edge-start", + "sv-80": "edge-end", + "f30-0": "distance", + "s1-1": "edge-direction", + "f0-5": "alignment" + } + }, + "target-collision-low-coverage": { + "args": ["control", "intersection", "contact-normal", "reaction-flags-out", "status-out", "is-wall-out"], + "vars": { + "sv-16": "normal", + "sv-20": "reaction-flags-result", + "sv-24": "status-result", + "sv-28": "is-wall-result", + "sv-32": "reaction-flags", + "sv-40": "status", + "sv-48": "is-wall", + "sv-52": "across-edge-direction", + "sv-56": "edge-direction", + "sv-160": "horizontal-across-edge", + "sv-164": "probe-result", + "sv-208": "probe1-start", + "sv-212": "probe1-motion", + "sv-272": "probe2-start", + "sv-276": "probe2-motion", + "f30-0": "across-dot-input", + "f0-21": "effective-coverage", + "f1-11": "height-above-contact" + } + }, + "target-collision-reaction": { + "args": ["control", "intersection", "velocity-out", "velocity-in"], + "vars": { + "sv-80": "contact-direction", + "sv-84": "contact-normal", + "sv-88": "velocities", + "sv-96": "status", + "sv-104": "reaction-flags", + "sv-160": "is-wall", + "v1-2": "velocity-matrix", + "a0-1": "i", + "a1-3": "push-out", + "v1-23": "primitive-center", + "f30-0": "impact-retention", + "s3-1": "lateral-velocity", + "f28-0": "velocity-along-gravity", + "f0-20": "lateral-speed", + "f1-9": "lateral-speed-copy", + "s3-4": "seam-direction" + } + }, + "target-collision-no-reaction": { + "args": ["control", "intersection", "velocity-out", "velocity-in"], + "vars": { + "s5-0": "history" + } + }, + "build-conversions": { + "args": ["world-velocity"], + "vars": { + "s5-0": "forward", + "v0-7": "gravity-normal" + } + }, + "vector-turn-to": { + "args": ["new-direction"], + "vars": { + "gp-0": "make-facing", + "s5-0": "desired-facing", + "t9-0": "normalize", + "v1-1": "direction" + } + }, + "reverse-conversions": { + "args": ["world-velocity"] + }, + "draw-history": { + "args": ["control"], + "vars": { + "s5-0": "draw-mask", + "v1-15": "history-length", + "v1-19": "previous-record", + "s1-0": "previous-contact", + "s1-1": "contact-color", + "s4-0": "i", + "s2-0": "record", + "s3-0": "last-index" + } + }, + "print-history": { + "args": ["control"], + "vars": { + "s5-0": "i", + "s4-0": "record", + "s3-0": "reaction-flags" + } + }, + "target-print-stats": { + "args": ["player", "output"], + "vars": { + "v1-49": "water-process", + "v1-74": "position", + "s4-6": "print-values", + "s3-6": "output-copy", + "s2-6": "velocity-format", + "s1-6": "velocity-x", + "s0-6": "velocity-y", + "sv-160": "velocity-z", + "sv-176": "gravity-velocity", + "a0-36": "lateral-velocity", + "f0-17": "gravity-velocity-copy", + "f0-18": "lateral-speed" + } + }, + "read-pad": { + "args": ["direction-out"] + }, + "warp-vector-into-surface!": { + "args": ["dst", "src", "surface-normal"], + "vars": { + "a2-2": "rotation" + } + }, + "vector<-pad-in-surface!": { + "args": ["dst", "scale?"], + "vars": { + "a1-1": "pad-direction" + } + }, + "local-pad-angle": { + "vars": { + "a0-1": "pad-direction" + } + }, + "turn-around?": { + "vars": { + "a0-1": "pad-direction", + "gp-0": "normalized-pad", + "t9-2": "normalize", + "a0-2": "velocity-copy", + "f0-1": "direction-dot", + "a1-3": "velocity-history", + "f2-0": "fastest-speed", + "f1-0": "speed-sum", + "a0-3": "fastest-index", + "v1-6": "blocked-time", + "a2-0": "i", + "a3-2": "history-entry", + "a2-6": "j", + "f1-1": "average-speed" + } + }, + "target-move-dist": { + "args": ["time-window"], + "vars": { + "s5-0": "centroid", + "f30-0": "distance-sum", + "gp-0": "sample-count", + "v1-0": "history-offset", + "a1-6": "record", + "s4-0": "i", + "v1-9": "sample" + } + }, + "turn-to-vector": { + "args": ["heading", "magnitude"], + "vars": { + "gp-0": "surface-heading", + "gp-1": "mark-position", + "v1-15": "i", + "f0-6": "turn-angle", + "f0-8": "target-speed" + } + }, + "add-thrust": { + "vars": { + "s5-0": "desired-velocity", + "gp-0": "velocity", + "s4-0": "original-target", + "a1-2": "downhill-world", + "s1-0": "downhill-local", + "s3-1": "downhill-direction", + "s2-1": "low-coverage-tangent", + "s1-1": "tangent-local", + "s2-2": "perpendicular", + "f30-0": "along-tangent", + "f30-1": "downhill-dot", + "s3-2": "desired-xz-direction", + "f30-2": "desired-forward", + "f30-4": "seek-rate", + "s2-3": "blocked-velocity", + "s3-3": "blocked-velocity-local", + "f28-2": "blocked-velocity-gap", + "f0-50": "air-assist", + "s4-2": "velocity-step", + "f30-5": "max-step", + "gp-1": "mark-position", + "t9-8": "normalize-xz", + "a0-13": "desired-velocity-copy", + "v1-31": "desired-direction-copy", + "f0-7": "perpendicular-length", + "f1-3": "perpendicular-length-copy", + "f2-3": "adjusted-tangent-speed", + "t9-12": "normalize-desired-xz", + "a0-17": "desired-xz-copy", + "t9-13": "normalize-velocity-xz", + "a0-18": "velocity-xz-copy", + "v1-43": "velocity-xz-direction", + "f0-11": "desired-speed" + } + }, + "add-gravity": { + "vars": { + "s5-0": "gravity-acceleration", + "gp-0": "gravity-acceleration-local", + "s5-1": "up-local", + "gp-1": "lateral-velocity", + "f30-0": "velocity-along-gravity", + "f0-4": "lateral-speed", + "f1-0": "lateral-speed-copy" + } + }, + "target-compute-slopes": { + "args": ["up"], + "vars": { + "gp-0": "axis", + "a1-0": "forward", + "s5-0": "frame" + } + }, + "do-rotations2": { + "vars": { + "gp-0": "current-forward", + "s5-0": "desired-direction", + "s3-0": "up", + "s4-0": "current-quaternion", + "s3-1": "desired-quaternion", + "f0-2": "angle-difference", + "f1-2": "max-step" + } + }, + "level-setup": { + "vars": { + "gp-0": "previous-level" + } + }, + "flag-setup": { + "vars": { + "v1-25": "position", + "gp-0": "lateral-velocity", + "f0-8": "vertical-speed", + "f0-9": "lateral-speed", + "f1-4": "lateral-speed-copy", + "f2-0": "zero-vertical-speed", + "gp-1": "flight-position", + "s5-0": "lateral-position", + "f30-0": "height", + "f0-14": "lateral-distance", + "f1-5": "lateral-distance-copy", + "f2-2": "raised-height", + "f0-17": "edge-grab-velocity", + "v1-146": "current-level" + } + }, + "bend-gravity": { + "vars": { + "f0-2": "bend-target" + } + }, + "target-compute-edge": { + "vars": { + "s5-0": "edge-info", + "a1-6": "hands-position", + "s4-1": "to-hold", + "gp-1": "facing-direction" + } + }, + "target-compute-edge-rider": { + "vars": { + "gp-0": "edge-info", + "a1-7": "hold-motion" + } + }, + "target-compute-pole": { + "vars": { + "s4-0": "pole-process", + "gp-0": "pole-direction", + "s5-0": "closest-point", + "s3-0": "end-a", + "s2-0": "end-b", + "v1-8": "camera-target", + "s4-2": "to-pole", + "s5-3": "facing-direction" + } + }, + "target-calc-camera-pos": { + "vars": { + "gp-0": "clone-position", + "v1-11": "water-flags" + } + }, + "joint-points": { + "vars": { + "v1-0": "neck-mod", + "gp-0": "left-hand-position", + "s5-0": "right-hand-position", + "a2-2": "orientation", + "f30-0": "wade-depth", + "f0-9": "wade-speed" + } + }, + "target-real-post": { + "vars": { + "gp-0": "time-ratio", + "s5-0": "ticks-remaining", + "s4-0": "stick-direction", + "f30-0": "stick-magnitude", + "f0-12": "force-strength", + "a1-2": "stick-vector", + "a2-1": "forced-vector" + } + }, + "target-swim-post": { + "vars": { + "gp-0": "time-ratio", + "s5-0": "ticks-remaining", + "s4-0": "stick-direction" + } + }, + "target-no-stick-post": { + "vars": { + "gp-0": "time-ratio", + "s5-0": "ticks-remaining", + "s4-0": "stick-direction" + } + }, + "target-no-move-post": { + "vars": { + "gp-0": "time-ratio", + "s5-0": "ticks-remaining", + "a1-3": "overlap-params" + } + }, + "target-slide-down-post": { + "vars": { + "gp-0": "time-ratio", + "s5-0": "ticks-remaining", + "s4-1": "downhill", + "s3-1": "stick-direction" + } + }, + "target-no-ja-move-post": { + "vars": { + "a1-2": "overlap-params" + } + }, + "reset-target-state": { + "args": ["full-reset?"] + }, + "init-target": { + "args": ["cont"], + "vars": { + "s5-0": "control", + "s4-0": "root-group", + "s3-0": "body-sphere-0", + "s3-1": "body-sphere-1", + "s3-2": "body-sphere-2", + "s3-3": "attack-sphere-0", + "s3-4": "attack-sphere-1", + "s3-5": "attack-sphere-2", + "v1-79": "nodes" + } + }, + "stop": { + "args": ["mode"] + }, + "start": { + "args": ["mode", "cont"], + "vars": { + "v1-3": "target-process" + } + }, + "cspace<-cspace+quaternion!": { + "args": ["dst", "src", "orientation"], + "vars": { + "s5-0": "transform" + } + }, + "(event sidekick-clone)": { + "vars": { + "v0-0": "result" + } + }, + "(post sidekick-clone)": { + "vars": { + "v1-0": "art-error-state", + "a0-0": "parent", + "v1-22": "color-mult", + "v1-26": "color-emissive", + "a0-26": "effects" + } + }, + "init-sidekick": { + "vars": { + "v1-14": "nodes" + } + }, + "voicebox-init-by-other": { + "args": ["position", "hint"] + }, + "voicebox-spawn": { + "args": ["owner", "position"], + "vars": { + "s4-0": "camera-child" + } + }, + "target-generic-event-handler": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-0": "result", + "s4-0": "kind", + "f28-0": "amount", + "v1-21": "lev", + "s5-1": "lev-info", + "v1-22": "buzzer-count", + "gp-1": "trans-data", + "gp-2": "new-sidekick", + "v1-105": "sidekick-event", + "v1-108": "shadow-data", + "v1-110": "shadow-data", + "v1-132": "manipy-event" + } + }, + "target-shoved": { + "args": ["shove-back", "shove-up", "attacker", "hit-state"], + "vars": { + "s5-0": "attack" + } + }, + "get-intersect-point": { + "args": ["dest", "prims", "cinfo", "touch"], + "vars": { + "a0-2": "tri" + } + }, + "target-attacked": { + "args": ["message", "attack", "attacker", "touch", "hit-state"], + "vars": { + "a1-2": "touched-prims" + } + }, + "target-send-attack": { + "args": ["attacked-proc", "mode", "touch", "attack-id", "attack-count"], + "vars": { + "v1-0": "attack-event", + "gp-0": "response", + "v1-5": "danger", + "sv-96": "spin-prims", + "sv-128": "punch-prims", + "sv-176": "uppercut-prims", + "v0-14": "candidate-prims", + "v0-26": "candidate-prims" + } + }, + "target-apply-tongue": { + "args": ["tongue-pos"], + "vars": { + "gp-1": "pull-dir" + } + }, + "target-standard-event-handler": { + "args": ["proc", "argc", "message", "block"] + }, + "target-dangerous-event-handler": { + "args": ["proc", "argc", "message", "block"] + }, + "target-bonk-event-handler": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "s4-0": "contact-to-center", + "f0-7": "fall-dist" + } + }, + "target-jump-event-handler": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-0": "bonk-result" + } + }, + "target-walk-event-handler": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-0": "bonk-result" + } + }, + "target-effect-exit": { + "vars": { + "v1-1": "skeleton-effects" + } + }, + "target-falling-anim": { + "args": ["loop-timeout", "blend-time"], + "vars": { + "s5-1": "loop-start-time" + } + }, + "target-falling-trans": { + "args": ["mode", "stuck-timeout"] + }, + "target-hit-ground-anim": { + "args": ["mode"], + "vars": { + "gp-0": "in-place?" + } + }, + "init-var-jump": { + "args": ["min-height", "max-height", "seed-vel?", "adjust-heights?", "vel"], + "vars": { + "f0-1": "rider-up-speed", + "s4-1": "lateral-vel", + "f0-16": "up-speed", + "f0-17": "lateral-speed", + "f1-11": "new-lateral-speed", + "f2-7": "launch-speed", + "v0-2": "start-pos" + } + }, + "mod-var-jump": { + "args": ["update-vel?", "update-collide-offset?", "jump-held?", "vel"], + "vars": { + "f30-0": "hold-frac", + "s3-1": "rise-so-far", + "s4-0": "lateral-vel", + "f28-0": "lateral-speed", + "f26-0": "new-lateral-speed", + "f0-13": "needed-up-speed", + "v1-57": "anim-offset" + } + }, + "(enter target-attack-air)": { + "args": ["mode"] + }, + "(code target-attack-air)": { + "args": ["mode"], + "vars": { + "f30-0": "spin-rate", + "f0-8": "height-above-ground", + "f1-1": "up-vel" + } + }, + "(enter target-attack-uppercut)": { + "args": ["min-height", "max-height"] + }, + "(code target-attack-uppercut)": { + "args": ["min-height", "max-height"], + "vars": { + "s3-0": "from-duck?" + } + }, + "(enter target-attack-uppercut-jump)": { + "args": ["min-height", "max-height"] + }, + "(code target-attack-uppercut-jump)": { + "args": ["min-height", "max-height"], + "vars": { + "gp-0": "align", + "s5-0": "align-fn", + "a1-2": "opts" + } + }, + "(enter target-double-jump)": { + "args": ["min-height", "max-height"], + "vars": { + "a0-3": "height", + "a1-1": "camera-state", + "a2-0": "dest" + } + }, + "(code target-double-jump)": { + "args": ["min-height", "max-height"] + }, + "(enter target-duck-high-jump)": { + "args": ["min-height", "max-height", "kind"] + }, + "(code target-duck-high-jump)": { + "args": ["min-height", "max-height", "kind"] + }, + "(enter target-duck-high-jump-jump)": { + "args": ["min-height", "max-height", "kind"] + }, + "(code target-duck-high-jump-jump)": { + "args": ["min-height", "max-height", "kind"], + "vars": { + "f30-0": "apex-aframe", + "f28-0": "anim-speed", + "f24-0": "up-vel", + "f26-0": "frames-to-apex", + "f22-1": "seek-speed", + "s5-0": "channel" + } + }, + "(enter target-falling)": { + "args": ["mode"] + }, + "(code target-falling)": { + "args": ["mode"] + }, + "(enter target-flop)": { + "args": ["unused-min-height", "unused-max-height", "fwd-speed"] + }, + "(trans target-flop)": { + "vars": { + "gp-1": "landed" + } + }, + "(code target-flop)": { + "args": ["unused-min-height", "unused-max-height", "fwd-speed"], + "vars": { + "f30-0": "vel-scale" + } + }, + "(enter target-flop-hit-ground)": { + "args": ["mode"], + "vars": { + "f0-1": "fall-dist" + } + }, + "(code target-flop-hit-ground)": { + "args": ["mode"] + }, + "(enter target-high-jump)": { + "args": ["min-height", "max-height", "kind"], + "vars": { + "a0-3": "height", + "a1-1": "camera-state", + "a2-1": "dest" + } + }, + "(enter target-hit-ground)": { + "args": ["mode"], + "vars": { + "f0-1": "fall-dist" + } + }, + "(code target-hit-ground)": { + "args": ["mode"] + }, + "(enter target-jump)": { + "args": ["min-height", "max-height", "mods"], + "vars": { + "a0-9": "height", + "a1-5": "camera-state", + "a2-5": "dest" + } + }, + "(code target-jump)": { + "args": ["min-height", "max-height", "mods"], + "vars": { + "f30-0": "up-vel", + "f0-8": "frames-to-apex-pose", + "gp-1": "channel", + "v1-45": "rising?" + } + }, + "(enter target-jump-forward)": { + "args": ["min-height", "max-height"] + }, + "(code target-jump-forward)": { + "args": ["min-height", "max-height"] + }, + "(event target-running-attack)": { + "vars": { + "gp-1": "attack-result", + "v1-9": "hit-proc", + "s5-1": "hit-root", + "v1-11": "hit-cshape" + } + }, + "(trans target-running-attack)": { + "vars": { + "gp-0": "lateral-vel", + "f30-0": "up-vel", + "f0-5": "lateral-speed", + "f1-1": "new-lateral-speed", + "f2-1": "clamped-up-vel" + } + }, + "(code target-running-attack)": { + "vars": { + "f28-0": "fwd-vel", + "f30-0": "vel-scale", + "gp-2": "frame-count", + "s5-1": "local-vel" + } + }, + "(code target-wheel)": { + "vars": { + "gp-0": "last-x-press-time", + "s5-0": "smack-time", + "f30-0": "vel-scale", + "s4-1": "local-vel" + } + }, + "(enter target-wheel-flip)": { + "args": ["height", "dist"] + }, + "(code target-wheel-flip)": { + "args": ["height", "dist"], + "vars": { + "f30-0": "vel-scale", + "s4-1": "local-vel", + "gp-2": "lateral-vel", + "f30-1": "up-vel" + } + }, + "(enter target-stance-ambient)": { + "vars": { + "v1-2": "anim-choice" + } + }, + "(exit target-stance-ambient)": { + "vars": { + "a0-0": "spool" + } + }, + "(code target-stance-ambient)": { + "vars": { + "v1-13": "load-status" + } + }, + "(method 10 first-person-hud)": { + "vars": { + "s5-0": "i" + } + }, + "(method 7 first-person-hud)": { + "vars": { + "v1-0": "i" + } + }, + "first-person-hud-init-by-other": { + "vars": { + "gp-0": "left-i", + "gp-1": "right-i", + "gp-2": "selector-i" + } + }, + "(method 14 first-person-hud)": { + "vars": { + "s5-0": "i" + } + }, + "(code hud-waiting)": { + "vars": { + "gp-0": "i" + } + }, + "part-first-person-hud-left-func": { + "args": ["system", "cpu-info", "sprite-mat"], + "vars": { + "f30-0": "out-frac", + "s5-0": "hud-proc" + } + }, + "part-first-person-hud-right-func": { + "args": ["system", "cpu-info", "sprite-mat"], + "vars": { + "f30-0": "out-frac", + "s5-0": "hud-proc" + } + }, + "part-first-person-hud-selector-func": { + "args": ["system", "cpu-info", "sprite-mat"], + "vars": { + "f30-0": "out-frac", + "v1-2": "hud-proc" + } + }, + "(code target-stance-look-around)": { + "vars": { + "a1-0": "query-msg", + "v1-8": "stance-state" + } + }, + "(trans target-look-around)": { + "vars": { + "gp-1": "proj-velocity", + "s4-0": "proj", + "s5-1": "muzzle-offset", + "sv-48": "spawn-pos" + } + }, + "(code target-look-around)": { + "vars": { + "f30-0": "min-cam-dist" + } + }, + "(trans target-billy-game)": { + "vars": { + "gp-1": "proj-velocity", + "s4-0": "proj", + "s5-1": "muzzle-offset", + "sv-48": "spawn-pos" + } + }, + "(code target-grab)": { + "vars": { + "gp-0": "fall-time", + "gp-1": "anim-mode" + } + }, + "(enter target-pole-cycle)": { + "args": ["pole"] + }, + "(trans target-pole-cycle)": { + "vars": { + "gp-0": "lateral-vel" + } + }, + "(code target-pole-cycle)": { + "args": ["pole"] + }, + "(code target-pole-flip-up)": { + "args": ["min-height", "max-height", "fwd-vel"] + }, + "(code target-pole-flip-up-jump)": { + "args": ["min-height", "max-height"], + "vars": { + "f0-1": "height-above-ground", + "f1-1": "up-vel" + } + }, + "(code target-pole-flip-forward)": { + "args": ["min-height", "max-height", "fwd-vel"] + }, + "(enter target-pole-flip-forward-jump)": { + "args": ["min-height", "max-height"] + }, + "(code target-pole-flip-forward-jump)": { + "args": ["min-height", "max-height"] + }, + "(trans target-edge-grab)": { + "vars": { + "a1-2": "probe-params" + } + }, + "(code target-edge-grab-jump)": { + "args": ["min-height", "max-height"], + "vars": { + "s4-0": "align-move" + } + }, + "(code target-edge-grab-off)": { + "vars": { + "gp-0": "align-move" + } + }, + "(enter target-yellow-blast)": { + "vars": { + "f30-0": "up-vel", + "gp-0": "lateral-vel" + } + }, + "(enter target-yellow-jump-blast)": { + "vars": { + "gp-0": "lateral-vel" + } + }, + "(code target-yellow-jump-blast)": { + "vars": { + "gp-2": "lateral-vel" + } + }, + "(code target-eco-powerup)": { + "args": ["unused-kind", "eco-amount"] + }, + "(code target-wade-walk)": { + "vars": { + "f0-10": "slope-z-target", + "f0-30": "water-depth", + "f24-0": "slope-x-target", + "f24-1": "depth-frac", + "f26-0": "dry-blend", + "f28-0": "slope-x-blend", + "f30-0": "start-frame", + "f30-1": "slope-z-blend", + "gp-0": "blend-time", + "gp-6": "last-splash-time" + } + }, + "target-swim-tilt": { + "args": ["speed-tilt-scale", "tilt-seek-speed", "tilt-bias", "max-tilt"], + "vars": { + "a2-2": "up-dir", + "f0-1": "speed-tilt", + "gp-0": "facing-dir", + "v1-2": "target-dir" + } + }, + "(trans target-swim-stance)": { + "vars": { + "gp-0": "current-anim" + } + }, + "(event target-swim-down)": { + "vars": { + "v1-2": "attack" + } + }, + "(code target-swim-down)": { + "vars": { + "f30-0": "dive-boost-vel", + "gp-0": "min-dive-time", + "s4-3": "lateral-vel", + "s5-0": "max-dive-time" + } + }, + "(code target-swim-up)": { + "vars": { + "f30-0": "kick-speed", + "gp-0": "under-water?" + } + }, + "(code target-swim-jump)": { + "args": ["min-height", "max-height"], + "vars": { + "f30-0": "bob-boost", + "s4-1": "lateral-vel" + } + }, + "(enter target-hit-ground-hard)": { + "args": ["fall-dist"] + }, + "(code target-hit-ground-hard)": { + "args": ["fall-dist"], + "vars": { + "f0-5": "damage-units" + } + }, + "(code target-launch)": { + "args": ["height", "camera-state", "landing-target", "tracking-time"], + "vars": { + "f30-0": "dest-dist", + "s3-0": "target-vel", + "s4-0": "target-proc", + "sv-40": "dest-pos", + "sv-44": "rising?", + "v1-30": "target-pos" + } + }, + "(code target-periscope)": { + "args": ["periscope"], + "vars": { + "v1-4": "periscope-proc" + } + }, + "(enter target-play-anim)": { + "args": ["anim-name", "requester"] + }, + "(code target-play-anim)": { + "args": ["anim-name", "requester"], + "vars": { + "gp-0": "anim" + } + }, + "(enter target-clone-anim)": { + "args": ["clone-source"] + }, + "(exit target-clone-anim)": { + "vars": { + "a1-2": "end-pos", + "a1-6": "surface-pos", + "gp-0": "main-joint" + } + }, + "(code target-clone-anim)": { + "args": ["clone-source"] + }, + "(method 0 debug-menu-context)": { + "args": ["allocation", "type-to-make"], + "vars": { + "gp-0": "context" + } + }, + "(method 0 debug-menu)": { + "args": ["allocation", "type-to-make", "context", "name"], + "vars": { + "v0-0": "menu" + } + }, + "(method 0 debug-menu-item-submenu)": { + "args": ["allocation", "type-to-make", "name", "menu"], + "vars": { + "v0-0": "item" + } + }, + "(method 0 debug-menu-item-function)": { + "args": ["allocation", "type-to-make", "name", "id", "activate-func"], + "vars": { + "v0-0": "item" + } + }, + "(method 0 debug-menu-item-flag)": { + "args": ["allocation", "type-to-make", "name", "id", "activate-func"], + "vars": { + "v0-0": "item" + } + }, + "debug-menu-item-var-update-display-str": { + "args": ["item"], + "vars": { + "v1-8": "abs-value", + "v1-12": "abs-value" + } + }, + "debug-menu-context-release-joypad": { + "args": ["context"] + }, + "debug-menu-item-get-max-width": { + "args": ["item", "menu"] + }, + "debug-menu-remove-all-items": { + "args": ["menu"], + "vars": { + "gp-0": "context", + "s4-0": "was-active" + } + }, + "debug-menu-find-from-template": { + "args": ["context", "path"], + "vars": { + "s4-0": "node", + "s3-0": "items", + "s4-1": "path-name", + "s5-0": "item" + } + }, + "debug-menu-item-submenu-render": { + "args": ["item", "x", "y", "submenus", "selected"], + "vars": { + "s5-0": "font", + "s3-0": "dma-buf" + } + }, + "debug-menu-item-function-render": { + "args": ["item", "x", "y", "submenus", "selected"], + "vars": { + "v1-2": "font", + "s4-0": "dma-buf" + } + }, + "debug-menu-item-flag-render": { + "args": ["item", "x", "y", "submenus", "selected"], + "vars": { + "v1-2": "font", + "s4-0": "dma-buf" + } + }, + "debug-menu-render": { + "args": ["menu", "x-pos", "y-pos", "selected", "submenus"], + "vars": { + "v1-0": "selection-index", + "a0-1": "items", + "a1-1": "item", + "s0-0": "dma-buf", + "s3-1": "item-x", + "s2-1": "item-y", + "s1-1": "items", + "s0-1": "item", + "sv-16": "dma-buf" + } + }, + "debug-menu-context-select-next-or-prev-item": { + "args": ["context", "direction"], + "vars": { + "v1-6": "next-item", + "s5-0": "menu", + "a2-0": "selected", + "a0-1": "previous-cell", + "v1-4": "selected-cell", + "a3-0": "items" + } + }, + "debug-menu-context-select-new-item": { + "args": ["context", "offset"], + "vars": { + "a2-0": "menu", + "a1-1": "selected", + "a0-1": "item-count", + "v1-4": "selected-index", + "a2-1": "items", + "s4-0": "i", + "s4-1": "i" + } + }, + "debug-menu-context-open-submenu": { + "args": ["context", "submenu"], + "vars": { + "v1-0": "depth" + } + }, + "debug-menu-context-close-submenu": { + "args": ["context"] + }, + "debug-menu-item-submenu-msg": { + "args": ["item", "message"], + "vars": { + "a0-1": "context" + } + }, + "debug-menu-item-function-msg": { + "args": ["item", "message"] + }, + "debug-menu-item-flag-msg": { + "args": ["item", "message"], + "vars": { + "a0-2": "context" + } + }, + "debug-menu-item-var-joypad-handler": { + "args": ["item"], + "vars": { + "a0-1": "context", + "a0-5": "context", + "a0-20": "context", + "v1-39": "direction", + "f0-8": "new-float-value", + "a2-4": "new-int-value" + } + }, + "debug-menu-item-var-msg": { + "args": ["item", "message"], + "vars": { + "a0-1": "context", + "a0-2": "context" + } + }, + "debug-menu-item-send-msg": { + "args": ["item", "message"] + }, + "debug-menu-send-msg": { + "args": ["menu", "message", "recursive"], + "vars": { + "s3-0": "items", + "s2-0": "item" + } + }, + "debug-menu-context-send-msg": { + "args": ["context", "message", "destination"], + "vars": { + "s4-0": "i", + "a0-2": "menu" + } + }, + "debug-menu-context-activate-selection": { + "args": ["context"], + "vars": { + "a0-1": "item" + } + }, + "debug-menus-default-joypad-func": { + "args": ["context"] + }, + "debug-menus-active": { + "args": ["context"] + }, + "debug-menus-handler": { + "args": ["context"] + }, + "next-level": { + "args": ["level-name"], + "vars": { + "a0-1": "rest", + "a1-0": "candidate-name", + "a1-1": "candidate", + "v1-0": "info" + } + }, + "(code target-continue)": { + "args": ["cont"], + "vars": { + "a0-64": "lvl", + "a1-18": "cmd", + "gp-0": "sage-entity", + "s4-0": "cam-rot", + "s5-0": "cmds", + "s5-1": "inv-rot", + "s5-2": "cont-level", + "s5-3": "sage", + "s5-4": "ecorocks-sage", + "s5-6": "warp-pos", + "s5-8": "next-lev", + "v1-10": "still-grabbed", + "v1-20": "level-info" + } + }, + "velocity-set-to-target!": { + "args": ["target-pt", "speed", "attack"], + "vars": { + "gp-1": "to-target", + "v1-1": "cur-trans" + } + }, + "target-hit-effect": { + "args": ["attack"], + "vars": { + "v1-9": "mode", + "v1-13": "angle" + } + }, + "target-hit-push": { + "args": ["hit-origin", "push-rot", "push-dist", "push-speed", "attack"], + "vars": { + "s1-0": "push-target" + } + }, + "target-hit-orient": { + "args": ["attack", "attack-dir"], + "vars": { + "s5-0": "end-anim-on-ground" + } + }, + "target-hit-setup-anim": { + "args": ["attack"] + }, + "target-hit-move": { + "args": ["attack", "end-anim-on-ground", "fall-fn", "anim-scale"], + "vars": { + "f2-1": "up-vel", + "f28-1": "push-rate", + "f30-1": "push-dist", + "s1-1": "push-rot", + "s2-1": "push-result", + "s3-0": "flat-vel", + "s3-1": "hit-origin", + "v1-40": "done" + } + }, + "(exit target-hit)": { + "vars": { + "f30-0": "grav-vel", + "gp-0": "flat-vel" + } + }, + "(code target-hit)": { + "args": ["mode", "attack"], + "vars": { + "f0-10": "facing-dot", + "gp-0": "info", + "s3-1": "wait-start", + "s4-1": "safe-pos", + "s5-0": "attack-dir" + } + }, + "death-movie-remap": { + "args": ["tick", "count"], + "vars": { + "v1-0": "cycle" + } + }, + "target-death-anim": { + "args": ["spool"], + "vars": { + "s5-0": "align-move" + } + }, + "eco-fadeout": { + "args": ["particle-system", "particle"] + }, + "eco-track-root-prim-fadeout": { + "args": ["particle-system", "particle", "position"], + "vars": { + "v1-1": "owner", + "a0-3": "root-prim" + } + }, + "part-tracker-track-root": { + "args": ["particle-system", "particle", "position"], + "vars": { + "v1-3": "owner-position" + } + }, + "part-tracker-move-to-target": { + "args": ["tracker"], + "vars": { + "v1-0": "target-process", + "a2-0": "destination" + } + }, + "part-tracker-track-target": { + "args": ["tracker"], + "vars": { + "v1-1": "target-process", + "v1-3": "target-position", + "v0-1": "tracker-position" + } + }, + "sparticle-track-root-money": { + "args": ["particle-system", "particle", "position"], + "vars": { + "v1-1": "owner", + "v1-3": "owner-position" + } + }, + "(method 21 collectable)": { + "args": ["this", "fadeout-time", "bob-amount"] + }, + "(method 20 eco-collectable)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "collision-sphere" + } + }, + "(method 27 eco-collectable)": { + "args": ["this", "kind"] + }, + "initialize-eco-by-other": { + "args": ["position", "velocity", "pickup-info"], + "vars": { + "s3-0": "kind", + "f30-0": "amount" + } + }, + "(method 28 eco-collectable)": { + "args": ["this", "source-entity", "kind", "amount"] + }, + "(method 29 eco-collectable)": { + "args": ["this"] + }, + "add-blue-shake": { + "args": ["position", "pickup-position", "target-position"], + "vars": { + "f0-0": "distance", + "f30-0": "shake-amount" + } + }, + "check-blue-suck": { + "args": ["candidate"], + "vars": { + "v1-1": "target-drawable", + "gp-1": "target-root", + "v1-3": "target-shape", + "a0-5": "pickup-prim", + "a1-2": "target-prim" + } + }, + "add-blue-motion": { + "args": ["enable-suck?", "shake-and-glow?", "use-distance?", "stop-near-target?"], + "vars": { + "gp-0": "target-process", + "v1-4": "target-drawable", + "gp-1": "target-root", + "v1-6": "target-shape", + "s2-0": "pickup-prim", + "gp-2": "target-prim", + "f0-0": "distance", + "s5-2": "target-offset" + } + }, + "(code jump eco-collectable)": { + "vars": { + "gp-1": "jump-trajectory", + "f0-2": "elapsed-ticks" + } + }, + "(event wait eco-collectable)": { + "vars": { + "v0-3": "result" + } + }, + "(code wait eco-collectable)": { + "vars": { + "gp-0": "particles", + "s5-0": "root-prim", + "v1-10": "fade-ticks-left" + } + }, + "(enter notice-blue eco-collectable)": { + "args": ["target-handle"] + }, + "(trans notice-blue eco-collectable)": { + "vars": { + "a1-0": "query-event" + } + }, + "(code notice-blue eco-collectable)": { + "args": ["target-handle"], + "vars": { + "a0-5": "particles", + "a1-1": "root-prim" + } + }, + "(enter pickup eco-collectable)": { + "args": ["pickup-mode", "collector-handle"], + "vars": { + "gp-0": "notification", + "s5-0": "send-event-fn", + "s4-0": "parent-process" + } + }, + "(code pickup eco-collectable)": { + "args": ["pickup-mode", "collector-handle"], + "vars": { + "gp-6": "collector-process" + } + }, + "(anon-function 69 collectables)": { + "args": ["tracker"], + "vars": { + "s5-0": "owner-collectable", + "v1-4": "collector-process", + "a2-0": "destination" + } + }, + "(method 29 eco)": { + "args": ["this"], + "vars": { + "a0-1": "particles", + "a1-0": "root-prim" + } + }, + "(code die eco)": { + "vars": { + "gp-0": "respawn-start", + "f30-0": "zero" + } + }, + "(method 11 eco-yellow)": { + "args": ["this", "source-entity"] + }, + "(method 11 eco-red)": { + "args": ["this", "source-entity"] + }, + "(method 11 eco-blue)": { + "args": ["this", "source-entity"] + }, + "(method 29 health)": { + "args": ["this"], + "vars": { + "a0-1": "particles", + "a1-0": "root-prim" + } + }, + "(method 11 health)": { + "args": ["this", "source-entity"] + }, + "(method 29 eco-pill)": { + "args": ["this"], + "vars": { + "a0-1": "particles", + "a1-0": "root-prim" + } + }, + "(method 11 eco-pill)": { + "args": ["this", "source-entity"] + }, + "(method 10 eco-pill)": { + "args": ["this"] + }, + "(method 20 eco-pill)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "collision-sphere" + } + }, + "(method 12 money)": { + "args": ["this"] + }, + "(method 10 money)": { + "args": ["this"] + }, + "(code wait money)": { + "vars": { + "f30-0": "bob-amount" + } + }, + "(code notice-blue money)": { + "args": ["target-handle"], + "vars": { + "f30-0": "bob-amount" + } + }, + "(code pickup money)": { + "args": ["pickup-mode", "collector-handle"] + }, + "(method 20 money)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "collision-sphere", + "a0-10": "entity-record", + "a0-11": "task-id" + } + }, + "(method 11 money)": { + "args": ["this", "source-entity"] + }, + "money-init-by-other": { + "args": ["position", "velocity", "pickup-info", "source-entity"], + "vars": { + "s3-0": "kind", + "f30-0": "amount" + } + }, + "money-init-by-other-no-bob": { + "args": ["position", "velocity", "kind", "amount", "source-entity"] + }, + "fuel-cell-pick-anim": { + "args": ["pickup"], + "vars": { + "gp-0": "entity-position", + "a0-2": "movie-mask", + "a1-1": "variation-count", + "v1-6": "coordinate-seed", + "v1-7": "variation" + } + }, + "fuel-cell-animate": { + "vars": { + "gp-0": "pickup", + "s5-0": "fuel-cell-pickup", + "v1-5": "victory-anim", + "gp-1": "pickup-root", + "v1-20": "collision-shape", + "gp-2": "effect-position" + } + }, + "(event wait fuel-cell)": { + "vars": { + "v0-3": "result" + } + }, + "(code wait fuel-cell)": { + "vars": { + "f28-0": "bob-phase", + "f30-0": "target-distance", + "f30-1": "playback-speed" + } + }, + "(enter pickup fuel-cell)": { + "args": ["pickup-mode", "collector-handle"], + "vars": { + "t9-1": "parent-enter" + } + }, + "(trans pickup fuel-cell)": { + "vars": { + "f30-0": "hide-frame" + } + }, + "(anon-function 38 collectables)": { + "args": ["task-id"] + }, + "(method 20 fuel-cell)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "collision-sphere" + } + }, + "(method 11 fuel-cell)": { + "args": ["this", "source-entity"] + }, + "fuel-cell-init-by-other": { + "args": ["position", "velocity", "pickup-info", "source-entity"], + "vars": { + "s3-0": "kind", + "f30-0": "amount", + "gp-1": "movie-position" + } + }, + "(code fuel-cell-clone-anim)": { + "args": ["source-handle"] + }, + "fuel-cell-init-as-clone": { + "args": ["source-handle", "amount"] + }, + "(method 29 buzzer)": { + "args": ["this"], + "vars": { + "a0-2": "root-channel", + "f0-3": "yaw" + } + }, + "(enter pickup buzzer)": { + "args": ["pickup-mode", "collector-handle"] + }, + "(code pickup buzzer)": { + "args": ["pickup-mode", "collector-handle"], + "vars": { + "v1-18": "hud-copy", + "s5-2": "task-id", + "s4-1": "task-info", + "v1-47": "fuel-cell-pointer", + "gp-1": "notification", + "s5-3": "send-event-fn", + "s4-2": "parent-process" + } + }, + "(method 20 buzzer)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "collision-sphere" + } + }, + "(method 11 buzzer)": { + "args": ["this", "source-entity"] + }, + "buzzer-init-by-other": { + "args": ["position", "velocity", "pickup-info", "source-entity"], + "vars": { + "s3-0": "kind", + "f30-0": "amount" + } + }, + "birth-pickup-at-point": { + "args": ["position", "kind", "amount", "radial-velocity?", "destination-pool", "pickup-info"], + "vars": { + "v1-2": "has-source-process?", + "v1-1": "source-info-check", + "sv-32": "source-info", + "s1-0": "launch-velocity", + "t9-0": "get-radius-fn", + "f30-0": "pickup-radius", + "sv-192": "spawned-process-pointer", + "sv-48": "pickups-left", + "s0-0": "spawn-info", + "v1-25": "current-kind", + "sv-64": "yellow-pickup", + "v1-28": "yellow-result", + "sv-80": "red-pickup", + "v1-34": "red-result", + "sv-96": "blue-pickup", + "v1-40": "blue-result", + "sv-112": "health-pickup", + "v1-46": "health-result", + "sv-128": "pill-pickup", + "v1-52": "pill-result", + "sv-144": "money-pickup", + "v1-58": "money-result", + "sv-160": "fuel-cell-pickup", + "v1-64": "fuel-cell-result", + "sv-176": "buzzer-pickup", + "v1-71": "buzzer-result" + } + }, + "ecovalve-init-by-other": { + "args": ["block-fn"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "collision-mesh" + } + }, + "(method 20 vent)": { + "args": ["this", "source-entity", "kind"], + "vars": { + "s3-0": "collision-shape", + "s2-0": "collision-sphere" + } + }, + "(anon-function 14 collectables)": { + "args": ["vent-process"] + }, + "vent-standard-event-handler": { + "args": ["source", "argc", "message", "block"], + "vars": { + "v0-0": "show-particles?" + } + }, + "(event vent-wait-for-touch)": { + "vars": { + "a1-1": "pickup-event" + } + }, + "(code vent-wait-for-touch)": { + "vars": { + "a0-0": "particles", + "a1-0": "position", + "gp-0": "ambient" + } + }, + "(code vent-pickup)": { + "args": ["collector-handle"], + "vars": { + "s5-0": "collector-process", + "gp-0": "collector-drawable", + "s4-0": "collector-root", + "s5-1": "collector-shape" + } + }, + "(method 11 ventyellow)": { + "args": ["this", "source-entity"] + }, + "(method 11 ventred)": { + "args": ["this", "source-entity"] + }, + "(method 11 ventblue)": { + "args": ["this", "source-entity"] + }, + "(method 11 ecovent)": { + "args": ["this", "source-entity"] + }, + "task-status->string": { + "args": ["status"] + }, + "(method 11 task-cstage)": { + "args": ["this", "control"], + "vars": { + "a0-1": "stage" + } + }, + "(method 14 task-cstage)": { + "args": ["this"], + "vars": { + "v1-9": "task-perm" + } + }, + "(method 12 task-control)": { + "args": ["this", "status"], + "vars": { + "a0-2": "task", + "v1-1": "i" + } + }, + "(method 13 task-control)": { + "args": ["this", "warn-on-null?"], + "vars": { + "s5-0": "i" + } + }, + "(method 14 task-control)": { + "args": ["this", "reset-mode", "warn-on-null?"], + "vars": { + "s4-0": "i", + "a0-4": "stage", + "a0-10": "stage" + } + }, + "(method 15 task-control)": { + "args": ["this", "task", "status"], + "vars": { + "v1-3": "i", + "a0-3": "stage" + } + }, + "(method 18 task-control)": { + "args": ["this", "task", "status"], + "vars": { + "v1-3": "i" + } + }, + "(method 16 task-control)": { + "args": ["this", "reminder-index"], + "vars": { + "v1-4": "task-perm" + } + }, + "(method 17 task-control)": { + "args": ["this", "value", "reminder-index"], + "vars": { + "v1-4": "task-perm" + } + }, + "(anon-function * task-control)": { + "args": ["control"] + }, + "task-control-reset": { + "args": ["reset-mode"], + "vars": { + "s5-0": "controls", + "s4-0": "i" + } + }, + "get-task-control": { + "args": ["task"] + }, + "get-task-status": { + "args": ["task"], + "vars": { + "gp-0": "control", + "s5-0": "i" + } + }, + "close-specific-task!": { + "args": ["task", "status"], + "vars": { + "gp-0": "control", + "v1-1": "i" + } + }, + "open-specific-task!": { + "args": ["task", "status"], + "vars": { + "gp-0": "control", + "v1-1": "i" + } + }, + "task-closed?": { + "args": ["task", "status"] + }, + "task-exists?": { + "args": ["task", "status"] + }, + "task-known?": { + "args": ["task"] + }, + "(top-level-login task-control)": { + "vars": { + "gp-0": "controls", + "s5-0": "i", + "s4-0": "value" + } + }, + "(method 52 process-taskable)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-ctrl", + "a0-1": "shadow-ctrl-alias" + } + }, + "(method 9 gui-query)": { + "args": [ + "this", + "message", + "x-position", + "y-position", + "message-space", + "cancel-only?", + "cancel-message" + ] + }, + "(method 10 gui-query)": { + "args": ["this"], + "vars": { + "a1-2": "message-font", + "s4-0": "text-packet", + "s5-0": "packet-start", + "a3-4": "packet-end", + "v1-17": "next-tag", + "s4-1": "text-packet", + "s5-1": "packet-start", + "a3-7": "packet-end", + "v1-29": "next-tag" + } + }, + "(method 46 process-taskable)": { + "args": ["this"], + "vars": { + "s5-3": "to-target" + } + }, + "(method 32 process-taskable)": { + "args": ["this", "commit?"] + }, + "(method 33 process-taskable)": { + "args": ["this"], + "vars": { + "s5-0": "animation" + } + }, + "(method 51 process-taskable)": { + "args": ["this"], + "vars": { + "gp-0": "animation", + "v1-2": "spooled-animation" + } + }, + "(method 34 process-taskable)": { + "args": ["this", "commit?"] + }, + "(method 35 process-taskable)": { + "args": ["this"], + "vars": { + "s5-0": "animation" + } + }, + "(method 36 process-taskable)": { + "args": ["this", "commit?"] + }, + "(method 37 process-taskable)": { + "args": ["this"], + "vars": { + "s5-0": "animation" + } + }, + "process-taskable-play-anim-exit": { + "args": [], + "vars": { + "a0-4": "camera-process" + } + }, + "process-taskable-play-anim-code": { + "args": ["previous-animation", "animation"] + }, + "(anon-function 46 process-taskable)": { + "args": ["taskable"] + }, + "process-taskable-hide-handler": { + "args": ["proc", "argc", "message", "block"] + }, + "process-taskable-hide-enter": { + "vars": { + "v1-3": "shadow-ctrl" + } + }, + "process-taskable-hide-exit": { + "args": ["staying-hidden?"], + "vars": { + "v1-7": "shadow-ctrl-alias" + } + }, + "(method 41 process-taskable)": { + "args": ["this", "center-joint", "local-sphere"], + "vars": { + "s5-0": "collision", + "s4-0": "collision-sphere" + } + }, + "(method 40 process-taskable)": { + "args": [ + "this", + "actor", + "skel-group", + "center-joint", + "cam-joint", + "local-sphere", + "neck-joint" + ] + }, + "(trans query process-taskable)": { + "vars": { + "gp-0": "response" + } + }, + "(event play-anim process-taskable)": { + "vars": { + "v0-0": "shadow", + "v1-5": "shadow-ctrl", + "a0-4": "shadow-ctrl-alias" + } + }, + "(trans play-anim process-taskable)": { + "vars": { + "a3-0": "reward-cell" + } + }, + "(enter be-clone process-taskable)": { + "args": ["source-handle"] + }, + "(exit be-clone process-taskable)": { + "vars": { + "v1-6": "entity-transform" + } + }, + "(code be-clone process-taskable)": { + "args": ["source-handle"] + }, + "(post idle process-taskable)": { + "vars": { + "gp-0": "neck-position" + } + }, + "(method 10 ambient-control)": { + "args": ["this", "out-vector", "cooldown", "max-distance", "speaker"] + }, + "(method 11 ambient-control)": { + "args": ["this", "name", "force?", "position"] + }, + "vector-for-ambient": { + "args": ["speaker", "out-vector"] + }, + "othercam-calc": { + "args": ["joint-scale"] + }, + "(event othercam-running)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v1-1": "joint-selector", + "v1-8": "joint-art" + } + }, + "(enter othercam-running)": { + "vars": { + "gp-0": "parent", + "v1-19": "joint-transform" + } + }, + "(code othercam-running)": { + "vars": { + "s2-0": "parent", + "s4-0": "joint-transform", + "s3-0": "joint-scale", + "gp-0": "camera-forward", + "s5-0": "camera-position", + "s1-0": "frame-ready?", + "a0-25": "parent", + "gp-1": "wait-start" + } + }, + "othercam-init-by-other": { + "args": ["owner", "cam-joint-index", "survive-anim-end?", "spooling-mode"] + }, + "(method 48 process-taskable)": { + "args": ["this"], + "vars": { + "gp-0": "shadow-ctrl", + "v1-10": "shadow-ctrl-alias" + } + }, + "(code pov-camera-start-playing pov-camera)": { + "vars": { + "gp-0": "camera-joint-index", + "v1-7": "camera-joint", + "v1-10": "other-camera" + } + }, + "pov-camera-play-and-reposition": { + "args": ["animation", "teleport-position", "playback-rate"], + "vars": { + "s4-0": "repositioned?", + "v1-4": "reposition-now?" + } + }, + "(event pov-camera-playing pov-camera)": { + "args": ["proc", "argc", "message", "block"] + }, + "pov-camera-init-by-other": { + "args": ["position", "skel-group", "animation", "flags", "owner", "command-list"], + "vars": { + "v1-20": "orientation-source", + "s5-1": "joint-animation" + } + }, + "(anon-function 1 pov-camera)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-0": "requested-mask" + } + }, + "eco-blue-glow": { + "args": ["position"] + }, + "target-powerup-process": { + "vars": { + "gp-0": "right-toe-position", + "gp-1": "left-toe-position", + "f0-8": "target-ice-volume", + "f30-0": "ice-volume", + "f0-13": "ice-pitch", + "v1-64": "sound-param", + "v1-67": "shadow-direction", + "a0-33": "shadow-control", + "s4-0": "yellow-flash-joint", + "gp-4": "yellow-i", + "v1-111": "yellow-spark-joint", + "a1-23": "overlap-params", + "s4-2": "red-flash-joint", + "gp-6": "red-i", + "v1-139": "red-spark-joint", + "v1-150": "blue-lightning-joint", + "gp-8": "blue-flash-joint", + "v1-168": "blue-falling-joint", + "s4-8": "green-flash-joint", + "gp-11": "green-i", + "v1-188": "green-spark-joint" + } + }, + "crate-standard-event-handler": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "s4-0": "attack-id", + "s5-0": "amount-bonus", + "v0-0": "awake-mask" + } + }, + "(code notice-blue crate)": { + "args": ["target-handle"], + "vars": { + "gp-0": "target-process", + "v1-4": "target-drawable", + "gp-1": "target-root", + "v1-6": "target-shape", + "gp-2": "crate-core", + "a1-3": "target-core", + "f30-0": "target-distance", + "s5-0": "glow-position", + "gp-3": "i" + } + }, + "(event die crate)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "a1-5": "forwarded-attack", + "v1-12": "attack-id" + } + }, + "(code die crate)": { + "args": ["skip-break-effects?", "amount-bonus"], + "vars": { + "f0-0": "dark-eco-buzz-scale" + } + }, + "(event special-contents-die crate)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "gp-0": "persistent", + "v0-0": "awake-mask" + } + }, + "(code special-contents-die crate)": { + "vars": { + "a0-4": "entity-record", + "a0-5": "task", + "v1-21": "persistent" + } + }, + "(code wait crate-buzzer)": { + "vars": { + "f30-0": "vertical-speed" + } + }, + "crate-init-by-other": { + "args": ["entity-record", "position", "crate-type"] + }, + "(method 11 crate)": { + "args": ["this", "entity-record"] + }, + "(method 25 crate)": { + "args": ["this", "entity-record"], + "vars": { + "s4-0": "moving-shape", + "s3-0": "mesh-prim", + "v1-27": "persistent", + "a0-18": "crate-type" + } + }, + "(method 27 crate)": { + "args": ["this", "look", "defense"] + }, + "(method 29 crate)": { + "vars": { + "f0-0": "smush-amount" + } + }, + "(method 25 barrel)": { + "args": ["this", "entity-record"], + "vars": { + "t9-0": "base-params-init" + } + }, + "(method 25 bucket)": { + "args": ["this", "entity-record"], + "vars": { + "t9-0": "base-params-init" + } + }, + "(method 26 crate-buzzer)": { + "vars": { + "t9-0": "base-art-init" + } + }, + "(method 25 pickup-spawner)": { + "args": ["this", "entity-record"], + "vars": { + "t9-0": "base-params-init" + } + }, + "(method 7 hud)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "i" + } + }, + "(method 10 hud)": { + "vars": { + "v1-0": "registry-index", + "s5-0": "particle-index" + } + }, + "(method 15 hud)": { + "vars": { + "s5-0": "i" + } + }, + "(method 16 hud)": { + "args": ["this", "new-value", "new-value2"] + }, + "(method 17 hud)": { + "vars": { + "v1-0": "i" + } + }, + "(method 18 hud)": { + "vars": { + "s5-0": "i" + } + }, + "(method 20 hud)": { + "args": ["this", "init-value"] + }, + "(method 24 hud)": { + "args": ["this", "widescreen?", "pal?"] + }, + "(method 15 hud-pickups)": { + "vars": { + "t9-0": "base-draw", + "s5-0": "buf", + "gp-0": "bucket-start", + "s4-0": "draw-text", + "a3-7": "bucket-end", + "v1-8": "packet" + } + }, + "(method 19 hud-pickups)": { + "args": ["this"] + }, + "(method 20 hud-pickups)": { + "args": ["this", "init-value"], + "vars": { + "s5-0": "particle-index", + "s5-1": "i" + } + }, + "part-hud-health-01-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-0": "scale", + "f0-3": "brightness", + "v1-16": "flash-frame" + } + }, + "part-hud-health-02-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-0": "scale" + } + }, + "part-hud-health-03-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-0": "scale" + } + }, + "(method 15 hud-health)": { + "args": ["this"] + }, + "(method 19 hud-health)": { + "args": ["this"] + }, + "(method 20 hud-health)": { + "args": ["this", "init-value"], + "vars": { + "s5-0": "particle-index", + "s5-1": "particle-index", + "s5-2": "particle-index", + "s5-3": "i" + } + }, + "(method 24 hud-health)": { + "args": ["this", "widescreen?", "pal?"] + }, + "(method 15 hud-money-all)": { + "args": ["this"], + "vars": { + "t9-0": "base-draw", + "s5-0": "line-y-offset", + "s5-1": "level-name-context", + "s1-0": "text-x-offset", + "s3-0": "buf", + "s4-1": "bucket-start", + "s2-0": "draw-text", + "a3-12": "bucket-end", + "v1-32": "packet" + } + }, + "(method 19 hud-money-all)": { + "args": ["this"], + "vars": { + "a0-6": "root" + } + }, + "(method 20 hud-money-all)": { + "args": ["this", "level-index"], + "vars": { + "s5-0": "icon-index", + "s4-0": "icon-index", + "s3-0": "icon", + "s4-1": "particle-index", + "s2-2": "level-orb-count", + "s3-2": "available-orb-count", + "s4-4": "collected-orb-count", + "s4-3": "i", + "s1-0": "i", + "v1-83": "level-data" + } + }, + "(method 24 hud-money-all)": { + "args": ["this", "widescreen?", "pal?"] + }, + "(method 15 hud-money)": { + "args": ["this"], + "vars": { + "t9-0": "base-draw", + "s5-0": "buf", + "gp-0": "bucket-start", + "s4-0": "draw-text", + "a3-7": "bucket-end", + "v1-8": "packet" + } + }, + "(method 19 hud-money)": { + "args": ["this"], + "vars": { + "a0-6": "root" + } + }, + "(method 20 hud-money)": { + "args": ["this", "init-value"], + "vars": { + "s5-0": "icon-index", + "s4-0": "icon", + "s5-1": "particle-index", + "s5-3": "i" + } + }, + "(method 24 hud-money)": { + "args": ["this", "widescreen?", "pal?"] + }, + "fuel-cell-hud-orbit-callback": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "s3-0": "hud-element", + "v1-1": "joint-index", + "s5-0": "joint-position", + "s4-0": "center-position" + } + }, + "fuel-cell-hud-starburst-3-callback": { + "args": ["system", "particle", "matrix-out"] + }, + "fuel-cell-hud-starburst-4-callback": { + "args": ["system", "particle", "matrix-out"] + }, + "fuel-cell-hud-center-callback": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-0": "icon-scale", + "f1-0": "center-scale" + } + }, + "(method 15 hud-fuel-cell)": { + "args": ["this"], + "vars": { + "t9-0": "base-draw", + "s5-0": "buf", + "gp-0": "bucket-start", + "s4-0": "draw-text", + "a3-7": "bucket-end", + "v1-8": "packet" + } + }, + "(method 19 hud-fuel-cell)": { + "args": ["this"], + "vars": { + "a0-2": "root", + "s5-1": "center-position" + } + }, + "(method 20 hud-fuel-cell)": { + "args": ["this", "init-value"], + "vars": { + "s5-0": "particle-index", + "s5-1": "i", + "s5-2": "icon-index", + "s4-0": "icon", + "s5-4": "turn-around" + } + }, + "(method 24 hud-fuel-cell)": { + "args": ["this", "widescreen?", "pal?"] + }, + "part-hud-buzzer-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-0": "scale" + } + }, + "(method 15 hud-buzzers)": { + "args": ["this"], + "vars": { + "t9-0": "base-draw", + "s5-0": "buf", + "gp-0": "bucket-start", + "s3-0": "draw-text", + "a3-7": "bucket-end", + "v1-11": "packet" + } + }, + "(method 19 hud-buzzers)": { + "args": ["this"] + }, + "(method 20 hud-buzzers)": { + "args": ["this", "init-value"], + "vars": { + "s5-0": "particle-index", + "s5-1": "i" + } + }, + "(method 24 hud-buzzers)": { + "args": ["this", "widescreen?", "pal?"] + }, + "calculate-rotation-and-color-for-slice": { + "args": ["slice-index", "fraction", "red", "green", "blue", "matrix-out"], + "vars": { + "v1-1": "slice" + } + }, + "part-hud-eco-timer-01-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-2": "fraction", + "a2-1": "red", + "a3-0": "green", + "t0-0": "blue", + "f0-3": "scale" + } + }, + "part-hud-eco-timer-02-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-2": "fraction", + "a2-1": "red", + "a3-0": "green", + "t0-0": "blue", + "f0-3": "scale" + } + }, + "part-hud-eco-timer-03-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-2": "fraction", + "a2-1": "red", + "a3-0": "green", + "t0-0": "blue", + "f0-3": "scale" + } + }, + "part-hud-eco-timer-backing-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-0": "scale" + } + }, + "part-hud-eco-timer-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-0": "scale" + } + }, + "(method 19 hud-power)": { + "args": ["this"] + }, + "(method 20 hud-power)": { + "args": ["this", "init-value"], + "vars": { + "s5-0": "particle-index", + "s5-1": "particle-index", + "s5-2": "particle-index", + "s5-3": "i" + } + }, + "(method 24 hud-power)": { + "args": ["this", "widescreen?", "pal?"], + "vars": { + "s5-0": "base-x", + "s4-0": "i" + } + }, + "activate-hud": { + "args": ["parent"] + }, + "hide-hud": { + "vars": { + "gp-0": "i" + } + }, + "hide-bottom-hud": { + "vars": { + "gp-0": "i" + } + }, + "disable-hud": { + "args": ["keep-visible"], + "vars": { + "s5-0": "i" + } + }, + "enable-hud": { + "vars": { + "gp-0": "i" + } + }, + "hide-hud-quick": { + "vars": { + "gp-0": "i" + } + }, + "show-hud": { + "vars": { + "gp-0": "i" + } + }, + "set-hud-aspect-ratio": { + "args": ["aspect-ratio", "video-mode"], + "vars": { + "gp-0": "widescreen?", + "s5-0": "pal?", + "s4-0": "i" + } + }, + "hud-hidden?": { + "vars": { + "gp-0": "all-hidden?", + "s5-0": "i" + } + }, + "bottom-hud-hidden?": { + "vars": { + "gp-0": "all-hidden?", + "s5-0": "i" + } + }, + "activate-orb-all": { + "args": ["level-index"] + }, + "convert-to-hud-object": { + "args": ["drawable", "hud-element"], + "vars": { + "s4-0": "screen-position" + } + }, + "(event hud-hidden)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-0": "result" + } + }, + "(enter hud-hidden)": { + "vars": { + "gp-0": "child", + "gp-1": "particle-index" + } + }, + "(event hud-arriving)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-3": "result" + } + }, + "(enter hud-arriving)": { + "vars": { + "gp-0": "child", + "gp-1": "particle-index" + } + }, + "(code hud-leaving)": { + "args": ["speed"] + }, + "hud-init-by-other": { + "args": ["init-value"] + }, + "send-hud-increment-event": { + "args": ["hud-element"] + }, + "part-progress-hud-left-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "v1-0": "progress-menu" + } + }, + "part-progress-hud-right-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "v1-0": "progress-menu" + } + }, + "part-progress-hud-orb-func": { + "args": ["system", "particle", "matrix-out"] + }, + "part-progress-hud-buzzer-func": { + "args": ["system", "particle", "matrix-out"] + }, + "part-progress-hud-button-func": { + "args": ["system", "particle", "matrix-out"] + }, + "part-progress-hud-tint-func": { + "args": ["system", "particle", "matrix-out"] + }, + "part-progress-card-slot-01-func": { + "args": ["system", "particle", "matrix-out"] + }, + "part-progress-card-slot-02-func": { + "args": ["system", "particle", "matrix-out"] + }, + "part-progress-card-slot-03-func": { + "args": ["system", "particle", "matrix-out"] + }, + "part-progress-card-slot-04-func": { + "args": ["system", "particle", "matrix-out"] + }, + "part-progress-card-cell-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-1": "opacity" + } + }, + "part-progress-save-icon-func": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "f0-1": "scale" + } + }, + "fuel-cell-progress-hud-orbit-callback": { + "args": ["system", "particle", "matrix-out"], + "vars": { + "a0-1": "launcher", + "s5-0": "progress-menu", + "v1-0": "joint-index", + "s4-0": "particle-index", + "a1-1": "slot-index", + "a2-1": "scan-count", + "s3-0": "joint-position", + "s2-0": "center-position" + } + }, + "find-nearest-attackable": { + "args": [ + "search-point", + "search-radius", + "rating-mask", + "required-rating", + "forward-direction", + "angle-range" + ], + "vars": { + "gp-0": "search" + } + }, + "(anon-function 27 projectiles)": { + "args": ["candidate-process"], + "vars": { + "gp-0": "search", + "s4-0": "candidate", + "s5-0": "candidate-drawable", + "s3-0": "collision-root", + "s4-1": "moving-shape", + "s3-1": "primitive-core", + "f30-0": "surface-distance", + "s4-2": "rating", + "v1-8": "direction-to-candidate", + "a0-16": "masked-rating" + } + }, + "projectile-collision-reaction": { + "args": ["cshape", "isect", "vel-out", "vel-in"], + "vars": { + "sv-64": "contact-direction", + "sv-68": "contact-normal", + "sv-72": "velocity-copy", + "sv-80": ["status-mask", "collide-status"], + "a1-1": "move-amount", + "a1-7": "separation", + "sv-224": "wall?" + } + }, + "(event projectile-moving projectile)": { + "vars": { + "a1-2": "attack-message", + "v1-13": "attack-id", + "v1-14": "notify-handle" + } + }, + "(code projectile-moving projectile)": { + "vars": { + "s5-0": "time-ratio", + "s4-0": "substep-count", + "f0-6": "target-distance", + "s3-0": "previous-position", + "v1-35": "i" + } + }, + "projectile-update-velocity-space-wars": { + "args": ["this"], + "vars": { + "s5-1": "target-offset", + "s4-0": "target-direction", + "s3-0": "velocity-direction", + "f30-0": "speed" + } + }, + "(method 26 projectile)": { + "args": ["this"], + "vars": { + "s5-0": "moving-shape", + "s4-0": "sphere-prim" + } + }, + "(code projectile-die projectile)": { + "vars": { + "v1-0": "notify-handle" + } + }, + "projectile-init-by-other": { + "args": [ + "source-entity", + "launch-position", + "initial-velocity", + "options", + "last-target-handle" + ], + "vars": { + "v1-4": "i", + "a1-8": "overlap-params" + } + }, + "(method 27 projectile-yellow)": { + "args": ["this"], + "vars": { + "s5-0": "launcher-position", + "f30-0": "launch-angle" + } + }, + "(method 24 projectile-yellow)": { + "args": ["this"], + "vars": { + "s5-0": "sound-params", + "a1-3": "sound-position", + "gp-1": "owner" + } + }, + "(method 28 projectile-yellow)": { + "args": ["this"], + "vars": { + "s5-0": "best-match", + "s4-0": "preferred-match", + "v1-10": "near-match", + "a1-8": "target-process" + } + }, + "(method 27 projectile-blue)": { + "args": ["this"], + "vars": { + "s5-1": "target-process", + "v1-20": "target-drawable" + } + }, + "(method 26 projectile-blue)": { + "args": ["this"], + "vars": { + "s5-0": "moving-shape", + "s4-0": "sphere-prim" + } + }, + "spawn-projectile-blue": { + "args": ["target-actor"], + "vars": { + "s3-0": "joint-index", + "gp-0": "random-velocity", + "s4-1": "projectile-process", + "t9-5": "activate-projectile", + "s2-0": "run-in-process", + "s1-0": "projectile-process", + "s0-0": "initializer", + "sv-48": "source-entity" + } + }, + "(method 28 projectile-blue)": { + "args": ["this"], + "vars": { + "s5-0": "target-process", + "v1-4": "target-drawable" + } + }, + "actor-get-arg!": { + "args": ["result", "key", "encoded-name"], + "vars": { + "s5-0": "source-cursor", + "gp-0": "result-cursor", + "s2-0": "scan-index", + "s1-0": "matched?", + "s0-0": "key-index", + "v1-22": "value-cursor" + } + }, + "art-part-name": { + "args": ["art-name"], + "vars": { + "gp-0": "cursor" + } + }, + "init-viewer": { + "args": ["art-group-name"], + "vars": { + "s2-0": "loaded-art", + "s5-0": "joint-animation-index", + "s4-0": "merc-geometry-index", + "s3-0": "joint-geometry-index", + "s1-0": "i", + "a1-3": "skeleton-description" + } + }, + "(method 11 viewer)": { + "args": ["this", "actor"], + "vars": { + "gp-1": "entity-type" + } + }, + "init-viewer-for-other": { + "args": ["art-name", "position"] + }, + "add-a-bunch": { + "args": ["art-name", "x-count", "z-count", "spacing"], + "vars": { + "s2-0": "x-index", + "s1-0": "z-index", + "s0-0": "position", + "sv-32": "spawned-process" + } + }, + "birth-viewer": { + "args": ["proc", "actor"] + }, + "(method 28 water-anim)": { + "args": ["this", "point"] + }, + "(method 25 water-anim)": { + "args": ["this"], + "vars": { + "sv-16": "resource-tag", + "v1-3": "translation-offset", + "f0-6": "rotation-offset" + } + }, + "(method 22 water-anim)": { + "args": ["this"], + "vars": { + "s5-0": "look-index", + "s5-1": "look-entry", + "s4-0": "skeleton", + "s3-0": "skeleton-check", + "s4-1": "animation-channel", + "a2-2": "ambient-spec", + "a3-0": "sound-position" + } + }, + "(trans water-vol-idle water-anim)": { + "vars": { + "t9-0": "parent-transition" + } + }, + "(event water-vol-idle water-anim)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-0": "updated-mask" + } + }, + "(method 25 dark-eco-pool)": { + "args": ["this"], + "vars": { + "t9-0": "parent-setup" + } + }, + "(method 22 dark-eco-pool)": { + "args": ["this"], + "vars": { + "t9-0": "parent-setup", + "gp-0": "ripple-ctrl" + } + }, + "(trans water-vol-idle dark-eco-pool)": { + "vars": { + "t9-0": "parent-transition", + "gp-0": "ripple-ctrl", + "f0-1": "time-phase", + "f30-0": "ripple-pulse", + "s5-0": "ripple-query", + "s3-0": "vertex-index" + } + }, + "(method 22 rigid-body)": { + "args": ["this", "position", "rotation", "linear-damping", "angular-damping"] + }, + "(method 9 rigid-body)": { + "args": ["this", "mass", "size-x", "size-y", "size-z"], + "vars": { + "f0-1": "mass-for-reciprocal", + "f0-4": "mass-value", + "f1-1": "box-inertia-divisor", + "f0-5": "mass-over-twelve", + "f0-7": "inertia-x", + "f0-10": "inertia-y", + "f0-13": "inertia-z" + } + }, + "(method 17 rigid-body)": { + "args": ["this", "point", "out-velocity"], + "vars": { + "v1-1": "offset" + } + }, + "matrix-3x3-triple-transpose-product": { + "args": ["result", "left", "middle"], + "vars": { + "s2-0": "left-transpose", + "s3-0": "product" + } + }, + "(method 10 rigid-body)": { + "args": ["this", "dt"], + "vars": { + "s4-0": "spin-quaternion" + } + }, + "(method 13 rigid-body)": { + "args": ["this", "point", "force"], + "vars": { + "v1-2": "offset", + "a1-2": "added-torque" + } + }, + "(method 16 rigid-body)": { + "args": ["this", "point", "force", "max-arm"], + "vars": { + "a0-3": "offset", + "s4-1": "added-torque", + "f0-0": "arm-length" + } + }, + "(method 14 rigid-body)": { + "args": ["this", "local-point", "local-force"], + "vars": { + "s5-0": "world-point", + "s4-0": "world-force" + } + }, + "(method 15 rigid-body)": { + "args": ["this", "force"] + }, + "(method 18 rigid-body)": { + "args": ["this", "out-position"], + "vars": { + "gp-0": "world-center-offset" + } + }, + "(method 22 rigid-body-platform)": { + "args": ["this", "position", "simulation-time"], + "vars": { + "v1-0": "water-actor", + "a2-1": "water-link", + "a0-1": "water-process" + } + }, + "(method 24 rigid-body-platform)": { + "args": ["this", "control-point", "simulation-time"], + "vars": { + "s4-0": "force", + "f0-2": "submerged-depth", + "f30-0": "submerged-fraction" + } + }, + "(method 26 rigid-body-platform)": { + "args": ["this"], + "vars": { + "a1-0": "gravity-force" + } + }, + "(method 27 rigid-body-platform)": { + "args": ["this", "target-position"], + "vars": { + "gp-0": "offset", + "f0-1": "distance", + "f1-1": "force-magnitude" + } + }, + "(method 23 rigid-body-platform)": { + "args": ["this", "simulation-time"], + "vars": { + "s4-0": "body-matrix", + "s3-0": "i", + "s2-0": "control-point" + } + }, + "(method 28 rigid-body-platform)": { + "args": ["this"], + "vars": { + "f30-0": "fixed-step", + "f28-0": "simulation-time" + } + }, + "rigid-body-platform-event-handler": { + "args": ["source", "argc", "message", "block"], + "vars": { + "s5-0": "bonk-source", + "v1-7": "bonk-drawable", + "f0-4": "bonk-force", + "v1-16": "attack-id", + "gp-1": "flop-source", + "v1-24": "flop-drawable", + "f0-9": "flop-force", + "gp-2": "explosion-source", + "v1-34": "explosion-drawable", + "s5-1": "impulse-source", + "v0-0": "force-vector", + "v1-44": "edge-grab-data", + "v1-48": "rider-handle-reference", + "v1-50": "rider-process" + } + }, + "(method 29 rigid-body-platform)": { + "args": ["this", "constants"] + }, + "(method 30 rigid-body-platform)": { + "args": ["this"], + "vars": { + "s5-0": "moving-shape", + "s4-0": "sphere-prim" + } + }, + "(method 31 rigid-body-platform)": { + "args": ["this"], + "vars": { + "s5-0": "control-point-count", + "s4-0": "i", + "s3-0": "control-point", + "f30-0": "angle" + } + }, + "(method 11 rigid-body-platform)": { + "args": ["this", "actor"] + }, + "nav-enemy-rnd-percent?": { + "args": ["chance"] + }, + "nav-enemy-rnd-float-range": { + "args": ["minimum", "maximum"] + }, + "nav-enemy-rnd-int-count": { + "args": ["count"] + }, + "nav-enemy-rnd-int-range": { + "args": ["minimum", "maximum"] + }, + "nav-enemy-rnd-go-idle?": { + "args": ["base-chance"], + "vars": { + "v1-3": "frame-run-time", + "f1-2": "load-factor" + } + }, + "(method 7 nav-enemy)": { + "args": ["this", "offset"] + }, + "(method 42 nav-enemy)": { + "args": ["this"], + "vars": { + "v1-11": "found-far-point", + "s5-0": "tries-left", + "s4-0": "destination", + "v1-8": "vertex-index" + } + }, + "(method 44 nav-enemy)": { + "args": ["this", "source", "block"] + }, + "(method 72 nav-enemy)": { + "args": ["this", "source", "block"] + }, + "(method 73 nav-enemy)": { + "args": ["this", "source", "block"] + }, + "(method 43 nav-enemy)": { + "args": ["this", "source", "block"] + }, + "nav-enemy-send-attack": { + "args": ["target", "touch-entry", "mode"] + }, + "nav-enemy-default-event-handler": { + "args": ["source", "argc", "message", "block"], + "vars": { + "gp-1": "hit-direction", + "v0-0": "new-flags" + } + }, + "nav-enemy-jump-event-handler": { + "args": ["source", "argc", "message", "block"] + }, + "process-drawable-death-event-handler": { + "args": ["source", "argc", "message", "block"], + "vars": { + "v0-0": "new-status" + } + }, + "(method 41 nav-enemy)": { + "args": ["this"], + "vars": { + "f0-3": "speed-error", + "f1-4": "speed-step", + "f0-12": "travel-speed", + "v1-15": "travel-velocity" + } + }, + "nav-enemy-flee-post": { + "vars": { + "gp-1": "away-direction" + } + }, + "(method 46 nav-enemy)": { + "args": ["this", "maximum-distance"] + }, + "nav-enemy-notice-player?": { + "vars": { + "gp-0": "noticed?" + } + }, + "nav-enemy-facing-direction?": { + "args": ["direction", "angle-tolerance"], + "vars": { + "s4-0": "facing-direction", + "s5-0": "test-direction" + } + }, + "nav-enemy-facing-point?": { + "args": ["point", "angle-tolerance"], + "vars": { + "v1-1": "to-point" + } + }, + "nav-enemy-facing-player?": { + "args": ["angle-tolerance"] + }, + "nav-enemy-test-nav-mesh-intersection-xz?": { + "args": ["point"] + }, + "nav-enemy-test-point-in-nav-mesh?": { + "args": ["point"] + }, + "nav-enemy-test-point-near-nav-mesh?": { + "args": ["point"] + }, + "nav-enemy-set-base-collide-sphere-collide-with": { + "args": ["collide-with"], + "vars": { + "s5-0": "root-prim", + "s4-0": "prim-group", + "s5-1": "base-sphere", + "s3-0": "i", + "s2-0": "prim", + "v1-6": "sphere" + } + }, + "nav-enemy-set-hit-from-direction": { + "args": ["source"], + "vars": { + "gp-0": "hit-direction", + "s5-0": "attacker-process", + "v1-1": "attacker" + } + }, + "nav-enemy-fall-and-play-death-anim": { + "args": ["animation", "align-scale", "animation-speed", "unused-hold-frame", "unused-timeout"], + "vars": { + "s4-1": "alignment-done?", + "s3-0": "moving-shape", + "f0-6": "knockback-speed", + "f0-8": "knockback-speed" + } + }, + "nav-enemy-turn-to-face-dir": { + "args": ["direction", "angle-tolerance"], + "vars": { + "v1-16": "done-turning?", + "s4-0": "start-time" + } + }, + "nav-enemy-turn-to-face-point": { + "args": ["point", "angle-tolerance"], + "vars": { + "gp-1": "direction-to-point" + } + }, + "nav-enemy-initialize-custom-jump": { + "args": ["destination", "use-drop-arc?", "minimum-height", "height-factor", "gravity"], + "vars": { + "s4-0": "start-position", + "f28-0": "horizontal-distance", + "f30-0": "arc-height", + "f26-0": "vertical-distance", + "f24-0": "current-speed", + "s1-1": "facing-direction", + "s2-2": "destination-direction" + } + }, + "nav-enemy-initialize-jump": { + "args": ["destination"] + }, + "nav-enemy-execute-custom-jump": { + "args": ["jump-animation", "launch-frame", "animation-speed"] + }, + "nav-enemy-jump-post": { + "vars": { + "f30-0": "air-time", + "v1-12": "new-position" + } + }, + "nav-enemy-jump-land-post": { + "vars": { + "f0-7": "travel-speed", + "v1-9": "travel-velocity" + } + }, + "(method 45 nav-enemy)": { + "args": ["this", "info"] + }, + "(method 49 nav-enemy)": { + "args": ["this", "info"] + }, + "nav-enemy-init-by-other": { + "args": ["controller", "spawn-position", "cue-point"], + "vars": { + "s3-1": "facing-direction" + } + }, + "(method 11 nav-enemy)": { + "args": ["this", "actor"] + }, + "(method 50 nav-enemy)": { + "args": ["this", "point"], + "vars": { + "s4-0": "saved-position", + "gp-0": "navigation", + "v1-8": "mesh-origin", + "f0-1": "point-offset-x", + "f1-2": "point-offset-z", + "v1-9": "sphere-index", + "a0-10": "sphere", + "f2-2": "sphere-offset-x", + "f3-1": "sphere-offset-z" + } + }, + "(code anim-tester-process)": { + "vars": { + "gp-2": "seq", + "s4-0": [ + "obj", + "anim-test-obj" + ], + "s4-1": "anim", + "s5-1": "item", + "v1-10": [ + "seq-list", + "glst-list" + ], + "v1-18": "item-list", + "v1-2": "obj-list", + "v1-73": "to-max?" + } + }, + "(method 0 anim-test-obj)": { + "args": [ + "allocation", + "type-to-make", + "count", + "name", + "ag" + ], + "vars": { + "s4-0": "obj", + "t9-0": "struct-new", + "v1-1": "alloc-type" + } + }, + "(method 0 anim-test-seq-item)": { + "args": [ + "allocation", + "type-to-make", + "count", + "name" + ], + "vars": { + "t9-0": "struct-new", + "v0-0": [ + "item", + "anim-test-seq-item" + ], + "v1-1": "alloc-type" + } + }, + "(method 0 anim-test-sequence)": { + "args": [ + "allocation", + "type-to-make", + "count", + "name" + ], + "vars": { + "s5-0": "seq", + "t9-0": "struct-new", + "v1-1": "alloc-type" + } + }, + "anim-test-anim-list-handler": { + "args": [ + "cmd", + "ctrl" + ], + "vars": { + "a0-23": "node", + "a0-40": "node", + "a3-2": "packet-end", + "a3-4": "packet-end", + "s2-0": "draw-xy", + "s3-0": "dma-buff", + "s4-0": "packet-start", + "s4-1": "dma-buff", + "s5-0": [ + "seq", + "anim-test-sequence" + ], + "s5-1": "packet-start", + "v1-0": [ + "obj", + "anim-test-obj" + ], + "v1-15": "list", + "v1-17": [ + "cur-node", + "anim-test-sequence" + ], + "v1-21": "list", + "v1-23": [ + "cur-node", + "anim-test-sequence" + ], + "v1-55": "width", + "v1-6": [ + "packet", + "dma-packet" + ], + "v1-62": [ + "packet", + "dma-packet" + ] + } + }, + "anim-test-edit-seq-insert-item": { + "args": [ + "item", + "seq" + ], + "vars": { + "s4-0": "new-item", + "v1-8": "node" + } + }, + "anim-test-edit-sequence-list-handler": { + "args": [ + "cmd", + "ctrl" + ], + "vars": { + "a0-33": "str", + "a0-36": "str", + "a0-47": "y", + "a1-14": "fmt-str", + "a1-16": "fmt-str", + "a1-2": "field-left", + "a1-24": "field-left", + "a1-26": "x", + "a1-30": "first-item", + "a2-21": "whole-speed", + "a3-15": "packet-end", + "a3-17": "packet-end", + "a3-21": "packet-end", + "a3-4": "packet-end", + "a3-8": "packet-end", + "f30-0": "old-first", + "f30-1": "old-last", + "gp-0": [ + "item", + "anim-test-seq-item" + ], + "gp-2": "packet-start", + "gp-3": "packet-start", + "s0-0": "dma-buff", + "s0-1": "dma-buff", + "s0-2": "fmt", + "s0-3": "fmt", + "s1-0": "packet-start", + "s1-1": "packet-start", + "s1-2": "draw-adv", + "s1-3": "draw-adv", + "s1-4": "draw-adv", + "s1-5": "draw-adv", + "s1-6": "draw-xy", + "s2-0": "picking?", + "s2-2": "dma-buff", + "s3-0": "font-ctx", + "s3-1": "prev-item", + "s3-2": "next-item", + "s3-3": "dma-buff", + "s4-0": [ + "seq", + "anim-test-sequence" + ], + "s4-1": [ + "packet-start", + "pointer" + ], + "s4-2": "dma-buff", + "sv-192": "draw-xy", + "sv-208": "fmt", + "v0-24": [ + "picked-seq", + "anim-test-sequence" + ], + "v1-101": [ + "list", + "glst-list" + ], + "v1-103": [ + "list", + "glst-list" + ], + "v1-124": "node", + "v1-125": "prev-node", + "v1-142": "node", + "v1-143": "next-node", + "v1-24": "field-width", + "v1-29": [ + "packet", + "dma-packet" + ], + "v1-318": "field", + "v1-322": "field", + "v1-331": "new-flags", + "v1-355": [ + "packet", + "dma-packet" + ], + "v1-367": [ + "packet", + "dma-packet" + ], + "v1-44": [ + "packet", + "dma-packet" + ], + "v1-61": "speed", + "v1-64": "speed", + "v1-69": "ctx", + "v1-70": [ + "packet", + "dma-packet" + ], + "v1-88": "field" + } + }, + "anim-test-obj-init": { + "args": [ + "obj", + "parent-ctrl" + ], + "vars": { + "v1-6": "ctrl" + } + }, + "anim-test-obj-list-handler": { + "args": [ + "cmd", + "ctrl" + ], + "vars": { + "a3-2": "packet-end", + "a3-4": "packet-end", + "s2-0": "draw-xy", + "s3-0": "dma-buff", + "s4-0": "packet-start", + "s4-1": "dma-buff", + "s5-0": [ + "obj", + "anim-test-obj" + ], + "s5-2": "packet-start", + "v1-0": "op", + "v1-38": "tester", + "v1-64": "width", + "v1-70": [ + "packet", + "dma-packet" + ], + "v1-8": [ + "packet", + "dma-packet" + ] + } + }, + "anim-test-seq-item-copy!": { + "args": [ + "dst", + "src" + ], + "vars": { + "v0-0": "parent-seq", + "v1-0": "node" + } + }, + "anim-test-seq-mark-as-edited": { + "args": [ + "seq" + ] + }, + "anim-test-sequence-init": { + "args": [ + "seq", + "obj" + ] + }, + "anim-test-sequence-list-handler": { + "args": [ + "cmd", + "ctrl" + ], + "vars": { + "a0-24": "node", + "a0-42": "node", + "a3-2": "packet-end", + "a3-4": "packet-end", + "s2-0": "draw-xy", + "s3-0": "dma-buff", + "s4-0": "packet-start", + "s4-1": "dma-buff", + "s5-0": "seq", + "s5-1": "packet-start", + "v1-0": "obj", + "v1-17": "list", + "v1-19": [ + "cur-node", + "anim-test-sequence" + ], + "v1-23": "list", + "v1-25": [ + "cur-node", + "anim-test-sequence" + ], + "v1-57": "width", + "v1-64": [ + "packet", + "dma-packet" + ], + "v1-8": [ + "packet", + "dma-packet" + ] + } + }, + "anim-tester-add-newobj": { + "args": [ + "tester", + "name", + "ag" + ], + "vars": { + "a1-11": "item", + "s0-0": "found?", + "s1-0": "jgeo-elt", + "s2-0": "obj", + "s3-0": "idx", + "s5-0": "first-obj", + "sv-112": "anim-elt", + "sv-128": [ + "seq", + "anim-test-sequence" + ], + "sv-96": "mesh-elt", + "v1-48": "item-list", + "v1-51": "list", + "v1-52": [ + "first-item", + "anim-test-seq-item" + ] + } + }, + "anim-tester-add-object": { + "args": [ + "name" + ], + "vars": { + "s5-0": "ag" + } + }, + "anim-tester-add-sequence": { + "args": [ + "name" + ], + "vars": { + "gp-1": "seq", + "s4-0": "existing", + "s5-0": "obj", + "s5-1": "end-item", + "v1-6": "obj-list" + } + }, + "anim-tester-adjust-frame": { + "args": [ + "frame", + "num-frames" + ] + }, + "anim-tester-disp-frame-num": { + "args": [ + "prefix", + "frame", + "artist-base", + "ctx" + ], + "vars": { + "a3-2": "packet-end", + "gp-0": "packet-start", + "s0-0": "draw-adv", + "s2-1": "draw-adv", + "s2-2": "draw-adv", + "s3-0": "dma-buff", + "sv-16": "fmt-func", + "v1-6": [ + "packet", + "dma-packet" + ] + } + }, + "anim-tester-interface": { + "vars": { + "a3-1": "packet-end", + "a3-3": "packet-end", + "a3-5": "packet-end", + "a3-7": "packet-end", + "gp-0": "obj", + "gp-1": "packet-start", + "gp-2": "obj", + "gp-3": "packet-start", + "gp-4": "packet-start", + "gp-5": "packet-start", + "s5-0": "dma-buff", + "s5-1": "dma-buff", + "s5-2": "dma-buff", + "s5-3": "dma-buff", + "v1-0": "mode", + "v1-20": [ + "packet", + "dma-packet" + ], + "v1-36": [ + "packet", + "dma-packet" + ], + "v1-43": "obj", + "v1-44": "seq", + "v1-51": [ + "packet", + "dma-packet" + ], + "v1-62": [ + "packet", + "dma-packet" + ] + } + }, + "anim-tester-load-object-seqs": { + "args": [ + "tester", + "name" + ] + }, + "anim-tester-num-print": { + "args": [ + "stream", + "frame" + ] + }, + "anim-tester-pick-item-setup": { + "args": [ + "item", + "seq" + ], + "vars": { + "a1-16": "node", + "a1-20": "match", + "gp-0": "obj", + "v1-10": "list", + "v1-11": "cur-node" + } + }, + "anim-tester-save-all-objects": { + "args": [ + "tester" + ], + "vars": { + "gp-0": [ + "cur-obj", + "anim-test-obj" + ], + "v1-0": "obj-list", + "v1-9": "node" + } + }, + "anim-tester-set-name": { + "args": [ + "name" + ], + "vars": { + "s3-0": "obj", + "s4-0": "old-name", + "s5-0": "seq", + "v1-14": "node", + "v1-6": "obj-list" + } + }, + "anim-tester-standard-event-handler": { + "args": [ + "proc", + "argc", + "message", + "block" + ] + }, + "anim-tester-string-get-frame!!": { + "args": [ + "out", + "str" + ] + }, + "anim-tester-update-anim-info": { + "args": [ + "item" + ] + }, + "display-list-control": { + "args": [ + "ctrl" + ], + "vars": { + "a0-41": "prev", + "a0-55": "next", + "a3-12": "packet-end", + "a3-6": "packet-end", + "s4-0": "found-highlight?", + "s4-1": "dma-buff", + "s4-2": "dma-buff", + "s5-2": "past-top?", + "s5-3": "packet-start", + "s5-4": "lines-to-scroll", + "s5-5": "lines-to-scroll", + "s5-6": "packet-start", + "v1-107": "node", + "v1-111": "cur-node", + "v1-112": "next-node", + "v1-12": "list", + "v1-133": "node", + "v1-135": "node", + "v1-147": [ + "packet", + "dma-packet" + ], + "v1-20": "node", + "v1-22": "node", + "v1-29": "list", + "v1-50": "node", + "v1-52": "node", + "v1-72": [ + "packet", + "dma-packet" + ], + "v1-88": "node", + "v1-92": "cur-node", + "v1-93": "prev-node" + } + }, + "dm-cam-mode-func": { + "args": [ + "mode", + "msg" + ] + }, + "dm-cam-settings-func": { + "args": [ + "option", + "msg" + ] + }, + "dm-cam-settings-func-int": { + "args": [ + "id", + "msg", + "value", + "fallback" + ] + }, + "dm-cam-externalize": { + "args": [ + "mode", + "msg" + ] + }, + "dm-cam-render-float": { + "args": [ + "id", + "msg", + "value", + "fallback" + ], + "vars": { + "f30-0": "units-to-degrees" + } + }, + "dm-subdiv-float": { + "args": [ + "setting", + "msg", + "value", + "fallback" + ] + }, + "dm-subdiv-int": { + "args": [ + "setting", + "msg", + "value", + "fallback" + ] + }, + "dm-setting-language": { + "args": [ + "id", + "msg" + ] + }, + "dm-current-continue": { + "args": [ + "continue-name", + "msg" + ] + }, + "dm-subdiv-draw-func": { + "args": [ + "id", + "msg" + ] + }, + "dm-ocean-subdiv-draw-func": { + "args": [ + "id", + "msg" + ] + }, + "dm-time-of-day-func": { + "args": [ + "id", + "msg" + ] + }, + "dm-time-of-day-func2": { + "args": [ + "setting", + "msg" + ] + }, + "dm-boolean-toggle-pick-func": { + "args": [ + "setting", + "msg" + ] + }, + "dm-time-of-day-pick-func": { + "args": [ + "id", + "msg" + ] + }, + "dm-actor-marks-pick-func": { + "args": [ + "mode", + "msg" + ] + }, + "dm-compact-actor-pick-func": { + "args": [ + "mode", + "msg" + ] + }, + "dm-actor-vis-pick-func": { + "args": [ + "mode", + "msg" + ] + }, + "dm-game-mode-pick-func": { + "args": [ + "mode", + "msg" + ] + }, + "dm-vu1-user-toggle-pick-func": { + "args": [ + "mask", + "msg" + ] + }, + "dm-vu1-user-set-pick-func": { + "args": [ + "mask", + "msg" + ] + }, + "dm-texture-user-toggle-pick-func": { + "args": [ + "mask", + "msg" + ] + }, + "dm-texture-user-set-pick-func": { + "args": [ + "mask", + "msg" + ] + }, + "dm-strip-lines-toggle-pick-func": { + "args": [ + "id", + "msg" + ] + }, + "dm-strip-lines-set-pick-func": { + "args": [ + "id", + "msg" + ] + }, + "dm-edit-instance-toggle-pick-func": { + "args": [ + "mask", + "msg" + ], + "vars": { + "v1-0": "proto" + } + }, + "all-texture-tweak-adjust": { + "args": [ + "dir", + "delta" + ] + }, + "debug-menu-nodeprocess-safe": { + "args": ["process-handle"], + "vars": { + "v0-0": "resolved-process" + } + }, + "babak-with-cannon-compute-cannon-dir": { + "args": ["cannon", "output"], + "vars": {} + }, + "babak-with-cannon-compute-ride-point": { + "args": ["cannon", "output"], + "vars": { + "a1-4": "ride-offset", + "a2-0": "main-joint" + } + }, + "babak-with-cannon-ride-cannon-post": { + "args": [], + "vars": { + "v1-0": "cannon-entity", + "s5-0": "cannon-handle", + "gp-0": "cannon-process", + "s5-1": "cannon-direction" + } + }, + "(code babak-with-cannon-jump-onto-cannon)": { + "args": [], + "vars": { + "v1-7": "cannon-entity", + "gp-0": "cannon-handle", + "a0-2": "cannon-process", + "v1-20": "cannon-entity", + "gp-1": "cannon-handle", + "a0-9": "cannon-process", + "gp-2": "cannon-direction" + } + }, + "(code babak-with-cannon-jump-off-cannon)": { + "args": [], + "vars": { + "a1-6": "landing-poly" + } + }, + "(enter babak-with-cannon-shooting)": { + "args": [], + "vars": { + "v1-2": "cannon-entity" + } + }, + "(exit babak-with-cannon-shooting)": { + "args": [], + "vars": { + "v1-0": "cannon-entity" + } + }, + "(trans babak-with-cannon-shooting)": { + "args": [], + "vars": { + "f0-1": "target-height-offset" + } + }, + "(method 11 babak-with-cannon)": { + "args": ["this", "source-entity"], + "vars": {} + }, + "point-in-air-box-area?": { + "args": ["x-offset", "z-offset", "air-volume"], + "vars": { + "v0-0": "inside?", + "f0-2": "local-x", + "f1-5": "local-z" + } + }, + "point-in-air-box?": { + "args": ["position", "air-volume"], + "vars": { + "f1-2": "x-offset", + "f2-1": "z-offset", + "v1-0": "air-volume", + "v0-0": "inside?", + "f0-5": "local-x", + "f1-4": "local-z" + } + }, + "point-in-air?": { + "args": ["position", "air-boxes", "count"], + "vars": { + "t0-0": "inside?", + "v1-0": "i", + "t1-0": "position", + "a3-1": "air-volume", + "f0-2": "x-offset", + "f2-1": "z-offset", + "f1-5": "local-x", + "f0-4": "local-z" + } + }, + "points-in-air?": { + "args": ["first-position", "second-position", "air-boxes", "count"], + "vars": { + "t1-4": "both-inside?", + "v1-0": "i", + "t0-1": "air-volume", + "f0-0": "minimum-height", + "f2-0": "first-x-offset", + "f4-0": "first-z-offset", + "f0-4": "second-x-offset", + "f1-6": "second-z-offset", + "t2-0": "air-volume", + "t1-3": "first-inside?", + "f3-3": "first-local-x", + "f2-2": "first-local-z", + "f2-5": "second-local-x", + "f0-6": "second-local-z" + } + }, + "add-debug-air-box": { + "args": ["bucket", "air-volume"], + "vars": { + "a0-1": "camera-inside?", + "a1-1": "camera-position", + "s5-0": "corner-a", + "s4-0": "corner-b", + "s2-0": "color", + "v1-0": "air-volume", + "f0-4": "x-offset", + "f2-1": "z-offset", + "f1-5": "local-x", + "f0-6": "local-z" + } + }, + "(method 9 wobbler)": { + "args": ["this", "spring", "damping", "height"], + "vars": {} + }, + "(method 10 wobbler)": { + "args": ["this", "x-impulse", "y-impulse"], + "vars": {} + }, + "(method 11 wobbler)": { + "args": ["this"], + "vars": {} + }, + "(method 12 wobbler)": { + "args": ["this", "output"], + "vars": { + "s5-0": "tilt-axis", + "f0-8": "tilt-ratio", + "f0-9": "tilt-angle" + } + }, + "(method 0 twister)": { + "args": [ + "allocation", + "type-to-make", + "first-joint", + "last-joint", + "max-speed", + "max-speed-ry", + "smoothing", + "min-dist" + ], + "vars": { + "gp-0": "joint-count", + "v0-0": "new-twister", + "v1-4": "i" + } + }, + "(method 5 twister)": { + "args": ["this"], + "vars": {} + }, + "(method 9 twister)": { + "args": ["this", "start-joint", "end-joint", "max-dry"], + "vars": { + "v1-1": "i", + "a1-2": "end-index" + } + }, + "(method 10 twister)": { + "args": ["this", "target-angle"], + "vars": {} + }, + "(method 11 twister)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "s4-0": "last-state", + "f0-2": "target-delta", + "f30-1": "propagated-angle", + "s4-1": "joint-state", + "f0-9": "relative-delta" + } + }, + "(method 12 twister)": { + "args": ["this", "owner"], + "vars": { + "s4-0": "rotation", + "s3-0": "i", + "s2-0": "bone-transform" + } + }, + "(trans windmill-one-idle)": { + "args": [], + "vars": { + "t2-0": "sound-position" + } + }, + "(method 11 windmill-one)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "platform-group", + "s2-0": "first-blade", + "s2-1": "second-blade" + } + }, + "(event grottopole-idle)": { + "args": ["source", "argc", "message", "block"], + "vars": { + "v1-2": "attack-id" + } + }, + "move-grottopole": { + "args": ["pole", "direction"], + "vars": { + "f30-0": "distance-moved", + "s4-0": "frame-offset", + "s3-0": "particle-position", + "s2-0": "finished?", + "f28-0": "frame-distance" + } + }, + "move-grottopole-to-position": { + "args": ["pole"], + "vars": { + "a1-0": "position-offset" + } + }, + "(code grottopole-moving-up)": { + "args": [], + "vars": { + "v1-4": "persistent-data" + } + }, + "(code grottopole-moving-down)": { + "args": [], + "vars": { + "v1-4": "persistent-data" + } + }, + "(method 11 grottopole)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "pole-group", + "s2-0": "first-mesh", + "s2-1": "second-mesh", + "s2-2": "third-mesh" + } + }, + "(code ecoventrock-break)": { + "args": ["already-broken?"], + "vars": { + "v1-2": "linked-harvester", + "s5-1": "rock-position", + "v1-14": "target-position", + "f0-1": "away-x", + "f1-2": "away-z", + "f2-1": "horizontal-speed", + "f30-0": "vertical-speed", + "f2-2": "horizontal-scale", + "f28-0": "velocity-x", + "f26-0": "velocity-z", + "s4-0": "spawn-position", + "s3-0": "velocity", + "f20-0": "left-angle", + "f24-0": "right-angle", + "f22-0": "left-cos", + "f0-14": "left-sin", + "f22-1": "right-cos", + "f0-30": "right-sin", + "sv-128": "has-linked-task?", + "gp-1": "camera-handle" + } + }, + "(enter ecoventrock-break)": { + "args": ["already-broken?"], + "vars": {} + }, + "(method 11 ecoventrock)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "rock-mesh" + } + }, + "(code flying-rock-rolling)": { + "args": [], + "vars": { + "gp-0": "on-ground?", + "f30-0": "damping", + "s5-0": "ground-contacts", + "gp-2": "roll-axis", + "f30-1": "speed", + "f0-12": "distance-in-turns" + } + }, + "flying-rock-init-by-other": { + "args": ["position", "velocity", "scale", "source-entity"], + "vars": { + "s3-0": "root-shape", + "s2-0": "sphere-prim", + "s5-1": "tumble-axis" + } + }, + "spawn-flying-rock": { + "args": ["position", "velocity", "scale", "source-entity"], + "vars": {} + }, + "bladeassm-prebind-function": { + "args": ["joint-transforms", "joint-count", "blade-assembly"], + "vars": { + "v1-0": "blade-assembly" + } + }, + "(method 11 bladeassm)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "blade-mesh" + } + }, + "(method 20 flutflutegg)": { + "args": ["this", "velocity-impulse", "wobble-x-impulse", "wobble-y-impulse"], + "vars": {} + }, + "(event flutflutegg-idle)": { + "args": ["source", "argc", "message", "block"], + "vars": { + "s5-1": "hit-direction", + "f0-2": "forward-dot", + "f1-2": "side-dot" + } + }, + "(trans flutflutegg-idle)": { + "args": [], + "vars": { + "gp-0": "target-offset", + "v1-2": "random-mantissa", + "v1-3": "random-bits", + "f30-0": "random-choice" + } + }, + "(event flutflutegg-physics)": { + "args": ["source", "argc", "message", "block"], + "vars": { + "s5-1": "hit-direction", + "f0-2": "forward-dot", + "f1-2": "side-dot" + } + }, + "(code flutflutegg-physics)": { + "args": [], + "vars": { + "a1-0": "next-position", + "a2-3": "model-yaw" + } + }, + "(code flutflutegg-physics-fall)": { + "args": [], + "vars": { + "v1-25": "landed?", + "a2-6": "model-yaw" + } + }, + "(code flutflutegg-break)": { + "args": ["already-broken?"], + "vars": { + "gp-2": "hint-start-time" + } + }, + "(method 11 flutflutegg)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "egg-group", + "s2-0": "lower-sphere", + "s2-1": "upper-sphere" + } + }, + "(code harvester-inflate)": { + "args": ["already-inflated?"], + "vars": {} + }, + "(method 11 harvester)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "harvester-group", + "s2-0": "center-mesh", + "s2-1": "front-right-mesh", + "s2-2": "rear-right-mesh", + "s2-3": "rear-left-mesh", + "s2-4": "front-left-mesh" + } + }, + "beachcam-spawn": { + "args": [], + "vars": { + "gp-0": "camera-actor", + "gp-1": "camera-handle", + "s5-2": "fuel-cell-handle", + "v1-13": "camera" + } + }, + "(method 52 bird-lady)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-state", + "f0-0": "root-y", + "a0-2": "shadow-state", + "a0-4": "shadow-state" + } + }, + "(method 48 bird-lady)": { + "args": ["this"], + "vars": { + "v1-9": "shadow-state", + "v1-14": "shadow-state" + } + }, + "(method 32 bird-lady)": { + "args": ["this", "commit?"], + "vars": {} + }, + "(method 43 bird-lady)": { + "args": ["this"], + "vars": { + "f0-2": "choice" + } + }, + "(method 11 bird-lady)": { + "args": ["this", "source-entity"], + "vars": {} + }, + "(enter idle bird-lady-beach)": { + "args": [], + "vars": { + "a0-2": "flutflut-process", + "a0-6": "egg-process" + } + }, + "(method 32 bird-lady-beach)": { + "args": ["this", "commit?"], + "vars": {} + }, + "(method 11 bird-lady-beach)": { + "args": ["this", "source-entity"], + "vars": {} + }, + "(method 52 mayor)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-state", + "f0-0": "root-y", + "a0-2": "shadow-state" + } + }, + "(method 48 mayor)": { + "args": ["this"], + "vars": { + "v1-9": "shadow-state", + "v1-14": "shadow-state" + } + }, + "mayor-lurkerm-reward-speech": { + "args": ["this", "commit?"], + "vars": {} + }, + "(method 32 mayor)": { + "args": ["this", "commit?"], + "vars": {} + }, + "(method 43 mayor)": { + "args": ["this"], + "vars": { + "f0-2": "choice" + } + }, + "(post idle mayor)": { + "args": [], + "vars": { + "t9-0": "parent-post" + } + }, + "(method 11 mayor)": { + "args": ["this", "source-entity"], + "vars": {} + }, + "(method 52 sculptor)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-state", + "f0-0": "root-y", + "a0-2": "shadow-state" + } + }, + "(method 48 sculptor)": { + "args": ["this"], + "vars": { + "v1-9": "shadow-state", + "v1-14": "shadow-state" + } + }, + "muse-to-idle": { + "args": ["owner"], + "vars": { + "v1-11": "muse-process" + } + }, + "(method 32 sculptor)": { + "args": ["this", "commit?"], + "vars": { + "v1-18": "muse-process" + } + }, + "(method 43 sculptor)": { + "args": ["this"], + "vars": { + "f0-2": "choice" + } + }, + "(code idle sculptor)": { + "args": [], + "vars": { + "v1-43": "task-stage", + "f30-0": "small-count-range", + "v1-68": "small-random-mantissa", + "v1-69": "small-random-bits", + "gp-1": "small-repeats-left", + "f30-1": "huge-roll", + "f30-2": "huge-count-range", + "v1-190": "huge-random-mantissa", + "v1-191": "huge-random-bits", + "gp-2": "huge-repeats-left", + "f30-3": "idle-count-range", + "v1-287": "idle-random-mantissa", + "v1-288": "idle-random-bits", + "gp-3": "idle-repeats-left" + } + }, + "(method 11 sculptor)": { + "args": ["this", "source-entity"], + "vars": {} + }, + "(method 7 pelican)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "i" + } + }, + "pelican-path-update": { + "args": ["turn-speed", "turn-time", "unused", "alignment-path-scale", "snap-heading?"], + "vars": { + "s3-0": "path-work", + "f0-1": "unwrapped-pos", + "f1-2": "path-limit", + "f30-0": "wrapped-pos" + } + }, + "pelican-fly": { + "args": ["flap-count", "glide-count"], + "vars": { + "s4-0": "num-flaps", + "s3-0": "flap-i", + "s4-1": "num-glides", + "s3-3": "glide-i" + } + }, + "(event pelican-circle)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v0-0": "dive-requested?", + "a1-3": "tangent" + } + }, + "(enter pelican-circle)": { + "args": [], + "vars": { + "gp-0": "fuel-cell-pos", + "v1-8": "fuel-cell-manipy" + } + }, + "(trans pelican-circle)": { + "args": [], + "vars": { + "f0-3": "unwrapped-pos", + "f1-2": "path-limit", + "v1-24": "perm-state" + } + }, + "(anon-function 37 pelican)": { + "args": [], + "vars": { + "a0-6": "parent-process", + "a1-5": "query-block", + "t9-6": "send-query" + } + }, + "(enter pelican-dive)": { + "args": ["dive-path", "next-path", "next-duration"], + "vars": { + "a0-4": "fuel-cell-process", + "gp-1": "tangent" + } + }, + "(code pelican-dive)": { + "args": ["dive-path", "next-path", "next-duration"], + "vars": { + "gp-1": "fuel-cell-process" + } + }, + "(enter pelican-to-nest)": { + "args": ["nest-path", "travel-time"], + "vars": {} + }, + "(code pelican-to-nest)": { + "args": ["nest-path", "travel-time"], + "vars": {} + }, + "(anon-function 24 pelican)": { + "args": ["bird"], + "vars": {} + }, + "(event pelican-wait-at-nest)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "a0-2": "fuel-cell-process", + "gp-0": "attacker", + "v1-13": "attacker-drawable", + "f30-0": "forward-cone-half-angle", + "gp-1": "pelican-root", + "s4-0": "attacker-pos" + } + }, + "(enter pelican-wait-at-nest)": { + "args": ["already-at-nest?"], + "vars": { + "s5-0": "nest-pos", + "a0-7": "fuel-cell-process", + "a0-10": "perm-state" + } + }, + "(trans pelican-wait-at-nest)": { + "args": [], + "vars": { + "a1-0": "nest-pos", + "gp-0": "next-pos" + } + }, + "(code pelican-wait-at-nest)": { + "args": ["already-at-nest?"], + "vars": {} + }, + "(anon-function 15 pelican)": { + "args": ["proc", "argc", "message", "block"], + "vars": { + "v1-7": "pickup" + } + }, + "(anon-function 1 pelican)": { + "args": [], + "vars": { + "v0-0": "particles" + } + }, + "(anon-function 39 pelican)": { + "args": [], + "vars": { + "v0-0": "particles" + } + }, + "(enter pelican-fly-to-end)": { + "args": ["escape-path", "travel-time"], + "vars": { + "v1-2": "perm-state", + "gp-1": "path-start" + } + }, + "(code pelican-fly-to-end)": { + "args": ["escape-path", "travel-time"], + "vars": {} + }, + "(anon-function 5 pelican)": { + "args": ["bird"], + "vars": {} + }, + "(code pelican-wait-at-end)": { + "args": ["from-save?"], + "vars": {} + }, + "(code pelican-explode)": { + "args": ["silent?"], + "vars": { + "v1-2": "perm-state", + "gp-2": "pickup-pos", + "a0-7": "fuel-cell-process", + "v1-29": "pickup" + } + }, + "(method 11 pelican)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "root-sphere", + "s5-1": "i", + "v1-27": "new-path", + "s5-2": "fuel-cell-manipy" + } + }, + "(method 20 lurkerworm)": { + "args": ["this"], + "vars": { + "s5-0": "to-target", + "f0-5": "horizontal-distance", + "f0-6": "target-pitch" + } + }, + "lurkerworm-prebind-function": { + "args": ["joint-transforms", "joint-count", "owner"], + "vars": { + "v1-0": "owner", + "s5-0": "head-rotation", + "gp-0": "head-transform" + } + }, + "lurkerworm-joint-callback": { + "args": ["owner"], + "vars": { + "a1-0": "owner" + } + }, + "(method 21 lurkerworm)": { + "args": ["this"], + "vars": { + "a2-0": "joint-5-pos", + "a2-1": "joint-6-pos", + "a2-2": "joint-7-pos", + "a2-3": "joint-8-pos" + } + }, + "lurkerworm-default-event-handler": { + "args": ["sender", "argc", "message", "block"], + "vars": {} + }, + "(code lurkerworm-rest)": { + "args": [], + "vars": { + "f30-0": "min-wait", + "f28-0": "random-wait-range", + "v1-1": "random-mantissa", + "v1-2": "random-bits", + "s5-0": "frames-left", + "gp-1": "strikes-remaining?", + "f0-13": "distance-factor", + "f30-2": "strike-chance" + } + }, + "(code lurkerworm-die)": { + "args": [], + "vars": { + "v1-3": "root-primitive" + } + }, + "(method 11 lurkerworm)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "primitive-group", + "s2-0": "joint-3-sphere", + "s2-1": "joint-5-sphere", + "s2-2": "joint-6-sphere", + "s2-3": "joint-7-sphere", + "s2-4": "joint-8-sphere", + "s2-5": "bite-sphere" + } + }, + "(method 44 lurkercrab)": { + "args": ["this", "other-process", "block"], + "vars": {} + }, + "(method 43 lurkercrab)": { + "args": ["this", "sender", "block"], + "vars": { + "s5-0": "previous-attack-id", + "v1-1": "attack-type", + "s4-0": "punch-destination", + "f30-0": "target-heading", + "s4-1": "knockback-destination" + } + }, + "lurkercrab-invulnerable": { + "args": [], + "vars": { + "v1-3": "body-primitive", + "v0-1": "offense" + } + }, + "lurkercrab-vulnerable": { + "args": [], + "vars": { + "v1-3": "body-primitive", + "v0-1": "offense" + } + }, + "(code nav-enemy-patrol lurkercrab)": { + "args": [], + "vars": { + "gp-0": "walk-cycle", + "gp-5": "peek-cycle" + } + }, + "(post lurkercrab-pushed)": { + "args": [], + "vars": { + "a0-0": "slide-particles", + "a1-0": "root-primitive-core" + } + }, + "(method 11 lurkercrab)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "primitive-group", + "s2-0": "body-primitive", + "s2-1": "joint-16-claw", + "s2-2": "joint-21-claw" + } + }, + "(code nav-enemy-chase lurkerpuppy)": { + "args": [], + "vars": { + "f30-0": "run-speed-scale" + } + }, + "(code nav-enemy-stare lurkerpuppy)": { + "args": [], + "vars": { + "f30-0": "celebrate-speed-scale", + "f0-3": "celebrate-frame", + "gp-2": "idle-time" + } + }, + "(code nav-enemy-victory lurkerpuppy)": { + "args": [], + "vars": { + "gp-0": "i", + "f0-4": "celebrate-frame" + } + }, + "(method 47 lurkerpuppy)": { + "args": ["this"], + "vars": { + "s5-0": "root-shape", + "s4-0": "attack-sphere" + } + }, + "(event idle beach-rock)": { + "args": ["sender", "argc", "message", "block"], + "vars": {} + }, + "(trans falling beach-rock)": { + "args": [], + "vars": { + "f30-0": "anim-frame", + "gp-0": "particle-pos" + } + }, + "(code falling beach-rock)": { + "args": [], + "vars": { + "v1-3": "target-grabbed?", + "v1-49": "target-released?", + "gp-2": "camera-handle", + "s5-1": "fuel-cell-handle", + "a0-28": "fuel-cell-process" + } + }, + "(code fallen beach-rock)": { + "args": [], + "vars": { + "v1-6": "alignment-transform" + } + }, + "(method 11 beach-rock)": { + "args": ["this", "source-entity"], + "vars": { + "s5-0": "fuel-cell-pos" + } + }, + "(method 11 lrocklrg)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "root-shape", + "s3-0": "collision-mesh" + } + }, + "(method 7 seagullflock)": { + "args": ["this", "offset"], + "vars": {} + }, + "(method 10 seagullflock)": { + "args": ["this"], + "vars": {} + }, + "(method 25 seagull)": { + "args": ["this", "target-heading"], + "vars": { + "f1-1": "heading-error", + "f0-5": "bank", + "f2-0": "max-bank" + } + }, + "(method 24 seagull)": { + "args": ["this"], + "vars": { + "s5-0": "to-target", + "v1-5": "bird-bit", + "v1-15": "avoiding-bird", + "f1-2": "avoidance-heading-error", + "f0-7": "avoidance-bank", + "f2-0": "avoidance-max-bank", + "f0-15": "target-heading", + "v1-18": "targeting-bird", + "f1-12": "target-heading-error", + "f0-20": "target-bank", + "f2-2": "target-max-bank", + "f0-28": "horizontal-distance-squared" + } + }, + "seagull-post": { + "args": [], + "vars": { + "s5-0": "roll", + "gp-0": "yaw" + } + }, + "(enter seagull-idle)": { + "args": [], + "vars": { + "v1-0": "flock", + "f30-0": "target-heading", + "f28-0": "heading-range", + "f26-0": "heading-base" + } + }, + "(trans seagull-idle)": { + "args": [], + "vars": { + "v1-12": "to-player", + "v1-14": "flock" + } + }, + "(code seagull-idle)": { + "args": [], + "vars": { + "f30-0": "action-count", + "v1-14": "action-mantissa", + "v1-15": "action-random", + "gp-1": "action", + "f30-1": "wait-range", + "v1-18": "wait-mantissa", + "v1-19": "wait-random", + "s5-0": "wait-frames", + "s4-0": "i", + "f30-2": "idle-wait-range", + "v1-37": "idle-wait-mantissa", + "v1-38": "idle-wait-random", + "gp-4": "idle-wait-frames", + "s5-1": "i", + "f30-3": "turn-wait-range", + "v1-55": "turn-wait-mantissa", + "v1-56": "turn-wait-random", + "gp-7": "turn-wait-frames", + "s5-2": "i" + } + }, + "(method 20 seagull)": { + "args": ["this", "climb?"], + "vars": { + "f0-0": "vertical-velocity" + } + }, + "(method 26 seagull)": { + "args": ["this"], + "vars": { + "s5-0": "teleport-offset", + "f30-0": "x-offset-base", + "f28-0": "x-offset-range", + "f30-1": "y-offset-base", + "f28-1": "y-offset-range", + "f30-2": "z-offset-base", + "f28-2": "z-offset-range" + } + }, + "(method 21 seagull)": { + "args": ["this", "speed"], + "vars": { + "f30-1": "x-velocity", + "f0-4": "z-velocity" + } + }, + "(method 23 seagull)": { + "args": ["this", "speed"], + "vars": { + "f30-1": "x-velocity", + "f0-4": "z-velocity" + } + }, + "(method 22 seagull)": { + "args": ["this"], + "vars": {} + }, + "(method 27 seagull)": { + "args": ["this"], + "vars": { + "v1-0": "displacement", + "a0-2": "current-pos", + "s5-0": "velocity", + "a1-1": "next-pos", + "a2-0": "displacement-out", + "f0-0": "dt" + } + }, + "(code seagull-landing)": { + "args": ["descent-speed"], + "vars": { + "s5-0": "ground-hit", + "gp-0": "landing-move", + "f30-0": "time-to-ground", + "v1-21": "approach-bird", + "f1-3": "approach-heading-error", + "f0-12": "approach-bank", + "f2-0": "approach-max-bank", + "v1-48": "touchdown-bird", + "f1-13": "touchdown-heading-error", + "f0-32": "touchdown-bank", + "f2-2": "touchdown-max-bank", + "v1-59": "settling-bird", + "f1-23": "settling-heading-error", + "f0-47": "settling-bank", + "f2-4": "settling-max-bank" + } + }, + "(code seagull-takeoff)": { + "args": [], + "vars": { + "v1-13": "climbing-bird", + "a0-7": "climb?", + "f0-5": "vertical-velocity", + "gp-1": "moving-bird", + "f28-0": "thrust", + "f30-2": "x-velocity", + "f0-10": "z-velocity" + } + }, + "(code seagull-flying)": { + "args": [], + "vars": { + "gp-0": "wingbeat-count", + "s5-0": "steering-bird", + "s4-0": "to-target", + "v1-24": "bird-bit", + "v1-34": "avoiding-bird", + "f1-2": "avoidance-heading-error", + "f0-12": "avoidance-bank", + "f2-0": "avoidance-max-bank", + "f0-20": "target-heading", + "v1-37": "targeting-bird", + "f1-12": "target-heading-error", + "f0-25": "target-bank", + "f2-2": "target-max-bank", + "f0-33": "horizontal-distance-squared", + "v1-42": "past-flap-start?", + "v1-44": "climbing-bird", + "a0-49": "climb?", + "f0-38": "climb-velocity", + "v1-48": "descending-bird", + "a0-55": "descend?", + "f0-39": "descent-velocity", + "s5-1": "moving-bird", + "f28-0": "thrust", + "f30-2": "x-velocity", + "f0-44": "z-velocity", + "f30-3": "soar-threshold", + "v1-77": "soar-mantissa", + "v1-78": "soar-random" + } + }, + "(code seagull-soaring)": { + "args": [], + "vars": { + "gp-0": "steering-bird", + "s5-0": "to-target", + "v1-26": "bird-bit", + "v1-36": "avoiding-bird", + "f1-2": "avoidance-heading-error", + "f0-12": "avoidance-bank", + "f2-0": "avoidance-max-bank", + "f0-20": "target-heading", + "v1-39": "targeting-bird", + "f1-12": "target-heading-error", + "f0-25": "target-bank", + "f2-2": "target-max-bank", + "f0-33": "horizontal-distance-squared", + "v1-44": "sinking-bird", + "gp-1": "moving-bird", + "f28-0": "thrust", + "f30-0": "x-velocity", + "f0-41": "z-velocity", + "f30-1": "resume-flapping-threshold", + "v1-67": "resume-flapping-mantissa", + "v1-68": "resume-flapping-random" + } + }, + "seagull-reaction": { + "args": ["shape", "intersection", "unused-a", "unused-b"], + "vars": { + "s5-0": "status-bits", + "a1-1": "accepted-move", + "f0-3": "normal-speed", + "v1-6": "normal-velocity", + "v1-7": "contact-normal", + "s4-1": "bird-process", + "v0-2": "result-status" + } + }, + "seagull-init-by-other": { + "args": ["position", "index", "flock"], + "vars": { + "s3-0": "root-shape", + "s2-0": "collision-sphere", + "f30-0": "thrust-base", + "f28-0": "thrust-range" + } + }, + "(method 15 seagullflock)": { + "args": ["this", "triggering-bird-index"], + "vars": { + "f0-2": "metres", + "v1-6": "target-index", + "v1-16": "perm-state", + "v1-19": "i" + } + }, + "(method 16 seagullflock)": { + "args": ["this", "bird"], + "vars": { + "gp-0": "to-target" + } + }, + "(code seagullflock-at-waterfall)": { + "args": [], + "vars": { + "a0-2": "linked-process", + "a1-0": "loading-message", + "t9-1": "send-loading", + "v1-5": "linked-entity", + "v1-13": "i", + "gp-0": "avalanche-rock", + "a1-6": "trigger-message", + "t9-4": "send-trigger", + "v1-18": "trigger-target" + } + }, + "(method 11 seagullflock)": { + "args": ["this", "source-entity"], + "vars": { + "v1-16": "i", + "s5-1": "i", + "s4-0": "spawn-pos", + "f30-0": "x-base", + "f28-0": "x-unit-scale", + "f26-0": "x-range", + "v1-22": "x-mantissa", + "v1-23": "x-random", + "f30-1": "z-base", + "f28-1": "z-unit-scale", + "f26-1": "z-range", + "v1-26": "z-mantissa", + "v1-27": "z-random" + } + }, + "(method 14 seagullflock)": { + "args": ["this", "position"], + "vars": { + "v0-0": "spawned-bird" + } + }, + "(anon-function 30 seagull)": { + "args": ["candidate"], + "vars": {} + }, + "(code beach-part-grotto-1)": { + "args": [], + "vars": { + "gp-0": "camera-position", + "f0-0": "distance-to-camera" + } + }, + "(code target-warp-in)": { + "args": [ + "gate-position", + "continue-position" + ], + "vars": { + "gp-1": "planar-velocity", + "f0-1": "gravity-axis-speed", + "f0-2": "planar-speed", + "f1-1": "normalization-speed", + "f2-3": "launch-speed" + } + }, + "(trans target-warp-in)": { + "args": [], + "vars": {} + }, + "(code idle warp-gate)": { + "args": [], + "vars": { + "v1-16": "gate-root", + "a1-2": "target-position", + "f0-1": "approach-heading", + "gp-0": "prompt-context" + } + }, + "(event idle warp-gate)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "get-next-slot-up": { + "args": [ + "gate", + "slot" + ], + "vars": { + "v0-0": "next-slot" + } + }, + "get-next-slot-down": { + "args": [ + "gate", + "slot" + ], + "vars": { + "v0-0": "next-slot" + } + }, + "print-level-name": { + "args": [ + "slot", + "context", + "distance", + "right?" + ], + "vars": { + "s5-0": "signed-offset", + "f30-0": "intensity" + } + }, + "(code active warp-gate)": { + "args": [], + "vars": { + "gp-0": "selected-slot", + "s5-0": "scrolling?", + "s2-0": "scroll-distance", + "s4-0": "scrolling-left?", + "s3-0": "pending-slot", + "s1-2": "destination", + "s1-3": "menu-context", + "s0-3": "next-slot", + "sv-112": "previous-slot", + "sv-144": "second-next-slot", + "sv-128": "second-previous-slot", + "a0-34": "blue-context", + "a0-47": "selected-context", + "a2-6": "outgoing-previous-distance", + "a2-7": "incoming-next-distance", + "a2-8": "second-previous-distance", + "a2-9": "incoming-previous-distance", + "a2-10": "second-next-distance", + "a2-11": "outgoing-next-distance" + } + }, + "(trans active warp-gate)": { + "args": [], + "vars": { + "gp-1": "target-control", + "s4-0": "gate-position", + "f0-0": "heading-error" + } + }, + "(enter active warp-gate)": { + "args": [], + "vars": {} + }, + "warp-gate-init-by-other": { + "args": [ + "position" + ], + "vars": { + "v1-11": "current-level" + } + }, + "(method 27 warp-gate-switch)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "collision", + "s4-0": "primitive-group", + "s3-0": "mesh-primitive" + } + }, + "(method 32 warp-gate-switch)": { + "args": [ + "this" + ], + "vars": { + "v1-2": "task" + } + }, + "(method 26 warp-gate-switch)": { + "args": [ + "this" + ], + "vars": { + "v1-2": "task", + "s5-0": "down-channel", + "s5-1": "up-channel" + } + }, + "(method 31 warp-gate-switch)": { + "args": [ + "this", + "pressed?" + ], + "vars": { + "s4-0": "task", + "s4-1": "task-control", + "s3-1": "saved-task-count", + "a1-5": "event-block", + "t9-5": "send-event-fn", + "v1-14": "notify-actor" + } + }, + "(event basebutton-up-idle warp-gate-switch)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "(enter basebutton-up-idle warp-gate-switch)": { + "args": [], + "vars": { + "t9-0": "parent-enter" + } + }, + "(trans basebutton-up-idle warp-gate-switch)": { + "args": [], + "vars": { + "a1-0": "event-block", + "t9-0": "send-event-fn", + "v1-1": "notify-actor", + "t9-13": "parent-trans" + } + }, + "(event basebutton-down-idle warp-gate-switch)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "(enter basebutton-down-idle warp-gate-switch)": { + "args": [], + "vars": { + "t9-4": "parent-enter" + } + }, + "(exit basebutton-down-idle warp-gate-switch)": { + "args": [], + "vars": { + "a0-1": "warp-process", + "t9-1": "parent-exit" + } + }, + "(trans basebutton-down-idle warp-gate-switch)": { + "args": [], + "vars": { + "t9-3": "parent-trans" + } + }, + "(code basebutton-going-down warp-gate-switch)": { + "args": [], + "vars": { + "gp-2": "trigger-count", + "s5-2": "i", + "s4-0": "trigger-actor", + "a1-4": "event-block", + "t9-6": "send-event-fn", + "v1-3": "actor-for-send", + "t9-10": "parent-code" + } + }, + "(method 7 village-cam)": { + "args": [ + "this", + "offset" + ], + "vars": {} + }, + "(code idle village-cam)": { + "args": [], + "vars": { + "v1-18": "left-range?", + "v1-5": "should-play?", + "v1-10": "eligibility-index", + "v1-23": "recheck-index", + "v1-24": "still-needed?", + "a0-25": "settings", + "t9-14": "set-setting-method", + "a2-5": "setting-name", + "a3-1": "setting-owner", + "v1-79": "sequence-index", + "gp-0": "sequence-perm", + "v1-84": "visit-count", + "a0-66": "source-entity", + "a0-67": "source-task", + "a0-70": "source-perm" + } + }, + "(method 11 village-cam)": { + "args": [ + "this", + "source-entity" + ], + "vars": {} + }, + "(method 32 oracle)": { + "args": [ + "this", + "commit?" + ], + "vars": { + "a0-25": "right-eye", + "a0-29": "left-eye" + } + }, + "(method 11 oracle)": { + "args": [ + "this", + "source-entity" + ], + "vars": { + "s4-0": "eye-position", + "s5-1": "follow-cell" + } + }, + "(anon-function 1 oracle)": { + "args": [], + "vars": { + "v0-0": "starburst" + } + }, + "(anon-function 2 oracle)": { + "args": [], + "vars": { + "v0-0": "starburst" + } + }, + "(anon-function 3 oracle)": { + "args": [], + "vars": { + "gp-0": "cell-root", + "v1-1": "collision-root", + "a1-1": "particle-position" + } + }, + "battlecontroller-spawners-full?": { + "args": [], + "vars": { + "v1-0": "i" + } + }, + "battlecontroller-default-event-handler": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": { + "v1-4": "child" + } + }, + "battlecontroller-draw-debug": { + "args": [], + "vars": { + "gp-0": "i" + } + }, + "battlecontroller-camera-on": { + "args": [], + "vars": { + "v1-4": "camera-name" + } + }, + "battlecontroller-update-spawners": { + "args": [], + "vars": { + "gp-0": "i", + "s5-0": "spawner", + "s4-0": "creature", + "s3-0": "cue-point" + } + }, + "battlecontroller-spawn-creature": { + "args": [ + "spawn-position", + "cue-point" + ], + "vars": { + "f0-0": "selection", + "v1-0": "enemy-type-index", + "a0-1": "i", + "s5-0": "enemy-config", + "s2-0": "enemy-type", + "s1-0": "enemy", + "t9-2": "activate-method", + "gp-0": "enemy-pointer", + "v1-20": "drop-type", + "v1-25": "drop-type" + } + }, + "battlecontroller-spawn-creature-at-spawner": { + "args": [ + "spawner-index", + "path-point" + ], + "vars": { + "s5-0": "spawner", + "s3-0": "path", + "s4-0": "spawn-position", + "a1-3": "cue-point", + "v1-10": "enemy-handle" + } + }, + "battlecontroller-spawn-creature-random-spawner": { + "args": [], + "vars": { + "gp-0": "spawner-index", + "v1-2": "spawner", + "a0-9": "enabled-count", + "a1-0": "i", + "a1-7": "event-block", + "t9-1": "send-event-fn", + "v1-3": "trigger-actor" + } + }, + "battlecontroller-fill-all-spawners": { + "args": [], + "vars": { + "gp-0": "spawner-i", + "gp-1": "spawn-position", + "s5-0": "path-i", + "s4-0": "enemy-handle" + } + }, + "battlecontroller-battle-begin": { + "args": [], + "vars": { + "gp-0": "kill-actor-count", + "s5-0": "kill-i", + "v1-2": "kill-actor", + "gp-1": "trigger-actor-count", + "s5-1": "trigger-i", + "s4-0": "event-block", + "s3-0": "send-event-fn", + "v1-7": "trigger-actor" + } + }, + "battlecontroller-off": { + "args": [], + "vars": { + "gp-0": "kill-actor-count", + "s5-0": "i", + "v1-2": "kill-actor" + } + }, + "battlecontroller-set-special-contents-collected": { + "args": [], + "vars": { + "v1-2": "perm" + } + }, + "battlecontroller-set-task-completed": { + "args": [], + "vars": { + "v1-2": "perm" + } + }, + "(code battlecontroller-active battlecontroller)": { + "args": [], + "vars": { + "gp-0": "live-count", + "v1-8": "child" + } + }, + "(code battlecontroller-die battlecontroller)": { + "args": [], + "vars": { + "gp-1": "fade-i", + "s5-1": "fade-event", + "s4-0": "send-fade-event", + "v1-2": "fade-actor", + "gp-2": "alt-i", + "s5-2": "alt-event", + "s4-1": "send-alt-event", + "v1-8": "alt-actor" + } + }, + "(method 7 battlecontroller)": { + "args": [ + "this", + "offset" + ], + "vars": { + "v1-0": "i", + "a0-3": "spawner" + } + }, + "(method 10 battlecontroller)": { + "args": [ + "this" + ], + "vars": { + "gp-0": "saved-pp" + } + }, + "(method 27 battlecontroller)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "valid-spawner-count", + "s4-0": "path-name-list", + "s2-0": "path-name", + "v1-7": "path-resource", + "s3-0": "spawner", + "s5-1": "trigger-actor-count", + "s4-1": "trigger-idx", + "s5-2": "blocker-actor-count", + "s4-2": "blocker-idx", + "v1-46": "spawn-limits", + "s5-3": "valid-type-count", + "sv-16": "lurker-type-tag", + "v1-49": "enemy-type-data", + "a0-22": "type-i", + "a1-15": "enemy-type-value", + "v1-52": "percent-data", + "f0-6": "percent-sum", + "a0-26": "percent-i", + "f0-9": "percent-scale", + "v1-57": "normalize-i", + "s5-4": "pickup-type-data", + "s4-3": "max-pickup-count-data", + "v1-63": "pickup-percent-data", + "a0-34": "pickup-i", + "a1-34": "enemy-config" + } + }, + "(method 11 battlecontroller)": { + "args": [ + "this", + "source-entity" + ], + "vars": {} + }, + "check-drop-level-firehose-pops": { + "args": [ + "particle-system", + "particle", + "position" + ], + "vars": { + "gp-0": "impact-position" + } + }, + "birth-func-random-rot": { + "args": [ + "particle-system", + "particle", + "launch-info" + ], + "vars": { + "v1-5": "negative-orientation-x", + "v1-6": "positive-orientation-x", + "s3-0": "yaw-rotation", + "f30-0": "yaw", + "s2-0": "radial-offset", + "s5-0": "orientation", + "v1-3": "orientation-out", + "a0-6": "launch-data", + "f0-13": "qx", + "f1-4": "qy", + "f2-0": "qz" + } + }, + "(code idle citb-arm-section)": { + "args": [], + "vars": { + "gp-0": "cull-direction", + "s5-0": "from-camera" + } + }, + "(method 21 citb-arm-section)": { + "args": [ + "this" + ], + "vars": { + "v1-6": "period-magnitude" + } + }, + "(method 11 citb-arm-section)": { + "args": [ + "this", + "source-entity" + ], + "vars": {} + }, + "(method 20 citb-arm)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(event citb-disc-idle)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "(method 20 citb-disc)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 11 citb-disc)": { + "args": [ + "this", + "source-entity" + ], + "vars": { + "v1-8": "period-magnitude" + } + }, + "(method 24 citb-iris-door)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "collision-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 27 citb-button)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 26 citb-button)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "anim-channel", + "s5-1": "anim-channel" + } + }, + "(post plat-path-active citb-launcher)": { + "args": [], + "vars": { + "t9-0": "parent-post" + } + }, + "(method 26 citb-launcher)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "spring-height", + "s5-0": "spring-mode" + } + }, + "(event citb-robotboss-idle)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": { + "v0-3": [ + "shield-enabled?", + "symbol" + ] + } + }, + "(code citb-robotboss-idle)": { + "args": [], + "vars": { + "gp-0": "nose-part", + "gp-1": "head-part", + "gp-2": "gun-part", + "gp-3": "left-shoulder-part", + "gp-4": "right-shoulder-part", + "gp-5": "left-arm-part", + "gp-6": "right-arm-part", + "gp-7": "belly-part" + } + }, + "(method 11 citb-robotboss)": { + "args": [ + "this", + "source-entity" + ], + "vars": { + "s4-0": "collision-shape", + "s3-0": "mesh-primitive" + } + }, + "(event citb-coil-idle)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "(method 11 citb-coil)": { + "args": [ + "this", + "source-entity" + ], + "vars": { + "v1-9": "persistence-actor" + } + }, + "citb-hose-event-handler": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "(method 11 citb-hose)": { + "args": [ + "this", + "source-entity" + ], + "vars": { + "v1-3": "persistence-actor" + } + }, + "citb-generator-trigger-others": { + "args": [], + "vars": { + "gp-0": "alt-actor-count", + "s5-0": "alt-i", + "s4-0": "alt-actor", + "a1-2": "alt-event", + "t9-2": "send-alt-event", + "v1-1": "alt-actor-for-send", + "gp-1": "delay-start", + "gp-2": "trigger-actor-count", + "s5-1": "trigger-i", + "s4-1": "trigger-actor", + "a1-6": "trigger-event", + "t9-8": "send-trigger-event", + "v1-19": "trigger-actor-for-send" + } + }, + "(event citb-generator-idle)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "(code citb-generator-break)": { + "args": [], + "vars": { + "gp-0": "open-actor-count", + "s5-0": "open-i", + "s4-0": "open-actor", + "a1-2": "open-event", + "t9-2": "send-open-event", + "v1-1": "open-actor-for-send" + } + }, + "(method 20 citb-generator)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "collision-shape", + "s4-0": "sphere-primitive" + } + }, + "(method 21 citb-generator)": { + "args": [ + "this" + ], + "vars": { + "f30-0": "mushroom-angle" + } + }, + "(method 11 citb-generator)": { + "args": [ + "this", + "source-entity" + ], + "vars": { + "v1-4": "persistence-actor" + } + }, + "(event citadelcam-idle)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "(code citadelcam-stair-plats)": { + "args": [], + "vars": { + "gp-0": "trigger-actor-count", + "s5-0": "stair-i", + "s4-0": "trigger-actor", + "a1-2": "trigger-event", + "t9-2": "send-trigger-event", + "v1-1": "trigger-actor-for-send", + "gp-2": "camera-handle" + } + }, + "(method 11 citadelcam)": { + "args": [ + "this", + "source-entity" + ], + "vars": {} + }, + "(code battlecontroller-play-intro-camera citb-battlecontroller)": { + "args": [], + "vars": { + "gp-1": "camera-handle" + } + }, + "(method 21 citb-base-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 22 citb-base-plat)": { + "args": [ + "this" + ], + "vars": {} + }, + "(method 24 citb-base-plat)": { + "args": [ + "this" + ], + "vars": {} + }, + "(method 11 citb-base-plat)": { + "args": [ + "this", + "source-entity" + ], + "vars": {} + }, + "(method 24 citb-plat-eco)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 26 citb-plat-eco)": { + "args": [ + "this" + ], + "vars": {} + }, + "(method 24 citb-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 26 citb-plat)": { + "args": [ + "this" + ], + "vars": { + "f0-0": "uniform-scale" + } + }, + "(event citb-base-plat-idle citb-stair-plat)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": { + "v0-0": "should-rise?" + } + }, + "(code citb-base-plat-idle citb-stair-plat)": { + "args": [], + "vars": { + "f30-0": "remaining-rise", + "f0-12": "fade" + } + }, + "(method 22 citb-stair-plat)": { + "args": [ + "this" + ], + "vars": { + "f0-7": "uniform-scale" + } + }, + "(method 24 citb-stair-plat)": { + "args": [ + "this" + ], + "vars": {} + }, + "(method 22 citb-chain-plat)": { + "args": [ + "this", + "position", + "simulation-time" + ], + "vars": {} + }, + "(method 27 citb-chain-plat)": { + "args": [ + "this", + "anchor-position" + ], + "vars": { + "gp-0": "offset", + "f0-1": "distance", + "f1-1": "force-magnitude" + } + }, + "(method 23 citb-chain-plat)": { + "args": [ + "this", + "simulation-time" + ], + "vars": {} + }, + "(code citb-chain-plat-settle)": { + "args": [], + "vars": { + "gp-0": "start-position", + "s5-0": "start-rotation", + "f30-0": "blend" + } + }, + "(method 30 citb-chain-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 31 citb-chain-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "point-count", + "s4-0": "i", + "s3-0": "control-point", + "f30-0": "angle" + } + }, + "(method 21 citb-rotatebox)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 22 citb-rotatebox)": { + "args": [ + "this" + ], + "vars": {} + }, + "(method 21 citb-donut)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 22 citb-donut)": { + "args": [ + "this" + ], + "vars": {} + }, + "(method 24 citb-stopbox)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "mesh-primitive" + } + }, + "(method 26 citb-stopbox)": { + "args": [ + "this" + ], + "vars": {} + }, + "(trans citb-firehose-active)": { + "args": [], + "vars": { + "f0-2": "phase", + "f1-1": "previous-phase" + } + }, + "citb-firehose-blast-particles": { + "args": [], + "vars": { + "gp-0": "orientation", + "s5-0": "i" + } + }, + "(event citb-firehose-blast)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": {} + }, + "(code citb-firehose-blast)": { + "args": [], + "vars": { + "gp-1": "i" + } + }, + "(method 11 citb-firehose)": { + "args": [ + "this", + "source-entity" + ], + "vars": { + "s4-0": "collision-shape", + "s3-0": "attack-group", + "s2-0": "near-sphere", + "s2-1": "middle-sphere", + "s2-2": "far-sphere" + } + }, + "(event citb-exit-plat-idle)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": { + "v1-3": "permanent-state" + } + }, + "(code citb-exit-plat-rise)": { + "args": [], + "vars": { + "f30-0": "remaining-rise" + } + }, + "citb-exit-plat-move-player": { + "args": [ + "previous-position" + ], + "vars": { + "gp-0": "platform-displacement", + "s5-0": "player-offset", + "f30-0": "player-distance" + } + }, + "(trans plat-button-move-downward citb-exit-plat)": { + "args": [], + "vars": { + "gp-0": "previous-position", + "t9-1": "parent-transition" + } + }, + "(trans plat-button-move-upward citb-exit-plat)": { + "args": [], + "vars": { + "gp-0": "previous-position", + "t9-1": "parent-transition" + } + }, + "(method 31 citb-exit-plat)": { + "args": [ + "this" + ], + "vars": {} + }, + "(method 32 citb-exit-plat)": { + "args": [ + "this" + ], + "vars": {} + }, + "(method 28 citb-exit-plat)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "primitive-group", + "s3-0": "button-mesh", + "s3-1": "platform-mesh" + } + }, + "(method 29 citb-exit-plat)": { + "args": [ + "this" + ], + "vars": { + "a0-5": "state-actor", + "v1-8": "permanent-state", + "s5-0": "platform-position" + } + }, + "citb-sagecage-draw-bars": { + "args": [], + "vars": { + "gp-0": "joint-transform", + "s5-0": "bar-world", + "s4-0": "orientation", + "s3-0": "to-camera", + "v1-7": "joint-forward", + "f0-7": "face-angle", + "s4-1": "bar-particle", + "s3-1": "particle-system", + "s2-2": "i" + } + }, + "(event citb-sagecage-idle)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": { + "v0-3": "event-result", + "v1-7": "root-channel" + } + }, + "(code citb-sagecage-idle)": { + "args": [], + "vars": { + "gp-0": "parent-sage" + } + }, + "(method 20 citb-sagecage)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "cage-mesh" + } + }, + "(method 21 citb-sagecage)": { + "args": [ + "this" + ], + "vars": { + "f0-1": "bar-y", + "f4-0": "far-pos", + "f1-0": "far-neg", + "f2-0": "near-pos", + "f3-0": "near-neg" + } + }, + "citb-sagecage-init-by-other": { + "args": [ + "parent-sage" + ], + "vars": {} + }, + "(method 44 citb-sage)": { + "args": [ + "this" + ], + "vars": { + "v1-9": "linked-actor", + "s5-1": "target-anchor", + "s4-0": "outward" + } + }, + "(method 32 citb-sage)": { + "args": [ + "this", + "commit?" + ], + "vars": {} + }, + "(method 52 red-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-control", + "a0-1": "bottom-shadow", + "a0-3": "top-shadow" + } + }, + "(method 48 red-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-9": "shadow-control", + "v1-14": "shadow-control" + } + }, + "(method 43 red-sagecage)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "random-choice" + } + }, + "(method 11 red-sagecage)": { + "args": [ + "this", + "entity" + ], + "vars": {} + }, + "(method 52 blue-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-control", + "a0-1": "bottom-shadow", + "a0-3": "top-shadow" + } + }, + "(method 48 blue-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-9": "shadow-control", + "v1-14": "shadow-control" + } + }, + "(method 43 blue-sagecage)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "random-choice" + } + }, + "(method 11 blue-sagecage)": { + "args": [ + "this", + "entity" + ], + "vars": {} + }, + "(method 52 yellow-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-1": "shadow-control", + "a0-1": "bottom-shadow", + "a0-3": "top-shadow" + } + }, + "(method 48 yellow-sagecage)": { + "args": [ + "this" + ], + "vars": { + "v1-9": "shadow-control", + "v1-14": "shadow-control" + } + }, + "(method 43 yellow-sagecage)": { + "args": [ + "this" + ], + "vars": { + "f0-2": "random-choice" + } + }, + "(method 11 yellow-sagecage)": { + "args": [ + "this", + "entity" + ], + "vars": {} + }, + "(method 32 green-sagecage)": { + "args": [ + "this", + "commit?" + ], + "vars": { + "v1-1": "task-stage", + "v1-7": "movie-index" + } + }, + "(event play-anim green-sagecage)": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": { + "gp-0": "robot-entity", + "s5-1": "robot" + } + }, + "(exit play-anim green-sagecage)": { + "args": [], + "vars": { + "a0-1": "evilbro", + "a0-5": "evilsis", + "a0-9": "robotboss", + "a0-13": "exit-platform", + "a1-4": "shield-event", + "t9-5": "send-shield-event", + "v1-28": "alternate-actor" + } + }, + "(trans play-anim green-sagecage)": { + "args": [], + "vars": { + "a1-1": "shield-event", + "t9-4": "send-shield-event", + "v1-8": "alternate-actor" + } + }, + "(method 11 green-sagecage)": { + "args": [ + "this", + "entity" + ], + "vars": {} + }, + "snow-bunny-default-event-handler": { + "args": [ + "sender", + "argc", + "message", + "block" + ], + "vars": { + "v1-16": "jump-destination", + "v0-1": "stored-destination" + } + }, + "(method 76 snow-bunny)": { + "args": [ + "this", + "airborne?" + ], + "vars": { + "f0-0": "bottom-plane-y", + "v1-3": "shadow-control" + } + }, + "(method 47 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "moving-shape", + "s4-0": "body-group", + "s3-0": "lower-touch-sphere", + "s3-1": "upper-touch-sphere", + "s3-2": "attack-sphere" + } + }, + "(method 11 snow-bunny)": { + "args": [ + "this", + "entity" + ], + "vars": {} + }, + "snow-bunny-initialize-jump": { + "args": [ + "destination" + ], + "vars": {} + }, + "(method 56 snow-bunny)": { + "args": [ + "this", + "mode" + ], + "vars": { + "v1-0": "selected-mode" + } + }, + "(method 57 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "f0-0": "xz-distance", + "f0-1": "approach-distance", + "f0-2": "adjusted-distance", + "v1-13": "frames-to-reach" + } + }, + "(enter nav-enemy-idle snow-bunny)": { + "args": [], + "vars": { + "t9-1": "parent-enter" + } + }, + "(code nav-enemy-idle snow-bunny)": { + "args": [], + "vars": { + "f30-0": "animation-speed" + } + }, + "(code snow-bunny-nav-resume)": { + "args": [], + "vars": { + "f0-0": "target-distance" + } + }, + "(code snow-bunny-patrol-idle)": { + "args": [], + "vars": { + "gp-0": "initial-wait-count", + "gp-2": "wait-count" + } + }, + "(method 51 snow-bunny)": { + "args": [ + "this", + "in-point", + "out-point" + ], + "vars": { + "s5-0": "probe-position", + "s4-0": "triangle", + "f0-0": "ground-popup", + "f30-0": "probe-distance", + "f0-2": "hit-fraction" + } + }, + "(method 53 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s4-0": "vertex-count", + "s2-0": "vertex-index", + "s5-0": "candidate", + "s3-0": "i", + "f30-0": "candidate-distance" + } + }, + "(method 54 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s5-1": "to-destination", + "f30-0": "distance-to-destination", + "f1-0": "halfway-distance", + "f0-1": "hop-scale", + "f28-0": "hop-distance", + "s4-0": "hop-position", + "s5-2": "travel", + "a2-2": "hop-target" + } + }, + "(code nav-enemy-notice snow-bunny)": { + "args": [], + "vars": { + "f30-0": "animation-speed", + "gp-2": "to-target" + } + }, + "(method 52 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s4-0": "destination", + "s5-2": "to-destination", + "f28-0": "distance-to-destination", + "f30-0": "hop-distance", + "s3-0": "hop-position", + "s5-3": "travel", + "a2-3": "hop-target" + } + }, + "(method 55 snow-bunny)": { + "args": [ + "this" + ], + "vars": { + "s5-0": "work", + "s4-0": "nav-control", + "s4-1": "target-position", + "s3-0": "player-yaw", + "a0-9": "away-yaw", + "s3-1": "relative-yaw", + "s2-0": "attempt", + "f30-0": "yaw-bias", + "f0-7": "yaw-offset", + "s1-0": "offset", + "f30-1": "opposite-yaw", + "f0-10": "yaw", + "s1-1": "opposite-offset", + "s1-3": "to-destination", + "f0-12": "distance-to-destination", + "f1-4": "distance-scale", + "s1-4": "gap", + "s0-0": "travel", + "f30-2": "travel-distance", + "s1-5": "hop-target" + } + }, + "(enter snow-bunny-retreat-hop)": { + "args": [], + "vars": { + "v1-8": "target-close?" + } + }, + "(trans snow-bunny-lunge)": { + "args": [], + "vars": { + "f0-0": "target-distance" + } + }, + "(trans snow-bunny-attack)": { + "args": [], + "vars": { + "gp-0": "to-target" + } + }, + "(method 48 citb-bunny)": { + "args": [ + "this", + "setup-context" + ], + "vars": {} + }, + "(method 56 citb-bunny)": { + "args": [ + "this", + "mode" + ], + "vars": { + "v1-0": "selected-mode" + } + }, + "(event drop-plat-idle)": { + "args": ["sender", "argc", "message", "block"] + }, + "drop-plat-set-fade": { + "args": [], + "vars": { + "f0-1": "fade" + } + }, + "(event drop-plat-spawn)": { + "args": ["sender", "argc", "message", "block"] + }, + "(code drop-plat-spawn)": { + "args": [], + "vars": { + "v1-14": "visible-status", + "a0-5": "draw-control" + } + }, + "(event drop-plat-rise)": { + "args": ["sender", "argc", "message", "block"] + }, + "(code drop-plat-rise)": { + "args": ["draw-control"], + "vars": { + "gp-0": "sound-position", + "s5-0": "played-sound?" + } + }, + "(post drop-plat-rise)": { + "args": [], + "vars": { + "gp-0": "spin-rotation" + } + }, + "(code drop-plat-drop)": { + "args": [], + "vars": { + "gp-1": "wobble-duration" + } + }, + "(post drop-plat-drop)": { + "args": [], + "vars": { + "gp-0": "spin-rotation" + } + }, + "(method 20 drop-plat)": { + "args": ["this"], + "vars": { + "s5-0": "moving-shape", + "s4-0": "platform-mesh" + } + }, + "(method 21 drop-plat)": { + "args": ["this"], + "vars": { + "s3-0": "angles", + "s5-0": "sin-values", + "s4-0": "cos-values" + } + }, + "drop-plat-init-by-other": { + "args": ["position", "delay", "duration", "color"] + }, + "citb-drop-plat-spawn-children": { + "args": [], + "vars": { + "s0-0": "color", + "gp-0": "position", + "s5-0": "row", + "s4-0": "row-step", + "s3-2": "z-i", + "s2-0": "x-i", + "s1-0": "child-index", + "sv-64": "spawn-delay", + "sv-48": "child" + } + }, + "citb-drop-plat-drop-all-children": { + "args": [], + "vars": { + "gp-0": "i" + } + }, + "citb-drop-plat-drop-children": { + "args": ["color"], + "vars": { + "s5-0": "i", + "a0-3": "child" + } + }, + "(event citb-drop-plat-idle)": { + "args": ["sender", "argc", "message", "block"] + }, + "(event citb-drop-plat-active)": { + "args": ["sender", "argc", "message", "block"] + }, + "(method 11 citb-drop-plat)": { + "args": ["this", "entity"], + "vars": { + "v1-2": "count-data", + "v1-9": "i", + "f0-7": "rotation-offset", + "f0-10": "x-offset", + "f30-0": "z-offset" + } + }, + "(method 32 assistant-lavatube-end)": { + "args": ["this", "commit?"] + }, + "(method 39 assistant-lavatube-end)": { + "args": ["this"], + "vars": { + "v1-3": "status" + } + }, + "(method 11 assistant-lavatube-end)": { + "args": ["this", "entity"] + }, + "(method 20 cavecrystal)": { + "args": ["this"], + "vars": { + "v1-2": "now" + } + }, + "(method 21 cavecrystal)": { + "args": ["this"], + "vars": { + "gp-1": "elapsed", + "f0-2": "wave-phase", + "f30-1": "pulse", + "v1-11": "ramp", + "a2-0": "settle", + "v1-20": "fade" + } + }, + "(event cavecrystal-idle)": { + "args": ["sender", "argc", "message", "block"] + }, + "(event cavecrystal-active)": { + "args": ["sender", "argc", "message", "block"], + "vars": { + "v1-1": "attack-id" + } + }, + "(trans cavecrystal-active)": { + "args": [], + "vars": { + "f30-0": "glow", + "gp-0": "color-delta", + "f28-0": "max-component", + "s5-0": "color-mult", + "s5-1": "color-emissive" + } + }, + "(method 11 cavecrystal)": { + "args": ["this", "entity"], + "vars": { + "s4-0": "collision-shape", + "s3-0": "collision-mesh", + "s5-1": "root-channel" + } + }, + "(code target-demo)": { + "args": [], + "vars": { + "gp-0": "screen-handle", + "gp-1": "screen-handle", + "gp-2": "screen-handle", + "gp-3": "screen-handle", + "gp-4": "screen-handle", + "gp-5": "screen-handle", + "gp-6": "screen-handle", + "gp-7": "screen-handle", + "gp-8": "screen-handle", + "gp-9": "screen-handle", + "gp-10": "screen-handle", + "gp-11": "screen-handle", + "gp-12": "screen-handle", + "gp-13": "screen-handle", + "gp-14": "screen-handle", + "gp-15": "screen-handle", + "gp-16": "screen-handle" + } + }, + "(method 7 static-screen)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "context", + "v1-2": "i" + } + }, + "(method 10 static-screen)": { + "args": ["this"], + "vars": { + "s5-0": "i" + } + }, + "(enter idle static-screen)": { + "args": ["page-index", "duration", "dismissible?"] + }, + "(code idle static-screen)": { + "args": ["page-index", "duration", "dismissible?"], + "vars": { + "v1-6": "done?" + } + }, + "static-screen-init-by-other": { + "args": ["page-index", "top-texture", "middle-texture", "bottom-texture", "duration", "dismissible?"], + "vars": { + "s3-0": "screen-group" + } + }, + "static-screen-spawn": { + "args": ["page-index", "top-texture", "middle-texture", "bottom-texture", "duration", "dismissible?", "owner"], + "vars": { + "sv-16": "screen" + } + }, + "(method 7 robotboss)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "particle-i", + "v1-3": "sound-i" + } + }, + "(method 10 robotboss)": { + "args": ["this"], + "vars": { + "s5-0": "particle-i", + "a0-1": "particle", + "s5-1": "sound-i", + "a0-2": "sound" + } + }, + "check-drop-level-eichar-lighteco-pops": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "check-drop-level-bigdoor-open-pops": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "check-drop-level-lighteco-big-pops": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "check-drop-level-lighteco-pops": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "light-eco-child-default-event-handler": { + "args": ["sender", "event-id", "event", "message"] + }, + "(method 20 light-eco-child)": { + "args": ["this"], + "vars": { + "v1-1": "frame", + "s5-0": "spin-axis", + "s4-0": "rotation", + "f30-0": "angle" + } + }, + "light-eco-child-init-by-other": { + "args": ["source-entity", "start", "destination", "angle-bit"], + "vars": { + "s4-2": "collision", + "s3-0": "sphere", + "s4-3": "velocity" + } + }, + "(method 21 light-eco-mother)": { + "args": ["this"], + "vars": { + "v1-1": "frame", + "s5-0": "spin-axis" + } + }, + "(method 20 light-eco-mother)": { + "args": ["this"], + "vars": { + "s3-0": "attempts", + "gp-0": "angle-index", + "f28-0": "angle", + "f30-0": "radius", + "s4-0": "spawn-position" + } + }, + "light-eco-mother-init-by-other": { + "args": ["source-entity", "position"], + "vars": { + "f0-4": "reserved-angle", + "v1-33": "i", + "a2-4": "angle-index" + } + }, + "(method 9 torus)": { + "args": ["this", "color"], + "vars": { + "s0-0": "spoke", + "s4-0": "line-start", + "s3-0": "line-end", + "s2-0": "rotation", + "s1-0": "ring-verts", + "sv-256": "i", + "sv-272": "segment-i", + "sv-288": "vertex-i", + "s0-1": "ring-i", + "v1-21": "i" + } + }, + "(method 10 torus)": { + "args": ["this", "prim-core", "out-delta"], + "vars": { + "gp-0": "to-sphere", + "s5-0": "ring-point", + "f30-0": "hit-radius" + } + }, + "(method 11 torus)": { + "args": ["this", "out-delta"], + "vars": { + "s4-0": "target-prims", + "s3-0": "prim-i", + "v1-9": "prim" + } + }, + "(method 12 torus)": { + "args": ["this", "out-point"], + "vars": { + "f30-0": "full-turn", + "f30-1": "tube-angle", + "s2-0": "rotation", + "f30-2": "full-turn-2" + } + }, + "redshot-particle-callback": { + "args": ["tracker"], + "vars": { + "v1-0": ["shot", "object"] + } + }, + "ecoclaw-beam-particle-callback": { + "args": ["tracker"], + "vars": { + "a0-1": "beam-projectile", + "v1-1": "beam-start", + "a0-3": "beam-end", + "gp-1": "beam-vector", + "f30-0": "y-angle", + "f0-1": "x-angle" + } + }, + "(method 11 ecoclaw)": { + "args": ["this", "source-entity"], + "vars": { + "v1-3": "i" + } + }, + "(method 11 silodoor)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "prim-group", + "s2-0": "mesh-0", + "s2-1": "mesh-1", + "s2-2": "mesh-2", + "s2-3": "mesh-3" + } + }, + "(method 39 finalbosscam)": { + "args": ["this"] + }, + "(method 31 finalbosscam)": { + "args": ["this"] + }, + "(method 32 finalbosscam)": { + "args": ["this", "spawn-clone?"], + "vars": { + "v1-43": "robotboss-clone" + } + }, + "finalbosscam-init-by-other": { + "args": ["source-entity"] + }, + "(method 43 green-eco-lurker)": { + "args": ["this", "attacker", "event"] + }, + "(method 73 green-eco-lurker)": { + "args": ["this", "attacker", "event"] + }, + "(method 44 green-eco-lurker)": { + "args": ["this", "other", "event"] + }, + "(method 72 green-eco-lurker)": { + "args": ["this", "other", "event"] + }, + "(method 51 green-eco-lurker)": { + "args": ["this", "candidate-point"], + "vars": { + "v1-3": "test-sphere" + } + }, + "(method 52 green-eco-lurker)": { + "args": ["this", "out-point"], + "vars": { + "s4-0": "num-verts", + "s2-0": "vertex-i", + "s3-0": "remaining" + } + }, + "(method 53 green-eco-lurker)": { + "args": ["this"], + "vars": { + "f0-0": "dest-y", + "v1-7": "shadow-control" + } + }, + "(method 47 green-eco-lurker)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "prim-group", + "s3-0": "touch-sphere-0", + "s3-1": "touch-sphere-1", + "s3-2": "touch-sphere-2", + "s3-3": "attack-sphere-0", + "s3-4": "attack-sphere-1", + "s3-5": "attack-sphere-2", + "s3-6": "attack-sphere-3" + } + }, + "(method 48 green-eco-lurker)": { + "args": ["this"] + }, + "green-eco-lurker-init-by-other": { + "args": ["unused-entity", "controller", "position"] + }, + "green-eco-lurker-gen-init-by-other": { + "args": ["source-entity", "position", "num-to-spawn"] + }, + "robotboss-cut-cam": { + "args": ["start-frame", "end-frame", "animation"] + }, + "robotboss-always-trans": { + "args": ["debug-state"] + }, + "robotboss-shooting-trans": { + "args": ["joint-index"] + }, + "robotboss-setup-for-hits": { + "args": ["vulnerable-prim-index", "hit-count"] + }, + "robotboss-anim-blend-loop": { + "args": ["animation"] + }, + "robotboss-darkecobomb": { + "args": ["destination-offset", "flight-time"] + }, + "robotboss-bomb-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "robotboss-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "robotboss-redshot-fill-array": { + "args": ["launches"] + }, + "robotboss-redshot": { + "args": ["launch", "play-effects?"] + }, + "robotboss-greenshot": { + "args": ["destination-offset", "arc-height", "flight-time", "play-effects?"] + }, + "robotboss-blue-beam": { + "args": ["joint-index", "apply-damage?"] + }, + "(method 11 robotboss)": { + "args": ["this", "source-entity"] + }, + "(method 11 final-door)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "door-mesh" + } + }, + "(method 21 power-left)": { + "args": ["this"] + }, + "(method 21 power-right)": { + "args": ["this"] + }, + "powercellalt-init-by-other": { + "args": ["source-entity", "start-position", "jump-position", "joint-index"], + "vars": { + "s3-0": "collision", + "s2-0": "pickup-sphere" + } + }, + "(method 26 plat-eco-finalboss)": { + "args": ["this"] + }, + "(method 45 sage-finalboss)": { + "args": ["this"], + "vars": { + "s5-0": "assistant-entity", + "s5-1": "assistant-process" + } + }, + "(method 32 sage-finalboss)": { + "args": ["this", "commit?"] + }, + "(method 11 sage-finalboss)": { + "args": ["this", "source-entity"] + }, + "(method 32 evilbro)": { + "args": ["this", "commit?"] + }, + "(method 11 evilbro)": { + "args": ["this", "source-entity"] + }, + "(method 32 evilsis)": { + "args": ["this", "commit?"] + }, + "(method 11 evilsis)": { + "args": ["this", "source-entity"] + }, + "(method 11 eggtop)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "platform-mesh" + } + }, + "(method 24 jng-iris-door)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "door-mesh" + } + }, + "(method 25 jng-iris-door)": { + "args": ["this"] + }, + "(method 11 plat-flip)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "platform-mesh" + } + }, + "(method 43 aphid)": { + "args": ["this", "attacker", "event"] + }, + "(method 47 aphid)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "body-sphere" + } + }, + "(method 48 aphid)": { + "args": ["this"] + }, + "aphid-init-by-other": { + "args": ["parent-enemy", "spawn-position", "target-position"], + "vars": { + "s3-1": "facing" + } + }, + "(method 7 plant-boss)": { + "args": ["this", "offset"], + "vars": { + "v1-8": "i" + } + }, + "(method 11 plant-boss)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "body-group", + "s2-0": "lower-body-sphere", + "s2-1": "upper-body-sphere", + "s2-2": "bite-sphere", + "s2-3": "bite-death-mesh", + "s2-4": "body-death-mesh" + } + }, + "plant-boss-generic-event-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "plant-boss-default-event-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "plant-boss-arm-init": { + "args": ["position", "yaw", "side"] + }, + "plant-boss-back-arms-init": { + "args": ["position", "yaw", "side"] + }, + "plant-boss-vine-init": { + "args": ["position", "rotation", "scale", "side"] + }, + "plant-boss-root-init": { + "args": ["position", "rotation", "scale", "side"] + }, + "plant-boss-leaf-init": { + "args": ["position", "yaw", "side"] + }, + "(method 26 jungle-elevator)": { + "args": ["this"] + }, + "(method 29 jungle-elevator)": { + "args": ["this"], + "vars": { + "s5-0": "path-point" + } + }, + "(method 30 jungle-elevator)": { + "args": ["this"], + "vars": { + "f0-0": "camera-y" + } + }, + "(method 11 springbox)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "platform-mesh" + } + }, + "(method 39 hopper)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-control" + } + }, + "hopper-find-ground": { + "args": ["point"], + "vars": { + "s5-0": "probe-point", + "t1-0": "hit", + "f30-0": "probe-distance", + "f0-2": "hit-fraction" + } + }, + "hopper-jump-to": { + "args": ["destination"] + }, + "(method 47 hopper)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "body-group", + "s3-0": "lower-sphere", + "s3-1": "upper-sphere" + } + }, + "(method 48 hopper)": { + "args": ["this"] + }, + "junglesnake-default-event-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "(method 20 junglesnake)": { + "args": ["this"] + }, + "junglesnake-joint-callback": { + "args": ["snake"] + }, + "(method 21 junglesnake)": { + "args": ["this"], + "vars": { + "v1-0": "i", + "a1-2": "joint", + "v1-3": "head-tilt-joint", + "v1-4": "head-twist-joint", + "v0-0": "flag" + } + }, + "(method 22 junglesnake)": { + "args": ["this", "base-ry"], + "vars": { + "f0-0": "previous-limit", + "v1-0": "i", + "a2-2": "joint", + "f1-1": "limit" + } + }, + "(method 23 junglesnake)": { + "args": ["this"], + "vars": { + "v1-5": "head-prim" + } + }, + "(method 24 junglesnake)": { + "args": ["this"], + "vars": { + "v1-4": "head-prim" + } + }, + "(method 11 junglesnake)": { + "args": ["this", "source-entity"] + }, + "darkvine-event-handler": { + "args": ["sender", "argc", "message", "event"], + "vars": { + "v1-10": "attack-id" + } + }, + "(method 12 darkvine)": { + "args": ["this"] + }, + "(method 11 darkvine)": { + "args": ["this", "source-entity"] + }, + "(method 11 logtrap)": { + "args": ["this", "source-entity"] + }, + "(method 11 towertop)": { + "args": ["this", "source-entity"] + }, + "(method 11 lurkerm-tall-sail)": { + "args": ["this", "source-entity"] + }, + "(method 11 lurkerm-short-sail)": { + "args": ["this", "source-entity"] + }, + "(method 11 lurkerm-piston)": { + "args": ["this", "source-entity"] + }, + "(method 11 accordian)": { + "args": ["this", "source-entity"] + }, + "(method 11 precurbridge)": { + "args": ["this", "source-entity"] + }, + "(method 11 maindoor)": { + "args": ["this", "source-entity"] + }, + "(method 24 sidedoor)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "door-mesh" + } + }, + "(method 25 sidedoor)": { + "args": ["this"] + }, + "(method 7 jngpusher)": { + "args": ["this", "offset"] + }, + "(method 11 jngpusher)": { + "args": ["this", "source-entity"] + }, + "(method 22 jungle-water)": { + "args": ["this"], + "vars": { + "v1-2": "ripple" + } + }, + "(method 7 periscope)": { + "args": ["this", "offset"] + }, + "(method 10 periscope)": { + "args": ["this"] + }, + "(method 11 periscope)": { + "args": ["this", "source-entity"] + }, + "target-close-to-point?": { + "args": ["point", "radius"] + }, + "(method 11 reflector-origin)": { + "args": ["this", "source-entity"] + }, + "(method 11 reflector-mirror)": { + "args": ["this", "source-entity"] + }, + "draw-power-beam": { + "args": ["start", "end"] + }, + "(method 39 junglefish)": { + "args": ["this"] + }, + "(method 11 junglefish)": { + "args": ["this", "source-entity"] + }, + "(method 11 fisher)": { + "args": ["this", "source-entity"] + }, + "(method 11 launcherdoor)": { + "args": ["this", "source-entity"] + }, + "part-hud-racer-speed-func": { + "args": ["system", "particle", "transform"] + }, + "part-hud-racer-heat-func": { + "args": ["system", "particle", "transform"] + }, + "zoomer-heat-slice-color": { + "args": ["transform", "heat-fraction"] + }, + "part-hud-zoomer-heat-slice-01-func": { + "args": ["system", "particle", "transform"] + }, + "part-hud-zoomer-heat-slice-02-func": { + "args": ["system", "particle", "transform"] + }, + "part-hud-zoomer-heat-slice-03-func": { + "args": ["system", "particle", "transform"] + }, + "(method 19 hud-bike-heat)": { + "args": ["this"] + }, + "(method 20 hud-bike-heat)": { + "args": ["this", "init-value"] + }, + "(method 19 hud-bike-speed)": { + "args": ["this"] + }, + "(method 20 hud-bike-speed)": { + "args": ["this", "init-value"] + }, + "(method 7 racer)": { + "args": ["this", "offset"] + }, + "(method 11 racer)": { + "args": ["this", "source-entity"] + }, + "blocking-plane-init-by-other": { + "args": ["path", "segment-index"] + }, + "blocking-plane-spawn": { + "args": ["path"] + }, + "(method 7 flutflut)": { + "args": ["this", "offset"] + }, + "(method 11 flutflut)": { + "args": ["this", "source-entity"] + }, + "(method 32 farmer)": { + "args": ["this", "commit?"] + }, + "(method 41 farmer)": { + "args": ["this", "center-joint", "local-sphere"] + }, + "(method 43 farmer)": { + "args": ["this"], + "vars": { + "f0-2": "choice" + } + }, + "(method 11 farmer)": { + "args": ["this", "source-entity"] + }, + "(method 32 explorer)": { + "args": ["this", "commit?"] + }, + "(method 43 explorer)": { + "args": ["this"], + "vars": { + "f0-2": "choice" + } + }, + "(method 11 explorer)": { + "args": ["this", "source-entity"] + }, + "(method 32 assistant)": { + "args": ["this", "commit?"] + }, + "(method 43 assistant)": { + "args": ["this"], + "vars": { + "s5-0": "target-offset", + "f0-2": "choice" + } + }, + "check-drop-level-assistant": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "(method 11 assistant)": { + "args": ["this", "source-entity"] + }, + "(method 32 sage)": { + "args": ["this", "commit?"] + }, + "(method 43 sage)": { + "args": ["this"], + "vars": { + "s5-0": "target-offset", + "f0-2": "choice" + } + }, + "(method 41 sage)": { + "args": ["this", "center-joint", "local-sphere"] + }, + "(method 11 sage)": { + "args": ["this", "source-entity"] + }, + "(method 11 yakow)": { + "args": ["this", "source-entity"] + }, + "(method 11 windmill-sail)": { + "args": ["this", "source-entity"] + }, + "(method 11 sagesail)": { + "args": ["this", "source-entity"] + }, + "(method 11 windspinner)": { + "args": ["this", "source-entity"] + }, + "(method 11 mayorgears)": { + "args": ["this", "source-entity"] + }, + "(method 11 reflector-middle)": { + "args": ["this", "source-entity"] + }, + "(method 11 reflector-end)": { + "args": ["this", "source-entity"] + }, + "(method 11 villa-starfish)": { + "args": ["this", "source-entity"] + }, + "(method 11 village-fish)": { + "args": ["this", "source-entity"] + }, + "set-period": { + "args": ["cycle", "period"] + }, + "update-clock": { + "args": ["cycle"] + }, + "(method 7 hutlamp)": { + "args": ["this", "offset"] + }, + "(method 11 hutlamp)": { + "args": ["this", "source-entity"] + }, + "(method 11 revcycleprop)": { + "args": ["this", "source-entity"] + }, + "(method 11 revcycle)": { + "args": ["this", "source-entity"] + }, + "(method 22 villagea-water)": { + "args": ["this"], + "vars": { + "v1-2": "ripple" + } + }, + "starfish-init-by-other": { + "args": ["parent", "position"] + }, + "(method 10 vehicle-path)": { + "args": ["this", "index", "result"] + }, + "(method 11 vehicle-path)": { + "args": ["this", "index", "result"] + }, + "(method 12 vehicle-path)": { + "args": ["this", "x", "speed", "z", "heading"] + }, + "(method 7 vehicle-controller)": { + "args": ["this", "offset"] + }, + "(method 12 vehicle-controller)": { + "args": ["this", "dest-index", "cur-pos"], + "vars": { + "f30-0": "speed-mag", + "f28-0": "heading-angle", + "s5-1": "tangent-dir", + "s3-0": "to-dest" + } + }, + "(method 13 vehicle-controller)": { + "args": ["this", "cur-pos"] + }, + "(method 14 vehicle-controller)": { + "args": ["this", "from-pos", "out-point"], + "vars": { + "s5-0": "to-center", + "s3-0": "tangent-dir", + "f30-0": "center-dist", + "f28-0": "circle-radius", + "f0-9": "tangent-len", + "f28-1": "tangent-comp", + "f0-12": "radial-comp" + } + }, + "(method 15 vehicle-controller)": { + "args": ["this", "boat-shape"], + "vars": { + "s3-0": "dest-vel-dir", + "s4-0": "to-dest-point", + "f30-0": "along-dot", + "s4-2": "throttle-index", + "s3-1": "forward-axis", + "s4-3": "right-axis", + "v1-16": "boat-pos", + "f0-9": "forward-err", + "f3-0": "lateral-err" + } + }, + "(method 11 vehicle-controller)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "s5-1": "i" + } + }, + "(method 10 vehicle-controller)": { + "args": ["this", "forward-dir", "throttle", "sample-index"], + "vars": { + "s3-0": "dir", + "f30-0": "elapsed-sec", + "f28-0": "sample-speed", + "f0-4": "turn-angle", + "f26-0": "turn-radius" + } + }, + "(method 9 vehicle-controller)": { + "args": ["this", "path", "turning-radius-table", "throttle-control-table", "table-length", "table-step"] + }, + "(method 23 fishermans-boat)": { + "args": ["this", "time"], + "vars": { + "s4-0": "force", + "s1-0": "velocity", + "s5-0": "world-pos", + "s0-0": "stab-normal", + "s2-0": "boat-forward", + "s3-0": "mat", + "sv-128": "i", + "sv-144": "control-point", + "sv-160": "i", + "sv-176": "stab-local-pos", + "f0-2": "submerge-depth", + "f30-0": "submerge-frac", + "s1-1": "anchor-pos", + "s2-1": "thrust-dir" + } + }, + "(method 7 fishermans-boat)": { + "args": ["this", "offset"] + }, + "(method 30 fishermans-boat)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "platform-group", + "s3-0": "mesh" + } + }, + "(method 31 fishermans-boat)": { + "args": ["this"] + }, + "(method 11 fishermans-boat)": { + "args": ["this", "source-entity"] + }, + "bird-bob-func": { + "args": ["system", "particle", "position"] + }, + "sparticle-seagull-moon": { + "args": ["system", "particle", "transform"] + }, + "check-drop-level-village1-fountain-nosplash": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "check-drop-level-village1-fountain": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "check-drop-level-sagehut": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "(method 32 sequenceA-village1)": { + "args": ["this", "setup-scene?"] + }, + "sequenceA-village1-init-by-other": { + "args": ["source-entity"] + }, + "(method 22 training-water)": { + "args": ["this"], + "vars": { + "v1-2": "ripple" + } + }, + "(method 11 training-cam)": { + "args": ["this", "source-entity"] + }, + "(method 11 tra-pontoon)": { + "args": ["this", "source-entity"] + }, + "(method 23 tra-pontoon)": { + "args": ["this", "simulation-time"] + }, + "(method 30 tra-pontoon)": { + "args": ["this"] + }, + "(method 31 tra-pontoon)": { + "args": ["this"] + }, + "(method 11 scarecrow-a)": { + "args": ["this", "source-entity"] + }, + "(method 11 scarecrow-b)": { + "args": ["this", "source-entity"] + }, + "check-drop-level-training-mist": { + "args": ["system", "particle", "position"] + }, + "check-drop-level-training-spout-rain": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "impact-position" + } + }, + "tra-bird-bob-func": { + "args": ["system", "particle", "position"] + }, + "tra-sparticle-seagull-moon": { + "args": ["system", "particle", "transform"] + }, + "(method 11 boatpaddle)": { + "args": ["this", "source-entity"] + }, + "(method 11 windturbine)": { + "args": ["this", "source-entity"] + }, + "mis-bone-bridge-event-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "(method 11 mis-bone-bridge)": { + "args": ["this", "source-entity"] + }, + "actor-wait-for-period": { + "args": ["duration"] + }, + "(method 20 breakaway)": { + "args": ["this", "source-res", "transform-index"] + }, + "(method 11 breakaway-right)": { + "args": ["this", "source-entity"] + }, + "(method 11 breakaway-mid)": { + "args": ["this", "source-entity"] + }, + "(method 11 breakaway-left)": { + "args": ["this", "source-entity"] + }, + "(method 27 bone-platform)": { + "args": ["this", "target-position"], + "vars": { + "gp-0": "horizontal-delta", + "f0-1": "distance", + "f1-1": "force-magnitude" + } + }, + "(method 23 bone-platform)": { + "args": ["this", "simulation-time"] + }, + "(method 30 bone-platform)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "primitive" + } + }, + "(method 31 bone-platform)": { + "args": ["this"], + "vars": { + "s5-0": "point-count", + "s4-0": "i", + "s3-0": "control-point", + "f30-0": "angle" + } + }, + "(method 27 misty-battlecontroller)": { + "args": ["this"] + }, + "(method 11 boat-fuelcell)": { + "args": ["this", "source-entity"] + }, + "(method 11 silostep)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "primitive" + } + }, + "(method 24 rounddoor)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "primitive" + } + }, + "keg-bounce-set-particle-rotation-callback": { + "args": ["tracker"], + "vars": { + "v1-0": "owner" + } + }, + "keg-update-smush": { + "args": ["barrel", "amount"] + }, + "keg-event-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "keg-init-by-other": { + "args": ["source", "behavior"] + }, + "keg-conveyor-spawn-keg": { + "args": ["conveyor"] + }, + "keg-conveyor-spawn-bouncing-keg": { + "args": ["conveyor"] + }, + "keg-conveyor-paddle-init-by-other": { + "args": ["source"] + }, + "(method 11 keg-conveyor)": { + "args": ["this", "source-entity"], + "vars": { + "s5-1": "tangent", + "s4-0": "orientation" + } + }, + "(method 22 mud)": { + "args": ["this"], + "vars": { + "t9-0": "parent-method", + "gp-0": "ripple", + "v1-9": "fade-distances" + } + }, + "analyze-point-on-path-segment": { + "args": ["info"], + "vars": { + "s5-0": "offset" + } + }, + "muse-get-path-point": { + "args": ["output", "index"] + }, + "(method 51 muse)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "v1-2": "node-index" + } + }, + "(method 44 muse)": { + "args": ["this", "other", "event"] + }, + "(method 43 muse)": { + "args": ["this", "other", "event"] + }, + "(method 11 muse)": { + "args": ["this", "source-entity"] + }, + "(method 44 bonelurker)": { + "args": ["this", "other", "event"] + }, + "(method 43 bonelurker)": { + "args": ["this", "attacker", "event"] + }, + "bonelurker-stunned-event-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "(method 47 bonelurker)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "body-group", + "s3-0": "lower-touch-sphere", + "s3-1": "upper-touch-sphere", + "s3-2": "attack-sphere" + } + }, + "quicksandlurker-missile-init-by-other": { + "args": ["launch", "source-entity"], + "vars": { + "s5-0": "collision", + "s4-0": "primitive" + } + }, + "spawn-quicksandlurker-missile": { + "args": ["parent", "position", "velocity", "source-entity"], + "vars": { + "s5-0": "launch" + } + }, + "get-height-over-navmesh!": { + "args": ["nav", "height", "point"], + "vars": { + "f0-1": "surface-height" + } + }, + "intersects-nav-mesh?": { + "args": ["nav", "point"] + }, + "quicksandlurker-default-event-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "inc-angle": { + "args": ["angle", "step"] + }, + "quicksandlurker-post": { + "vars": { + "f28-0": "orbit-x", + "f30-2": "bob-offset", + "f0-10": "orbit-z", + "v1-4": "mud-entity", + "a0-5": "mud" + } + }, + "quicksandlurker-check-hide-transition": { + "vars": { + "a0-2": "nav", + "a1-1": "target-position" + } + }, + "quicksandlurker-spit": { + "vars": { + "gp-0": "launch-position", + "s5-0": "velocity", + "f1-0": "horizontal-distance" + } + }, + "(method 11 quicksandlurker)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "body-group", + "s2-0": "lower-touch-sphere", + "s2-1": "upper-touch-sphere", + "s2-2": "attack-sphere" + } + }, + "target-on-end-of-teetertotter?": { + "args": ["platform"], + "vars": { + "gp-1": "target-offset" + } + }, + "(code teetertotter-launch)": { + "vars": { + "f0-4": "frame", + "v1-16": "rock-falling?" + } + }, + "(method 11 teetertotter)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "root-group", + "s2-0": "rock-sphere", + "s2-1": "primitive-0", + "s2-2": "primitive-1", + "s2-3": "primitive-2", + "s2-4": "primitive-3" + } + }, + "balloonlurker-get-path-point": { + "args": ["index"] + }, + "balloonlurker-get-next-path-point": { + "vars": { + "a0-1": "next-index" + } + }, + "balloonlurker-snap-to-path-point": { + "args": ["index"], + "vars": { + "s4-0": "position", + "gp-0": "tangent" + } + }, + "balloonlurker-find-nearest-path-point": { + "vars": { + "gp-0": "nearest-index", + "f30-0": "nearest-distance", + "s5-0": "position", + "s4-0": "i", + "f0-2": "distance" + } + }, + "balloonlurker-event-handler": { + "args": ["sender", "argc", "message", "event"], + "vars": { + "s4-0": "mine-index", + "s3-0": "mine-prim-id", + "a0-10": "mine-prim" + } + }, + "(method 23 balloonlurker)": { + "args": ["this", "time-step"] + }, + "(code balloonlurker-mine-explode)": { + "args": ["mine-index"], + "vars": { + "v1-16": "mine-mod" + } + }, + "balloonlurker-pilot-init-by-other": { + "args": ["balloon"] + }, + "(method 20 balloonlurker-pilot)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "primitive" + } + }, + "(method 21 balloonlurker-pilot)": { + "args": ["this"] + }, + "(method 30 balloonlurker)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "root-group", + "s3-0": "body-sphere", + "s3-1": "pilot-sphere", + "s3-2": "mine-0-sphere", + "s3-3": "mine-1-sphere" + } + }, + "(method 31 balloonlurker)": { + "args": ["this"], + "vars": { + "s5-0": "i", + "s4-0": "control-point", + "f30-0": "angle", + "v1-22": "rudder-point", + "v1-24": "thrust-point", + "v1-26": "center-point" + } + }, + "(method 11 balloonlurker)": { + "args": ["this", "source-entity"] + }, + "(method 32 sequenceB)": { + "args": ["this", "commit?"], + "vars": { + "s5-1": "i", + "s4-0": "army-member", + "s3-1": "spawned-lurker", + "s3-3": "spawned-soldier" + } + }, + "(method 11 sequenceB)": { + "args": ["this", "source-entity"], + "vars": { + "v1-2": "i" + } + }, + "sequenceC-can-trans-hook-2": { + "vars": { + "gp-0": "can-position" + } + }, + "(method 32 sequenceC)": { + "args": ["this", "commit?"], + "vars": { + "v0-1": "launch-control" + } + }, + "sequenceC-trans-hook": { + "vars": { + "gp-0": "splash-position" + } + }, + "(method 11 sequenceC)": { + "args": ["this", "source-entity"] + }, + "(method 32 assistant-firecanyon)": { + "args": ["this", "commit?"] + }, + "(method 11 assistant-firecanyon)": { + "args": ["this", "source-entity"] + }, + "check-drop-level-sagehut2": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "splash-position" + } + }, + "(method 11 pontoon)": { + "args": ["this", "source-entity"] + }, + "(method 23 pontoon)": { + "args": ["this", "time-step"] + }, + "(method 30 pontoonfive)": { + "vars": { + "s5-0": "collision", + "s4-0": "primitive" + } + }, + "(method 31 pontoonfive)": { + "vars": { + "v1-6": "control-point-0", + "v1-8": "control-point-1", + "v1-10": "control-point-2", + "v1-12": "control-point-3" + } + }, + "(method 30 pontoonten)": { + "vars": { + "s5-0": "collision", + "s4-0": "primitive" + } + }, + "(method 31 pontoonten)": { + "vars": { + "v1-6": "control-point-0", + "v1-8": "control-point-1", + "v1-10": "control-point-2", + "v1-12": "control-point-3" + } + }, + "(method 11 allpontoons)": { + "args": ["this", "source-entity"] + }, + "(method 11 fireboulder)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "primitive-group", + "s2-0": "boulder-primitive", + "s2-1": "blocking-primitive" + } + }, + "(method 11 ceilingflag)": { + "args": ["this", "source-entity"] + }, + "(method 11 exit-chamber-dummy)": { + "args": ["this", "source-entity"] + }, + "(method 11 ogreboss-village2)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "primitive-group", + "s2-0": "touch-primitive" + } + }, + "(method 22 villageb-water)": { + "vars": { + "v1-2": "ripple" + } + }, + "(method 32 gambler)": { + "args": ["this", "commit?"] + }, + "(method 43 gambler)": { + "vars": { + "f0-2": "roll" + } + }, + "(method 11 gambler)": { + "args": ["this", "source-entity"] + }, + "(method 52 warrior)": { + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl-alias" + } + }, + "(method 48 warrior)": { + "vars": { + "v1-9": "shadow-ctrl", + "v1-14": "shadow-ctrl" + } + }, + "(method 32 warrior)": { + "args": ["this", "commit?"], + "vars": { + "s5-2": "i", + "s4-2": "event-block", + "s3-0": "send-fn", + "v1-25": "alt-actor" + } + }, + "(method 43 warrior)": { + "vars": { + "f0-2": "roll" + } + }, + "(method 41 warrior)": { + "args": ["this", "center-joint", "collision-size"], + "vars": { + "s5-0": "collision", + "s4-0": "root-prim", + "s3-0": "sphere-prim", + "s3-1": "sphere-prim-2" + } + }, + "(method 11 warrior)": { + "args": ["this", "source-entity"] + }, + "(method 32 geologist)": { + "args": ["this", "commit?"] + }, + "(method 43 geologist)": { + "vars": { + "f0-2": "chatter-roll" + } + }, + "(method 11 geologist)": { + "args": ["this", "source-entity"] + }, + "tetherrock-get-info": { + "args": ["entity"] + }, + "(method 9 swamp-rope-rand-float)": { + "args": ["this", "min-time", "max-time", "max-value"] + }, + "(method 9 swamp-rope-oscillator)": { + "args": ["this", "initial-value", "accel", "max-velocity", "damping"] + }, + "(method 10 swamp-rope-oscillator)": { + "args": ["this", "target-offset"], + "vars": { + "f0-3": "accel-delta" + } + }, + "(method 9 swamp-blimp-rand-vector)": { + "args": ["this", "min-time", "max-time", "xz-range", "y-range"] + }, + "(method 9 swamp-blimp-oscillator)": { + "args": ["this", "initial-value", "accel", "max-velocity", "damping"] + }, + "(method 10 swamp-blimp-oscillator)": { + "args": ["this", "target-offset"], + "vars": { + "gp-0": "delta", + "f0-2": "speed" + } + }, + "(method 11 swamp-tetherrock)": { + "args": ["this", "source-entity"] + }, + "precursor-arm-slip": { + "args": ["progress"] + }, + "(method 11 precursor-arm)": { + "args": ["this", "source-entity"] + }, + "swamp-rope-init-by-other": { + "args": ["origin", "other-entity"] + }, + "(method 11 swamp-blimp)": { + "args": ["this", "source-entity"] + }, + "bustarock": { + "args": ["rock-number"] + }, + "(method 32 sage-bluehut)": { + "args": ["this", "commit?"] + }, + "(method 43 sage-bluehut)": { + "vars": { + "f0-2": "roll" + } + }, + "(method 11 sage-bluehut)": { + "args": ["this", "source-entity"] + }, + "(method 32 flutflut-bluehut)": { + "args": ["this", "commit?"] + }, + "(method 11 flutflut-bluehut)": { + "args": ["this", "source-entity"] + }, + "(method 6 assistant-levitator)": { + "vars": { + "v1-0": "i" + } + }, + "(method 7 assistant-levitator)": { + "vars": { + "s5-0": "i", + "a0-1": "particles" + } + }, + "(method 52 assistant-levitator)": { + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "trans-y", + "a0-2": "shadow-ctrl", + "a0-4": "shadow-ctrl" + } + }, + "(method 48 assistant-levitator)": { + "vars": { + "v1-9": "shadow-ctrl", + "v1-14": "shadow-ctrl" + } + }, + "(method 32 assistant-bluehut)": { + "args": ["this", "commit?"] + }, + "(method 43 assistant-bluehut)": { + "vars": { + "f30-0": "roll" + } + }, + "check-drop-level-assistant-bluehut": { + "args": ["system", "particle", "position"], + "vars": { + "gp-0": "splash-position" + } + }, + "(method 11 assistant-bluehut)": { + "args": ["this", "source-entity"] + }, + "(method 32 assistant-levitator)": { + "args": ["this", "commit?"] + }, + "(method 11 assistant-levitator)": { + "args": ["this", "source-entity"] + }, + "(method 27 sunken-elevator)": { + "vars": { + "s5-0": "anim-channel", + "s5-1": "anim-channel" + } + }, + "(method 29 sunken-elevator)": { + "vars": { + "s5-0": "path-position" + } + }, + "swamp-spike-set-particle-rotation-callback": { + "args": ["tracker"] + }, + "(method 11 swamp-spike)": { + "args": ["this", "source-entity"] + }, + "(method 11 swampgate)": { + "args": ["this", "source-entity"] + }, + "(method 11 balance-plat)": { + "args": ["this", "source-entity"] + }, + "(method 11 swamp-rock)": { + "args": ["this", "source-entity"] + }, + "swamp-rock-init-by-other": { + "args": ["position"] + }, + "(method 22 tar-plat)": { + "args": ["this", "position", "time"] + }, + "(method 23 tar-plat)": { + "args": ["this", "sim-time"] + }, + "(method 30 tar-plat)": { + "vars": { + "s5-0": "collision", + "s4-0": "primitive" + } + }, + "(method 31 tar-plat)": { + "vars": { + "s5-0": "num-points", + "s4-0": "i", + "s3-0": "control-point", + "f26-0": "angle", + "f28-0": "radius", + "f30-0": "clamp" + } + }, + "(method 9 swamp-bat-idle-path)": { + "args": ["this", "out-position", "path-param"], + "vars": { + "f30-0": "angle" + } + }, + "(method 6 swamp-bat)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "i" + } + }, + "(method 11 swamp-bat)": { + "args": ["this", "source-entity"] + }, + "(method 44 swamp-rat)": { + "args": ["this", "other", "event"] + }, + "(method 38 swamp-rat)": { + "vars": { + "a1-1": "clamped-position" + } + }, + "(method 11 swamp-rat-nest)": { + "args": ["this", "source-entity"] + }, + "(method 20 swamp-rat-nest-dummy-a)": { + "args": ["this"], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 20 swamp-rat-nest-dummy-b)": { + "args": ["this"], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 20 swamp-rat-nest-dummy-c)": { + "args": ["this"], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 21 swamp-rat-nest-dummy-a)": { + "args": ["this"], + "vars": { + "v1-0": "i", + "a0-1": "joint-list", + "a1-0": "joint", + "v0-1": "particle-joint" + } + }, + "(method 21 swamp-rat-nest-dummy-b)": { + "args": ["this"], + "vars": { + "v1-0": "i", + "a0-1": "joint-list", + "a1-0": "joint", + "v0-1": "particle-joint" + } + }, + "(method 21 swamp-rat-nest-dummy-c)": { + "args": ["this"], + "vars": { + "v1-0": "i", + "a0-1": "joint-list", + "a1-0": "joint", + "v0-1": "particle-joint" + } + }, + "build-matrix-from-up-and-forward-axes!": { + "args": ["out", "up", "up-axis", "forward", "forward-axis"] + }, + "joint-mod-tracker-callback": { + "args": ["joint-cspace", "source-transform"] + }, + "(method 0 joint-mod-tracker)": { + "args": ["allocation", "type-to-make", "owner", "joint-index", "target-pos-func", "up-axis", "forward-axis"] + }, + "kermit-pulse-init-by-other": { + "args": ["position", "source-entity"] + }, + "spawn-kermit-pulse": { + "args": ["kermit", "position", "source-entity"] + }, + "kermit-tongue-pos": { + "args": ["kermit"] + }, + "kermit-get-head-dir-xz": { + "args": ["kermit", "out"] + }, + "kermit-get-head-dir": { + "args": ["kermit", "out"] + }, + "kermit-get-tongue-target-callback": { + "args": ["out"] + }, + "(method 11 kermit)": { + "args": ["this", "source-entity"] + }, + "(method 7 billy)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "i" + } + }, + "billy-snack-init-by-other": { + "args": ["position"] + }, + "rat-about-to-eat?": { + "args": ["rat", "game"] + }, + "billy-rat-init-by-other": { + "args": ["game", "position", "destination"] + }, + "(method 32 billy)": { + "args": ["this", "commit?"] + }, + "(method 34 billy)": { + "args": ["this", "commit?"] + }, + "(method 36 billy)": { + "args": ["this", "commit?"] + }, + "(method 43 billy)": { + "args": ["this"], + "vars": { + "f30-0": "rng" + } + }, + "(method 11 billy)": { + "args": ["this", "source-entity"], + "vars": { + "s5-0": "i" + } + }, + "cavecrystal-light-control-default-callback": { + "args": ["drawable-pointer", "joint-index", "radius"] + }, + "(method 13 cavecrystal-light-control)": { + "args": ["this", "subject", "resource", "callback", "joint-index", "radius"] + }, + "(method 9 cavecrystal-light-control)": { + "args": ["this", "crystal-id", "intensity", "source-process"], + "vars": { + "s3-0": "crystal" + } + }, + "(method 10 cavecrystal-light-control)": { + "args": ["this", "probe-pos"], + "vars": { + "s5-1": "cur", + "f30-0": "max-intensity", + "f26-0": "fade-start", + "f28-0": "fade-range", + "f1-1": "clamped-dist", + "f0-7": "contribution" + } + }, + "(method 11 cavecrystal-light-control)": { + "vars": { + "a1-0": "tail", + "v0-0": "active-count", + "v1-0": "i", + "a2-3": "crystal" + } + }, + "(method 12 cavecrystal-light-control)": { + "args": ["this"], + "vars": { + "v1-0": "prev-time", + "a1-1": "now", + "v1-1": "i", + "a1-5": "crystal", + "v1-4": "prev", + "a1-7": "cur", + "a2-4": "next-crystal" + } + }, + "(method 11 cavecrusher)": { + "args": ["this", "source-entity"] + }, + "(method 11 cavetrapdoor)": { + "args": ["this", "source-entity"] + }, + "(method 11 caveflamepots)": { + "args": ["this", "source-entity"] + }, + "(method 11 cavespatula)": { + "args": ["this", "source-entity"] + }, + "(method 11 cavespatulatwo)": { + "args": ["this", "source-entity"] + }, + "cavecrystal-light-control-caveelevator-callback": { + "args": ["elevator-pointer", "joint-index", "radius"] + }, + "(method 20 caveelevator)": { + "args": ["this"], + "vars": { + "v1-1": "now", + "s5-0": "bounced-pos" + } + }, + "(method 21 caveelevator)": { + "args": ["this"], + "vars": { + "s5-0": "joint-pos", + "gp-0": "bounds" + } + }, + "caveelevator-joint-callback": { + "args": ["elevator"] + }, + "(method 11 caveelevator)": { + "args": ["this", "source-entity"] + }, + "check-drop-level-maincave-drip": { + "args": ["system", "particle-info", "position"], + "vars": { + "gp-0": "splash-pos" + } + }, + "spiderwebs-default-event-handler": { + "args": ["source-process", "argc", "message", "block"], + "vars": { + "a0-8": "target-pos", + "f1-1": "height-offset" + } + }, + "(method 11 spiderwebs)": { + "args": ["this", "source-entity"], + "vars": { + "a0-11": "anim-channel", + "s5-1": "anim-channel" + } + }, + "(method 20 dark-crystal)": { + "args": ["this"], + "vars": { + "s5-0": "blast-pos", + "s3-0": "jak-pos", + "s4-0": "to-target", + "t2-0": "hit" + } + }, + "(method 21 dark-crystal)": { + "args": ["this"], + "vars": { + "s5-0": "all-destroyed?", + "s4-0": "crystal-task", + "s3-0": "destroyed-mask" + } + }, + "(method 11 dark-crystal)": { + "args": ["this", "source-entity"], + "vars": { + "s5-1": "anim-channel" + } + }, + "(method 9 baby-spider-spawn-params)": { + "args": [ + "this", + "hatched?", + "fast-start?", + "die-if-not-visible?", + "move-above-ground?", + "pickup-id", + "pickup-amount", + "death-event" + ] + }, + "(method 10 baby-spider-spawn-params)": { + "args": ["this", "delay"] + }, + "(method 44 baby-spider)": { + "args": ["this", "other-process", "block"] + }, + "baby-spider-default-event-handler": { + "args": ["source-process", "argc", "message", "block"] + }, + "(method 52 baby-spider)": { + "args": ["this", "target"] + }, + "baby-spider-init-by-other": { + "args": ["source-spider", "position", "heading", "spawn-params"] + }, + "(method 11 baby-spider)": { + "args": ["this", "source-entity"] + }, + "(method 21 mother-spider-egg)": { + "args": ["this", "shadow-pos", "initial?"], + "vars": { + "s5-0": "hit", + "a1-1": "probe-origin", + "a2-1": "probe-direction" + } + }, + "mother-spider-egg-init-by-other": { + "args": ["source-entity", "position", "fall-dest", "landing-normal"] + }, + "mother-spider-proj-update-velocity": { + "args": ["shot"], + "vars": { + "s3-1": "to-target", + "s4-0": "target-dir", + "s5-0": "velocity-dir", + "s3-2": "turn-matrix" + } + }, + "mother-spider-leg-init-by-other": { + "args": ["spider", "position", "leg-direction", "launch-direction"] + }, + "mother-spider-default-event-handler": { + "args": ["source-process", "argc", "message", "block"] + }, + "mother-spider-death-event-handler": { + "args": ["source-process", "argc", "message", "block"] + }, + "(method 30 mother-spider)": { + "args": ["this", "position", "heading", "hatched?"] + }, + "(method 21 mother-spider)": { + "args": ["this", "direction", "strength", "damage?"] + }, + "(method 29 mother-spider)": { + "args": ["this", "update-shadow?", "update-look?"] + }, + "(method 20 mother-spider)": { + "args": ["this", "landing-pos", "landing-normal"] + }, + "mother-spider-full-joint-callback": { + "args": ["spider"] + }, + "(method 22 mother-spider)": { + "args": ["this", "joint-matrix", "endpoint"] + }, + "(method 11 mother-spider)": { + "args": ["this", "source-entity"] + }, + "gnawer-falling-segment-init-by-other": { + "args": ["gnawer-owner", "position", "outward-direction"] + }, + "(method 20 gnawer)": { + "args": ["this", "segment-index"], + "vars": { + "v1-3": "segment", + "a0-1": "previous-segment", + "v0-0": "destination-matrix", + "a2-3": "source-matrix" + } + }, + "(method 21 gnawer)": { + "args": ["this", "segment-index", "bounds", "first?", "distance"], + "vars": { + "gp-0": "segment", + "f0-1": "surface-end", + "f30-0": "surface-progress", + "f28-0": "angle", + "s4-1": "outward-direction", + "s3-1": "surface-direction" + } + }, + "(method 22 gnawer)": { + "args": ["this", "route-distance"], + "vars": { + "s4-0": "bounds", + "a3-0": "first?", + "gp-0": "at-destination?", + "s2-0": "segment-index", + "v1-4": "place" + } + }, + "(method 23 gnawer)": { + "args": ["this"], + "vars": {"v1-12": "segment-index"} + }, + "(method 24 gnawer)": { + "args": ["this"], + "vars": { + "s5-0": "best-source", + "s4-0": "best-destination", + "f30-0": "best-distance", + "s3-0": "num-points", + "s2-0": "i" + } + }, + "(method 25 gnawer)": { + "args": ["this"], + "vars": { + "s5-0": "hit", + "s4-0": "segment-index", + "s3-0": "segment", + "s1-0": "direction", + "s2-0": "segment-position" + } + }, + "(method 27 gnawer)": { + "args": ["this"], + "vars": { + "s4-0": "num-points", + "s3-0": "death-count", + "s5-0": "money-mask", + "v1-14": "green-bit" + } + }, + "(method 28 gnawer)": { + "args": ["this", "num-bits", "used-mask"], + "vars": { + "v1-1": "start-bit", + "a0-2": "bit-index", + "a1-2": "bit" + } + }, + "(method 29 gnawer)": { + "args": ["this", "point-index", "pickup-position", "launch-vector"], + "vars": { + "s1-0": "num-points", + "s2-0": "temp-position", + "f30-1": "lowest-y", + "f28-1": "highest-y" + } + }, + "(method 30 gnawer)": { + "args": ["this", "picker"], + "vars": { + "gp-0": "permanent", + "s5-0": "money-mask", + "s2-0": "best-point", + "f30-0": "best-distance", + "s1-0": "num-points", + "s0-0": "point-index" + } + }, + "gnawer-joint-callback": { + "args": ["gnawer-owner"] + }, + "(method 11 gnawer)": { + "args": ["this", "source-entity"] + }, + "driller-lurker-default-event-handler": { + "args": ["source-process", "argc", "message", "block"] + }, + "(method 20 driller-lurker)": { + "args": ["this", "bounce-at-ends?", "look-target"], + "vars": { + "v1-1": "now", + "f0-0": "old-speed", + "f1-1": "new-speed", + "f0-5": "old-u", + "f30-0": "move-distance", + "s4-0": "moved?", + "s3-1": "previous-position", + "s4-1": "path-tangent", + "f0-13": "path-heading", + "f30-3": "drill-speed" + } + }, + "(method 23 driller-lurker)": { + "args": ["this"], + "vars": { + "v1-1": "now", + "s5-0": "path", + "s4-0": "closest-u-function" + } + }, + "(method 24 driller-lurker)": { + "args": ["this"], + "vars": {"a1-0": "player-position"} + }, + "(method 25 driller-lurker)": { + "args": ["this"], + "vars": {"s5-0": "player-position"} + }, + "(method 26 driller-lurker)": { + "args": ["this"], + "vars": {"a1-0": "player-position"} + }, + "(method 27 driller-lurker)": { + "args": ["this"], + "vars": { + "a2-0": "drill-tip-matrix", + "s5-0": "spawn-position" + } + }, + "(method 11 driller-lurker)": { + "args": ["this", "source-entity"] + }, + "tube-thrust": { + "args": ["lateral-input", "longitudinal-input"] + }, + "distance-from-tangent": { + "args": ["path", "progress", "path-point", "tangent", "side", "query-point"] + }, + "find-target-point": { + "args": ["target-position"] + }, + "(method 11 slide-control)": { + "args": ["this", "source-entity"] + }, + "(method 24 side-to-side-plat)": { + "args": ["this"], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 25 side-to-side-plat)": { + "args": ["this"], + "vars": { + "v0-0": "launch-control" + } + }, + "(method 11 seaweed)": { + "args": ["this", "source-entity"] + }, + "(method 11 shover)": { + "args": ["this", "source-entity"], + "vars": { + "s3-0": "mesh-id", + "s4-0": "cshape", + "s3-1": "prim", + "v1-17": "path", + "v1-23": "translation-offset", + "f0-13": "rotation-offset" + } + }, + "(method 27 square-platform)": { + "args": ["this", "rising?"], + "vars": { + "s4-0": "probe-position", + "v1-1": "water-entity", + "a0-4": "water-process", + "v1-4": "resolved-water-entity", + "f0-2": "surface-y", + "s3-0": "surface-position", + "v1-21": "splash-count", + "v1-25": "submerge-count" + } + }, + "(method 11 square-platform)": { + "args": ["this", "source-entity"] + }, + "(method 11 square-platform-master)": { + "args": ["this", "source-entity"] + }, + "(method 11 sun-iris-door)": { + "args": ["this", "source-entity"] + }, + "sun-iris-door-init-by-other": { + "args": ["position", "orientation", "open?"] + }, + "(method 20 orbit-plat-bottom)": { + "args": ["this", "from-point", "to-point"], + "vars": { + "s5-1": "delta", + "f30-0": "gap-distance", + "f28-0": "scaled-distance" + } + }, + "orbit-plat-bottom-init-by-other": { + "args": ["source-entity", "parent-platform"] + }, + "get-rotate-point!": { + "args": ["out", "center", "point", "radius", "rotation-direction", "speed"] + }, + "get-nav-point!": { + "args": ["out", "platform", "destination", "max-speed"] + }, + "(method 11 orbit-plat)": { + "args": ["this", "source-entity"] + }, + "(method 11 wedge-plat-master)": { + "args": ["this", "source-entity"] + }, + "(method 27 wedge-plat)": { + "args": ["this"], + "vars": { + "a0-1": "master", + "v1-0": "master-process", + "s4-0": "center", + "f30-0": "distance", + "f28-0": "angle", + "s5-0": "tipped?", + "f0-16": "cos-angle" + } + }, + "(method 11 wedge-plat)": { + "args": ["this", "source-entity"] + }, + "(method 27 wedge-plat-outer)": { + "args": ["this"], + "vars": { + "a0-1": "master", + "v1-0": "master-process", + "s4-0": "center", + "f30-0": "distance", + "f28-0": "angle", + "s5-0": "tipped?", + "f0-16": "sin-angle" + } + }, + "(method 11 wedge-plat-outer)": { + "args": ["this", "source-entity"] + }, + "(method 11 wall-plat)": { + "args": ["this", "source-entity"] + }, + "qbert-plat-on-init-by-other": { + "args": ["source-entity", "parent-platform"] + }, + "qbert-plat-event-handler": { + "args": ["source-process", "argc", "message", "block"] + }, + "(method 33 qbert-plat)": { + "args": ["this"], + "vars": { + "a1-0": "master", + "v1-0": "master-process" + } + }, + "(method 32 qbert-plat)": { + "args": ["this"], + "vars": { + "v1-0": "master", + "a0-1": "master-process", + "v1-3": "new-on?", + "gp-2": "child" + } + }, + "(method 22 qbert-plat)": { + "args": ["this", "position", "simulation-time"] + }, + "(method 23 qbert-plat)": { + "args": ["this", "simulation-time"] + }, + "(method 30 qbert-plat)": { + "args": ["this"], + "vars": { + "s5-0": "cshape", + "s4-0": "prim" + } + }, + "(method 31 qbert-plat)": { + "args": ["this"], + "vars": { + "v1-11": "cp0", + "v1-13": "cp1", + "v1-15": "cp2", + "v1-17": "cp3" + } + }, + "(method 11 qbert-plat)": { + "args": ["this", "source-entity"] + }, + "(method 20 qbert-plat-master)": { + "args": ["this", "platform-index"] + }, + "(method 11 qbert-plat-master)": { + "args": ["this", "source-entity"] + }, + "(method 20 steam-cap)": { + "args": ["this"], + "vars": { + "a1-0": "target-position", + "f0-0": "target-y", + "f0-1": "distance-sq", + "s5-0": "should-shove?", + "a1-1": "overlap-params" + } + }, + "(method 21 steam-cap)": { + "args": ["this"], + "vars": { + "s5-0": "going-down?", + "f0-0": "phase", + "f30-0": "up-fraction", + "s4-0": "impulse-index", + "s3-0": "launch-point", + "f30-1": "down-fraction", + "a1-8": "spread-position", + "s4-3": "control-index", + "s2-0": "control-point", + "s3-3": "new-position", + "f0-20": "impact-velocity", + "f0-22": "bounce-velocity", + "f0-24": "approach", + "f1-24": "velocity-y", + "f1-29": "distance-to-up", + "v1-62": "was-positive?", + "f0-26": "overshoot-velocity", + "f0-31": "y-sum", + "v1-71": "i", + "f0-32": "average-y", + "a1-16": "root-position", + "v1-77": "edge0", + "a0-35": "edge1", + "s5-1": "normal" + } + }, + "(method 11 steam-cap)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "cshape", + "s3-0": "prim", + "s4-1": "root-channel", + "f30-0": "travel-up-phase", + "f28-0": "travel-down-phase", + "sv-16": "percent-tag", + "v1-36": "percent-values", + "s5-1": "control-offset", + "f30-1": "angle", + "s4-2": "i", + "s3-1": "control-point" + } + }, + "(method 20 blue-eco-charger-orb)": { + "args": ["this", "rotv-scale"] + }, + "blue-eco-charger-orb-init-by-other": { + "args": ["source-entity", "parent-charger"] + }, + "(method 21 blue-eco-charger)": { + "args": ["this", "active?"], + "vars": { + "v1-0": "master", + "a0-1": "master-process", + "v1-3": "resolved-master" + } + }, + "(method 11 blue-eco-charger)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "cshape", + "s3-0": "prim", + "f0-6": "rotation-offset", + "s4-1": "root-channel" + } + }, + "exit-chamber-button-init-by-other": { + "args": ["position", "orientation", "source-entity", "active?"] + }, + "(method 20 exit-chamber)": { + "args": ["this", "wave-scale"] + }, + "(method 24 exit-chamber)": { + "args": ["this", "radius"], + "vars": { + "s4-0": "bone-matrix", + "f30-0": "angle", + "f28-0": "height", + "gp-0": "spawn-position" + } + }, + "(method 21 exit-chamber)": { + "args": ["this", "items"], + "vars": { + "s5-0": "bone-matrix" + } + }, + "(method 23 exit-chamber)": { + "args": ["this", "move-fcell-too?"], + "vars": { + "s5-0": "offset", + "s5-1": "items", + "a1-6": "player-position", + "a0-12": "fcell-process", + "v1-50": "perm" + } + }, + "(method 11 exit-chamber)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "cshape", + "s3-0": "prim" + } + }, + "(method 11 floating-launcher)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "cshape", + "s3-0": "prim", + "f30-0": "spring-height" + } + }, + "(method 30 sunken-water)": { + "args": ["this"], + "vars": { + "gp-0": "query", + "a0-1": "time", + "s5-0": "i" + } + }, + "(method 25 sunken-water)": { + "args": ["this"], + "vars": { + "s5-0": "use-sync?", + "f0-16": "deadly-percent" + } + }, + "(method 22 sunken-water)": { + "args": ["this"], + "vars": { + "s5-0": "ripple" + } + }, + "(method 20 whirlpool)": { + "args": ["this", "spin-speed"], + "vars": { + "gp-0": "target-position", + "f28-0": "target-distance", + "f26-0": "pull-strength", + "f0-7": "angle-to-center", + "f30-0": "rotation-delta", + "f24-0": "new-angle", + "f28-1": "new-radius", + "s4-1": "velocity", + "gp-1": "target-control", + "s3-0": "saved-status" + } + }, + "(method 11 whirlpool)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "cshape", + "s3-0": "prim", + "f30-0": "idle-speed", + "f28-0": "maximum-speed", + "sv-16": "speed-tag", + "v1-17": "speed-values", + "s5-1": "root-channel" + } + }, + "sunken-pipegame-button-init-by-other": { + "args": ["position", "orientation", "source-entity", "active?"] + }, + "(method 20 sunken-pipegame)": { + "args": ["this"], + "vars": { + "gp-0": "mask" + } + }, + "(method 21 sunken-pipegame)": { + "args": ["this", "pause?"], + "vars": { + "v1-4": "child" + } + }, + "(method 22 sunken-pipegame)": { + "args": ["this", "restore?"], + "vars": { + "v1-0": "challenge-index", + "a2-0": "selected-index", + "v1-5": "fuel-cell-process", + "v1-13": "buzzer-process" + } + }, + "(method 11 sunken-pipegame)": { + "args": ["this", "source-entity"] + }, + "bully-broken-cage-init-by-other": { + "args": ["source-entity"] + }, + "bully-default-event-handler": { + "args": ["source-process", "argc", "message", "block"] + }, + "(method 20 bully)": { + "args": ["this"], + "vars": { + "s5-1": "bounced?", + "s4-0": "sphere-info", + "s5-2": "wall-normal", + "s5-3": "mesh-info", + "s4-1": "boundary-normal" + } + }, + "(method 11 bully)": { + "args": ["this", "source-entity"] + }, + "double-lurker-top-init-by-other": { + "args": ["source-entity", "parent", "on-shoulders?", "spawn-position"] + }, + "double-lurker-default-event-handler": { + "args": ["source-process", "argc", "message", "block"], + "vars": { + "s4-0": "target-offset" + } + }, + "(method 52 double-lurker)": { + "args": ["this", "landing-point"], + "vars": { + "a1-2": "landing-direction", + "a1-5": "probe-start", + "s4-0": "probe-result" + } + }, + "(method 53 double-lurker)": { + "args": ["this", "spawn-point"], + "vars": { + "s3-0": "remaining-vertices", + "s4-0": "vertex-index" + } + }, + "(method 48 double-lurker)": { + "args": ["this"], + "vars": { + "s5-0": "buddy-spawn-point" + } + }, + "(method 11 double-lurker)": { + "args": ["this", "source-entity"] + }, + "(method 11 helix-slide-door)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "mesh", + "s5-1": "root-channel" + } + }, + "(method 11 helix-button)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision", + "s3-0": "mesh", + "s5-1": "root-channel" + } + }, + "(method 21 helix-water)": { + "args": ["this"], + "vars": { + "s5-0": "next-index", + "v1-5": "actor-entity", + "s4-0": "actor-process", + "a0-3": "actor" + } + }, + "(method 11 helix-water)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "alt-count", + "s3-0": "i" + } + }, + "puffer-default-event-handler": { + "args": ["source-process", "argc", "message", "block"] + }, + "(method 28 puffer)": { + "args": ["this"], + "vars": { + "s5-0": "probe-result", + "a1-0": "probe-start", + "a2-0": "probe-direction" + } + }, + "(method 24 puffer)": { + "args": ["this", "point"] + }, + "(method 23 puffer)": { + "args": ["this", "avoid-buddy?"] + }, + "(method 25 puffer)": { + "args": ["this", "max-distance"] + }, + "(method 20 puffer)": { + "args": ["this", "destination"] + }, + "(method 29 puffer)": { + "args": ["this", "mean?"] + }, + "(method 21 puffer)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "group" + } + }, + "(method 11 puffer)": { + "args": ["this", "source-entity"] + }, + "(method 21 sunkenfisha)": { + "args": ["this", "result", "progress", "local-offset"], + "vars": { + "s2-0": "tangent", + "f0-2": "path-heading", + "s4-1": "rotated-offset" + } + }, + "(method 23 sunkenfisha)": { + "args": ["this"], + "vars": { + "s5-0": "target-facing" + } + }, + "(method 26 sunkenfisha)": { + "args": ["this"], + "vars": { + "v1-3": "color-variant", + "s5-0": "root-channel" + } + }, + "sunkenfisha-init-by-other": { + "args": ["source-entity"] + }, + "(method 11 sunkenfisha)": { + "args": ["this", "source-entity"], + "vars": { + "s5-0": "remaining-fish" + } + }, + "(method 11 pusher)": { + "args": ["this", "source-entity"] + }, + "(method 11 gorge-pusher)": { + "args": ["this", "source-entity"] + }, + "dark-plant-check-target": { + "args": ["plant"] + }, + "dark-plant-randomize": { + "args": ["plant"] + }, + "dark-plants-all-done": { + "args": ["plant"] + }, + "dark-plant-has-bad-neighbor": { + "args": ["plant"] + }, + "(method 11 dark-plant)": { + "args": ["this", "source-entity"] + }, + "(method 11 happy-plant)": { + "args": ["this", "source-entity"] + }, + "race-time-copy!": { + "args": ["destination", "source"] + }, + "seconds->race-time": { + "args": ["result", "time"] + }, + "race-time->seconds": { + "args": ["time"] + }, + "race-time-less-than": { + "args": ["left", "right"] + }, + "race-time-save": { + "args": ["time", "tasks"] + }, + "race-time-read": { + "args": ["result", "tasks", "fallback-time"] + }, + "gorge-behind": { + "args": ["volume"] + }, + "gorge-in-front": { + "args": ["volume"] + }, + "race-time->string": { + "args": ["time"] + }, + "(method 11 gorge-start)": { + "args": ["this", "source-entity"] + }, + "find-adjacent-bounds-one": { + "args": ["mesh", "start-poly", "start-edge", "outer-vertex-table", "shared-vertex-table", "result"] + }, + "find-adjacent-bounds": { + "args": ["mesh", "boundary-info"] + }, + "fleeing-nav-enemy-clip-travel": { + "args": ["enemy", "desired-travel"] + }, + "fleeing-nav-enemy-adjust-travel": { + "args": ["enemy", "unused-travel"] + }, + "(method 43 lightning-mole)": { + "args": ["this", "attacker", "event"] + }, + "(method 44 lightning-mole)": { + "args": ["this", "touching-process", "event"] + }, + "(method 11 lightning-mole)": { + "args": ["this", "source-entity"] + }, + "check-drop-level-rolling-dirt": { + "args": ["particle-system", "particle-info", "position"] + }, + "check-drop-level-rolling-dirt-finish": { + "args": ["particle-system", "particle-info", "position"] + }, + "(method 11 peeper)": { + "args": ["this", "source-entity"] + }, + "fuel-cell-init-as-spline-slider": { + "args": ["robber-handle", "progress", "speed", "pickup-amount"] + }, + "robber-event-handler": { + "args": ["sender", "argc", "message", "block"] + }, + "robber-rotate": { + "args": ["face-jak", "max-angle"] + }, + "robber-calc-speed": { + "args": ["near-distance", "far-distance", "near-speed", "far-speed", "flee-shortest-way"] + }, + "(method 11 robber)": { + "args": ["this", "source-entity"] + }, + "race-ring-set-particle-rotation-callback": { + "args": ["tracker"] + }, + "race-ring-blue-set-particle-rotation-callback": { + "args": ["tracker"] + }, + "first-ring?": { + "args": ["ring"] + }, + "last-ring?": { + "args": ["ring"] + }, + "(method 11 race-ring)": { + "args": ["this", "source-entity"] + }, + "(method 11 balloon)": { + "args": ["this", "source-entity"] + }, + "(method 11 spike)": { + "args": ["this", "source-entity"] + }, + "(method 11 crate-darkeco-cluster)": { + "args": ["this", "source-entity"] + }, + "ogreboss-rock-explosion-effect": { + "args": ["position"] + }, + "ogreboss-missile-scale-explosion": { + "args": ["explosion"] + }, + "(method 11 ogreboss)": { + "args": ["this", "source-entity"] + }, + "(method 11 tntbarrel)": { + "args": ["this", "source-entity"] + }, + "(method 23 ogre-plat)": { + "args": ["this", "sim-time"] + }, + "(method 30 ogre-plat)": { + "args": ["this"], + "vars": { + "s5-0": "collision", + "s4-0": "collision-prim" + } + }, + "(method 31 ogre-plat)": { + "args": ["this"], + "vars": { + "s5-0": "point-count", + "s4-0": "i", + "s3-0": "point", + "f30-0": "angle", + "f28-0": "radius" + } + }, + "(method 31 ogre-step)": { + "args": ["this"], + "vars": { + "a0-5": "alt-actor" + } + }, + "(method 7 ogre-bridge)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "i" + } + }, + "(method 11 ogre-bridge)": { + "args": ["this", "source-entity"] + }, + "(method 11 ogre-bridgeend)": { + "args": ["this", "source-entity"] + }, + "(method 22 ogre-lava)": { + "args": ["this"], + "vars": { + "v1-2": "ripple" + } + }, + "(method 11 shortcut-boulder)": { + "args": ["this", "source-entity"] + }, + "(method 11 plunger-lurker)": { + "args": ["this", "source-entity"] + }, + "(method 20 flying-lurker)": { + "args": ["this"], + "vars": { + "s5-0": "shadow-ctrl", + "s4-0": "shadow-valid?", + "s3-1": "probe-result", + "a1-1": "probe-start", + "a2-0": "probe-direction", + "s2-2": "bounds", + "s1-1": "joint-position", + "f0-17": "bounds-radius" + } + }, + "flying-lurker-calc-speed": { + "args": ["unused-near-distance", "unused-far-distance", "max-speed", "min-speed"], + "vars": { + "s4-1": "target-offset", + "s3-0": "path-tangent", + "f30-0": "target-distance", + "f28-0": "target-distance-along-path", + "f26-0": "expected-race-distance", + "f0-6": "traveled-path-distance", + "f1-6": "rank-distance-offset", + "f0-10": "pace-error", + "f1-10": "normalized-pace-error", + "f0-12": "speed-blend" + } + }, + "flying-lurker-handler": { + "args": ["sender", "argc", "message", "event"] + }, + "(method 11 flying-lurker)": { + "args": ["this", "source-entity"] + }, + "(method 22 villagec-lava)": { + "args": ["this"], + "vars": { + "t9-0": "parent-method", + "v1-2": "ripple" + } + }, + "(method 11 gondola)": { + "args": ["this", "source-entity"] + }, + "(method 11 pistons)": { + "args": ["this", "source-entity"] + }, + "(method 11 gondolacables)": { + "args": ["this", "source-entity"] + }, + "minecartsteel-initialize-by-other": { + "args": ["source-entity", "phase-offset"] + }, + "(method 11 minecartsteel)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "i" + } + }, + "(method 52 minertall)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "root-y", + "a0-2": "ctrl", + "a0-4": "ctrl" + } + }, + "(method 48 minertall)": { + "args": ["this"], + "vars": { + "v1-9": "shadow-ctrl", + "v1-14": "shadow-ctrl" + } + }, + "(method 32 minertall)": { + "args": ["this", "commit?"] + }, + "(method 11 minertall)": { + "args": ["this", "source-entity"] + }, + "(method 52 minershort)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "root-y", + "a0-2": "ctrl", + "a0-4": "ctrl" + } + }, + "(method 48 minershort)": { + "args": ["this"], + "vars": { + "v1-9": "shadow-ctrl", + "v1-14": "shadow-ctrl" + } + }, + "(method 32 minershort)": { + "args": ["this", "commit?"], + "vars": { + "s5-1": "task-control", + "s4-0": "save-reminder-fn", + "s5-2": "task-control", + "s4-1": "save-reminder-fn", + "s4-2": "reminder-index", + "v1-59": "candidate-index", + "s4-3": "reward-count" + } + }, + "(method 43 minershort)": { + "args": ["this"], + "vars": { + "f0-2": "choice" + } + }, + "(method 11 minershort)": { + "args": ["this", "source-entity"] + }, + "(method 11 cavegem)": { + "args": ["this", "source-entity"] + }, + "(method 52 assistant-villagec)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-ctrl", + "f0-0": "root-y", + "a0-2": "ctrl" + } + }, + "(method 48 assistant-villagec)": { + "args": ["this"], + "vars": { + "v1-9": "shadow-ctrl", + "v1-14": "shadow-ctrl" + } + }, + "(method 32 assistant-villagec)": { + "args": ["this", "commit?"] + }, + "(method 43 assistant-villagec)": { + "args": ["this"], + "vars": { + "f0-2": "choice", + "v1-16": "lavatube-status", + "v1-21": "lavatube-status", + "v1-26": "lavatube-status" + } + }, + "(method 11 assistant-villagec)": { + "args": ["this", "source-entity"] + }, + "(method 32 sage-villagec)": { + "args": ["this", "commit?"], + "vars": { + "s5-3": "task-control", + "s4-0": "save-reminder-fn", + "s4-1": "reminder-index" + } + }, + "(method 43 sage-villagec)": { + "args": ["this"], + "vars": { + "f0-2": "choice" + } + }, + "(method 48 sage-villagec)": { + "args": ["this"], + "vars": { + "v1-1": "shadow-ctrl", + "a0-8": "ctrl" + } + }, + "(method 11 sage-villagec)": { + "args": ["this", "source-entity"] + }, + "(method 11 spider-vent)": { + "args": ["this", "source-entity"] + }, + "cave-trap-default-event-handler": { + "args": ["sender", "argc", "message", "event-block"] + }, + "(method 20 cave-trap)": { + "args": ["this"], + "vars": { + "s5-0": "work", + "s4-0": "search-position", + "v1-2": "i", + "s3-2": "actor-index", + "v1-10": "source-actor", + "s1-0": "actor-process", + "s2-2": "candidate", + "f30-0": "distance", + "a0-12": "bounds", + "v1-16": "any-slot", + "v1-18": "visible-slot", + "v1-19": "nearby-slot", + "v1-21": "egg-slot", + "s4-1": "tier", + "v1-29": "chosen-index", + "v1-32": "chosen-actor", + "s2-3": "chosen-process", + "s3-3": "chosen", + "s2-4": "spawn-direction", + "s1-1": "spawn-params", + "v1-40": "spawned" + } + }, + "(method 7 cave-trap)": { + "args": ["this", "offset"] + }, + "(method 11 cave-trap)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "shape", + "s3-0": "root-prim", + "s4-1": "actor-count", + "s3-1": "i" + } + }, + "(method 11 spider-egg)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "shape", + "s3-0": "root-prim", + "s4-1": "tilt-axis" + } + }, + "target-snowball-post": { + "vars": { + "gp-0": "time-ratio", + "s5-0": "remaining-iterations" + } + }, + "ice-cube-default-event-handler": { + "args": ["sender", "argc", "message", "event-block"] + }, + "(method 47 ice-cube)": { + "args": ["this"], + "vars": { + "s5-0": "shape", + "s4-0": "root-group", + "s3-0": "lower-body-prim", + "s3-1": "middle-body-prim", + "s3-2": "upper-body-prim", + "s3-3": "head-attack-prim", + "s3-4": "spike-attack-prim" + } + }, + "(method 57 ice-cube)": { + "args": ["this"], + "vars": { + "v1-3": "root-group" + } + }, + "(method 58 ice-cube)": { + "args": ["this"], + "vars": { + "v1-3": "root-group" + } + }, + "(method 11 ice-cube)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "path-point-count", + "v1-21": "forced-point" + } + }, + "(method 60 ice-cube)": { + "args": ["this", "update-target?"], + "vars": { + "gp-0": "to-target", + "v0-5": "facing-target?" + } + }, + "(method 51 ice-cube)": { + "args": ["this", "input-point", "output-point"], + "vars": { + "s5-0": "probe-point", + "s4-0": "probe-result", + "f0-0": "probe-offset", + "f30-0": "probe-length", + "f0-2": "hit-fraction" + } + }, + "(method 52 ice-cube)": { + "args": ["this", "candidate-point"], + "vars": { + "f0-0": "target-distance", + "a0-4": "bounds" + } + }, + "(method 53 ice-cube)": { + "args": ["this", "output-position", "output-facing"], + "vars": { + "s3-0": "path-point-count", + "s1-0": "point-index", + "s2-0": "remaining", + "a1-3": "probe-start", + "s3-1": "probe-result" + } + }, + "(method 54 ice-cube)": { + "args": ["this", "unused-output"], + "vars": { + "s4-0": "path-point-count", + "s2-0": "point-index", + "s5-0": "candidate-point", + "s3-0": "i" + } + }, + "(method 20 snow-ball-roller)": { + "args": ["this"], + "vars": { + "s5-0": "path-info", + "s4-0": "previous-path-position", + "f0-1": "emerge-end", + "f0-6": "fade-end", + "f0-8": "fade" + } + }, + "(method 21 snow-ball-roller)": { + "args": ["this", "vertical-speed"], + "vars": { + "f30-0": "volume" + } + }, + "(method 22 snow-ball-roller)": { + "args": ["this", "target"], + "vars": { + "s4-0": "push-direction", + "s3-0": "path-direction", + "f28-0": "target-angle", + "f30-0": "path-angle", + "f0-11": "angle-difference", + "f30-1": "limited-angle", + "f30-2": "shove-distance" + } + }, + "snow-ball-roller-init-by-other": { + "args": ["source-entity", "parent", "path-speed", "path-index", "junctions"], + "vars": { + "s3-0": "i", + "s4-1": "collision-shape", + "s3-1": "collision-prim", + "v1-33": "selected-path" + } + }, + "(method 14 snow-ball)": { + "args": ["this", "junctions", "path-speed", "path-index"], + "vars": { + "v1-0": "normalized-times", + "a0-4": "progress-per-frame", + "a1-1": "junction", + "a2-2": "now", + "a3-1": "i" + } + }, + "(method 15 snow-ball)": { + "args": ["this", "new-junctions", "path-index"], + "vars": { + "v0-0": "result", + "v1-0": ["roller", "(pointer snow-ball-roller)"], + "a0-1": "new-junction", + "a3-1": ["roller-junction", "(inline-array snow-ball-junction)"], + "t0-0": "i" + } + }, + "(method 7 snow-ball)": { + "args": ["this", "offset"], + "vars": { + "v1-0": "i" + } + }, + "(method 11 snow-ball)": { + "args": ["this", "source-entity"], + "vars": { + "s5-0": "i" + } + }, + "(method 20 snow-gears)": { + "args": ["this"], + "vars": { + "a1-0": "spawn-position" + } + }, + "(method 11 snow-eggtop)": { + "args": ["this", "source-entity"] + }, + "(method 11 snowpusher)": { + "args": ["this", "source-entity"] + }, + "(method 11 snow-spatula)": { + "args": ["this", "source-entity"] + }, + "(method 11 snow-fort-gate)": { + "args": ["this", "source-entity"] + }, + "(method 11 snow-gears)": { + "args": ["this", "source-entity"] + }, + "(method 11 snow-switch)": { + "args": ["this", "source-entity"] + }, + "(method 11 snow-log)": { + "args": ["this", "source-entity"] + }, + "(method 11 snow-log-button)": { + "args": ["this", "source-entity"] + }, + "snow-switch-event-handler": { + "args": ["sender", "argc", "message", "event-block"] + }, + "snow-log-button-event-handler": { + "args": ["sender", "argc", "message", "event-block"] + }, + "(method 11 snow-button)": { + "args": ["this", "source-entity"] + }, + "(method 24 flutflut-plat-small)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "root-prim" + } + }, + "(method 24 flutflut-plat-med)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "root-prim" + } + }, + "(method 24 flutflut-plat-large)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "root-prim" + } + }, + "(method 21 snow-bumper)": { + "args": ["this", "target"], + "vars": { + "s5-0": "shove-direction", + "f0-3": "target-angle", + "f30-0": "base-angle", + "f28-0": "max-angle-difference", + "f0-4": "angle-difference", + "f30-1": "limited-angle", + "f0-12": "particle-angle", + "s3-1": "shove-origin", + "f30-3": "shove-distance" + } + }, + "(method 11 snow-bumper)": { + "args": ["this", "source-entity"], + "vars": { + "s4-0": "collision-shape", + "s3-0": "root-group", + "s2-0": "ground-prim", + "s2-1": "wall-prim", + "s5-1": "channel", + "v1-52": "rotation-limits" + } + }, + "(method 24 ram-boss-proj)": { + "args": ["this"], + "vars": { + "f0-9": "shadow-radius", + "s5-0": "sound-param", + "a1-4": "sound-position", + "gp-1": "boss-process" + } + }, + "snow-ram-proj-update-velocity": { + "args": ["projectile"] + }, + "(method 26 ram-boss-proj)": { + "args": ["this"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "collision-prim" + } + }, + "(method 27 ram-boss-proj)": { + "args": ["this"], + "vars": { + "v1-12": "boss" + } + }, + "(method 28 ram-boss-proj)": { + "args": ["this"], + "vars": { + "gp-0": "target-point", + "a2-0": "player-velocity", + "f0-2": "distance", + "f0-3": "lead-scale" + } + }, + "ram-boss-on-ground-event-handler": { + "args": ["sender", "argc", "message", "event-block"] + }, + "(method 52 ram-boss)": { + "args": ["this"], + "vars": { + "v1-1": "root-group", + "v1-2": "shield-prim", + "v0-0": "shield-sphere" + } + }, + "(method 53 ram-boss)": { + "args": ["this"], + "vars": { + "v1-1": "prims", + "a0-1": "body-prim-0", + "a0-2": "body-prim-1", + "a0-3": "body-prim-2", + "v1-2": "shield-prim" + } + }, + "(method 48 ram-boss)": { + "args": ["this"], + "vars": { + "v1-23": "shield-mod" + } + }, + "ram-boss-init-by-other": { + "args": ["unused", "parent", "has-shield?"] + }, + "(method 54 ram-boss)": { + "args": ["this", "output-point"], + "vars": { + "a2-0": "joint-matrix" + } + }, + "(method 55 ram-boss)": { + "args": ["this"], + "vars": { + "s5-0": "eye-position", + "s4-0": "to-target", + "t2-0": "probe-result", + "v0-0": "clear?" + } + }, + "(method 51 ram-boss)": { + "args": ["this", "throw-direction"], + "vars": { + "f30-0": "facing-angle", + "f0-2": "throw-angle", + "f0-3": "angle-difference" + } + }, + "(method 57 ram-boss)": { + "args": ["this", "previous-interp"], + "vars": { + "f0-0": "pitch-factor", + "s3-0": "to-target", + "f0-1": "pitch-angle" + } + }, + "(method 56 ram-boss)": { + "args": ["this", "allow-projectile?"], + "vars": { + "s5-0": "zero-velocity", + "v1-9": "projectile-process" + } + }, + "(method 20 ram)": { + "args": ["this"], + "vars": { + "gp-0": "launch-control", + "a2-0": "wall-joint-matrix", + "s5-0": "spawn-position" + } + }, + "(method 21 ram)": { + "args": ["this"], + "vars": { + "gp-0": "launch-control", + "s3-0": "left-wheel-position", + "s4-0": "puff-position", + "s3-1": "right-wheel-position", + "s4-1": "puff-position" + } + }, + "(method 22 ram)": { + "args": ["this"], + "vars": { + "v1-0": "incomplete-count", + "v1-3": "permanent-state" + } + }, + "(method 11 ram)": { + "args": ["this", "entity-record"], + "vars": { + "s4-0": "collision-shape", + "s3-0": "root-group", + "s2-0": "wall-mesh", + "s2-1": "platform-mesh", + "s2-2": "attack-sphere", + "s4-1": "boss-finished?", + "s3-1": "ram-finished?" + } + }, + "snow-bird-bob-func": { + "args": ["unused-system", "particle", "position"] + }, + "sparticle-snow-birds-moon": { + "args": ["unused-system", "particle", "orbit-matrix"] + }, + "(method 20 yeti)": { + "args": ["this", "spawn-position", "spawn-direction"], + "vars": { + "s3-0": "num-vertices", + "s1-0": "vertex-index", + "s2-0": "tries-left" + } + }, + "(method 21 yeti)": { + "args": ["this", "candidate-position"], + "vars": { + "s5-0": "child" + } + }, + "(method 11 yeti)": { + "args": ["this", "entity-record"] + }, + "yeti-slave-init-by-other": { + "args": ["unused-entity", "parent", "spawn-position", "spawn-direction", "resume?"] + }, + "yeti-slave-default-event-handler": { + "args": ["sender", "argc", "message", "event-block"] + }, + "(method 11 lavabase)": { + "args": ["this", "entity-record"] + }, + "(method 11 lavafall)": { + "args": ["this", "entity-record"] + }, + "(method 11 lavashortcut)": { + "args": ["this", "entity-record"] + }, + "(method 7 darkecobarrel)": { + "args": ["this", "offset"] + }, + "darkecobarrel-base-pos": { + "args": ["start-time"] + }, + "darkecobarrel-base-done?": { + "args": ["position"] + }, + "darkecobarrel-base-init": { + "args": ["placement"] + }, + "darkecobarrel-mover-init-by-other": { + "args": ["placement", "speed", "start-time", "sync"] + }, + "(method 11 darkecobarrel)": { + "args": ["this", "entity-record"] + }, + "(method 11 lavafallsewera)": { + "args": ["this", "entity-record"] + }, + "(method 11 lavafallsewerb)": { + "args": ["this", "entity-record"] + }, + "(method 11 chainmine)": { + "args": ["this", "entity-record"] + }, + "(method 11 lavaballoon)": { + "args": ["this", "entity-record"] + }, + "(method 22 lavatube-lava)": { + "args": ["this"], + "vars": { + "t9-0": "parent-method", + "v1-2": "ripple" + } + }, + "(method 11 lavayellowtarp)": { + "args": ["this", "entity-record"] + }, + "energydoor-player-dist": { + "vars": { + "gp-0": "player-offset", + "s5-0": "door-matrix" + } + }, + "energydoor-open-handler": { + "args": ["sender", "argc", "message", "event-block"] + }, + "energydoor-closed-handler": { + "args": ["sender", "argc", "message", "event-block"] + }, + "(method 11 energydoor)": { + "args": ["this", "entity-record"] + }, + "(method 11 energybase)": { + "args": ["this", "entity-record"] + }, + "energyball-init": { + "args": ["ball"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "sphere" + } + }, + "energyball-init-by-other": { + "args": ["position"] + }, + "energyarm-init": { + "args": ["arm"], + "vars": { + "s5-0": "collision-shape", + "s4-0": "collision-mesh", + "v0-5": "particle-launcher" + } + }, + "energyarm-init-by-other": { + "args": ["offset", "y-rotation"] + }, + "energyhub-set-lava-height": { + "args": ["requested-height"] + }, + "(method 11 energyhub)": { + "args": ["this", "entity-record"] + }, + "(method 11 energylava)": { + "args": ["this", "entity-record"] + }, + "(method 32 assistant-lavatube-start)": { + "args": ["this", "commit?"] + }, + "(trans hidden assistant-lavatube-start)": { + "vars": { + "gp-0": "font-context" + } + }, + "(method 11 assistant-lavatube-start)": { + "args": ["this", "entity-record"] + }, + "logo-slave-init-by-other": { + "args": ["entity-record", "skeleton-definition"] + }, + "logo-init-by-other": { + "args": ["entity-record", "position", "mode"] + }, + "(trans target-title-wait)": { + "vars": { + "gp-0": "font-context" } } }