From 784cd5debbf856061d96d879baed5c8a1e27af9b Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Sat, 3 Jul 2021 16:18:41 -0400 Subject: [PATCH] [decomp] get started on game info (#674) * temp * menu text * wip * recognize handle to process * more --- common/type_system/TypeFieldLookup.cpp | 9 + common/type_system/TypeSystem.h | 2 + decompiler/IR2/AtomicOp.cpp | 5 + decompiler/IR2/AtomicOp.h | 3 +- decompiler/IR2/AtomicOpTypeAnalysis.cpp | 14 +- decompiler/IR2/Form.cpp | 2 + decompiler/IR2/Form.h | 5 + decompiler/IR2/FormExpressionAnalysis.cpp | 211 +- decompiler/IR2/GenericElementMatcher.cpp | 47 + decompiler/IR2/GenericElementMatcher.h | 6 +- decompiler/IR2/IR2_common.h | 1 + decompiler/analysis/atomic_op_builder.cpp | 14 + decompiler/config/all-types.gc | 547 ++-- .../anonymous_function_types.jsonc | 4 + .../config/jak1_ntsc_black_label/hacks.jsonc | 3 +- .../jak1_ntsc_black_label/label_types.jsonc | 40 +- .../stack_structures.jsonc | 24 +- .../jak1_ntsc_black_label/type_casts.jsonc | 74 +- .../jak1_ntsc_black_label/var_names.jsonc | 109 +- decompiler/util/data_decompile.cpp | 25 +- decompiler/util/data_decompile.h | 3 +- goal_src/engine/camera/cam-interface-h.gc | 2 + goal_src/engine/draw/drawable-ambient-h.gc | 3 + goal_src/engine/entity/entity-h.gc | 22 +- goal_src/engine/entity/entity-table.gc | 20 +- goal_src/engine/game/fact-h.gc | 4 +- goal_src/engine/game/game-info-h.gc | 280 +- goal_src/engine/game/game-info.gc | 1160 +++++++- goal_src/engine/game/game-save.gc | 663 +++++ goal_src/engine/game/main-h.gc | 1 + goal_src/engine/game/task/hint-control-h.gc | 2 + goal_src/engine/game/task/task-control-h.gc | 202 +- goal_src/engine/game/task/task-control.gc | 2326 ++++++++++------- goal_src/engine/geometry/geometry-h.gc | 16 +- goal_src/engine/level/level-h.gc | 1 + goal_src/engine/level/level-info.gc | 150 +- goal_src/engine/level/level.gc | 4 +- goal_src/engine/math/vector-h.gc | 4 +- goal_src/engine/ui/credits.gc | 172 +- goal_src/engine/ui/progress-h.gc | 34 +- .../engine/ui/progress/progress-static.gc | 1375 +++++++++- goal_src/engine/ui/text-h.gc | 188 +- goal_src/engine/ui/text.gc | 41 +- goal_src/kernel/gkernel-h.gc | 4 +- goalc/emitter/CallingConvention.cpp | 11 +- .../decompiler/reference/decompiler-macros.gc | 14 +- .../reference/engine/entity/entity-h_REF.gc | 9 +- .../reference/engine/game/fact-h_REF.gc | 4 +- .../reference/engine/game/game-info-h_REF.gc | 166 +- .../engine/game/task/task-control-h_REF.gc | 22 +- .../engine/game/task/task-control_REF.gc | 1741 +++++++----- .../engine/geometry/geometry-h_REF.gc | 6 +- .../reference/engine/geometry/vol-h_REF.gc | 8 +- .../reference/engine/level/level-info_REF.gc | 151 +- .../reference/engine/math/vector-h_REF.gc | 4 +- .../reference/engine/ui/credits_REF.gc | 10 +- .../reference/engine/ui/progress-h_REF.gc | 22 +- .../engine/ui/progress/progress-static_REF.gc | 1729 ++++++++++++ .../reference/engine/ui/text-h_REF.gc | 2 +- .../reference/kernel/gkernel-h_REF.gc | 34 +- test/decompiler/test_DataParser.cpp | 2 +- test/offline/offline_test_main.cpp | 10 +- tools/MemoryDumpTool/main.cpp | 25 + 63 files changed, 9250 insertions(+), 2542 deletions(-) create mode 100644 test/decompiler/reference/engine/ui/progress/progress-static_REF.gc diff --git a/common/type_system/TypeFieldLookup.cpp b/common/type_system/TypeFieldLookup.cpp index 9735bf158f..3985b8a662 100644 --- a/common/type_system/TypeFieldLookup.cpp +++ b/common/type_system/TypeFieldLookup.cpp @@ -67,6 +67,15 @@ std::string FieldReverseLookupOutput::Token::print() const { } } +bool FieldReverseLookupOutput::has_variable_token() const { + for (const auto& tok : tokens) { + if (tok.kind == Token::Kind::VAR_IDX) { + return true; + } + } + return false; +} + namespace { void try_reverse_lookup(const FieldReverseLookupInput& input, diff --git a/common/type_system/TypeSystem.h b/common/type_system/TypeSystem.h index a66da2de12..101ff0637a 100644 --- a/common/type_system/TypeSystem.h +++ b/common/type_system/TypeSystem.h @@ -104,6 +104,8 @@ struct FieldReverseLookupOutput { double total_score = 0.; TypeSpec result_type; std::vector tokens; + + bool has_variable_token() const; }; struct FieldReverseMultiLookupOutput { diff --git a/decompiler/IR2/AtomicOp.cpp b/decompiler/IR2/AtomicOp.cpp index 9d9bbee956..626b10132c 100644 --- a/decompiler/IR2/AtomicOp.cpp +++ b/decompiler/IR2/AtomicOp.cpp @@ -7,6 +7,7 @@ #include "decompiler/ObjectFile/LinkedObjectFile.h" #include "AtomicOp.h" #include "OpenGoalMapping.h" +#include "Form.h" namespace decompiler { ///////////////////////////// @@ -297,6 +298,8 @@ std::string get_simple_expression_op_name(SimpleExpression::Kind kind) { return "vector-!2"; case SimpleExpression::Kind::VECTOR_FLOAT_PRODUCT: return "vector-float*!2"; + case SimpleExpression::Kind::SUBU_L32_S7: + return "subu-s7"; default: assert(false); return {}; @@ -352,6 +355,8 @@ int get_simple_expression_arg_count(SimpleExpression::Kind kind) { case SimpleExpression::Kind::VECTOR_MINUS: case SimpleExpression::Kind::VECTOR_FLOAT_PRODUCT: return 3; + case SimpleExpression::Kind::SUBU_L32_S7: + return 1; default: assert(false); return -1; diff --git a/decompiler/IR2/AtomicOp.h b/decompiler/IR2/AtomicOp.h index a01eb42728..a93a8fd916 100644 --- a/decompiler/IR2/AtomicOp.h +++ b/decompiler/IR2/AtomicOp.h @@ -225,7 +225,8 @@ class SimpleExpression { PCPYLD, VECTOR_PLUS, VECTOR_MINUS, - VECTOR_FLOAT_PRODUCT + VECTOR_FLOAT_PRODUCT, + SUBU_L32_S7, // use SUBU X, src0, s7 to check if lower 32-bits are s7. }; // how many arguments? diff --git a/decompiler/IR2/AtomicOpTypeAnalysis.cpp b/decompiler/IR2/AtomicOpTypeAnalysis.cpp index 6cba06ba67..ece5f5086e 100644 --- a/decompiler/IR2/AtomicOpTypeAnalysis.cpp +++ b/decompiler/IR2/AtomicOpTypeAnalysis.cpp @@ -200,6 +200,8 @@ TP_Type SimpleExpression::get_type(const TypeState& input, return TP_Type::make_from_ts("vector"); case Kind::VECTOR_FLOAT_PRODUCT: return TP_Type::make_from_ts("vector"); + case Kind::SUBU_L32_S7: + return TP_Type::make_from_ts("int"); default: throw std::runtime_error("Simple expression cannot get_type: " + to_form(env.file->labels, env).print()); @@ -672,7 +674,6 @@ TypeState AsmOp::propagate_types_internal(const TypeState& input, // pextuw t0, r0, gp if (m_instr.kind == InstructionKind::PEXTUW) { if (m_src[0] && m_src[0]->reg() == Register(Reg::GPR, Reg::R0)) { - // sponge assert(m_src[1]); auto type = dts.ts.lookup_type(result.get(m_src[1]->reg()).typespec()); auto as_bitfield = dynamic_cast(type); @@ -685,6 +686,17 @@ TypeState AsmOp::propagate_types_internal(const TypeState& input, } } + // sllv out, in, r0 + if (m_instr.kind == InstructionKind::SLLV && m_src[1]->reg() == Register(Reg::GPR, Reg::R0)) { + auto type = dts.ts.lookup_type(result.get(m_src[0]->reg()).typespec()); + auto as_bitfield = dynamic_cast(type); + if (as_bitfield) { + auto field = find_field(dts.ts, as_bitfield, 0, 32, {}); + result.get(m_dst->reg()) = TP_Type::make_from_ts(field.type()); + return result; + } + } + if (m_dst.has_value()) { auto kind = m_dst->reg().get_kind(); if (kind == Reg::FPR) { diff --git a/decompiler/IR2/Form.cpp b/decompiler/IR2/Form.cpp index c9153f6b23..195003703b 100644 --- a/decompiler/IR2/Form.cpp +++ b/decompiler/IR2/Form.cpp @@ -1548,6 +1548,8 @@ std::string fixed_operator_to_string(FixedOperatorKind kind) { return "vector+!"; case FixedOperatorKind::VECTOR_FLOAT_PRODUCT: return "vector-float*!"; + case FixedOperatorKind::L32_NOT_FALSE_CBOOL: + return "l32-false-check"; default: assert(false); return ""; diff --git a/decompiler/IR2/Form.h b/decompiler/IR2/Form.h index 8e449c3eb9..27695eb2f1 100644 --- a/decompiler/IR2/Form.h +++ b/decompiler/IR2/Form.h @@ -154,6 +154,11 @@ class SimpleExpressionElement : public FormElement { FormStack& stack, std::vector* result, bool allow_side_effects); + void update_from_stack_subu_l32_s7(const Env& env, + FormPool& pool, + FormStack& stack, + std::vector* result, + bool allow_side_effects); void update_from_stack_float_to_int(const Env& env, FormPool& pool, FormStack& stack, diff --git a/decompiler/IR2/FormExpressionAnalysis.cpp b/decompiler/IR2/FormExpressionAnalysis.cpp index 7410fe599c..4fa712e680 100644 --- a/decompiler/IR2/FormExpressionAnalysis.cpp +++ b/decompiler/IR2/FormExpressionAnalysis.cpp @@ -128,6 +128,39 @@ bool is_power_of_two(int in, int* out) { return false; } +/*! + * Imagine: + * x = foo + * { // some macro/inlined thing + * read from x + * return x; + * } + * + * and you want to transform it to + * x = some_macro(foo, blah, ...) + * + * this will get you foo (and pop it from the stack), assuming the stack is sitting right after the + * point where the inline thing evaluated foo. + * + * For later book-keeping of reg use, if it gets you something new, it will set found_orig_out, + * and also give you the regaccess for the x of the x = foo. + * + * If you use this, you are responsible for adding code that sets x again. + */ +Form* repop_passthrough_arg(Form* in, + FormStack& stack, + const Env& env, + RegisterAccess* orig_out, + bool* found_orig_out) { + *found_orig_out = false; + + auto as_atom = form_as_atom(in); + if (as_atom && as_atom->is_var()) { + return stack.pop_reg(as_atom->var().reg(), {}, env, true, -1, orig_out, found_orig_out); + } + return in; +} + /*! * Create a form which represents a variable. */ @@ -654,7 +687,7 @@ void SimpleExpressionElement::update_from_stack_add_i(const Env& env, input.stride = 1; input.base_type = arg1_type.typespec(); auto out = env.dts->ts.reverse_field_lookup(input); - if (out.success) { + if (out.success && out.has_variable_token()) { // it is. now we have to modify things // first, look for the index @@ -673,6 +706,7 @@ void SimpleExpressionElement::update_from_stack_add_i(const Env& env, tokens.push_back(to_token(tok)); } } + assert(used_index); result->push_back(pool.alloc_element(args.at(1), out.addr_of, tokens)); return; } else { @@ -686,7 +720,7 @@ void SimpleExpressionElement::update_from_stack_add_i(const Env& env, input.stride = arg0_type.get_mult_int_constant(); input.base_type = arg1_type.typespec(); auto out = env.dts->ts.reverse_field_lookup(input); - if (out.success) { + if (out.success && out.has_variable_token()) { // it is. now we have to modify things // first, look for the index int p2; @@ -710,6 +744,7 @@ void SimpleExpressionElement::update_from_stack_add_i(const Env& env, tokens.push_back(to_token(tok)); } } + assert(used_index); result->push_back(pool.alloc_element(args.at(1), out.addr_of, tokens)); return; } else { @@ -736,6 +771,7 @@ void SimpleExpressionElement::update_from_stack_add_i(const Env& env, tokens.push_back(to_token(tok)); } } + assert(used_index); result->push_back(pool.alloc_element(args.at(1), out.addr_of, tokens)); return; } else { @@ -755,7 +791,7 @@ void SimpleExpressionElement::update_from_stack_add_i(const Env& env, rd_in.base_type = arg0_type.typespec(); auto rd = env.dts->ts.reverse_field_lookup(rd_in); - if (rd.success) { + if (rd.success && rd.has_variable_token()) { auto arg1_matcher = Matcher::match_or( {Matcher::op(GenericOpMatcher::fixed(FixedOperatorKind::MULTIPLICATION), {Matcher::any(0), Matcher::integer(rd_in.stride)}), @@ -774,6 +810,7 @@ void SimpleExpressionElement::update_from_stack_add_i(const Env& env, tokens.push_back(to_token(tok)); } } + assert(used_index); result->push_back(pool.alloc_element(args.at(0), rd.addr_of, tokens)); return; } else { @@ -1474,6 +1511,28 @@ void SimpleExpressionElement::update_from_stack_float_to_int(const Env& env, } } +namespace { +GenericElement* allocate_fixed_op(FormPool& pool, FixedOperatorKind kind, Form* op1) { + return pool.alloc_element(GenericOperator::make_fixed(kind), op1); +} +} // namespace + +void SimpleExpressionElement::update_from_stack_subu_l32_s7(const Env& env, + FormPool& pool, + FormStack& stack, + std::vector* result, + bool allow_side_effects) { + auto var = m_expr.get_arg(0).var(); + auto arg = pop_to_forms({var}, env, pool, stack, allow_side_effects).at(0); + auto type = env.get_types_before_op(var.idx()).get(var.reg()).typespec(); + if (type != TypeSpec("handle")) { + env.func->warnings.general_warning( + ".subu (32-bit) used on a {} at idx {}. This probably should be a handle.", type.print(), + var.idx()); + } + result->push_back(allocate_fixed_op(pool, FixedOperatorKind::L32_NOT_FALSE_CBOOL, arg)); +} + void SimpleExpressionElement::update_from_stack(const Env& env, FormPool& pool, FormStack& stack, @@ -1613,6 +1672,9 @@ void SimpleExpressionElement::update_from_stack(const Env& env, case SimpleExpression::Kind::VECTOR_FLOAT_PRODUCT: update_from_stack_vector_float_product(env, pool, stack, result, allow_side_effects); break; + case SimpleExpression::Kind::SUBU_L32_S7: + update_from_stack_subu_l32_s7(env, pool, stack, result, allow_side_effects); + break; default: throw std::runtime_error( fmt::format("SimpleExpressionElement::update_from_stack NYI for {}", to_string(env))); @@ -2633,6 +2695,108 @@ void CondWithElseElement::push_to_stack(const Env& env, FormPool& pool, FormStac // ShortCircuitElement /////////////////// +FormElement* sc_to_handle_get_proc(ShortCircuitElement* elt, + const Env& env, + FormPool& pool, + FormStack& stack) { + if (elt->kind != ShortCircuitElement::AND) { + return nullptr; + } + + if (elt->entries.size() != 2) { + return nullptr; + } + + // fmt::print("candidate: {}\n", elt->to_string(env)); + + constexpr int reg_input_1 = 0; + constexpr int reg_input_2 = 1; + constexpr int reg_input_3 = 2; + constexpr int reg_temp_1 = 10; + constexpr int reg_temp_2 = 11; + constexpr int reg_temp_3 = 12; + + // check first. + auto first_matcher = + Matcher::op(GenericOpMatcher::condition(IR2_Condition::Kind::NONZERO), + {Matcher::op(GenericOpMatcher::fixed(FixedOperatorKind::L32_NOT_FALSE_CBOOL), + {Matcher::any_reg(reg_input_1)})}); + + auto first_result = match(first_matcher, elt->entries.at(0).condition); + if (!first_result.matched) { + return nullptr; + } + + // auto first_use_of_in = *first_result.maps.regs.at(reg_input_1); + // fmt::print("reg1: {}\n", first_use_of_in.to_string(env)); + + auto setup_matcher = Matcher::set_var( + Matcher::deref(Matcher::any_reg(reg_input_2), false, + {DerefTokenMatcher::string("process"), DerefTokenMatcher::integer(0)}), + reg_temp_1); + + auto if_matcher = Matcher::if_no_else( + Matcher::op( + GenericOpMatcher::fixed(FixedOperatorKind::EQ), + {Matcher::deref(Matcher::any_reg(reg_input_3), false, {DerefTokenMatcher::string("pid")}), + Matcher::deref(Matcher::any_reg(reg_temp_2), false, + {DerefTokenMatcher::string("pid")})}), + Matcher::any_reg(reg_temp_3)); + + auto second_matcher = Matcher::begin({setup_matcher, if_matcher}); + + auto second_result = match(second_matcher, elt->entries.at(1).condition); + if (!second_result.matched) { + return nullptr; + } + + auto in1 = *first_result.maps.regs.at(reg_input_1); + auto in2 = *second_result.maps.regs.at(reg_input_2); + auto in3 = *second_result.maps.regs.at(reg_input_3); + + auto in_name = in1.to_string(env); + if (in_name != in2.to_string(env)) { + return nullptr; + } + + if (in_name != in3.to_string(env)) { + return nullptr; + } + + auto temp_name = second_result.maps.regs.at(reg_temp_1)->to_string(env); + if (temp_name != second_result.maps.regs.at(reg_temp_2)->to_string(env)) { + return nullptr; + } + + if (temp_name != second_result.maps.regs.at(reg_temp_3)->to_string(env)) { + return nullptr; + } + + const auto& temp_use_def = env.get_use_def_info(*second_result.maps.regs.at(reg_temp_1)); + if (temp_use_def.use_count() != 2 || temp_use_def.def_count() != 1) { + return nullptr; + } + + // modify use def: + auto* menv = const_cast(&env); + menv->disable_use(in2); + menv->disable_use(in3); + + auto repopped = stack.pop_reg(in1, {}, env, true); + // fmt::print("repopped: {}\n", repopped->to_string(env)); + + if (!repopped) { + repopped = var_to_form(in1, pool); + } + + return pool.alloc_element( + GenericOperator::make_function( + pool.alloc_single_element_form(nullptr, "handle->process")), + repopped); + + return nullptr; +} + void ShortCircuitElement::push_to_stack(const Env& env, FormPool& pool, FormStack& stack) { mark_popped(); if (!used_as_value.value_or(false)) { @@ -2678,8 +2842,14 @@ void ShortCircuitElement::push_to_stack(const Env& env, FormPool& pool, FormStac } } + FormElement* to_push = this; + auto as_handle_get = sc_to_handle_get_proc(this, env, pool, stack); + if (as_handle_get) { + to_push = as_handle_get; + } + assert(used_as_value.has_value()); - stack.push_value_to_reg(final_result, pool.alloc_single_form(nullptr, this), true, + stack.push_value_to_reg(final_result, pool.alloc_single_form(nullptr, to_push), true, env.get_variable_type(final_result, false)); already_rewritten = true; } @@ -3844,39 +4014,6 @@ Form* is_load_store_vector_to_reg(const Register& reg, return mr.maps.forms.at(0); } -/*! - * Imagine: - * x = foo - * { // some macro/inlined thing - * read from x - * return x; - * } - * - * and you want to transform it to - * x = some_macro(foo, blah, ...) - * - * this will get you foo (and pop it from the stack), assuming the stack is sitting right after the - * point where the inline thing evaluated foo. - * - * For later book-keeping of reg use, if it gets you something new, it will set found_orig_out, - * and also give you the regaccess for the x of the x = foo. - * - * If you use this, you are responsible for adding code that sets x again. - */ -Form* repop_passthrough_arg(Form* in, - FormStack& stack, - const Env& env, - RegisterAccess* orig_out, - bool* found_orig_out) { - *found_orig_out = false; - - auto as_atom = form_as_atom(in); - if (as_atom && as_atom->is_var()) { - return stack.pop_reg(as_atom->var().reg(), {}, env, true, -1, orig_out, found_orig_out); - } - return in; -} - /*! * Try to convert a form to a regaccess. */ diff --git a/decompiler/IR2/GenericElementMatcher.cpp b/decompiler/IR2/GenericElementMatcher.cpp index f8251e2bff..d054ef5965 100644 --- a/decompiler/IR2/GenericElementMatcher.cpp +++ b/decompiler/IR2/GenericElementMatcher.cpp @@ -137,6 +137,14 @@ Matcher Matcher::set(const Matcher& dst, const Matcher& src) { return m; } +Matcher Matcher::set_var(const Matcher& src, int dst_match_id) { + Matcher m; + m.m_kind = Kind::SET_VAR; + m.m_sub_matchers = {src}; + m.m_reg_out_id = dst_match_id; + return m; +} + Matcher Matcher::while_loop(const Matcher& condition, const Matcher& body) { Matcher m; m.m_kind = Kind::WHILE_LOOP; @@ -151,6 +159,13 @@ Matcher Matcher::any_constant_token(int match_id) { return m; } +Matcher Matcher::begin(const std::vector& elts) { + Matcher m; + m.m_kind = Kind::BEGIN; + m.m_sub_matchers = elts; + return m; +} + bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const { switch (m_kind) { case Kind::ANY: @@ -527,6 +542,38 @@ bool Matcher::do_match(Form* input, MatchResult::Maps* maps_out) const { return true; } break; + case Kind::BEGIN: { + if ((int)m_sub_matchers.size() != input->size()) { + return false; + } + + for (int i = 0; i < input->size(); i++) { + Form fake; + fake.elts().push_back(input->elts().at(i)); + if (!m_sub_matchers.at(i).do_match(&fake, maps_out)) { + return false; + } + } + return true; + } + + case Kind::SET_VAR: { + auto as_set = dynamic_cast(input->try_as_single_active_element()); + if (!as_set) { + return false; + } + + if (!m_sub_matchers.at(0).do_match(as_set->src(), maps_out)) { + return false; + } + + if (m_reg_out_id != -1) { + maps_out->regs.resize(std::max((int)maps_out->regs.size(), m_reg_out_id + 1)); + maps_out->regs.at(m_reg_out_id) = as_set->dst(); + } + return true; + } + default: assert(false); return false; diff --git a/decompiler/IR2/GenericElementMatcher.h b/decompiler/IR2/GenericElementMatcher.h index be1ecd65c5..9294f5bd86 100644 --- a/decompiler/IR2/GenericElementMatcher.h +++ b/decompiler/IR2/GenericElementMatcher.h @@ -28,7 +28,8 @@ class Matcher { static Matcher any_label(int match_id = -1); static Matcher op(const GenericOpMatcher& op, const std::vector& args); static Matcher op_with_rest(const GenericOpMatcher& op, const std::vector& args); - static Matcher set(const Matcher& dst, const Matcher& src); + static Matcher set(const Matcher& dst, const Matcher& src); // form-form + static Matcher set_var(const Matcher& src, int dst_match_id); // var-form static Matcher fixed_op(FixedOperatorKind op, const std::vector& args); static Matcher match_or(const std::vector& args); static Matcher cast(const std::string& type, Matcher value); @@ -49,6 +50,7 @@ class Matcher { static Matcher while_loop(const Matcher& condition, const Matcher& body); static Matcher any_constant_token(int match_id = -1); static Matcher or_expression(const std::vector& elts); + static Matcher begin(const std::vector& elts); enum class Kind { ANY_REG, // matching any register @@ -63,6 +65,7 @@ class Matcher { ANY_SYMBOL, DEREF_OP, SET, + SET_VAR, ANY_LABEL, SYMBOL, IF_WITH_ELSE, @@ -70,6 +73,7 @@ class Matcher { WHILE_LOOP, ANY_CONSTANT_TOKEN, SC_OR, + BEGIN, INVALID }; diff --git a/decompiler/IR2/IR2_common.h b/decompiler/IR2/IR2_common.h index d807365c83..a670d554a2 100644 --- a/decompiler/IR2/IR2_common.h +++ b/decompiler/IR2/IR2_common.h @@ -151,6 +151,7 @@ enum class FixedOperatorKind { VECTOR_PLUS, VECTOR_MINUS, VECTOR_FLOAT_PRODUCT, + L32_NOT_FALSE_CBOOL, INVALID }; diff --git a/decompiler/analysis/atomic_op_builder.cpp b/decompiler/analysis/atomic_op_builder.cpp index a0d2ab86f1..3ebcad4490 100644 --- a/decompiler/analysis/atomic_op_builder.cpp +++ b/decompiler/analysis/atomic_op_builder.cpp @@ -723,6 +723,18 @@ std::unique_ptr convert_bnel_1(const Instruction& i0, int idx, bool li return make_branch_no_delay(condition, likely, dest, idx); } +std::unique_ptr convert_subu_1(const Instruction& i0, int idx) { + // subu a2, v1, s7 + if (i0.get_src(1).is_reg(rs7())) { + auto src = make_src_atom(i0.get_src(0).get_reg(), idx); + auto expr = SimpleExpression(SimpleExpression::Kind::SUBU_L32_S7, src); + auto dst = make_dst_var(i0.get_dst(0).get_reg(), idx); + return std::make_unique(dst, expr, idx); + } else { + return nullptr; // go to asm fallback + } +} + std::unique_ptr convert_1(const Instruction& i0, int idx, bool hint_inline_asm) { switch (i0.kind) { case InstructionKind::OR: @@ -856,6 +868,8 @@ std::unique_ptr convert_1(const Instruction& i0, int idx, bool hint_in return convert_beql_1(i0, idx, true); case InstructionKind::BNEL: return convert_bnel_1(i0, idx, true); + case InstructionKind::SUBU: + return convert_subu_1(i0, idx); // may fail default: return nullptr; } diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index cd70594a9c..a3c9285636 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -594,10 +594,17 @@ (defenum entity-perm-status :bitfield #t :type uint16 + (bit-0 0) (bit-1 1) (dead 2) - (unknown 5) ;; TODO - task-control::task-cstage::14 - (complete 6)) + (bit-3 3) + (bit-4 4) + (user-set-from-cstage 5) + (complete 6) ;; wrong! + (bit-7 7) + (real-complete 8) + (bit-9 9) + ) (defenum path-control-flag :bitfield #t @@ -624,7 +631,6 @@ (need-reminder 5) (need-reward-speech 6) (need-resolution 7) - (*unknown* 999999) ) (defenum game-task @@ -749,6 +755,189 @@ (*unknown* 255)) +(defenum game-text-id + :type uint32 + :bitfield #f + (zero 0) + (sfx-volume #x10a) + (music-volume #x10b) + (speech-volume #x10c) + (language #x10d) + (vibrations #x10e) + (play-hints #x10f) + (center-screen #x110) + (english #x114) + (french #x115) + (german #x116) + (spanish #x117) + (italian #x118) + (japanese #x119) + (aspect-ratio #x125) + (video-mode #x126) + (game-options #x127) + (graphic-options #x128) + (sound-options #x129) + + (hidden-power-cell #x12f) ;; why is this here?? + + (continue-without-saving #x13f) + (back #x13e) + (load-game #x14b) + (save-game #x14c) + (options #x150) + (new-game #x15c) + (ok #x15e) + (exit-demo #x15f) + (quit-game #x16f) + + (village1-mayor-money #x200) + (vollage1-uncle-money #x201) + (village1-yakow-herd #x202) + (village1-yakow-return #x203) + (village1-oracle #x204) + (beach-ecorocks #x205) + (beach-flutflut-push #x206) + (beach-flutflut-meet #x207) + (beach-pelican #x208) + (beach-seagull #x209) + (beach-cannon #x20a) + (beach-buzzer #x20b) + (jungle-lurkerm-connect #x20c) + (jungle-tower #x20d) + (jungle-eggtop #x20e) + (jungle-plant #x20f) + (jungle-fishgame #x210) + (misty-muse-catch #x211) + (misty-muse-return #x212) + (misty-boat #x213) + (misty-cannon #x214) + (misty-return-to-pool #x215) ;; task name?? + (misty-find-transpad #x216) ;; task name? + (misty-balloon-lurkers #x217) + + (village1-level-name #x220) + (beach-level-name #x221) + (jungle-level-name #x222) + (misty-level-name #x223) + + (beach-seagull-get #x22e) + + (jungle-lurkerm-unblock #x22f) + (jungle-lurkerm-return #x230) + + (MISSING-orb-hint #x233) + + (beach-gimmie #x262) + (beach-sentinel #x263) + (jungle-canyon-end #x264) + (jungle-temple-door #x265) + (misty-bike-jump #x266) + (misty-eco-challenge #x267) + + (village2-gambler-money #x300) + (village2-geologist-money #x301) + (village2-warrior-money #x302) + (village2-oracle-money #x303) + (swamp-tether #x304) + + (swamp-flutflut #x307) + + (swamp-billy #x309) + + (sunken-elevator-raise #x30a) + (sunken-elevator-get-to-roof #x30b) + (sunken-pipe #x30c) + (sunken-climb-tube #x30d) ;; task name? + (sunken-pool #x30e) ;; task name? + (sunken-platforms #x30f) + + (rolling-moles #x310) + (rolling-moles-return #x311) + (rolling-robbers #x312) + (rolling-race #x313) + (rolling-race-return #x314) + (rolling-lake #x315) + (rolling-plants #x316) + + (unknown-buzzers #x317) + + (village2-level-name #x319) + + (rolling-level-name #x31b) + (swamp-level-name #x31c) + (sunken-level-name #x31d) + (ogre-level-name #x31e) + + (swamp-battle #x321) + (sunken-bottom #x322) ;; task name? + (reach-center #x323) ;; task name? + (rolling-ring-chase-1 #x324) + (rolling-ring-chase-2 #x325) + + (village3-miner-money #x400) + (village3-oracle-money #x401) + (snow-ram-3-left #x402) + (snow-ram-2-left #x403) + (snow-ram-1-left #x404) + (snow-fort #x405) + (snow-bunnies #x406) + (snow-open-door #x408) ;; task name? + + (cave-robot-climb #x40e) + (cave-dark-climb #x40f) ;; destroy crystals + + (cave-gnawers #x410) + (cave-dark-crystals #x411) + + (village3-buzzer #x413) + + (village3-level-name #x415) + + (snowy-level-name #x417) + + (cave-level-name #x419) + + (lavatube-level-name #x41b) + + (snow-eggtop #x421) + + (cave-spider-tunnel #x423) + (cave-platforms #x424) + + (cave-swing-poles #x426) + + (snow-frozen-crate #x42b) ;; task name? + (snow-bumpers #x42c) + + (fire-canyon-end #x500) + (fire-canyon-buzzer #x501) + + (fire-canyon-level-name #x50c) + + (ogre-end #x600) + (ogre-buzzer #x601) + (ogre-boss #x603) + + (lavatube-end #x700) + (lavatube-buzzer #x701) + + (citadel-buzzer #x800) + (citadel-level-name #x801) + (citadel-sage-blue #x802) + (citadel-sage-red #x803) + (citadel-sage-yellow #x804) + (citadel-sage-green #x805) + + (training-gimmie-task-name #x91b) + (training-buzzer-task-name #x91c) + (training-door-task-name #x91d) + (training-climb-task-name #x91e) + (training-level-name #x91f) + + (inc #xf10) + (europe #xf11) + ) + ;; ---------------------- ;; File - gstring-h ;; Source Path - kernel/gstring-h.gc @@ -1374,7 +1563,7 @@ (get-bit (_type_ int) symbol 9) (clear-bit (_type_ int) int 10) (set-bit (_type_ int) int 11) - (clear (_type_) _type_ 12) + (clear-all! (_type_) _type_ 12) ) ) @@ -1921,7 +2110,7 @@ ) (deftype border-plane (basic) - ((name basic :offset-assert 4) + ((name symbol :offset-assert 4) (action basic :offset-assert 8) (slot int8 :offset-assert 12) (trans vector :inline :offset-assert 16) @@ -1931,8 +2120,8 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) + (debug-draw! (_type_) none 9) + (point-past-plane? (_type_ vector) symbol 10) ) ) @@ -5142,7 +5331,7 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (dummy-9 (_type_ uint symbol) string 9) + (lookup-text! (_type_ game-text-id symbol) string 9) ) ) @@ -8574,11 +8763,11 @@ ) (deftype continue-point (basic) - ((name basic :offset-assert 4) + ((name string :offset-assert 4) (level basic :offset-assert 8) (flags uint32 :offset-assert 12) (trans vector :inline :offset-assert 16) - (quat vector :inline :offset-assert 32) + (quat quaternion :inline :offset-assert 32) (camera-trans vector :inline :offset-assert 48) (camera-rot float 9 :offset-assert 64) (load-commands pair :offset-assert 100) @@ -8592,11 +8781,12 @@ :size-assert #x7c :flag-assert #xa0000007c (:methods - (dummy-9 () none 9) + (debug-draw! (_type_) none 9) ) ) (declare-type entity-perm structure) +(declare-type game-save basic) (declare-type entity-perm-array basic) (deftype game-info (basic) ((mode symbol :offset-assert 4) @@ -8614,7 +8804,7 @@ (current-continue continue-point :offset-assert 108) (text-ids-seen bit-array :offset-assert 112) (level-opened uint8 32 :offset-assert 116) - (hint-control array :offset-assert 148) + (hint-control (array level-hint-control) :offset-assert 148) (task-hint-control array :offset-assert 152) (total-deaths int32 :offset-assert 156) (continue-deaths int32 :offset-assert 160) @@ -8624,9 +8814,9 @@ (death-time uint64 :offset-assert 184) (hit-time uint64 :offset-assert 192) (fuel-cell-pickup-time uint64 :offset-assert 200) - (fuel-cell-time array :offset-assert 208) - (enter-level-time array :offset-assert 212) - (in-level-time array :offset-assert 216) + (fuel-cell-time (array uint64) :offset-assert 208) + (enter-level-time (array uint64) :offset-assert 212) + (in-level-time (array uint64) :offset-assert 216) (blackout-time uint64 :offset-assert 224) (letterbox-time uint64 :offset-assert 232) (hint-play-time uint64 :offset-assert 240) @@ -8634,7 +8824,7 @@ (display-text-handle uint64 :offset-assert 256) (death-movie-tick int32 :offset-assert 264) (want-auto-save symbol :offset-assert 268) - (auto-save-proc uint64 :offset-assert 272) + (auto-save-proc handle :offset-assert 272) (auto-save-status uint32 :offset-assert 280) (auto-save-card int32 :offset-assert 284) (auto-save-which int32 :offset-assert 288) @@ -8649,26 +8839,26 @@ :flag-assert #x1d00000144 ;; field dummy is a basic loaded with a signed load (:methods - (dummy-9 (_type_ symbol symbol string) none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) - (dummy-12 () none 12) - (dummy-13 (_type_ uint) entity-perm 13) ; TODO - not totally confirmed - (dummy-14 (_type_) none 14) - (dummy-15 (_type_) none 15) - (dummy-16 () none 16) - (dummy-17 (_type_) continue-point 17) - (dummy-18 () none 18) - (dummy-19 (_type_ continue-point) none 19) - (dummy-20 () none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) - (dummy-23 () none 23) + (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_ uint) 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_ game-text-id) symbol 21) + (mark-text-as-seen (_type_ game-text-id) none 22) + (got-buzzer? (_type_ game-task int) symbol 23) (dummy-24 () none 24) - (dummy-25 () none 25) - (dummy-26 () none 26) - (dummy-27 () none 27) - (dummy-28 () none 28) + (load-game! (_type_ game-save) game-save 25) + (clear-text-seen! (_type_ game-text-id) none 26) + (get-death-count (_type_ symbol) int 27) + (get-health-percent-lost (_type_) float 28) ) ) @@ -9394,7 +9584,7 @@ (:methods (new (symbol type process pickup-type float) _type_ 0) (dummy-9 () none 9) - (dummy-10 (_type_ symbol) none 10) + (reset! (_type_ symbol) none 10) (dummy-11 (_type_) float 11) ) ) @@ -12582,14 +12772,14 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (dummy-9 () none 9) + (update-perm! (_type_ symbol entity-perm-status) _type_ 9) ) ) (deftype entity-links (structure) ((prev-link entity-links :offset-assert 0) (next-link entity-links :offset-assert 4) - (entity basic :offset-assert 8) + (entity entity :offset-assert 8) (process process :offset-assert 12) (level level :offset-assert 16) (vis-id int32 :offset-assert 20) @@ -12615,7 +12805,7 @@ ) (deftype entity-links-array (inline-array-class) - () + ((data entity-links :inline :dynamic :offset-assert 16)) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 @@ -13702,8 +13892,8 @@ ) (deftype task-info-data (basic) - ((task-id uint8 :offset-assert 4) - (task-name symbol 4 :offset-assert 8) + ((task-id game-task :offset-assert 4) + (task-name game-text-id 4 :offset-assert 8) (text-index-when-resolved int32 :offset-assert 24) ) :method-count-assert 9 @@ -13712,7 +13902,7 @@ ) (deftype level-tasks-info (basic) - ((level-name-id uint32 :offset-assert 4) + ((level-name-id game-text-id :offset-assert 4) (text-group-index int32 :offset-assert 8) (nb-of-tasks int32 :offset-assert 12) (buzzer-task-index int32 :offset-assert 16) @@ -13725,7 +13915,7 @@ (deftype game-option (basic) ((option-type uint64 :offset-assert 8) - (name uint32 :offset-assert 16) + (name game-text-id :offset-assert 16) (scale basic :offset-assert 20) (param1 float :offset-assert 24) (param2 float :offset-assert 28) @@ -15880,11 +16070,11 @@ ;; - Unknowns ;;(define-extern *global-toggle* object) ;; unknown type -;;(define-extern *part-id-table* object) ;; unknown type +(define-extern *part-id-table* (array sparticle-launcher)) ;; unknown type ;;(define-extern *particle-300hz-timer* object) ;; unknown type ;;(define-extern *sp-launch-queue* object) ;; unknown type ;;(define-extern *death-adgif* object) ;; unknown type -;;(define-extern *part-group-id-table* object) ;; unknown type +(define-extern *part-group-id-table* (array sparticle-launch-group)) ;;(define-extern *sp-launcher-lock* object) ;; unknown type ;;(define-extern *sp-launcher-enable* object) ;; unknown type ;;(define-extern *particle-adgif-cache* object) ;; unknown type @@ -15959,7 +16149,7 @@ (define-extern ja-channel-push! (function int int int)) (define-extern ja-channel-set! (function int int)) -(define-extern kill-current-level-hint function) +(define-extern kill-current-level-hint (function pair pair symbol none)) (define-extern level-hint-surpress! function) (define-extern ja-aframe-num (function int float)) (define-extern ja-abort-spooled-anim function) @@ -15988,24 +16178,32 @@ ;; - Types +(defenum task-flags + :type uint8 + :bitfield #t + (closed 0) + (has-entity 1) + (closed-by-default 2) + ) + (declare-type task-control basic) (deftype task-cstage (structure) ((game-task game-task :offset-assert 0) (status task-status :offset-assert 8) - (flags uint8 :offset-assert 16) + (flags task-flags :offset-assert 16) (condition (function task-control symbol) :offset-assert 20) ) :method-count-assert 16 :size-assert #x18 :flag-assert #x1000000018 (:methods - (get-game-task (_type_) uint 9) - (get-task-status (_type_) uint 10) - (TODO-RENAME-11 (_type_ task-control) symbol 11) - (first-flag-bit? (_type_) symbol 12) - (third-flag-bit? (_type_) symbol 13) - (TODO-RENAME-14 (_type_) int 14) - (clear-all-but-first-flag-bit (_type_) int 15) + (get-game-task (_type_) game-task 9) + (get-task-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) ) ) @@ -16020,13 +16218,13 @@ (current-task (_type_) int 9) (current-status (_type_) int 10) (close-current! (_type_) none 11) - (close-status! (_type_ int) int 12) + (close-status! (_type_ task-status) int 12) (first-any (_type_ symbol) int 13) (reset! (_type_ symbol symbol) int 14) - (closed? (_type_ int int) symbol 15) + (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_ int int) symbol 18) + (exists? (_type_ game-task task-status) symbol 18) ) ) @@ -16123,20 +16321,20 @@ ;; - Functions -(define-extern get-task-control (function int task-control)) -(define-extern level-hint-spawn function) -(define-extern get-game-count function) -(define-extern activate-orb-all function) -(define-extern close-specific-task! (function task-control int int)) -(define-extern reset-all-hint-controls function) -(define-extern reset-actors function) +(define-extern get-task-control (function game-task task-control)) +(define-extern level-hint-spawn (function game-text-id string symbol process-tree int 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 int)) +(define-extern reset-all-hint-controls (function none)) +(define-extern reset-actors (function symbol none)) (define-extern set-blackout-frames (function int uint)) (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 int string)) -(define-extern trsq->continue-point function) +(define-extern game-task->string (function game-task string)) +(define-extern trsq->continue-point (function trsq none)) ;; - Symbols @@ -16145,9 +16343,8 @@ ;; - Unknowns -;;(define-extern *level-task-data-remap* object) ;; unknown type (define-extern *spawn-actors* symbol) -(define-extern *default-continue* symbol) +(define-extern *default-continue* continue-point) ;; ---------------------- @@ -16158,57 +16355,105 @@ ;; - Types -; (deftype game-save-tag (structure) -; ((user-object UNKNOWN 2 :offset-assert 0) -; (user-uint64 uint64 :offset-assert 0) -; (user-float0 float :offset-assert 0) -; (user-float UNKNOWN 2 :offset-assert 0) -; (user-int32 UNKNOWN 2 :offset-assert 0) -; (user-uint32 UNKNOWN 2 :offset-assert 0) -; (user-int16 UNKNOWN 4 :offset-assert 0) -; (user-uint16 UNKNOWN 4 :offset-assert 0) -; (user-int8 UNKNOWN 8 :offset-assert 0) -; (user-int80 int8 :offset-assert 0) -; (user-int81 int8 :offset-assert 1) -; (user-uint8 UNKNOWN 8 :offset-assert 0) -; (elt-count int32 :offset-assert 8) -; (elt-size uint16 :offset-assert 12) -; (elt-type uint16 :offset-assert 14) -; ) -; :method-count-assert 9 -; :size-assert #x10 -; :flag-assert #x900000010 -; ) +(defenum game-save-elt + :type uint16 + (name 100) + (base-time 101) + (real-time 102) + (game-time 103) + (integral-time 104) + (continue 200) + (life 201) + (money 202) + (money-total 203) + (moeny-per-level 204) + (buzzer-total 205) + (fuel-cell 206) + (death-movie-tick 207) + (task-list 300) + (perm-list 301) + (hint-list 303) + (text-list 304) + (level-open-list 305) + (total-deaths 400) + (continue-deaths 401) + (fuel-cell-deaths 402) + (game-start-time 403) + (continue-timke 404) ;; typo in game + (death-time 405) + (hit-time 406) + (fuel-cell-pickup-time 407) + (continue-time 408) + (fuel-cell-time 409) + (enter-level-time 410) + (deaths-per-level 411) + (death-pos 412) + (auto-save-count 413) + (in-level-time 414) + (sfx-volume 500) + (music-volume 501) + (dialog-volume 502) + (language 503) + (screenx 504) + (screeny 505) + (vibration 506) + (play-hints 507) + (video-mode 508) + (aspect-ratio 509) + ) -; (deftype game-save (basic) -; ((version int32 :offset-assert 4) -; (allocated-length int32 :offset-assert 8) -; (length int32 :offset-assert 12) -; (info-int32 UNKNOWN 16 :offset-assert 16) -; (info-int8 UNKNOWN 64 :offset-assert 16) -; (level-index int32 :offset-assert 16) -; (fuel-cell-count float :offset-assert 20) -; (money-count float :offset-assert 24) -; (buzzer-count float :offset-assert 28) -; (completion-percentage float :offset-assert 32) -; (minute uint8 :offset-assert 36) -; (hour uint8 :offset-assert 37) -; (week uint8 :offset-assert 38) -; (day uint8 :offset-assert 39) -; (month uint8 :offset-assert 40) -; (year uint8 :offset-assert 41) -; (new-game int32 :offset-assert 44) -; (tag UNKNOWN :dynamic :offset-assert 80) -; ) -; :method-count-assert 12 -; :size-assert #x50 -; :flag-assert #xc00000050 -; (:methods -; (dummy-9 () none 9) -; (dummy-10 () none 10) -; (dummy-11 () none 11) -; ) -; ) +(deftype game-save-tag (structure) + ((user-object object 2 :offset-assert 0) + (user-uint64 uint64 :offset 0) + (user-float0 float :offset 0) + (user-float float 2 :offset 0) + (user-int32 int32 2 :offset 0) + (user-uint32 uint32 2 :offset 0) + (user-int16 int16 4 :offset 0) + (user-uint16 uint16 4 :offset 0) + (user-int8 int8 8 :offset 0) + (user-int80 int8 :offset 0) + (user-int81 int8 :offset 1) + (user-uint8 uint8 8 :offset 0) + (elt-count int32 :offset-assert 8) + (elt-size uint16 :offset-assert 12) + (elt-type game-save-elt :offset-assert 14) + ) + :method-count-assert 9 + :size-assert #x10 + :flag-assert #x900000010 + ) + +(deftype game-save (basic) + ((version int32 :offset-assert 4) + (allocated-length int32 :offset-assert 8) + (length int32 :offset-assert 12) + (info-int32 int32 16 :offset-assert 16) + (info-int8 int8 64 :offset 16) + (level-index int32 :offset 16) + (fuel-cell-count float :offset 20) + (money-count float :offset 24) + (buzzer-count float :offset 28) + (completion-percentage float :offset 32) + (minute uint8 :offset 36) + (hour uint8 :offset 37) + (week uint8 :offset 38) + (day uint8 :offset 39) + (month uint8 :offset 40) + (year uint8 :offset 41) + (new-game int32 :offset 44) + (tag game-save-tag :inline :dynamic :offset-assert 80) + ) + :method-count-assert 12 + :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) + ) + ) (deftype auto-save (process) ((card int32 :offset-assert 112) @@ -16248,19 +16493,19 @@ (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 task-control int)) +(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) -(define-extern game-save-elt->string function) -(define-extern progress-level-index->string function) +(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) (define-extern auto-save-check function) ;; - Unknowns -;;(define-extern *auto-save-info* object) ;; unknown type +(define-extern *auto-save-info* mc-slot-info) ;; unknown type ;;(define-extern scf-get-time object) ;; unknown type -;;(define-extern *level-task-data* object) ;; unknown type +;; ;; unknown type ;; ---------------------- @@ -18232,7 +18477,7 @@ (define-extern hide-bottom-hud function) (define-extern ambient-hint-init-by-other function) (define-extern level-hint-process-cmd function) -(define-extern task-known? (function task-control symbol)) +(define-extern task-known? (function game-task symbol)) (define-extern can-grab-display? function) (define-extern level-hint-displayed? function) (define-extern ambient-inspect function) @@ -18890,7 +19135,7 @@ (define-extern target-hit-push function) (define-extern velocity-set-to-target! function) (define-extern start-sequence-a function) -(define-extern task-closed? (function int int symbol)) +(define-extern task-closed? (function game-task task-status symbol)) (define-extern next-level function) ;; - Unknowns @@ -19803,15 +20048,15 @@ ;; - Functions -(define-extern task-status->string (function int string)) -(define-extern open-specific-task! (function task-control int int)) -(define-extern task-exists? (function task-control int symbol)) +(define-extern task-status->string (function task-status string)) +(define-extern open-specific-task! (function game-task task-status int)) +(define-extern task-exists? (function game-task task-status symbol)) (define-extern sages-kidnapped? (function symbol)) ;; - Symbols (define-extern *null-task-control* task-control) -(define-extern *task-controls* (array task-control)) +(define-extern *task-controls* (array basic)) (define-extern *assistant-tasks* task-control) (define-extern *assistant-village2-tasks* task-control) (define-extern *gambler-tasks* task-control) @@ -20357,28 +20602,30 @@ ;; Containing DGOs - ['GAME', 'ENGINE'] ;; Version - 3 -;; - Unknowns +;; - Symbols -;;(define-extern *main-options* object) ;; unknown type -;;(define-extern *title* object) ;; unknown type -;;(define-extern *options* object) ;; unknown type -;;(define-extern *main-options-demo* object) ;; unknown type -;;(define-extern *main-options-demo-shared* object) ;; unknown type -;;(define-extern *game-options* object) ;; unknown type -;;(define-extern *game-options-japan* object) ;; unknown type -;;(define-extern *game-options-demo* object) ;; unknown type -;;(define-extern *graphic-options* object) ;; unknown type -;;(define-extern *graphic-title-options-pal* object) ;; unknown type -;;(define-extern *sound-options* object) ;; unknown type -;;(define-extern *yes-no-options* object) ;; unknown type -;;(define-extern *ok-options* object) ;; unknown type -;;(define-extern *load-options* object) ;; unknown type -;;(define-extern *save-options* object) ;; unknown type -;;(define-extern *save-options-title* object) ;; unknown type -;;(define-extern *options-remap* object) ;; unknown type -;;(define-extern *language-name-remap* object) ;; unknown type -;;(define-extern *task-egg-starting-x* object) ;; unknown type -;;(define-extern *game-counts* object) ;; unknown type +(define-extern *main-options* (array game-option)) +(define-extern *title* (array game-option)) +(define-extern *options* (array game-option)) +(define-extern *main-options-demo* (array game-option)) +(define-extern *main-options-demo-shared* (array game-option)) +(define-extern *game-options* (array game-option)) +(define-extern *game-options-japan* (array game-option)) +(define-extern *game-options-demo* (array game-option)) +(define-extern *graphic-options* (array game-option)) +(define-extern *graphic-title-options-pal* (array game-option)) +(define-extern *sound-options* (array game-option)) +(define-extern *yes-no-options* (array game-option)) +(define-extern *ok-options* (array game-option)) +(define-extern *load-options* (array game-option)) +(define-extern *save-options* (array game-option)) +(define-extern *save-options-title* (array game-option)) +(define-extern *options-remap* (array array)) +(define-extern *language-name-remap* (array game-text-id)) +(define-extern *task-egg-starting-x* (array int32)) +(define-extern *game-counts* game-count-info) +(define-extern *level-task-data-remap* (array int32)) +(define-extern *level-task-data* (array level-tasks-info)) ;; ---------------------- diff --git a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc index f234270d70..329d1f9d97 100644 --- a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc @@ -505,5 +505,9 @@ [496, "(function task-control symbol)"] ], + "game-info": [ + [17, "(function symbol symbol continue-point symbol none)"] + ], + "placeholder-do-not-add-below": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/hacks.jsonc b/decompiler/config/jak1_ntsc_black_label/hacks.jsonc index 716522a929..e6ee7b4cdc 100644 --- a/decompiler/config/jak1_ntsc_black_label/hacks.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/hacks.jsonc @@ -471,7 +471,8 @@ "(method 12 level)", "update-sound-banks", "(method 16 level-group)", - "bg" + "bg", + "(method 18 game-info)" ], // If format is used with the wrong number of arguments, diff --git a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc index 70e1c6db78..0efed7e8f1 100644 --- a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc @@ -584,7 +584,7 @@ ], "task-control": [ - ["L634", "(array task-control)", true], + ["L634", "(array basic)", true], ["L1322", "task-control", true], ["L1297", "task-control", true], ["L1103", "task-control", true], @@ -1092,6 +1092,44 @@ ["L560", "_lambda_", true] ], + "game-info": [ + ["L466", "float", true], + ["L467", "float", true], + ["L468", "rgba", true], + ["L470", "rgba", true], + ["L185", "float", true], + ["L186", "float", true], + ["L191", "float", true], + ["L183", "continue-point", true], + ["L154", "_lambda_", true], + ["L464", "vector2h", true], + ["L469", "rgba", true] + ], + + "progress-static": [ + ["L2", "(array int32)", true], + ["L3", "(array level-tasks-info)", true], + ["L121", "(array game-text-id)", true], + ["L122", "(array int32)", true], + ["L123", "(array array)", true], + ["L124", "(array game-option)", true], + ["L131", "(array game-option)", true], + ["L137", "(array game-option)", true], + ["L143", "(array game-option)", true], + ["L145", "(array game-option)", true], + ["L147", "(array game-option)", true], + ["L152", "(array game-option)", true], + ["L157", "(array game-option)", true], + ["L161", "(array game-option)", true], + ["L165", "(array game-option)", true], + ["L169", "(array game-option)", true], + ["L174", "(array game-option)", true], + ["L180", "(array game-option)", true], + ["L185", "(array game-option)", true], + ["L190", "(array game-option)", true], + ["L195", "(array game-option)", true] + ], + // please do not add things after this entry! git is dumb. "object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc index a4c039f76e..7e873b3228 100644 --- a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc @@ -394,17 +394,20 @@ [32, "tracking-spline-sampler"] ], - "draw-ocean-transition": [ - [16, "sphere"] - ], - + "draw-ocean-transition": [[16, "sphere"]], + "(method 22 level)": [[16, "event-message-block"]], "(method 9 level)": [[16, "event-message-block"]], "(method 10 load-state)": [[16, "event-message-block"]], - + "draw-joint-spheres": [[16, "vector"]], - "(method 16 process-drawable)": [[16, "matrix"], [80, "matrix"], [144, "vector"], [160, "vector"]], - + "(method 16 process-drawable)": [ + [16, "matrix"], + [80, "matrix"], + [144, "vector"], + [160, "vector"] + ], + "draw-ocean-transition": [[16, "sphere"]], "(anon-function 494 task-control)": [[16, "event-message-block"]], @@ -440,5 +443,10 @@ "(anon-function 286 task-control)": [[16, "event-message-block"]], "(anon-function 227 task-control)": [[16, "event-message-block"]], "(anon-function 38 task-control)": [[16, "event-message-block"]], - "(anon-function 28 task-control)": [[16, "event-message-block"]] + "(anon-function 28 task-control)": [[16, "event-message-block"]], + "(method 10 border-plane)": [[16, "vector"]], + "(method 9 game-info)": [[16, "event-message-block"]], + "(method 9 continue-point)": [[16, "vector"]], + "(method 9 game-save)": [[16, "file-stream"]], + "(method 10 game-save)": [[16, "file-stream"]] } diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index 16f602aaaa..c8fe0394c0 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -46,12 +46,6 @@ [243, "gp", "(array basic)"] ], - // GKERNEL-H - "(method 2 handle)": [ - [10, "a2", "(pointer process)"], - [11, "a3", "process"] - ], - // GKERNEL "(method 0 cpu-thread)": [[[13, 28], "v0", "cpu-thread"]], @@ -814,6 +808,11 @@ [165, "v1", "symbol"] ], + "task-control-reset": [ + [[7, 13], "a0", "task-control"], + [[17, 21], "a0", "task-control"] + ], + "(anon-function 494 task-control)": [[32, "v0", "float"]], "(anon-function 493 task-control)": [[32, "v0", "float"]], "(anon-function 480 task-control)": [[13, "v0", "float"]], @@ -885,5 +884,68 @@ "(anon-function 38 task-control)": [[13, "v0", "float"]], "(anon-function 28 task-control)": [[13, "v0", "float"]], + "(method 18 game-info)": [ + [4, "v1", "symbol"], + [5, "v1", "level-load-info"], + [10, "s3", "continue-point"] + ], + + "(method 9 game-info)": [ + [[270, 286], "s2", "(function cpu-thread function object object object object pointer)"] + ], + + "(method 25 game-info)" :[ + [4, "v1", "game-save-tag"], + [53, "v1", "pointer"], + [[7, 53], "v1", "game-save-tag"], + [[72, 138], "s4", "game-save-tag"], + [154, "s4", "pointer"], + [[166, 205], "s4", "game-save-tag"], + [206, "s4", "pointer"], + [498, "s4", "pointer"], + [207, "a1", "(pointer uint8)"], + [[219, 220], "s4", "game-save-tag"], + [223, "s4", "pointer"], + [224, "a1", "(pointer uint8)"], + [[235, 236], "s4", "game-save-tag"], + [249, "s4", "pointer"], + [[261, 262], "s4", "game-save-tag"], + [275, "s4", "pointer"], + [293, "s4", "game-save-tag"], + [302, "s4", "pointer"], + [303, "a2", "(pointer uint8)"], + [315, "s4", "game-save-tag"], + [319, "s4", "pointer"], + [343, "v1", "(pointer uint8)"], + [352, "v1", "(pointer uint8)"], + [[360, 420], "s4", "game-save-tag"], + [423, "s4", "pointer"], + [424, "a1", "(pointer uint8)"], + [436, "s4", "game-save-tag"], + [440, "s4", "pointer"], + [456, "s4", "game-save-tag"], + [460, "s4", "pointer"], + [476, "s4", "game-save-tag"], + [480, "s4", "pointer"], + [[493, 495], "s4", "game-save-tag"] + ], + + "(method 11 game-save)": [ + [126, "v1", "pointer"], + [213, "s4", "pointer"], + [[74, 88], "s4", "game-save-tag"], + [98, "s4", "pointer"], + [107, "s4", "game-save-tag"], + [125, "s4", "(pointer uint8)"], + [131, "s4", "game-save-tag"], + [155, "s4", "game-save-tag"], + [148, "s4", "pointer"], + [172, "s4", "pointer"], + [179, "s4", "game-save-tag"], + [196, "s4", "pointer"], + [[203, 210], "s4", "game-save-tag"] + ], + + "placeholder-do-not-add-below": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc index feaa762df9..349e9e2a32 100644 --- a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc @@ -1253,15 +1253,15 @@ }, "texture-page-dir-inspect": { - "args":["dir", "mode"], + "args": ["dir", "mode"], "vars": { - "v1-0":"pool", - "s4-0":"level-idx", - "a1-3":"lev", - "s4-1":"entry-idx", - "s3-0":"entry-page", - "s2-0":"entry-link", - "s1-0":"entry-list-length" + "v1-0": "pool", + "s4-0": "level-idx", + "a1-3": "lev", + "s4-1": "entry-idx", + "s3-0": "entry-page", + "s2-0": "entry-link", + "s1-0": "entry-list-length" } }, @@ -2100,13 +2100,13 @@ "level-update-after-load": { "args": ["loaded-level", "level-login-state"], "vars": { - "s3-0":"level-drawable-trees", - "s5-0":"initial-timer", - "v1-4":"current-timer", - "v1-5":"elapsed-timer", - "s2-0":"current-login-pos", - "s2-1":["current-drawable", "drawable-tree"], - "s1-0":"idx-in-drawable" + "s3-0": "level-drawable-trees", + "s5-0": "initial-timer", + "v1-4": "current-timer", + "v1-5": "elapsed-timer", + "s2-0": "current-login-pos", + "s2-1": ["current-drawable", "drawable-tree"], + "s1-0": "idx-in-drawable" } }, @@ -2115,28 +2115,99 @@ "s3-0": ["conn", "connection"] } }, - + "(method 12 level)": { "vars": { "s5-3": ["s5-3", "pair"] } }, - + "update-sound-banks": { "vars": { "t0-0": ["t0-0", "symbol"] } }, - + "(method 16 level-group)": { "vars": { "s1-0": ["s1-0", "continue-point"] } }, - + "(method 20 level)": { "vars": { "s3-0": ["s3-0", "ramdisk-rpc-fill"] } + }, + + "(method 9 game-info)": { + "args": ["obj", "cause", "save-to-load", "continue-point-override"], + "vars": { + "v1-0": "selected-cause", + "s4-1": "lev-info" + } + }, + + "(method 10 game-info)": { + "args": ["obj", "item", "amount", "source"], + "vars": { + "v1-10":"proc", + "s4-1":"level-idx", + "a0-35":"buzz-task", + "s4-2":"buzz-index", + "f30-0":"buzz-count", + "s3-0":"ctrl", + "s5-2":"buzz-bits" + } + }, + + "(method 14 game-info)": { + "args":["obj", "lev"], + "vars": { + "s5-0":"perms", + "s4-0":"lev-entities", + "s3-0":"lev-entity-idx", + "s2-0":"lev-entity-perm", + "v1-8":"info-entity-perm" + } + }, + + "(method 15 game-info)": { + "args":["obj", "lev"], + "vars": { + "s5-0":"lev-entities", + "s4-0":"lev-entity-idx", + "s3-0":"lev-entity-perm", + "v1-7":"info-entity-perm" + } + }, + + "(method 25 game-info)": { + "args": ["obj", "save"], + "vars": { + "v1-0": ["save-data", "game-save-tag"], + "s4-0": ["data", "game-save-tag"], + "v1-9": "old-base-frame", + "v1-10": "frame-counter-diff" + } + }, + + "(method 10 game-save)": { + "args": ["obj", "filename"], + "vars": { + "s5-0": "stream", + "s3-0": "in-size", + "s4-0": "my-size" + } + }, + + "(method 11 game-save)": { + "args": ["obj", "detail"], + "vars": { + "s4-0": ["tag", "game-save-tag"], + "s3-0": "tag-idx", + "s2-1":"prog-lev-idx", + "a2-13":"lev-name" + } } } diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index 69a79581cf..cc562faad8 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -164,7 +164,11 @@ goos::Object decompile_at_label(const TypeSpec& type, } if (ts.tc(TypeSpec("array"), type)) { - return decompile_boxed_array(label, labels, words, ts, file); + std::optional content_type_spec; + if (type.has_single_arg()) { + content_type_spec = type.get_single_arg(); + } + return decompile_boxed_array(label, labels, words, ts, file, content_type_spec); } if (ts.tc(TypeSpec("structure"), type)) { @@ -522,10 +526,10 @@ goos::Object decompile_structure(const TypeSpec& type, } else if (word.kind == LinkedWord::EMPTY_PTR) { array_def.push_back(pretty_print::to_symbol("'()")); } else { - throw std::runtime_error( - fmt::format("Field {} in type {} offset {} did not have a proper reference for " - "array element {}", - field.name(), actual_type.print(), field.offset(), elt)); + throw std::runtime_error(fmt::format( + "Field {} in type {} offset {} did not have a proper reference for " + "array element {} k = {}", + field.name(), actual_type.print(), field.offset(), elt, (int)word.kind)); } } field_defs_out.emplace_back(field.name(), pretty_print::build_list(array_def)); @@ -715,7 +719,8 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label, const std::vector& labels, const std::vector>& words, const TypeSystem& ts, - const LinkedObjectFile* file) { + const LinkedObjectFile* file, + const std::optional& content_type_override) { TypeSpec content_type; auto type_ptr_word_idx = (label.offset / 4) - 1; if ((label.offset % 8) == 4) { @@ -737,6 +742,10 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label, throw std::runtime_error("Invalid alignment in decompile_boxed_array"); } + if (content_type_override) { + content_type = *content_type_override; + } + // now get the size auto& size_word_1 = words.at(label.target_segment).at(type_ptr_word_idx + 1); auto& size_word_2 = words.at(label.target_segment).at(type_ptr_word_idx + 2); @@ -1057,7 +1066,7 @@ std::string decompile_int_enum_from_int(const TypeSpec& type, const TypeSystem& } } throw std::runtime_error( - fmt::format("Failed to decompile integer enum. Value {} wasn't found in enum {}", value, - type_info->get_name())); + fmt::format("Failed to decompile integer enum. Value {} (0x{:x}) wasn't found in enum {}", + value, value, type_info->get_name())); } } // namespace decompiler diff --git a/decompiler/util/data_decompile.h b/decompiler/util/data_decompile.h index 0cd6eea5a4..782f71c88a 100644 --- a/decompiler/util/data_decompile.h +++ b/decompiler/util/data_decompile.h @@ -49,7 +49,8 @@ goos::Object decompile_boxed_array(const DecompilerLabel& label, const std::vector& labels, const std::vector>& words, const TypeSystem& ts, - const LinkedObjectFile* file); + const LinkedObjectFile* file, + const std::optional& content_type_override); goos::Object decompile_value(const TypeSpec& type, const std::vector& bytes, const TypeSystem& ts); diff --git a/goal_src/engine/camera/cam-interface-h.gc b/goal_src/engine/camera/cam-interface-h.gc index 4f9a22d671..9fc5bce14d 100644 --- a/goal_src/engine/camera/cam-interface-h.gc +++ b/goal_src/engine/camera/cam-interface-h.gc @@ -16,3 +16,5 @@ (define-perm *camera* camera-master #f) (define-perm *camera-combiner* camera-combiner #f) (define-perm *camera-orbit-target* process-drawable #f) + +(define-extern position-in-front-of-camera! (function vector float float vector)) \ No newline at end of file diff --git a/goal_src/engine/draw/drawable-ambient-h.gc b/goal_src/engine/draw/drawable-ambient-h.gc index 66ca1cec8c..ddfe663527 100644 --- a/goal_src/engine/draw/drawable-ambient-h.gc +++ b/goal_src/engine/draw/drawable-ambient-h.gc @@ -93,3 +93,6 @@ :flag-assert #x900002004 ) + +(define-extern kill-current-level-hint (function pair pair symbol none)) +(define-extern level-hint-spawn (function game-text-id string symbol process-tree int none)) \ No newline at end of file diff --git a/goal_src/engine/entity/entity-h.gc b/goal_src/engine/entity/entity-h.gc index 6ea2d5ef3c..17d6d84a3f 100644 --- a/goal_src/engine/entity/entity-h.gc +++ b/goal_src/engine/entity/entity-h.gc @@ -17,10 +17,17 @@ (defenum entity-perm-status :bitfield #t :type uint16 + (bit-0 0) (bit-1 1) (dead 2) - (unknown 5) ;; TODO - task-control::task-cstage::14 - (complete 6)) + (bit-3 3) + (bit-4 4) + (user-set-from-cstage 5) + (complete 6) + (bit-7 7) + (real-complete 8) + (bit-9 9) + ) ;; definition of type entity-perm (deftype entity-perm (structure) @@ -44,15 +51,15 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (dummy-9 () none 9) - ) + (update-perm! (_type_ symbol entity-perm-status) _type_ 9) + ) ) ;; definition of type entity-links (deftype entity-links (structure) ((prev-link entity-links :offset-assert 0) (next-link entity-links :offset-assert 4) - (entity basic :offset-assert 8) + (entity entity :offset-assert 8) (process process :offset-assert 12) (level level :offset-assert 16) (vis-id int32 :offset-assert 20) @@ -82,7 +89,8 @@ ;; definition of type entity-links-array (deftype entity-links-array (inline-array-class) - () + ((data entity-links :inline :dynamic :offset-assert 16) + ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 @@ -220,3 +228,5 @@ (defun-extern entity-by-name string entity) (defun-extern entity-by-type type entity-actor) (defun-extern entity-by-aid uint entity) +(define-extern reset-actors (function symbol none)) +(define-extern *spawn-actors* symbol) \ No newline at end of file diff --git a/goal_src/engine/entity/entity-table.gc b/goal_src/engine/entity/entity-table.gc index 1e4130d59b..e599c28a74 100644 --- a/goal_src/engine/entity/entity-table.gc +++ b/goal_src/engine/entity/entity-table.gc @@ -5,6 +5,18 @@ ;; name in dgo: entity-table ;; dgos: GAME, ENGINE +;; The *entity-info* table contains some simple information that can be used to +;; spawn a process for an entity. +;; :ptype the type of the process +;; :package the package that must be loaded (not used?) +;; :art-group the art that must be loaded +;; :pool the pool that the process should be allocated from +;; :heap-size the required size for the process heap + +;; At one point, this was much bigger, but got smaller between +;; the demo and final build. The entity info is possibly stored somewhere else +;; and this may not even be used. + (define *entity-info* (new 'static 'boxed-array :type entity-info :length 19 :allocated-length 19 (new 'static 'entity-info @@ -155,20 +167,24 @@ (the-as entity-info (cond ((nonzero? (-> arg0 method-table 13)) + ;; we already cached the type in the method table (-> arg0 method-table 13) ) (else + ;; search the table (let ((v1-1 *entity-info*)) (dotimes (a1-0 (-> v1-1 length)) (when (= arg0 (-> v1-1 a1-0 ptype)) - (set! - (-> arg0 method-table 13) + ;; found it, cache it in the method table + (set! (-> arg0 method-table 13) (the-as function (-> v1-1 a1-0)) ) (return (-> v1-1 a1-0)) ) ) ) + + ;; didn't find it, cache and return #f (set! (-> arg0 method-table 13) #f) #f ) diff --git a/goal_src/engine/game/fact-h.gc b/goal_src/engine/game/fact-h.gc index 6be19a8c80..5f1c4e9c7c 100644 --- a/goal_src/engine/game/fact-h.gc +++ b/goal_src/engine/game/fact-h.gc @@ -95,7 +95,7 @@ (:methods (new (symbol type process pickup-type float) _type_ 0) (dummy-9 () none 9) - (dummy-10 (_type_ symbol) none 10) + (reset! (_type_ symbol) none 10) (dummy-11 (_type_) float 11) ) ) @@ -230,7 +230,7 @@ "Create information about target. Not sure why this has stuff like pickup-type." (let ((obj (the-as fact-info-target ((method-of-type fact-info new) allocation type-to-make arg0 arg1 arg2)))) (set! (-> obj eco-source) (the-as uint #f)) - (dummy-10 obj #f) + (reset! obj #f) obj ) ) diff --git a/goal_src/engine/game/game-info-h.gc b/goal_src/engine/game/game-info-h.gc index 6f5d40c4c4..5e3130e27b 100644 --- a/goal_src/engine/game/game-info-h.gc +++ b/goal_src/engine/game/game-info-h.gc @@ -5,6 +5,130 @@ ; ;; name in dgo: game-info-h ; ;; dgos: GAME, ENGINE +;; List of each task in the game. +;; Each task has a task-control associated with it, see task-control.gc +(defenum game-task + :type uint8 + (none 0) + (complete 1) + (jungle-eggtop 2) + (jungle-lurkerm 3) + (jungle-tower 4) + (jungle-fishgame 5) + (jungle-plant 6) + (jungle-buzzer 7) + (jungle-canyon-end 8) + (jungle-temple-door 9) + (village1-yakow 10) + (village1-mayor-money 11) + (village1-uncle-money 12) + (village1-oracle-money1 13) + (village1-oracle-money2 14) + (beach-ecorocks 15) + (beach-pelican 16) + (beach-flutflut 17) + (beach-seagull 18) + (beach-cannon 19) + (beach-buzzer 20) + (beach-gimmie 21) + (beach-sentinel 22) + (misty-muse 23) + (misty-boat 24) + (misty-warehouse 25) + (misty-cannon 26) + (misty-bike 27) + (misty-buzzer 28) + (misty-bike-jump 29) + (misty-eco-challenge 30) + (village2-gambler-money 31) + (village2-geologist-money 32) + (village2-warrior-money 33) + (village2-oracle-money1 34) + (village2-oracle-money2 35) + (swamp-billy 36) + (swamp-flutflut 37) + (swamp-battle 38) + (swamp-tether-1 39) + (swamp-tether-2 40) + (swamp-tether-3 41) + (swamp-tether-4 42) + (swamp-buzzer 43) + (sunken-platforms 44) + (sunken-pipe 45) + (sunken-slide 46) + (sunken-room 47) + (sunken-sharks 48) + (sunken-buzzer 49) + (sunken-top-of-helix 50) + (sunken-spinning-room 51) + (rolling-race 52) + (rolling-robbers 53) + (rolling-moles 54) + (rolling-plants 55) + (rolling-lake 56) + (rolling-buzzer 57) + (rolling-ring-chase-1 58) + (rolling-ring-chase-2 59) + (snow-eggtop 60) + (snow-ram 61) + (snow-fort 62) + (snow-ball 63) + (snow-bunnies 64) + (snow-buzzer 65) + (snow-bumpers 66) + (snow-cage 67) + (firecanyon-buzzer 68) + (firecanyon-end 69) + (citadel-sage-green 70) + (citadel-sage-blue 71) + (citadel-sage-red 72) + (citadel-sage-yellow 73) + (village3-extra1 74) + (village1-buzzer 75) + (village2-buzzer 76) + (village3-buzzer 77) + (cave-gnawers 78) + (cave-dark-crystals 79) + (cave-dark-climb 80) + (cave-robot-climb 81) + (cave-swing-poles 82) + (cave-spider-tunnel 83) + (cave-platforms 84) + (cave-buzzer 85) + (ogre-boss 86) + (ogre-end 87) + (ogre-buzzer 88) + (lavatube-end 89) + (lavatube-buzzer 90) + (citadel-buzzer 91) + (training-gimmie 92) + (training-door 93) + (training-climb 94) + (training-buzzer 95) + (village3-miner-money1 96) + (village3-miner-money2 97) + (village3-miner-money3 98) + (village3-miner-money4 99) + (village3-oracle-money1 100) + (village3-oracle-money2 101) + (firecanyon-assistant 102) + (village2-levitator 103) + (swamp-arm 104) + (village3-button 105) + (red-eggtop 106) + (lavatube-balls 107) + (lavatube-start 108) + (intro 109) + (ogre-secret 110) + (village4-button 111) + (finalboss-movies 112) + (plunger-lurker-hit 113) + (leaving-misty 114) + (assistant-village3 115) + (max 116) + (*unknown* 255)) + +;; Game parameters. (deftype game-bank (basic) ((life-max-default float :offset-assert 4) (life-start-default float :offset-assert 8) @@ -26,16 +150,18 @@ ) ) +;; aid (deftype actor-id (uint32) () :flag-assert #x900000004 ) +;; the possible state for a level. (deftype level-buffer-state (structure) - ((name basic :offset-assert 0) - (display? symbol :offset-assert 4) - (force-vis? symbol :offset-assert 8) - (force-inside? symbol :offset-assert 12) + ((name basic :offset-assert 0) ;; level name + (display? symbol :offset-assert 4) ;; should it be drawn? + (force-vis? symbol :offset-assert 8) ;; ? should it have its vis loaded? + (force-inside? symbol :offset-assert 12) ;; ? ) :pack-me :method-count-assert 9 @@ -76,12 +202,15 @@ ) ) +(define-extern *load-state* load-state) + +;; a game checkpoint (deftype continue-point (basic) - ((name basic :offset-assert 4) + ((name string :offset-assert 4) (level basic :offset-assert 8) (flags uint32 :offset-assert 12) (trans vector :inline :offset-assert 16) - (quat vector :inline :offset-assert 32) + (quat quaternion :inline :offset-assert 32) (camera-trans vector :inline :offset-assert 48) (camera-rot float 9 :offset-assert 64) (load-commands pair :offset-assert 100) @@ -95,84 +224,87 @@ :size-assert #x7c :flag-assert #xa0000007c (:methods - (dummy-9 () none 9) + (debug-draw! (_type_) none 9) ) ) (declare-type entity-perm structure) (declare-type entity-perm-array basic) +(declare-type game-save basic) +;; Game Info is the full state of the game +;; this information can be saved/loaded from a game save. +;; also, it must be manually synchronized with entity permanent state in the levels (deftype game-info (basic) - ((mode symbol :offset-assert 4) - (save-name basic :offset-assert 8) - (life float :offset-assert 12) - (life-max float :offset-assert 16) - (money float :offset-assert 20) - (money-total float :offset-assert 24) - (money-per-level uint8 32 :offset-assert 28) - (deaths-per-level uint8 32 :offset-assert 60) - (buzzer-total float :offset-assert 92) - (fuel float :offset-assert 96) - (perm-list entity-perm-array :offset-assert 100) - (task-perm-list entity-perm-array :offset-assert 104) - (current-continue continue-point :offset-assert 108) - (text-ids-seen bit-array :offset-assert 112) - (level-opened uint8 32 :offset-assert 116) - (hint-control array :offset-assert 148) - (task-hint-control array :offset-assert 152) - (total-deaths int32 :offset-assert 156) - (continue-deaths int32 :offset-assert 160) - (fuel-cell-deaths int32 :offset-assert 164) - (game-start-time uint64 :offset-assert 168) - (continue-time uint64 :offset-assert 176) - (death-time uint64 :offset-assert 184) - (hit-time uint64 :offset-assert 192) - (fuel-cell-pickup-time uint64 :offset-assert 200) - (fuel-cell-time array :offset-assert 208) - (enter-level-time array :offset-assert 212) - (in-level-time array :offset-assert 216) - (blackout-time uint64 :offset-assert 224) - (letterbox-time uint64 :offset-assert 232) - (hint-play-time uint64 :offset-assert 240) - (display-text-time uint64 :offset-assert 248) - (display-text-handle uint64 :offset-assert 256) - (death-movie-tick int32 :offset-assert 264) - (want-auto-save symbol :offset-assert 268) - (auto-save-proc uint64 :offset-assert 272) - (auto-save-status uint32 :offset-assert 280) - (auto-save-card int32 :offset-assert 284) - (auto-save-which int32 :offset-assert 288) - (pov-camera-handle uint64 :offset-assert 296) - (other-camera-handle uint64 :offset-assert 304) - (death-pos vector-array :offset-assert 312) - (dummy basic :offset-assert 316) - (auto-save-count int32 :offset-assert 320) + ((mode symbol :offset-assert 4) ;; can be play/debug + (save-name basic :offset-assert 8) + (life float :offset-assert 12) + (life-max float :offset-assert 16) + (money float :offset-assert 20) + (money-total float :offset-assert 24) + (money-per-level uint8 32 :offset-assert 28) + (deaths-per-level uint8 32 :offset-assert 60) + (buzzer-total float :offset-assert 92) + (fuel float :offset-assert 96) + (perm-list entity-perm-array :offset-assert 100) ;; permament storage for entities + (task-perm-list entity-perm-array :offset-assert 104) ;; permanent storage for task entities + (current-continue continue-point :offset-assert 108) + (text-ids-seen bit-array :offset-assert 112) + (level-opened uint8 32 :offset-assert 116) + (hint-control (array level-hint-control) :offset-assert 148) + (task-hint-control array :offset-assert 152) + (total-deaths int32 :offset-assert 156) + (continue-deaths int32 :offset-assert 160) + (fuel-cell-deaths int32 :offset-assert 164) + (game-start-time uint64 :offset-assert 168) + (continue-time uint64 :offset-assert 176) + (death-time uint64 :offset-assert 184) + (hit-time uint64 :offset-assert 192) + (fuel-cell-pickup-time uint64 :offset-assert 200) + (fuel-cell-time (array uint64) :offset-assert 208) + (enter-level-time (array uint64) :offset-assert 212) + (in-level-time (array uint64) :offset-assert 216) + (blackout-time uint64 :offset-assert 224) + (letterbox-time uint64 :offset-assert 232) + (hint-play-time uint64 :offset-assert 240) + (display-text-time uint64 :offset-assert 248) + (display-text-handle uint64 :offset-assert 256) + (death-movie-tick int32 :offset-assert 264) + (want-auto-save symbol :offset-assert 268) + (auto-save-proc handle :offset-assert 272) + (auto-save-status uint32 :offset-assert 280) + (auto-save-card int32 :offset-assert 284) + (auto-save-which int32 :offset-assert 288) + (pov-camera-handle uint64 :offset-assert 296) + (other-camera-handle uint64 :offset-assert 304) + (death-pos vector-array :offset-assert 312) + (dummy basic :offset-assert 316) + (auto-save-count int32 :offset-assert 320) ) :method-count-assert 29 :size-assert #x144 :flag-assert #x1d00000144 - ;; field dummy is a basic loaded with a signed load (:methods - (dummy-9 (_type_ symbol symbol string) none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) - (dummy-12 () none 12) - (dummy-13 (_type_ uint) entity-perm 13) ; TODO - not totally confirmed - (dummy-14 (_type_) none 14) - (dummy-15 (_type_) none 15) - (dummy-16 () none 16) - (dummy-17 (_type_) continue-point 17) - (dummy-18 () none 18) - (dummy-19 (_type_ continue-point) none 19) - (dummy-20 () none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) - (dummy-23 () none 23) - (dummy-24 () none 24) - (dummy-25 () none 25) - (dummy-26 () none 26) - (dummy-27 () none 27) - (dummy-28 () none 28) - ) + (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_ uint) 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_ game-text-id) symbol 21) + (mark-text-as-seen (_type_ game-text-id) none 22) + (got-buzzer? (_type_ game-task int) symbol 23) + (dummy-24 () none 24) + (load-game! (_type_ game-save) game-save 25) + (clear-text-seen! (_type_ game-text-id) none 26) + (get-death-count (_type_ symbol) int 27) + (get-health-percent-lost (_type_) float 28) + ) ) (define-extern *game-info* game-info) @@ -184,3 +316,5 @@ (set! *game-info* temp) ) ) + +(define-extern game-task->string (function game-task string)) diff --git a/goal_src/engine/game/game-info.gc b/goal_src/engine/game/game-info.gc index 0e34fbd3cc..7eba001d35 100644 --- a/goal_src/engine/game/game-info.gc +++ b/goal_src/engine/game/game-info.gc @@ -5,5 +5,1161 @@ ;; name in dgo: game-info ;; dgos: GAME, ENGINE -;; TODO - for task-control -(define-extern game-task->string (function int string)) +(defmethod debug-draw! border-plane ((obj border-plane)) + "Debug draw a border plane with a vector and text." + (let* ((v1-0 (-> obj action)) + ;; pick color based on action + (s5-0 (if (= v1-0 'load) + (new 'static 'rgba :g #xff :a #x80) + (new 'static 'rgba :r #xff :a #x80) + ) + ) + ) + + ;; add text and vector + (add-debug-text-sphere #t (bucket-id debug-draw1) (-> obj trans) 819.2 (symbol->string (-> obj name)) s5-0) + (add-debug-vector #t (bucket-id debug-draw1) (-> obj trans) (-> obj normal) 8192.0 s5-0) + ) + 0 + (none) + ) + +(defmethod point-past-plane? border-plane ((obj border-plane) (arg0 vector)) + "Which side of the plane is the given point on? + #t = on the plane, or on the side the normal points toward." + (>= (vector-dot + (vector-! (new 'stack-no-clear 'vector) arg0 (-> obj trans)) + (-> obj normal)) + 0.0) + ) + +(defmethod task-complete? game-info ((obj game-info) (arg0 game-task)) + "Likely closed, or in the process of closing" + (nonzero? (logand (-> obj task-perm-list data arg0 status) (entity-perm-status real-complete))) + ) + +;; set up a static continue point that can be used as a temporary continue point. +(define *default-continue* + (new 'static 'continue-point + :name "default" + :level #f + :trans (new 'static 'vector :w 1.0) + :quat (new 'static 'quaternion :w 1.0) + :camera-trans (new 'static 'vector :w 1.0) + :load-commands '() + :vis-nick #f + :lev0 #f + :disp0 #f + :lev1 #f + :disp1 #f + ) + ) + +(defmethod get-or-create-continue! game-info ((obj game-info)) + "Attempt to get a continue point, if it doesn't exist set the + default-continue to a location in front of the camera." + (cond + ((and (= (-> obj mode) 'play) (-> obj current-continue)) + ;; we have a continue. + (-> obj current-continue) + ) + (else + ;; need to make one + (let ((gp-0 *default-continue*)) + (position-in-front-of-camera! (-> gp-0 trans) 40960.0 4096.0) + (quaternion-identity! (-> gp-0 quat)) + (set! (-> gp-0 vis-nick) (-> *load-state* vis-nick)) + (set! (-> gp-0 lev0) (-> *load-state* want 0 name)) + (set! (-> gp-0 disp0) (-> *load-state* want 0 display?)) + (set! (-> gp-0 lev1) (-> *load-state* want 1 name)) + (set! (-> gp-0 disp1) (-> *load-state* want 1 display?)) + gp-0 + ) + ) + ) + ) + +(defmethod get-continue-by-name game-info ((obj game-info) (arg0 string)) + "Look up a continue point by string name" + (let ((s5-0 *level-load-list*)) + ;; loop over levels + (while (not (null? s5-0)) + (let ((s4-0 (-> (the-as level-load-info (-> (the-as symbol (car s5-0)) value)) continues))) + ;; loop over continues in the level + (while (not (null? s4-0)) + (let ((s3-0 (car s4-0))) + (if (string= arg0 (the-as string (-> (the-as continue-point s3-0) name))) + ;; match! + (return (the continue-point s3-0)) + ) + ) + (set! s4-0 (cdr s4-0)) + ) + ) + (set! s5-0 (cdr s5-0)) + ) + ) + (the-as continue-point #f) + ) + +(defmethod set-continue! game-info ((obj game-info) (arg0 basic)) + "Set the current continue to to arg0. + arg0 can be: + '() or #f, in which case it does nothing. + a string, in which case it looks up by name + a continue point. + + If it fails to get a continue-point, sets up a temporary continue point + in the default-continue + + If the continue is changed, resets the death and time counters + " + (let ((s5-0 (-> obj current-continue))) + (if (null? arg0) + (set! arg0 #f) + ) + (let ((v1-3 (-> arg0 type))) + (cond + ((= v1-3 string) + (let ((v1-5 (get-continue-by-name obj (the-as string arg0)))) + (if v1-5 + (set! (-> obj current-continue) v1-5) + ) + ) + ) + (else + (cond + ((= v1-3 continue-point) + (set! (-> obj current-continue) (the-as continue-point arg0)) + ) + (else + (let ((s4-3 *default-continue*)) + (position-in-front-of-camera! (-> s4-3 trans) 40960.0 4096.0) + (quaternion-identity! (-> s4-3 quat)) + (set! (-> s4-3 vis-nick) (-> *load-state* vis-nick)) + (set! (-> s4-3 lev0) (-> *load-state* want 0 name)) + (set! (-> s4-3 disp0) (-> *load-state* want 0 display?)) + (set! (-> s4-3 lev1) (-> *load-state* want 1 name)) + (set! (-> s4-3 disp1) (-> *load-state* want 1 display?)) + (set! (-> obj current-continue) s4-3) + ) + ) + ) + ) + ) + ) + (when (!= s5-0 (-> obj current-continue)) + (set! (-> obj continue-deaths) 0) + (set! (-> obj continue-time) (-> *display* base-frame-counter)) + ) + ) + (-> obj current-continue) + ) + +(defmethod get-entity-task-perm game-info ((obj game-info) (arg0 game-task)) + "Get the permanent storage for a game-task" + (-> obj task-perm-list data arg0) + ) + +(defmethod initialize! game-info ((obj game-info) (cause symbol) (save-to-load game-save) (continue-point-override string)) + "Initialize the game-info. + The cause can be 'dead if you die, or 'game to reset everything. + If save-to-load is not #f will load data from that. + If continue-point-override is not #f, will use that." + + (local-vars (v0-0 int) (sv-96 symbol)) + (with-pp + (let ((selected-cause cause)) + (when (= selected-cause 'dead) + ;; reload game-info because we died. Increase death counts + (set! (-> obj total-deaths) (+ (-> obj total-deaths) 1)) + (set! (-> obj continue-deaths) (+ (-> obj continue-deaths) 1)) + (set! (-> obj fuel-cell-deaths) (+ (-> obj fuel-cell-deaths) 1)) + (when *target* + (let ((lev-info (-> *target* current-level info))) + (when (>= (-> *level-task-data-remap* length) (-> lev-info index)) + ;; update death per level. + (set! v0-0 + (seekl + (the-as int (-> obj deaths-per-level (-> *level-task-data-remap* (+ (-> lev-info index) -1)))) + 255 + 1 + ) + ) + (set! (-> obj deaths-per-level (-> *level-task-data-remap* (+ (-> lev-info index) -1))) (the-as uint v0-0)) + ) + ) + ) + + (let ((v1-27 (-> obj mode))) + (cond + ((= v1-27 'play) + ;; now pick between life/try depending on if we ran out of lives or not. + (if (< 0.0 (-> obj life)) + (set! cause 'life) + (set! cause 'try) + ) + ) + (else + ;; not in play mode, we're done. + (begin + (set! obj obj) + (goto cfg-50) + ) + ) + ) + ) + ) + ) + + ;; ? + (kill-current-level-hint '() '() 'die) + + (let ((v1-31 cause)) + (when (= v1-31 'game) + ;; we are doing a full restart. + ;; reset everything! + (reset-all-hint-controls) + (set-continue! obj + (cond + (continue-point-override + continue-point-override + ) + ((!= *kernel-boot-message* 'play) + "demo-start" + ) + (*debug-segment* + "village1-hut" + ) + (else + "title-start" + ) + ) + ) + (set! (-> obj auto-save-count) 0) + (set! (-> *setting-control* default auto-save) #f) + (set! (-> obj money) 0.0) + (set! (-> obj fuel) 0.0) + (set! (-> obj money-total) 0.0) + (set! (-> obj buzzer-total) 0.0) + (set! (-> obj perm-list length) 0) + (clear-all! (-> obj text-ids-seen)) + (set! (-> obj death-movie-tick) (rand-vu-int-count 10)) + (set! (-> obj total-deaths) 0) + (set! (-> obj continue-deaths) 0) + (set! (-> obj fuel-cell-deaths) 0) + (set! (-> obj death-pos length) 0) + (set! (-> obj game-start-time) (-> *display* base-frame-counter)) + (set! (-> obj fuel-cell-pickup-time) (-> *display* base-frame-counter)) + (set! (-> obj continue-time) (-> *display* base-frame-counter)) + (set! (-> obj death-time) (-> *display* base-frame-counter)) + (set! (-> obj hit-time) (-> *display* base-frame-counter)) + (dotimes (v1-50 116) + (set! (-> obj fuel-cell-time 0) (the-as uint 0)) + (nop!) + ) + (dotimes (v1-53 32) + (set! (-> obj money-per-level v1-53) (the-as uint 0)) + (set! (-> obj deaths-per-level v1-53) (the-as uint 0)) + (set! (-> obj enter-level-time v1-53) (the-as uint 0)) + (set! (-> obj in-level-time v1-53) (the-as uint 0)) + (set! (-> obj level-opened v1-53) (the-as uint 0)) + (nop!) + ) + ) + ) + + (let ((v1-56 cause)) + (when (or (= v1-56 'game) (= v1-56 'try)) + ;; full restart, or ran out of lives + (let ((v1-59 (-> obj mode))) + (when (= v1-59 'play) + (set! *display-profile* #f) + (set! *display-entity-errors* #f) + ) + ) + ;; reset lives to default. + (set! (-> obj life-max) (-> *GAME-bank* life-max-default)) + (set! (-> obj life) (-> *GAME-bank* life-start-default)) + ) + ) + + (let ((v1-65 (-> obj mode))) + (cond + ((= v1-65 'debug) + ;; in debug, we didn't kill things so we don't need to restart them + (reset-actors cause) + (if save-to-load + (load-game! obj save-to-load) + ) + ) + ((= v1-65 'play) + ;; don't allow pausing/start menu + (when *target* + (set-setting! *setting-control* *target* 'allow-pause #f 0.0 0) + (set-setting! *setting-control* *target* 'allow-progress #f 0.0 0) + (copy-settings-from-target! *setting-control*) + ) + + ;; send the auto-save process a 'die message + (let ((a1-11 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-11 from) pp) + (set! (-> a1-11 num-params) 0) + (set! (-> a1-11 message) 'die) + (send-event-function + (handle->process (-> *game-info* auto-save-proc)) + a1-11 + ) + ) + + ;; black screen, stop spawning actors + (set! (-> *level* border?) #f) + (set! (-> *setting-control* default border-mode) #f) + (set! *spawn-actors* #f) + (set-blackout-frames 30) + + ;; send target a 'reset message. + (let ((a1-12 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-12 from) pp) + (set! (-> a1-12 num-params) 0) + (set! (-> a1-12 message) 'reset) + (send-event-function *target* a1-12) + ) + + ;; start a temporary process to restart things + (let ((proc (get-process *4k-dead-pool* process #x4000))) + (when proc + (activate proc *default-pool* 'process *scratch-memory-top*) + (run-next-time-in-process + proc + (lambda ((stop-arg symbol) (reset-arg symbol) (c continue-point) (load game-save)) + (stop stop-arg) + (reset-actors reset-arg) + (set-continue! *game-info* c) + (when load + (load-game! *game-info* load) + (set! c (get-or-create-continue! *game-info*)) + ) + (suspend) + (start stop-arg c) + ) + (-> obj mode) ;; play, debug + cause + (get-or-create-continue! obj) + save-to-load + ) + ) + ) + (set-master-mode 'game) + ) + ) + ) + (label cfg-50) + obj + ) + ) + + +(defmethod adjust game-info ((obj game-info) (item symbol) (amount float) (source handle)) + "Adjust the number of items by amount." + (let ((v1-0 item)) + (cond + ((= v1-0 'life) + ;; get/lose a life, just modify the life field + (if (>= amount 0.0) + (set! (-> obj life) (seek (-> obj life) (-> obj life-max) amount)) + (set! (-> obj life) (seek (-> obj life) 0.0 (- amount))) + ) + (-> obj life) + ) + + ((= v1-0 'money) + (if (and (< 0.0 amount) (= (+ (-> obj money) amount) (-> *GAME-bank* money-task-inc))) + ;; got enough orbs to trade, display a hint + (level-hint-spawn (game-text-id MISSING-orb-hint) "sksp0014" #f *entity-pool* 0) + ) + + ;; need to update the various orb counters + (when (< 0.0 amount) + (let ((proc (handle->process source))) + (when (and proc (-> proc entity)) + ;; we have task data for this level! + (when (>= (-> *level-task-data-remap* length) (-> proc entity extra level info index)) + ;; get the level index + (let ((level-idx (-> *level-task-data-remap* (+ (-> proc entity extra level info index) -1)))) + ;; increment the level money count + (set! (-> obj money-per-level level-idx) (+ (-> obj money-per-level level-idx) (the-as uint (the int amount)))) + ;; increment our total money in the game (out of the 2000 max orbs) + (set! (-> obj money-total) (+ (-> obj money-total) amount)) + ;; if we have all the money in our level, display the all orbs graphic + (if (= (-> obj money-per-level level-idx) (-> (get-game-count level-idx) money-count)) + (activate-orb-all level-idx) + ) + ) + ) + ) + ) + ) + + ;; increment our current money count + (let ((f0-18 (+ (-> obj money) amount))) + (set! (-> obj money) f0-18) + f0-18 + ) + ) + + ((= v1-0 'fuel-cell) + ;; got a power cell! + ;; in this case, the amount is actually the index of the power cell's task + (let ((s5-1 (the int amount))) + (when (not (or (task-complete? obj (the-as game-task s5-1)) + (>= (the-as uint 1) (the-as uint s5-1)) + ) + ) + ;; the cell corresponds to a valid and previously incomplete task. + ;; update our stats + (set! (-> obj fuel-cell-deaths) 0) + (set! (-> obj fuel-cell-pickup-time) (-> *display* base-frame-counter)) + (set! (-> obj fuel-cell-time s5-1) (-> *display* base-frame-counter)) + ;; increment power cells! + (set! (-> obj fuel) (+ 1.0 (-> obj fuel))) + ;; mark as completed + (set! (-> obj task-perm-list data s5-1 status) + (logior (-> obj task-perm-list data s5-1 status) + (entity-perm-status real-complete) + ) + ) + ;; unused. + (get-task-control (the game-task s5-1)) + ;; close the task! + (close-specific-task! + (the-as game-task s5-1) + (task-status need-resolution) + ) + ) + ) + (-> obj fuel) + ) + + ((= v1-0 'buzzer) + ;; got a scout fly. In this case, the amount is actually two 16 bit numbers + ;; the lower 16 bits are the task, and the upper is why fly + (let ((buzz-task (logand (the int amount) #xffff)) + (buzz-index (sar (the int amount) 16)) + (buzz-count 0.0) + ) + (when (> (the-as uint buzz-task) 0) + ;; valid task + (let* ((ctrl (get-task-control (the game-task buzz-task))) + (buzz-bits (get-reminder ctrl 0)) ;; the currently collected flies + ) + (when (and (>= buzz-index 0) + (< buzz-index (the int (-> *FACT-bank* buzzer-max-default))) + ) + ;; valid fly index + + ;; increment total if we haven't collected it before + (if (zero? (logand buzz-bits (ash 1 buzz-index))) + (set! (-> obj buzzer-total) (+ 1.0 (-> obj buzzer-total))) + ) + + ;; set the updated bits + (let ((t9-10 (method-of-object ctrl save-reminder))) + (set! buzz-bits (logior buzz-bits (ash 1 buzz-index))) + (t9-10 ctrl buzz-bits 0) + ) + ) + + ;; recompute the total count + (countdown (v1-58 (the int (-> *FACT-bank* buzzer-max-default))) + (if (nonzero? (logand buzz-bits (ash 1 v1-58))) + (set! buzz-count (+ 1.0 buzz-count)) + ) + ) + ) + ) + buzz-count + ) + ) + ) + ) + ) + +(defmethod got-buzzer? game-info ((obj game-info) (arg0 game-task) (arg1 int)) + "Do we have the arg1-th buzzer for the given buzzer task?" + ;; buzzers mis-use their reminder bits as a bitfield of which ones have been collected + (nonzero? (logand (get-reminder (get-task-control arg0) 0) (ash 1 arg1))) + ) + +(defmethod buzzer-count game-info ((obj game-info) (arg0 game-task)) + "How many buzzers do we have for this task?" + (let ((v1-1 (get-reminder (get-task-control arg0) 0)) ;; buzzer bitmask + (v0-2 0) ;; count + ) + (countdown (a0-4 (the int (-> *FACT-bank* buzzer-max-default))) + (if (nonzero? (logand v1-1 (ash 1 a0-4))) + (+! v0-2 1) + ) + ) + v0-2 + ) + ) + +(defmethod seen-text? game-info ((obj game-info) (arg0 game-text-id)) + "Have we already displayed this text? + This is used to display level names on only the first enter. + It seems like hints could also display text on screen at one point in time." + (get-bit (-> obj text-ids-seen) (the-as int arg0)) + ) + +(defmethod mark-text-as-seen game-info ((obj game-info) (arg0 game-text-id)) + "Mark the game text as seen. This only works if the text id < 4096, and ignores otherwise" + (if (and (< (the-as uint arg0) (the-as uint 4095)) (> (the-as uint arg0) 0)) + (set-bit (-> obj text-ids-seen) (the-as int arg0)) + ) + (none) + ) + +(defmethod clear-text-seen! game-info ((obj game-info) (arg0 game-text-id)) + "Mark text as unseen. MUST be a valid text id" + (clear-bit (-> obj text-ids-seen) (the-as int arg0)) + (none) + ) + +(defmethod reset! fact-info-target ((obj fact-info-target) (arg0 symbol)) + "Reset the facts for a given thing" + (when (or (not arg0) (= arg0 'eco)) + (set! (-> obj eco-timeout) (the-as uint 0)) + (set! (-> obj eco-level) 0.0) + (set! (-> obj eco-pickup-time) (-> *display* game-frame-counter)) + ) + (when (or (not arg0) (= arg0 'health)) + (set! (-> obj health-max) (-> *FACT-bank* health-max-default)) + (set! (-> obj health) (-> obj health-max)) + (set! (-> obj health-pickup-time) (the-as uint -30000)) + ) + (when (or (not arg0) (= arg0 'buzzer)) + (set! (-> obj buzzer-max) (-> *FACT-bank* buzzer-max-default)) + (set! (-> obj buzzer) 0.0) + ) + (when (or (not arg0) (= arg0 'eco-pill)) + (set! (-> obj eco-pill-max) (-> *FACT-bank* eco-pill-max-default)) + (set! (-> obj eco-pill) 0.0) + ) + (none) + ) + +;; todo method 11 + +(defmethod lookup-entity-perm-by-aid game-info ((obj game-info) (arg0 uint)) + (let ((v1-0 (-> obj perm-list))) + (countdown (a0-1 (-> v1-0 length)) + (if (= arg0 (-> v1-0 data a0-1 aid)) + (return (-> v1-0 data a0-1)) + ) + ) + ) + (the-as entity-perm #f) + ) + +(defmethod copy-perms-from-level! game-info ((obj game-info) (lev level)) + "Iterate through entities in the level and copy their perms into game-info" + (let ((perms (-> obj perm-list)) ;; our perms + (lev-entities (-> lev bsp level entity)) ;; entities in the level + ) + ;; loop over every entity in the level + (dotimes (lev-entity-idx (-> lev-entities length)) + ;; and get the perm + (let ((lev-entity-perm (-> lev-entities data lev-entity-idx entity extra perm))) + ;; only look at ones with an associated task + (when (nonzero? (-> lev-entity-perm task)) + ;; look up the perm in the game info + (let ((info-entity-perm (lookup-entity-perm-by-aid obj (-> lev-entity-perm aid)))) + (cond + (info-entity-perm + ;; it exists, set it to the value from the level + (set! (-> info-entity-perm quad) (-> lev-entity-perm quad)) + ) + ((< (-> perms length) (-> perms allocated-length)) + ;; nope, doesn't exist, but we have room for another, so add it to the back + (set! (-> perms data (-> perms length) quad) (-> lev-entity-perm quad)) + (set! (-> perms length) (+ (-> perms length) 1)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod copy-perms-to-level! game-info ((obj game-info) (lev level)) + "Does the opposite of the previous, copies perms from game-info to level entities" + (let ((lev-entities (-> lev bsp level entity))) + (dotimes (lev-entity-idx (-> lev-entities length)) + (let* ((lev-entity-perm (-> lev-entities data lev-entity-idx entity extra perm)) + (info-entity-perm (lookup-entity-perm-by-aid obj (-> lev-entity-perm aid))) + ) + (when info-entity-perm + ;; found the level entity in game-info, copy + (set! (-> lev-entity-perm quad) (-> info-entity-perm quad)) + ;; and also do this thing, not sure exactly what, but updates the status bits + (update-perm! lev-entity-perm 'try + (entity-perm-status + bit-0 + bit-1 + dead + bit-3 + user-set-from-cstage + complete + bit-9 + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod print continue-point ((obj continue-point)) + (format #t "#<~A ~S @ #x~X>" (-> obj type) (-> obj name) obj) + obj + ) + + +(defmethod debug-draw! continue-point ((obj continue-point)) + "Draw a continue point." + (add-debug-x #t + (bucket-id debug-draw1) + (-> obj trans) + (new 'static 'rgba :r #xff :a #x80) + ) + (add-debug-text-3d #t + (bucket-id debug-draw1) + (-> obj name) + (-> obj trans) + (new 'static 'rgba :r #x1) + (new 'static 'vector2h :data (new 'static 'array int16 2 0 8)) + ) + (let ((a3-2 (vector-z-quaternion! (new-stack-vector0) (-> obj quat)))) + (add-debug-vector + #t + (bucket-id debug-draw1) + (-> obj trans) + a3-2 + 8192.0 + (new 'static 'rgba :r #xff :g #x80 :a #x80) + ) + ) + 0 + (none) + ) + +(defun-debug trsq->continue-point ((arg0 trsq)) + "Print out a continue point." + (let ((a2-0 (level-get-target-inside *level*))) + (format #t "~%(static-continue-point ~A ()~%" + (symbol->string (-> a2-0 name)) + ) + ) + (format #t " (target ~m ~m ~m " + (-> arg0 trans x) + (-> arg0 trans y) + (-> arg0 trans z) + ) + (format #t "~f ~f ~f ~f)~%" + (-> arg0 quat x) + (-> arg0 quat y) + (-> arg0 quat z) + (-> arg0 quat w) + ) + (let ((gp-1 *math-camera*)) + (format #t " (camera ~m ~m ~m ~f ~f ~f " + (-> gp-1 trans x) + (-> gp-1 trans y) + (-> gp-1 trans z) + (-> gp-1 inv-camera-rot vector 0 x) + (-> gp-1 inv-camera-rot vector 0 y) + (-> gp-1 inv-camera-rot vector 0 z) + ) + (format #t "~f ~f ~f ~f ~f ~f)~%" + (-> gp-1 inv-camera-rot vector 1 x) + (-> gp-1 inv-camera-rot vector 1 y) + (-> gp-1 inv-camera-rot vector 1 z) + (-> gp-1 inv-camera-rot vector 2 x) + (-> gp-1 inv-camera-rot vector 2 y) + (-> gp-1 inv-camera-rot vector 2 z) + ) + ) + (format #t " (load '~A '~A '~A '~A '~A)~%" + (-> *load-state* vis-nick) + (-> *load-state* want 0 name) + (-> *load-state* want 0 display?) + (-> *load-state* want 1 name) + (-> *load-state* want 1 display?) + ) + (format #t " )~%") + 0 + (none) + ) + +(defun-debug game-task->string ((arg0 game-task)) + (let ((v1-0 arg0)) + (cond + ((= v1-0 (game-task max)) + "max" + ) + ((= v1-0 (game-task assistant-village3)) + "assistant-village3" + ) + ((= v1-0 (game-task leaving-misty)) + "leaving-misty" + ) + ((= v1-0 (game-task plunger-lurker-hit)) + "plunger-lurker-hit" + ) + ((= v1-0 (game-task finalboss-movies)) + "finalboss-movies" + ) + ((= v1-0 (game-task village4-button)) + "village4-button" + ) + ((= v1-0 (game-task ogre-secret)) + "ogre-secret" + ) + ((= v1-0 (game-task intro)) + "intro" + ) + ((= v1-0 (game-task lavatube-start)) + "lavatube-start" + ) + ((= v1-0 (game-task lavatube-balls)) + "lavatube-balls" + ) + ((= v1-0 (game-task red-eggtop)) + "red-eggtop" + ) + ((= v1-0 (game-task village3-button)) + "village3-button" + ) + ((= v1-0 (game-task swamp-arm)) + "swamp-arm" + ) + ((= v1-0 (game-task village2-levitator)) + "village2-levitator" + ) + ((= v1-0 (game-task firecanyon-assistant)) + "firecanyon-assistant" + ) + ((= v1-0 (game-task village3-oracle-money2)) + "village3-oracle-money2" + ) + ((= v1-0 (game-task village3-oracle-money1)) + "village3-oracle-money1" + ) + ((= v1-0 (game-task village3-miner-money4)) + "village3-miner-money4" + ) + ((= v1-0 (game-task village3-miner-money3)) + "village3-miner-money3" + ) + ((= v1-0 (game-task village3-miner-money2)) + "village3-miner-money2" + ) + ((= v1-0 (game-task village3-miner-money1)) + "village3-miner-money1" + ) + ((= v1-0 (game-task training-buzzer)) + "training-buzzer" + ) + ((= v1-0 (game-task training-climb)) + "training-climb" + ) + ((= v1-0 (game-task training-door)) + "training-door" + ) + ((= v1-0 (game-task training-gimmie)) + "training-gimmie" + ) + ((= v1-0 (game-task citadel-buzzer)) + "citadel-buzzer" + ) + ((= v1-0 (game-task lavatube-buzzer)) + "lavatube-buzzer" + ) + ((= v1-0 (game-task lavatube-end)) + "lavatube-end" + ) + ((= v1-0 (game-task ogre-buzzer)) + "ogre-buzzer" + ) + ((= v1-0 (game-task ogre-end)) + "ogre-end" + ) + ((= v1-0 (game-task ogre-boss)) + "ogre-boss" + ) + ((= v1-0 (game-task cave-buzzer)) + "cave-buzzer" + ) + ((= v1-0 (game-task cave-platforms)) + "cave-platforms" + ) + ((= v1-0 (game-task cave-spider-tunnel)) + "cave-spider-tunnel" + ) + ((= v1-0 (game-task cave-swing-poles)) + "cave-swing-poles" + ) + ((= v1-0 (game-task cave-robot-climb)) + "cave-robot-climb" + ) + ((= v1-0 (game-task cave-dark-climb)) + "cave-dark-climb" + ) + ((= v1-0 (game-task cave-dark-crystals)) + "cave-dark-crystals" + ) + ((= v1-0 (game-task cave-gnawers)) + "cave-gnawers" + ) + ((= v1-0 (game-task village3-buzzer)) + "village3-buzzer" + ) + ((= v1-0 (game-task village2-buzzer)) + "village2-buzzer" + ) + ((= v1-0 (game-task village1-buzzer)) + "village1-buzzer" + ) + ((= v1-0 (game-task village3-extra1)) + "village3-extra1" + ) + ((= v1-0 (game-task citadel-sage-yellow)) + "citadel-sage-yellow" + ) + ((= v1-0 (game-task citadel-sage-red)) + "citadel-sage-red" + ) + ((= v1-0 (game-task citadel-sage-blue)) + "citadel-sage-blue" + ) + ((= v1-0 (game-task citadel-sage-green)) + "citadel-sage-green" + ) + ((= v1-0 (game-task firecanyon-end)) + "firecanyon-end" + ) + ((= v1-0 (game-task firecanyon-buzzer)) + "firecanyon-buzzer" + ) + ((= v1-0 (game-task snow-cage)) + "snow-cage" + ) + ((= v1-0 (game-task snow-bumpers)) + "snow-bumpers" + ) + ((= v1-0 (game-task snow-buzzer)) + "snow-buzzer" + ) + ((= v1-0 (game-task snow-bunnies)) + "snow-bunnies" + ) + ((= v1-0 (game-task snow-ball)) + "snow-ball" + ) + ((= v1-0 (game-task snow-fort)) + "snow-fort" + ) + ((= v1-0 (game-task snow-ram)) + "snow-ram" + ) + ((= v1-0 (game-task snow-eggtop)) + "snow-eggtop" + ) + ((= v1-0 (game-task rolling-ring-chase-2)) + "rolling-ring-chase-2" + ) + ((= v1-0 (game-task rolling-ring-chase-1)) + "rolling-ring-chase-1" + ) + ((= v1-0 (game-task rolling-buzzer)) + "rolling-buzzer" + ) + ((= v1-0 (game-task rolling-lake)) + "rolling-lake" + ) + ((= v1-0 (game-task rolling-plants)) + "rolling-plants" + ) + ((= v1-0 (game-task rolling-moles)) + "rolling-moles" + ) + ((= v1-0 (game-task rolling-robbers)) + "rolling-robbers" + ) + ((= v1-0 (game-task rolling-race)) + "rolling-race" + ) + ((= v1-0 (game-task sunken-spinning-room)) + "sunken-spinning-room" + ) + ((= v1-0 (game-task sunken-top-of-helix)) + "sunken-top-of-helix" + ) + ((= v1-0 (game-task sunken-buzzer)) + "sunken-buzzer" + ) + ((= v1-0 (game-task sunken-sharks)) + "sunken-sharks" + ) + ((= v1-0 (game-task sunken-room)) + "sunken-room" + ) + ((= v1-0 (game-task sunken-slide)) + "sunken-slide" + ) + ((= v1-0 (game-task sunken-pipe)) + "sunken-pipe" + ) + ((= v1-0 (game-task sunken-platforms)) + "sunken-platforms" + ) + ((= v1-0 (game-task swamp-buzzer)) + "swamp-buzzer" + ) + ((= v1-0 (game-task swamp-tether-4)) + "swamp-tether-4" + ) + ((= v1-0 (game-task swamp-tether-3)) + "swamp-tether-3" + ) + ((= v1-0 (game-task swamp-tether-2)) + "swamp-tether-2" + ) + ((= v1-0 (game-task swamp-tether-1)) + "swamp-tether-1" + ) + ((= v1-0 (game-task swamp-battle)) + "swamp-battle" + ) + ((= v1-0 (game-task swamp-flutflut)) + "swamp-flutflut" + ) + ((= v1-0 (game-task swamp-billy)) + "swamp-billy" + ) + ((= v1-0 (game-task village2-oracle-money2)) + "village2-oracle-money2" + ) + ((= v1-0 (game-task village2-oracle-money1)) + "village2-oracle-money1" + ) + ((= v1-0 (game-task village2-warrior-money)) + "village2-warrior-money" + ) + ((= v1-0 (game-task village2-geologist-money)) + "village2-geologist-money" + ) + ((= v1-0 (game-task village2-gambler-money)) + "village2-gambler-money" + ) + ((= v1-0 (game-task misty-eco-challenge)) + "misty-eco-challenge" + ) + ((= v1-0 (game-task misty-bike-jump)) + "misty-bike-jump" + ) + ((= v1-0 (game-task misty-buzzer)) + "misty-buzzer" + ) + ((= v1-0 (game-task misty-bike)) + "misty-bike" + ) + ((= v1-0 (game-task misty-cannon)) + "misty-cannon" + ) + ((= v1-0 (game-task misty-warehouse)) + "misty-warehouse" + ) + ((= v1-0 (game-task misty-boat)) + "misty-boat" + ) + ((= v1-0 (game-task misty-muse)) + "misty-muse" + ) + ((= v1-0 (game-task beach-sentinel)) + "beach-sentinel" + ) + ((= v1-0 (game-task beach-gimmie)) + "beach-gimmie" + ) + ((= v1-0 (game-task beach-buzzer)) + "beach-buzzer" + ) + ((= v1-0 (game-task beach-cannon)) + "beach-cannon" + ) + ((= v1-0 (game-task beach-seagull)) + "beach-seagull" + ) + ((= v1-0 (game-task beach-flutflut)) + "beach-flutflut" + ) + ((= v1-0 (game-task beach-pelican)) + "beach-pelican" + ) + ((= v1-0 (game-task beach-ecorocks)) + "beach-ecorocks" + ) + ((= v1-0 (game-task village1-oracle-money2)) + "village1-oracle-money2" + ) + ((= v1-0 (game-task village1-oracle-money1)) + "village1-oracle-money1" + ) + ((= v1-0 (game-task village1-uncle-money)) + "village1-uncle-money" + ) + ((= v1-0 (game-task village1-mayor-money)) + "village1-mayor-money" + ) + ((= v1-0 (game-task village1-yakow)) + "village1-yakow" + ) + ((= v1-0 (game-task jungle-temple-door)) + "jungle-temple-door" + ) + ((= v1-0 (game-task jungle-canyon-end)) + "jungle-canyon-end" + ) + ((= v1-0 (game-task jungle-buzzer)) + "jungle-buzzer" + ) + ((= v1-0 (game-task jungle-plant)) + "jungle-plant" + ) + ((= v1-0 (game-task jungle-fishgame)) + "jungle-fishgame" + ) + ((= v1-0 (game-task jungle-tower)) + "jungle-tower" + ) + ((= v1-0 (game-task jungle-lurkerm)) + "jungle-lurkerm" + ) + ((= v1-0 (game-task jungle-eggtop)) + "jungle-eggtop" + ) + ((= v1-0 (game-task complete)) + "complete" + ) + ((= v1-0 (game-task none)) + "none" + ) + (else + "*unknown*" + ) + ) + ) + ) + +(defmethod debug-print game-info ((obj game-info) (arg0 symbol)) + (inspect obj) + (when (or (not arg0) (= arg0 'game-task)) + (format #t "~Tgame-task:~%") + (dotimes (s4-0 116) + (if (task-complete? obj (the-as game-task s4-0)) + (format #t "~T~T~S~%" (game-task->string (the-as game-task s4-0))) + ) + ) + ) + (when (or (not arg0) (= arg0 'entity-perm)) + (format #t "~Tentity-perm:~%") + (let ((s5-1 (-> obj perm-list))) + (dotimes (s4-1 (-> s5-1 length)) + (format #t "~T~T~`entity-perm`P~%" (-> s5-1 data s4-1)) + ) + ) + ) + obj + ) + +;; allocate storage for game info +(let ((gp-0 *game-info*)) + ;; perms + (when (zero? (-> gp-0 perm-list)) + (set! (-> gp-0 perm-list) (new 'global 'entity-perm-array 4096)) + (set! (-> gp-0 perm-list length) 0) + 0 + ) + + ;; task perms + (when (zero? (-> gp-0 task-perm-list)) + (let ((v1-15 (new 'global 'entity-perm-array 116))) + (set! (-> gp-0 task-perm-list) v1-15) + (dotimes (a0-24 (-> v1-15 length)) + (set! (-> v1-15 data a0-24 task) (the-as uint a0-24)) + ) + (set! + (-> v1-15 data 1 status) + (logior (-> v1-15 data 1 status) (entity-perm-status real-complete)) + ) + ) + ) + + ;; text idx + (if (zero? (-> gp-0 text-ids-seen)) + (set! (-> gp-0 text-ids-seen) (new 'global 'bit-array 4095)) + ) + + ;; death locations + (when (zero? (-> gp-0 death-pos)) + (set! (-> gp-0 death-pos) (new 'global 'vector-array 64)) + (set! (-> gp-0 death-pos length) 0) + 0 + ) + + ;; initialize some fields + (if (zero? (-> gp-0 display-text-handle)) + (set! (-> gp-0 display-text-handle) (the-as uint #f)) + ) + (if (not (-> gp-0 current-continue)) + (set-continue! gp-0 *default-continue*) + ) + (set! (-> gp-0 want-auto-save) #f) + (set! (-> gp-0 auto-save-proc) (the-as handle #f)) + (set! (-> gp-0 auto-save-status) (the-as uint 1)) + (set! (-> gp-0 auto-save-card) 0) + (set! (-> gp-0 auto-save-which) -1) + (set! (-> gp-0 pov-camera-handle) (the-as uint #f)) + (set! (-> gp-0 other-camera-handle) (the-as uint #f)) + ) + +(defmethod get-death-count game-info ((obj game-info) (arg0 symbol)) + (let ((v1-13 + (if (and arg0 + *target* + (>= (-> *level-task-data-remap* length) (-> *target* current-level info index)) + ) + (the-as int + (-> obj deaths-per-level + (-> *level-task-data-remap* (+ (-> *target* current-level info index) -1)) + ) + ) + (-> obj fuel-cell-deaths) + ) + ) + ) + 0 + (min 4 (/ v1-13 5)) + ) + ) + +(defmethod get-health-percent-lost game-info ((obj game-info)) + (* 0.25 (the float (get-death-count obj #f))) + ) diff --git a/goal_src/engine/game/game-save.gc b/goal_src/engine/game/game-save.gc index 00d590e4a2..d44cad1752 100644 --- a/goal_src/engine/game/game-save.gc +++ b/goal_src/engine/game/game-save.gc @@ -5,5 +5,668 @@ ;; name in dgo: game-save ;; dgos: GAME, ENGINE +(defconstant SAVE_VERSION 1) + +;; identifier for game save fields +(defenum game-save-elt + :type uint16 + (name 100) + (base-time 101) + (real-time 102) + (game-time 103) + (integral-time 104) + (continue 200) + (life 201) + (money 202) + (money-total 203) + (moeny-per-level 204) + (buzzer-total 205) + (fuel-cell 206) + (death-movie-tick 207) + (task-list 300) + (perm-list 301) + (hint-list 303) + (text-list 304) + (level-open-list 305) + (total-deaths 400) + (continue-deaths 401) + (fuel-cell-deaths 402) + (game-start-time 403) + (continue-timke 404) ;; typo in game + (death-time 405) + (hit-time 406) + (fuel-cell-pickup-time 407) + (continue-time 408) + (fuel-cell-time 409) + (enter-level-time 410) + (deaths-per-level 411) + (death-pos 412) + (auto-save-count 413) + (in-level-time 414) + (sfx-volume 500) + (music-volume 501) + (dialog-volume 502) + (language 503) + (screenx 504) + (screeny 505) + (vibration 506) + (play-hints 507) + (video-mode 508) + (aspect-ratio 509) + ) + +;; the game save is a bunch of "game-save-tag"s +;; the elt-type field identifies what it is. +;; the data may be stored in one of the user fields, or +;; may be stored after the tag itself. +;; the count/size fields determine how big it is. + +(deftype game-save-tag (structure) + ((user-object object 2 :offset-assert 0) + (user-uint64 uint64 :offset 0) + (user-float0 float :offset 0) + (user-float float 2 :offset 0) + (user-int32 int32 2 :offset 0) + (user-uint32 uint32 2 :offset 0) + (user-int16 int16 4 :offset 0) + (user-uint16 uint16 4 :offset 0) + (user-int8 int8 8 :offset 0) + (user-int80 int8 :offset 0) + (user-int81 int8 :offset 1) + (user-uint8 uint8 8 :offset 0) + (elt-count int32 :offset-assert 8) + (elt-size uint16 :offset-assert 12) + (elt-type game-save-elt :offset-assert 14) + ) + :method-count-assert 9 + :size-assert #x10 + :flag-assert #x900000010 + ) + +;; A game-save is a dynamic type that contains the full save. +;; it contains common metadata plus all the tags +(deftype game-save (basic) + ((version int32 :offset-assert 4) + (allocated-length int32 :offset-assert 8) + (length int32 :offset-assert 12) + (info-int32 int32 16 :offset-assert 16) + (info-int8 int8 64 :offset 16) + (level-index int32 :offset 16) + (fuel-cell-count float :offset 20) + (money-count float :offset 24) + (buzzer-count float :offset 28) + (completion-percentage float :offset 32) + (minute uint8 :offset 36) + (hour uint8 :offset 37) + (week uint8 :offset 38) + (day uint8 :offset 39) + (month uint8 :offset 40) + (year uint8 :offset 41) + (new-game int32 :offset 44) + (tag game-save-tag :inline :dynamic :offset-assert 80) + ) + :method-count-assert 12 + :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) + ) + ) + +(defmethod asize-of game-save ((obj game-save)) + "Get the size in memory of the save" + (the-as int (+ (-> game-save size) (the-as uint (-> obj allocated-length)))) + ) + +(defmethod new game-save ((allocation symbol) (type-to-make type) (arg0 int)) + "Allocate a game save. arg0 is the number of bytes for tags." + (let ((v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (the-as uint arg0)))))) + (set! (-> v0-0 version) SAVE_VERSION) + (set! (-> v0-0 allocated-length) arg0) + v0-0 + ) + ) + +(defun-debug game-save-elt->string ((arg0 game-save-elt)) + "Convert a game-save-elt to a string" + (let ((v1-0 arg0)) + (cond + ((= v1-0 (game-save-elt aspect-ratio)) "aspect-ratio") + ((= v1-0 (game-save-elt video-mode)) "video-mode") + ((= v1-0 (game-save-elt play-hints)) "play-hints") + ((= v1-0 (game-save-elt vibration)) "vibration") + ((= v1-0 (game-save-elt screeny)) "screeny") + ((= v1-0 (game-save-elt screenx)) "screenx") + ((= v1-0 (game-save-elt language)) "language") + ((= v1-0 (game-save-elt dialog-volume)) "dialog-volume") + ((= v1-0 (game-save-elt music-volume)) "music-volume") + ((= v1-0 (game-save-elt sfx-volume)) "sfx-volume") + ((= v1-0 (game-save-elt in-level-time)) "in-level-time") + ((= v1-0 (game-save-elt auto-save-count)) "auto-save-count") + ((= v1-0 (game-save-elt death-pos)) "death-pos") + ((= v1-0 (game-save-elt deaths-per-level)) "deaths-per-level") + ((= v1-0 (game-save-elt enter-level-time)) "enter-level-time") + ((= v1-0 (game-save-elt fuel-cell-time)) "fuel-cell-time") + ((= v1-0 (game-save-elt continue-time)) "continue-time") + ((= v1-0 (game-save-elt fuel-cell-pickup-time)) "fuel-cell-pickup-time") + ((= v1-0 (game-save-elt hit-time)) "hit-time") + ((= v1-0 (game-save-elt death-time)) "death-time") + ((= v1-0 (game-save-elt continue-timke)) "continue-timke") + ((= v1-0 (game-save-elt game-start-time)) "game-start-time") + ((= v1-0 (game-save-elt fuel-cell-deaths)) "fuel-cell-deaths") + ((= v1-0 (game-save-elt continue-deaths)) "continue-deaths") + ((= v1-0 (game-save-elt total-deaths)) "total-deaths") + ((= v1-0 (game-save-elt level-open-list)) "level-open-list") + ((= v1-0 (game-save-elt text-list)) "text-list") + ((= v1-0 (game-save-elt hint-list)) "hint-list") + ((= v1-0 (game-save-elt perm-list)) "perm-list") + ((= v1-0 (game-save-elt task-list)) "task-list") + ((= v1-0 (game-save-elt death-movie-tick)) "death-movie-tick") + ((= v1-0 (game-save-elt fuel-cell)) "fuel-cell") + ((= v1-0 (game-save-elt buzzer-total)) "buzzer-total") + ((= v1-0 (game-save-elt moeny-per-level)) "money-per-level") + ((= v1-0 (game-save-elt money-total)) "money-total") + ((= v1-0 (game-save-elt money)) "money") + ((= v1-0 (game-save-elt life)) "life") + ((= v1-0 (game-save-elt continue)) "continue") + ((= v1-0 (game-save-elt integral-time)) "integral-time") + ((= v1-0 (game-save-elt game-time)) "game-time") + ((= v1-0 (game-save-elt real-time)) "real-time") + ((= v1-0 (game-save-elt base-time)) "base-time") + ((= v1-0 (game-save-elt name)) "name") + (else "*unknown*") + ) + ) + ) + +(defun progress-level-index->string ((arg0 int)) + "Convert an index for a level in the progress menu (not actual data levels) + to a string (translated)." + (if (< arg0 (-> *level-task-data* length)) + (lookup-text! *common-text* (-> *level-task-data* arg0 level-name-id) #f) + (the-as string #f) + ) + ) + +(defmethod debug-print game-save ((obj game-save) (detail symbol)) + "Print a save to #t" + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~Tversion: ~D~%" (-> obj version)) + (format #t "~Tallocated-length: ~D~%" (-> obj allocated-length)) + (format #t "~Tlength: ~D~%" (-> obj length)) + (format #t "~Tlevel-index: ~D~%" (-> obj level-index)) + (format #t "~Tfuel-cell-count: ~f~%" (-> obj fuel-cell-count)) + (format #t "~Tmoney-count: ~f~%" (-> obj money-count)) + (format #t "~Tbuzzer-count: ~f~%" (-> obj buzzer-count)) + (format #t "~Tcompletion-percentage: ~f~%" (-> obj completion-percentage)) + (format #t "~Tsave-time: ~x:~x ~x/~x/~x~%" + (-> obj hour) + (-> obj minute) + (-> obj day) + (-> obj month) + (-> obj year) + ) + (format #t "~Ttag[]: @ #x~X~%" (-> obj tag)) + + ;; loop through tags + (let ((tag (the-as game-save-tag (-> obj tag))) + (tag-idx 0) + ) + (while (< (the-as int tag) (the-as int (-> obj tag))) + (format #t "~T [~3D] ~-32S [~3D/~3D] ~12D ~8f " + tag-idx + (game-save-elt->string (-> tag elt-type)) + (-> tag elt-count) + (-> tag elt-size) + (-> tag user-uint64) + (-> tag user-float)) + + ;; name/continue are strings + (let ((v1-0 (-> tag elt-type))) + (if (or (= v1-0 (game-save-elt name)) (= v1-0 (game-save-elt continue))) + (format #t "= \"~G\"~%" (&+ (the-as pointer tag) 16)) + (format #t "~%") + ) + ) + + (when detail + (let ((v1-4 (-> tag elt-type))) + (cond + ((or (= v1-4 (game-save-elt moeny-per-level)) (= v1-4 (game-save-elt deaths-per-level))) + ;; per level u8's + (dotimes (prog-lev-idx (-> tag elt-count)) + (let ((lev-name (progress-level-index->string prog-lev-idx))) + (if lev-name + (format #t " ~-32S: ~D~%" + lev-name + (-> (the-as (pointer uint8) (&+ (the-as pointer (&-> (the-as (pointer uint8) tag) 16)) prog-lev-idx))) + ) + ) + ) + ) + ) + ((= v1-4 (game-save-elt enter-level-time)) + ;; per level u64's + (dotimes (s2-2 (-> tag elt-count)) + (let ((a2-14 (progress-level-index->string s2-2))) + (if a2-14 + (format #t " ~-32S: ~D~%" + a2-14 + (-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* s2-2 8)))) + ) + ) + ) + ) + ) + ((= v1-4 (game-save-elt in-level-time)) + (dotimes (s2-3 (-> tag elt-count)) + (let ((a2-15 (progress-level-index->string s2-3))) + (if a2-15 + (format #t " ~-32S: ~D~%" + a2-15 + (-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* s2-3 8)))) + ) + ) + ) + ) + ) + ((= v1-4 (game-save-elt fuel-cell-time)) + (dotimes (s2-4 (-> tag elt-count)) + (let ((a2-16 (game-task->string (the game-task s2-4)))) + (if a2-16 + (format #t " ~-32S: ~D~%" + a2-16 + (-> (the-as (pointer uint64) (&+ (&+ (the-as pointer tag) 16) (* s2-4 8)))) + ) + ) + ) + ) + ) + ) + ) + ) + (set! tag (the-as game-save-tag + (&+ (the-as pointer tag) + (logand -16 (+ (* (the-as int (-> tag elt-size)) (-> tag elt-count)) 31)) + ) + ) + ) + (+! tag-idx 1) + ) + ) + obj + ) + +(defmethod inspect game-save ((obj game-save)) + (debug-print obj #f) + ) + +;; todo method 24 game-info + +(defmethod load-game! game-info ((obj game-info) (save game-save)) + "Copy save data from a game-save to a game-info" + (let ((save-data (the-as game-save-tag (-> save tag)))) + ;; loop over all tags + (while (< (the-as int save-data) (the-as int (+ (+ (-> save length) 76) (the-as int save)))) + (let ((a0-1 (-> save-data elt-type))) + (cond + ((= a0-1 (game-save-elt sfx-volume)) + (set! (-> *setting-control* default sfx-volume) (-> save-data user-float0)) + ) + ((= a0-1 (game-save-elt music-volume)) + (set! (-> *setting-control* default music-volume) (-> save-data user-float0)) + ) + ((= a0-1 (game-save-elt dialog-volume)) + (set! (-> *setting-control* default dialog-volume) (-> save-data user-float0)) + ) + ((= a0-1 (game-save-elt language)) + (set! (-> *setting-control* default language) (the-as int (-> save-data user-uint64))) + ) + ((= a0-1 (game-save-elt vibration)) + (set! (-> *setting-control* default vibration) (= (-> save-data user-uint64) 1)) + ) + ((= a0-1 (game-save-elt play-hints)) + (set! (-> *setting-control* default play-hints) (= (-> save-data user-uint64) 1)) + ) + ) + ) + (set! save-data (the-as game-save-tag + (&+ (the-as pointer save-data) + (logand -16 (+ (* (the-as int (-> save-data elt-size)) (-> save-data elt-count)) 31)) + ) + ) + ) + ) + ) + + ;; if we're a new game, set our checkpoint. + (when (nonzero? (-> save new-game)) + (set-continue! obj "game-start") + (set! save save) + (goto cfg-134) + ) + + ;; loop over all tags + (let ((data (the-as game-save-tag (-> save tag)))) + (while (< (the-as int data) (the-as int (+ (+ (-> save length) 76) (the-as int save)))) + (let ((v1-7 (-> data elt-type))) + (cond + ((= v1-7 (game-save-elt base-time)) + ;; updating this requires some care to not break things + (let ((old-base-frame (-> *display* base-frame-counter))) + (set! (-> *display* base-frame-counter) (-> data user-uint64)) + ;; remember the old value + (set! (-> *display* old-base-frame-counter) (+ (-> *display* base-frame-counter) -1)) + (let ((frame-counter-diff (- (-> *display* base-frame-counter) old-base-frame))) + + ;; update in-progress counters + (if (nonzero? (-> obj blackout-time)) + (set! (-> obj blackout-time) (+ (-> obj blackout-time) frame-counter-diff)) + ) + (if (nonzero? (-> obj letterbox-time)) + (set! (-> obj letterbox-time) (+ (-> obj letterbox-time) frame-counter-diff)) + ) + (if (nonzero? (-> obj hint-play-time)) + (set! (-> obj hint-play-time) (+ (-> obj hint-play-time) frame-counter-diff)) + ) + (if (nonzero? (-> obj display-text-time)) + (set! (-> obj display-text-time) (+ (-> obj display-text-time) frame-counter-diff)) + ) + ) + ) + ;; vibration may get stuck on if we warp back in time, just kill it + (buzz-stop! 0) + ) + + ((= v1-7 (game-save-elt game-time)) + (set! (-> *display* game-frame-counter) (-> data user-uint64)) + (set! (-> *display* old-game-frame-counter) (+ (-> *display* game-frame-counter) -1)) + ) + ((= v1-7 (game-save-elt real-time)) + (set! (-> *display* real-frame-counter) (-> data user-uint64)) + (set! (-> *display* old-real-frame-counter) (+ (-> *display* real-frame-counter) -1)) + ) + ((= v1-7 (game-save-elt integral-time)) + (set! (-> *display* integral-frame-counter) (-> data user-uint64)) + (set! (-> *display* old-integral-frame-counter) (+ (-> *display* integral-frame-counter) -1)) + ) + ((= v1-7 (game-save-elt continue)) + (format (clear *temp-string*) "~G" (&+ (the-as pointer data) 16)) + (set-continue! obj *temp-string*) + ) + ((= v1-7 (game-save-elt life)) + (set! (-> obj life) (-> data user-float0)) + ) + ((= v1-7 (game-save-elt buzzer-total)) + (set! (-> obj buzzer-total) (-> data user-float0)) + ) + ((= v1-7 (game-save-elt fuel-cell)) + (set! (-> obj fuel) (-> data user-float0)) + ) + ((= v1-7 (game-save-elt death-movie-tick)) + (set! (-> obj death-movie-tick) (the-as int (-> data user-uint64))) + ) + ((= v1-7 (game-save-elt money)) + (set! (-> obj money) (-> data user-float0)) + ) + ((= v1-7 (game-save-elt money-total)) + (set! (-> obj money-total) (-> data user-float0)) + ) + ((= v1-7 (game-save-elt moeny-per-level)) + (let ((v1-34 (min 32 (-> data elt-count)))) + (dotimes (a0-76 v1-34) + (set! + (-> obj money-per-level a0-76) + (-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a0-76) + ) + ) + ) + ) + ((= v1-7 (game-save-elt level-open-list)) + (let ((v1-38 (min 32 (-> data elt-count)))) + (dotimes (a0-80 v1-38) + (set! + (-> obj level-opened a0-80) + (-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a0-80) + ) + ) + ) + ) + ((= v1-7 (game-save-elt perm-list)) + (let ((s3-2 (min (-> data elt-count) (-> obj perm-list allocated-length)))) + (set! (-> obj perm-list length) s3-2) + (dotimes (s2-0 s3-2) + (mem-copy! + (the-as pointer (-> obj perm-list data s2-0)) + (&+ (&+ (the-as pointer data) 16) (* s2-0 16)) + 16 + ) + ) + ) + ) + ((= v1-7 (game-save-elt task-list)) + (let ((s3-4 (min (-> data elt-count) (-> obj task-perm-list allocated-length)))) + (set! (-> obj task-perm-list length) s3-4) + (dotimes (s2-1 s3-4) + (mem-copy! + (the-as pointer (-> obj task-perm-list data s2-1)) + (&+ (&+ (the-as pointer data) 16) (* s2-1 16)) + 16 + ) + ) + ) + ) + ((= v1-7 (game-save-elt text-list)) + (let ((v1-61 (/ (logand -8 (+ (-> obj text-ids-seen allocated-length) 7)) 8)) + (a0-94 (-> data elt-count))) + (dotimes (a1-35 v1-61) + (cond + ((>= a1-35 a0-94) + (set! (-> obj text-ids-seen bytes a1-35) (the-as uint 0)) + 0 + ) + (else + (set! (-> obj text-ids-seen bytes a1-35) + (-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a1-35) + ) + ) + ) + ) + ) + ) + ((= v1-7 (game-save-elt hint-list)) + (cond + ((= (-> obj hint-control length) (-> data elt-count)) + (let ((v1-65 (&+ (the-as pointer data) 16))) + (dotimes (a0-99 (-> data elt-count)) + (set! (-> obj hint-control a0-99 start-time) + (-> (the-as (pointer uint64) (&+ v1-65 (* (* a0-99 4) 8)))) + ) + (set! (-> obj hint-control a0-99 last-time-called) + (-> (the-as (pointer uint64) (&+ v1-65 (* (+ (* a0-99 4) 1) 8)))) + ) + (set! (-> obj hint-control a0-99 num-attempts) + (-> (the-as (pointer int8) + (&+ (the-as (pointer uint8) v1-65) (+ (* a0-99 32) 16)) + ) + ) + ) + (set! + (-> obj hint-control a0-99 num-success) + (-> (the-as (pointer int8) + (&+ (the-as (pointer uint8) v1-65) (+ (* a0-99 32) 17)) + ) + ) + ) + ) + ) + ) + (else + (format + 0 + "WARNING: SAVEGAME: hint control list did not match current, ignoring~%" + ) + ) + ) + ) + ((= v1-7 (game-save-elt auto-save-count)) + (set! (-> obj auto-save-count) (the-as int (-> data user-uint64))) + ) + ((= v1-7 (game-save-elt total-deaths)) + (set! (-> obj total-deaths) (the-as int (-> data user-uint64))) + ) + ((= v1-7 (game-save-elt continue-deaths)) + (set! (-> obj continue-deaths) (the-as int (-> data user-uint64))) + ) + ((= v1-7 (game-save-elt fuel-cell-deaths)) + (set! (-> obj fuel-cell-deaths) (the-as int (-> data user-uint64))) + ) + ((= v1-7 (game-save-elt game-start-time)) + (set! (-> obj game-start-time) (-> data user-uint64)) + ) + ((= v1-7 (game-save-elt continue-time)) + (set! (-> obj continue-time) (-> data user-uint64)) + ) + ((= v1-7 (game-save-elt death-time)) + (set! (-> obj death-time) (-> data user-uint64)) + ) + ((= v1-7 (game-save-elt hit-time)) + (set! (-> obj hit-time) (-> data user-uint64)) + ) + ((= v1-7 (game-save-elt fuel-cell-pickup-time)) + (set! (-> obj fuel-cell-pickup-time) (-> data user-uint64)) + ) + ((= v1-7 (game-save-elt deaths-per-level)) + (let ((v1-79 (min 32 (-> data elt-count)))) + (dotimes (a0-122 v1-79) + (set! + (-> obj deaths-per-level a0-122) + (-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a0-122) + ) + ) + ) + ) + ((= v1-7 (game-save-elt enter-level-time)) + (let ((v1-83 (min 32 (-> data elt-count)))) + (dotimes (a0-126 v1-83) + (set! (-> obj enter-level-time a0-126) + (-> (the-as (pointer uint64) (&+ (&+ (the-as pointer data) 16) (* a0-126 8)))) + ) + ) + ) + ) + ((= v1-7 (game-save-elt in-level-time)) + (let ((v1-87 (min 32 (-> data elt-count)))) + (dotimes (a0-130 v1-87) + (set! (-> obj in-level-time a0-130) + (-> (the-as (pointer uint64) (&+ (&+ (the-as pointer data) 16) (* a0-130 8)))) + ) + ) + ) + ) + ((= v1-7 (game-save-elt fuel-cell-time)) + (let ((v1-92 (min 32 (-> data elt-count)))) + (dotimes (a0-133 v1-92) + (set! (-> obj fuel-cell-time a0-133) + (-> (the-as (pointer uint64) (&+ (&+ (the-as pointer data) 16) (* a0-133 8)))) + ) + ) + ) + ) + ) + ) + (set! data (the-as game-save-tag (&+ (the-as pointer data) + (logand -16 + (+ (* (the-as int (-> data elt-size)) (-> data elt-count)) 31) + ) + ) + ) + ) + ) + ) + + ;; update entity stuff in levels that are active + (dotimes (s4-1 (-> *level* length)) + (let ((a1-68 (-> *level* level s4-1))) + (if (= (-> a1-68 status) 'active) + (copy-perms-to-level! obj a1-68) + ) + ) + ) + ;; update tasks + (let ((s5-1 2) ;; jungle eggtop + (s4-2 115) ;; max - 1 + ) + (while (>= (the-as uint s4-2) (the-as uint s5-1)) + ;; calling this will run the function to see if the task is done or not + (get-task-status (the-as game-task s5-1)) + (+! s5-1 1) + ) + ) + (label cfg-134) + save + ) + +(defmethod save-to-file game-save ((obj game-save) (arg0 string)) + "Write a game save to a file for debugging" + (let ((s5-0 (new 'stack 'file-stream arg0 'write))) + (file-stream-write s5-0 + (&-> obj type) + (+ (-> obj type size) (the-as uint (-> obj length))) + ) + (file-stream-close s5-0) + ) + obj + ) + +(defmethod load-from-file! game-save ((obj game-save) (filename string)) + (let ((stream (new 'stack 'file-stream filename 'read))) + (let ((in-size (file-stream-length stream)) + (my-size (-> obj allocated-length)) + ) + (cond + ((>= (asize-of obj) in-size) + ;; thing in file is not bigger than we are, safe to read. + (cond + ((= (file-stream-read stream (&-> obj type) in-size) in-size) + ;; read success! set the type tag + (set! (-> obj type) game-save) + ) + (else + ;; fail. + (format 0 "ERROR: SAVEGAME: save file ~A did not read correctly.~%" stream) + (set! (-> obj length) 0) + 0 + ) + ) + ) + (else + ;; file is bigger than we are, just give up because we don't have + ;; enough room to put the save + (format 0 "ERROR: SAVEGAME: save file ~A is too big~%" stream) + ) + ) + (set! (-> obj allocated-length) my-size) + ) + (when (!= (-> obj version) SAVE_VERSION) + ;; uh-oh, the version is wrong + (format 0 "ERROR: SAVEGAME: save file ~A was version ~d, but only ~d is supported.~%" + stream + (-> obj version) + SAVE_VERSION + ) + (set! (-> obj length) 0) + 0 + ) + (file-stream-close stream) + ) + obj + ) + +;; TODO sparticle stuff and more + ;; TODO - for credits (define-extern print-game-text (function string font-context symbol int int float)) ; TODO decomp error, this seems correct though diff --git a/goal_src/engine/game/main-h.gc b/goal_src/engine/game/main-h.gc index 68c002f8c4..b7bb76f839 100644 --- a/goal_src/engine/game/main-h.gc +++ b/goal_src/engine/game/main-h.gc @@ -131,3 +131,4 @@ (defun-extern set-blackout-frames int uint) (defun-extern on symbol process) (defun-extern off int) +(define-extern set-master-mode (function symbol none)) \ No newline at end of file diff --git a/goal_src/engine/game/task/hint-control-h.gc b/goal_src/engine/game/task/hint-control-h.gc index 9c5cafc26e..9b6d9bafd5 100644 --- a/goal_src/engine/game/task/hint-control-h.gc +++ b/goal_src/engine/game/task/hint-control-h.gc @@ -36,3 +36,5 @@ :size-assert #x4 :flag-assert #x900000004 ) + +(define-extern reset-all-hint-controls (function none)) \ No newline at end of file diff --git a/goal_src/engine/game/task/task-control-h.gc b/goal_src/engine/game/task/task-control-h.gc index 08373bcc87..c1385e47e5 100644 --- a/goal_src/engine/game/task/task-control-h.gc +++ b/goal_src/engine/game/task/task-control-h.gc @@ -5,7 +5,21 @@ ;; name in dgo: task-control-h ;; dgos: GAME, ENGINE -;; custom enums +;; There are a fixed number of game tasks. Most are just getting a power cell, +;; but there are also ones for using the levitator etc. + +;; The list of all tasks is the game-task enum in game-info-h.gc + +;; the task control contains a list of all cstage. +;; Each task may have multiple cstages. +;; Each cstage corresponds to a game-task and a task-status. + +;; There is a concept of a "current stage" being played, but it may sometimes be invalid (-1). +;; it is an index into the task-control list + +;; names from task-status->string function +;; the status value will increase. +;; some tasks may do their own thing and not use these values. (defenum task-status :type uint64 (invalid 0) @@ -16,172 +30,59 @@ (need-reminder 5) (need-reward-speech 6) (need-resolution 7) - (*unknown* 999999) ) -(defenum game-task +;; our names +(defenum task-flags :type uint8 - (none 0) - (complete 1) - (jungle-eggtop 2) - (jungle-lurkerm 3) - (jungle-tower 4) - (jungle-fishgame 5) - (jungle-plant 6) - (jungle-buzzer 7) - (jungle-canyon-end 8) - (jungle-temple-door 9) - (village1-yakow 10) - (village1-mayor-money 11) - (village1-uncle-money 12) - (village1-oracle-money1 13) - (village1-oracle-money2 14) - (beach-ecorocks 15) - (beach-pelican 16) - (beach-flutflut 17) - (beach-seagull 18) - (beach-cannon 19) - (beach-buzzer 20) - (beach-gimmie 21) - (beach-sentinel 22) - (misty-muse 23) - (misty-boat 24) - (misty-warehouse 25) - (misty-cannon 26) - (misty-bike 27) - (misty-buzzer 28) - (misty-bike-jump 29) - (misty-eco-challenge 30) - (village2-gambler-money 31) - (village2-geologist-money 32) - (village2-warrior-money 33) - (village2-oracle-money1 34) - (village2-oracle-money2 35) - (swamp-billy 36) - (swamp-flutflut 37) - (swamp-battle 38) - (swamp-tether-1 39) - (swamp-tether-2 40) - (swamp-tether-3 41) - (swamp-tether-4 42) - (swamp-buzzer 43) - (sunken-platforms 44) - (sunken-pipe 45) - (sunken-slide 46) - (sunken-room 47) - (sunken-sharks 48) - (sunken-buzzer 49) - (sunken-top-of-helix 50) - (sunken-spinning-room 51) - (rolling-race 52) - (rolling-robbers 53) - (rolling-moles 54) - (rolling-plants 55) - (rolling-lake 56) - (rolling-buzzer 57) - (rolling-ring-chase-1 58) - (rolling-ring-chase-2 59) - (snow-eggtop 60) - (snow-ram 61) - (snow-fort 62) - (snow-ball 63) - (snow-bunnies 64) - (snow-buzzer 65) - (snow-bumpers 66) - (snow-cage 67) - (firecanyon-buzzer 68) - (firecanyon-end 69) - (citadel-sage-green 70) - (citadel-sage-blue 71) - (citadel-sage-red 72) - (citadel-sage-yellow 73) - (village3-extra1 74) - (village1-buzzer 75) - (village2-buzzer 76) - (village3-buzzer 77) - (cave-gnawers 78) - (cave-dark-crystals 79) - (cave-dark-climb 80) - (cave-robot-climb 81) - (cave-swing-poles 82) - (cave-spider-tunnel 83) - (cave-platforms 84) - (cave-buzzer 85) - (ogre-boss 86) - (ogre-end 87) - (ogre-buzzer 88) - (lavatube-end 89) - (lavatube-buzzer 90) - (citadel-buzzer 91) - (training-gimmie 92) - (training-door 93) - (training-climb 94) - (training-buzzer 95) - (village3-miner-money1 96) - (village3-miner-money2 97) - (village3-miner-money3 98) - (village3-miner-money4 99) - (village3-oracle-money1 100) - (village3-oracle-money2 101) - (firecanyon-assistant 102) - (village2-levitator 103) - (swamp-arm 104) - (village3-button 105) - (red-eggtop 106) - (lavatube-balls 107) - (lavatube-start 108) - (intro 109) - (ogre-secret 110) - (village4-button 111) - (finalboss-movies 112) - (plunger-lurker-hit 113) - (leaving-misty 114) - (assistant-village3 115) - (max 116) - (*unknown* 255)) + :bitfield #t + (closed 0) + (has-entity 1) + (closed-by-default 2) + ) -;; definition of type task-cstage (declare-type task-control basic) + +;; A task-cstage describes (deftype task-cstage (structure) - ((game-task game-task :offset-assert 0) - (status task-status :offset-assert 8) - (flags uint8 :offset-assert 16) - (condition (function task-control symbol) :offset-assert 20) + ((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) ) :method-count-assert 16 :size-assert #x18 :flag-assert #x1000000018 (:methods - (get-game-task (_type_) uint 9) - (get-task-status (_type_) uint 10) - (TODO-RENAME-11 (_type_ task-control) symbol 11) - (first-flag-bit? (_type_) symbol 12) - (third-flag-bit? (_type_) symbol 13) - (TODO-RENAME-14 (_type_) int 14) - (clear-all-but-first-flag-bit (_type_) int 15) - ) + (get-game-task (_type_) game-task 9) + (get-task-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) + ) ) -;; definition of type task-control (deftype task-control (basic) - ((current-stage int16 :offset-assert 4) - (stage (array task-cstage) :offset-assert 8) + ((current-stage int16 :offset-assert 4) + (stage (array task-cstage) :offset-assert 8) ) :method-count-assert 19 :size-assert #xc :flag-assert #x130000000c (:methods - (current-task (_type_) int 9) - (current-status (_type_) int 10) - (close-current! (_type_) none 11) - (close-status! (_type_ int) int 12) - (first-any (_type_ symbol) int 13) - (reset! (_type_ symbol symbol) int 14) - (closed? (_type_ int int) symbol 15) - (get-reminder (_type_ int) int 16) - (save-reminder (_type_ int int) int 17) ;; TODO - i believe this is none - (exists? (_type_ int int) symbol 18) - ) + (current-task (_type_) int 9) + (current-status (_type_) int 10) + (close-current! (_type_) none 11) + (close-status! (_type_ task-status) int 12) + (first-any (_type_ symbol) int 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) + (exists? (_type_ game-task task-status) symbol 18) + ) ) ;; definition of type ambient-control @@ -269,4 +170,7 @@ ) ) -(define-extern task-closed? (function int int symbol)) +(define-extern task-closed? (function game-task task-status symbol)) +(define-extern get-task-status (function game-task task-status)) +(define-extern get-task-control (function game-task task-control)) +(define-extern close-specific-task! (function game-task task-status int)) diff --git a/goal_src/engine/game/task/task-control.gc b/goal_src/engine/game/task/task-control.gc index 926ea27641..ff395b722a 100644 --- a/goal_src/engine/game/task/task-control.gc +++ b/goal_src/engine/game/task/task-control.gc @@ -1,12 +1,8 @@ ;;-*-Lisp-*- (in-package goal) -;; name: task-control.gc -;; name in dgo: task-control -;; dgos: GAME, ENGINE - ;; definition (debug) for function task-status->string -(defun-debug task-status->string ((arg0 int)) +(defun-debug task-status->string ((arg0 task-status)) (let ((v1-0 arg0)) (cond ((= v1-0 7) @@ -40,88 +36,91 @@ ) ) -;; definition for method 9 of type task-cstage -;; INFO: Return type mismatch game-task vs uint. (defmethod get-game-task task-cstage ((obj task-cstage)) - (the-as uint (-> obj game-task)) + "Get the game task for this cstage" + (-> obj game-task) ) -;; definition for method 10 of type task-cstage -;; INFO: Return type mismatch task-status vs uint. (defmethod get-task-status task-cstage ((obj task-cstage)) - (the-as uint (-> obj status)) + "Get the status for this cstage" + (-> obj status) ) -;; definition for method 12 of type task-cstage -(defmethod first-flag-bit? task-cstage ((obj task-cstage)) - (nonzero? (logand (-> obj flags) 1)) +(defmethod closed? task-cstage ((obj task-cstage)) + "Is the closed flag set?" + (nonzero? (logand (-> obj flags) (task-flags closed))) ) -;; definition for method 13 of type task-cstage -(defmethod third-flag-bit? task-cstage ((obj task-cstage)) - (nonzero? (logand (-> obj flags) 4)) +(defmethod closed-by-default? task-cstage ((obj task-cstage)) + "Is the closed-by-default flag set?" + (nonzero? (logand (-> obj flags) (task-flags closed-by-default))) ) -;; definition for method 11 of type task-cstage -(defmethod TODO-RENAME-11 task-cstage ((obj task-cstage) (arg0 task-control)) +(defmethod task-available? task-cstage ((obj task-cstage) (arg0 task-control)) + "Is this task available to be the current task?" (let ((a0-1 obj)) - (cond - ((nonzero? (logand (-> a0-1 flags) 1)) - #f - ) - ((>= - (the-as - int - (-> (dummy-13 *game-info* (the-as uint (-> obj game-task))) user-uint8 0) + (cond + ((nonzero? (logand (-> a0-1 flags) (task-flags closed))) + ;; closed flag is set, we're already closed. + #f + ) + ((>= (the-as int (-> (get-entity-task-perm *game-info* (-> obj game-task)) user-uint8 0)) + (the-as int (-> obj status)) + ) + ;; the permanent entity for this task has stored that we have progresssed past + ;; our status. Remember that we are closed, and return #f. + (set! (-> obj flags) (logior (-> obj flags) (task-flags closed))) + #f + ) + ((task-complete? *game-info* (-> obj game-task)) + ;; the game-info thinks that we have completed this task already. + ;; remember we are closed and return #f + (set! (-> obj flags) (logior (-> obj flags) (task-flags closed))) + #f + ) + (else + ;; we aren't closed. Check the condition. + ((-> obj condition) arg0) ) - (the-as int (-> obj status)) ) - (set! (-> obj flags) (logior (-> obj flags) 1)) - #f - ) - ((let ((t9-1 (method-of-object *game-info* dummy-11))) - (-> obj game-task) - (t9-1) - ) - (set! (-> obj flags) (logior (-> obj flags) 1)) - #f - ) - (else - ((-> obj condition) arg0) - ) ) - ) ) -;; definition for method 14 of type task-cstage -(defmethod TODO-RENAME-14 task-cstage ((obj task-cstage)) +(defmethod close-task! task-cstage ((obj task-cstage)) + "Close this task!" (if (= (-> obj game-task) (game-task none)) - (return (the-as int #f)) - ) - (set! (-> obj flags) (logior (-> obj flags) 1)) - (when (nonzero? (logand (-> obj flags) 2)) - (let ((v1-9 (dummy-13 *game-info* (the-as uint (-> obj game-task))))) - (set! - (-> v1-9 status) - (logior (-> v1-9 status) (entity-perm-status unknown)) - ) - (if (< (-> v1-9 user-uint8 0) (the-as uint (-> obj status))) - (set! (-> v1-9 user-int8 0) (the-as int (-> obj status))) - ) + ;; invalid task. + (return (the-as int #f)) + ) + + ;; flag as closed + (set! (-> obj flags) (logior (-> obj flags) (task-flags closed))) + ;; do we have an entity to update? + (when (nonzero? (logand (-> obj flags) (task-flags has-entity))) + + ;; look up the permanent storage for the entity associated with our task + (let ((v1-9 (get-entity-task-perm *game-info* (-> obj game-task)))) + ;; we set a bit to indicate that we are storing a non-default status + (set! (-> v1-9 status) + (logior (-> v1-9 status) (entity-perm-status user-set-from-cstage)) + ) + ;; and store the actual status (only increment) + (if (< (-> v1-9 user-uint8 0) (the-as uint (-> obj status))) + (set! (-> v1-9 user-int8 0) (the-as int (-> obj status))) + ) + ) ) - ) 0 ) -;; definition for method 15 of type task-cstage -(defmethod clear-all-but-first-flag-bit task-cstage ((obj task-cstage)) - (set! (-> obj flags) (logand -2 (the-as int (-> obj flags)))) +(defmethod open-task! task-cstage ((obj task-cstage)) + "Clear the closed flag." + (set! (-> obj flags) (logand (lognot (task-flags closed)) (-> obj flags))) 0 ) -;; definition for symbol *null-task-control*, type task-control -(define - *null-task-control* +;; a task-control containing no cstages +(define *null-task-control* (new 'static 'task-control :current-stage -1 :stage @@ -129,334 +128,357 @@ ) ) -;; definition for method 9 of type task-control (defmethod current-task task-control ((obj task-control)) - (the-as int (cond - ((= obj *null-task-control*) - (format - 0 - "ERROR: current-task received *null-task-control*~%" - ) - 0 - ) - ((= (-> obj current-stage) -1) - 0 - ) - (else - (the-as int (-> obj stage (-> obj current-stage) game-task)) - ) - ) - ) - ) - -;; definition for method 10 of type task-control -(defmethod current-status task-control ((obj task-control)) - (the-as int (cond - ((= obj *null-task-control*) - (format - 0 - "ERROR: current-status received self of *null-task-control*~%~%" - ) - 0 - ) - ((= (-> obj current-stage) -1) - 0 - ) - (else - (the-as int (-> obj stage (-> obj current-stage) status)) - ) - ) - ) - ) - -;; definition for method 11 of type task-control -;; INFO: Return type mismatch int vs none. -(defmethod close-current! task-control ((obj task-control)) + "Get the current task that is being played. If unknown returns the none task" (cond - ((= obj *null-task-control*) - (format - 0 - "ERROR: close-current! received self of *null-task-control*~%~%" + ((= obj *null-task-control*) + (format 0 "ERROR: current-task received *null-task-control*~%") + (game-task none) + ) + ((= (-> obj current-stage) -1) + ;; state unknown + (game-task none) + ) + (else + ;; look up the current cstage's task + (the-as int (-> obj stage (-> obj current-stage) game-task)) + ) + + ) + ) + +(defmethod current-status task-control ((obj task-control)) + "Get the status of the cstage that is being played. + Will return invalid if not possible" + (cond + ((= obj *null-task-control*) + (format 0 "ERROR: current-status received self of *null-task-control*~%~%") + (task-status invalid) + ) + ((= (-> obj current-stage) -1) + (task-status invalid) + ) + (else + (the-as int (-> obj stage (-> obj current-stage) status)) ) ) + + ) + +(defmethod close-current! task-control ((obj task-control)) + "Close the current cstage, if there is a current cstage" + (cond + ((= obj *null-task-control*) + (format 0 "ERROR: close-current! received self of *null-task-control*~%~%") + ) ((= (-> obj current-stage) -1) + ;; no current stage, do nothing ) (else - (TODO-RENAME-14 (-> obj stage (-> obj current-stage))) + (close-task! (-> obj stage (-> obj current-stage))) ) ) + ;; attempt to update the current task (first-any obj #t) (none) ) ;; definition for method 12 of type task-control -(defmethod close-status! task-control ((obj task-control) (arg0 int)) +(defmethod close-status! task-control ((obj task-control) (arg0 task-status)) + "Close the cstage that: + - is associated with the task for the current cstage + - is for the given status + " (let ((a0-2 (current-task obj))) - (dotimes (v1-1 (-> obj stage length)) - (when - (and - (= a0-2 (-> obj stage v1-1 game-task)) - (= arg0 (-> obj stage v1-1 status)) + ;; iterate over all cstages + (dotimes (v1-1 (-> obj stage length)) + (when (and (= a0-2 (-> obj stage v1-1 game-task)) ;; right task + (= arg0 (-> obj stage v1-1 status)) ;; right status + ) + ;; found it! close and update current stage + (close-task! (-> obj stage v1-1)) + (return (first-any obj #t)) + ) ) - (TODO-RENAME-14 (-> obj stage v1-1)) - (return (first-any obj #t)) - ) + ;; nope, complain. + (format 0 "ERROR: close-status! received non-existent task-cstage(~S ~S)--returning #t.~%" + (game-task->string (the game-task a0-2)) + (task-status->string arg0) + ) ) - (format - 0 - "ERROR: close-status! received non-existent task-cstage(~S ~S)--returning #t.~%" - (game-task->string a0-2) - (task-status->string arg0) - ) - ) 0 ) -;; definition for method 13 of type task-control (defmethod first-any task-control ((obj task-control) (arg0 symbol)) + "Iterate through tasks, finding an unclosed one to mark as current + If arg0 is #t, warn on receiving null-task-control" + + ;; check for null (when (= obj *null-task-control*) (if arg0 (format 0 "ERROR: first-any received self of *null-task-control*~%~%") ) (return 0) ) + + ;; iterate through all tasks (dotimes (s5-0 (-> obj stage length)) - (when (TODO-RENAME-11 (-> obj stage s5-0) obj) - (set! (-> obj current-stage) s5-0) - (return (the-as int (-> obj stage s5-0 game-task))) + (when (task-available? (-> obj stage s5-0) obj) + ;; found an available task, set it. + (set! (-> obj current-stage) s5-0) + (return (the-as int (-> obj stage s5-0 game-task))) + ) ) - ) + ;; none available. (set! (-> obj current-stage) -1) 0 ) -;; definition for method 14 of type task-control (defmethod reset! task-control ((obj task-control) (arg0 symbol) (arg1 symbol)) + "Reset a task control. arg1 to warn on null, arg1 'game for a game reset" (when (= obj *null-task-control*) - (if arg1 - (format 0 "ERROR: reset! received self of *null-task-control*~%~%") - ) - (return 0) - ) - (dotimes (s4-0 (-> obj stage length)) - (if (or (= arg0 'game) (let ((a0-4 (-> obj stage s4-0))) - (not (nonzero? (logand (-> a0-4 flags) 4))) - ) + (if arg1 + (format 0 "ERROR: reset! received self of *null-task-control*~%~%") ) - (clear-all-but-first-flag-bit (-> obj stage s4-0)) + (return 0) ) - (let ((a0-10 (-> obj stage s4-0))) - (if (nonzero? (logand (-> a0-10 flags) 1)) - (TODO-RENAME-14 (-> obj stage s4-0)) - ) + (dotimes (s4-0 (-> obj stage length)) + ;; do we open the task? + (if (or (= arg0 'game) ;; if we're resetting the whole game, yes + (let ((a0-4 (-> obj stage s4-0))) + (not (nonzero? (logand + (-> a0-4 flags) + (task-flags closed-by-default) ;; todo this flag? + ) + ) + ) + ) + ) + (open-task! (-> obj stage s4-0)) + ) + + ;; call close-task! to send closed stuff to entities + (let ((a0-10 (-> obj stage s4-0))) + (if (nonzero? (logand (-> a0-10 flags) (task-flags closed))) + (close-task! (-> obj stage s4-0)) + ) + ) ) - ) (the-as int #f) ) -;; definition for method 15 of type task-control -(defmethod closed? task-control ((obj task-control) (arg0 int) (arg1 int)) + +(defmethod closed? task-control ((obj task-control) (arg0 game-task) (arg1 task-status)) + "Is the given task/status cstage closed?" (when (= obj *null-task-control*) - (format 0 "ERROR: closed? received self of *null-task-control*~%~%") - (return #f) - ) - (dotimes (v1-3 (-> obj stage length)) - (when - (and - (= arg0 (-> obj stage v1-3 game-task)) - (= arg1 (-> obj stage v1-3 status)) - ) - (let ((a0-3 (-> obj stage v1-3))) - (return (nonzero? (logand (-> a0-3 flags) 1))) - ) + (format 0 "ERROR: closed? received self of *null-task-control*~%~%") + (return #f) ) - ) - (format - 0 - "ERROR: closed? received non-existent task-cstage(~S ~S)--returning #t.~%" - (game-task->string arg0) - (task-status->string arg1) - ) + ;; iterate all and check for match + (dotimes (v1-3 (-> obj stage length)) + (when (and (= arg0 (-> obj stage v1-3 game-task)) + (= arg1 (-> obj stage v1-3 status)) + ) + (let ((a0-3 (-> obj stage v1-3))) + ;; is the closed set? + (return (nonzero? (logand (-> a0-3 flags) (task-flags closed)))) + ) + ) + ) + (format 0 "ERROR: closed? received non-existent task-cstage(~S ~S)--returning #t.~%" + (game-task->string arg0) + (task-status->string arg1) + ) #t ) -;; definition for method 18 of type task-control -(defmethod exists? task-control ((obj task-control) (arg0 int) (arg1 int)) +(defmethod exists? task-control ((obj task-control) (arg0 game-task) (arg1 task-status)) + "Is there a cstage for the given task and status?" (when (= obj *null-task-control*) (format 0 "ERROR: exists? received self of *null-task-control*~%~%") (return #f) ) (dotimes (v1-3 (-> obj stage length)) - (if - (and - (= arg0 (-> obj stage v1-3 game-task)) - (= arg1 (-> obj stage v1-3 status)) - ) + (if (and (= arg0 (-> obj stage v1-3 game-task)) (= arg1 (-> obj stage v1-3 status))) (return #t) ) ) #f ) -;; definition for method 16 of type task-control (defmethod get-reminder task-control ((obj task-control) (arg0 int)) + "Get the arg0th reminder. " (when (= obj *null-task-control*) - (format - 0 - "ERROR: get-reminder received self of *null-task-control*~%~%" + (format 0 "ERROR: get-reminder received self of *null-task-control*~%~%") + (return 0) + ) + (let ((v1-4 (get-entity-task-perm *game-info* (-> obj stage 0 game-task)))) + (the-as int (-> v1-4 user-uint8 (+ arg0 1))) ) - (return 0) - ) - (let ((v1-4 (dummy-13 *game-info* (the-as uint (-> obj stage 0 game-task))))) - (the-as int (-> v1-4 user-uint8 (+ arg0 1))) - ) ) -;; definition for method 17 of type task-control (defmethod save-reminder task-control ((obj task-control) (arg0 int) (arg1 int)) + "Set the arg1th reminder to arg0" (when (= obj *null-task-control*) - (format - 0 - "ERROR: save-reminder received self of *null-task-control*~%~%" + (format 0 "ERROR: save-reminder received self of *null-task-control*~%~%") + (return 0) ) - (return 0) - ) - (let ((v1-4 (dummy-13 *game-info* (the-as uint (-> obj stage 0 game-task))))) - (set! - (-> v1-4 status) - (logior (-> v1-4 status) (entity-perm-status unknown)) + (let ((v1-4 (get-entity-task-perm *game-info* (-> obj stage 0 game-task)))) + ;; remember that we have a change. + (set! (-> v1-4 status) + (logior (-> v1-4 status) (entity-perm-status user-set-from-cstage)) + ) + (set! (-> v1-4 user-int8 (+ arg1 1)) arg0) ) - (set! (-> v1-4 user-int8 (+ arg1 1)) arg0) - ) 0 ) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Task Control Definitions +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; definition for symbol *assistant-tasks*, type task-control -(define - *assistant-tasks* - (new 'static 'task-control - :current-stage -1 - :stage - (new - 'static - 'boxed-array - :type task-cstage :length 12 :allocated-length 12 - (new 'static 'task-cstage - :game-task (game-task jungle-eggtop) - :status (task-status need-hint) - :flags #x6 - :condition (lambda ((arg0 task-control)) #t) - ) - (new 'static 'task-cstage - :game-task (game-task jungle-eggtop) - :status (task-status need-introduction) - :flags #x6 - :condition (lambda ((arg0 task-control)) #t) - ) - (new 'static 'task-cstage - :game-task (game-task misty-bike) - :status (task-status need-hint) - :flags #x6 - :condition - (lambda - ((arg0 task-control)) - (with-pp - (or - (closed? arg0 2 5) - (and - (closed? arg0 2 3) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 2) - (set! (-> a1-2 message) 'query) - (set! (-> a1-2 param 0) (the-as uint 'pickup)) - (set! (-> a1-2 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-2)) - (+ (get-reminder arg0 1) 3) - ) - ) +(define *assistant-tasks* + (new 'static 'task-control + :current-stage -1 + :stage + (new 'static 'boxed-array + :type task-cstage :length 12 :allocated-length 12 + (new 'static 'task-cstage + :game-task (game-task jungle-eggtop) + :status (task-status need-hint) + :flags + (task-flags has-entity closed-by-default) + :condition (lambda ((arg0 task-control)) #t) + ) + (new 'static 'task-cstage + :game-task (game-task jungle-eggtop) + :status (task-status need-introduction) + :flags + (task-flags has-entity closed-by-default) + :condition (lambda ((arg0 task-control)) #t) + ) + (new 'static 'task-cstage + :game-task (game-task misty-bike) + :status (task-status need-hint) + :flags + (task-flags has-entity closed-by-default) + :condition + (lambda + ((arg0 task-control)) + (with-pp + (or + (closed? arg0 (game-task jungle-eggtop) (task-status need-reminder)) + (and + (closed? + arg0 + (game-task jungle-eggtop) + (task-status need-introduction) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) pp) + (set! (-> a1-2 num-params) 2) + (set! (-> a1-2 message) 'query) + (set! (-> a1-2 param 0) (the-as uint 'pickup)) + (set! (-> a1-2 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-2)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + ) + ) + ) + (new 'static 'task-cstage + :game-task (game-task misty-bike) + :status (task-status need-introduction) + :flags + (task-flags has-entity closed-by-default) + :condition + (lambda + ((arg0 task-control)) + (with-pp + (or + (closed? arg0 (game-task jungle-eggtop) (task-status need-reminder)) + (and + (closed? + arg0 + (game-task jungle-eggtop) + (task-status need-introduction) + ) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) pp) + (set! (-> a1-2 num-params) 2) + (set! (-> a1-2 message) 'query) + (set! (-> a1-2 param 0) (the-as uint 'pickup)) + (set! (-> a1-2 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-2)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + ) + ) + ) + (new 'static 'task-cstage + :game-task (game-task jungle-eggtop) + :status (task-status need-reminder) + :flags (task-flags has-entity) + :condition (lambda ((arg0 task-control)) #t) + ) + (new 'static 'task-cstage + :game-task (game-task misty-bike) + :status (task-status unknown) + :condition (lambda ((arg0 task-control)) #t) + ) + (new 'static 'task-cstage + :game-task (game-task misty-bike) + :status (task-status need-reminder-a) + :flags (task-flags has-entity) + :condition (lambda ((arg0 task-control)) #t) + ) + (new 'static 'task-cstage + :game-task (game-task misty-bike) + :status (task-status need-reminder) + :flags (task-flags has-entity) + :condition (lambda ((arg0 task-control)) #t) + ) + (new 'static 'task-cstage + :status (task-status unknown) + :flags (task-flags has-entity) + :condition + (lambda + ((arg0 task-control)) + (task-closed? + (game-task village4-button) + (task-status need-reward-speech) + ) + ) + ) + (new 'static 'task-cstage + :status (task-status need-reminder) + :flags (task-flags has-entity) + :condition (lambda ((arg0 task-control)) #t) + ) + (new 'static 'task-cstage + :game-task (game-task jungle-eggtop) + :status (task-status need-resolution) + :flags (task-flags has-entity) + :condition (lambda ((arg0 task-control)) #t) + ) + (new 'static 'task-cstage + :game-task (game-task misty-bike) + :status (task-status need-resolution) + :flags (task-flags has-entity) + :condition (lambda ((arg0 task-control)) #t) + ) + ) ) - ) - ) - ) - ) - (new 'static 'task-cstage - :game-task (game-task misty-bike) - :status (task-status need-introduction) - :flags #x6 - :condition - (lambda - ((arg0 task-control)) - (with-pp - (or - (closed? arg0 2 5) - (and - (closed? arg0 2 3) - (let ((a1-2 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-2 from) pp) - (set! (-> a1-2 num-params) 2) - (set! (-> a1-2 message) 'query) - (set! (-> a1-2 param 0) (the-as uint 'pickup)) - (set! (-> a1-2 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-2)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - ) - ) - ) - (new 'static 'task-cstage - :game-task (game-task jungle-eggtop) - :status (task-status need-reminder) - :flags #x2 - :condition (lambda ((arg0 task-control)) #t) - ) - (new 'static 'task-cstage - :game-task (game-task misty-bike) - :status (task-status unknown) - :condition (lambda ((arg0 task-control)) #t) - ) - (new 'static 'task-cstage - :game-task (game-task misty-bike) - :status (task-status need-reminder-a) - :flags #x2 - :condition (lambda ((arg0 task-control)) #t) - ) - (new 'static 'task-cstage - :game-task (game-task misty-bike) - :status (task-status need-reminder) - :flags #x2 - :condition (lambda ((arg0 task-control)) #t) - ) - (new 'static 'task-cstage - :status (task-status unknown) - :flags #x2 - :condition - (lambda ((arg0 task-control)) (task-closed? 111 6)) - ) - (new 'static 'task-cstage - :status (task-status need-reminder) - :flags #x2 - :condition (lambda ((arg0 task-control)) #t) - ) - (new 'static 'task-cstage - :game-task (game-task jungle-eggtop) - :status (task-status need-resolution) - :flags #x2 - :condition (lambda ((arg0 task-control)) #t) - ) - (new 'static 'task-cstage - :game-task (game-task misty-bike) - :status (task-status need-resolution) - :flags #x2 - :condition (lambda ((arg0 task-control)) #t) - ) - ) - ) ) ;; definition for symbol *assistant-village2-tasks*, type task-control @@ -477,25 +499,28 @@ (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-reminder-a) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -513,29 +538,32 @@ (new 'static 'task-cstage :game-task (game-task sunken-room) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-room) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (and - (task-closed? 17 5) + (task-closed? (game-task beach-flutflut) (task-status need-reminder)) (or - (closed? arg0 47 5) + (closed? arg0 (game-task sunken-room) (task-status need-reminder)) (and - (closed? arg0 47 3) + (closed? arg0 (game-task sunken-room) (task-status need-introduction)) (let ((a1-4 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-4 from) pp) (set! (-> a1-4 num-params) 2) @@ -556,17 +584,18 @@ (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (and - (task-closed? 17 5) + (task-closed? (game-task beach-flutflut) (task-status need-reminder)) (or - (closed? arg0 47 5) + (closed? arg0 (game-task sunken-room) (task-status need-reminder)) (and - (closed? arg0 47 3) + (closed? arg0 (game-task sunken-room) (task-status need-introduction)) (let ((a1-4 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-4 from) pp) (set! (-> a1-4 num-params) 2) @@ -587,92 +616,104 @@ (new 'static 'task-cstage :game-task (game-task rolling-robbers) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) - (with-pp (if (task-closed? 17 5) - (or - (closed? arg0 37 5) - (and - (closed? arg0 37 3) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'query) - (set! (-> a1-4 param 0) (the-as uint 'pickup)) - (set! (-> a1-4 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-4)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - (or - (closed? arg0 47 5) - (and - (closed? arg0 47 3) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 2) - (set! (-> a1-8 message) 'query) - (set! (-> a1-8 param 0) (the-as uint 'pickup)) - (set! (-> a1-8 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-8)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - ) + (with-pp + (if (task-closed? (game-task beach-flutflut) (task-status need-reminder)) + (or + (closed? arg0 (game-task swamp-flutflut) (task-status need-reminder)) + (and + (closed? + arg0 + (game-task swamp-flutflut) + (task-status need-introduction) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) pp) + (set! (-> a1-4 num-params) 2) + (set! (-> a1-4 message) 'query) + (set! (-> a1-4 param 0) (the-as uint 'pickup)) + (set! (-> a1-4 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-4)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + (or + (closed? arg0 (game-task sunken-room) (task-status need-reminder)) + (and + (closed? arg0 (game-task sunken-room) (task-status need-introduction)) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) pp) + (set! (-> a1-8 num-params) 2) + (set! (-> a1-8 message) 'query) + (set! (-> a1-8 param 0) (the-as uint 'pickup)) + (set! (-> a1-8 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-8)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + ) ) ) ) (new 'static 'task-cstage :game-task (game-task rolling-robbers) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) - (with-pp (if (task-closed? 17 5) - (or - (closed? arg0 37 5) - (and - (closed? arg0 37 3) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'query) - (set! (-> a1-4 param 0) (the-as uint 'pickup)) - (set! (-> a1-4 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-4)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - (or - (closed? arg0 47 5) - (and - (closed? arg0 47 3) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 2) - (set! (-> a1-8 message) 'query) - (set! (-> a1-8 param 0) (the-as uint 'pickup)) - (set! (-> a1-8 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-8)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - ) + (with-pp + (if (task-closed? (game-task beach-flutflut) (task-status need-reminder)) + (or + (closed? arg0 (game-task swamp-flutflut) (task-status need-reminder)) + (and + (closed? + arg0 + (game-task swamp-flutflut) + (task-status need-introduction) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) pp) + (set! (-> a1-4 num-params) 2) + (set! (-> a1-4 message) 'query) + (set! (-> a1-4 param 0) (the-as uint 'pickup)) + (set! (-> a1-4 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-4)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + (or + (closed? arg0 (game-task sunken-room) (task-status need-reminder)) + (and + (closed? arg0 (game-task sunken-room) (task-status need-introduction)) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) pp) + (set! (-> a1-8 num-params) 2) + (set! (-> a1-8 message) 'query) + (set! (-> a1-8 param 0) (the-as uint 'pickup)) + (set! (-> a1-8 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-8)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + ) ) ) ) @@ -684,21 +725,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-room) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status unknown) :condition - (lambda ((arg0 task-control)) (task-closed? 17 5)) + (lambda + ((arg0 task-control)) + (task-closed? (game-task beach-flutflut) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control)) (task-closed? 17 5)) + (lambda + ((arg0 task-control)) + (task-closed? (game-task beach-flutflut) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task rolling-robbers) @@ -708,7 +755,7 @@ (new 'static 'task-cstage :game-task (game-task rolling-robbers) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -718,25 +765,25 @@ (new 'static 'task-cstage :game-task (game-task sunken-room) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-robbers) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -756,52 +803,69 @@ (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 52 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-race) (task-status need-reward-speech)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 31 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? + arg0 + (game-task village2-gambler-money) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 52 5)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-race) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -833,15 +897,21 @@ (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 52 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-race) (task-status need-introduction)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-reminder) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 52 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-race) (task-status need-introduction)) + ) ) ) ) @@ -860,52 +930,69 @@ (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 54 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-moles) (task-status need-reward-speech)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 32 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? + arg0 + (game-task village2-geologist-money) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 54 5)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-moles) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -937,15 +1024,21 @@ (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 54 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-moles) (task-status need-introduction)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-reminder) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 54 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-moles) (task-status need-introduction)) + ) ) ) ) @@ -964,52 +1057,69 @@ (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-reward-speech)) + ) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 11 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? + arg0 + (game-task village1-mayor-money) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 5)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1041,22 +1151,31 @@ (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-reminder-a) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction)) + ) ) (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction)) + ) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-reminder) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction)) + ) ) ) ) @@ -1075,45 +1194,52 @@ (new 'static 'task-cstage :game-task (game-task intro) :status (task-status need-introduction) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task intro) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task intro) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-ecorocks) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-ecorocks) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-cannon) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 15 5) + (closed? arg0 (game-task beach-ecorocks) (task-status need-reminder)) (and - (closed? arg0 15 3) + (closed? + arg0 + (game-task beach-ecorocks) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1133,15 +1259,20 @@ (new 'static 'task-cstage :game-task (game-task misty-cannon) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 15 5) + (closed? arg0 (game-task beach-ecorocks) (task-status need-reminder)) (and - (closed? arg0 15 3) + (closed? + arg0 + (game-task beach-ecorocks) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1161,7 +1292,7 @@ (new 'static 'task-cstage :game-task (game-task beach-ecorocks) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -1172,30 +1303,36 @@ (new 'static 'task-cstage :game-task (game-task misty-cannon) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :status (task-status unknown) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control)) (task-closed? 111 6)) + (lambda + ((arg0 task-control)) + (task-closed? + (game-task village4-button) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-ecorocks) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-cannon) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1215,27 +1352,34 @@ (new 'static 'task-cstage :game-task (game-task rolling-plants) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-plants) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-arm) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 55 5) + (closed? arg0 (game-task rolling-plants) (task-status need-reminder)) (and - (closed? arg0 55 3) + (closed? + arg0 + (game-task rolling-plants) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1255,15 +1399,20 @@ (new 'static 'task-cstage :game-task (game-task swamp-arm) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 55 5) + (closed? arg0 (game-task rolling-plants) (task-status need-reminder)) (and - (closed? arg0 55 3) + (closed? + arg0 + (game-task rolling-plants) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1283,7 +1432,7 @@ (new 'static 'task-cstage :game-task (game-task rolling-plants) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -1294,7 +1443,7 @@ (new 'static 'task-cstage :game-task (game-task swamp-arm) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -1304,13 +1453,13 @@ (new 'static 'task-cstage :game-task (game-task rolling-plants) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-arm) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1330,31 +1479,35 @@ (new 'static 'task-cstage :game-task (game-task village1-oracle-money1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money1) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1391,13 +1544,13 @@ (new 'static 'task-cstage :game-task (game-task village1-oracle-money1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money2) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1434,7 +1587,7 @@ (new 'static 'task-cstage :game-task (game-task village1-oracle-money2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1454,31 +1607,35 @@ (new 'static 'task-cstage :game-task (game-task village2-oracle-money1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money1) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1515,13 +1672,13 @@ (new 'static 'task-cstage :game-task (game-task village2-oracle-money1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money2) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1558,7 +1715,7 @@ (new 'static 'task-cstage :game-task (game-task village2-oracle-money2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1578,31 +1735,35 @@ (new 'static 'task-cstage :game-task (game-task village3-oracle-money1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money1) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1639,13 +1800,13 @@ (new 'static 'task-cstage :game-task (game-task village3-oracle-money1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money2) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1682,7 +1843,7 @@ (new 'static 'task-cstage :game-task (game-task village3-oracle-money2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1702,55 +1863,63 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1782,7 +1951,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1814,7 +1983,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1846,7 +2015,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1878,15 +2047,24 @@ (new 'static 'task-cstage :game-task (game-task cave-gnawers) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 99 5) + (closed? + arg0 + (game-task village3-miner-money4) + (task-status need-reminder) + ) (and - (closed? arg0 99 3) + (closed? + arg0 + (game-task village3-miner-money4) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1906,15 +2084,24 @@ (new 'static 'task-cstage :game-task (game-task cave-gnawers) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 99 5) + (closed? + arg0 + (game-task village3-miner-money4) + (task-status need-reminder) + ) (and - (closed? arg0 99 3) + (closed? + arg0 + (game-task village3-miner-money4) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1934,15 +2121,16 @@ (new 'static 'task-cstage :game-task (game-task snow-eggtop) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 78 5) + (closed? arg0 (game-task cave-gnawers) (task-status need-reminder)) (and - (closed? arg0 78 3) + (closed? arg0 (game-task cave-gnawers) (task-status need-introduction)) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1962,15 +2150,16 @@ (new 'static 'task-cstage :game-task (game-task snow-eggtop) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 78 5) + (closed? arg0 (game-task cave-gnawers) (task-status need-reminder)) (and - (closed? arg0 78 3) + (closed? arg0 (game-task cave-gnawers) (task-status need-introduction)) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1995,7 +2184,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2006,7 +2195,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2017,7 +2206,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2028,7 +2217,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2039,7 +2228,7 @@ (new 'static 'task-cstage :game-task (game-task cave-gnawers) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2050,7 +2239,7 @@ (new 'static 'task-cstage :game-task (game-task snow-eggtop) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2060,37 +2249,37 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-gnawers) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-eggtop) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2115,39 +2304,52 @@ (new 'static 'task-cstage :game-task (game-task village3-button) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-button) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-crystals) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-crystals) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 79 5) + (closed? + arg0 + (game-task cave-dark-crystals) + (task-status need-reminder) + ) (and - (closed? arg0 79 3) + (closed? + arg0 + (game-task cave-dark-crystals) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -2167,15 +2369,24 @@ (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 79 5) + (closed? + arg0 + (game-task cave-dark-crystals) + (task-status need-reminder) + ) (and - (closed? arg0 79 3) + (closed? + arg0 + (game-task cave-dark-crystals) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -2195,7 +2406,7 @@ (new 'static 'task-cstage :game-task (game-task cave-dark-crystals) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2206,13 +2417,13 @@ (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-reminder-a) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2222,13 +2433,13 @@ (new 'static 'task-cstage :game-task (game-task cave-dark-crystals) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2248,13 +2459,14 @@ (new 'static 'task-cstage :game-task (game-task citadel-sage-green) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-sage-green) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2274,13 +2486,14 @@ (new 'static 'task-cstage :game-task (game-task citadel-sage-blue) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-sage-blue) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2300,13 +2513,14 @@ (new 'static 'task-cstage :game-task (game-task citadel-sage-red) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-sage-red) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2326,23 +2540,31 @@ (new 'static 'task-cstage :game-task (game-task citadel-sage-yellow) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-sage-yellow) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) ) ) -;; definition for symbol *task-controls*, type (array task-control) -(define - *task-controls* - (the-as (array task-control) +;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Main Task-Controls +;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;; this is arranged by game-task order. +;; meaning you can find a cstages for the given game task +;; in the (-> *task-controls* game-task-id) task control. +;; this contains both symbols and task-controls. + +(define *task-controls* + (the-as (array basic) (new 'static 'boxed-array @@ -2361,25 +2583,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-tower) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-tower) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-tower) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-tower) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2394,37 +2618,40 @@ (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-reminder-a) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2443,25 +2670,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-plant) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-plant) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-plant) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-plant) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2476,25 +2705,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2509,25 +2740,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-canyon-end) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-canyon-end) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-canyon-end) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-canyon-end) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2542,25 +2775,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-temple-door) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-temple-door) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-temple-door) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-temple-door) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2575,31 +2810,33 @@ (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2615,19 +2852,21 @@ (new 'static 'task-cstage :game-task (game-task village1-uncle-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-uncle-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-uncle-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -2664,7 +2903,7 @@ (new 'static 'task-cstage :game-task (game-task village1-uncle-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2682,25 +2921,27 @@ (new 'static 'task-cstage :game-task (game-task beach-pelican) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-pelican) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-pelican) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-pelican) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2715,31 +2956,33 @@ (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2754,25 +2997,27 @@ (new 'static 'task-cstage :game-task (game-task beach-seagull) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-seagull) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-seagull) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-seagull) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2787,25 +3032,27 @@ (new 'static 'task-cstage :game-task (game-task beach-cannon) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-cannon) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-cannon) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-cannon) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2820,25 +3067,27 @@ (new 'static 'task-cstage :game-task (game-task beach-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2853,25 +3102,27 @@ (new 'static 'task-cstage :game-task (game-task beach-gimmie) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-gimmie) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-gimmie) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-gimmie) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2886,25 +3137,27 @@ (new 'static 'task-cstage :game-task (game-task beach-sentinel) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-sentinel) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-sentinel) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-sentinel) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2919,31 +3172,33 @@ (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2958,25 +3213,27 @@ (new 'static 'task-cstage :game-task (game-task misty-boat) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-boat) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-boat) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-boat) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2991,25 +3248,27 @@ (new 'static 'task-cstage :game-task (game-task misty-warehouse) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-warehouse) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-warehouse) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-warehouse) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3026,25 +3285,27 @@ (new 'static 'task-cstage :game-task (game-task misty-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3059,25 +3320,27 @@ (new 'static 'task-cstage :game-task (game-task misty-bike-jump) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike-jump) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike-jump) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike-jump) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3092,25 +3355,27 @@ (new 'static 'task-cstage :game-task (game-task misty-eco-challenge) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-eco-challenge) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-eco-challenge) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-eco-challenge) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3127,27 +3392,45 @@ (new 'static 'task-cstage :game-task (game-task village2-warrior-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) - (and (not (task-closed? 86 5)) (not (task-closed? 103 6))) + (and + (not (task-closed? (game-task ogre-boss) (task-status need-reminder))) + (not + (task-closed? + (game-task village2-levitator) + (task-status need-reward-speech) + ) + ) + ) ) ) (new 'static 'task-cstage :game-task (game-task village2-warrior-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) - (and (not (task-closed? 86 5)) (not (task-closed? 103 6))) + (and + (not (task-closed? (game-task ogre-boss) (task-status need-reminder))) + (not + (task-closed? + (game-task village2-levitator) + (task-status need-reward-speech) + ) + ) + ) ) ) (new 'static 'task-cstage :game-task (game-task village2-warrior-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -3184,7 +3467,7 @@ (new 'static 'task-cstage :game-task (game-task village2-warrior-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3201,37 +3484,40 @@ (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-reminder-a) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3247,25 +3533,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-battle) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-battle) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-battle) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-battle) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3280,25 +3568,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-tether-1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-1) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3313,25 +3603,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-tether-2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-2) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3346,25 +3638,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-tether-3) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-3) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-3) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-3) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3379,25 +3673,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-tether-4) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-4) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-4) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-4) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3412,25 +3708,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3445,25 +3743,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-platforms) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-platforms) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-platforms) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-platforms) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3478,25 +3778,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-pipe) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-pipe) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-pipe) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-pipe) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3511,25 +3813,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-slide) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-slide) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-slide) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-slide) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3545,25 +3849,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-sharks) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-sharks) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-sharks) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-sharks) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3578,25 +3884,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3611,25 +3919,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-top-of-helix) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-top-of-helix) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-top-of-helix) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-top-of-helix) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3644,25 +3954,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-spinning-room) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-spinning-room) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-spinning-room) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-spinning-room) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3681,25 +3993,27 @@ (new 'static 'task-cstage :game-task (game-task rolling-lake) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-lake) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-lake) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-lake) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3714,25 +4028,27 @@ (new 'static 'task-cstage :game-task (game-task rolling-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3747,25 +4063,27 @@ (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-1) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3780,25 +4098,27 @@ (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-2) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3815,25 +4135,27 @@ (new 'static 'task-cstage :game-task (game-task snow-fort) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-fort) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-fort) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-fort) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3848,25 +4170,27 @@ (new 'static 'task-cstage :game-task (game-task snow-ball) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ball) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ball) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ball) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3881,25 +4205,27 @@ (new 'static 'task-cstage :game-task (game-task snow-bunnies) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bunnies) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bunnies) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bunnies) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3914,25 +4240,27 @@ (new 'static 'task-cstage :game-task (game-task snow-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3947,25 +4275,27 @@ (new 'static 'task-cstage :game-task (game-task snow-bumpers) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bumpers) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bumpers) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bumpers) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3980,25 +4310,27 @@ (new 'static 'task-cstage :game-task (game-task snow-cage) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-cage) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-cage) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-cage) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4013,25 +4345,27 @@ (new 'static 'task-cstage :game-task (game-task firecanyon-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4046,25 +4380,27 @@ (new 'static 'task-cstage :game-task (game-task firecanyon-end) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-end) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-end) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-end) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4083,25 +4419,27 @@ (new 'static 'task-cstage :game-task (game-task village3-extra1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-extra1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-extra1) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-extra1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4116,25 +4454,27 @@ (new 'static 'task-cstage :game-task (game-task village1-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4149,25 +4489,27 @@ (new 'static 'task-cstage :game-task (game-task village2-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4182,25 +4524,27 @@ (new 'static 'task-cstage :game-task (game-task village3-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4217,25 +4561,27 @@ (new 'static 'task-cstage :game-task (game-task cave-dark-climb) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-climb) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-climb) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-climb) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4250,25 +4596,27 @@ (new 'static 'task-cstage :game-task (game-task cave-robot-climb) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-robot-climb) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-robot-climb) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-robot-climb) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4283,25 +4631,27 @@ (new 'static 'task-cstage :game-task (game-task cave-swing-poles) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-swing-poles) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-swing-poles) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-swing-poles) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4316,25 +4666,27 @@ (new 'static 'task-cstage :game-task (game-task cave-spider-tunnel) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-spider-tunnel) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-spider-tunnel) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-spider-tunnel) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4349,25 +4701,27 @@ (new 'static 'task-cstage :game-task (game-task cave-platforms) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-platforms) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-platforms) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-platforms) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4382,25 +4736,27 @@ (new 'static 'task-cstage :game-task (game-task cave-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4415,25 +4771,27 @@ (new 'static 'task-cstage :game-task (game-task ogre-boss) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-boss) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-boss) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-boss) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4448,25 +4806,27 @@ (new 'static 'task-cstage :game-task (game-task ogre-end) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-end) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-end) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-end) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4481,25 +4841,27 @@ (new 'static 'task-cstage :game-task (game-task ogre-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4514,25 +4876,27 @@ (new 'static 'task-cstage :game-task (game-task lavatube-end) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-end) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-end) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-end) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4547,25 +4911,27 @@ (new 'static 'task-cstage :game-task (game-task lavatube-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4580,25 +4946,27 @@ (new 'static 'task-cstage :game-task (game-task citadel-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4613,25 +4981,27 @@ (new 'static 'task-cstage :game-task (game-task training-gimmie) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-gimmie) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-gimmie) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-gimmie) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4646,25 +5016,27 @@ (new 'static 'task-cstage :game-task (game-task training-door) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-door) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-door) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-door) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4679,25 +5051,27 @@ (new 'static 'task-cstage :game-task (game-task training-climb) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-climb) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-climb) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-climb) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4712,25 +5086,27 @@ (new 'static 'task-cstage :game-task (game-task training-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4751,7 +5127,7 @@ (new 'static 'task-cstage :game-task (game-task firecanyon-assistant) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -4786,25 +5162,27 @@ (new 'static 'task-cstage :game-task (game-task red-eggtop) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task red-eggtop) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task red-eggtop) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task red-eggtop) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4819,25 +5197,27 @@ (new 'static 'task-cstage :game-task (game-task lavatube-balls) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-balls) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-balls) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-balls) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4852,7 +5232,7 @@ (new 'static 'task-cstage :game-task (game-task lavatube-start) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -4885,25 +5265,27 @@ (new 'static 'task-cstage :game-task (game-task ogre-secret) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-secret) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-secret) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-secret) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4923,13 +5305,14 @@ (new 'static 'task-cstage :game-task (game-task village4-button) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village4-button) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4944,31 +5327,31 @@ (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status unknown) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status need-introduction) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status need-reminder-a) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4983,13 +5366,15 @@ (new 'static 'task-cstage :game-task (game-task plunger-lurker-hit) :status (task-status unknown) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task plunger-lurker-hit) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -5004,13 +5389,15 @@ (new 'static 'task-cstage :game-task (game-task leaving-misty) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task leaving-misty) :status (task-status need-reminder) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -5024,13 +5411,19 @@ :type task-cstage :length 2 :allocated-length 2 (new 'static 'task-cstage :status (task-status unknown) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control)) (task-closed? 111 6)) + (lambda + ((arg0 task-control)) + (task-closed? + (game-task village4-button) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -5039,64 +5432,60 @@ ) ) -;; definition for function task-control-reset -;; INFO: Return type mismatch int vs none. (defun task-control-reset ((arg0 symbol)) + "Reset all task controls and set their current stage" (let ((s5-0 *task-controls*)) - (countdown (s4-0 (-> s5-0 length)) - (reset! (-> s5-0 s4-0) arg0 #f) - ;; TODO - uncomment this once we decompile game-info - ;; (first-any (-> s5-0 s4-0) #f) + (countdown (s4-0 (-> s5-0 length)) + (reset! (the-as task-control (-> s5-0 s4-0)) arg0 #f) + (first-any (the-as task-control (-> s5-0 s4-0)) #f) + ) ) - ) 0 (none) ) -;; definition for function get-task-control -(defun get-task-control ((arg0 int)) - (cond - ((or - (>= (the-as uint 1) (the-as uint arg0)) - (>= (the-as uint arg0) (the-as uint 116)) - ) - (format - 0 - "ERROR: get-task-control received invalid task ~D/~S~%" - arg0 - (game-task->string arg0) - ) - *null-task-control* - ) - (else - (-> *task-controls* arg0) - ) - ) +(defun get-task-control ((arg0 game-task)) + "Get the task control for a given game-task" + (the-as task-control + (cond + ((or (>= (the-as uint 1) (the-as uint arg0)) (>= (the-as uint arg0) (the-as uint 116))) + ;; invalid game task + (format 0 "ERROR: get-task-control received invalid task ~D/~S~%" + arg0 + (game-task->string arg0) + ) + *null-task-control* + ) + (else + ;; otherwise look up in table + (-> *task-controls* arg0) + ) + ) + ) ) -;; definition for function get-task-status -(defun get-task-status ((arg0 task-control)) - (let ((gp-0 (get-task-control (the-as int arg0)))) - (when gp-0 - (dotimes (s5-0 (-> gp-0 stage length)) - (when - (and - (= arg0 (-> gp-0 stage s5-0 game-task)) - (TODO-RENAME-11 (-> gp-0 stage s5-0) gp-0) - ) - (first-any gp-0 #t) - (return (the-as int (-> gp-0 stage s5-0 status))) +(defun get-task-status ((arg0 game-task)) + "Get the staus of a game-task" + (let ((gp-0 (get-task-control arg0))) + (when gp-0 + (dotimes (s5-0 (-> gp-0 stage length)) + (when (and + (= arg0 (-> gp-0 stage s5-0 game-task)) + (task-available? (-> gp-0 stage s5-0) gp-0) + ) + (first-any gp-0 #t) + (return (-> gp-0 stage s5-0 status)) + ) + ) ) - ) + (first-any gp-0 #t) ) - (first-any gp-0 #t) - ) - 0 + (the-as task-status 0) ) -;; definition for function close-specific-task! -(defun close-specific-task! ((arg0 task-control) (arg1 int)) - (let ((gp-0 (get-task-control (the-as int arg0)))) +(defun close-specific-task! ((arg0 game-task) (arg1 task-status)) + "Close a cstage for a game-task" + (let ((gp-0 (get-task-control arg0))) (when gp-0 (dotimes (v1-1 (-> gp-0 stage length)) (when @@ -5104,14 +5493,14 @@ (= arg0 (-> gp-0 stage v1-1 game-task)) (= arg1 (-> gp-0 stage v1-1 status)) ) - (TODO-RENAME-14 (-> gp-0 stage v1-1)) + (close-task! (-> gp-0 stage v1-1)) (return (first-any gp-0 #t)) ) ) (format 0 "ERROR: close-specific! received non-existent task-cstage(~S ~S)--returning #t.~%" - (game-task->string (the-as int arg0)) + (game-task->string arg0) (task-status->string arg1) ) ) @@ -5119,9 +5508,9 @@ 0 ) -;; definition for function open-specific-task! -(defun open-specific-task! ((arg0 task-control) (arg1 int)) - (let ((gp-0 (get-task-control (the-as int arg0)))) +(defun open-specific-task! ((arg0 game-task) (arg1 task-status)) + "Open a cstage for a game-task" + (let ((gp-0 (get-task-control arg0))) (when gp-0 (dotimes (v1-1 (-> gp-0 stage length)) (when @@ -5129,14 +5518,14 @@ (= arg0 (-> gp-0 stage v1-1 game-task)) (= arg1 (-> gp-0 stage v1-1 status)) ) - (clear-all-but-first-flag-bit (-> gp-0 stage v1-1)) + (open-task! (-> gp-0 stage v1-1)) (return (first-any gp-0 #t)) ) ) (format 0 "ERROR: open-specific! received non-existent task-cstage(~S ~S)--returning #t.~%" - (game-task->string (the-as int arg0)) + (game-task->string arg0) (task-status->string arg1) ) ) @@ -5145,19 +5534,28 @@ ) ;; definition for function task-closed? -(defun task-closed? ((arg0 int) (arg1 int)) +(defun task-closed? ((arg0 game-task) (arg1 task-status)) (closed? (get-task-control arg0) arg0 arg1) ) ;; definition for function task-exists? -(defun task-exists? ((arg0 task-control) (arg1 int)) - (exists? (get-task-control (the-as int arg0)) (the-as int arg0) arg1) +(defun task-exists? ((arg0 game-task) (arg1 task-status)) + (exists? (get-task-control arg0) arg0 arg1) ) ;; definition for function task-known? -(defun task-known? ((arg0 task-control)) +(defun task-known? ((arg0 game-task)) + "Is there a cstage with a non-unknown status?" (let ((v1-0 (get-task-status arg0))) - (if (or (= v1-0 6) (= v1-0 3) (= v1-0 5) (= v1-0 4) (= v1-0 7) (zero? v1-0)) + (if + (or + (= v1-0 (task-status need-reward-speech)) + (= v1-0 (task-status need-introduction)) + (= v1-0 (task-status need-reminder)) + (= v1-0 (task-status need-reminder-a)) + (= v1-0 (task-status need-resolution)) + (= v1-0 (task-status invalid)) + ) #t #f ) @@ -5166,30 +5564,38 @@ ;; definition for function sages-kidnapped? (defun sages-kidnapped? () - (task-closed? 111 6) + (task-closed? (game-task village4-button) (task-status need-reward-speech)) ) -;; failed to figure out what this is: + +;; replace symbols in task-controls with their value. (let ((gp-0 *task-controls*)) (countdown (s5-0 (-> gp-0 length)) - (when (and (-> gp-0 s5-0) (= (-> gp-0 s5-0 type) symbol)) - (let ((s4-0 (-> (the-as symbol (-> gp-0 s5-0)) value))) - (cond - ((and (nonzero? s4-0) (type-type? (rtype-of s4-0) task-control)) - (set! (-> gp-0 s5-0) (the-as task-control s4-0)) - ) - (else - (format - 0 - "ERROR: value of symbol ~A in task-controls is not a task-control~%" + (when (and (-> gp-0 s5-0) (= (-> gp-0 s5-0 type) symbol)) + ;; found a symbol + (let ((s4-0 (-> (the-as symbol (-> gp-0 s5-0)) value))) + (cond + ((and (nonzero? s4-0) (type-type? (rtype-of s4-0) task-control)) + ;; symbol holds a task-control, replace it + (set! (-> gp-0 s5-0) (the-as basic s4-0)) + ) + (else + ;; invalid symbol + (format + 0 + "ERROR: value of symbol ~A in task-controls is not a task-control~%" + ) + (set! (-> gp-0 s5-0) '*null-task-control*) + ) + ) ) - (set! (-> gp-0 s5-0) (the-as task-control '*null-task-control*)) - ) ) - ) ) - ) ) ;; failed to figure out what this is: (task-control-reset 'game) + + + + diff --git a/goal_src/engine/geometry/geometry-h.gc b/goal_src/engine/geometry/geometry-h.gc index 4d0b421fd7..7ff447eecf 100644 --- a/goal_src/engine/geometry/geometry-h.gc +++ b/goal_src/engine/geometry/geometry-h.gc @@ -20,19 +20,19 @@ ) (deftype border-plane (basic) - ((name basic :offset-assert 4) - (action basic :offset-assert 8) - (slot int8 :offset-assert 12) - (trans vector :inline :offset-assert 16) - (normal vector :inline :offset-assert 32) + ((name symbol :offset-assert 4) + (action basic :offset-assert 8) + (slot int8 :offset-assert 12) + (trans vector :inline :offset-assert 16) + (normal vector :inline :offset-assert 32) ) :method-count-assert 11 :size-assert #x30 :flag-assert #xb00000030 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) - ) + (debug-draw! (_type_) none 9) + (point-past-plane? (_type_ vector) symbol 10) + ) ) (defun-extern quaternion-from-two-vectors-max-angle! quaternion vector vector float quaternion) diff --git a/goal_src/engine/level/level-h.gc b/goal_src/engine/level/level-h.gc index e7b0832839..e157f8fa75 100644 --- a/goal_src/engine/level/level-h.gc +++ b/goal_src/engine/level/level-h.gc @@ -393,3 +393,4 @@ ) ) +(define-extern *level-load-list* pair) diff --git a/goal_src/engine/level/level-info.gc b/goal_src/engine/level/level-info.gc index ce34e08cc3..8b391e3682 100644 --- a/goal_src/engine/level/level-info.gc +++ b/goal_src/engine/level/level-info.gc @@ -26,7 +26,7 @@ :name "training-start" :level 'training :trans (new 'static 'vector :x -5393626.5 :y 28072.346 :z 4332472.5 :w 1.0) - :quat (new 'static 'vector :y 0.9995 :w 0.0297) + :quat (new 'static 'quaternion :y 0.9995 :w 0.0297) :camera-trans (new 'static 'vector :x -5426915.0 :y 45930.906 :z 4353156.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.5571 0.0 -0.8304 0.1264 0.9883 -0.0848 0.8207 -0.1522 -0.5506) @@ -52,7 +52,7 @@ :level 'training :flags #x4 :trans (new 'static 'vector :x -5383524.0 :y 28019.098 :z 4360302.0 :w 1.0) - :quat (new 'static 'vector :y 0.084 :w 0.9964) + :quat (new 'static 'quaternion :y 0.084 :w 0.9964) :camera-trans (new 'static 'vector :x -5366765.0 :y 45646.234 :z 4325889.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.9057 0.0 0.4238 -0.0666 0.9875 0.1424 -0.4186 -0.1572 0.8944) @@ -78,7 +78,7 @@ :level 'training :flags #x404 :trans (new 'static 'vector :x -5393740.5 :y 28259.533 :z 4360945.5 :w 1.0) - :quat (new 'static 'vector :y 0.9993 :w 0.0359) + :quat (new 'static 'quaternion :y 0.9993 :w 0.0359) :camera-trans (new 'static 'vector :x -5434444.5 :y 47050.344 :z 4372832.5 :w 1.0) :camera-rot (new 'static 'array float 9 -0.3536 0.0 -0.9353 0.1315 0.99 -0.0497 0.926 -0.1406 -0.35) :load-commands @@ -134,7 +134,7 @@ :name "village1-hut" :level 'village1 :trans (new 'static 'vector :x -638860.06 :y 139319.7 :z 769990.6 :w 1.0) - :quat (new 'static 'vector :y -0.9889 :w -0.148) + :quat (new 'static 'quaternion :y -0.9889 :w -0.148) :camera-trans (new 'static 'vector :x -668114.1 :y 164536.31 :z 828633.06 :w 1.0) :camera-rot (new 'static 'array float 9 -0.8947 0.0 -0.4464 0.1082 0.9701 -0.2169 0.4331 -0.2424 -0.868) :load-commands '() @@ -149,7 +149,7 @@ :level 'village1 :flags #x24 :trans (new 'static 'vector :x -518468.8 :y 189424.03 :z 868568.7 :w 1.0) - :quat (new 'static 'vector :y 0.591 :w 0.8066) + :quat (new 'static 'quaternion :y 0.591 :w 0.8066) :camera-trans (new 'static 'vector :x -559109.3 :y 200461.92 :z 826073.06 :w 1.0) :camera-rot (new 'static 'array float 9 0.7221 0.0 -0.6917 -0.0517 0.9972 -0.054 0.6897 0.0747 0.7201) :load-commands '() @@ -164,7 +164,7 @@ :level 'village1 :flags #x804 :trans (new 'static 'vector :x -518468.8 :y 189424.03 :z 868568.7 :w 1.0) - :quat (new 'static 'vector :y 0.591 :w 0.8066) + :quat (new 'static 'quaternion :y 0.591 :w 0.8066) :camera-trans (new 'static 'vector :x -559109.3 :y 200461.92 :z 826073.06 :w 1.0) :camera-rot (new 'static 'array float 9 0.7221 0.0 -0.6917 -0.0517 0.9972 -0.054 0.6897 0.0747 0.7201) :load-commands '() @@ -179,7 +179,7 @@ :level 'village1 :flags #x40 :trans (new 'static 'vector :x -542529.1 :y 189424.03 :z 847101.94 :w 1.0) - :quat (new 'static 'vector :y -0.1717 :w -0.9851) + :quat (new 'static 'quaternion :y -0.1717 :w -0.9851) :camera-trans (new 'static 'vector :x -559085.2 :y 202996.53 :z 826054.25 :w 1.0) :camera-rot (new 'static 'array float 9 0.7868 0.0 -0.6171 0.0775 0.992 0.0989 0.6122 -0.1257 0.7806) :load-commands '() @@ -194,7 +194,7 @@ :level 'village1 :flags #x10 :trans (new 'static 'vector :x 164316.78 :y 15128.576 :z 3390588.0 :w 1.0) - :quat (new 'static 'vector :y -0.2339 :w 0.9722) + :quat (new 'static 'quaternion :y -0.2339 :w 0.9722) :camera-trans (new 'static 'vector :x 204089.34 :y 36257.793 :z 3358341.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.6381 0.0 0.7699 -0.0938 0.9925 0.0777 -0.7642 -0.1218 0.6333) :load-commands @@ -255,7 +255,7 @@ :name "beach-start" :level 'beach :trans (new 'static 'vector :x -504960.22 :y 9477.325 :z -223513.81 :w 1.0) - :quat (new 'static 'vector :y 0.9486 :w -0.3163) + :quat (new 'static 'quaternion :y 0.9486 :w -0.3163) :camera-trans (new 'static 'vector :x -487550.16 :y 28354.15 :z -184211.05 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9139 0.0 0.4058 -0.0551 0.9907 -0.1241 -0.4021 -0.1358 -0.9054) :load-commands '() @@ -300,7 +300,7 @@ :name "jungle-start" :level 'jungle :trans (new 'static 'vector :x 1057631.9 :y 86404.305 :z -647140.56 :w 1.0) - :quat (new 'static 'vector :y -0.9009 :w -0.4339) + :quat (new 'static 'quaternion :y -0.9009 :w -0.4339) :camera-trans (new 'static 'vector :x 1004424.8 :y 111181.82 :z -611527.9 :w 1.0) :camera-rot (new 'static 'array float 9 -0.5568 0.0 -0.8306 0.201 0.9702 -0.1347 0.8059 -0.2419 -0.5402) :load-commands '() @@ -344,7 +344,7 @@ :name "jungle-tower" :level 'jungleb :trans (new 'static 'vector :x 1469510.0 :y -204745.52 :z -959058.3 :w 1.0) - :quat (new 'static 'vector :y -0.6194 :w -0.785) + :quat (new 'static 'quaternion :y -0.6194 :w -0.785) :camera-trans (new 'static 'vector :x 1485298.5 :y -189972.08 :z -936548.75 :w 1.0) :camera-rot (new 'static 'array float 9 -0.8614 0.0 0.5078 -0.1177 0.9727 -0.1997 -0.4939 -0.2318 -0.8379) :load-commands '() @@ -388,7 +388,7 @@ :name "misty-start" :level 'misty :trans (new 'static 'vector :x 164316.78 :y 15128.576 :z 3390588.0 :w 1.0) - :quat (new 'static 'vector :y -0.2339 :w 0.9722) + :quat (new 'static 'quaternion :y -0.2339 :w 0.9722) :camera-trans (new 'static 'vector :x 204089.34 :y 36257.793 :z 3358341.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.6381 0.0 0.7699 -0.0938 0.9925 0.0777 -0.7642 -0.1218 0.6333) :load-commands @@ -415,7 +415,7 @@ :name "misty-silo" :level 'misty :trans (new 'static 'vector :x -672503.0 :y 82131.35 :z 3651465.8 :w 1.0) - :quat (new 'static 'vector :y 0.0878 :w 0.9961) + :quat (new 'static 'quaternion :y 0.0878 :w 0.9961) :camera-trans (new 'static 'vector :x -675754.0 :y 102028.91 :z 3604800.8 :w 1.0) :camera-rot (new 'static 'array float 9 0.9975 0.0 -0.0704 0.0086 0.9924 0.1223 0.0698 -0.1226 0.9899) :load-commands @@ -442,7 +442,7 @@ :name "misty-bike" :level 'misty :trans (new 'static 'vector :x 302533.44 :y 35901.848 :z 4138967.8 :w 1.0) - :quat (new 'static 'vector :y -0.2809 :w 0.9597) + :quat (new 'static 'quaternion :y -0.2809 :w 0.9597) :camera-trans (new 'static 'vector :x 338476.25 :y 55700.684 :z 4109729.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.6308 0.0 0.7759 -0.096 0.9923 0.078 -0.7699 -0.1237 0.6259) :load-commands @@ -469,7 +469,7 @@ :name "misty-backside" :level 'misty :trans (new 'static 'vector :x -304192.72 :y 33270.99 :z 4646525.0 :w 1.0) - :quat (new 'static 'vector :y -0.8443 :w -0.5357) + :quat (new 'static 'quaternion :y -0.8443 :w -0.5357) :camera-trans (new 'static 'vector :x -346989.78 :y 54377.676 :z 4674685.5 :w 1.0) :camera-rot (new 'static 'array float 9 -0.5497 0.0 -0.8353 0.1009 0.9926 -0.0664 0.8291 -0.1208 -0.5457) :load-commands @@ -496,7 +496,7 @@ :name "misty-silo2" :level 'misty :trans (new 'static 'vector :x -898000.06 :y 98038.17 :z 4162091.0 :w 1.0) - :quat (new 'static 'vector :y -0.1102 :w 0.9938) + :quat (new 'static 'quaternion :y -0.1102 :w 0.9938) :camera-trans (new 'static 'vector :x -931459.9 :y 118198.68 :z 4196081.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.6605 0.0 -0.7508 0.1086 0.9894 -0.0955 0.7429 -0.1447 -0.6535) :load-commands @@ -553,7 +553,7 @@ :name "firecanyon-start" :level 'firecanyon :trans (new 'static 'vector :x -87377.1 :y 126444.75 :z -681697.25 :w 1.0) - :quat (new 'static 'vector :y 0.9921 :w -0.1246) + :quat (new 'static 'quaternion :y 0.9921 :w -0.1246) :camera-trans (new 'static 'vector :x -84559.055 :y 144685.47 :z -641194.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9976 0.0 0.0688 -0.01 0.9893 -0.1452 -0.068 -0.1456 -0.9869) :load-commands '() @@ -567,7 +567,7 @@ :name "firecanyon-end" :level 'firecanyon :trans (new 'static 'vector :x 1360576.1 :y 126976.0 :z -5839533.5 :w 1.0) - :quat (new 'static 'vector :y 0.1666 :w 0.986) + :quat (new 'static 'quaternion :y 0.1666 :w 0.986) :camera-trans (new 'static 'vector :x 1378912.6 :y 144452.81 :z -5872527.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.8847 0.0 0.466 -0.0744 0.9871 0.1414 -0.46 -0.1598 0.8733) :load-commands '() @@ -611,7 +611,7 @@ :name "village2-start" :level 'village2 :trans (new 'static 'vector :x 1460961.2 :y 108562.02 :z -6161391.0 :w 1.0) - :quat (new 'static 'vector :y 0.9917 :w 0.1278) + :quat (new 'static 'quaternion :y 0.9917 :w 0.1278) :camera-trans (new 'static 'vector :x 1468018.8 :y 133790.92 :z -6096227.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9941 0.0 0.1076 -0.0261 0.9699 -0.2418 -0.1044 -0.2432 -0.9643) :load-commands '() @@ -626,7 +626,7 @@ :level 'village2 :flags #x4 :trans (new 'static 'vector :x 1592492.9 :y 91648.0 :z -6328677.0 :w 1.0) - :quat (new 'static 'vector :y 0.7469 :w 0.6648) + :quat (new 'static 'quaternion :y 0.7469 :w 0.6648) :camera-trans (new 'static 'vector :x 1555766.1 :y 103759.46 :z -6318964.5 :w 1.0) :camera-rot (new 'static 'array float 9 -0.2562 0.0 -0.9666 -0.0253 0.9996 0.0067 0.9662 0.0262 -0.2561) :load-commands '() @@ -640,7 +640,7 @@ :name "village2-dock" :level 'village2 :trans (new 'static 'vector :x 1264346.8 :y 19451.494 :z -6833563.5 :w 1.0) - :quat (new 'static 'vector :y 0.0258 :w 0.9996) + :quat (new 'static 'quaternion :y 0.0258 :w 0.9996) :camera-trans (new 'static 'vector :x 1265547.2 :y 34647.656 :z -6862636.5 :w 1.0) :camera-rot (new 'static 'array float 9 0.9991 0.0 0.0411 -0.0088 0.9764 0.2155 -0.0401 -0.2156 0.9756) :load-commands '() @@ -684,7 +684,7 @@ :name "sunken-start" :level 'sunken :trans (new 'static 'vector :x 2172095.2 :y -591749.94 :z -6721553.0 :w 1.0) - :quat (new 'static 'vector :y -0.5083 :w 0.8611) + :quat (new 'static 'quaternion :y -0.5083 :w 0.8611) :camera-trans (new 'static 'vector :x 2138871.5 :y -572296.4 :z -6751967.5 :w 1.0) :camera-rot (new 'static 'array float 9 0.7575 0.0 -0.6527 0.0858 0.9913 0.0995 0.647 -0.1314 0.7509) :load-commands '() @@ -698,7 +698,7 @@ :name "sunken1" :level 'sunken :trans (new 'static 'vector :x 3062988.5 :y -536575.56 :z -6527484.0 :w 1.0) - :quat (new 'static 'vector :y 0.5304 :w 0.8477) + :quat (new 'static 'quaternion :y 0.5304 :w 0.8477) :camera-trans (new 'static 'vector :x 3015461.2 :y -515480.38 :z -6546573.5 :w 1.0) :camera-rot (new 'static 'array float 9 0.3725 0.0 -0.928 0.1121 0.9926 0.045 0.9212 -0.1208 0.3697) :load-commands '() @@ -712,7 +712,7 @@ :name "sunken2" :level 'sunken :trans (new 'static 'vector :x 3133625.5 :y -569343.56 :z -6909587.5 :w 1.0) - :quat (new 'static 'vector :y -0.9512 :w 0.3083) + :quat (new 'static 'quaternion :y -0.9512 :w 0.3083) :camera-trans (new 'static 'vector :x 3170833.2 :y -548244.25 :z -6874378.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.6872 0.0 0.7263 -0.0878 0.9926 -0.0831 -0.721 -0.1209 -0.6822) :load-commands '() @@ -726,7 +726,7 @@ :name "sunken-tube1" :level 'sunken :trans (new 'static 'vector :x 2649601.8 :y -569343.56 :z -7132970.0 :w 1.0) - :quat (new 'static 'vector :y 0.9936 :w 0.1124) + :quat (new 'static 'quaternion :y 0.9936 :w 0.1124) :camera-trans (new 'static 'vector :x 2636150.2 :y -555656.4 :z -7114732.5 :w 1.0) :camera-rot (new 'static 'array float 9 -0.8024 0.0 -0.5967 0.1721 0.9574 -0.2315 0.5713 -0.2885 -0.7683) :load-commands '() @@ -770,7 +770,7 @@ :name "sunkenb-start" :level 'sunkenb :trans (new 'static 'vector :x 2229231.2 :y -1019912.2 :z -6788748.5 :w 1.0) - :quat (new 'static 'vector :y 0.895 :w 0.446) + :quat (new 'static 'quaternion :y 0.895 :w 0.446) :camera-trans (new 'static 'vector :x 2187840.0 :y -998915.7 :z -6759328.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.5786 0.0 -0.8155 0.0992 0.9925 -0.0704 0.8094 -0.1217 -0.5743) :load-commands '((alive "exit-chamber-1")) @@ -784,7 +784,7 @@ :name "sunkenb-helix" :level 'sunkenb :trans (new 'static 'vector :x 2466572.8 :y -1838989.2 :z -7299582.0 :w 1.0) - :quat (new 'static 'vector :y -0.8841 :w 0.4672) + :quat (new 'static 'quaternion :y -0.8841 :w 0.4672) :camera-trans (new 'static 'vector :x 2515616.2 :y -1817888.4 :z -7284843.5 :w 1.0) :camera-rot (new 'static 'array float 9 -0.2889 0.0 0.9573 -0.1163 0.9925 -0.0351 -0.9502 -0.1214 -0.2867) :load-commands '() @@ -828,7 +828,7 @@ :name "swamp-start" :level 'swamp :trans (new 'static 'vector :x 1842537.2 :y 21027.227 :z -7333297.5 :w 1.0) - :quat (new 'static 'vector :y -0.9933 :w 0.1153) + :quat (new 'static 'quaternion :y -0.9933 :w 0.1153) :camera-trans (new 'static 'vector :x 1862529.9 :y 44371.56 :z -7277995.5 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9403 0.0 0.3402 -0.0814 0.9708 -0.2252 -0.3303 -0.2394 -0.9129) :load-commands @@ -849,7 +849,7 @@ :name "swamp-dock1" :level 'swamp :trans (new 'static 'vector :x 1360386.9 :y 5823.693 :z -8218890.0 :w 1.0) - :quat (new 'static 'vector :y -0.585 :w -0.811) + :quat (new 'static 'quaternion :y -0.585 :w -0.811) :camera-trans (new 'static 'vector :x 1314475.6 :y 26164.838 :z -8234152.5 :w 1.0) :camera-rot (new 'static 'array float 9 0.3154 0.0 -0.9489 0.1134 0.9928 0.0376 0.9421 -0.1195 0.3131) :load-commands @@ -870,7 +870,7 @@ :name "swamp-cave1" :level 'swamp :trans (new 'static 'vector :x 1553700.5 :y 1835.4176 :z -8258429.5 :w 1.0) - :quat (new 'static 'vector :y -0.9871 :w -0.1599) + :quat (new 'static 'quaternion :y -0.9871 :w -0.1599) :camera-trans (new 'static 'vector :x 1556873.2 :y 22715.598 :z -8208106.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9982 0.0 0.0596 -0.0072 0.9926 -0.1209 -0.0592 -0.1211 -0.9908) :load-commands @@ -891,7 +891,7 @@ :name "swamp-dock2" :level 'swamp :trans (new 'static 'vector :x 1645872.4 :y 36495.77 :z -8427323.0 :w 1.0) - :quat (new 'static 'vector :y -0.8294 :w -0.5586) + :quat (new 'static 'quaternion :y -0.8294 :w -0.5586) :camera-trans (new 'static 'vector :x 1599338.9 :y 57590.168 :z -8405954.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.418 0.0 -0.9084 0.1106 0.9925 -0.0509 0.9016 -0.1218 -0.4149) :load-commands @@ -912,7 +912,7 @@ :name "swamp-cave2" :level 'swamp :trans (new 'static 'vector :x 2037539.2 :y 1103.872 :z -8560013.0 :w 1.0) - :quat (new 'static 'vector :y 0.0559 :w 0.9984) + :quat (new 'static 'quaternion :y 0.0559 :w 0.9984) :camera-trans (new 'static 'vector :x 1995208.2 :y 21832.908 :z -8586304.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.5516 0.0 -0.834 0.097 0.9932 0.0641 0.8283 -0.1163 0.5479) :load-commands @@ -933,7 +933,7 @@ :name "swamp-game" :level 'swamp :trans (new 'static 'vector :x 2612289.2 :y -2047.5905 :z -8315907.5 :w 1.0) - :quat (new 'static 'vector :y -0.6975 :w 0.7165) + :quat (new 'static 'quaternion :y -0.6975 :w 0.7165) :camera-trans (new 'static 'vector :x 2661940.5 :y 20693.81 :z -8317980.5 :w 1.0) :camera-rot (new 'static 'array float 9 0.0406 0.0 0.9991 -0.1452 0.9893 0.0059 -0.9885 -0.1453 0.0402) :load-commands @@ -954,7 +954,7 @@ :name "swamp-cave3" :level 'swamp :trans (new 'static 'vector :x 2011811.4 :y 3711.7952 :z -7923027.0 :w 1.0) - :quat (new 'static 'vector :y -0.5269 :w 0.8499) + :quat (new 'static 'quaternion :y -0.5269 :w 0.8499) :camera-trans (new 'static 'vector :x 2053120.4 :y 22242.51 :z -7927784.5 :w 1.0) :camera-rot (new 'static 'array float 9 0.1145 0.0 0.9934 -0.1412 0.9898 0.0162 -0.9833 -0.1422 0.1134) :load-commands @@ -1005,7 +1005,7 @@ :name "rolling-start" :level 'rolling :trans (new 'static 'vector :x 432272.6 :y 42821.633 :z -6737529.0 :w 1.0) - :quat (new 'static 'vector :y -0.545 :w 0.8383) + :quat (new 'static 'quaternion :y -0.545 :w 0.8383) :camera-trans (new 'static 'vector :x 494105.8 :y 67237.48 :z -6748524.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.1759 0.0 0.9843 -0.2371 0.9705 0.0423 -0.9553 -0.2409 0.1707) :load-commands '() @@ -1050,7 +1050,7 @@ :name "ogre-start" :level 'ogre :trans (new 'static 'vector :x 849775.8 :y 163962.88 :z -7301166.5 :w 1.0) - :quat (new 'static 'vector :y -0.9931 :w 0.1166) + :quat (new 'static 'quaternion :y -0.9931 :w 0.1166) :camera-trans (new 'static 'vector :x 848906.25 :y 185056.88 :z -7249962.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9998 0.0 -0.0159 0.0019 0.9925 -0.1215 0.0158 -0.1215 -0.9924) :load-commands '() @@ -1064,7 +1064,7 @@ :name "ogre-race" :level 'ogre :trans (new 'static 'vector :x 841424.9 :y 163801.1 :z -8205419.5 :w 1.0) - :quat (new 'static 'vector :y -0.9857 :w 0.168) + :quat (new 'static 'quaternion :y -0.9857 :w 0.168) :camera-trans (new 'static 'vector :x 860479.9 :y 183815.38 :z -8162368.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9145 0.0 0.4045 -0.0497 0.9924 -0.1125 -0.4015 -0.123 -0.9075) :load-commands '() @@ -1078,7 +1078,7 @@ :name "ogre-end" :level 'ogre :trans (new 'static 'vector :x 3971233.5 :y 141227.62 :z -13935735.0 :w 1.0) - :quat (new 'static 'vector :y -0.8721 :w 0.4892) + :quat (new 'static 'quaternion :y -0.8721 :w 0.4892) :camera-trans (new 'static 'vector :x 3997892.2 :y 159604.73 :z -13904449.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.7611 0.0 0.6485 -0.0932 0.9896 -0.1094 -0.6417 -0.1438 -0.7532) :load-commands '() @@ -1122,7 +1122,7 @@ :name "village3-start" :level 'village3 :trans (new 'static 'vector :x 4468021.5 :y 186608.03 :z -14054268.0 :w 1.0) - :quat (new 'static 'vector :y 0.9999 :w 0.005) + :quat (new 'static 'quaternion :y 0.9999 :w 0.005) :camera-trans (new 'static 'vector :x 4469439.5 :y 207701.2 :z -14003077.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9996 0.0 0.0268 -0.0032 0.9925 -0.1216 -0.0266 -0.1216 -0.9922) :load-commands '() @@ -1137,7 +1137,7 @@ :level 'village3 :flags #x4 :trans (new 'static 'vector :x 4549776.0 :y 215375.88 :z -14285922.0 :w 1.0) - :quat (new 'static 'vector :y 0.681 :w 0.7322) + :quat (new 'static 'quaternion :y 0.681 :w 0.7322) :camera-trans (new 'static 'vector :x 4543255.0 :y 226776.67 :z -14313317.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.8563 0.0 -0.2763 0.0456 0.8875 0.1413 0.2725 -0.1485 0.8446) :load-commands '() @@ -1151,7 +1151,7 @@ :name "village3-farside" :level 'village3 :trans (new 'static 'vector :x 4423744.0 :y 198723.58 :z -14530641.0 :w 1.0) - :quat (new 'static 'vector :y 0.6611 :w 0.7502) + :quat (new 'static 'quaternion :y 0.6611 :w 0.7502) :camera-trans (new 'static 'vector :x 4381844.0 :y 218599.83 :z -14551361.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.442 0.0 -0.8969 0.1099 0.9924 0.0541 0.8902 -0.1225 0.4387) :load-commands '() @@ -1197,7 +1197,7 @@ :name "snow-start" :level 'snow :trans (new 'static 'vector :x 4256260.0 :y 983713.8 :z -14182752.0 :w 1.0) - :quat (new 'static 'vector :y 0.7906 :w -0.6122) + :quat (new 'static 'quaternion :y 0.7906 :w -0.6122) :camera-trans (new 'static 'vector :x 4303859.5 :y 1012363.7 :z -14156672.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.4804 0.0 0.877 -0.2049 0.9723 -0.1122 -0.8527 -0.2336 -0.4671) :load-commands '() @@ -1211,7 +1211,7 @@ :name "snow-fort" :level 'snow :trans (new 'static 'vector :x 3430875.2 :y 897149.3 :z -13397581.0 :w 1.0) - :quat (new 'static 'vector :y 0.0968 :w 0.9952) + :quat (new 'static 'quaternion :y 0.0968 :w 0.9952) :camera-trans (new 'static 'vector :x 3428789.8 :y 918241.25 :z -13448724.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.9991 0.0 -0.0419 0.0051 0.9925 0.1216 0.0415 -0.1217 0.9916) :load-commands '() @@ -1225,7 +1225,7 @@ :name "snow-flut-flut" :level 'snow :trans (new 'static 'vector :x 2481850.0 :y 1054709.4 :z -13922438.0 :w 1.0) - :quat (new 'static 'vector :y 0.8628 :w -0.5055) + :quat (new 'static 'quaternion :y 0.8628 :w -0.5055) :camera-trans (new 'static 'vector :x 2497063.0 :y 1069339.9 :z -13900353.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.8224 0.0 0.5688 -0.135 0.9713 -0.1953 -0.5525 -0.2374 -0.7989) :load-commands '() @@ -1239,7 +1239,7 @@ :name "snow-pass-to-fort" :level 'snow :trans (new 'static 'vector :x 3751044.8 :y 917612.1 :z -13828696.0 :w 1.0) - :quat (new 'static 'vector :y -0.3387 :w -0.9408) + :quat (new 'static 'quaternion :y -0.3387 :w -0.9408) :camera-trans (new 'static 'vector :x 3779776.0 :y 933972.8 :z -13845825.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.6061 0.0 0.7953 -0.1493 0.9822 0.1138 -0.7812 -0.1878 0.5953) :load-commands '() @@ -1253,7 +1253,7 @@ :name "snow-by-ice-lake" :level 'snow :trans (new 'static 'vector :x 3151164.5 :y 1049638.1 :z -14246464.0 :w 1.0) - :quat (new 'static 'vector :y -0.6226 :w 0.7824) + :quat (new 'static 'quaternion :y -0.6226 :w 0.7824) :camera-trans (new 'static 'vector :x 3203905.2 :y 1080037.8 :z -14270850.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.4189 0.0 0.9079 -0.2169 0.971 0.1001 -0.8816 -0.2389 0.4068) :load-commands '() @@ -1267,7 +1267,7 @@ :name "snow-by-ice-lake-alt" :level 'snow :trans (new 'static 'vector :x 3053335.0 :y 1048927.9 :z -14058945.0 :w 1.0) - :quat (new 'static 'vector :y 0.9997 :w 0.022) + :quat (new 'static 'quaternion :y 0.9997 :w 0.022) :camera-trans (new 'static 'vector :x 3045845.5 :y 1068868.0 :z -14012568.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.987 0.0 -0.1601 0.0195 0.9924 -0.1207 0.1589 -0.1223 -0.9796) :load-commands '() @@ -1281,7 +1281,7 @@ :name "snow-outside-fort" :level 'snow :trans (new 'static 'vector :x 3431014.0 :y 901474.7 :z -13600187.0 :w 1.0) - :quat (new 'static 'vector :y -0.0954 :w -0.9954) + :quat (new 'static 'quaternion :y -0.0954 :w -0.9954) :camera-trans (new 'static 'vector :x 3429969.0 :y 922565.44 :z -13651353.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.9998 0.0 -0.0196 0.0023 0.9926 0.1213 0.0195 -0.1213 0.9924) :load-commands '() @@ -1295,7 +1295,7 @@ :name "snow-outside-cave" :level 'snow :trans (new 'static 'vector :x 3200864.2 :y 907400.4 :z -13676660.0 :w 1.0) - :quat (new 'static 'vector :y 0.5867 :w -0.8097) + :quat (new 'static 'quaternion :y 0.5867 :w -0.8097) :camera-trans (new 'static 'vector :x 3247600.8 :y 928464.06 :z -13697606.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.4062 0.0 0.9137 -0.1107 0.9926 0.0492 -0.907 -0.1211 0.4032) :load-commands '() @@ -1309,7 +1309,7 @@ :name "snow-across-from-flut" :level 'snow :trans (new 'static 'vector :x 2721898.5 :y 1049845.0 :z -13743428.0 :w 1.0) - :quat (new 'static 'vector :y -0.7688 :w -0.6394) + :quat (new 'static 'quaternion :y -0.7688 :w -0.6394) :camera-trans (new 'static 'vector :x 2712702.5 :y 1070288.5 :z -13791593.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.9554 0.0 -0.2951 0.0343 0.9932 0.1111 0.2931 -0.1163 0.9489) :load-commands '() @@ -1353,7 +1353,7 @@ :name "maincave-start" :level 'maincave :trans (new 'static 'vector :x 4420967.0 :y 33006.387 :z -13154230.0 :w 1.0) - :quat (new 'static 'vector :y 0.0174 :w -0.9998) + :quat (new 'static 'quaternion :y 0.0174 :w -0.9998) :camera-trans (new 'static 'vector :x 4428164.5 :y 54074.164 :z -13204933.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.99 0.0 0.1405 -0.0169 0.9927 0.1192 -0.1395 -0.1204 0.9828) :load-commands '() @@ -1367,7 +1367,7 @@ :name "maincave-to-darkcave" :level 'maincave :trans (new 'static 'vector :x 4172175.8 :y 154223.83 :z -12445165.0 :w 1.0) - :quat (new 'static 'vector :y -0.2093 :w 0.9778) + :quat (new 'static 'quaternion :y -0.2093 :w 0.9778) :camera-trans (new 'static 'vector :x 4193893.2 :y 175317.81 :z -12491520.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.9052 0.0 0.4248 -0.0514 0.9926 0.1096 -0.4217 -0.1211 0.8986) :load-commands '() @@ -1381,7 +1381,7 @@ :name "maincave-to-robocave" :level 'maincave :trans (new 'static 'vector :x 4760896.5 :y 44221.234 :z -12409880.0 :w 1.0) - :quat (new 'static 'vector :y 0.548 :w 0.8364) + :quat (new 'static 'quaternion :y 0.548 :w 0.8364) :camera-trans (new 'static 'vector :x 4745230.0 :y 57869.926 :z -12426885.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.7343 0.0 -0.6788 0.1872 0.9611 0.2026 0.6524 -0.2759 0.7058) :load-commands '() @@ -1425,7 +1425,7 @@ :name "darkcave-start" :level 'darkcave :trans (new 'static 'vector :x 3813246.2 :y 129487.664 :z -12114304.0 :w 1.0) - :quat (new 'static 'vector :y 0.1439 :w 0.9895) + :quat (new 'static 'quaternion :y 0.1439 :w 0.9895) :camera-trans (new 'static 'vector :x 3793301.0 :y 145573.48 :z -12139847.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.7892 0.0 -0.614 0.1178 0.9813 0.1515 0.6026 -0.1919 0.7745) :load-commands '() @@ -1468,7 +1468,7 @@ :name "robocave-start" :level 'robocave :trans (new 'static 'vector :x 5208223.5 :y 69697.945 :z -11781496.0 :w 1.0) - :quat (new 'static 'vector :y -0.3654 :w -0.9308) + :quat (new 'static 'quaternion :y -0.3654 :w -0.9308) :camera-trans (new 'static 'vector :x 5171715.0 :y 90796.85 :z -11817413.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.7006 0.0 -0.7134 0.0864 0.9926 0.0849 0.7082 -0.1212 0.6954) @@ -1483,7 +1483,7 @@ :name "robocave-bottom" :level 'robocave :trans (new 'static 'vector :x 5435461.5 :y -97111.24 :z -11588379.0 :w 1.0) - :quat (new 'static 'vector :y 0.1086 :w 0.994) + :quat (new 'static 'quaternion :y 0.1086 :w 0.994) :camera-trans (new 'static 'vector :x 5409966.5 :y -76017.664 :z -11632764.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.8662 0.0 -0.4996 0.0605 0.9926 0.105 0.4959 -0.1212 0.8598) @@ -1528,7 +1528,7 @@ :name "lavatube-start" :level 'lavatube :trans (new 'static 'vector :x 5511317.0 :y 159871.8 :z -14621239.0 :w 1.0) - :quat (new 'static 'vector :y -0.3753 :w -0.9268) + :quat (new 'static 'quaternion :y -0.3753 :w -0.9268) :camera-trans (new 'static 'vector :x 5510636.5 :y 197720.06 :z -14663128.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.9992 0.0 -0.0386 0.0178 0.8875 0.4603 0.0343 -0.4606 0.8868) @@ -1543,7 +1543,7 @@ :name "lavatube-middle" :level 'lavatube :trans (new 'static 'vector :x 9081441.0 :y -3935.8464 :z -14056285.0 :w 1.0) - :quat (new 'static 'vector :y -0.7002 :w -0.7139) + :quat (new 'static 'quaternion :y -0.7002 :w -0.7139) :camera-trans (new 'static 'vector :x 9055362.0 :y 10606.592 :z -14050822.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.205 0.0 -0.9787 0.2321 0.9714 -0.0486 0.9508 -0.2371 -0.1991) @@ -1558,7 +1558,7 @@ :name "lavatube-after-ribbon" :level 'lavatube :trans (new 'static 'vector :x 9954895.0 :y 390513.06 :z -16548614.0 :w 1.0) - :quat (new 'static 'vector :y -0.7485 :w -0.663) + :quat (new 'static 'quaternion :y -0.7485 :w -0.663) :camera-trans (new 'static 'vector :x 9923721.0 :y 406466.16 :z -16541633.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.2191 0.0 -0.9756 0.1906 0.9807 -0.0428 0.9568 -0.1953 -0.2149) @@ -1573,7 +1573,7 @@ :name "lavatube-end" :level 'lavatube :trans (new 'static 'vector :x 11479892.0 :y -163656.5 :z -18266490.0 :w 1.0) - :quat (new 'static 'vector :y -0.9589 :w -0.2836) + :quat (new 'static 'quaternion :y -0.9589 :w -0.2836) :camera-trans (new 'static 'vector :x 11526721.0 :y -143482.47 :z -18257412.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.3027 0.0 0.953 -0.1235 0.9915 -0.0392 -0.945 -0.1296 -0.3001) @@ -1618,7 +1618,7 @@ :name "citadel-start" :level 'citadel :trans (new 'static 'vector :x 11442706.0 :y -142755.84 :z -18869044.0 :w 1.0) - :quat (new 'static 'vector :y 0.9992 :w 0.0392) + :quat (new 'static 'quaternion :y 0.9992 :w 0.0392) :camera-trans (new 'static 'vector :x 11441183.0 :y -122509.31 :z -18820882.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9991 0.0 -0.0411 0.005 0.9925 -0.122 0.0408 -0.1221 -0.9916) @@ -1633,7 +1633,7 @@ :name "citadel-entrance" :level 'citadel :trans (new 'static 'vector :x 11443969.0 :y -154216.03 :z -18472782.0 :w 1.0) - :quat (new 'static 'vector :y -0.9728 :w 0.2314) + :quat (new 'static 'quaternion :y -0.9728 :w 0.2314) :camera-trans (new 'static 'vector :x 11436929.0 :y -134244.36 :z -18426254.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9898 0.0 -0.1424 0.0173 0.9925 -0.1207 0.1413 -0.1219 -0.9824) @@ -1649,7 +1649,7 @@ :level 'citadel :flags #x4 :trans (new 'static 'vector :x 11454895.0 :y -161791.6 :z -18204690.0 :w 1.0) - :quat (new 'static 'vector :y 0.7511 :w 0.6601) + :quat (new 'static 'quaternion :y 0.7511 :w 0.6601) :camera-trans (new 'static 'vector :x 11406872.0 :y -141278.0 :z -18194638.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.1989 0.0 -0.98 0.1179 0.9927 -0.0239 0.9728 -0.1203 -0.1974) @@ -1664,7 +1664,7 @@ :name "citadel-launch-start" :level 'citadel :trans (new 'static 'vector :x 10827551.0 :y -94047.02 :z -18946718.0 :w 1.0) - :quat (new 'static 'vector :y 0.8377 :w -0.546) + :quat (new 'static 'quaternion :y 0.8377 :w -0.546) :camera-trans (new 'static 'vector :x 10862150.0 :y -75343.875 :z -18922316.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.5766 0.0 0.8169 -0.1125 0.9904 -0.0794 -0.8091 -0.1378 -0.5711) @@ -1679,7 +1679,7 @@ :name "citadel-launch-end" :level 'citadel :trans (new 'static 'vector :x 11047507.0 :y -81514.086 :z -19495960.0 :w 1.0) - :quat (new 'static 'vector :y 0.0292 :w 0.9995) + :quat (new 'static 'quaternion :y 0.0292 :w 0.9995) :camera-trans (new 'static 'vector :x 11033498.0 :y -63027.2 :z -19534916.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.9413 0.0 -0.3373 0.0481 0.9897 0.1343 0.3339 -0.1427 0.9317) @@ -1694,7 +1694,7 @@ :name "citadel-plat-start" :level 'citadel :trans (new 'static 'vector :x 11443470.0 :y -120194.664 :z -19845628.0 :w 1.0) - :quat (new 'static 'vector :y -0.9907 :w -0.1355) + :quat (new 'static 'quaternion :y -0.9907 :w -0.1355) :camera-trans (new 'static 'vector :x 11443545.0 :y -99100.266 :z -19794374.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9999 0.0 0.0016 -0.0001 0.9926 -0.1207 -0.0015 -0.1207 -0.9926) @@ -1709,7 +1709,7 @@ :name "citadel-plat-end" :level 'citadel :trans (new 'static 'vector :x 11269726.0 :y -12132.352 :z -19614712.0 :w 1.0) - :quat (new 'static 'vector :y -0.0419 :w 0.9991) + :quat (new 'static 'quaternion :y -0.0419 :w 0.9991) :camera-trans (new 'static 'vector :x 11264449.0 :y 7920.8447 :z -19661710.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.9938 0.0 -0.1103 0.0134 0.9924 0.1215 0.1095 -0.1223 0.9864) @@ -1724,7 +1724,7 @@ :name "citadel-generator-start" :level 'citadel :trans (new 'static 'vector :x 12138031.0 :y -36900.863 :z -18933304.0 :w 1.0) - :quat (new 'static 'vector :y 0.7487 :w 0.6628) + :quat (new 'static 'quaternion :y 0.7487 :w 0.6628) :camera-trans (new 'static 'vector :x 12101831.0 :y -19811.123 :z -18933632.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.0093 0.0 -0.9999 0.1678 0.9858 0.0015 0.9857 -0.1678 0.0092) @@ -1739,7 +1739,7 @@ :name "citadel-generator-end" :level 'citadel :trans (new 'static 'vector :x 11837483.0 :y -20177.715 :z -19506848.0 :w 1.0) - :quat (new 'static 'vector :y -0.3564 :w 0.9342) + :quat (new 'static 'quaternion :y -0.3564 :w 0.9342) :camera-trans (new 'static 'vector :x 11872697.0 :y 887.6032 :z -19544198.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.7296 0.0 0.6838 -0.0851 0.9922 0.0908 -0.6785 -0.1245 0.7239) @@ -1754,7 +1754,7 @@ :name "citadel-elevator" :level 'citadel :trans (new 'static 'vector :x 11447961.0 :y 234055.27 :z -19169000.0 :w 1.0) - :quat (new 'static 'vector :y 0.2351 :w 0.9719) + :quat (new 'static 'quaternion :y 0.2351 :w 0.9719) :camera-trans (new 'static 'vector :x 11454465.0 :y 252947.66 :z -19126656.0 :w 1.0) :camera-rot (new 'static 'array float 9 -0.9932 0.0 0.1161 -0.017 0.9892 -0.1454 -0.1148 -0.1464 -0.9825) @@ -1800,7 +1800,7 @@ :name "finalboss-start" :level 'finalboss :trans (new 'static 'vector :x 11548456.0 :y 2215872.0 :z -19409498.0 :w 1.0) - :quat (new 'static 'vector :y 0.7325 :w 0.6807) + :quat (new 'static 'quaternion :y 0.7325 :w 0.6807) :camera-trans (new 'static 'vector :x 11513311.0 :y 2234999.5 :z -19435708.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.5883 0.0 -0.8085 0.1074 0.9911 0.0781 0.8014 -0.1328 0.5831) @@ -1817,7 +1817,7 @@ :trans (new 'static 'vector :x 12288335.0 :y 1970461.9 :z -19848522.0 :w 1.0) :quat - (new 'static 'vector :y -0.5359 :w -0.8442) + (new 'static 'quaternion :y -0.5359 :w -0.8442) :camera-trans (new 'static 'vector :x 12265366.0 :y 1984228.5 :z -19842574.0 :w 1.0) :camera-rot @@ -1892,7 +1892,7 @@ :level 'demo :flags #x8 :trans (new 'static 'vector :x 66396.16 :y 29782.016 :z -919973.5 :w 1.0) - :quat (new 'static 'vector :w 1.0) + :quat (new 'static 'quaternion :w 1.0) :camera-trans (new 'static 'vector :x 76871.68 :y 55061.707 :z -938752.0 :w 1.0) :camera-rot (new 'static 'array float 9 0.8743 0.0 0.4852 -0.2117 0.8997 0.3816 -0.4365 -0.4364 0.7866) :load-commands '() @@ -1936,7 +1936,7 @@ :level 'title :flags #x80 :trans (new 'static 'vector :x -635598.9 :y 222551.66 :z 710496.25 :w 1.0) - :quat (new 'static 'vector :y -0.3323 :w -0.9431) + :quat (new 'static 'quaternion :y -0.3323 :w -0.9431) :camera-trans (new 'static 'vector :x -665644.25 :y 250803.0 :z 668470.9 :w 1.0) :camera-rot (new 'static 'array float 9 0.8129 0.0 -0.5823 0.0958 0.9863 0.1337 0.5744 -0.1645 0.8018) :load-commands '() @@ -1979,7 +1979,7 @@ :name "halfpipe" :level 'halfpipe :trans (new 'static 'vector :x -1048.9856 :y -172047.97 :z -212555.78 :w 1.0) - :quat (new 'static 'vector :y 0.061 :w 0.9981) + :quat (new 'static 'quaternion :y 0.061 :w 0.9981) :camera-trans (new 'static 'vector :x -9941.401 :y -150049.17 :z -159587.94 :w 1.0) :camera-rot (new 'static 'array float 9 -0.979 0.0 -0.2037 0.0545 0.9634 -0.2622 0.1963 -0.2678 -0.9432) :load-commands '() diff --git a/goal_src/engine/level/level.gc b/goal_src/engine/level/level.gc index edbeb9d1e4..18022fabe2 100644 --- a/goal_src/engine/level/level.gc +++ b/goal_src/engine/level/level.gc @@ -738,7 +738,7 @@ (case (-> obj status) (('active 'alive) (format 0 "----------- kill ~A (status ~A)~%" obj (-> obj status)) - (dummy-14 *game-info*) + (copy-perms-from-level! *game-info* obj) (send-event *camera* 'level-deactivate (-> obj name)) (send-event *target* 'level-deactivate (-> obj name)) (remove-by-param1 *background-draw-engine* (-> obj bsp)) @@ -1191,7 +1191,7 @@ (set! (-> *load-state* want 1 display?) #f) (set! (-> *load-state* want 1 force-inside?) #f) (if (-> gp-1 info continues) - (dummy-19 *game-info* (the-as continue-point (car (-> gp-1 info continues)))) + (set-continue! *game-info* (the-as continue-point (car (-> gp-1 info continues)))) ) ) (activate-levels! *level*) diff --git a/goal_src/engine/math/vector-h.gc b/goal_src/engine/math/vector-h.gc index 2a3f65ad41..147a71d53f 100644 --- a/goal_src/engine/math/vector-h.gc +++ b/goal_src/engine/math/vector-h.gc @@ -28,7 +28,7 @@ (get-bit (_type_ int) symbol 9) (clear-bit (_type_ int) int 10) (set-bit (_type_ int) int 11) - (clear (_type_) _type_ 12) + (clear-all! (_type_) _type_ 12) ) ) @@ -91,7 +91,7 @@ 0 ) -(defmethod clear bit-array ((obj bit-array)) +(defmethod clear-all! bit-array ((obj bit-array)) "Set all bits to zero." (countdown (idx (/ (logand -8 (+ (-> obj allocated-length) 7)) 8)) (nop!) diff --git a/goal_src/engine/ui/credits.gc b/goal_src/engine/ui/credits.gc index c5f21f4ccc..8e19d6bf15 100644 --- a/goal_src/engine/ui/credits.gc +++ b/goal_src/engine/ui/credits.gc @@ -49,109 +49,97 @@ ) ) -;; definition for function draw-title-credits -;; INFO: Return type mismatch int vs none. (defun draw-title-credits ((arg0 float)) (when (>= 1.0 arg0) - (let* ((s4-0 11) - (f30-0 (* arg0 (the float (+ s4-0 -2)))) - (s5-0 (the int f30-0)) - (gp-0 - (new - 'stack - 'font-context - *font-default-matrix* - 0 - 0 - 0.0 - 0 - (the-as uint 3) - ) - ) - ) - (let ((f0-3 1.0)) - ) - (let ((v1-3 gp-0)) - (set! (-> v1-3 width) (the float 600)) - ) - (let ((v1-4 gp-0)) - (set! (-> v1-4 height) (the float 10)) - ) - (set! (-> gp-0 flags) (the-as uint 38)) - (let* ((s5-1 (- s5-0 (mod s5-0 3))) - (f0-10 (- f30-0 (the float s5-1))) - ) - (when (and (>= s5-1 0) (< s5-1 s4-0)) - (let ((f30-1 (cond - ((< f0-10 0.8) - 0.0 - ) - ((< f0-10 1.6) - (* 160.0 (+ -0.8 f0-10)) - ) - ((< f0-10 2.2) - 128.0 - ) - (else - (* 128.0 (- 1.0 (* 1.25 (+ -2.2 f0-10)))) - ) - ) + (let* ((s4-0 11) + (f30-0 (* arg0 (the float (+ s4-0 -2)))) + (s5-0 (the int f30-0)) + (gp-0 (new 'stack 'font-context + *font-default-matrix* + 0 + 0 + 0.0 + 0 + (the-as uint 3) + ) ) - ) - (set! (-> gp-0 origin x) -44.0) - (set! (-> gp-0 origin y) 90.0) - (dotimes (s4-1 3) - (let* ((s2-0 (+ (+ s4-1 3840) s5-1)) - (s3-0 (dummy-9 *common-text* (the-as uint s2-0) #t)) - ) - (when (= s2-0 3841) - (let ((v1-18 (scf-get-territory))) - (cond - ((= v1-18 1) - (set! s3-0 (dummy-9 *common-text* (the-as uint 3857) #t)) - ) - ((= v1-18 2) - (set! s3-0 (dummy-9 *common-text* (the-as uint 3856) #t)) - ) - ) ) - ) - (when s3-0 - (let ((v1-25 gp-0)) - (set! (-> v1-25 scale) (-> *title-credits-scale* (+ s5-1 s4-1))) - ) - (print-game-text s3-0 gp-0 #f (the int f30-1) 22) - ) - ) - (set! - (-> gp-0 origin y) - (+ - (-> gp-0 origin y) - (the float (-> *title-credits-spacing* (+ s5-1 s4-1))) - ) - ) + 1.0 + (let ((v1-3 gp-0)) + (set! (-> v1-3 width) (the float 600)) + ) + (let ((v1-4 gp-0)) + (set! (-> v1-4 height) (the float 10)) + ) + (set! (-> gp-0 flags) (the-as uint 38)) + (let* ((s5-1 (- s5-0 (mod s5-0 3))) + (f0-10 (- f30-0 (the float s5-1))) + ) + (when (and (>= s5-1 0) (< s5-1 s4-0)) + (let ((f30-1 (cond + ((< f0-10 0.8) + 0.0 + ) + ((< f0-10 1.6) + (* 160.0 (+ -0.8 f0-10)) + ) + ((< f0-10 2.2) + 128.0 + ) + (else + (* 128.0 (- 1.0 (* 1.25 (+ -2.2 f0-10)))) + ) + ) + ) + ) + (set! (-> gp-0 origin x) -44.0) + (set! (-> gp-0 origin y) 90.0) + (dotimes (s4-1 3) + (let* ((s2-0 (+ (+ s4-1 3840) s5-1)) + (s3-0 (lookup-text! *common-text* (the-as game-text-id s2-0) #t)) + ) + (when (= s2-0 3841) + (let ((v1-18 (scf-get-territory))) + (cond + ((= v1-18 1) + (set! s3-0 (lookup-text! *common-text* (game-text-id europe) #t)) + ) + ((= v1-18 2) + (set! s3-0 (lookup-text! *common-text* (game-text-id inc) #t)) + ) + ) + ) + ) + (when s3-0 + (let ((v1-25 gp-0)) + (set! (-> v1-25 scale) (-> *title-credits-scale* (+ s5-1 s4-1))) + ) + (print-game-text s3-0 gp-0 #f (the int f30-1) 22) + ) + ) + (set! (-> gp-0 origin y) + (+ (-> gp-0 origin y) + (the float (-> *title-credits-spacing* (+ s5-1 s4-1))) + ) + ) + ) + ) + ) ) - ) ) - ) ) - ) + 0 (none) ) ;; definition for function draw-end-credits (defun draw-end-credits ((arg0 int)) (local-vars (v1-13 int)) - (let - ((s4-0 - (+ (- arg0) (the int (* 1.5 (the float (-> *video-parms* screen-sy))))) - ) + (let ((s4-0 (+ (- arg0) (the int (* 1.5 (the float (-> *video-parms* screen-sy)))))) (gp-0 2815) (s3-0 0) (s2-0 #t) - (s5-0 - (new 'stack 'font-context *font-default-matrix* 31 0 0.0 0 (the-as uint 3)) - ) + (s5-0 (new 'stack 'font-context *font-default-matrix* 31 0 0.0 0 (the-as uint 3))) ) (let ((v1-2 s5-0)) (set! (-> v1-2 width) (the float 450)) @@ -163,11 +151,10 @@ (set! (-> v1-4 scale) 1.0) ) (set! (-> s5-0 flags) (the-as uint 39)) - (while - (or s2-0 (and (< s4-0 (- s3-0)) (< (the-as uint gp-0) (the-as uint 3249)))) + (while (or s2-0 (and (< s4-0 (- s3-0)) (< (the-as uint gp-0) (the-as uint 3249)))) (+! s4-0 s3-0) (+! gp-0 1) - (let ((a0-8 (dummy-9 *common-text* (the-as uint gp-0) #t))) + (let ((a0-8 (lookup-text! *common-text* (the-as game-text-id gp-0) #t))) (if a0-8 (set! s3-0 (the int (+ 5.0 (print-game-text a0-8 s5-0 #t 128 20)))) (set! s3-0 25) @@ -182,7 +169,7 @@ (else (set! (-> s5-0 origin y) (the float s4-0)) (while (< (-> s5-0 origin y) (the float (-> *video-parms* screen-sy))) - (let ((a0-11 (dummy-9 *common-text* (the-as uint gp-0) #t))) + (let ((a0-11 (lookup-text! *common-text* (the-as game-text-id gp-0) #t))) (if a0-11 (set! v1-13 (the int (+ 5.0 (print-game-text a0-11 s5-0 #f 128 20)))) (set! v1-13 25) @@ -197,6 +184,3 @@ ) ) - - - diff --git a/goal_src/engine/ui/progress-h.gc b/goal_src/engine/ui/progress-h.gc index 82428854c7..09f4281ab2 100644 --- a/goal_src/engine/ui/progress-h.gc +++ b/goal_src/engine/ui/progress-h.gc @@ -25,9 +25,9 @@ ) (deftype task-info-data (basic) - ((task-id uint8 :offset-assert 4) - (task-name symbol 4 :offset-assert 8) - (text-index-when-resolved int32 :offset-assert 24) + ((task-id game-task :offset-assert 4) + (task-name game-text-id 4 :offset-assert 8) + (text-index-when-resolved int32 :offset-assert 24) ) :method-count-assert 9 :size-assert #x1c @@ -35,11 +35,11 @@ ) (deftype level-tasks-info (basic) - ((level-name-id uint32 :offset-assert 4) - (text-group-index int32 :offset-assert 8) - (nb-of-tasks int32 :offset-assert 12) - (buzzer-task-index int32 :offset-assert 16) - (task-info task-info-data 8 :offset-assert 20) + ((level-name-id game-text-id :offset-assert 4) + (text-group-index int32 :offset-assert 8) + (nb-of-tasks int32 :offset-assert 12) + (buzzer-task-index int32 :offset-assert 16) + (task-info task-info-data 8 :offset-assert 20) ) :method-count-assert 9 :size-assert #x34 @@ -47,13 +47,13 @@ ) (deftype game-option (basic) - ((option-type uint64 :offset-assert 8) - (name uint32 :offset-assert 16) - (scale basic :offset-assert 20) - (param1 float :offset-assert 24) - (param2 float :offset-assert 28) - (param3 int32 :offset-assert 32) - (value-to-modify uint32 :offset-assert 36) + ((option-type uint64 :offset-assert 8) + (name game-text-id :offset-assert 16) + (scale basic :offset-assert 20) + (param1 float :offset-assert 24) + (param2 float :offset-assert 28) + (param3 int32 :offset-assert 32) + (value-to-modify uint32 :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 @@ -173,3 +173,7 @@ (defun-extern activate-progress process int int) +(define-extern *level-task-data* (array level-tasks-info)) +(define-extern *level-task-data-remap* (array int32)) +(define-extern get-game-count (function int count-info)) +(define-extern activate-orb-all (function int int)) ;; maybe in hud? \ No newline at end of file diff --git a/goal_src/engine/ui/progress/progress-static.gc b/goal_src/engine/ui/progress/progress-static.gc index 5ab5534369..e46c803651 100644 --- a/goal_src/engine/ui/progress/progress-static.gc +++ b/goal_src/engine/ui/progress/progress-static.gc @@ -5,4 +5,1377 @@ ;; name in dgo: progress-static ;; dgos: GAME, ENGINE -(define *game-counts* (the game-count-info '#f)) \ No newline at end of file +;; This file contains the layouts for all of the menus. + +;; options in the start menu options +(define *main-options* + (new 'static 'boxed-array :type game-option :length 7 :allocated-length 7 + (new 'static 'game-option :option-type #x6 :name (game-text-id game-options) :scale #t :param3 4) + (new 'static 'game-option :option-type #x6 :name (game-text-id graphic-options) :scale #t :param3 5) + (new 'static 'game-option :option-type #x6 :name (game-text-id sound-options) :scale #t :param3 6) + (new 'static 'game-option :option-type #x6 :name (game-text-id load-game) :scale #t :param3 16) + (new 'static 'game-option :option-type #x6 :name (game-text-id save-game) :scale #t :param3 17) + (new 'static 'game-option :option-type #x6 :name (game-text-id quit-game) :scale #t :param3 34) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *title* + (new 'static 'boxed-array :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option :option-type #x6 :name (game-text-id new-game) :scale #t :param3 18) + (new 'static 'game-option :option-type #x6 :name (game-text-id load-game) :scale #t :param3 16) + (new 'static 'game-option :option-type #x6 :name (game-text-id options) :scale #t :param3 28) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *options* + (new 'static 'boxed-array :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option :option-type #x6 :name (game-text-id game-options) :scale #t :param3 4) + (new 'static 'game-option :option-type #x6 :name (game-text-id graphic-options) :scale #t :param3 5) + (new 'static 'game-option :option-type #x6 :name (game-text-id sound-options) :scale #t :param3 6) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *main-options-demo* + (new 'static 'boxed-array :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option :option-type #x6 :name (game-text-id game-options) :scale #t :param3 4) + (new 'static 'game-option :option-type #x6 :name (game-text-id graphic-options) :scale #t :param3 5) + (new 'static 'game-option :option-type #x6 :name (game-text-id sound-options) :scale #t :param3 6) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *main-options-demo-shared* + (new 'static 'boxed-array :type game-option :length 5 :allocated-length 5 + (new 'static 'game-option :option-type #x6 :name (game-text-id game-options) :scale #t :param3 4) + (new 'static 'game-option :option-type #x6 :name (game-text-id graphic-options) :scale #t :param3 5) + (new 'static 'game-option :option-type #x6 :name (game-text-id sound-options) :scale #t :param3 6) + (new 'static 'game-option :option-type #x8 :name (game-text-id exit-demo) :scale #t) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *game-options* + (new 'static 'boxed-array :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option :option-type #x2 :name (game-text-id vibrations) :scale #t) + (new 'static 'game-option :option-type #x2 :name (game-text-id play-hints) :scale #t) + (new 'static 'game-option :option-type #x1 :name (game-text-id language) :scale #t) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *game-options-japan* + (new 'static 'boxed-array :type game-option :length 3 :allocated-length 3 + (new 'static 'game-option :option-type #x2 :name (game-text-id vibrations) :scale #t) + (new 'static 'game-option :option-type #x2 :name (game-text-id play-hints) :scale #t) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *game-options-demo* + (new 'static 'boxed-array :type game-option :length 3 :allocated-length 3 + (new 'static 'game-option :option-type #x2 :name (game-text-id vibrations) :scale #t) + (new 'static 'game-option :option-type #x2 :name (game-text-id play-hints) :scale #t) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *graphic-options* + (new 'static 'boxed-array :type game-option :length 3 :allocated-length 3 + (new 'static 'game-option :option-type #x3 :name (game-text-id center-screen) :scale #t) + (new 'static 'game-option :option-type #x4 :name (game-text-id aspect-ratio) :scale #t) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *graphic-title-options-pal* + (new 'static 'boxed-array :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option :option-type #x3 :name (game-text-id center-screen) :scale #t) + (new 'static 'game-option :option-type #x5 :name (game-text-id video-mode) :scale #t) + (new 'static 'game-option :option-type #x4 :name (game-text-id aspect-ratio) :scale #t) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *sound-options* + (new 'static 'boxed-array :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option :name (game-text-id sfx-volume) :scale #t :param2 100.0) + (new 'static 'game-option :name (game-text-id music-volume) :scale #t :param2 100.0) + (new 'static 'game-option :name (game-text-id speech-volume) :scale #t :param2 100.0) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #t) + ) + ) + +(define *yes-no-options* + (new 'static 'boxed-array :type game-option :length 1 :allocated-length 1 + (new 'static 'game-option :option-type #x7 :scale #f) + ) + ) + +(define *ok-options* + (new 'static 'boxed-array :type game-option :length 1 :allocated-length 1 + (new 'static 'game-option :option-type #x8 :name (game-text-id ok) :scale #f) + ) + ) + +(define *load-options* + (new 'static 'boxed-array + :type game-option :length 5 :allocated-length 5 + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #f) + ) + ) + +(define *save-options* + (new 'static 'boxed-array :type game-option :length 5 :allocated-length 5 + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #f) + ) + ) + +(define *save-options-title* + (new 'static 'boxed-array + :type game-option :length 6 :allocated-length 6 + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :name (game-text-id continue-without-saving) :scale #f) + (new 'static 'game-option :option-type #x8 :name (game-text-id back) :scale #f) + ) + ) + +(define *options-remap* + (new 'static 'boxed-array :type array :length 0 :allocated-length 35) + ) + +;; TODO probably an enum. +(define *level-task-data-remap* + (new 'static 'boxed-array :type int32 :length 23 :allocated-length 23 + 0 + 1 + 2 + 3 + 3 + 4 + 5 + 6 + 7 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 13 + 13 + 14 + 15 + 15 + 4 + 4 + ) + ) + +;; TODO what does this map? GOAL language ID or SCE? +(define *language-name-remap* + (new 'static 'boxed-array :type game-text-id :length 6 :allocated-length 6 + (game-text-id english) + (game-text-id french) + (game-text-id german) + (game-text-id spanish) + (game-text-id italian) + (game-text-id japanese) + ) + ) + +;; all level tasks +(define *level-task-data* + (new 'static 'boxed-array :type level-tasks-info :length 16 :allocated-length 16 + (new 'static 'level-tasks-info + :level-name-id (game-text-id training-level-name) + :text-group-index 1 + :nb-of-tasks 4 + :buzzer-task-index 3 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task training-gimmie) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id training-gimmie-task-name) + (game-text-id training-gimmie-task-name) + (game-text-id training-gimmie-task-name) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task training-door) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id training-door-task-name) + (game-text-id training-door-task-name) + (game-text-id training-door-task-name) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task training-climb) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id training-climb-task-name) + (game-text-id training-climb-task-name) + (game-text-id training-climb-task-name) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task training-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id training-buzzer-task-name) + (game-text-id training-buzzer-task-name) + (game-text-id training-buzzer-task-name) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id village1-level-name) + :text-group-index 1 + :nb-of-tasks 6 + :buzzer-task-index 5 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task village1-mayor-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village1-mayor-money) + (game-text-id village1-mayor-money) + (game-text-id village1-mayor-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-uncle-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id vollage1-uncle-money) + (game-text-id vollage1-uncle-money) + (game-text-id vollage1-uncle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-yakow) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village1-yakow-herd) + (game-text-id village1-yakow-herd) + (game-text-id village1-yakow-return) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-oracle-money1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village1-oracle) + (game-text-id village1-oracle) + (game-text-id village1-oracle) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-oracle-money2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village1-oracle) + (game-text-id village1-oracle) + (game-text-id village1-oracle) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id beach-level-name) + :text-group-index 1 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task beach-ecorocks) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-ecorocks) + (game-text-id beach-ecorocks) + (game-text-id beach-ecorocks) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-flutflut) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-flutflut-push) + (game-text-id beach-flutflut-push) + (game-text-id beach-flutflut-meet) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-pelican) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-pelican) + (game-text-id beach-pelican) + (game-text-id beach-pelican) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-seagull) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-seagull) + (game-text-id beach-seagull) + (game-text-id beach-seagull-get) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-cannon) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-cannon) + (game-text-id beach-cannon) + (game-text-id beach-cannon) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-gimmie) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-gimmie) + (game-text-id beach-gimmie) + (game-text-id beach-gimmie) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-sentinel) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-sentinel) + (game-text-id beach-sentinel) + (game-text-id beach-sentinel) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id jungle-level-name) + :text-group-index 1 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task jungle-lurkerm) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-lurkerm-unblock) + (game-text-id jungle-lurkerm-connect) + (game-text-id jungle-lurkerm-return) + (game-text-id zero) + ) + :text-index-when-resolved 1 + ) + (new 'static 'task-info-data + :task-id (game-task jungle-tower) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-tower) + (game-text-id jungle-tower) + (game-text-id jungle-tower) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-eggtop) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-eggtop) + (game-text-id jungle-eggtop) + (game-text-id jungle-eggtop) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-plant) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-plant) + (game-text-id jungle-plant) + (game-text-id jungle-plant) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-fishgame) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-fishgame) + (game-text-id jungle-fishgame) + (game-text-id jungle-fishgame) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-canyon-end) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-canyon-end) + (game-text-id jungle-canyon-end) + (game-text-id jungle-canyon-end) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-temple-door) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-temple-door) + (game-text-id jungle-temple-door) + (game-text-id jungle-temple-door) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id misty-level-name) + :text-group-index 1 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task misty-muse) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-muse-catch) + (game-text-id misty-muse-catch) + (game-text-id misty-muse-return) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-boat) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-boat) + (game-text-id misty-boat) + (game-text-id misty-boat) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-cannon) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-cannon) + (game-text-id misty-cannon) + (game-text-id misty-cannon) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-warehouse) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-return-to-pool) + (game-text-id misty-return-to-pool) + (game-text-id misty-return-to-pool) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-bike) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-find-transpad) + (game-text-id misty-balloon-lurkers) + (game-text-id misty-find-transpad) + (game-text-id zero) + ) + :text-index-when-resolved 1 + ) + (new 'static 'task-info-data + :task-id (game-task misty-bike-jump) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-bike-jump) + (game-text-id misty-bike-jump) + (game-text-id misty-bike-jump) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-eco-challenge) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-eco-challenge) + (game-text-id misty-eco-challenge) + (game-text-id misty-eco-challenge) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id fire-canyon-level-name) + :text-group-index 5 + :nb-of-tasks 2 + :buzzer-task-index 1 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task firecanyon-end) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id fire-canyon-end) + (game-text-id fire-canyon-end) + (game-text-id fire-canyon-end) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task firecanyon-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id fire-canyon-buzzer) + (game-text-id fire-canyon-buzzer) + (game-text-id fire-canyon-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id village2-level-name) + :text-group-index 2 + :nb-of-tasks 6 + :buzzer-task-index 5 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task village2-gambler-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-gambler-money) + (game-text-id village2-gambler-money) + (game-text-id village2-gambler-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-geologist-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-geologist-money) + (game-text-id village2-geologist-money) + (game-text-id village2-geologist-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-warrior-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-warrior-money) + (game-text-id village2-warrior-money) + (game-text-id village2-warrior-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-oracle-money1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-oracle-money) + (game-text-id village2-oracle-money) + (game-text-id village2-oracle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-oracle-money2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-oracle-money) + (game-text-id village2-oracle-money) + (game-text-id village2-oracle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id sunken-level-name) + :text-group-index 2 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task sunken-room) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-elevator-raise) + (game-text-id sunken-elevator-raise) + (game-text-id sunken-elevator-get-to-roof) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-pipe) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-pipe) + (game-text-id sunken-pipe) + (game-text-id sunken-pipe) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-slide) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-bottom) + (game-text-id sunken-bottom) + (game-text-id sunken-bottom) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-sharks) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-pool) + (game-text-id sunken-pool) + (game-text-id sunken-pool) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-platforms) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-platforms) + (game-text-id sunken-platforms) + (game-text-id sunken-platforms) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-top-of-helix) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-climb-tube) + (game-text-id sunken-climb-tube) + (game-text-id sunken-climb-tube) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-spinning-room) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id reach-center) + (game-text-id reach-center) + (game-text-id reach-center) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id swamp-level-name) + :text-group-index 2 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task swamp-flutflut) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-flutflut) + (game-text-id swamp-flutflut) + (game-text-id swamp-flutflut) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-billy) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-billy) + (game-text-id swamp-billy) + (game-text-id swamp-billy) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-battle) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-battle) + (game-text-id swamp-battle) + (game-text-id swamp-battle) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-tether-4) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-tether-1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-tether-2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-tether-3) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id rolling-level-name) + :text-group-index 2 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task rolling-moles) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-moles) + (game-text-id rolling-moles) + (game-text-id rolling-moles-return) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-robbers) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-robbers) + (game-text-id rolling-robbers) + (game-text-id rolling-robbers) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-race) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-race) + (game-text-id rolling-race) + (game-text-id rolling-race-return) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-lake) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-lake) + (game-text-id rolling-lake) + (game-text-id rolling-lake) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-plants) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-plants) + (game-text-id rolling-plants) + (game-text-id rolling-plants) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-ring-chase-1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-ring-chase-1) + (game-text-id rolling-ring-chase-1) + (game-text-id rolling-ring-chase-1) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-ring-chase-2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-ring-chase-2) + (game-text-id rolling-ring-chase-2) + (game-text-id rolling-ring-chase-2) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id ogre-level-name) + :text-group-index 6 + :nb-of-tasks 4 + :buzzer-task-index 3 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task ogre-boss) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id ogre-boss) + (game-text-id ogre-boss) + (game-text-id ogre-boss) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task ogre-end) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id ogre-end) + (game-text-id ogre-end) + (game-text-id ogre-end) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task ogre-secret) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id hidden-power-cell) + (game-text-id hidden-power-cell) + (game-text-id hidden-power-cell) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task ogre-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id ogre-buzzer) + (game-text-id ogre-buzzer) + (game-text-id ogre-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id village3-level-name) + :text-group-index 3 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task village3-miner-money1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-miner-money2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-miner-money3) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-miner-money4) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-oracle-money1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-oracle-money) + (game-text-id village3-oracle-money) + (game-text-id village3-oracle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-oracle-money2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-oracle-money) + (game-text-id village3-oracle-money) + (game-text-id village3-oracle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-extra1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id hidden-power-cell) + (game-text-id hidden-power-cell) + (game-text-id hidden-power-cell) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id snowy-level-name) + :text-group-index 3 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task snow-eggtop) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-eggtop) + (game-text-id snow-eggtop) + (game-text-id snow-eggtop) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-ram) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-ram-3-left) + (game-text-id snow-ram-2-left) + (game-text-id snow-ram-1-left) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-bumpers) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-bumpers) + (game-text-id snow-bumpers) + (game-text-id snow-bumpers) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-cage) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-frozen-crate) + (game-text-id snow-frozen-crate) + (game-text-id snow-frozen-crate) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-fort) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-fort) + (game-text-id snow-fort) + (game-text-id snow-fort) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-ball) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-open-door) + (game-text-id snow-open-door) + (game-text-id snow-open-door) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-bunnies) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-bunnies) + (game-text-id snow-bunnies) + (game-text-id snow-bunnies) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id cave-level-name) + :text-group-index 3 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task cave-gnawers) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-gnawers) + (game-text-id cave-gnawers) + (game-text-id cave-gnawers) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-dark-crystals) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-dark-crystals) + (game-text-id cave-dark-crystals) + (game-text-id cave-dark-crystals) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-dark-climb) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-dark-climb) + (game-text-id cave-dark-climb) + (game-text-id cave-dark-climb) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-robot-climb) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-robot-climb) + (game-text-id cave-robot-climb) + (game-text-id cave-robot-climb) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-swing-poles) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-swing-poles) + (game-text-id cave-swing-poles) + (game-text-id cave-swing-poles) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-spider-tunnel) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-spider-tunnel) + (game-text-id cave-spider-tunnel) + (game-text-id cave-spider-tunnel) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-platforms) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-platforms) + (game-text-id cave-platforms) + (game-text-id cave-platforms) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id lavatube-level-name) + :text-group-index 3 + :nb-of-tasks 2 + :buzzer-task-index 1 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task lavatube-end) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id lavatube-end) + (game-text-id lavatube-end) + (game-text-id lavatube-end) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task lavatube-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id lavatube-buzzer) + (game-text-id lavatube-buzzer) + (game-text-id lavatube-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id citadel-level-name) + :text-group-index 4 + :nb-of-tasks 5 + :buzzer-task-index 4 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task citadel-sage-blue) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-sage-blue) + (game-text-id citadel-sage-blue) + (game-text-id citadel-sage-blue) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task citadel-sage-red) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-sage-red) + (game-text-id citadel-sage-red) + (game-text-id citadel-sage-red) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task citadel-sage-yellow) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-sage-yellow) + (game-text-id citadel-sage-yellow) + (game-text-id citadel-sage-yellow) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task citadel-sage-green) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-sage-green) + (game-text-id citadel-sage-green) + (game-text-id citadel-sage-green) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task citadel-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-buzzer) + (game-text-id citadel-buzzer) + (game-text-id citadel-buzzer) + (game-text-id zero) + ) + ) + ) + ) + ) + ) + +(define *task-egg-starting-x* + (new 'static 'boxed-array :type int32 :length 9 :allocated-length 9 + #xda + #xc2 + #xab + #x93 + #x7c + 100 + 77 + 53 + 30 + ) + ) + +(define *game-counts* (the-as game-count-info #f)) + + + + diff --git a/goal_src/engine/ui/text-h.gc b/goal_src/engine/ui/text-h.gc index 6f66dc5b44..31a63a6661 100644 --- a/goal_src/engine/ui/text-h.gc +++ b/goal_src/engine/ui/text-h.gc @@ -9,6 +9,190 @@ ;; Each game string is assigned an ID number. ;; This ID is used to lookup the string for the currently selected language. +(defenum game-text-id + :type uint32 + :bitfield #f + (zero 0) + (sfx-volume #x10a) + (music-volume #x10b) + (speech-volume #x10c) + (language #x10d) + (vibrations #x10e) + (play-hints #x10f) + (center-screen #x110) + (english #x114) + (french #x115) + (german #x116) + (spanish #x117) + (italian #x118) + (japanese #x119) + (aspect-ratio #x125) + (video-mode #x126) + (game-options #x127) + (graphic-options #x128) + (sound-options #x129) + + (hidden-power-cell #x12f) ;; why is this here?? + + (continue-without-saving #x13f) + (back #x13e) + (load-game #x14b) + (save-game #x14c) + (options #x150) + (new-game #x15c) + (ok #x15e) + (exit-demo #x15f) + (quit-game #x16f) + + (village1-mayor-money #x200) + (vollage1-uncle-money #x201) + (village1-yakow-herd #x202) + (village1-yakow-return #x203) + (village1-oracle #x204) + (beach-ecorocks #x205) + (beach-flutflut-push #x206) + (beach-flutflut-meet #x207) + (beach-pelican #x208) + (beach-seagull #x209) + (beach-cannon #x20a) + (beach-buzzer #x20b) + (jungle-lurkerm-connect #x20c) + (jungle-tower #x20d) + (jungle-eggtop #x20e) + (jungle-plant #x20f) + (jungle-fishgame #x210) + (misty-muse-catch #x211) + (misty-muse-return #x212) + (misty-boat #x213) + (misty-cannon #x214) + (misty-return-to-pool #x215) ;; task name?? + (misty-find-transpad #x216) ;; task name? + (misty-balloon-lurkers #x217) + + (village1-level-name #x220) + (beach-level-name #x221) + (jungle-level-name #x222) + (misty-level-name #x223) + + (beach-seagull-get #x22e) + + (jungle-lurkerm-unblock #x22f) + (jungle-lurkerm-return #x230) + + (MISSING-orb-hint #x233) + + (beach-gimmie #x262) + (beach-sentinel #x263) + (jungle-canyon-end #x264) + (jungle-temple-door #x265) + (misty-bike-jump #x266) + (misty-eco-challenge #x267) + + (village2-gambler-money #x300) + (village2-geologist-money #x301) + (village2-warrior-money #x302) + (village2-oracle-money #x303) + (swamp-tether #x304) + + (swamp-flutflut #x307) + + (swamp-billy #x309) + + (sunken-elevator-raise #x30a) + (sunken-elevator-get-to-roof #x30b) + (sunken-pipe #x30c) + (sunken-climb-tube #x30d) ;; task name? + (sunken-pool #x30e) ;; task name? + (sunken-platforms #x30f) + + (rolling-moles #x310) + (rolling-moles-return #x311) + (rolling-robbers #x312) + (rolling-race #x313) + (rolling-race-return #x314) + (rolling-lake #x315) + (rolling-plants #x316) + + (unknown-buzzers #x317) + + (village2-level-name #x319) + + (rolling-level-name #x31b) + (swamp-level-name #x31c) + (sunken-level-name #x31d) + (ogre-level-name #x31e) + + (swamp-battle #x321) + (sunken-bottom #x322) ;; task name? + (reach-center #x323) ;; task name? + (rolling-ring-chase-1 #x324) + (rolling-ring-chase-2 #x325) + + (village3-miner-money #x400) + (village3-oracle-money #x401) + (snow-ram-3-left #x402) + (snow-ram-2-left #x403) + (snow-ram-1-left #x404) + (snow-fort #x405) + (snow-bunnies #x406) + (snow-open-door #x408) ;; task name? + + (cave-robot-climb #x40e) + (cave-dark-climb #x40f) ;; destroy crystals + + (cave-gnawers #x410) + (cave-dark-crystals #x411) + + (village3-buzzer #x413) + + (village3-level-name #x415) + + (snowy-level-name #x417) + + (cave-level-name #x419) + + (lavatube-level-name #x41b) + + (snow-eggtop #x421) + + (cave-spider-tunnel #x423) + (cave-platforms #x424) + + (cave-swing-poles #x426) + + (snow-frozen-crate #x42b) ;; task name? + (snow-bumpers #x42c) + + (fire-canyon-end #x500) + (fire-canyon-buzzer #x501) + + (fire-canyon-level-name #x50c) + + (ogre-end #x600) + (ogre-buzzer #x601) + (ogre-boss #x603) + + (lavatube-end #x700) + (lavatube-buzzer #x701) + + (citadel-buzzer #x800) + (citadel-level-name #x801) + (citadel-sage-blue #x802) + (citadel-sage-red #x803) + (citadel-sage-yellow #x804) + (citadel-sage-green #x805) + + (training-gimmie-task-name #x91b) + (training-buzzer-task-name #x91c) + (training-door-task-name #x91d) + (training-climb-task-name #x91e) + (training-level-name #x91f) + + (inc #xf10) + (europe #xf11) + ) + + ;; an individual string. (deftype game-text (structure) ((id uint32 :offset-assert 0) @@ -31,8 +215,8 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (dummy-9 (_type_ uint symbol) string 9) - ) + (lookup-text! (_type_ game-text-id symbol) string 9) + ) ) ;; todo, need support for array diff --git a/goal_src/engine/ui/text.gc b/goal_src/engine/ui/text.gc index 0fb173e8e6..821605ef31 100644 --- a/goal_src/engine/ui/text.gc +++ b/goal_src/engine/ui/text.gc @@ -44,6 +44,45 @@ ;; todo method 8 ;; todo method 9 + +(defmethod lookup-text! game-text-info ((obj game-text-info) (arg0 game-text-id) (arg1 symbol)) + "Look up text by ID. Will return the string. + If the ID can't be found, and arg1 is #t, it will return #f, + otherwise the temp string UNKNOWN ID " + + ;; binary search for it + (let* ((a1-1 0) ;; min + (a3-0 (+ (-> obj length) 1)) ;; max + (v1-2 (/ (+ a1-1 a3-0) 2)) ;; mid + ) + (let ((t0-0 -1)) ;; last time's lookup + (while (and (!= (-> obj data v1-2 id) arg0) (!= v1-2 t0-0)) ;; while we haven't found it/not the same as last time + (if (< arg0 (-> obj data v1-2 id)) + (set! a3-0 v1-2) ;; bisect, right + (set! a1-1 v1-2) ;; bisect, left + ) + (set! t0-0 v1-2) ;; remeber last time + (set! v1-2 (/ (+ a1-1 a3-0) 2)) ;; midpoint for next time + ) + ) + (cond + ((!= (-> obj data v1-2 id) arg0) ;; didn't find it :( + (cond + (arg1 + (the-as string #f) + ) + (else + (format (clear *temp-string*) "UNKNOWN ID ~D" arg0) + *temp-string* + ) + ) + ) + (else + (-> obj data v1-2 text) ;; found it! + ) + ) + ) + ) ;; todo text-is-loading ;; todo load-game-text-info ;; todo load-level-text-files @@ -53,4 +92,4 @@ ;; todo print-game-text ;; todo disable-level-text-file-loading ;; todo enable-level-text-file-loading - \ No newline at end of file + diff --git a/goal_src/kernel/gkernel-h.gc b/goal_src/kernel/gkernel-h.gc index be7c15196e..4f3693fd6e 100644 --- a/goal_src/kernel/gkernel-h.gc +++ b/goal_src/kernel/gkernel-h.gc @@ -404,7 +404,7 @@ ) -(defmacro get-process-from-handle (handle) +(defmacro handle->process (handle) ;; the actual implementation is more clever than this. ;; Checks PID. `(if (-> ,handle process) @@ -433,7 +433,7 @@ ;; a 0 in the process field, so we check it manually here. (if (nonzero? (-> obj u64)) (format #t "#" - (get-process-from-handle obj) + (handle->process obj) (-> obj pid) ) (format #t "#") diff --git a/goalc/emitter/CallingConvention.cpp b/goalc/emitter/CallingConvention.cpp index 86bfb0c4eb..9cdd56316b 100644 --- a/goalc/emitter/CallingConvention.cpp +++ b/goalc/emitter/CallingConvention.cpp @@ -19,8 +19,9 @@ CallingConvention get_function_calling_convention(const TypeSpec& function_type, } } else { for (int i = 0; i < (int)function_type.arg_count() - 1; i++) { - auto info = type_system.lookup_type(function_type.get_arg(i)); - if (dynamic_cast(info) && info->get_load_size() == 16) { + auto info = type_system.lookup_type_allow_partial_def(function_type.get_arg(i)); + auto load_size = type_system.get_load_size_allow_partial_def(function_type.get_arg(i)); + if (dynamic_cast(info) && load_size == 16) { cc.arg_regs.push_back(emitter::gRegInfo.get_xmm_arg_reg(xmm_idx++)); } else { cc.arg_regs.push_back(emitter::gRegInfo.get_gpr_arg_reg(gpr_idx++)); @@ -29,7 +30,7 @@ CallingConvention get_function_calling_convention(const TypeSpec& function_type, } if (function_type.last_arg() != TypeSpec("none")) { - if (type_system.lookup_type(function_type.last_arg())->get_load_size() == 16) { + if (type_system.get_load_size_allow_partial_def(function_type.last_arg()) == 16) { cc.return_reg = emitter::gRegInfo.get_xmm_ret_reg(); } else { cc.return_reg = emitter::gRegInfo.get_gpr_ret_reg(); @@ -45,8 +46,8 @@ std::vector get_arg_registers(const TypeSystem& type_system, int gpr_idx = 0; int xmm_idx = 0; for (auto& type : arg_types) { - auto info = type_system.lookup_type(type); - if (info->get_load_size() == 16) { + auto load_size = type_system.get_load_size_allow_partial_def(type); + if (load_size == 16) { result.push_back(emitter::gRegInfo.get_xmm_arg_reg(xmm_idx++)); } else { result.push_back(emitter::gRegInfo.get_gpr_arg_reg(gpr_idx++)); diff --git a/test/decompiler/reference/decompiler-macros.gc b/test/decompiler/reference/decompiler-macros.gc index 59ab73bdb0..b66c4533b2 100644 --- a/test/decompiler/reference/decompiler-macros.gc +++ b/test/decompiler/reference/decompiler-macros.gc @@ -89,4 +89,16 @@ ) (defconstant PI (the-as float #x40490fda)) -(defconstant MINUS_PI (the-as float #xc0490fda)) \ No newline at end of file +(defconstant MINUS_PI (the-as float #xc0490fda)) + +(defmacro handle->process (handle) + ;; the actual implementation is more clever than this. + ;; Checks PID. + `(if (-> ,handle process) + (let ((proc (-> (-> ,handle process)))) + (if (= (-> ,handle pid) (-> proc pid)) + proc + ) + ) + ) + ) diff --git a/test/decompiler/reference/engine/entity/entity-h_REF.gc b/test/decompiler/reference/engine/entity/entity-h_REF.gc index a1a2f677f6..0b3c31483c 100644 --- a/test/decompiler/reference/engine/entity/entity-h_REF.gc +++ b/test/decompiler/reference/engine/entity/entity-h_REF.gc @@ -32,7 +32,7 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (dummy-9 () none 9) + (update-perm! (_type_ symbol entity-perm-status) _type_ 9) ) ) @@ -61,7 +61,7 @@ (deftype entity-links (structure) ((prev-link entity-links :offset-assert 0) (next-link entity-links :offset-assert 4) - (entity basic :offset-assert 8) + (entity entity :offset-assert 8) (process process :offset-assert 12) (level level :offset-assert 16) (vis-id int32 :offset-assert 20) @@ -119,7 +119,8 @@ ;; definition of type entity-links-array (deftype entity-links-array (inline-array-class) - () + ((data entity-links :inline :dynamic :offset-assert 16) + ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 @@ -130,7 +131,7 @@ (format #t "[~8x] ~A~%" obj (-> obj type)) (format #t "~Tlength: ~D~%" (-> obj length)) (format #t "~Tallocated-length: ~D~%" (-> obj allocated-length)) - (format #t "~Tdata[0] @ #x~X~%" (-> obj _data)) + (format #t "~Tdata[0] @ #x~X~%" (-> obj data)) obj ) diff --git a/test/decompiler/reference/engine/game/fact-h_REF.gc b/test/decompiler/reference/engine/game/fact-h_REF.gc index c872fbc4e7..f67b73c6c2 100644 --- a/test/decompiler/reference/engine/game/fact-h_REF.gc +++ b/test/decompiler/reference/engine/game/fact-h_REF.gc @@ -122,7 +122,7 @@ (:methods (new (symbol type process pickup-type float) _type_ 0) (dummy-9 () none 9) - (dummy-10 (_type_ symbol) none 10) + (reset! (_type_ symbol) none 10) (dummy-11 (_type_) float 11) ) ) @@ -506,7 +506,7 @@ ) ) (set! (-> obj eco-source) (the-as uint #f)) - (dummy-10 obj #f) + (reset! obj #f) obj ) ) diff --git a/test/decompiler/reference/engine/game/game-info-h_REF.gc b/test/decompiler/reference/engine/game/game-info-h_REF.gc index 3d3e74b6f5..211a31eec3 100644 --- a/test/decompiler/reference/engine/game/game-info-h_REF.gc +++ b/test/decompiler/reference/engine/game/game-info-h_REF.gc @@ -118,25 +118,25 @@ ;; definition of type continue-point (deftype continue-point (basic) - ((name basic :offset-assert 4) - (level basic :offset-assert 8) - (flags uint32 :offset-assert 12) - (trans vector :inline :offset-assert 16) - (quat vector :inline :offset-assert 32) - (camera-trans vector :inline :offset-assert 48) - (camera-rot float 9 :offset-assert 64) - (load-commands pair :offset-assert 100) - (vis-nick basic :offset-assert 104) - (lev0 basic :offset-assert 108) - (disp0 basic :offset-assert 112) - (lev1 basic :offset-assert 116) - (disp1 basic :offset-assert 120) + ((name string :offset-assert 4) + (level basic :offset-assert 8) + (flags uint32 :offset-assert 12) + (trans vector :inline :offset-assert 16) + (quat quaternion :inline :offset-assert 32) + (camera-trans vector :inline :offset-assert 48) + (camera-rot float 9 :offset-assert 64) + (load-commands pair :offset-assert 100) + (vis-nick basic :offset-assert 104) + (lev0 basic :offset-assert 108) + (disp0 basic :offset-assert 112) + (lev1 basic :offset-assert 116) + (disp1 basic :offset-assert 120) ) :method-count-assert 10 :size-assert #x7c :flag-assert #xa0000007c (:methods - (dummy-9 () none 9) + (debug-draw! (_type_) none 9) ) ) @@ -161,75 +161,75 @@ ;; definition of type game-info (deftype game-info (basic) - ((mode symbol :offset-assert 4) - (save-name basic :offset-assert 8) - (life float :offset-assert 12) - (life-max float :offset-assert 16) - (money float :offset-assert 20) - (money-total float :offset-assert 24) - (money-per-level uint8 32 :offset-assert 28) - (deaths-per-level uint8 32 :offset-assert 60) - (buzzer-total float :offset-assert 92) - (fuel float :offset-assert 96) - (perm-list entity-perm-array :offset-assert 100) - (task-perm-list entity-perm-array :offset-assert 104) - (current-continue continue-point :offset-assert 108) - (text-ids-seen bit-array :offset-assert 112) - (level-opened uint8 32 :offset-assert 116) - (hint-control array :offset-assert 148) - (task-hint-control array :offset-assert 152) - (total-deaths int32 :offset-assert 156) - (continue-deaths int32 :offset-assert 160) - (fuel-cell-deaths int32 :offset-assert 164) - (game-start-time uint64 :offset-assert 168) - (continue-time uint64 :offset-assert 176) - (death-time uint64 :offset-assert 184) - (hit-time uint64 :offset-assert 192) - (fuel-cell-pickup-time uint64 :offset-assert 200) - (fuel-cell-time array :offset-assert 208) - (enter-level-time array :offset-assert 212) - (in-level-time array :offset-assert 216) - (blackout-time uint64 :offset-assert 224) - (letterbox-time uint64 :offset-assert 232) - (hint-play-time uint64 :offset-assert 240) - (display-text-time uint64 :offset-assert 248) - (display-text-handle uint64 :offset-assert 256) - (death-movie-tick int32 :offset-assert 264) - (want-auto-save symbol :offset-assert 268) - (auto-save-proc uint64 :offset-assert 272) - (auto-save-status uint32 :offset-assert 280) - (auto-save-card int32 :offset-assert 284) - (auto-save-which int32 :offset-assert 288) - (pov-camera-handle uint64 :offset-assert 296) - (other-camera-handle uint64 :offset-assert 304) - (death-pos vector-array :offset-assert 312) - (dummy basic :offset-assert 316) - (auto-save-count int32 :offset-assert 320) + ((mode symbol :offset-assert 4) + (save-name basic :offset-assert 8) + (life float :offset-assert 12) + (life-max float :offset-assert 16) + (money float :offset-assert 20) + (money-total float :offset-assert 24) + (money-per-level uint8 32 :offset-assert 28) + (deaths-per-level uint8 32 :offset-assert 60) + (buzzer-total float :offset-assert 92) + (fuel float :offset-assert 96) + (perm-list entity-perm-array :offset-assert 100) + (task-perm-list entity-perm-array :offset-assert 104) + (current-continue continue-point :offset-assert 108) + (text-ids-seen bit-array :offset-assert 112) + (level-opened uint8 32 :offset-assert 116) + (hint-control (array level-hint-control) :offset-assert 148) + (task-hint-control array :offset-assert 152) + (total-deaths int32 :offset-assert 156) + (continue-deaths int32 :offset-assert 160) + (fuel-cell-deaths int32 :offset-assert 164) + (game-start-time uint64 :offset-assert 168) + (continue-time uint64 :offset-assert 176) + (death-time uint64 :offset-assert 184) + (hit-time uint64 :offset-assert 192) + (fuel-cell-pickup-time uint64 :offset-assert 200) + (fuel-cell-time (array uint64) :offset-assert 208) + (enter-level-time (array uint64) :offset-assert 212) + (in-level-time (array uint64) :offset-assert 216) + (blackout-time uint64 :offset-assert 224) + (letterbox-time uint64 :offset-assert 232) + (hint-play-time uint64 :offset-assert 240) + (display-text-time uint64 :offset-assert 248) + (display-text-handle uint64 :offset-assert 256) + (death-movie-tick int32 :offset-assert 264) + (want-auto-save symbol :offset-assert 268) + (auto-save-proc handle :offset-assert 272) + (auto-save-status uint32 :offset-assert 280) + (auto-save-card int32 :offset-assert 284) + (auto-save-which int32 :offset-assert 288) + (pov-camera-handle uint64 :offset-assert 296) + (other-camera-handle uint64 :offset-assert 304) + (death-pos vector-array :offset-assert 312) + (dummy basic :offset-assert 316) + (auto-save-count int32 :offset-assert 320) ) :method-count-assert 29 :size-assert #x144 :flag-assert #x1d00000144 (:methods - (dummy-9 (_type_ symbol symbol string) none 9) - (dummy-10 () none 10) - (dummy-11 () none 11) - (dummy-12 () none 12) - (dummy-13 (_type_ uint) entity-perm 13) - (dummy-14 (_type_) none 14) - (dummy-15 (_type_) none 15) - (dummy-16 () none 16) - (dummy-17 (_type_) continue-point 17) - (dummy-18 () none 18) - (dummy-19 (_type_ continue-point) none 19) - (dummy-20 () none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) - (dummy-23 () none 23) + (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_ uint) 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_ game-text-id) symbol 21) + (mark-text-as-seen (_type_ game-text-id) none 22) + (got-buzzer? (_type_ game-task int) symbol 23) (dummy-24 () none 24) - (dummy-25 () none 25) - (dummy-26 () none 26) - (dummy-27 () none 27) - (dummy-28 () none 28) + (load-game! (_type_ game-save) game-save 25) + (clear-text-seen! (_type_ game-text-id) none 26) + (get-death-count (_type_ symbol) int 27) + (get-health-percent-lost (_type_) float 28) ) ) @@ -289,12 +289,18 @@ gp-0 (new 'static 'game-info :mode 'debug :current-continue #f) ) - (set! (-> gp-0 fuel-cell-time) (new 'global 'boxed-array uint64 116)) + (set! + (-> gp-0 fuel-cell-time) + (the-as (array uint64) (new 'global 'boxed-array uint64 116)) + ) (set! (-> gp-0 enter-level-time) - (new 'global 'boxed-array uint64 32) + (the-as (array uint64) (new 'global 'boxed-array uint64 32)) + ) + (set! + (-> gp-0 in-level-time) + (the-as (array uint64) (new 'global 'boxed-array uint64 32)) ) - (set! (-> gp-0 in-level-time) (new 'global 'boxed-array uint64 32)) (set! *game-info* gp-0) gp-0 ) diff --git a/test/decompiler/reference/engine/game/task/task-control-h_REF.gc b/test/decompiler/reference/engine/game/task/task-control-h_REF.gc index 8fbc2bc03a..7b25122601 100644 --- a/test/decompiler/reference/engine/game/task/task-control-h_REF.gc +++ b/test/decompiler/reference/engine/game/task/task-control-h_REF.gc @@ -5,20 +5,20 @@ (deftype task-cstage (structure) ((game-task game-task :offset-assert 0) (status task-status :offset-assert 8) - (flags uint8 :offset-assert 16) + (flags task-flags :offset-assert 16) (condition (function task-control symbol) :offset-assert 20) ) :method-count-assert 16 :size-assert #x18 :flag-assert #x1000000018 (:methods - (get-game-task (_type_) uint 9) - (get-task-status (_type_) uint 10) - (TODO-RENAME-11 (_type_ task-control) symbol 11) - (first-flag-bit? (_type_) symbol 12) - (third-flag-bit? (_type_) symbol 13) - (TODO-RENAME-14 (_type_) int 14) - (clear-all-but-first-flag-bit (_type_) int 15) + (get-game-task (_type_) game-task 9) + (get-task-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) ) ) @@ -44,13 +44,13 @@ (current-task (_type_) int 9) (current-status (_type_) int 10) (close-current! (_type_) none 11) - (close-status! (_type_ int) int 12) + (close-status! (_type_ task-status) int 12) (first-any (_type_ symbol) int 13) (reset! (_type_ symbol symbol) int 14) - (closed? (_type_ int int) symbol 15) + (closed? (_type_ game-task task-status) symbol 15) (get-reminder (_type_ int) int 16) (save-reminder (_type_ int int) int 17) - (exists? (_type_ int int) symbol 18) + (exists? (_type_ game-task task-status) symbol 18) ) ) diff --git a/test/decompiler/reference/engine/game/task/task-control_REF.gc b/test/decompiler/reference/engine/game/task/task-control_REF.gc index 9319ba861b..0a5d692d90 100644 --- a/test/decompiler/reference/engine/game/task/task-control_REF.gc +++ b/test/decompiler/reference/engine/game/task/task-control_REF.gc @@ -2,31 +2,31 @@ (in-package goal) ;; definition (debug) for function task-status->string -(defun-debug task-status->string ((arg0 int)) +(defun-debug task-status->string ((arg0 task-status)) (let ((v1-0 arg0)) (cond - ((= v1-0 7) + ((= v1-0 (task-status need-resolution)) "need-resolution" ) - ((= v1-0 6) + ((= v1-0 (task-status need-reward-speech)) "need-reward-speech" ) - ((= v1-0 5) + ((= v1-0 (task-status need-reminder)) "need-reminder" ) - ((= v1-0 4) + ((= v1-0 (task-status need-reminder-a)) "need-reminder-a" ) - ((= v1-0 3) + ((= v1-0 (task-status need-introduction)) "need-introduction" ) - ((= v1-0 2) + ((= v1-0 (task-status need-hint)) "need-hint" ) - ((= v1-0 1) + ((= v1-0 (task-status unknown)) "unknown" ) - ((zero? v1-0) + ((= v1-0 (task-status invalid)) "invalid" ) (else @@ -37,49 +37,44 @@ ) ;; definition for method 9 of type task-cstage -;; INFO: Return type mismatch game-task vs uint. (defmethod get-game-task task-cstage ((obj task-cstage)) - (the-as uint (-> obj game-task)) + (-> obj game-task) ) ;; definition for method 10 of type task-cstage -;; INFO: Return type mismatch task-status vs uint. (defmethod get-task-status task-cstage ((obj task-cstage)) - (the-as uint (-> obj status)) + (-> obj status) ) ;; definition for method 12 of type task-cstage -(defmethod first-flag-bit? task-cstage ((obj task-cstage)) - (nonzero? (logand (-> obj flags) 1)) +(defmethod closed? task-cstage ((obj task-cstage)) + (nonzero? (logand (-> obj flags) (task-flags closed))) ) ;; definition for method 13 of type task-cstage -(defmethod third-flag-bit? task-cstage ((obj task-cstage)) - (nonzero? (logand (-> obj flags) 4)) +(defmethod closed-by-default? task-cstage ((obj task-cstage)) + (nonzero? (logand (-> obj flags) (task-flags closed-by-default))) ) ;; definition for method 11 of type task-cstage -(defmethod TODO-RENAME-11 task-cstage ((obj task-cstage) (arg0 task-control)) +(defmethod task-available? task-cstage ((obj task-cstage) (arg0 task-control)) (let ((a0-1 obj)) (cond - ((nonzero? (logand (-> a0-1 flags) 1)) + ((nonzero? (logand (-> a0-1 flags) (task-flags closed))) #f ) ((>= (the-as int - (-> (dummy-13 *game-info* (the-as uint (-> obj game-task))) user-uint8 0) + (-> (get-entity-task-perm *game-info* (-> obj game-task)) user-uint8 0) ) (the-as int (-> obj status)) ) - (set! (-> obj flags) (logior (-> obj flags) 1)) + (set! (-> obj flags) (logior (-> obj flags) (task-flags closed))) #f ) - ((let ((t9-1 (method-of-object *game-info* dummy-11))) - (-> obj game-task) - (t9-1) - ) - (set! (-> obj flags) (logior (-> obj flags) 1)) + ((task-complete? *game-info* (-> obj game-task)) + (set! (-> obj flags) (logior (-> obj flags) (task-flags closed))) #f ) (else @@ -90,16 +85,16 @@ ) ;; definition for method 14 of type task-cstage -(defmethod TODO-RENAME-14 task-cstage ((obj task-cstage)) +(defmethod close-task! task-cstage ((obj task-cstage)) (if (= (-> obj game-task) (game-task none)) (return (the-as int #f)) ) - (set! (-> obj flags) (logior (-> obj flags) 1)) - (when (nonzero? (logand (-> obj flags) 2)) - (let ((v1-9 (dummy-13 *game-info* (the-as uint (-> obj game-task))))) + (set! (-> obj flags) (logior (-> obj flags) (task-flags closed))) + (when (nonzero? (logand (-> obj flags) (task-flags has-entity))) + (let ((v1-9 (get-entity-task-perm *game-info* (-> obj game-task)))) (set! (-> v1-9 status) - (logior (-> v1-9 status) (entity-perm-status unknown)) + (logior (-> v1-9 status) (entity-perm-status user-set-from-cstage)) ) (if (< (-> v1-9 user-uint8 0) (the-as uint (-> obj status))) (set! (-> v1-9 user-int8 0) (the-as int (-> obj status))) @@ -110,8 +105,8 @@ ) ;; definition for method 15 of type task-cstage -(defmethod clear-all-but-first-flag-bit task-cstage ((obj task-cstage)) - (set! (-> obj flags) (logand -2 (the-as int (-> obj flags)))) +(defmethod open-task! task-cstage ((obj task-cstage)) + (set! (-> obj flags) (logand (lognot (task-flags closed)) (-> obj flags))) 0 ) @@ -178,7 +173,7 @@ ((= (-> obj current-stage) -1) ) (else - (TODO-RENAME-14 (-> obj stage (-> obj current-stage))) + (close-task! (-> obj stage (-> obj current-stage))) ) ) (first-any obj #t) @@ -186,7 +181,7 @@ ) ;; definition for method 12 of type task-control -(defmethod close-status! task-control ((obj task-control) (arg0 int)) +(defmethod close-status! task-control ((obj task-control) (arg0 task-status)) (let ((a0-2 (current-task obj))) (dotimes (v1-1 (-> obj stage length)) (when @@ -194,14 +189,14 @@ (= a0-2 (-> obj stage v1-1 game-task)) (= arg0 (-> obj stage v1-1 status)) ) - (TODO-RENAME-14 (-> obj stage v1-1)) + (close-task! (-> obj stage v1-1)) (return (first-any obj #t)) ) ) (format 0 "ERROR: close-status! received non-existent task-cstage(~S ~S)--returning #t.~%" - (game-task->string a0-2) + (game-task->string (the-as game-task a0-2)) (task-status->string arg0) ) ) @@ -217,7 +212,7 @@ (return 0) ) (dotimes (s5-0 (-> obj stage length)) - (when (TODO-RENAME-11 (-> obj stage s5-0) obj) + (when (task-available? (-> obj stage s5-0) obj) (set! (-> obj current-stage) s5-0) (return (the-as int (-> obj stage s5-0 game-task))) ) @@ -236,14 +231,21 @@ ) (dotimes (s4-0 (-> obj stage length)) (if (or (= arg0 'game) (let ((a0-4 (-> obj stage s4-0))) - (not (nonzero? (logand (-> a0-4 flags) 4))) + (not + (nonzero? + (logand + (-> a0-4 flags) + (task-flags closed-by-default) + ) + ) + ) ) ) - (clear-all-but-first-flag-bit (-> obj stage s4-0)) + (open-task! (-> obj stage s4-0)) ) (let ((a0-10 (-> obj stage s4-0))) - (if (nonzero? (logand (-> a0-10 flags) 1)) - (TODO-RENAME-14 (-> obj stage s4-0)) + (if (nonzero? (logand (-> a0-10 flags) (task-flags closed))) + (close-task! (-> obj stage s4-0)) ) ) ) @@ -251,7 +253,10 @@ ) ;; definition for method 15 of type task-control -(defmethod closed? task-control ((obj task-control) (arg0 int) (arg1 int)) +(defmethod + closed? + task-control + ((obj task-control) (arg0 game-task) (arg1 task-status)) (when (= obj *null-task-control*) (format 0 "ERROR: closed? received self of *null-task-control*~%~%") (return #f) @@ -263,7 +268,7 @@ (= arg1 (-> obj stage v1-3 status)) ) (let ((a0-3 (-> obj stage v1-3))) - (return (nonzero? (logand (-> a0-3 flags) 1))) + (return (nonzero? (logand (-> a0-3 flags) (task-flags closed)))) ) ) ) @@ -277,7 +282,10 @@ ) ;; definition for method 18 of type task-control -(defmethod exists? task-control ((obj task-control) (arg0 int) (arg1 int)) +(defmethod + exists? + task-control + ((obj task-control) (arg0 game-task) (arg1 task-status)) (when (= obj *null-task-control*) (format 0 "ERROR: exists? received self of *null-task-control*~%~%") (return #f) @@ -303,7 +311,7 @@ ) (return 0) ) - (let ((v1-4 (dummy-13 *game-info* (the-as uint (-> obj stage 0 game-task))))) + (let ((v1-4 (get-entity-task-perm *game-info* (-> obj stage 0 game-task)))) (the-as int (-> v1-4 user-uint8 (+ arg0 1))) ) ) @@ -317,10 +325,10 @@ ) (return 0) ) - (let ((v1-4 (dummy-13 *game-info* (the-as uint (-> obj stage 0 game-task))))) + (let ((v1-4 (get-entity-task-perm *game-info* (-> obj stage 0 game-task)))) (set! (-> v1-4 status) - (logior (-> v1-4 status) (entity-perm-status unknown)) + (logior (-> v1-4 status) (entity-perm-status user-set-from-cstage)) ) (set! (-> v1-4 user-int8 (+ arg1 1)) arg0) ) @@ -340,27 +348,34 @@ (new 'static 'task-cstage :game-task (game-task jungle-eggtop) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-eggtop) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) (with-pp (or - (closed? arg0 2 5) + (closed? arg0 (game-task jungle-eggtop) (task-status need-reminder)) (and - (closed? arg0 2 3) + (closed? + arg0 + (game-task jungle-eggtop) + (task-status need-introduction) + ) (let ((a1-2 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-2 from) pp) (set! (-> a1-2 num-params) 2) @@ -380,15 +395,20 @@ (new 'static 'task-cstage :game-task (game-task misty-bike) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) (with-pp (or - (closed? arg0 2 5) + (closed? arg0 (game-task jungle-eggtop) (task-status need-reminder)) (and - (closed? arg0 2 3) + (closed? + arg0 + (game-task jungle-eggtop) + (task-status need-introduction) + ) (let ((a1-2 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-2 from) pp) (set! (-> a1-2 num-params) 2) @@ -408,7 +428,7 @@ (new 'static 'task-cstage :game-task (game-task jungle-eggtop) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -419,36 +439,42 @@ (new 'static 'task-cstage :game-task (game-task misty-bike) :status (task-status need-reminder-a) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :status (task-status unknown) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control)) (task-closed? 111 6)) + (lambda + ((arg0 task-control)) + (task-closed? + (game-task village4-button) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-eggtop) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -473,25 +499,28 @@ (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-reminder-a) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -509,29 +538,32 @@ (new 'static 'task-cstage :game-task (game-task sunken-room) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-room) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (and - (task-closed? 17 5) + (task-closed? (game-task beach-flutflut) (task-status need-reminder)) (or - (closed? arg0 47 5) + (closed? arg0 (game-task sunken-room) (task-status need-reminder)) (and - (closed? arg0 47 3) + (closed? arg0 (game-task sunken-room) (task-status need-introduction)) (let ((a1-4 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-4 from) pp) (set! (-> a1-4 num-params) 2) @@ -552,17 +584,18 @@ (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (and - (task-closed? 17 5) + (task-closed? (game-task beach-flutflut) (task-status need-reminder)) (or - (closed? arg0 47 5) + (closed? arg0 (game-task sunken-room) (task-status need-reminder)) (and - (closed? arg0 47 3) + (closed? arg0 (game-task sunken-room) (task-status need-introduction)) (let ((a1-4 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-4 from) pp) (set! (-> a1-4 num-params) 2) @@ -583,92 +616,104 @@ (new 'static 'task-cstage :game-task (game-task rolling-robbers) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) - (with-pp (if (task-closed? 17 5) - (or - (closed? arg0 37 5) - (and - (closed? arg0 37 3) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'query) - (set! (-> a1-4 param 0) (the-as uint 'pickup)) - (set! (-> a1-4 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-4)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - (or - (closed? arg0 47 5) - (and - (closed? arg0 47 3) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 2) - (set! (-> a1-8 message) 'query) - (set! (-> a1-8 param 0) (the-as uint 'pickup)) - (set! (-> a1-8 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-8)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - ) + (with-pp + (if (task-closed? (game-task beach-flutflut) (task-status need-reminder)) + (or + (closed? arg0 (game-task swamp-flutflut) (task-status need-reminder)) + (and + (closed? + arg0 + (game-task swamp-flutflut) + (task-status need-introduction) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) pp) + (set! (-> a1-4 num-params) 2) + (set! (-> a1-4 message) 'query) + (set! (-> a1-4 param 0) (the-as uint 'pickup)) + (set! (-> a1-4 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-4)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + (or + (closed? arg0 (game-task sunken-room) (task-status need-reminder)) + (and + (closed? arg0 (game-task sunken-room) (task-status need-introduction)) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) pp) + (set! (-> a1-8 num-params) 2) + (set! (-> a1-8 message) 'query) + (set! (-> a1-8 param 0) (the-as uint 'pickup)) + (set! (-> a1-8 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-8)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + ) ) ) ) (new 'static 'task-cstage :game-task (game-task rolling-robbers) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) - (with-pp (if (task-closed? 17 5) - (or - (closed? arg0 37 5) - (and - (closed? arg0 37 3) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 2) - (set! (-> a1-4 message) 'query) - (set! (-> a1-4 param 0) (the-as uint 'pickup)) - (set! (-> a1-4 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-4)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - (or - (closed? arg0 47 5) - (and - (closed? arg0 47 3) - (let ((a1-8 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-8 from) pp) - (set! (-> a1-8 num-params) 2) - (set! (-> a1-8 message) 'query) - (set! (-> a1-8 param 0) (the-as uint 'pickup)) - (set! (-> a1-8 param 1) (the-as uint 6)) - (>= - (the int (send-event-function *target* a1-8)) - (+ (get-reminder arg0 1) 3) - ) - ) - ) - ) - ) + (with-pp + (if (task-closed? (game-task beach-flutflut) (task-status need-reminder)) + (or + (closed? arg0 (game-task swamp-flutflut) (task-status need-reminder)) + (and + (closed? + arg0 + (game-task swamp-flutflut) + (task-status need-introduction) + ) + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) pp) + (set! (-> a1-4 num-params) 2) + (set! (-> a1-4 message) 'query) + (set! (-> a1-4 param 0) (the-as uint 'pickup)) + (set! (-> a1-4 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-4)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + (or + (closed? arg0 (game-task sunken-room) (task-status need-reminder)) + (and + (closed? arg0 (game-task sunken-room) (task-status need-introduction)) + (let ((a1-8 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-8 from) pp) + (set! (-> a1-8 num-params) 2) + (set! (-> a1-8 message) 'query) + (set! (-> a1-8 param 0) (the-as uint 'pickup)) + (set! (-> a1-8 param 1) (the-as uint 6)) + (>= + (the int (send-event-function *target* a1-8)) + (+ (get-reminder arg0 1) 3) + ) + ) + ) + ) + ) ) ) ) @@ -680,21 +725,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-room) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status unknown) :condition - (lambda ((arg0 task-control)) (task-closed? 17 5)) + (lambda + ((arg0 task-control)) + (task-closed? (game-task beach-flutflut) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control)) (task-closed? 17 5)) + (lambda + ((arg0 task-control)) + (task-closed? (game-task beach-flutflut) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task rolling-robbers) @@ -704,7 +755,7 @@ (new 'static 'task-cstage :game-task (game-task rolling-robbers) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -714,25 +765,25 @@ (new 'static 'task-cstage :game-task (game-task sunken-room) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-robbers) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-flutflut) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-levitator) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -752,52 +803,69 @@ (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 52 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-race) (task-status need-reward-speech)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 31 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? + arg0 + (game-task village2-gambler-money) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 52 5)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-race) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -829,15 +897,21 @@ (new 'static 'task-cstage :game-task (game-task rolling-race) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 52 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-race) (task-status need-introduction)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-gambler-money) :status (task-status need-reminder) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 52 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-race) (task-status need-introduction)) + ) ) ) ) @@ -856,52 +930,69 @@ (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 54 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-moles) (task-status need-reward-speech)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 32 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? + arg0 + (game-task village2-geologist-money) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 54 5)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-moles) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -933,15 +1024,21 @@ (new 'static 'task-cstage :game-task (game-task rolling-moles) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 54 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-moles) (task-status need-introduction)) + ) ) (new 'static 'task-cstage :game-task (game-task village2-geologist-money) :status (task-status need-reminder) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 54 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task rolling-moles) (task-status need-introduction)) + ) ) ) ) @@ -960,52 +1057,69 @@ (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-reward-speech)) + ) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 11 6)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? + arg0 + (game-task village1-mayor-money) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 5)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-reminder)) + ) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1037,22 +1151,31 @@ (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-reminder-a) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction)) + ) ) (new 'static 'task-cstage :game-task (game-task jungle-lurkerm) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction)) + ) ) (new 'static 'task-cstage :game-task (game-task village1-mayor-money) :status (task-status need-reminder) :condition - (lambda ((arg0 task-control) (arg1 task-control)) (closed? arg0 3 3)) + (lambda + ((arg0 task-control) (arg1 task-control)) + (closed? arg0 (game-task jungle-lurkerm) (task-status need-introduction)) + ) ) ) ) @@ -1071,45 +1194,52 @@ (new 'static 'task-cstage :game-task (game-task intro) :status (task-status need-introduction) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task intro) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task intro) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-ecorocks) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-ecorocks) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-cannon) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 15 5) + (closed? arg0 (game-task beach-ecorocks) (task-status need-reminder)) (and - (closed? arg0 15 3) + (closed? + arg0 + (game-task beach-ecorocks) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1129,15 +1259,20 @@ (new 'static 'task-cstage :game-task (game-task misty-cannon) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 15 5) + (closed? arg0 (game-task beach-ecorocks) (task-status need-reminder)) (and - (closed? arg0 15 3) + (closed? + arg0 + (game-task beach-ecorocks) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1157,7 +1292,7 @@ (new 'static 'task-cstage :game-task (game-task beach-ecorocks) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -1168,30 +1303,36 @@ (new 'static 'task-cstage :game-task (game-task misty-cannon) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :status (task-status unknown) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control)) (task-closed? 111 6)) + (lambda + ((arg0 task-control)) + (task-closed? + (game-task village4-button) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-ecorocks) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-cannon) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1211,27 +1352,34 @@ (new 'static 'task-cstage :game-task (game-task rolling-plants) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-plants) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-arm) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 55 5) + (closed? arg0 (game-task rolling-plants) (task-status need-reminder)) (and - (closed? arg0 55 3) + (closed? + arg0 + (game-task rolling-plants) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1251,15 +1399,20 @@ (new 'static 'task-cstage :game-task (game-task swamp-arm) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 55 5) + (closed? arg0 (game-task rolling-plants) (task-status need-reminder)) (and - (closed? arg0 55 3) + (closed? + arg0 + (game-task rolling-plants) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1279,7 +1432,7 @@ (new 'static 'task-cstage :game-task (game-task rolling-plants) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -1290,7 +1443,7 @@ (new 'static 'task-cstage :game-task (game-task swamp-arm) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -1300,13 +1453,13 @@ (new 'static 'task-cstage :game-task (game-task rolling-plants) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-arm) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1326,31 +1479,35 @@ (new 'static 'task-cstage :game-task (game-task village1-oracle-money1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money1) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1387,13 +1544,13 @@ (new 'static 'task-cstage :game-task (game-task village1-oracle-money1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-oracle-money2) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1430,7 +1587,7 @@ (new 'static 'task-cstage :game-task (game-task village1-oracle-money2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1450,31 +1607,35 @@ (new 'static 'task-cstage :game-task (game-task village2-oracle-money1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money1) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1511,13 +1672,13 @@ (new 'static 'task-cstage :game-task (game-task village2-oracle-money1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-oracle-money2) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1554,7 +1715,7 @@ (new 'static 'task-cstage :game-task (game-task village2-oracle-money2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1574,31 +1735,35 @@ (new 'static 'task-cstage :game-task (game-task village3-oracle-money1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money1) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1635,13 +1800,13 @@ (new 'static 'task-cstage :game-task (game-task village3-oracle-money1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-oracle-money2) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1678,7 +1843,7 @@ (new 'static 'task-cstage :game-task (game-task village3-oracle-money2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -1698,55 +1863,63 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1778,7 +1951,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1810,7 +1983,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1842,7 +2015,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -1874,15 +2047,24 @@ (new 'static 'task-cstage :game-task (game-task cave-gnawers) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 99 5) + (closed? + arg0 + (game-task village3-miner-money4) + (task-status need-reminder) + ) (and - (closed? arg0 99 3) + (closed? + arg0 + (game-task village3-miner-money4) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1902,15 +2084,24 @@ (new 'static 'task-cstage :game-task (game-task cave-gnawers) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 99 5) + (closed? + arg0 + (game-task village3-miner-money4) + (task-status need-reminder) + ) (and - (closed? arg0 99 3) + (closed? + arg0 + (game-task village3-miner-money4) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1930,15 +2121,16 @@ (new 'static 'task-cstage :game-task (game-task snow-eggtop) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 78 5) + (closed? arg0 (game-task cave-gnawers) (task-status need-reminder)) (and - (closed? arg0 78 3) + (closed? arg0 (game-task cave-gnawers) (task-status need-introduction)) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1958,15 +2150,16 @@ (new 'static 'task-cstage :game-task (game-task snow-eggtop) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 78 5) + (closed? arg0 (game-task cave-gnawers) (task-status need-reminder)) (and - (closed? arg0 78 3) + (closed? arg0 (game-task cave-gnawers) (task-status need-introduction)) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -1991,7 +2184,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2002,7 +2195,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2013,7 +2206,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2024,7 +2217,7 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2035,7 +2228,7 @@ (new 'static 'task-cstage :game-task (game-task cave-gnawers) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2046,7 +2239,7 @@ (new 'static 'task-cstage :game-task (game-task snow-eggtop) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2056,37 +2249,37 @@ (new 'static 'task-cstage :game-task (game-task village3-miner-money1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money3) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-miner-money4) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-gnawers) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-eggtop) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2111,39 +2304,52 @@ (new 'static 'task-cstage :game-task (game-task village3-button) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-button) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-crystals) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-crystals) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 79 5) + (closed? + arg0 + (game-task cave-dark-crystals) + (task-status need-reminder) + ) (and - (closed? arg0 79 3) + (closed? + arg0 + (game-task cave-dark-crystals) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -2163,15 +2369,24 @@ (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control) (arg1 task-control)) (with-pp (or - (closed? arg0 79 5) + (closed? + arg0 + (game-task cave-dark-crystals) + (task-status need-reminder) + ) (and - (closed? arg0 79 3) + (closed? + arg0 + (game-task cave-dark-crystals) + (task-status need-introduction) + ) (let ((a1-3 (new 'stack-no-clear 'event-message-block))) (set! (-> a1-3 from) pp) (set! (-> a1-3 num-params) 2) @@ -2191,7 +2406,7 @@ (new 'static 'task-cstage :game-task (game-task cave-dark-crystals) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2202,13 +2417,13 @@ (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-reminder-a) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2218,13 +2433,13 @@ (new 'static 'task-cstage :game-task (game-task cave-dark-crystals) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ram) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2244,13 +2459,14 @@ (new 'static 'task-cstage :game-task (game-task citadel-sage-green) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-sage-green) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2270,13 +2486,14 @@ (new 'static 'task-cstage :game-task (game-task citadel-sage-blue) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-sage-blue) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2296,13 +2513,14 @@ (new 'static 'task-cstage :game-task (game-task citadel-sage-red) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-sage-red) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2322,23 +2540,24 @@ (new 'static 'task-cstage :game-task (game-task citadel-sage-yellow) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-sage-yellow) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) ) ) -;; definition for symbol *task-controls*, type (array task-control) +;; definition for symbol *task-controls*, type (array basic) (define *task-controls* - (the-as (array task-control) + (the-as (array basic) (new 'static 'boxed-array @@ -2357,25 +2576,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-tower) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-tower) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-tower) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-tower) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2390,37 +2611,40 @@ (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-reminder-a) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-fishgame) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage @@ -2439,25 +2663,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-plant) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-plant) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-plant) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-plant) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2472,25 +2698,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2505,25 +2733,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-canyon-end) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-canyon-end) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-canyon-end) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-canyon-end) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2538,25 +2768,27 @@ (new 'static 'task-cstage :game-task (game-task jungle-temple-door) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-temple-door) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-temple-door) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task jungle-temple-door) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2571,31 +2803,33 @@ (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-yakow) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2611,19 +2845,21 @@ (new 'static 'task-cstage :game-task (game-task village1-uncle-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-uncle-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-uncle-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -2660,7 +2896,7 @@ (new 'static 'task-cstage :game-task (game-task village1-uncle-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2678,25 +2914,27 @@ (new 'static 'task-cstage :game-task (game-task beach-pelican) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-pelican) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-pelican) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-pelican) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2711,31 +2949,33 @@ (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-flutflut) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2750,25 +2990,27 @@ (new 'static 'task-cstage :game-task (game-task beach-seagull) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-seagull) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-seagull) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-seagull) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2783,25 +3025,27 @@ (new 'static 'task-cstage :game-task (game-task beach-cannon) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-cannon) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-cannon) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-cannon) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2816,25 +3060,27 @@ (new 'static 'task-cstage :game-task (game-task beach-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2849,25 +3095,27 @@ (new 'static 'task-cstage :game-task (game-task beach-gimmie) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-gimmie) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-gimmie) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-gimmie) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2882,25 +3130,27 @@ (new 'static 'task-cstage :game-task (game-task beach-sentinel) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-sentinel) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-sentinel) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task beach-sentinel) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2915,31 +3165,33 @@ (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-muse) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2954,25 +3206,27 @@ (new 'static 'task-cstage :game-task (game-task misty-boat) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-boat) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-boat) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-boat) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -2987,25 +3241,27 @@ (new 'static 'task-cstage :game-task (game-task misty-warehouse) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-warehouse) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-warehouse) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-warehouse) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3022,25 +3278,27 @@ (new 'static 'task-cstage :game-task (game-task misty-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3055,25 +3313,27 @@ (new 'static 'task-cstage :game-task (game-task misty-bike-jump) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike-jump) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike-jump) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-bike-jump) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3088,25 +3348,27 @@ (new 'static 'task-cstage :game-task (game-task misty-eco-challenge) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-eco-challenge) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-eco-challenge) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task misty-eco-challenge) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3123,27 +3385,45 @@ (new 'static 'task-cstage :game-task (game-task village2-warrior-money) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) - (and (not (task-closed? 86 5)) (not (task-closed? 103 6))) + (and + (not (task-closed? (game-task ogre-boss) (task-status need-reminder))) + (not + (task-closed? + (game-task village2-levitator) + (task-status need-reward-speech) + ) + ) + ) ) ) (new 'static 'task-cstage :game-task (game-task village2-warrior-money) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) - (and (not (task-closed? 86 5)) (not (task-closed? 103 6))) + (and + (not (task-closed? (game-task ogre-boss) (task-status need-reminder))) + (not + (task-closed? + (game-task village2-levitator) + (task-status need-reward-speech) + ) + ) + ) ) ) (new 'static 'task-cstage :game-task (game-task village2-warrior-money) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -3180,7 +3460,7 @@ (new 'static 'task-cstage :game-task (game-task village2-warrior-money) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3197,37 +3477,40 @@ (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-reminder-a) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-billy) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3243,25 +3526,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-battle) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-battle) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-battle) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-battle) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3276,25 +3561,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-tether-1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-1) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3309,25 +3596,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-tether-2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-2) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3342,25 +3631,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-tether-3) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-3) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-3) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-3) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3375,25 +3666,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-tether-4) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-4) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-4) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-tether-4) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3408,25 +3701,27 @@ (new 'static 'task-cstage :game-task (game-task swamp-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task swamp-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3441,25 +3736,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-platforms) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-platforms) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-platforms) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-platforms) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3474,25 +3771,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-pipe) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-pipe) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-pipe) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-pipe) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3507,25 +3806,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-slide) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-slide) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-slide) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-slide) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3541,25 +3842,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-sharks) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-sharks) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-sharks) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-sharks) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3574,25 +3877,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3607,25 +3912,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-top-of-helix) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-top-of-helix) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-top-of-helix) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-top-of-helix) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3640,25 +3947,27 @@ (new 'static 'task-cstage :game-task (game-task sunken-spinning-room) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-spinning-room) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-spinning-room) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task sunken-spinning-room) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3677,25 +3986,27 @@ (new 'static 'task-cstage :game-task (game-task rolling-lake) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-lake) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-lake) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-lake) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3710,25 +4021,27 @@ (new 'static 'task-cstage :game-task (game-task rolling-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3743,25 +4056,27 @@ (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-1) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3776,25 +4091,27 @@ (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-2) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-2) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-2) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task rolling-ring-chase-2) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3811,25 +4128,27 @@ (new 'static 'task-cstage :game-task (game-task snow-fort) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-fort) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-fort) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-fort) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3844,25 +4163,27 @@ (new 'static 'task-cstage :game-task (game-task snow-ball) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ball) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ball) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-ball) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3877,25 +4198,27 @@ (new 'static 'task-cstage :game-task (game-task snow-bunnies) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bunnies) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bunnies) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bunnies) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3910,25 +4233,27 @@ (new 'static 'task-cstage :game-task (game-task snow-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3943,25 +4268,27 @@ (new 'static 'task-cstage :game-task (game-task snow-bumpers) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bumpers) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bumpers) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-bumpers) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -3976,25 +4303,27 @@ (new 'static 'task-cstage :game-task (game-task snow-cage) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-cage) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-cage) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task snow-cage) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4009,25 +4338,27 @@ (new 'static 'task-cstage :game-task (game-task firecanyon-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4042,25 +4373,27 @@ (new 'static 'task-cstage :game-task (game-task firecanyon-end) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-end) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-end) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task firecanyon-end) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4079,25 +4412,27 @@ (new 'static 'task-cstage :game-task (game-task village3-extra1) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-extra1) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-extra1) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-extra1) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4112,25 +4447,27 @@ (new 'static 'task-cstage :game-task (game-task village1-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village1-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4145,25 +4482,27 @@ (new 'static 'task-cstage :game-task (game-task village2-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village2-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4178,25 +4517,27 @@ (new 'static 'task-cstage :game-task (game-task village3-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village3-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4213,25 +4554,27 @@ (new 'static 'task-cstage :game-task (game-task cave-dark-climb) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-climb) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-climb) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-dark-climb) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4246,25 +4589,27 @@ (new 'static 'task-cstage :game-task (game-task cave-robot-climb) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-robot-climb) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-robot-climb) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-robot-climb) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4279,25 +4624,27 @@ (new 'static 'task-cstage :game-task (game-task cave-swing-poles) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-swing-poles) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-swing-poles) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-swing-poles) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4312,25 +4659,27 @@ (new 'static 'task-cstage :game-task (game-task cave-spider-tunnel) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-spider-tunnel) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-spider-tunnel) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-spider-tunnel) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4345,25 +4694,27 @@ (new 'static 'task-cstage :game-task (game-task cave-platforms) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-platforms) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-platforms) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-platforms) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4378,25 +4729,27 @@ (new 'static 'task-cstage :game-task (game-task cave-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task cave-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4411,25 +4764,27 @@ (new 'static 'task-cstage :game-task (game-task ogre-boss) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-boss) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-boss) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-boss) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4444,25 +4799,27 @@ (new 'static 'task-cstage :game-task (game-task ogre-end) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-end) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-end) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-end) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4477,25 +4834,27 @@ (new 'static 'task-cstage :game-task (game-task ogre-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4510,25 +4869,27 @@ (new 'static 'task-cstage :game-task (game-task lavatube-end) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-end) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-end) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-end) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4543,25 +4904,27 @@ (new 'static 'task-cstage :game-task (game-task lavatube-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4576,25 +4939,27 @@ (new 'static 'task-cstage :game-task (game-task citadel-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task citadel-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4609,25 +4974,27 @@ (new 'static 'task-cstage :game-task (game-task training-gimmie) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-gimmie) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-gimmie) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-gimmie) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4642,25 +5009,27 @@ (new 'static 'task-cstage :game-task (game-task training-door) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-door) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-door) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-door) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4675,25 +5044,27 @@ (new 'static 'task-cstage :game-task (game-task training-climb) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-climb) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-climb) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-climb) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4708,25 +5079,27 @@ (new 'static 'task-cstage :game-task (game-task training-buzzer) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-buzzer) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-buzzer) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task training-buzzer) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4747,7 +5120,7 @@ (new 'static 'task-cstage :game-task (game-task firecanyon-assistant) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -4782,25 +5155,27 @@ (new 'static 'task-cstage :game-task (game-task red-eggtop) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task red-eggtop) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task red-eggtop) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task red-eggtop) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4815,25 +5190,27 @@ (new 'static 'task-cstage :game-task (game-task lavatube-balls) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-balls) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-balls) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task lavatube-balls) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4848,7 +5225,7 @@ (new 'static 'task-cstage :game-task (game-task lavatube-start) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) @@ -4881,25 +5258,27 @@ (new 'static 'task-cstage :game-task (game-task ogre-secret) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-secret) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-secret) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task ogre-secret) :status (task-status need-resolution) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4919,13 +5298,14 @@ (new 'static 'task-cstage :game-task (game-task village4-button) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task village4-button) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4940,31 +5320,31 @@ (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status unknown) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status need-introduction) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status need-reminder-a) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task finalboss-movies) :status (task-status need-reward-speech) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -4979,13 +5359,15 @@ (new 'static 'task-cstage :game-task (game-task plunger-lurker-hit) :status (task-status unknown) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task plunger-lurker-hit) :status (task-status need-hint) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -5000,13 +5382,15 @@ (new 'static 'task-cstage :game-task (game-task leaving-misty) :status (task-status need-introduction) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) (new 'static 'task-cstage :game-task (game-task leaving-misty) :status (task-status need-reminder) - :flags #x6 + :flags + (task-flags has-entity closed-by-default) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -5020,13 +5404,19 @@ :type task-cstage :length 2 :allocated-length 2 (new 'static 'task-cstage :status (task-status unknown) - :flags #x2 + :flags (task-flags has-entity) :condition - (lambda ((arg0 task-control)) (task-closed? 111 6)) + (lambda + ((arg0 task-control)) + (task-closed? + (game-task village4-button) + (task-status need-reward-speech) + ) + ) ) (new 'static 'task-cstage :status (task-status need-reminder) - :flags #x2 + :flags (task-flags has-entity) :condition (lambda ((arg0 task-control)) #t) ) ) @@ -5040,8 +5430,8 @@ (defun task-control-reset ((arg0 symbol)) (let ((s5-0 *task-controls*)) (countdown (s4-0 (-> s5-0 length)) - (reset! (-> s5-0 s4-0) arg0 #f) - (first-any (-> s5-0 s4-0) #f) + (reset! (the-as task-control (-> s5-0 s4-0)) arg0 #f) + (first-any (the-as task-control (-> s5-0 s4-0)) #f) ) ) 0 @@ -5049,35 +5439,38 @@ ) ;; definition for function get-task-control -(defun get-task-control ((arg0 int)) - (cond - ((or - (>= (the-as uint 1) (the-as uint arg0)) - (>= (the-as uint arg0) (the-as uint 116)) - ) - (format - 0 - "ERROR: get-task-control received invalid task ~D/~S~%" - arg0 - (game-task->string arg0) - ) - *null-task-control* - ) - (else - (-> *task-controls* arg0) - ) +;; INFO: Return type mismatch basic vs task-control. +(defun get-task-control ((arg0 game-task)) + (the-as task-control (cond + ((or + (>= (the-as uint 1) (the-as uint arg0)) + (>= (the-as uint arg0) (the-as uint 116)) + ) + (format + 0 + "ERROR: get-task-control received invalid task ~D/~S~%" + arg0 + (game-task->string arg0) + ) + *null-task-control* + ) + (else + (-> *task-controls* arg0) + ) + ) ) ) ;; definition for function get-task-status -(defun get-task-status ((arg0 task-control)) - (let ((gp-0 (get-task-control (the-as int arg0)))) +;; INFO: Return type mismatch int vs task-status. +(defun get-task-status ((arg0 game-task)) + (let ((gp-0 (get-task-control arg0))) (when gp-0 (dotimes (s5-0 (-> gp-0 stage length)) (when (and (= arg0 (-> gp-0 stage s5-0 game-task)) - (TODO-RENAME-11 (-> gp-0 stage s5-0) gp-0) + (task-available? (-> gp-0 stage s5-0) gp-0) ) (first-any gp-0 #t) (return (the-as int (-> gp-0 stage s5-0 status))) @@ -5086,12 +5479,12 @@ ) (first-any gp-0 #t) ) - 0 + (the-as task-status 0) ) ;; definition for function close-specific-task! -(defun close-specific-task! ((arg0 task-control) (arg1 int)) - (let ((gp-0 (get-task-control (the-as int arg0)))) +(defun close-specific-task! ((arg0 game-task) (arg1 task-status)) + (let ((gp-0 (get-task-control arg0))) (when gp-0 (dotimes (v1-1 (-> gp-0 stage length)) (when @@ -5099,14 +5492,14 @@ (= arg0 (-> gp-0 stage v1-1 game-task)) (= arg1 (-> gp-0 stage v1-1 status)) ) - (TODO-RENAME-14 (-> gp-0 stage v1-1)) + (close-task! (-> gp-0 stage v1-1)) (return (first-any gp-0 #t)) ) ) (format 0 "ERROR: close-specific! received non-existent task-cstage(~S ~S)--returning #t.~%" - (game-task->string (the-as int arg0)) + (game-task->string arg0) (task-status->string arg1) ) ) @@ -5115,8 +5508,8 @@ ) ;; definition for function open-specific-task! -(defun open-specific-task! ((arg0 task-control) (arg1 int)) - (let ((gp-0 (get-task-control (the-as int arg0)))) +(defun open-specific-task! ((arg0 game-task) (arg1 task-status)) + (let ((gp-0 (get-task-control arg0))) (when gp-0 (dotimes (v1-1 (-> gp-0 stage length)) (when @@ -5124,14 +5517,14 @@ (= arg0 (-> gp-0 stage v1-1 game-task)) (= arg1 (-> gp-0 stage v1-1 status)) ) - (clear-all-but-first-flag-bit (-> gp-0 stage v1-1)) + (open-task! (-> gp-0 stage v1-1)) (return (first-any gp-0 #t)) ) ) (format 0 "ERROR: open-specific! received non-existent task-cstage(~S ~S)--returning #t.~%" - (game-task->string (the-as int arg0)) + (game-task->string arg0) (task-status->string arg1) ) ) @@ -5140,19 +5533,27 @@ ) ;; definition for function task-closed? -(defun task-closed? ((arg0 int) (arg1 int)) +(defun task-closed? ((arg0 game-task) (arg1 task-status)) (closed? (get-task-control arg0) arg0 arg1) ) ;; definition for function task-exists? -(defun task-exists? ((arg0 task-control) (arg1 int)) - (exists? (get-task-control (the-as int arg0)) (the-as int arg0) arg1) +(defun task-exists? ((arg0 game-task) (arg1 task-status)) + (exists? (get-task-control arg0) arg0 arg1) ) ;; definition for function task-known? -(defun task-known? ((arg0 task-control)) +(defun task-known? ((arg0 game-task)) (let ((v1-0 (get-task-status arg0))) - (if (or (= v1-0 6) (= v1-0 3) (= v1-0 5) (= v1-0 4) (= v1-0 7) (zero? v1-0)) + (if + (or + (= v1-0 (task-status need-reward-speech)) + (= v1-0 (task-status need-introduction)) + (= v1-0 (task-status need-reminder)) + (= v1-0 (task-status need-reminder-a)) + (= v1-0 (task-status need-resolution)) + (= v1-0 (task-status invalid)) + ) #t #f ) @@ -5161,7 +5562,7 @@ ;; definition for function sages-kidnapped? (defun sages-kidnapped? () - (task-closed? 111 6) + (task-closed? (game-task village4-button) (task-status need-reward-speech)) ) ;; failed to figure out what this is: @@ -5171,14 +5572,14 @@ (let ((s4-0 (-> (the-as symbol (-> gp-0 s5-0)) value))) (cond ((and (nonzero? s4-0) (type-type? (rtype-of s4-0) task-control)) - (set! (-> gp-0 s5-0) (the-as task-control s4-0)) + (set! (-> gp-0 s5-0) (the-as basic s4-0)) ) (else (format 0 "ERROR: value of symbol ~A in task-controls is not a task-control~%" ) - (set! (-> gp-0 s5-0) (the-as task-control '*null-task-control*)) + (set! (-> gp-0 s5-0) '*null-task-control*) ) ) ) @@ -5188,7 +5589,3 @@ ;; failed to figure out what this is: (task-control-reset 'game) - - - - diff --git a/test/decompiler/reference/engine/geometry/geometry-h_REF.gc b/test/decompiler/reference/engine/geometry/geometry-h_REF.gc index 9bf4dc4472..42633a19dc 100644 --- a/test/decompiler/reference/engine/geometry/geometry-h_REF.gc +++ b/test/decompiler/reference/engine/geometry/geometry-h_REF.gc @@ -27,7 +27,7 @@ ;; definition of type border-plane (deftype border-plane (basic) - ((name basic :offset-assert 4) + ((name symbol :offset-assert 4) (action basic :offset-assert 8) (slot int8 :offset-assert 12) (trans vector :inline :offset-assert 16) @@ -37,8 +37,8 @@ :size-assert #x30 :flag-assert #xb00000030 (:methods - (dummy-9 () none 9) - (dummy-10 () none 10) + (debug-draw! (_type_) none 9) + (point-past-plane? (_type_ vector) symbol 10) ) ) diff --git a/test/decompiler/reference/engine/geometry/vol-h_REF.gc b/test/decompiler/reference/engine/geometry/vol-h_REF.gc index 263e7f4bd4..7e8d4909d8 100644 --- a/test/decompiler/reference/engine/geometry/vol-h_REF.gc +++ b/test/decompiler/reference/engine/geometry/vol-h_REF.gc @@ -104,8 +104,8 @@ ((s5-1 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) (s4-0 (-> (lookup-tag-idx (the-as entity s5-1) 'vol 'exact 0.0) lo)) ) - (when (>= s4-0 0) - (let ((s3-0 s4-0) + (when (>= (the-as int s4-0) 0) + (let ((s3-0 (the-as uint s4-0)) (s2-0 (-> s5-1 tag s4-0)) ) 0 @@ -144,8 +144,8 @@ ((s5-2 (the-as res-lump (-> (the-as vol-control gp-0) process entity))) (s4-1 (-> (lookup-tag-idx (the-as entity s5-2) 'cutoutvol 'exact 0.0) lo)) ) - (when (>= s4-1 0) - (let ((s3-1 s4-1) + (when (>= (the-as int s4-1) 0) + (let ((s3-1 (the-as uint s4-1)) (s2-1 (-> s5-2 tag s4-1)) ) 0 diff --git a/test/decompiler/reference/engine/level/level-info_REF.gc b/test/decompiler/reference/engine/level/level-info_REF.gc index aec44b3803..cb56870a2d 100644 --- a/test/decompiler/reference/engine/level/level-info_REF.gc +++ b/test/decompiler/reference/engine/level/level-info_REF.gc @@ -26,7 +26,7 @@ :trans (new 'static 'vector :x -5393626.5 :y 28072.346 :z 4332472.5 :w 1.0) :quat - (new 'static 'vector :y 0.9995 :w 0.0297) + (new 'static 'quaternion :y 0.9995 :w 0.0297) :camera-trans (new 'static 'vector :x -5426915.0 :y 45930.906 :z 4353156.0 :w 1.0) :camera-rot @@ -90,7 +90,7 @@ :trans (new 'static 'vector :x -5383524.0 :y 28019.098 :z 4360302.0 :w 1.0) :quat - (new 'static 'vector :y 0.084 :w 0.9964) + (new 'static 'quaternion :y 0.084 :w 0.9964) :camera-trans (new 'static 'vector :x -5366765.0 :y 45646.234 :z 4325889.0 :w 1.0) :camera-rot @@ -154,7 +154,7 @@ :trans (new 'static 'vector :x -5393740.5 :y 28259.533 :z 4360945.5 :w 1.0) :quat - (new 'static 'vector :y 0.9993 :w 0.0359) + (new 'static 'quaternion :y 0.9993 :w 0.0359) :camera-trans (new 'static 'vector :x -5434444.5 :y 47050.344 :z 4372832.5 :w 1.0) :camera-rot @@ -254,7 +254,7 @@ :trans (new 'static 'vector :x -638860.06 :y 139319.7 :z 769990.6 :w 1.0) :quat - (new 'static 'vector :y -0.9889 :w -0.148) + (new 'static 'quaternion :y -0.9889 :w -0.148) :camera-trans (new 'static 'vector :x -668114.1 :y 164536.31 :z 828633.06 :w 1.0) :camera-rot @@ -283,7 +283,7 @@ :trans (new 'static 'vector :x -518468.8 :y 189424.03 :z 868568.7 :w 1.0) :quat - (new 'static 'vector :y 0.591 :w 0.8066) + (new 'static 'quaternion :y 0.591 :w 0.8066) :camera-trans (new 'static 'vector :x -559109.3 :y 200461.92 :z 826073.06 :w 1.0) :camera-rot @@ -312,7 +312,7 @@ :trans (new 'static 'vector :x -518468.8 :y 189424.03 :z 868568.7 :w 1.0) :quat - (new 'static 'vector :y 0.591 :w 0.8066) + (new 'static 'quaternion :y 0.591 :w 0.8066) :camera-trans (new 'static 'vector :x -559109.3 :y 200461.92 :z 826073.06 :w 1.0) :camera-rot @@ -341,7 +341,7 @@ :trans (new 'static 'vector :x -542529.1 :y 189424.03 :z 847101.94 :w 1.0) :quat - (new 'static 'vector :y -0.1717 :w -0.9851) + (new 'static 'quaternion :y -0.1717 :w -0.9851) :camera-trans (new 'static 'vector :x -559085.2 :y 202996.53 :z 826054.25 :w 1.0) :camera-rot @@ -370,7 +370,7 @@ :trans (new 'static 'vector :x 164316.78 :y 15128.576 :z 3390588.0 :w 1.0) :quat - (new 'static 'vector :y -0.2339 :w 0.9722) + (new 'static 'quaternion :y -0.2339 :w 0.9722) :camera-trans (new 'static 'vector :x 204089.34 :y 36257.793 :z 3358341.0 :w 1.0) :camera-rot @@ -484,7 +484,7 @@ :trans (new 'static 'vector :x -504960.22 :y 9477.325 :z -223513.81 :w 1.0) :quat - (new 'static 'vector :y 0.9486 :w -0.3163) + (new 'static 'quaternion :y 0.9486 :w -0.3163) :camera-trans (new 'static 'vector :x -487550.16 :y 28354.15 :z -184211.05 :w 1.0) :camera-rot @@ -549,7 +549,7 @@ :trans (new 'static 'vector :x 1057631.9 :y 86404.305 :z -647140.56 :w 1.0) :quat - (new 'static 'vector :y -0.9009 :w -0.4339) + (new 'static 'quaternion :y -0.9009 :w -0.4339) :camera-trans (new 'static 'vector :x 1004424.8 :y 111181.82 :z -611527.9 :w 1.0) :camera-rot @@ -616,7 +616,7 @@ :trans (new 'static 'vector :x 1469510.0 :y -204745.52 :z -959058.3 :w 1.0) :quat - (new 'static 'vector :y -0.6194 :w -0.785) + (new 'static 'quaternion :y -0.6194 :w -0.785) :camera-trans (new 'static 'vector :x 1485298.5 :y -189972.08 :z -936548.75 :w 1.0) :camera-rot @@ -677,7 +677,7 @@ :trans (new 'static 'vector :x 164316.78 :y 15128.576 :z 3390588.0 :w 1.0) :quat - (new 'static 'vector :y -0.2339 :w 0.9722) + (new 'static 'quaternion :y -0.2339 :w 0.9722) :camera-trans (new 'static 'vector :x 204089.34 :y 36257.793 :z 3358341.0 :w 1.0) :camera-rot @@ -748,7 +748,7 @@ :trans (new 'static 'vector :x -672503.0 :y 82131.35 :z 3651465.8 :w 1.0) :quat - (new 'static 'vector :y 0.0878 :w 0.9961) + (new 'static 'quaternion :y 0.0878 :w 0.9961) :camera-trans (new 'static 'vector :x -675754.0 :y 102028.91 :z 3604800.8 :w 1.0) :camera-rot @@ -819,7 +819,7 @@ :trans (new 'static 'vector :x 302533.44 :y 35901.848 :z 4138967.8 :w 1.0) :quat - (new 'static 'vector :y -0.2809 :w 0.9597) + (new 'static 'quaternion :y -0.2809 :w 0.9597) :camera-trans (new 'static 'vector :x 338476.25 :y 55700.684 :z 4109729.0 :w 1.0) :camera-rot @@ -890,7 +890,7 @@ :trans (new 'static 'vector :x -304192.72 :y 33270.99 :z 4646525.0 :w 1.0) :quat - (new 'static 'vector :y -0.8443 :w -0.5357) + (new 'static 'quaternion :y -0.8443 :w -0.5357) :camera-trans (new 'static 'vector :x -346989.78 :y 54377.676 :z 4674685.5 :w 1.0) :camera-rot @@ -961,7 +961,7 @@ :trans (new 'static 'vector :x -898000.06 :y 98038.17 :z 4162091.0 :w 1.0) :quat - (new 'static 'vector :y -0.1102 :w 0.9938) + (new 'static 'quaternion :y -0.1102 :w 0.9938) :camera-trans (new 'static 'vector :x -931459.9 :y 118198.68 :z 4196081.0 :w 1.0) :camera-rot @@ -1068,7 +1068,7 @@ :trans (new 'static 'vector :x -87377.1 :y 126444.75 :z -681697.25 :w 1.0) :quat - (new 'static 'vector :y 0.9921 :w -0.1246) + (new 'static 'quaternion :y 0.9921 :w -0.1246) :camera-trans (new 'static 'vector :x -84559.055 :y 144685.47 :z -641194.0 :w 1.0) :camera-rot @@ -1096,7 +1096,7 @@ :trans (new 'static 'vector :x 1360576.1 :y 126976.0 :z -5839533.5 :w 1.0) :quat - (new 'static 'vector :y 0.1666 :w 0.986) + (new 'static 'quaternion :y 0.1666 :w 0.986) :camera-trans (new 'static 'vector :x 1378912.6 :y 144452.81 :z -5872527.0 :w 1.0) :camera-rot @@ -1160,7 +1160,7 @@ :trans (new 'static 'vector :x 1460961.2 :y 108562.02 :z -6161391.0 :w 1.0) :quat - (new 'static 'vector :y 0.9917 :w 0.1278) + (new 'static 'quaternion :y 0.9917 :w 0.1278) :camera-trans (new 'static 'vector :x 1468018.8 :y 133790.92 :z -6096227.0 :w 1.0) :camera-rot @@ -1189,7 +1189,7 @@ :trans (new 'static 'vector :x 1592492.9 :y 91648.0 :z -6328677.0 :w 1.0) :quat - (new 'static 'vector :y 0.7469 :w 0.6648) + (new 'static 'quaternion :y 0.7469 :w 0.6648) :camera-trans (new 'static 'vector :x 1555766.1 :y 103759.46 :z -6318964.5 :w 1.0) :camera-rot @@ -1217,7 +1217,7 @@ :trans (new 'static 'vector :x 1264346.8 :y 19451.494 :z -6833563.5 :w 1.0) :quat - (new 'static 'vector :y 0.0258 :w 0.9996) + (new 'static 'quaternion :y 0.0258 :w 0.9996) :camera-trans (new 'static 'vector :x 1265547.2 :y 34647.656 :z -6862636.5 :w 1.0) :camera-rot @@ -1281,7 +1281,7 @@ :trans (new 'static 'vector :x 2172095.2 :y -591749.94 :z -6721553.0 :w 1.0) :quat - (new 'static 'vector :y -0.5083 :w 0.8611) + (new 'static 'quaternion :y -0.5083 :w 0.8611) :camera-trans (new 'static 'vector :x 2138871.5 :y -572296.4 :z -6751967.5 :w 1.0) :camera-rot @@ -1309,7 +1309,7 @@ :trans (new 'static 'vector :x 3062988.5 :y -536575.56 :z -6527484.0 :w 1.0) :quat - (new 'static 'vector :y 0.5304 :w 0.8477) + (new 'static 'quaternion :y 0.5304 :w 0.8477) :camera-trans (new 'static 'vector :x 3015461.2 :y -515480.38 :z -6546573.5 :w 1.0) :camera-rot @@ -1337,7 +1337,7 @@ :trans (new 'static 'vector :x 3133625.5 :y -569343.56 :z -6909587.5 :w 1.0) :quat - (new 'static 'vector :y -0.9512 :w 0.3083) + (new 'static 'quaternion :y -0.9512 :w 0.3083) :camera-trans (new 'static 'vector :x 3170833.2 :y -548244.25 :z -6874378.0 :w 1.0) :camera-rot @@ -1365,7 +1365,7 @@ :trans (new 'static 'vector :x 2649601.8 :y -569343.56 :z -7132970.0 :w 1.0) :quat - (new 'static 'vector :y 0.9936 :w 0.1124) + (new 'static 'quaternion :y 0.9936 :w 0.1124) :camera-trans (new 'static 'vector :x 2636150.2 :y -555656.4 :z -7114732.5 :w 1.0) :camera-rot @@ -1425,7 +1425,8 @@ :level 'sunkenb :trans (new 'static 'vector :x 2229231.2 :y -1019912.2 :z -6788748.5 :w 1.0) - :quat (new 'static 'vector :y 0.895 :w 0.446) + :quat + (new 'static 'quaternion :y 0.895 :w 0.446) :camera-trans (new 'static 'vector :x 2187840.0 :y -998915.7 :z -6759328.0 :w 1.0) :camera-rot @@ -1453,7 +1454,7 @@ :trans (new 'static 'vector :x 2466572.8 :y -1838989.2 :z -7299582.0 :w 1.0) :quat - (new 'static 'vector :y -0.8841 :w 0.4672) + (new 'static 'quaternion :y -0.8841 :w 0.4672) :camera-trans (new 'static 'vector :x 2515616.2 :y -1817888.4 :z -7284843.5 :w 1.0) :camera-rot @@ -1514,7 +1515,7 @@ :trans (new 'static 'vector :x 1842537.2 :y 21027.227 :z -7333297.5 :w 1.0) :quat - (new 'static 'vector :y -0.9933 :w 0.1153) + (new 'static 'quaternion :y -0.9933 :w 0.1153) :camera-trans (new 'static 'vector :x 1862529.9 :y 44371.56 :z -7277995.5 :w 1.0) :camera-rot @@ -1561,7 +1562,7 @@ :trans (new 'static 'vector :x 1360386.9 :y 5823.693 :z -8218890.0 :w 1.0) :quat - (new 'static 'vector :y -0.585 :w -0.811) + (new 'static 'quaternion :y -0.585 :w -0.811) :camera-trans (new 'static 'vector :x 1314475.6 :y 26164.838 :z -8234152.5 :w 1.0) :camera-rot @@ -1608,7 +1609,7 @@ :trans (new 'static 'vector :x 1553700.5 :y 1835.4176 :z -8258429.5 :w 1.0) :quat - (new 'static 'vector :y -0.9871 :w -0.1599) + (new 'static 'quaternion :y -0.9871 :w -0.1599) :camera-trans (new 'static 'vector :x 1556873.2 :y 22715.598 :z -8208106.0 :w 1.0) :camera-rot @@ -1655,7 +1656,7 @@ :trans (new 'static 'vector :x 1645872.4 :y 36495.77 :z -8427323.0 :w 1.0) :quat - (new 'static 'vector :y -0.8294 :w -0.5586) + (new 'static 'quaternion :y -0.8294 :w -0.5586) :camera-trans (new 'static 'vector :x 1599338.9 :y 57590.168 :z -8405954.0 :w 1.0) :camera-rot @@ -1702,7 +1703,7 @@ :trans (new 'static 'vector :x 2037539.2 :y 1103.872 :z -8560013.0 :w 1.0) :quat - (new 'static 'vector :y 0.0559 :w 0.9984) + (new 'static 'quaternion :y 0.0559 :w 0.9984) :camera-trans (new 'static 'vector :x 1995208.2 :y 21832.908 :z -8586304.0 :w 1.0) :camera-rot @@ -1749,7 +1750,7 @@ :trans (new 'static 'vector :x 2612289.2 :y -2047.5905 :z -8315907.5 :w 1.0) :quat - (new 'static 'vector :y -0.6975 :w 0.7165) + (new 'static 'quaternion :y -0.6975 :w 0.7165) :camera-trans (new 'static 'vector :x 2661940.5 :y 20693.81 :z -8317980.5 :w 1.0) :camera-rot @@ -1796,7 +1797,7 @@ :trans (new 'static 'vector :x 2011811.4 :y 3711.7952 :z -7923027.0 :w 1.0) :quat - (new 'static 'vector :y -0.5269 :w 0.8499) + (new 'static 'quaternion :y -0.5269 :w 0.8499) :camera-trans (new 'static 'vector :x 2053120.4 :y 22242.51 :z -7927784.5 :w 1.0) :camera-rot @@ -1879,7 +1880,7 @@ :trans (new 'static 'vector :x 432272.6 :y 42821.633 :z -6737529.0 :w 1.0) :quat - (new 'static 'vector :y -0.545 :w 0.8383) + (new 'static 'quaternion :y -0.545 :w 0.8383) :camera-trans (new 'static 'vector :x 494105.8 :y 67237.48 :z -6748524.0 :w 1.0) :camera-rot @@ -1943,7 +1944,7 @@ :trans (new 'static 'vector :x 849775.8 :y 163962.88 :z -7301166.5 :w 1.0) :quat - (new 'static 'vector :y -0.9931 :w 0.1166) + (new 'static 'quaternion :y -0.9931 :w 0.1166) :camera-trans (new 'static 'vector :x 848906.25 :y 185056.88 :z -7249962.0 :w 1.0) :camera-rot @@ -1971,7 +1972,7 @@ :trans (new 'static 'vector :x 841424.9 :y 163801.1 :z -8205419.5 :w 1.0) :quat - (new 'static 'vector :y -0.9857 :w 0.168) + (new 'static 'quaternion :y -0.9857 :w 0.168) :camera-trans (new 'static 'vector :x 860479.9 :y 183815.38 :z -8162368.0 :w 1.0) :camera-rot @@ -1999,7 +2000,7 @@ :trans (new 'static 'vector :x 3971233.5 :y 141227.62 :z -13935735.0 :w 1.0) :quat - (new 'static 'vector :y -0.8721 :w 0.4892) + (new 'static 'quaternion :y -0.8721 :w 0.4892) :camera-trans (new 'static 'vector :x 3997892.2 :y 159604.73 :z -13904449.0 :w 1.0) :camera-rot @@ -2063,7 +2064,7 @@ :trans (new 'static 'vector :x 4468021.5 :y 186608.03 :z -14054268.0 :w 1.0) :quat - (new 'static 'vector :y 0.9999 :w 0.005) + (new 'static 'quaternion :y 0.9999 :w 0.005) :camera-trans (new 'static 'vector :x 4469439.5 :y 207701.2 :z -14003077.0 :w 1.0) :camera-rot @@ -2092,7 +2093,7 @@ :trans (new 'static 'vector :x 4549776.0 :y 215375.88 :z -14285922.0 :w 1.0) :quat - (new 'static 'vector :y 0.681 :w 0.7322) + (new 'static 'quaternion :y 0.681 :w 0.7322) :camera-trans (new 'static 'vector :x 4543255.0 :y 226776.67 :z -14313317.0 :w 1.0) :camera-rot @@ -2120,7 +2121,7 @@ :trans (new 'static 'vector :x 4423744.0 :y 198723.58 :z -14530641.0 :w 1.0) :quat - (new 'static 'vector :y 0.6611 :w 0.7502) + (new 'static 'quaternion :y 0.6611 :w 0.7502) :camera-trans (new 'static 'vector :x 4381844.0 :y 218599.83 :z -14551361.0 :w 1.0) :camera-rot @@ -2185,7 +2186,7 @@ :trans (new 'static 'vector :x 4256260.0 :y 983713.8 :z -14182752.0 :w 1.0) :quat - (new 'static 'vector :y 0.7906 :w -0.6122) + (new 'static 'quaternion :y 0.7906 :w -0.6122) :camera-trans (new 'static 'vector :x 4303859.5 :y 1012363.7 :z -14156672.0 :w 1.0) :camera-rot @@ -2213,7 +2214,7 @@ :trans (new 'static 'vector :x 3430875.2 :y 897149.3 :z -13397581.0 :w 1.0) :quat - (new 'static 'vector :y 0.0968 :w 0.9952) + (new 'static 'quaternion :y 0.0968 :w 0.9952) :camera-trans (new 'static 'vector :x 3428789.8 :y 918241.25 :z -13448724.0 :w 1.0) :camera-rot @@ -2241,7 +2242,7 @@ :trans (new 'static 'vector :x 2481850.0 :y 1054709.4 :z -13922438.0 :w 1.0) :quat - (new 'static 'vector :y 0.8628 :w -0.5055) + (new 'static 'quaternion :y 0.8628 :w -0.5055) :camera-trans (new 'static 'vector :x 2497063.0 :y 1069339.9 :z -13900353.0 :w 1.0) :camera-rot @@ -2269,7 +2270,7 @@ :trans (new 'static 'vector :x 3751044.8 :y 917612.1 :z -13828696.0 :w 1.0) :quat - (new 'static 'vector :y -0.3387 :w -0.9408) + (new 'static 'quaternion :y -0.3387 :w -0.9408) :camera-trans (new 'static 'vector :x 3779776.0 :y 933972.8 :z -13845825.0 :w 1.0) :camera-rot @@ -2297,7 +2298,7 @@ :trans (new 'static 'vector :x 3151164.5 :y 1049638.1 :z -14246464.0 :w 1.0) :quat - (new 'static 'vector :y -0.6226 :w 0.7824) + (new 'static 'quaternion :y -0.6226 :w 0.7824) :camera-trans (new 'static 'vector :x 3203905.2 :y 1080037.8 :z -14270850.0 :w 1.0) :camera-rot @@ -2325,7 +2326,7 @@ :trans (new 'static 'vector :x 3053335.0 :y 1048927.9 :z -14058945.0 :w 1.0) :quat - (new 'static 'vector :y 0.9997 :w 0.022) + (new 'static 'quaternion :y 0.9997 :w 0.022) :camera-trans (new 'static 'vector :x 3045845.5 :y 1068868.0 :z -14012568.0 :w 1.0) :camera-rot @@ -2353,7 +2354,7 @@ :trans (new 'static 'vector :x 3431014.0 :y 901474.7 :z -13600187.0 :w 1.0) :quat - (new 'static 'vector :y -0.0954 :w -0.9954) + (new 'static 'quaternion :y -0.0954 :w -0.9954) :camera-trans (new 'static 'vector :x 3429969.0 :y 922565.44 :z -13651353.0 :w 1.0) :camera-rot @@ -2381,7 +2382,7 @@ :trans (new 'static 'vector :x 3200864.2 :y 907400.4 :z -13676660.0 :w 1.0) :quat - (new 'static 'vector :y 0.5867 :w -0.8097) + (new 'static 'quaternion :y 0.5867 :w -0.8097) :camera-trans (new 'static 'vector :x 3247600.8 :y 928464.06 :z -13697606.0 :w 1.0) :camera-rot @@ -2409,7 +2410,7 @@ :trans (new 'static 'vector :x 2721898.5 :y 1049845.0 :z -13743428.0 :w 1.0) :quat - (new 'static 'vector :y -0.7688 :w -0.6394) + (new 'static 'quaternion :y -0.7688 :w -0.6394) :camera-trans (new 'static 'vector :x 2712702.5 :y 1070288.5 :z -13791593.0 :w 1.0) :camera-rot @@ -2473,7 +2474,7 @@ :trans (new 'static 'vector :x 4420967.0 :y 33006.387 :z -13154230.0 :w 1.0) :quat - (new 'static 'vector :y 0.0174 :w -0.9998) + (new 'static 'quaternion :y 0.0174 :w -0.9998) :camera-trans (new 'static 'vector :x 4428164.5 :y 54074.164 :z -13204933.0 :w 1.0) :camera-rot @@ -2501,7 +2502,7 @@ :trans (new 'static 'vector :x 4172175.8 :y 154223.83 :z -12445165.0 :w 1.0) :quat - (new 'static 'vector :y -0.2093 :w 0.9778) + (new 'static 'quaternion :y -0.2093 :w 0.9778) :camera-trans (new 'static 'vector :x 4193893.2 :y 175317.81 :z -12491520.0 :w 1.0) :camera-rot @@ -2529,7 +2530,7 @@ :trans (new 'static 'vector :x 4760896.5 :y 44221.234 :z -12409880.0 :w 1.0) :quat - (new 'static 'vector :y 0.548 :w 0.8364) + (new 'static 'quaternion :y 0.548 :w 0.8364) :camera-trans (new 'static 'vector :x 4745230.0 :y 57869.926 :z -12426885.0 :w 1.0) :camera-rot @@ -2593,7 +2594,7 @@ :trans (new 'static 'vector :x 3813246.2 :y 129487.664 :z -12114304.0 :w 1.0) :quat - (new 'static 'vector :y 0.1439 :w 0.9895) + (new 'static 'quaternion :y 0.1439 :w 0.9895) :camera-trans (new 'static 'vector :x 3793301.0 :y 145573.48 :z -12139847.0 :w 1.0) :camera-rot @@ -2654,7 +2655,7 @@ :trans (new 'static 'vector :x 5208223.5 :y 69697.945 :z -11781496.0 :w 1.0) :quat - (new 'static 'vector :y -0.3654 :w -0.9308) + (new 'static 'quaternion :y -0.3654 :w -0.9308) :camera-trans (new 'static 'vector :x 5171715.0 :y 90796.85 :z -11817413.0 :w 1.0) :camera-rot @@ -2682,7 +2683,7 @@ :trans (new 'static 'vector :x 5435461.5 :y -97111.24 :z -11588379.0 :w 1.0) :quat - (new 'static 'vector :y 0.1086 :w 0.994) + (new 'static 'quaternion :y 0.1086 :w 0.994) :camera-trans (new 'static 'vector :x 5409966.5 :y -76017.664 :z -11632764.0 :w 1.0) :camera-rot @@ -2743,7 +2744,7 @@ :trans (new 'static 'vector :x 5511317.0 :y 159871.8 :z -14621239.0 :w 1.0) :quat - (new 'static 'vector :y -0.3753 :w -0.9268) + (new 'static 'quaternion :y -0.3753 :w -0.9268) :camera-trans (new 'static 'vector :x 5510636.5 :y 197720.06 :z -14663128.0 :w 1.0) :camera-rot @@ -2771,7 +2772,7 @@ :trans (new 'static 'vector :x 9081441.0 :y -3935.8464 :z -14056285.0 :w 1.0) :quat - (new 'static 'vector :y -0.7002 :w -0.7139) + (new 'static 'quaternion :y -0.7002 :w -0.7139) :camera-trans (new 'static 'vector :x 9055362.0 :y 10606.592 :z -14050822.0 :w 1.0) :camera-rot @@ -2799,7 +2800,7 @@ :trans (new 'static 'vector :x 9954895.0 :y 390513.06 :z -16548614.0 :w 1.0) :quat - (new 'static 'vector :y -0.7485 :w -0.663) + (new 'static 'quaternion :y -0.7485 :w -0.663) :camera-trans (new 'static 'vector :x 9923721.0 :y 406466.16 :z -16541633.0 :w 1.0) :camera-rot @@ -2827,7 +2828,7 @@ :trans (new 'static 'vector :x 11479892.0 :y -163656.5 :z -18266490.0 :w 1.0) :quat - (new 'static 'vector :y -0.9589 :w -0.2836) + (new 'static 'quaternion :y -0.9589 :w -0.2836) :camera-trans (new 'static 'vector :x 11526721.0 :y -143482.47 :z -18257412.0 :w 1.0) :camera-rot @@ -2891,7 +2892,7 @@ :trans (new 'static 'vector :x 11442706.0 :y -142755.84 :z -18869044.0 :w 1.0) :quat - (new 'static 'vector :y 0.9992 :w 0.0392) + (new 'static 'quaternion :y 0.9992 :w 0.0392) :camera-trans (new 'static 'vector :x 11441183.0 :y -122509.31 :z -18820882.0 :w 1.0) :camera-rot @@ -2919,7 +2920,7 @@ :trans (new 'static 'vector :x 11443969.0 :y -154216.03 :z -18472782.0 :w 1.0) :quat - (new 'static 'vector :y -0.9728 :w 0.2314) + (new 'static 'quaternion :y -0.9728 :w 0.2314) :camera-trans (new 'static 'vector :x 11436929.0 :y -134244.36 :z -18426254.0 :w 1.0) :camera-rot @@ -2948,7 +2949,7 @@ :trans (new 'static 'vector :x 11454895.0 :y -161791.6 :z -18204690.0 :w 1.0) :quat - (new 'static 'vector :y 0.7511 :w 0.6601) + (new 'static 'quaternion :y 0.7511 :w 0.6601) :camera-trans (new 'static 'vector :x 11406872.0 :y -141278.0 :z -18194638.0 :w 1.0) :camera-rot @@ -2976,7 +2977,7 @@ :trans (new 'static 'vector :x 10827551.0 :y -94047.02 :z -18946718.0 :w 1.0) :quat - (new 'static 'vector :y 0.8377 :w -0.546) + (new 'static 'quaternion :y 0.8377 :w -0.546) :camera-trans (new 'static 'vector :x 10862150.0 :y -75343.875 :z -18922316.0 :w 1.0) :camera-rot @@ -3004,7 +3005,7 @@ :trans (new 'static 'vector :x 11047507.0 :y -81514.086 :z -19495960.0 :w 1.0) :quat - (new 'static 'vector :y 0.0292 :w 0.9995) + (new 'static 'quaternion :y 0.0292 :w 0.9995) :camera-trans (new 'static 'vector :x 11033498.0 :y -63027.2 :z -19534916.0 :w 1.0) :camera-rot @@ -3032,7 +3033,7 @@ :trans (new 'static 'vector :x 11443470.0 :y -120194.664 :z -19845628.0 :w 1.0) :quat - (new 'static 'vector :y -0.9907 :w -0.1355) + (new 'static 'quaternion :y -0.9907 :w -0.1355) :camera-trans (new 'static 'vector :x 11443545.0 :y -99100.266 :z -19794374.0 :w 1.0) :camera-rot @@ -3060,7 +3061,7 @@ :trans (new 'static 'vector :x 11269726.0 :y -12132.352 :z -19614712.0 :w 1.0) :quat - (new 'static 'vector :y -0.0419 :w 0.9991) + (new 'static 'quaternion :y -0.0419 :w 0.9991) :camera-trans (new 'static 'vector :x 11264449.0 :y 7920.8447 :z -19661710.0 :w 1.0) :camera-rot @@ -3088,7 +3089,7 @@ :trans (new 'static 'vector :x 12138031.0 :y -36900.863 :z -18933304.0 :w 1.0) :quat - (new 'static 'vector :y 0.7487 :w 0.6628) + (new 'static 'quaternion :y 0.7487 :w 0.6628) :camera-trans (new 'static 'vector :x 12101831.0 :y -19811.123 :z -18933632.0 :w 1.0) :camera-rot @@ -3116,7 +3117,7 @@ :trans (new 'static 'vector :x 11837483.0 :y -20177.715 :z -19506848.0 :w 1.0) :quat - (new 'static 'vector :y -0.3564 :w 0.9342) + (new 'static 'quaternion :y -0.3564 :w 0.9342) :camera-trans (new 'static 'vector :x 11872697.0 :y 887.6032 :z -19544198.0 :w 1.0) :camera-rot @@ -3144,7 +3145,7 @@ :trans (new 'static 'vector :x 11447961.0 :y 234055.27 :z -19169000.0 :w 1.0) :quat - (new 'static 'vector :y 0.2351 :w 0.9719) + (new 'static 'quaternion :y 0.2351 :w 0.9719) :camera-trans (new 'static 'vector :x 11454465.0 :y 252947.66 :z -19126656.0 :w 1.0) :camera-rot @@ -3209,7 +3210,7 @@ :trans (new 'static 'vector :x 11548456.0 :y 2215872.0 :z -19409498.0 :w 1.0) :quat - (new 'static 'vector :y 0.7325 :w 0.6807) + (new 'static 'quaternion :y 0.7325 :w 0.6807) :camera-trans (new 'static 'vector :x 11513311.0 :y 2234999.5 :z -19435708.0 :w 1.0) :camera-rot @@ -3240,7 +3241,7 @@ :trans (new 'static 'vector :x 12288335.0 :y 1970461.9 :z -19848522.0 :w 1.0) :quat - (new 'static 'vector :y -0.5359 :w -0.8442) + (new 'static 'quaternion :y -0.5359 :w -0.8442) :camera-trans (new 'static 'vector :x 12265366.0 :y 1984228.5 :z -19842574.0 :w 1.0) :camera-rot @@ -3333,7 +3334,7 @@ :flags #x8 :trans (new 'static 'vector :x 66396.16 :y 29782.016 :z -919973.5 :w 1.0) - :quat (new 'static 'vector :w 1.0) + :quat (new 'static 'quaternion :w 1.0) :camera-trans (new 'static 'vector :x 76871.68 :y 55061.707 :z -938752.0 :w 1.0) :camera-rot @@ -3393,7 +3394,7 @@ :trans (new 'static 'vector :x -635598.9 :y 222551.66 :z 710496.25 :w 1.0) :quat - (new 'static 'vector :y -0.3323 :w -0.9431) + (new 'static 'quaternion :y -0.3323 :w -0.9431) :camera-trans (new 'static 'vector :x -665644.25 :y 250803.0 :z 668470.9 :w 1.0) :camera-rot @@ -3454,7 +3455,7 @@ :trans (new 'static 'vector :x -1048.9856 :y -172047.97 :z -212555.78 :w 1.0) :quat - (new 'static 'vector :y 0.061 :w 0.9981) + (new 'static 'quaternion :y 0.061 :w 0.9981) :camera-trans (new 'static 'vector :x -9941.401 :y -150049.17 :z -159587.94 :w 1.0) :camera-rot diff --git a/test/decompiler/reference/engine/math/vector-h_REF.gc b/test/decompiler/reference/engine/math/vector-h_REF.gc index 6398465319..b5639beccf 100644 --- a/test/decompiler/reference/engine/math/vector-h_REF.gc +++ b/test/decompiler/reference/engine/math/vector-h_REF.gc @@ -16,7 +16,7 @@ (get-bit (_type_ int) symbol 9) (clear-bit (_type_ int) int 10) (set-bit (_type_ int) int 11) - (clear (_type_) _type_ 12) + (clear-all! (_type_) _type_ 12) ) ) @@ -94,7 +94,7 @@ ) ;; definition for method 12 of type bit-array -(defmethod clear bit-array ((obj bit-array)) +(defmethod clear-all! bit-array ((obj bit-array)) (countdown (idx (/ (logand -8 (+ (-> obj allocated-length) 7)) 8)) (nop!) (nop!) diff --git a/test/decompiler/reference/engine/ui/credits_REF.gc b/test/decompiler/reference/engine/ui/credits_REF.gc index bea821bbf0..cedfe5fde0 100644 --- a/test/decompiler/reference/engine/ui/credits_REF.gc +++ b/test/decompiler/reference/engine/ui/credits_REF.gc @@ -121,16 +121,16 @@ (set! (-> gp-0 origin y) 90.0) (dotimes (s4-1 3) (let* ((s2-0 (+ (+ s4-1 3840) s5-1)) - (s3-0 (dummy-9 *common-text* (the-as uint s2-0) #t)) + (s3-0 (lookup-text! *common-text* (the-as game-text-id s2-0) #t)) ) (when (= s2-0 3841) (let ((v1-18 (scf-get-territory))) (cond ((= v1-18 1) - (set! s3-0 (dummy-9 *common-text* (the-as uint 3857) #t)) + (set! s3-0 (lookup-text! *common-text* (game-text-id europe) #t)) ) ((= v1-18 2) - (set! s3-0 (dummy-9 *common-text* (the-as uint 3856) #t)) + (set! s3-0 (lookup-text! *common-text* (game-text-id inc) #t)) ) ) ) @@ -187,7 +187,7 @@ (or s2-0 (and (< s4-0 (- s3-0)) (< (the-as uint gp-0) (the-as uint 3249)))) (+! s4-0 s3-0) (+! gp-0 1) - (let ((a0-8 (dummy-9 *common-text* (the-as uint gp-0) #t))) + (let ((a0-8 (lookup-text! *common-text* (the-as game-text-id gp-0) #t))) (if a0-8 (set! s3-0 (the int (+ 5.0 (print-game-text a0-8 s5-0 #t 128 20)))) (set! s3-0 25) @@ -202,7 +202,7 @@ (else (set! (-> s5-0 origin y) (the float s4-0)) (while (< (-> s5-0 origin y) (the float (-> *video-parms* screen-sy))) - (let ((a0-11 (dummy-9 *common-text* (the-as uint gp-0) #t))) + (let ((a0-11 (lookup-text! *common-text* (the-as game-text-id gp-0) #t))) (if a0-11 (set! v1-13 (the int (+ 5.0 (print-game-text a0-11 s5-0 #f 128 20)))) (set! v1-13 25) diff --git a/test/decompiler/reference/engine/ui/progress-h_REF.gc b/test/decompiler/reference/engine/ui/progress-h_REF.gc index e74cfc801a..dbbc7954b3 100644 --- a/test/decompiler/reference/engine/ui/progress-h_REF.gc +++ b/test/decompiler/reference/engine/ui/progress-h_REF.gc @@ -40,9 +40,9 @@ ;; definition of type task-info-data (deftype task-info-data (basic) - ((task-id uint8 :offset-assert 4) - (task-name symbol 4 :offset-assert 8) - (text-index-when-resolved int32 :offset-assert 24) + ((task-id game-task :offset-assert 4) + (task-name game-text-id 4 :offset-assert 8) + (text-index-when-resolved int32 :offset-assert 24) ) :method-count-assert 9 :size-assert #x1c @@ -64,7 +64,7 @@ ;; definition of type level-tasks-info (deftype level-tasks-info (basic) - ((level-name-id uint32 :offset-assert 4) + ((level-name-id game-text-id :offset-assert 4) (text-group-index int32 :offset-assert 8) (nb-of-tasks int32 :offset-assert 12) (buzzer-task-index int32 :offset-assert 16) @@ -88,13 +88,13 @@ ;; definition of type game-option (deftype game-option (basic) - ((option-type uint64 :offset-assert 8) - (name uint32 :offset-assert 16) - (scale basic :offset-assert 20) - (param1 float :offset-assert 24) - (param2 float :offset-assert 28) - (param3 int32 :offset-assert 32) - (value-to-modify uint32 :offset-assert 36) + ((option-type uint64 :offset-assert 8) + (name game-text-id :offset-assert 16) + (scale basic :offset-assert 20) + (param1 float :offset-assert 24) + (param2 float :offset-assert 28) + (param3 int32 :offset-assert 32) + (value-to-modify uint32 :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 diff --git a/test/decompiler/reference/engine/ui/progress/progress-static_REF.gc b/test/decompiler/reference/engine/ui/progress/progress-static_REF.gc new file mode 100644 index 0000000000..966dff5c86 --- /dev/null +++ b/test/decompiler/reference/engine/ui/progress/progress-static_REF.gc @@ -0,0 +1,1729 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *main-options*, type (array game-option) +(define + *main-options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 7 :allocated-length 7 + (new 'static 'game-option + :option-type #x6 + :name (game-text-id game-options) + :scale #t + :param3 4 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id graphic-options) + :scale #t + :param3 5 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id sound-options) + :scale #t + :param3 6 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id load-game) + :scale #t + :param3 16 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id save-game) + :scale #t + :param3 17 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id quit-game) + :scale #t + :param3 34 + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *title*, type (array game-option) +(define + *title* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option + :option-type #x6 + :name (game-text-id new-game) + :scale #t + :param3 18 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id load-game) + :scale #t + :param3 16 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id options) + :scale #t + :param3 28 + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *options*, type (array game-option) +(define + *options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option + :option-type #x6 + :name (game-text-id game-options) + :scale #t + :param3 4 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id graphic-options) + :scale #t + :param3 5 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id sound-options) + :scale #t + :param3 6 + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *main-options-demo*, type (array game-option) +(define + *main-options-demo* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option + :option-type #x6 + :name (game-text-id game-options) + :scale #t + :param3 4 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id graphic-options) + :scale #t + :param3 5 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id sound-options) + :scale #t + :param3 6 + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *main-options-demo-shared*, type (array game-option) +(define + *main-options-demo-shared* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 5 :allocated-length 5 + (new 'static 'game-option + :option-type #x6 + :name (game-text-id game-options) + :scale #t + :param3 4 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id graphic-options) + :scale #t + :param3 5 + ) + (new 'static 'game-option + :option-type #x6 + :name (game-text-id sound-options) + :scale #t + :param3 6 + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id exit-demo) + :scale #t + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *game-options*, type (array game-option) +(define + *game-options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option + :option-type #x2 + :name (game-text-id vibrations) + :scale #t + ) + (new 'static 'game-option + :option-type #x2 + :name (game-text-id play-hints) + :scale #t + ) + (new 'static 'game-option + :option-type #x1 + :name (game-text-id language) + :scale #t + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *game-options-japan*, type (array game-option) +(define + *game-options-japan* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 3 :allocated-length 3 + (new 'static 'game-option + :option-type #x2 + :name (game-text-id vibrations) + :scale #t + ) + (new 'static 'game-option + :option-type #x2 + :name (game-text-id play-hints) + :scale #t + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *game-options-demo*, type (array game-option) +(define + *game-options-demo* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 3 :allocated-length 3 + (new 'static 'game-option + :option-type #x2 + :name (game-text-id vibrations) + :scale #t + ) + (new 'static 'game-option + :option-type #x2 + :name (game-text-id play-hints) + :scale #t + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *graphic-options*, type (array game-option) +(define + *graphic-options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 3 :allocated-length 3 + (new 'static 'game-option + :option-type #x3 + :name (game-text-id center-screen) + :scale #t + ) + (new 'static 'game-option + :option-type #x4 + :name (game-text-id aspect-ratio) + :scale #t + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *graphic-title-options-pal*, type (array game-option) +(define + *graphic-title-options-pal* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option + :option-type #x3 + :name (game-text-id center-screen) + :scale #t + ) + (new 'static 'game-option + :option-type #x5 + :name (game-text-id video-mode) + :scale #t + ) + (new 'static 'game-option + :option-type #x4 + :name (game-text-id aspect-ratio) + :scale #t + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *sound-options*, type (array game-option) +(define + *sound-options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 4 :allocated-length 4 + (new 'static 'game-option + :name (game-text-id sfx-volume) + :scale #t + :param2 100.0 + ) + (new 'static 'game-option + :name (game-text-id music-volume) + :scale #t + :param2 100.0 + ) + (new 'static 'game-option + :name (game-text-id speech-volume) + :scale #t + :param2 100.0 + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #t + ) + ) + ) + ) + +;; definition for symbol *yes-no-options*, type (array game-option) +(define + *yes-no-options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 1 :allocated-length 1 + (new 'static 'game-option :option-type #x7 :scale #f) + ) + ) + ) + +;; definition for symbol *ok-options*, type (array game-option) +(define + *ok-options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 1 :allocated-length 1 + (new 'static 'game-option + :option-type #x8 + :name (game-text-id ok) + :scale #f + ) + ) + ) + ) + +;; definition for symbol *load-options*, type (array game-option) +(define + *load-options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 5 :allocated-length 5 + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #f + ) + ) + ) + ) + +;; definition for symbol *save-options*, type (array game-option) +(define + *save-options* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 5 :allocated-length 5 + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #f + ) + ) + ) + ) + +;; definition for symbol *save-options-title*, type (array game-option) +(define + *save-options-title* + (the-as (array game-option) + (new + 'static + 'boxed-array + :type game-option :length 6 :allocated-length 6 + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option :option-type #x8 :scale #f) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id continue-without-saving) + :scale #f + ) + (new 'static 'game-option + :option-type #x8 + :name (game-text-id back) + :scale #f + ) + ) + ) + ) + +;; definition for symbol *options-remap*, type (array array) +(define + *options-remap* + (the-as (array array) + (new 'static 'boxed-array :type array :length 0 :allocated-length 35) + ) + ) + +;; definition for symbol *level-task-data-remap*, type (array int32) +(define + *level-task-data-remap* + (the-as (array int32) + (new + 'static + 'boxed-array + :type int32 :length 23 :allocated-length 23 + 0 + 1 + 2 + 3 + 3 + 4 + 5 + 6 + 7 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 13 + 13 + 14 + 15 + 15 + 4 + 4 + ) + ) + ) + +;; definition for symbol *language-name-remap*, type (array game-text-id) +(define + *language-name-remap* + (the-as (array game-text-id) + (new + 'static + 'boxed-array + :type game-text-id :length 6 :allocated-length 6 + (game-text-id english) + (game-text-id french) + (game-text-id german) + (game-text-id spanish) + (game-text-id italian) + (game-text-id japanese) + ) + ) + ) + +;; definition for symbol *level-task-data*, type (array level-tasks-info) +(define + *level-task-data* + (the-as (array level-tasks-info) + (new + 'static + 'boxed-array + :type level-tasks-info :length 16 :allocated-length 16 + (new 'static 'level-tasks-info + :level-name-id (game-text-id training-level-name) + :text-group-index 1 + :nb-of-tasks 4 + :buzzer-task-index 3 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task training-gimmie) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id training-gimmie-task-name) + (game-text-id training-gimmie-task-name) + (game-text-id training-gimmie-task-name) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task training-door) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id training-door-task-name) + (game-text-id training-door-task-name) + (game-text-id training-door-task-name) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task training-climb) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id training-climb-task-name) + (game-text-id training-climb-task-name) + (game-text-id training-climb-task-name) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task training-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id training-buzzer-task-name) + (game-text-id training-buzzer-task-name) + (game-text-id training-buzzer-task-name) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id village1-level-name) + :text-group-index 1 + :nb-of-tasks 6 + :buzzer-task-index 5 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task village1-mayor-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village1-mayor-money) + (game-text-id village1-mayor-money) + (game-text-id village1-mayor-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-uncle-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id vollage1-uncle-money) + (game-text-id vollage1-uncle-money) + (game-text-id vollage1-uncle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-yakow) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village1-yakow-herd) + (game-text-id village1-yakow-herd) + (game-text-id village1-yakow-return) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-oracle-money1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village1-oracle) + (game-text-id village1-oracle) + (game-text-id village1-oracle) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-oracle-money2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village1-oracle) + (game-text-id village1-oracle) + (game-text-id village1-oracle) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village1-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id beach-level-name) + :text-group-index 1 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task beach-ecorocks) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-ecorocks) + (game-text-id beach-ecorocks) + (game-text-id beach-ecorocks) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-flutflut) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-flutflut-push) + (game-text-id beach-flutflut-push) + (game-text-id beach-flutflut-meet) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-pelican) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-pelican) + (game-text-id beach-pelican) + (game-text-id beach-pelican) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-seagull) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-seagull) + (game-text-id beach-seagull) + (game-text-id beach-seagull-get) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-cannon) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-cannon) + (game-text-id beach-cannon) + (game-text-id beach-cannon) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-gimmie) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-gimmie) + (game-text-id beach-gimmie) + (game-text-id beach-gimmie) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-sentinel) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-sentinel) + (game-text-id beach-sentinel) + (game-text-id beach-sentinel) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task beach-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id jungle-level-name) + :text-group-index 1 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task jungle-lurkerm) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-lurkerm-unblock) + (game-text-id jungle-lurkerm-connect) + (game-text-id jungle-lurkerm-return) + (game-text-id zero) + ) + :text-index-when-resolved 1 + ) + (new 'static 'task-info-data + :task-id (game-task jungle-tower) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-tower) + (game-text-id jungle-tower) + (game-text-id jungle-tower) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-eggtop) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-eggtop) + (game-text-id jungle-eggtop) + (game-text-id jungle-eggtop) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-plant) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-plant) + (game-text-id jungle-plant) + (game-text-id jungle-plant) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-fishgame) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-fishgame) + (game-text-id jungle-fishgame) + (game-text-id jungle-fishgame) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-canyon-end) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-canyon-end) + (game-text-id jungle-canyon-end) + (game-text-id jungle-canyon-end) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-temple-door) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id jungle-temple-door) + (game-text-id jungle-temple-door) + (game-text-id jungle-temple-door) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task jungle-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id misty-level-name) + :text-group-index 1 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task misty-muse) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-muse-catch) + (game-text-id misty-muse-catch) + (game-text-id misty-muse-return) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-boat) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-boat) + (game-text-id misty-boat) + (game-text-id misty-boat) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-cannon) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-cannon) + (game-text-id misty-cannon) + (game-text-id misty-cannon) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-warehouse) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-return-to-pool) + (game-text-id misty-return-to-pool) + (game-text-id misty-return-to-pool) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-bike) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-find-transpad) + (game-text-id misty-balloon-lurkers) + (game-text-id misty-find-transpad) + (game-text-id zero) + ) + :text-index-when-resolved 1 + ) + (new 'static 'task-info-data + :task-id (game-task misty-bike-jump) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-bike-jump) + (game-text-id misty-bike-jump) + (game-text-id misty-bike-jump) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-eco-challenge) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id misty-eco-challenge) + (game-text-id misty-eco-challenge) + (game-text-id misty-eco-challenge) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task misty-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id beach-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id fire-canyon-level-name) + :text-group-index 5 + :nb-of-tasks 2 + :buzzer-task-index 1 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task firecanyon-end) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id fire-canyon-end) + (game-text-id fire-canyon-end) + (game-text-id fire-canyon-end) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task firecanyon-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id fire-canyon-buzzer) + (game-text-id fire-canyon-buzzer) + (game-text-id fire-canyon-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id village2-level-name) + :text-group-index 2 + :nb-of-tasks 6 + :buzzer-task-index 5 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task village2-gambler-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-gambler-money) + (game-text-id village2-gambler-money) + (game-text-id village2-gambler-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-geologist-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-geologist-money) + (game-text-id village2-geologist-money) + (game-text-id village2-geologist-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-warrior-money) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-warrior-money) + (game-text-id village2-warrior-money) + (game-text-id village2-warrior-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-oracle-money1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-oracle-money) + (game-text-id village2-oracle-money) + (game-text-id village2-oracle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-oracle-money2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village2-oracle-money) + (game-text-id village2-oracle-money) + (game-text-id village2-oracle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village2-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id sunken-level-name) + :text-group-index 2 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task sunken-room) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-elevator-raise) + (game-text-id sunken-elevator-raise) + (game-text-id sunken-elevator-get-to-roof) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-pipe) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-pipe) + (game-text-id sunken-pipe) + (game-text-id sunken-pipe) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-slide) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-bottom) + (game-text-id sunken-bottom) + (game-text-id sunken-bottom) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-sharks) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-pool) + (game-text-id sunken-pool) + (game-text-id sunken-pool) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-platforms) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-platforms) + (game-text-id sunken-platforms) + (game-text-id sunken-platforms) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-top-of-helix) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id sunken-climb-tube) + (game-text-id sunken-climb-tube) + (game-text-id sunken-climb-tube) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-spinning-room) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id reach-center) + (game-text-id reach-center) + (game-text-id reach-center) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task sunken-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id swamp-level-name) + :text-group-index 2 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task swamp-flutflut) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-flutflut) + (game-text-id swamp-flutflut) + (game-text-id swamp-flutflut) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-billy) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-billy) + (game-text-id swamp-billy) + (game-text-id swamp-billy) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-battle) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-battle) + (game-text-id swamp-battle) + (game-text-id swamp-battle) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-tether-4) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-tether-1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-tether-2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-tether-3) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id swamp-tether) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task swamp-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id rolling-level-name) + :text-group-index 2 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task rolling-moles) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-moles) + (game-text-id rolling-moles) + (game-text-id rolling-moles-return) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-robbers) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-robbers) + (game-text-id rolling-robbers) + (game-text-id rolling-robbers) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-race) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-race) + (game-text-id rolling-race) + (game-text-id rolling-race-return) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-lake) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-lake) + (game-text-id rolling-lake) + (game-text-id rolling-lake) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-plants) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-plants) + (game-text-id rolling-plants) + (game-text-id rolling-plants) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-ring-chase-1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-ring-chase-1) + (game-text-id rolling-ring-chase-1) + (game-text-id rolling-ring-chase-1) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-ring-chase-2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id rolling-ring-chase-2) + (game-text-id rolling-ring-chase-2) + (game-text-id rolling-ring-chase-2) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task rolling-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id unknown-buzzers) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id ogre-level-name) + :text-group-index 6 + :nb-of-tasks 4 + :buzzer-task-index 3 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task ogre-boss) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id ogre-boss) + (game-text-id ogre-boss) + (game-text-id ogre-boss) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task ogre-end) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id ogre-end) + (game-text-id ogre-end) + (game-text-id ogre-end) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task ogre-secret) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id hidden-power-cell) + (game-text-id hidden-power-cell) + (game-text-id hidden-power-cell) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task ogre-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id ogre-buzzer) + (game-text-id ogre-buzzer) + (game-text-id ogre-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id village3-level-name) + :text-group-index 3 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task village3-miner-money1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-miner-money2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-miner-money3) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-miner-money4) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id village3-miner-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-oracle-money1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-oracle-money) + (game-text-id village3-oracle-money) + (game-text-id village3-oracle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-oracle-money2) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-oracle-money) + (game-text-id village3-oracle-money) + (game-text-id village3-oracle-money) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-extra1) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id hidden-power-cell) + (game-text-id hidden-power-cell) + (game-text-id hidden-power-cell) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task village3-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id snowy-level-name) + :text-group-index 3 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task snow-eggtop) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-eggtop) + (game-text-id snow-eggtop) + (game-text-id snow-eggtop) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-ram) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-ram-3-left) + (game-text-id snow-ram-2-left) + (game-text-id snow-ram-1-left) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-bumpers) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-bumpers) + (game-text-id snow-bumpers) + (game-text-id snow-bumpers) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-cage) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-frozen-crate) + (game-text-id snow-frozen-crate) + (game-text-id snow-frozen-crate) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-fort) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-fort) + (game-text-id snow-fort) + (game-text-id snow-fort) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-ball) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-open-door) + (game-text-id snow-open-door) + (game-text-id snow-open-door) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-bunnies) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id snow-bunnies) + (game-text-id snow-bunnies) + (game-text-id snow-bunnies) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task snow-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id cave-level-name) + :text-group-index 3 + :nb-of-tasks 8 + :buzzer-task-index 7 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task cave-gnawers) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-gnawers) + (game-text-id cave-gnawers) + (game-text-id cave-gnawers) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-dark-crystals) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-dark-crystals) + (game-text-id cave-dark-crystals) + (game-text-id cave-dark-crystals) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-dark-climb) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-dark-climb) + (game-text-id cave-dark-climb) + (game-text-id cave-dark-climb) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-robot-climb) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-robot-climb) + (game-text-id cave-robot-climb) + (game-text-id cave-robot-climb) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-swing-poles) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-swing-poles) + (game-text-id cave-swing-poles) + (game-text-id cave-swing-poles) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-spider-tunnel) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-spider-tunnel) + (game-text-id cave-spider-tunnel) + (game-text-id cave-spider-tunnel) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-platforms) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id cave-platforms) + (game-text-id cave-platforms) + (game-text-id cave-platforms) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task cave-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id village3-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id lavatube-level-name) + :text-group-index 3 + :nb-of-tasks 2 + :buzzer-task-index 1 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task lavatube-end) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id lavatube-end) + (game-text-id lavatube-end) + (game-text-id lavatube-end) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task lavatube-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id lavatube-buzzer) + (game-text-id lavatube-buzzer) + (game-text-id lavatube-buzzer) + (game-text-id zero) + ) + ) + ) + ) + (new 'static 'level-tasks-info + :level-name-id (game-text-id citadel-level-name) + :text-group-index 4 + :nb-of-tasks 5 + :buzzer-task-index 4 + :task-info + (new 'static 'array task-info-data 8 + (new 'static 'task-info-data + :task-id (game-task citadel-sage-blue) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-sage-blue) + (game-text-id citadel-sage-blue) + (game-text-id citadel-sage-blue) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task citadel-sage-red) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-sage-red) + (game-text-id citadel-sage-red) + (game-text-id citadel-sage-red) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task citadel-sage-yellow) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-sage-yellow) + (game-text-id citadel-sage-yellow) + (game-text-id citadel-sage-yellow) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task citadel-sage-green) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-sage-green) + (game-text-id citadel-sage-green) + (game-text-id citadel-sage-green) + (game-text-id zero) + ) + ) + (new 'static 'task-info-data + :task-id (game-task citadel-buzzer) + :task-name + (new 'static 'array game-text-id 4 + (game-text-id citadel-buzzer) + (game-text-id citadel-buzzer) + (game-text-id citadel-buzzer) + (game-text-id zero) + ) + ) + ) + ) + ) + ) + ) + +;; definition for symbol *task-egg-starting-x*, type (array int32) +(define + *task-egg-starting-x* + (the-as (array int32) + (new + 'static + 'boxed-array + :type int32 :length 9 :allocated-length 9 + #xda + #xc2 + #xab + #x93 + #x7c + 100 + 77 + 53 + 30 + ) + ) + ) + +;; definition for symbol *game-counts*, type game-count-info +(define *game-counts* (the-as game-count-info #f)) + diff --git a/test/decompiler/reference/engine/ui/text-h_REF.gc b/test/decompiler/reference/engine/ui/text-h_REF.gc index a5079ef6e8..d7ced89696 100644 --- a/test/decompiler/reference/engine/ui/text-h_REF.gc +++ b/test/decompiler/reference/engine/ui/text-h_REF.gc @@ -31,7 +31,7 @@ :size-assert #x10 :flag-assert #xa00000010 (:methods - (dummy-9 (_type_ uint symbol) string 9) + (lookup-text! (_type_ game-text-id symbol) string 9) ) ) diff --git a/test/decompiler/reference/kernel/gkernel-h_REF.gc b/test/decompiler/reference/kernel/gkernel-h_REF.gc index ff64c03eb7..469dc48f19 100644 --- a/test/decompiler/reference/kernel/gkernel-h_REF.gc +++ b/test/decompiler/reference/kernel/gkernel-h_REF.gc @@ -285,35 +285,15 @@ ) ;; definition for method 2 of type handle -;; WARN: Unsupported inline assembly instruction kind - [subu a2, v1, s7] (defmethod print handle ((obj handle)) - (local-vars (a2-0 int) (s7-0 none)) - (cond - ((nonzero? obj) - (let ((t9-0 format) - (a0-1 #t) - (a1-0 "#") - (v1-0 obj) - ) - (.subu a2-0 v1-0 s7-0) - (t9-0 - a0-1 - a1-0 - (and - (nonzero? a2-0) - (let ((a3-0 (-> (the-as (pointer process) (-> v1-0 process)) 0))) - (if (= (-> v1-0 pid) (-> a3-0 pid)) - a3-0 - ) - ) - ) - (-> obj pid) - ) - ) - ) - (else - (format #t "#") + (if (nonzero? obj) + (format + #t + "#" + (handle->process obj) + (-> obj pid) ) + (format #t "#") ) obj ) diff --git a/test/decompiler/test_DataParser.cpp b/test/decompiler/test_DataParser.cpp index d762de8b6f..5341649643 100644 --- a/test/decompiler/test_DataParser.cpp +++ b/test/decompiler/test_DataParser.cpp @@ -300,7 +300,7 @@ TEST_F(DataDecompTest, ContinuePoint) { " :z -19409498.0\n" " :w 1.0\n" " )\n" - " :quat (new 'static 'vector\n" + " :quat (new 'static 'quaternion\n" " :y 0.7325\n" " :w 0.6807\n" " )\n" diff --git a/test/offline/offline_test_main.cpp b/test/offline/offline_test_main.cpp index 48aaa1d879..aa1bc45a32 100644 --- a/test/offline/offline_test_main.cpp +++ b/test/offline/offline_test_main.cpp @@ -105,10 +105,6 @@ const std::unordered_set g_functions_to_skip_compiling = { // inline assembly "valid?", - /// GKERNEL-H - // bitfields, possibly inline assembly - "(method 2 handle)", - /// GKERNEL // asm "(method 10 process)", @@ -166,6 +162,8 @@ const std::unordered_set g_functions_to_skip_compiling = { // ripple - calls an asm function "ripple-execute", + + "get-task-status", }; // default location for the data. It can be changed with a command line argument. @@ -351,10 +349,6 @@ TEST_F(OfflineDecompilation, FunctionDetect) { // one login per object file EXPECT_EQ(config->allowed_objects.size(), login_count); - - // not many lambdas. - // TODO - disabling this test, some files do have many lambdas! Gotta figure out a better way to - // do this EXPECT_TRUE(unknown_count < 10); } TEST_F(OfflineDecompilation, AsmFunction) { diff --git a/tools/MemoryDumpTool/main.cpp b/tools/MemoryDumpTool/main.cpp index ceb9faf443..400f64eca8 100644 --- a/tools/MemoryDumpTool/main.cpp +++ b/tools/MemoryDumpTool/main.cpp @@ -338,6 +338,30 @@ static bool ends_with(const std::string& str, const std::string& suffix) { 0 == str.compare(str.size() - suffix.size(), suffix.size(), suffix); } +void inspect_symbols(const Ram& ram, + const std::unordered_map& types, + const SymbolMap& symbols) { + fmt::print("Symbols:\n"); + for (const auto& [name, addr] : symbols.name_to_addr) { + std::string found_type; + if (ram.word_in_memory(addr)) { + u32 symbol_value = ram.read(addr); + if ((symbol_value & 0xf) == 4) { + if (ram.word_in_memory(symbol_value)) { + u32 type = ram.read(symbol_value - 4); + auto type_it = types.find(type); + if (type_it != types.end()) { + found_type = type_it->second; + } + } + } + } + if (!found_type.empty()) { + fmt::print(" {:30s} : {}\n", name, found_type); + } + } +} + int main(int argc, char** argv) { fmt::print("MemoryDumpTool\n"); @@ -411,6 +435,7 @@ int main(int argc, char** argv) { auto basics = find_basics(ram, types); inspect_basics(ram, basics, types, symbol_map, dts.ts, results); + inspect_symbols(ram, types, symbol_map); if (fs::exists(output_folder / "ee-results.json")) { fs::remove(output_folder / "ee-results.json");