From e4a740c3469773a5adbd1be671d78ac7daf01ddd Mon Sep 17 00:00:00 2001 From: water Date: Mon, 10 Oct 2022 20:18:20 -0400 Subject: [PATCH] fixes for decompiler, still need compiler fixes --- decompiler/config/jak2/all-types.gc | 30 +- decompiler/util/data_decompile.cpp | 547 ++++++---- .../jak2/engine/ui/progress/progress-h.gc | 10 +- .../engine/ui/progress/progress-static.gc | 994 +++++++++++++++++- goal_src/jak2/engine/ui/progress/progress.gc | 128 ++- goal_src/jak2/engine/ui/text-id-h.gc | 24 + .../jak2/engine/ui/progress/progress-h_REF.gc | 18 +- .../engine/ui/progress/progress-static_REF.gc | 929 +++++++++++++++- .../jak2/engine/ui/progress/progress_REF.gc | 8 +- 9 files changed, 2363 insertions(+), 325 deletions(-) diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index f46a293a0b..7f89b4ee2c 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -6589,8 +6589,15 @@ :bitfield #f (null 0) (pause 257) + (text-x102 #x0102) + (text-x103 #x0103) + (text-x107 #x0107) (progress-sound-music-volume 264) (progress-sound-speech-volume 265) + (text-x10a #x010a) + (text-x10b #x010b) + (text-x10c #x010c) + (text-x10d #x010d) (progress-on 270) (progress-off 271) (progress-move-dpad 272) @@ -6622,6 +6629,7 @@ (progress-title-prompt 306) (progress-quit 307) (progress-root-show-map 308) + (text-x135 #x0135) (progress-root-highscores 310) (progress-highscores-1st 311) (progress-highscores-2nd 312) @@ -6633,6 +6641,10 @@ (progress-highscores-8th 318) (progress-root-secrets 339) (progress-secrets-unlocked 340) + (text-x155 #x0155) + (text-x156 #x0156) + (text-x157 #x0157) + (text-x158 #x0158) (progress-main-secrets-hero-mode 345) (progress-main-secrets-sceneplayer-1 346) (progress-main-secrets-sceneplayer-2 347) @@ -6641,13 +6653,25 @@ (progress-main-secrets-mega-scrapbook 350) (progress-main-secrets-scrapbook-3 351) (progress-main-secrets-levelselect 352) + (text-x160 #x0160) + (text-x161 #x0161) + (text-x162 #x0162) + (text-x163 #x0163) + (text-x164 #x0164) + (text-x165 #x0165) + (text-x166 #x0166) + (text-x167 #x0167) (progress-secrets-orb-label 360) (progress-root-missions 361) + (text-x16a #x016a) + (text-x16b #x016b) + (text-x16d #x016d) (progress-root-restart-mission 366) (progress-missions-icon-todo 367) (progress-missions-icon-completed 368) (progress-missions-none 369) (progress-unknown-game 370) + (text-x173 #x0173) (progress-unknown-square-to-reset 377) (progress-unknown-oi1un23i13 380) (progress-unknown-kjanskd 381) @@ -20918,12 +20942,12 @@ ((name game-text-id :offset-assert 4) (scale float :offset-assert 8) (unknown function :offset-assert 12) + (unknown-symbol symbol :offset 8) ;; This is gross if im correct ;; this HAS to have a bunch of `menu-option`s -- look at `(method 24 progress)` and `(method 25 progress)` ;; - i think it might just be that each menu "page" can have 8 menu-options on it? ;; but the drawing code also heavily implies it can also be a `hud-box` (finally the `box` name makes sense) (box hud-box 1 :inline :offset-assert 16) - (options menu-option 8 :offset 16) ) :method-count-assert 12 :size-assert #x30 @@ -21315,7 +21339,7 @@ ((y-center int32 :offset-assert 4) (y-space int32 :offset-assert 8) (scale float :offset-assert 12) - (options menu-option :dynamic :offset-assert 16) + (options (array menu-option) :dynamic :offset-assert 16) ) :method-count-assert 9 :size-assert #x10 @@ -30069,7 +30093,7 @@ ) (define-extern progress-selected (function int int :behavior progress)) -(define-extern draw-percent-bar (function int int float rgba none)) ;; +(define-extern draw-percent-bar (function int int float rgba none)) ;; (define-extern draw-highlight (function int int float pointer)) (define-extern draw-busy-loading (function font-context float :behavior progress)) (define-extern draw-previous-next (function menu-highscores-option font-context symbol none)) diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index cf364d97ff..1ce7141578 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -303,6 +303,64 @@ goos::Object decompile_value_array(const TypeSpec& elt_type, return pretty_print::build_list(array_def); } +goos::Object decompile_ref_array(const TypeSpec& elt_type, + int length, + int my_seg, + int offset_in_seg, + const std::vector& labels, + const std::vector>& words, + const TypeSystem& ts, + const LinkedObjectFile* file, + GameVersion version, + const Field* field_for_errors, + const TypeSpec* actual_type_for_errors) { + std::vector array_def = { + pretty_print::to_symbol(fmt::format("new 'static 'array {} {}", elt_type.print(), length))}; + + int end_elt = 0; + for (int elt = length; elt-- > 0;) { + auto& word = words.at(my_seg).at((offset_in_seg / 4) + elt); + if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) { + continue; + } + end_elt = elt + 1; + break; + } + + for (int elt = 0; elt < end_elt; elt++) { + auto& word = words.at(my_seg).at((offset_in_seg / 4) + elt); + + if (word.kind() == LinkedWord::PTR) { + array_def.push_back(decompile_at_label(elt_type, labels.at(word.label_id()), labels, words, + ts, file, version)); + } else if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) { + // do nothing, the default is zero? + array_def.push_back(pretty_print::to_symbol("0")); + } else if (word.kind() == LinkedWord::SYM_PTR) { + if (word.symbol_name() == "#f" || word.symbol_name() == "#t") { + array_def.push_back(pretty_print::to_symbol(fmt::format("{}", word.symbol_name()))); + } else { + array_def.push_back(pretty_print::to_symbol(fmt::format("'{}", word.symbol_name()))); + } + } else if (word.kind() == LinkedWord::EMPTY_PTR) { + array_def.push_back(pretty_print::to_symbol("'()")); + } else { + if (field_for_errors && actual_type_for_errors) { + throw std::runtime_error( + fmt::format("Field {} in type {} offset {} did not have a proper reference for " + "array element {} k = {}", + field_for_errors->name(), actual_type_for_errors->print(), + field_for_errors->offset(), elt, (int)word.kind())); + } else { + throw std::runtime_error( + fmt::format("Failed to decompile_ref_array: offset {}, elt {}, type {}, k = {}", + offset_in_seg, elt, elt_type.print(), (int)word.kind())); + } + } + } + return pretty_print::build_list(array_def); +} + namespace { float word_as_float(const LinkedWord& w) { ASSERT(w.kind() == LinkedWord::PLAIN_DATA); @@ -430,6 +488,90 @@ goos::Object decomp_ref_to_integer_array_guess_size( all_words.at(start_label.target_segment), ts); } +// TODO: add some disclaimer about this. +goos::Object decomp_ref_to_ref_array_guess_size( + const std::vector& labels, + int my_seg, + int offset_of_array, + const TypeSystem& ts, + const std::vector>& all_words, + const LinkedObjectFile* file, + const TypeSpec& array_elt_type, + int stride) { + // verify types + auto elt_type_info = ts.lookup_type(array_elt_type); + ASSERT(stride == 4); + ASSERT(elt_type_info->is_reference()); + + // the input is the location of the data field. + // we expect that to be a label: + ASSERT((offset_of_array % 4) == 0); +// auto pointer_to_data = all_words.at(my_seg).at(offset_of_array / 4); +// ASSERT(pointer_to_data.kind() == LinkedWord::PTR); + + // the data shouldn't have any labels in the middle of it, so we can find the end of the array + // by searching for the label after the start label. + // const auto& start_label = labels.at(pointer_to_data.label_id()); + int end_label_idx = + index_of_closest_following_label_in_segment(offset_of_array, my_seg, labels); + + int end_offset = all_words.at(my_seg).size() * 4; + if (end_label_idx < 0) { + lg::warn( + "Failed to find label: likely just an unimplemented case for when the data is the last " + "thing in the file."); + } else { + const auto& end_label = labels.at(end_label_idx); + end_offset = end_label.offset; + } + + // see if we need to cheat it back 4 bytes for a type tag + while (end_offset >= 4) { + auto& last_word = all_words.at(my_seg).at((end_offset - 4) / 4); + if (last_word.kind() == LinkedWord::TYPE_PTR) { + end_offset -= 4; + } else if (last_word.kind() == LinkedWord::SYM_PTR) { + end_offset -= 4; + } else if (last_word.kind() == LinkedWord::PLAIN_DATA && last_word.data == 0) { + end_offset -= 4; + } else { + break; + } + } + + // now we can figure out the size + int size_bytes = end_offset - offset_of_array; + int size_elts = size_bytes / stride; // 32 bytes per ocean-near-index + int leftover_bytes = size_bytes % stride; + // lg::print("Size is {} bytes ({} elts), with {} bytes left over\n", size_bytes, + // size_elts,leftover_bytes); + + // if we have leftover, should verify that its all zeros, or that it's the type pointer + // of the next basic in the data section. + // ex: + // .word + // .type + // L21: ; label some other basic + // + int padding_start = end_offset - leftover_bytes; + int padding_end = end_offset; + for (int pad_byte_idx = padding_start; pad_byte_idx < padding_end; pad_byte_idx++) { + auto& word = all_words.at(my_seg).at(pad_byte_idx / 4); + switch (word.kind()) { + case LinkedWord::PLAIN_DATA: + ASSERT(word.get_byte(pad_byte_idx) == 0); + break; + case LinkedWord::TYPE_PTR: + break; + default: + ASSERT(false); + } + } + + return decompile_ref_array(array_elt_type, size_elts, my_seg, offset_of_array, labels, all_words, + ts, file, file->version, nullptr, nullptr); +} + /*! * Attempt to decompile a reference to an inline array, without knowing the size. */ @@ -994,255 +1136,226 @@ goos::Object decompile_structure(const TypeSpec& type, } } - if (all_zero) { - // special case for dynamic arrays at the end of a type - // TODO - this causes an assert in Type.hL240 - // if (!(field_start == field_end && field.is_dynamic())) { - // // field has nothing in it, just skip it. - // continue; - //} - continue; - } - if (any_overlap) { // for now, let's just skip fields that overlapped with the previous. // eventually we should do something smarter here... continue; } - // first, let's see if it's a value or reference - auto field_type_info = ts.lookup_type_allow_partial_def(field.type()); - if (!field_type_info->is_reference() && field.type() != TypeSpec("object")) { - // value type. need to get bytes. - ASSERT(!field.is_inline()); - if (field.is_array()) { - // array of values. - auto len = field.array_size(); - auto stride = ts.get_size_in_type(field) / len; - ASSERT(stride == field_type_info->get_size_in_memory()); - - field_defs_out.emplace_back( - field.name(), decompile_value_array(field.type(), field_type_info, len, stride, - field_start, obj_words, ts)); - } else if (field.is_dynamic()) { - throw std::runtime_error( - fmt::format("Dynamic value field {} in static data type {} not yet implemented", - field.name(), actual_type.print())); - } else { - // TODO - this is getting a little unwieldly -- refactor this at some point - if (field.name() == "data" && type.print() == "ocean-near-indices") { - // first, get the label: - field_defs_out.emplace_back( - field.name(), ocean_near_indices_decompile(obj_words, labels, label.target_segment, - field_start, ts, words, file, version)); - } else if (field.name() == "data" && type.print() == "ocean-mid-masks") { - field_defs_out.emplace_back( - field.name(), ocean_mid_masks_decompile(obj_words, labels, label.target_segment, + // TODO - this is getting a little unwieldly -- refactor this at some point + if (field.name() == "data" && type.print() == "ocean-near-indices") { + // first, get the label: + field_defs_out.emplace_back( + field.name(), ocean_near_indices_decompile(obj_words, labels, label.target_segment, + field_start, ts, words, file, version)); + } else if (field.name() == "data" && type.print() == "ocean-mid-masks") { + field_defs_out.emplace_back(field.name(), + ocean_mid_masks_decompile(obj_words, labels, label.target_segment, + field_start, ts, words, file, version)); + } else if (field.name() == "init-specs" && type.print() == "sparticle-launcher") { + field_defs_out.emplace_back( + field.name(), sp_field_init_spec_decompile(obj_words, labels, label.target_segment, + field_start, ts, words, file, version)); + } else if (field.name() == "vertex" && type.print() == "nav-mesh" && + file->version == GameVersion::Jak1) { + field_defs_out.emplace_back( + field.name(), nav_mesh_vertex_arr_decompile(obj_words, labels, label.target_segment, field_start, ts, words, file, version)); - } else if (field.name() == "init-specs" && type.print() == "sparticle-launcher") { - field_defs_out.emplace_back( - field.name(), sp_field_init_spec_decompile(obj_words, labels, label.target_segment, + } else if (field.name() == "poly" && type.print() == "nav-mesh" && + file->version == GameVersion::Jak1) { + field_defs_out.emplace_back( + field.name(), nav_mesh_poly_arr_decompile(obj_words, labels, label.target_segment, + field_start, ts, words, file, version)); + } else if (field.name() == "poly-array" && type.print() == "nav-mesh" && + file->version == GameVersion::Jak2) { + field_defs_out.emplace_back( + field.name(), nav_mesh_poly_arr_jak2_decompile(obj_words, labels, label.target_segment, field_start, ts, words, file, version)); - } else if (field.name() == "vertex" && type.print() == "nav-mesh" && - file->version == GameVersion::Jak1) { - field_defs_out.emplace_back( - field.name(), nav_mesh_vertex_arr_decompile(obj_words, labels, label.target_segment, - field_start, ts, words, file, version)); - } else if (field.name() == "poly" && type.print() == "nav-mesh" && - file->version == GameVersion::Jak1) { - field_defs_out.emplace_back( - field.name(), nav_mesh_poly_arr_decompile(obj_words, labels, label.target_segment, - field_start, ts, words, file, version)); - } else if (field.name() == "poly-array" && type.print() == "nav-mesh" && - file->version == GameVersion::Jak2) { - field_defs_out.emplace_back(field.name(), nav_mesh_poly_arr_jak2_decompile( - obj_words, labels, label.target_segment, - field_start, ts, words, file, version)); - } else if (field.name() == "nav-control-array" && type.print() == "nav-mesh" && - file->version == GameVersion::Jak2) { - field_defs_out.emplace_back(field.name(), nav_mesh_nav_control_arr_decompile( - obj_words, labels, label.target_segment, - field_start, ts, words, file, version)); - } else if (field.name() == "data" && type.print() == "xz-height-map" && - file->version == GameVersion::Jak2) { - field_defs_out.emplace_back(field.name(), xz_height_map_data_arr_decompile( - obj_words, labels, label.target_segment, - field_start, ts, words, file, version)); - } else if (field.name() == "route" && type.print() == "nav-mesh" && - file->version == GameVersion::Jak1) { - field_defs_out.emplace_back( - field.name(), nav_mesh_route_arr_decompile(obj_words, labels, label.target_segment, + } else if (field.name() == "nav-control-array" && type.print() == "nav-mesh" && + file->version == GameVersion::Jak2) { + field_defs_out.emplace_back( + field.name(), nav_mesh_nav_control_arr_decompile(obj_words, labels, label.target_segment, + field_start, ts, words, file, version)); + } else if (field.name() == "data" && type.print() == "xz-height-map" && + file->version == GameVersion::Jak2) { + field_defs_out.emplace_back( + field.name(), xz_height_map_data_arr_decompile(obj_words, labels, label.target_segment, field_start, ts, words, file, version)); - } else if (field.name() == "launcher" && type.print() == "sparticle-launch-group") { - field_defs_out.emplace_back(field.name(), sp_launch_grp_launcher_decompile( - obj_words, labels, label.target_segment, - field_start, ts, words, file, version)); - } else if (field.name() == "col-mesh-indexes" && type.print() == "ropebridge-tuning") { - field_defs_out.emplace_back( - field.name(), decomp_ref_to_integer_array_guess_size( - obj_words, labels, label.target_segment, field_start, ts, words, - file, TypeSpec("uint8"), 1)); - } else if (field.name() == "probe-dirs" && type.print() == "lightning-probe-vars") { - field_defs_out.emplace_back(field.name(), - probe_dir_decompile(obj_words, labels, label.target_segment, - field_start, ts, words, file, version)); - } else { - if (field.type().base_type() == "pointer") { - if (obj_words.at(field_start / 4).kind() != LinkedWord::SYM_PTR) { - continue; - } - - if (obj_words.at(field_start / 4).symbol_name() != "#f") { - lg::warn("Got a weird symbol in a pointer field: {}", - obj_words.at(field_start / 4).symbol_name()); - continue; - } - - field_defs_out.emplace_back(field.name(), pretty_print::to_symbol("#f")); - - } else { - if (obj_words.at(field_start / 4).kind() != LinkedWord::PLAIN_DATA) { - continue; - } - std::vector bytes_out; - for (int byte_idx = field_start; byte_idx < field_end; byte_idx++) { - bytes_out.push_back(obj_words.at(byte_idx / 4).get_byte(byte_idx % 4)); - } - field_defs_out.emplace_back(field.name(), decompile_value(field.type(), bytes_out, ts)); - } - } + } else if (field.name() == "route" && type.print() == "nav-mesh" && + file->version == GameVersion::Jak1) { + field_defs_out.emplace_back( + field.name(), nav_mesh_route_arr_decompile(obj_words, labels, label.target_segment, + field_start, ts, words, file, version)); + } else if (field.name() == "launcher" && type.print() == "sparticle-launch-group") { + field_defs_out.emplace_back( + field.name(), sp_launch_grp_launcher_decompile(obj_words, labels, label.target_segment, + field_start, ts, words, file, version)); + } else if (field.name() == "col-mesh-indexes" && type.print() == "ropebridge-tuning") { + field_defs_out.emplace_back( + field.name(), decomp_ref_to_integer_array_guess_size( + obj_words, labels, label.target_segment, field_start, ts, words, file, + TypeSpec("uint8"), 1)); + } else if (field.name() == "probe-dirs" && type.print() == "lightning-probe-vars") { + field_defs_out.emplace_back( + field.name(), probe_dir_decompile(obj_words, labels, label.target_segment, field_start, + ts, words, file, version)); + } else if (field.name() == "options" && type.print() == "menu-option-list") { + field_defs_out.emplace_back( + field.name(), decomp_ref_to_ref_array_guess_size( + labels, label.target_segment, field_start + offset_location, ts, words, + file, TypeSpec("array", {TypeSpec("menu-option")}), 4)); + } else { + if (all_zero) { + // special case for dynamic arrays at the end of a type + continue; } - } else { - if (!field.is_dynamic() && !field.is_array() && field.is_inline()) { - // inline structure! - DecompilerLabel fake_label; - fake_label.target_segment = label.target_segment; - // offset from real start of outer + field offset + tag, we want to fake that. - fake_label.offset = offset_location + field.offset() + field_type_info->get_offset(); - fake_label.name = fmt::format("fake-label-{}-{}", actual_type.print(), field.name()); - field_defs_out.emplace_back( - field.name(), - decompile_at_label(field.type(), fake_label, labels, words, ts, file, version)); - } else if (!field.is_dynamic() && field.is_array() && field.is_inline()) { - // it's an inline array. let's figure out the len and stride - auto len = field.array_size(); - auto total_size = ts.get_size_in_type(field); - auto stride = total_size / len; - ASSERT(stride * len == total_size); - ASSERT(stride == align(field_type_info->get_size_in_memory(), - field_type_info->get_inline_array_stride_alignment())); + // first, let's see if it's a value or reference + auto field_type_info = ts.lookup_type_allow_partial_def(field.type()); + if (!field_type_info->is_reference() && field.type() != TypeSpec("object")) { + // value type. need to get bytes. + ASSERT(!field.is_inline()); + if (field.is_array()) { + // array of values. + auto len = field.array_size(); + auto stride = ts.get_size_in_type(field) / len; + ASSERT(stride == field_type_info->get_size_in_memory()); - std::vector array_def = {pretty_print::to_symbol(fmt::format( - "new 'static 'inline-array {} {}", field.type().print(), field.array_size()))}; - for (int elt = 0; elt < len; elt++) { + field_defs_out.emplace_back( + field.name(), decompile_value_array(field.type(), field_type_info, len, stride, + field_start, obj_words, ts)); + } else if (field.is_dynamic()) { + throw std::runtime_error( + fmt::format("Dynamic value field {} in static data type {} not yet implemented", + field.name(), actual_type.print())); + } else { + { + if (field.type().base_type() == "pointer") { + if (obj_words.at(field_start / 4).kind() != LinkedWord::SYM_PTR) { + continue; + } + + if (obj_words.at(field_start / 4).symbol_name() != "#f") { + lg::warn("Got a weird symbol in a pointer field: {}", + obj_words.at(field_start / 4).symbol_name()); + continue; + } + + field_defs_out.emplace_back(field.name(), pretty_print::to_symbol("#f")); + + } else { + if (obj_words.at(field_start / 4).kind() != LinkedWord::PLAIN_DATA) { + continue; + } + std::vector bytes_out; + for (int byte_idx = field_start; byte_idx < field_end; byte_idx++) { + bytes_out.push_back(obj_words.at(byte_idx / 4).get_byte(byte_idx % 4)); + } + field_defs_out.emplace_back(field.name(), + decompile_value(field.type(), bytes_out, ts)); + } + } + } + + } else { + if (!field.is_dynamic() && !field.is_array() && field.is_inline()) { + // inline structure! DecompilerLabel fake_label; fake_label.target_segment = label.target_segment; // offset from real start of outer + field offset + tag, we want to fake that. - fake_label.offset = - offset_location + field.offset() + field_type_info->get_offset() + stride * elt; - fake_label.name = - fmt::format("fake-label-{}-{}-elt-{}", actual_type.print(), field.name(), elt); - array_def.push_back( + fake_label.offset = offset_location + field.offset() + field_type_info->get_offset(); + fake_label.name = fmt::format("fake-label-{}-{}", actual_type.print(), field.name()); + field_defs_out.emplace_back( + field.name(), decompile_at_label(field.type(), fake_label, labels, words, ts, file, version)); - } - field_defs_out.emplace_back(field.name(), pretty_print::build_list(array_def)); - } else if (!field.is_dynamic() && field.is_array() && !field.is_inline()) { - auto len = field.array_size(); - auto total_size = ts.get_size_in_type(field); - auto stride = total_size / len; - ASSERT(stride * len == total_size); - ASSERT(stride == 4); + } else if (!field.is_dynamic() && field.is_array() && field.is_inline()) { + // it's an inline array. let's figure out the len and stride + auto len = field.array_size(); + auto total_size = ts.get_size_in_type(field); + auto stride = total_size / len; + ASSERT(stride * len == total_size); + ASSERT(stride == align(field_type_info->get_size_in_memory(), + field_type_info->get_inline_array_stride_alignment())); - std::vector array_def = {pretty_print::to_symbol( - fmt::format("new 'static 'array {} {}", field.type().print(), field.array_size()))}; - - int end_elt = 0; - for (int elt = len; elt-- > 0;) { - auto& word = obj_words.at((field_start / 4) + elt); - if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) { - continue; + std::vector array_def = {pretty_print::to_symbol(fmt::format( + "new 'static 'inline-array {} {}", field.type().print(), field.array_size()))}; + for (int elt = 0; elt < len; elt++) { + DecompilerLabel fake_label; + fake_label.target_segment = label.target_segment; + // offset from real start of outer + field offset + tag, we want to fake that. + fake_label.offset = + offset_location + field.offset() + field_type_info->get_offset() + stride * elt; + fake_label.name = + fmt::format("fake-label-{}-{}-elt-{}", actual_type.print(), field.name(), elt); + array_def.push_back( + decompile_at_label(field.type(), fake_label, labels, words, ts, file, version)); } - end_elt = elt + 1; - break; - } + field_defs_out.emplace_back(field.name(), pretty_print::build_list(array_def)); + } else if (!field.is_dynamic() && field.is_array() && !field.is_inline()) { + auto len = field.array_size(); + auto total_size = ts.get_size_in_type(field); + auto stride = total_size / len; + ASSERT(stride * len == total_size); + ASSERT(stride == 4); - for (int elt = 0; elt < end_elt; elt++) { - auto& word = obj_words.at((field_start / 4) + elt); + int offset = field_start + offset_location; + auto array_def = + decompile_ref_array(field.type(), field.array_size(), label.target_segment, offset, + labels, words, ts, file, version, &field, &actual_type); + + field_defs_out.emplace_back(field.name(), array_def); + + } else if (field.is_dynamic() || field.is_array() || field.is_inline()) { + throw std::runtime_error(fmt::format( + "Dynamic/array/inline reference field {} type {} in static data not yet implemented", + field.name(), actual_type.print())); + } else { + // then we expect a label. + ASSERT(field_end - field_start == 4); + auto& word = obj_words.at(field_start / 4); if (word.kind() == LinkedWord::PTR) { - array_def.push_back(decompile_at_label(field.type(), labels.at(word.label_id()), labels, + if (field.type() == TypeSpec("symbol")) { + continue; + } + if (field.type() == TypeSpec("object")) { + field_defs_out.emplace_back( + field.name(), decompile_at_label_guess_type(labels.at(word.label_id()), labels, + words, ts, file, version)); + } else { + field_defs_out.emplace_back( + field.name(), decompile_at_label(field.type(), labels.at(word.label_id()), labels, words, ts, file, version)); + } } else if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) { // do nothing, the default is zero? - array_def.push_back(pretty_print::to_symbol("0")); + field_defs_out.emplace_back(field.name(), pretty_print::to_symbol("0")); } else if (word.kind() == LinkedWord::SYM_PTR) { if (word.symbol_name() == "#f" || word.symbol_name() == "#t") { - array_def.push_back(pretty_print::to_symbol(fmt::format("{}", word.symbol_name()))); + field_defs_out.emplace_back( + field.name(), pretty_print::to_symbol(fmt::format("{}", word.symbol_name()))); } else { - array_def.push_back(pretty_print::to_symbol(fmt::format("'{}", word.symbol_name()))); + field_defs_out.emplace_back( + field.name(), pretty_print::to_symbol(fmt::format("'{}", word.symbol_name()))); } } else if (word.kind() == LinkedWord::EMPTY_PTR) { - array_def.push_back(pretty_print::to_symbol("'()")); + field_defs_out.emplace_back(field.name(), pretty_print::to_symbol("'()")); + } else if (word.kind() == LinkedWord::TYPE_PTR) { + if (field.type() != TypeSpec("type")) { + throw std::runtime_error(fmt::format( + "Field {} in type {} offset {} had a reference to type {}, but the " + "type of the field is not type.", + field.name(), actual_type.print(), field.offset(), word.symbol_name())); + } + int method_count = ts.get_type_method_count(word.symbol_name()); + field_defs_out.emplace_back(field.name(), pretty_print::to_symbol(fmt::format( + "(type-ref {} :method-count {})", + word.symbol_name(), method_count))); } else { - 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)); - - } else if (field.is_dynamic() || field.is_array() || field.is_inline()) { - throw std::runtime_error(fmt::format( - "Dynamic/array/inline reference field {} type {} in static data not yet implemented", - field.name(), actual_type.print())); - } else { - // then we expect a label. - ASSERT(field_end - field_start == 4); - auto& word = obj_words.at(field_start / 4); - - if (word.kind() == LinkedWord::PTR) { - if (field.type() == TypeSpec("symbol")) { - continue; - } - if (field.type() == TypeSpec("object")) { - field_defs_out.emplace_back( - field.name(), - decompile_at_label_guess_type(labels.at(word.label_id()), labels, words, ts, file, version)); - } else { - field_defs_out.emplace_back( - field.name(), decompile_at_label(field.type(), labels.at(word.label_id()), labels, - words, ts, file, version)); - } - } else if (word.kind() == LinkedWord::PLAIN_DATA && word.data == 0) { - // do nothing, the default is zero? - field_defs_out.emplace_back(field.name(), pretty_print::to_symbol("0")); - } else if (word.kind() == LinkedWord::SYM_PTR) { - if (word.symbol_name() == "#f" || word.symbol_name() == "#t") { - field_defs_out.emplace_back( - field.name(), pretty_print::to_symbol(fmt::format("{}", word.symbol_name()))); - } else { - field_defs_out.emplace_back( - field.name(), pretty_print::to_symbol(fmt::format("'{}", word.symbol_name()))); - } - } else if (word.kind() == LinkedWord::EMPTY_PTR) { - field_defs_out.emplace_back(field.name(), pretty_print::to_symbol("'()")); - } else if (word.kind() == LinkedWord::TYPE_PTR) { - if (field.type() != TypeSpec("type")) { throw std::runtime_error( - fmt::format("Field {} in type {} offset {} had a reference to type {}, but the " - "type of the field is not type.", - field.name(), actual_type.print(), field.offset(), word.symbol_name())); + fmt::format("Field {} in type {} offset {} did not have a proper reference", + field.name(), actual_type.print(), field.offset())); } - int method_count = ts.get_type_method_count(word.symbol_name()); - field_defs_out.emplace_back( - field.name(), pretty_print::to_symbol(fmt::format("(type-ref {} :method-count {})", - word.symbol_name(), method_count))); - } else { - throw std::runtime_error( - fmt::format("Field {} in type {} offset {} did not have a proper reference", - field.name(), actual_type.print(), field.offset())); } } } diff --git a/goal_src/jak2/engine/ui/progress/progress-h.gc b/goal_src/jak2/engine/ui/progress/progress-h.gc index c62d9cd212..45a27eccd1 100644 --- a/goal_src/jak2/engine/ui/progress/progress-h.gc +++ b/goal_src/jak2/engine/ui/progress/progress-h.gc @@ -76,8 +76,8 @@ ((name game-text-id :offset-assert 4) (scale float :offset-assert 8) (unknown function :offset-assert 12) + (unknown-symbol symbol :offset 8) (box hud-box 1 :inline :offset-assert 16) - (options menu-option 8 :offset 16) ) :method-count-assert 12 :size-assert #x30 @@ -428,10 +428,10 @@ (deftype menu-option-list (basic) - ((y-center int32 :offset-assert 4) - (y-space int32 :offset-assert 8) - (scale float :offset-assert 12) - (options menu-option :dynamic :offset-assert 16) + ((y-center int32 :offset-assert 4) + (y-space int32 :offset-assert 8) + (scale float :offset-assert 12) + (options (array menu-option) :dynamic :offset-assert 16) ) :method-count-assert 9 :size-assert #x10 diff --git a/goal_src/jak2/engine/ui/progress/progress-static.gc b/goal_src/jak2/engine/ui/progress/progress-static.gc index 1a05dde8c8..4c250d0faf 100644 --- a/goal_src/jak2/engine/ui/progress/progress-static.gc +++ b/goal_src/jak2/engine/ui/progress/progress-static.gc @@ -7,6 +7,7 @@ ;; DECOMP BEGINS +;; failed to figure out what this is: (let ((a0-0 (new 'static 'skeleton-group :name "skel-hud-ring" :extra #f @@ -24,6 +25,7 @@ (add-to-loading-level a0-0) ) +;; failed to figure out what this is: (let ((a0-1 (new 'static 'skeleton-group :name "skel-hud-ring-part" :extra #f @@ -41,124 +43,1019 @@ (add-to-loading-level a0-1) ) -(define *main-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *main-options*, type menu-option-list +(define *main-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-missions) + :unknown-symbol #t + :next-state 'missions + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-show-map) + :unknown-symbol #t + :next-state 'bigmap + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-highscores) + :unknown-symbol #t + :next-state 'highscores + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-game-options) + :unknown-symbol #t + :next-state 'game-options + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-graphic-options) + :unknown-symbol #t + :next-state 'graphic-options + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-sound-options) + :unknown-symbol #t + :next-state 'sound-options + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-load-game) + :unknown-symbol #t + :next-state 'select-load + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-save-game) + :unknown-symbol #t + :next-state 'select-save + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-secrets) + :unknown-symbol #t + :next-state 'secret + ) + (new 'static 'menu-main-menu-option + :name (game-text-id text-x173) + :unknown-symbol #t + :next-state 'quit-restart + ) + ) + ) + ) + ) -(define *main-options-debug* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *main-options-debug*, type menu-option-list +(define *main-options-debug* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-main-menu-option + :name (game-text-id text-x135) + :unknown-symbol #t + :next-state 'select-start + ) + (new 'static 'menu-main-menu-option + :name (game-text-id text-x16a) + :unknown-symbol #t + :next-state 'select-pre-start + ) + (new 'static 'menu-main-menu-option + :name (game-text-id text-x16b) + :unknown-symbol #t + :next-state 'select-kiosk-start + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-1) + :unknown-symbol #t + :next-state 'select-scene + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-2) + :unknown-symbol #t + :next-state 'select-scene + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-3) + :unknown-symbol #t + :next-state 'select-scene + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-load-game) + :unknown-symbol #t + :next-state 'select-load + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-save-game) + :unknown-symbol #t + :next-state 'select-save + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-secrets) + :unknown-symbol #t + :next-state 'unlocked-secrets + ) + (new 'static 'menu-main-menu-option :name (game-text-id progress-back) :unknown-symbol #t :next-state 'back) + ) + ) + ) + ) -(define *main-kiosk-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *main-kiosk-options*, type menu-option-list +(define *main-kiosk-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-restart-mission) + :unknown-symbol #t + :next-state 'restart + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-missions) + :unknown-symbol #t + :next-state 'missions + ) + (new 'static 'menu-main-menu-option :name (game-text-id progress-back) :unknown-symbol #t :next-state 'back) + ) + ) + ) + ) -(define *main-demo-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *main-demo-options*, type menu-option-list +(define *main-demo-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-main-menu-option + :name (game-text-id progress-demo-exit) + :unknown-symbol #t + :next-state 'back + ) + (new 'static 'menu-main-menu-option :name (game-text-id progress-back) :unknown-symbol #t :next-state 'back) + ) + ) + ) + ) -(define *title* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *title*, type menu-option-list +(define *title* (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-title-new-game) + :unknown-symbol #t + :next-state 'select-save-title + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-load-game) + :unknown-symbol #t + :next-state 'select-load + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-title-options) + :unknown-symbol #t + :next-state 'title-options + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-root-secrets) + :unknown-symbol #t + :next-state 'unlocked-secrets + ) + ) + ) + ) + ) -(define *unlocked-secrets* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *unlocked-secrets*, type menu-option-list +(define *unlocked-secrets* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-scrapbook) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-mega-scrapbook) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-1) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-2) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-3) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-hero-mode) + :unknown-symbol #f + :next-state 'select-save-title + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-levelselect) + :unknown-symbol #f + :next-state 'select-start + ) + ) + ) + ) + ) -(define *options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *options*, type menu-option-list +(define *options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-root-game-options) + :unknown-symbol #t + :next-state 'game-options + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-root-graphic-options) + :unknown-symbol #t + :next-state 'graphic-options + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-root-sound-options) + :unknown-symbol #t + :next-state 'sound-options + ) + ) + ) + ) + ) -(define *game-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *game-options*, type menu-option-list +(define *game-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-on-off-game-vibrations-option :name (game-text-id text-x10b) :unknown-symbol #t) + (new 'static 'menu-on-off-game-subtitles-option :name (game-text-id text-x16d) :unknown-symbol #t) + (new 'static 'menu-subtitle-language-game-option :name (game-text-id text-x102) :unknown-symbol #t) + (new 'static 'menu-language-game-option :name (game-text-id text-x10a) :unknown-symbol #t) + (new 'static 'menu-sub-menu-game-option + :name (game-text-id progress-back) + :unknown-symbol #t + :next-state 'back + ) + ) + ) + ) + ) -(define *game-options-japan* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *game-options-japan*, type menu-option-list +(define *game-options-japan* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-on-off-game-vibrations-option :name (game-text-id text-x10b) :unknown-symbol #t) + (new 'static 'menu-sub-menu-game-option + :name (game-text-id progress-back) + :unknown-symbol #t + :next-state 'back + ) + ) + ) + ) + ) -(define *game-options-demo* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *game-options-demo*, type menu-option-list +(define *game-options-demo* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-on-off-option :name (game-text-id text-x10b) :unknown-symbol #t) + (new 'static 'menu-on-off-option :name (game-text-id text-x10c) :unknown-symbol #t) + (new 'static 'menu-sub-menu-option :name (game-text-id progress-back) :unknown-symbol #t :next-state 'back) + ) + ) + ) + ) -(define *graphic-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *graphic-options*, type menu-option-list +(define *graphic-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-center-screen-graphic-option :name (game-text-id text-x10d) :unknown-symbol #t) + (new 'static 'menu-aspect-ratio-option :name (game-text-id progress-aspect-ratio) :unknown-symbol #t) + (new 'static 'menu-on-off-progressive-scan-graphic-option + :name (game-text-id progress-progressive-scan) + :unknown-symbol #t + ) + ) + ) + ) + ) -(define *graphic-title-options-pal* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *graphic-title-options-pal*, type menu-option-list +(define *graphic-title-options-pal* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-center-screen-graphic-option :name (game-text-id text-x10d) :unknown-symbol #t) + (new 'static 'menu-aspect-ratio-option :name (game-text-id progress-aspect-ratio) :unknown-symbol #t) + (new 'static 'menu-on-off-progressive-scan-graphic-option + :name (game-text-id progress-progressive-scan) + :unknown-symbol #t + ) + (new 'static 'menu-video-mode-option :name (game-text-id progress-video-mode) :unknown-symbol #t) + ) + ) + ) + ) -(define *sound-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *sound-options*, type menu-option-list +(define *sound-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-slider-option :name (game-text-id text-x107) :unknown-symbol #t) + (new 'static 'menu-slider-option :name (game-text-id progress-sound-music-volume) :unknown-symbol #t) + (new 'static 'menu-slider-option :name (game-text-id progress-sound-speech-volume) :unknown-symbol #t) + (new 'static 'menu-stereo-mode-sound-option :name (game-text-id text-x103) :unknown-symbol #t) + ) + ) + ) + ) -(define *quit-restart-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *quit-restart-options*, type menu-option-list +(define *quit-restart-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-restart-mission-qr-option + :name (game-text-id progress-root-restart-mission) + :unknown-symbol #t + ) + (new 'static 'menu-quit-qr-option :name (game-text-id progress-quit) :unknown-symbol #t) + ) + ) + ) + ) -(define *load-save-options* (new 'static 'menu-option-list :y-center #xdc :y-space 30 :scale 0.82)) +;; definition for symbol *load-save-options*, type menu-option-list +(define *load-save-options* + (new 'static 'menu-option-list + :y-center #xdc + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + ) + ) + ) + ) -(define *save-options-title* (new 'static 'menu-option-list :y-center #xdc :y-space 30 :scale 0.82)) +;; definition for symbol *save-options-title*, type menu-option-list +(define *save-options-title* + (new 'static 'menu-option-list + :y-center #xdc + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-continue-without-saving) + :unknown-symbol #f + :next-state 'continue + ) + ) + ) + ) + ) -(define *loading-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *loading-options*, type menu-option-list +(define *loading-options* (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-loading-option)) + ) + ) + ) -(define *insufficient-space-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *insufficient-space-options*, type menu-option-list +(define *insufficient-space-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-insufficient-space-option)) + ) + ) + ) +;; definition for symbol *secrets-insufficient-space-options*, type menu-option-list (define *secrets-insufficient-space-options* - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-secrets-insufficient-space-option)) + ) + ) ) -(define *insert-card-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *insert-card-options*, type menu-option-list +(define *insert-card-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-insert-card-option)) + ) + ) + ) -(define *error-loading-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *error-loading-options*, type menu-option-list +(define *error-loading-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-error-loading-option)) + ) + ) + ) -(define *error-auto-saving-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *error-auto-saving-options*, type menu-option-list +(define *error-auto-saving-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-error-auto-saving-option)) + ) + ) + ) -(define *card-removed-options* (new 'static 'menu-option-list :y-center #x104 :y-space 30 :scale 0.82)) +;; definition for symbol *card-removed-options*, type menu-option-list +(define *card-removed-options* + (new 'static 'menu-option-list + :y-center #x104 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-card-removed-option)) + ) + ) + ) -(define *error-disc-removed-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *error-disc-removed-options*, type menu-option-list +(define *error-disc-removed-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-error-disc-removed-option)) + ) + ) + ) -(define *error-reading-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *error-reading-options*, type menu-option-list +(define *error-reading-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-error-reading-option)) + ) + ) + ) -(define *icon-info-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *icon-info-options*, type menu-option-list +(define *icon-info-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-icon-info-option)) + ) + ) + ) -(define *format-card-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *format-card-options*, type menu-option-list +(define *format-card-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-format-card-option)) + ) + ) + ) -(define *already-exists-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *already-exists-options*, type menu-option-list +(define *already-exists-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-already-exists-option)) + ) + ) + ) -(define *create-game-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *create-game-options*, type menu-option-list +(define *create-game-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-create-game-option)) + ) + ) + ) -(define *video-mode-warning-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *video-mode-warning-options*, type menu-option-list +(define *video-mode-warning-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-video-mode-warning-option)) + ) + ) + ) -(define *video-mode-ok-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *video-mode-ok-options*, type menu-option-list +(define *video-mode-ok-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-video-mode-ok-option)) + ) + ) + ) +;; definition for symbol *progressive-mode-warning-options*, type menu-option-list (define *progressive-mode-warning-options* - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-progressive-mode-warning-option)) + ) + ) ) -(define *progressive-mode-ok-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *progressive-mode-ok-options*, type menu-option-list +(define *progressive-mode-ok-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-progressive-mode-ok-option)) + ) + ) + ) -(define *quit-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *quit-options*, type menu-option-list +(define *quit-options* (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-quit-option)) + ) + ) + ) +;; definition for symbol *select-start-options*, type menu-option-list (define *select-start-options* "List of [[menu-select-start-option]]" - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-select-start-option)) + ) + ) ) +;; definition for symbol *select-scene-options*, type menu-option-list (define *select-scene-options* "List of [[menu-select-scene-option]]" - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-select-scene-option)) + ) + ) ) -(define *bigmap-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *bigmap-options*, type menu-option-list +(define *bigmap-options* (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-bigmap-option)) + ) + ) + ) +;; definition for symbol *missions-options*, type menu-option-list (define *missions-options* "List of [[menu-missions-option]]" - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-missions-option :num-pages 2)) + ) + ) ) +;; definition for symbol *highscores-options*, type menu-option-list (define *highscores-options* "List of [[menu-highscores-option]]" - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-highscores-option :num-pages 15 :slide-dir 1.0) + ) + ) + ) ) -(define *secret-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +;; definition for symbol *secret-options*, type menu-option-list +(define *secret-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-secret-option + :num-items 16 + :num-hero-items 16 + :secret-items (new 'static 'boxed-array :type secret-item-option + (new 'static 'secret-item-option + :name (game-text-id text-x155) + :unknown-symbol #t + :cost 5 + :can-toggle #t + :flag #x1 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x156) + :unknown-symbol #t + :cost 15 + :can-toggle #t + :flag #x2 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x165) + :unknown-symbol #t + :cost 30 + :can-toggle #t + :flag #x10000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x166) + :unknown-symbol #t + :cost 45 + :can-toggle #t + :flag #x20000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-scrapbook) + :unknown-symbol #t + :cost 55 + :can-toggle #f + :flag #x200 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-1) + :unknown-symbol #t + :cost 65 + :can-toggle #f + :flag #x20 + :avail-after #x62 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x162) + :unknown-symbol #t + :cost 75 + :can-toggle 'auto + :flag #x1000 + :avail-after #x62 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-2) + :unknown-symbol #t + :cost 95 + :can-toggle #f + :flag #x40 + :avail-after #xaa + ) + (new 'static 'secret-item-option + :name (game-text-id text-x163) + :unknown-symbol #t + :cost #x69 + :can-toggle 'auto + :flag #x2000 + :avail-after #xb1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-3) + :unknown-symbol #t + :cost #x7d + :can-toggle #f + :flag #x80 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x164) + :unknown-symbol #t + :cost #x87 + :can-toggle 'auto + :flag #x4000 + :avail-after #xd3 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-levelselect) + :unknown-symbol #t + :cost #x91 + :can-toggle #f + :flag #x100 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x157) + :unknown-symbol #t + :cost #x9b + :can-toggle #t + :flag #x4 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x161) + :unknown-symbol #t + :cost #xa5 + :can-toggle #t + :flag #x10 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x158) + :unknown-symbol #t + :cost #xaf + :can-toggle #t + :flag #x8 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-hero-mode) + :unknown-symbol #t + :cost #xc8 + :can-toggle #f + :flag #x8000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x155) + :unknown-symbol #t + :cost 5 + :can-toggle #t + :flag #x1 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x156) + :unknown-symbol #t + :cost 15 + :can-toggle #t + :flag #x2 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x157) + :unknown-symbol #t + :cost 20 + :can-toggle #t + :flag #x4 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x161) + :unknown-symbol #t + :cost 25 + :can-toggle #t + :flag #x10 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x158) + :unknown-symbol #t + :cost 30 + :can-toggle #t + :flag #x8 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x165) + :unknown-symbol #t + :cost 35 + :can-toggle #t + :flag #x10000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x166) + :unknown-symbol #t + :cost 40 + :can-toggle #t + :flag #x20000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-scrapbook) + :unknown-symbol #t + :cost 55 + :can-toggle #f + :flag #x200 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-1) + :unknown-symbol #t + :cost 65 + :can-toggle #f + :flag #x20 + :avail-after #x62 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x162) + :unknown-symbol #t + :cost 75 + :can-toggle 'auto + :flag #x1000 + :avail-after #x62 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-2) + :unknown-symbol #t + :cost 95 + :can-toggle #f + :flag #x40 + :avail-after #xaa + ) + (new 'static 'secret-item-option + :name (game-text-id text-x163) + :unknown-symbol #t + :cost #x69 + :can-toggle 'auto + :flag #x2000 + :avail-after #xb1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-3) + :unknown-symbol #t + :cost #x7d + :can-toggle #f + :flag #x80 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x164) + :unknown-symbol #t + :cost #x87 + :can-toggle 'auto + :flag #x4000 + :avail-after #xd3 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-levelselect) + :unknown-symbol #t + :cost #x91 + :can-toggle #f + :flag #x100 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-mega-scrapbook) + :unknown-symbol #t + :cost #xc8 + :can-toggle #f + :flag #x400 + :avail-after #x1 + ) + ) + ) + ) + ) + ) + ) +;; 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 uint32 #x111 #x112 #x113 #x114 #x115 #x117 #x116 #x30b) ) ) +;; definition for symbol *stereo-mode-name-remap*, type (array game-text-id) (define *stereo-mode-name-remap* (the-as (array game-text-id) (new 'static 'boxed-array :type uint32 #x104 #x105 #x106)) ) +;; definition for symbol *hud-ring-graphic-remap*, type (array uint64) (define *hud-ring-graphic-remap* (new 'static 'boxed-array :type uint64 #x80 #x40 #x10 #x4 #x8 #x400 #x20 #x100 #x200 #x2) ) +;; definition for symbol *hud-ring-kiosk-graphic-remap*, type (array uint64) (define *hud-ring-kiosk-graphic-remap* (new 'static 'boxed-array :type uint64 #x40 #x80 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200) ) +;; definition for symbol *hud-ring-demo-graphic-remap*, type (array uint64) (define *hud-ring-demo-graphic-remap* (new 'static 'boxed-array :type uint64 #x80 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200 #x200) ) +;; definition of type hud-scene-info (deftype hud-scene-info (basic) ((name string :offset-assert 4) (continue string :offset-assert 8) @@ -172,7 +1069,22 @@ :flag-assert #x900000014 ) +;; definition for method 3 of type hud-scene-info +(defmethod inspect hud-scene-info ((obj hud-scene-info)) + (when (not obj) + (set! obj obj) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~1Tname: ~A~%" (-> obj name)) + (format #t "~1Tcontinue: ~A~%" (-> obj continue)) + (format #t "~1Tinfo: ~A~%" (-> obj info)) + (format #t "~1Ttext: ~D~%" (-> obj text)) + (label cfg-4) + obj + ) +;; definition for symbol *hud-select-scene-act1*, type (array hud-scene-info) (define *hud-select-scene-act1* (new 'static 'boxed-array :type hud-scene-info (new 'static 'hud-scene-info @@ -454,6 +1366,7 @@ ) ) +;; definition for symbol *hud-select-scene-act2*, type (array hud-scene-info) (define *hud-select-scene-act2* (new 'static 'boxed-array :type hud-scene-info (new 'static 'hud-scene-info @@ -682,6 +1595,7 @@ ) ) +;; definition for symbol *hud-select-scene-act3*, type (array hud-scene-info) (define *hud-select-scene-act3* (new 'static 'boxed-array :type hud-scene-info (new 'static 'hud-scene-info diff --git a/goal_src/jak2/engine/ui/progress/progress.gc b/goal_src/jak2/engine/ui/progress/progress.gc index e2282ebe24..96e0ba1c5d 100644 --- a/goal_src/jak2/engine/ui/progress/progress.gc +++ b/goal_src/jak2/engine/ui/progress/progress.gc @@ -5,10 +5,9 @@ ;; name in dgo: progress ;; dgos: ENGINE, GAME -(set! *progress-process* #f) - ;; DECOMP BEGINS +;; definition of type progress-global-state (deftype progress-global-state (basic) ((aspect-ratio-choice symbol :offset-assert 4) (video-mode-choice symbol :offset-assert 8) @@ -63,19 +62,25 @@ :flag-assert #x9000000e8 ) - +;; definition for symbol *progress-stack*, type (pointer uint8) (define *progress-stack* (the-as (pointer uint8) (malloc 'global #x3800))) +;; definition for symbol *progress-process*, type (pointer progress) (define *progress-process* (the-as (pointer progress) #f)) +;; definition for symbol *progress-state*, type progress-global-state (define *progress-state* (new 'static 'progress-global-state :which-slot -1 :last-slot-saved -1)) +;; failed to figure out what this is: (kmemopen global "mc-slot-info") +;; definition for symbol *progress-save-info*, type mc-slot-info (define *progress-save-info* (new 'global 'mc-slot-info)) +;; failed to figure out what this is: (kmemclose) +;; definition for function min-max-wrap-around (defun min-max-wrap-around ((arg0 int) (arg1 int) (arg2 int)) (let ((v1-2 (+ (- 1 arg1) arg2))) (while (< arg0 arg1) @@ -88,6 +93,7 @@ arg0 ) +;; definition for function progress-intro-start (defun progress-intro-start ((arg0 symbol)) (set! (-> *game-info* mode) 'play) (if arg0 @@ -98,6 +104,7 @@ 0 ) +;; definition for method 24 of type progress (defmethod init-defaults progress ((obj progress)) "Initialize default menu settings." (set! (-> *progress-state* aspect-ratio-choice) (get-aspect-ratio)) @@ -203,6 +210,7 @@ (set-setting-by-param *setting-control* 'extra-bank '((force2 menu1)) 0 0) ) +;; definition of type hud-ring-cell (deftype hud-ring-cell (process-drawable) ((parent-override (pointer progress) :offset 16) (joint-idx int32 :offset-assert 200) @@ -218,7 +226,24 @@ ) ) +;; definition for method 3 of type hud-ring-cell +(defmethod inspect hud-ring-cell ((obj hud-ring-cell)) + (when (not obj) + (set! obj obj) + (goto cfg-4) + ) + (let ((t9-0 (method-of-type process-drawable inspect))) + (t9-0 obj) + ) + (format #t "~2Tjoint-idx: ~D~%" (-> obj joint-idx)) + (format #t "~2Tinit-angle: ~f~%" (-> obj init-angle)) + (format #t "~2Tgraphic-index: ~D~%" (-> obj graphic-index)) + (label cfg-4) + obj + ) +;; definition for function hud-ring-cell-init-by-other +;; INFO: Used lq/sq (defbehavior hud-ring-cell-init-by-other hud-ring-cell ((arg0 int) (arg1 float) (arg2 int)) (set! (-> self root) (new 'process 'trsqv)) (initialize-skeleton @@ -287,6 +312,7 @@ (go-virtual idle) ) +;; failed to figure out what this is: (defstate idle (hud-ring-cell) :virtual #t :code (behavior () @@ -377,6 +403,7 @@ ) ) +;; definition for function progress-init-by-other (defbehavior progress-init-by-other progress ((arg0 symbol)) (hide-hud #f) (disable-level-text-file-loading) @@ -437,6 +464,8 @@ (go-virtual come-in) ) +;; definition for function set-ring-position +;; INFO: Used lq/sq (defun set-ring-position ((arg0 progress)) (let ((s3-0 (new-stack-vector0)) (s4-0 (new 'stack-no-clear 'vector)) @@ -460,6 +489,8 @@ ) ) +;; definition for function activate-progress +;; WARN: Return type mismatch int vs none. (defun activate-progress ((arg0 process) (arg1 symbol)) (when *target* (when (progress-allowed?) @@ -492,6 +523,7 @@ (none) ) +;; definition for method 10 of type progress (defmethod deactivate progress ((obj progress)) (remove-setting-by-arg0 *setting-control* 'extra-bank) ((method-of-object *bigmap* bigmap-method-15)) @@ -504,6 +536,8 @@ (none) ) +;; definition for function deactivate-progress +;; WARN: Return type mismatch int vs none. (defun deactivate-progress () (if *progress-process* (deactivate (-> *progress-process* 0)) @@ -512,6 +546,8 @@ (none) ) +;; definition for function hide-progress-screen +;; WARN: Return type mismatch int vs none. (defun hide-progress-screen () (if (and *progress-process* *progress-state* (!= (-> *progress-state* starting-state) 'title)) (set-next-state (-> *progress-process* 0) 'go-away 0) @@ -520,6 +556,7 @@ (none) ) +;; definition for method 26 of type progress (defmethod progress-method-26 progress ((obj progress)) (and *progress-process* (-> *progress-process* 0 next-state) @@ -527,6 +564,7 @@ ) ) +;; definition for function progress-allowed? (defun progress-allowed? () (not (or (-> *setting-control* user-current talking) (-> *setting-control* user-current movie) @@ -552,6 +590,7 @@ ) ) +;; definition for method 27 of type progress (defmethod can-go-back? progress ((obj progress)) (and (= (-> obj menu-transition) 0.0) (not (-> obj selected-option)) @@ -576,6 +615,7 @@ ) ) +;; definition for function menu-update-purchase-secrets ;; WARN: Return type mismatch symbol vs none. (defun menu-update-purchase-secrets ((arg0 menu-secret-option)) (let* ((a1-1 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) @@ -610,6 +650,7 @@ (none) ) +;; definition for method 28 of type progress (defmethod progress-method-28 progress ((obj progress) (arg0 symbol)) (let ((v1-0 *progress-save-info*) (v0-0 arg0) @@ -707,6 +748,7 @@ ) ) +;; definition for method 29 of type progress (defmethod progress-method-29 progress ((obj progress)) (let ((v1-0 (-> obj state-pos))) (cond @@ -723,6 +765,7 @@ 0 ) +;; definition for method 30 of type progress (defmethod progress-method-30 progress ((obj progress)) (let ((v1-0 (-> obj state-pos))) (cond @@ -746,6 +789,7 @@ 0 ) +;; definition for method 31 of type progress (defmethod set-next-state progress ((obj progress) (arg0 symbol) (arg1 int)) "Set the next menu state specified by arg0 at the index specified by arg1." (set! (-> *progress-state* clear-screen) #f) @@ -792,6 +836,7 @@ 0 ) +;; definition for method 32 of type progress (defmethod set-menu-options progress ((obj progress) (arg0 symbol)) "Set the menu options for the menu state specified by arg0." (set! (-> obj current-options) #f) @@ -999,13 +1044,15 @@ 0 ) +;; definition for method 25 of type progress +;; WARN: Return type mismatch int vs none. (defmethod progress-method-25 progress ((obj progress)) (mc-get-slot-info 0 *progress-save-info*) (when (-> obj current-options) (let ((s5-0 (-> obj current-options options 0))) (when (and s5-0 (= (-> obj menu-transition) 0.0)) (respond-progress - (the-as menu-option (-> s5-0 options (-> obj option-index))) + (the-as menu-option (-> s5-0 (-> obj option-index))) obj (and (= (-> obj menu-transition) 0.0) (-> obj selected-option)) ) @@ -1094,6 +1141,8 @@ (none) ) +;; definition for function progress-trans +;; WARN: Return type mismatch int vs none. (defbehavior progress-trans progress () (cond ((and (= (-> self next) 'none) @@ -1277,6 +1326,7 @@ (none) ) +;; definition for function begin-scan (defun begin-scan ((arg0 hud-box) (arg1 progress)) (cond ((or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap)) @@ -1311,6 +1361,7 @@ 0 ) +;; definition for function end-scan (defun end-scan ((arg0 hud-box) (arg1 float)) (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) (gp-0 (-> s5-0 base)) @@ -1334,6 +1385,24 @@ 0 ) +;; definition for function progress-post +;; INFO: Used lq/sq +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Stack slot offset 148 signed mismatch +;; WARN: Return type mismatch int vs none. (defbehavior progress-post progress () (local-vars (sv-144 font-context) (sv-148 int) (sv-152 hud-box) (sv-156 symbol)) (when (-> self current-options) @@ -1386,7 +1455,7 @@ ) ) (menu-option-method-10 - (-> gp-0 options s4-1) + (-> gp-0 s4-1) self sv-144 s4-1 @@ -1442,6 +1511,7 @@ (none) ) +;; failed to figure out what this is: (defstate come-in (progress) :virtual #t :enter (behavior () @@ -1486,6 +1556,7 @@ :post (the-as (function none :behavior progress) ja-post) ) +;; failed to figure out what this is: (defstate idle (progress) :virtual #t :event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block)) @@ -1708,6 +1779,7 @@ :post progress-post ) +;; failed to figure out what this is: (defstate go-away (progress) :virtual #t :enter (behavior () @@ -1751,6 +1823,7 @@ :post (the-as (function none :behavior progress) ja-post) ) +;; failed to figure out what this is: (defstate gone (progress) :virtual #t :code (behavior () @@ -1768,11 +1841,13 @@ ) ) +;; definition for method 9 of type menu-option (defmethod respond-progress menu-option ((obj menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." 0 ) +;; definition for method 9 of type menu-on-off-option (defmethod respond-progress menu-on-off-option ((obj menu-on-off-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* on-off-choice)) @@ -1823,6 +1898,7 @@ 0 ) +;; definition for method 9 of type menu-yes-no-option (defmethod respond-progress menu-yes-no-option ((obj menu-yes-no-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -1864,6 +1940,7 @@ 0 ) +;; definition for method 9 of type menu-slider-option (defmethod respond-progress menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (-> *bigmap* progress-minimap) @@ -1946,6 +2023,7 @@ 0 ) +;; definition for method 9 of type menu-stereo-mode-sound-option (defmethod respond-progress menu-stereo-mode-sound-option ((obj menu-stereo-mode-sound-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (-> *bigmap* progress-minimap) @@ -1984,6 +2062,7 @@ 0 ) +;; definition for method 9 of type menu-main-menu-option (defmethod respond-progress menu-main-menu-option ((obj menu-main-menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (cond @@ -2079,6 +2158,7 @@ 0 ) +;; definition for method 9 of type menu-sub-menu-option (defmethod respond-progress menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (and (-> *progress-state* secrets-unlocked) @@ -2139,6 +2219,7 @@ 0 ) +;; definition for method 9 of type menu-unlocked-menu-option (defmethod respond-progress menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (memcard-unlocked-secrets? #t))) @@ -2280,6 +2361,7 @@ 0 ) +;; definition for method 9 of type menu-memcard-slot-option (defmethod respond-progress menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (memcard-unlocked-secrets? #t) @@ -2306,12 +2388,12 @@ ) ((= (-> *progress-save-info* file (-> *progress-state* which-slot) present) 1) (set! s5-0 #t) - (menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 box 0 min x))) + (menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 0))) (set-next-state arg0 'already-exists 0) ) (else (set! s5-0 #t) - (menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 box 0 min x))) + (menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 0))) (set-next-state arg0 'saving 0) ) ) @@ -2325,6 +2407,7 @@ 0 ) +;; definition for method 9 of type menu-already-exists-option (defmethod respond-progress menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) @@ -2367,6 +2450,7 @@ 0 ) +;; definition for method 9 of type menu-create-game-option (defmethod respond-progress menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) @@ -2412,6 +2496,7 @@ 0 ) +;; definition for method 9 of type menu-insufficient-space-option (defmethod respond-progress menu-insufficient-space-option ((obj menu-insufficient-space-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s5-0 (&-> *progress-state* yes-no-choice)) @@ -2507,6 +2592,7 @@ 0 ) +;; definition for method 9 of type menu-secrets-insufficient-space-option (defmethod respond-progress menu-secrets-insufficient-space-option ((obj menu-secrets-insufficient-space-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (&-> *progress-state* yes-no-choice) @@ -2525,6 +2611,7 @@ 0 ) +;; definition for method 9 of type menu-video-mode-warning-option (defmethod respond-progress menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2563,6 +2650,7 @@ 0 ) +;; definition for method 9 of type menu-video-mode-ok-option (defmethod respond-progress menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2609,6 +2697,7 @@ 0 ) +;; definition for method 9 of type menu-progressive-mode-warning-option (defmethod respond-progress menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2654,6 +2743,7 @@ 0 ) +;; definition for method 9 of type menu-progressive-mode-ok-option (defmethod respond-progress menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2702,6 +2792,7 @@ 0 ) +;; definition for method 9 of type menu-card-removed-option (defmethod respond-progress menu-card-removed-option ((obj menu-card-removed-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2713,6 +2804,7 @@ 0 ) +;; definition for method 9 of type menu-insert-card-option (defmethod respond-progress menu-insert-card-option ((obj menu-insert-card-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." *progress-save-info* @@ -2730,6 +2822,7 @@ 0 ) +;; definition for method 9 of type menu-error-loading-option (defmethod respond-progress menu-error-loading-option ((obj menu-error-loading-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2741,6 +2834,7 @@ 0 ) +;; definition for method 9 of type menu-error-auto-saving-option (defmethod respond-progress menu-error-auto-saving-option ((obj menu-error-auto-saving-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2752,6 +2846,7 @@ 0 ) +;; definition for method 9 of type menu-error-disc-removed-option (defmethod respond-progress menu-error-disc-removed-option ((obj menu-error-disc-removed-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2765,6 +2860,7 @@ 0 ) +;; definition for method 9 of type menu-error-reading-option (defmethod respond-progress menu-error-reading-option ((obj menu-error-reading-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2776,6 +2872,7 @@ 0 ) +;; definition for method 9 of type menu-icon-info-option (defmethod respond-progress menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (when (logtest? (pad-buttons confirm) (-> *cpad-list* cpads 0 button0-rel 0)) @@ -2787,6 +2884,7 @@ 0 ) +;; definition for method 9 of type menu-quit-option (defmethod respond-progress menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) @@ -2831,6 +2929,7 @@ 0 ) +;; definition for method 9 of type menu-format-card-option (defmethod respond-progress menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) @@ -2875,6 +2974,7 @@ 0 ) +;; definition for method 9 of type menu-select-start-option ;; WARN: disable def twice: 110. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod respond-progress menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." @@ -2975,6 +3075,7 @@ 0 ) +;; definition for method 9 of type menu-select-scene-option (defmethod respond-progress menu-select-scene-option ((obj menu-select-scene-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease @@ -3054,6 +3155,7 @@ 0 ) +;; definition for method 9 of type menu-bigmap-option (defmethod respond-progress menu-bigmap-option ((obj menu-bigmap-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." ((method-of-object *bigmap* bigmap-method-12)) @@ -3062,6 +3164,7 @@ 0 ) +;; definition for method 9 of type menu-missions-option (defmethod respond-progress menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease @@ -3115,6 +3218,7 @@ 0 ) +;; definition for method 9 of type menu-highscores-option (defmethod respond-progress menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (set! (-> arg0 sliding) (seek-ease @@ -3186,6 +3290,7 @@ 0 ) +;; definition for method 9 of type menu-secret-option (defmethod respond-progress menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (let* ((s5-1 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) @@ -3308,6 +3413,7 @@ 0 ) +;; definition for method 9 of type menu-game-option (defmethod respond-progress menu-game-option ((obj menu-game-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (-> *progress-state* game-options-vibrations) @@ -3493,6 +3599,7 @@ 0 ) +;; definition for function update-center-screen (defun update-center-screen () (with-pp (let ((v1-0 #f)) @@ -3547,6 +3654,7 @@ ) ) +;; definition for method 9 of type menu-graphic-option (defmethod respond-progress menu-graphic-option ((obj menu-graphic-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (-> *progress-state* graphic-options-aspect-ratio) @@ -3743,6 +3851,7 @@ 0 ) +;; definition for function update-restart-quit (defun update-restart-quit ((arg0 menu-option) (arg1 progress) (arg2 symbol)) (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -3783,6 +3892,7 @@ 0 ) +;; definition for method 9 of type menu-qr-option (defmethod respond-progress menu-qr-option ((obj menu-qr-option) (arg0 progress) (arg1 object)) "Handle progress menu navigation logic." (-> *progress-state* qr-options-restart) @@ -3920,3 +4030,7 @@ ) 0 ) + + + + diff --git a/goal_src/jak2/engine/ui/text-id-h.gc b/goal_src/jak2/engine/ui/text-id-h.gc index 5e27c31e34..add4d03cea 100644 --- a/goal_src/jak2/engine/ui/text-id-h.gc +++ b/goal_src/jak2/engine/ui/text-id-h.gc @@ -11,8 +11,15 @@ :bitfield #f (null 0) (pause 257) + (text-x102 #x0102) + (text-x103 #x0103) + (text-x107 #x0107) (progress-sound-music-volume 264) (progress-sound-speech-volume 265) + (text-x10a #x010a) + (text-x10b #x010b) + (text-x10c #x010c) + (text-x10d #x010d) (progress-on 270) (progress-off 271) (progress-move-dpad 272) @@ -44,6 +51,7 @@ (progress-title-prompt 306) (progress-quit 307) (progress-root-show-map 308) + (text-x135 #x0135) (progress-root-highscores 310) (progress-highscores-1st 311) (progress-highscores-2nd 312) @@ -55,6 +63,10 @@ (progress-highscores-8th 318) (progress-root-secrets 339) (progress-secrets-unlocked 340) + (text-x155 #x0155) + (text-x156 #x0156) + (text-x157 #x0157) + (text-x158 #x0158) (progress-main-secrets-hero-mode 345) (progress-main-secrets-sceneplayer-1 346) (progress-main-secrets-sceneplayer-2 347) @@ -63,13 +75,25 @@ (progress-main-secrets-mega-scrapbook 350) (progress-main-secrets-scrapbook-3 351) (progress-main-secrets-levelselect 352) + (text-x160 #x0160) + (text-x161 #x0161) + (text-x162 #x0162) + (text-x163 #x0163) + (text-x164 #x0164) + (text-x165 #x0165) + (text-x166 #x0166) + (text-x167 #x0167) (progress-secrets-orb-label 360) (progress-root-missions 361) + (text-x16a #x016a) + (text-x16b #x016b) + (text-x16d #x016d) (progress-root-restart-mission 366) (progress-missions-icon-todo 367) (progress-missions-icon-completed 368) (progress-missions-none 369) (progress-unknown-game 370) + (text-x173 #x0173) (progress-unknown-square-to-reset 377) (progress-unknown-oi1un23i13 380) (progress-unknown-kjanskd 381) diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc index 7598d3ef48..8bb04b254b 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc @@ -90,11 +90,11 @@ ;; definition of type menu-option (deftype menu-option (basic) - ((name game-text-id :offset-assert 4) - (scale float :offset-assert 8) - (unknown function :offset-assert 12) - (box hud-box 1 :inline :offset-assert 16) - (options menu-option 8 :offset 16) + ((name game-text-id :offset-assert 4) + (scale float :offset-assert 8) + (unknown function :offset-assert 12) + (unknown-symbol symbol :offset 8) + (box hud-box 1 :inline :offset-assert 16) ) :method-count-assert 12 :size-assert #x30 @@ -1028,10 +1028,10 @@ ;; definition of type menu-option-list (deftype menu-option-list (basic) - ((y-center int32 :offset-assert 4) - (y-space int32 :offset-assert 8) - (scale float :offset-assert 12) - (options menu-option :dynamic :offset-assert 16) + ((y-center int32 :offset-assert 4) + (y-space int32 :offset-assert 8) + (scale float :offset-assert 12) + (options (array menu-option) :dynamic :offset-assert 16) ) :method-count-assert 9 :size-assert #x10 diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc index a05f802e54..ea67d8db11 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc @@ -38,140 +38,989 @@ ) ;; definition for symbol *main-options*, type menu-option-list -(define *main-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *main-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-missions) + :unknown-symbol #t + :next-state 'missions + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-show-map) + :unknown-symbol #t + :next-state 'bigmap + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-highscores) + :unknown-symbol #t + :next-state 'highscores + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-game-options) + :unknown-symbol #t + :next-state 'game-options + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-graphic-options) + :unknown-symbol #t + :next-state 'graphic-options + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-sound-options) + :unknown-symbol #t + :next-state 'sound-options + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-load-game) + :unknown-symbol #t + :next-state 'select-load + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-save-game) + :unknown-symbol #t + :next-state 'select-save + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-secrets) + :unknown-symbol #t + :next-state 'secret + ) + (new 'static 'menu-main-menu-option + :name (game-text-id text-x173) + :unknown-symbol #t + :next-state 'quit-restart + ) + ) + ) + ) + ) ;; definition for symbol *main-options-debug*, type menu-option-list -(define *main-options-debug* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *main-options-debug* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-main-menu-option + :name (game-text-id text-x135) + :unknown-symbol #t + :next-state 'select-start + ) + (new 'static 'menu-main-menu-option + :name (game-text-id text-x16a) + :unknown-symbol #t + :next-state 'select-pre-start + ) + (new 'static 'menu-main-menu-option + :name (game-text-id text-x16b) + :unknown-symbol #t + :next-state 'select-kiosk-start + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-1) + :unknown-symbol #t + :next-state 'select-scene + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-2) + :unknown-symbol #t + :next-state 'select-scene + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-3) + :unknown-symbol #t + :next-state 'select-scene + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-load-game) + :unknown-symbol #t + :next-state 'select-load + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-save-game) + :unknown-symbol #t + :next-state 'select-save + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-secrets) + :unknown-symbol #t + :next-state 'unlocked-secrets + ) + (new 'static 'menu-main-menu-option :name (game-text-id progress-back) :unknown-symbol #t :next-state 'back) + ) + ) + ) + ) ;; definition for symbol *main-kiosk-options*, type menu-option-list -(define *main-kiosk-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *main-kiosk-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-restart-mission) + :unknown-symbol #t + :next-state 'restart + ) + (new 'static 'menu-main-menu-option + :name (game-text-id progress-root-missions) + :unknown-symbol #t + :next-state 'missions + ) + (new 'static 'menu-main-menu-option :name (game-text-id progress-back) :unknown-symbol #t :next-state 'back) + ) + ) + ) + ) ;; definition for symbol *main-demo-options*, type menu-option-list -(define *main-demo-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *main-demo-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-main-menu-option + :name (game-text-id progress-demo-exit) + :unknown-symbol #t + :next-state 'back + ) + (new 'static 'menu-main-menu-option :name (game-text-id progress-back) :unknown-symbol #t :next-state 'back) + ) + ) + ) + ) ;; definition for symbol *title*, type menu-option-list -(define *title* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *title* (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-title-new-game) + :unknown-symbol #t + :next-state 'select-save-title + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-load-game) + :unknown-symbol #t + :next-state 'select-load + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-title-options) + :unknown-symbol #t + :next-state 'title-options + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-root-secrets) + :unknown-symbol #t + :next-state 'unlocked-secrets + ) + ) + ) + ) + ) ;; definition for symbol *unlocked-secrets*, type menu-option-list -(define *unlocked-secrets* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *unlocked-secrets* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-scrapbook) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-mega-scrapbook) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-1) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-2) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-sceneplayer-3) + :unknown-symbol #f + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-hero-mode) + :unknown-symbol #f + :next-state 'select-save-title + ) + (new 'static 'menu-unlocked-menu-option + :name (game-text-id progress-main-secrets-levelselect) + :unknown-symbol #f + :next-state 'select-start + ) + ) + ) + ) + ) ;; definition for symbol *options*, type menu-option-list -(define *options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-root-game-options) + :unknown-symbol #t + :next-state 'game-options + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-root-graphic-options) + :unknown-symbol #t + :next-state 'graphic-options + ) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-root-sound-options) + :unknown-symbol #t + :next-state 'sound-options + ) + ) + ) + ) + ) ;; definition for symbol *game-options*, type menu-option-list -(define *game-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *game-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-on-off-game-vibrations-option :name (game-text-id text-x10b) :unknown-symbol #t) + (new 'static 'menu-on-off-game-subtitles-option :name (game-text-id text-x16d) :unknown-symbol #t) + (new 'static 'menu-subtitle-language-game-option :name (game-text-id text-x102) :unknown-symbol #t) + (new 'static 'menu-language-game-option :name (game-text-id text-x10a) :unknown-symbol #t) + (new 'static 'menu-sub-menu-game-option + :name (game-text-id progress-back) + :unknown-symbol #t + :next-state 'back + ) + ) + ) + ) + ) ;; definition for symbol *game-options-japan*, type menu-option-list -(define *game-options-japan* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *game-options-japan* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-on-off-game-vibrations-option :name (game-text-id text-x10b) :unknown-symbol #t) + (new 'static 'menu-sub-menu-game-option + :name (game-text-id progress-back) + :unknown-symbol #t + :next-state 'back + ) + ) + ) + ) + ) ;; definition for symbol *game-options-demo*, type menu-option-list -(define *game-options-demo* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *game-options-demo* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-on-off-option :name (game-text-id text-x10b) :unknown-symbol #t) + (new 'static 'menu-on-off-option :name (game-text-id text-x10c) :unknown-symbol #t) + (new 'static 'menu-sub-menu-option :name (game-text-id progress-back) :unknown-symbol #t :next-state 'back) + ) + ) + ) + ) ;; definition for symbol *graphic-options*, type menu-option-list -(define *graphic-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *graphic-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-center-screen-graphic-option :name (game-text-id text-x10d) :unknown-symbol #t) + (new 'static 'menu-aspect-ratio-option :name (game-text-id progress-aspect-ratio) :unknown-symbol #t) + (new 'static 'menu-on-off-progressive-scan-graphic-option + :name (game-text-id progress-progressive-scan) + :unknown-symbol #t + ) + ) + ) + ) + ) ;; definition for symbol *graphic-title-options-pal*, type menu-option-list -(define *graphic-title-options-pal* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *graphic-title-options-pal* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-center-screen-graphic-option :name (game-text-id text-x10d) :unknown-symbol #t) + (new 'static 'menu-aspect-ratio-option :name (game-text-id progress-aspect-ratio) :unknown-symbol #t) + (new 'static 'menu-on-off-progressive-scan-graphic-option + :name (game-text-id progress-progressive-scan) + :unknown-symbol #t + ) + (new 'static 'menu-video-mode-option :name (game-text-id progress-video-mode) :unknown-symbol #t) + ) + ) + ) + ) ;; definition for symbol *sound-options*, type menu-option-list -(define *sound-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *sound-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-slider-option :name (game-text-id text-x107) :unknown-symbol #t) + (new 'static 'menu-slider-option :name (game-text-id progress-sound-music-volume) :unknown-symbol #t) + (new 'static 'menu-slider-option :name (game-text-id progress-sound-speech-volume) :unknown-symbol #t) + (new 'static 'menu-stereo-mode-sound-option :name (game-text-id text-x103) :unknown-symbol #t) + ) + ) + ) + ) ;; definition for symbol *quit-restart-options*, type menu-option-list -(define *quit-restart-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *quit-restart-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-restart-mission-qr-option + :name (game-text-id progress-root-restart-mission) + :unknown-symbol #t + ) + (new 'static 'menu-quit-qr-option :name (game-text-id progress-quit) :unknown-symbol #t) + ) + ) + ) + ) ;; definition for symbol *load-save-options*, type menu-option-list -(define *load-save-options* (new 'static 'menu-option-list :y-center #xdc :y-space 30 :scale 0.82)) +(define *load-save-options* + (new 'static 'menu-option-list + :y-center #xdc + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + ) + ) + ) + ) ;; definition for symbol *save-options-title*, type menu-option-list -(define *save-options-title* (new 'static 'menu-option-list :y-center #xdc :y-space 30 :scale 0.82)) +(define *save-options-title* + (new 'static 'menu-option-list + :y-center #xdc + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 (new 'static 'boxed-array :type menu-option + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-memcard-slot-option) + (new 'static 'menu-sub-menu-option + :name (game-text-id progress-continue-without-saving) + :unknown-symbol #f + :next-state 'continue + ) + ) + ) + ) + ) ;; definition for symbol *loading-options*, type menu-option-list -(define *loading-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *loading-options* (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-loading-option)) + ) + ) + ) ;; definition for symbol *insufficient-space-options*, type menu-option-list -(define *insufficient-space-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *insufficient-space-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-insufficient-space-option)) + ) + ) + ) ;; definition for symbol *secrets-insufficient-space-options*, type menu-option-list (define *secrets-insufficient-space-options* - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-secrets-insufficient-space-option)) + ) + ) ) ;; definition for symbol *insert-card-options*, type menu-option-list -(define *insert-card-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *insert-card-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-insert-card-option)) + ) + ) + ) ;; definition for symbol *error-loading-options*, type menu-option-list -(define *error-loading-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *error-loading-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-error-loading-option)) + ) + ) + ) ;; definition for symbol *error-auto-saving-options*, type menu-option-list -(define *error-auto-saving-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *error-auto-saving-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-error-auto-saving-option)) + ) + ) + ) ;; definition for symbol *card-removed-options*, type menu-option-list -(define *card-removed-options* (new 'static 'menu-option-list :y-center #x104 :y-space 30 :scale 0.82)) +(define *card-removed-options* + (new 'static 'menu-option-list + :y-center #x104 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-card-removed-option)) + ) + ) + ) ;; definition for symbol *error-disc-removed-options*, type menu-option-list -(define *error-disc-removed-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *error-disc-removed-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-error-disc-removed-option)) + ) + ) + ) ;; definition for symbol *error-reading-options*, type menu-option-list -(define *error-reading-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *error-reading-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-error-reading-option)) + ) + ) + ) ;; definition for symbol *icon-info-options*, type menu-option-list -(define *icon-info-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *icon-info-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-icon-info-option)) + ) + ) + ) ;; definition for symbol *format-card-options*, type menu-option-list -(define *format-card-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *format-card-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-format-card-option)) + ) + ) + ) ;; definition for symbol *already-exists-options*, type menu-option-list -(define *already-exists-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *already-exists-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-already-exists-option)) + ) + ) + ) ;; definition for symbol *create-game-options*, type menu-option-list -(define *create-game-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *create-game-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-create-game-option)) + ) + ) + ) ;; definition for symbol *video-mode-warning-options*, type menu-option-list -(define *video-mode-warning-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *video-mode-warning-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-video-mode-warning-option)) + ) + ) + ) ;; definition for symbol *video-mode-ok-options*, type menu-option-list -(define *video-mode-ok-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *video-mode-ok-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-video-mode-ok-option)) + ) + ) + ) ;; definition for symbol *progressive-mode-warning-options*, type menu-option-list (define *progressive-mode-warning-options* - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-progressive-mode-warning-option)) + ) + ) ) ;; definition for symbol *progressive-mode-ok-options*, type menu-option-list -(define *progressive-mode-ok-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *progressive-mode-ok-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-progressive-mode-ok-option)) + ) + ) + ) ;; definition for symbol *quit-options*, type menu-option-list -(define *quit-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *quit-options* (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-quit-option)) + ) + ) + ) ;; definition for symbol *select-start-options*, type menu-option-list (define *select-start-options* "List of [[menu-select-start-option]]" - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-select-start-option)) + ) + ) ) ;; definition for symbol *select-scene-options*, type menu-option-list (define *select-scene-options* "List of [[menu-select-scene-option]]" - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-select-scene-option)) + ) + ) ) ;; definition for symbol *bigmap-options*, type menu-option-list -(define *bigmap-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *bigmap-options* (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-bigmap-option)) + ) + ) + ) ;; definition for symbol *missions-options*, type menu-option-list (define *missions-options* "List of [[menu-missions-option]]" - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-missions-option :num-pages 2)) + ) + ) ) ;; definition for symbol *highscores-options*, type menu-option-list (define *highscores-options* "List of [[menu-highscores-option]]" - (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option + (new 'static 'menu-highscores-option :num-pages 15 :slide-dir 1.0) + ) + ) + ) ) ;; definition for symbol *secret-options*, type menu-option-list -(define *secret-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *secret-options* + (new 'static 'menu-option-list + :y-center #xc6 + :y-space 30 + :scale 0.82 + :options (new 'static 'array (array menu-option) 1 + (new 'static 'boxed-array :type menu-option (new 'static 'menu-secret-option + :num-items 16 + :num-hero-items 16 + :secret-items (new 'static 'boxed-array :type secret-item-option + (new 'static 'secret-item-option + :name (game-text-id text-x155) + :unknown-symbol #t + :cost 5 + :can-toggle #t + :flag #x1 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x156) + :unknown-symbol #t + :cost 15 + :can-toggle #t + :flag #x2 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x165) + :unknown-symbol #t + :cost 30 + :can-toggle #t + :flag #x10000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x166) + :unknown-symbol #t + :cost 45 + :can-toggle #t + :flag #x20000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-scrapbook) + :unknown-symbol #t + :cost 55 + :can-toggle #f + :flag #x200 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-1) + :unknown-symbol #t + :cost 65 + :can-toggle #f + :flag #x20 + :avail-after #x62 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x162) + :unknown-symbol #t + :cost 75 + :can-toggle 'auto + :flag #x1000 + :avail-after #x62 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-2) + :unknown-symbol #t + :cost 95 + :can-toggle #f + :flag #x40 + :avail-after #xaa + ) + (new 'static 'secret-item-option + :name (game-text-id text-x163) + :unknown-symbol #t + :cost #x69 + :can-toggle 'auto + :flag #x2000 + :avail-after #xb1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-3) + :unknown-symbol #t + :cost #x7d + :can-toggle #f + :flag #x80 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x164) + :unknown-symbol #t + :cost #x87 + :can-toggle 'auto + :flag #x4000 + :avail-after #xd3 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-levelselect) + :unknown-symbol #t + :cost #x91 + :can-toggle #f + :flag #x100 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x157) + :unknown-symbol #t + :cost #x9b + :can-toggle #t + :flag #x4 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x161) + :unknown-symbol #t + :cost #xa5 + :can-toggle #t + :flag #x10 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x158) + :unknown-symbol #t + :cost #xaf + :can-toggle #t + :flag #x8 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-hero-mode) + :unknown-symbol #t + :cost #xc8 + :can-toggle #f + :flag #x8000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x155) + :unknown-symbol #t + :cost 5 + :can-toggle #t + :flag #x1 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x156) + :unknown-symbol #t + :cost 15 + :can-toggle #t + :flag #x2 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x157) + :unknown-symbol #t + :cost 20 + :can-toggle #t + :flag #x4 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x161) + :unknown-symbol #t + :cost 25 + :can-toggle #t + :flag #x10 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x158) + :unknown-symbol #t + :cost 30 + :can-toggle #t + :flag #x8 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x165) + :unknown-symbol #t + :cost 35 + :can-toggle #t + :flag #x10000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x166) + :unknown-symbol #t + :cost 40 + :can-toggle #t + :flag #x20000 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-scrapbook) + :unknown-symbol #t + :cost 55 + :can-toggle #f + :flag #x200 + :avail-after #x1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-1) + :unknown-symbol #t + :cost 65 + :can-toggle #f + :flag #x20 + :avail-after #x62 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x162) + :unknown-symbol #t + :cost 75 + :can-toggle 'auto + :flag #x1000 + :avail-after #x62 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-2) + :unknown-symbol #t + :cost 95 + :can-toggle #f + :flag #x40 + :avail-after #xaa + ) + (new 'static 'secret-item-option + :name (game-text-id text-x163) + :unknown-symbol #t + :cost #x69 + :can-toggle 'auto + :flag #x2000 + :avail-after #xb1 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-sceneplayer-3) + :unknown-symbol #t + :cost #x7d + :can-toggle #f + :flag #x80 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id text-x164) + :unknown-symbol #t + :cost #x87 + :can-toggle 'auto + :flag #x4000 + :avail-after #xd3 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-levelselect) + :unknown-symbol #t + :cost #x91 + :can-toggle #f + :flag #x100 + :avail-after #xf5 + ) + (new 'static 'secret-item-option + :name (game-text-id progress-main-secrets-mega-scrapbook) + :unknown-symbol #t + :cost #xc8 + :can-toggle #f + :flag #x400 + :avail-after #x1 + ) + ) + ) + ) + ) + ) + ) ;; definition for symbol *language-name-remap*, type (array game-text-id) (define *language-name-remap* diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc index 2d86ce9de9..aec4b19936 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc @@ -1104,7 +1104,7 @@ (let ((s5-0 (-> obj current-options options 0))) (when (and s5-0 (= (-> obj menu-transition) 0.0)) (respond-progress - (the-as menu-option (-> s5-0 options (-> obj option-index))) + (the-as menu-option (-> s5-0 (-> obj option-index))) obj (and (= (-> obj menu-transition) 0.0) (-> obj selected-option)) ) @@ -1507,7 +1507,7 @@ ) ) (menu-option-method-10 - (-> gp-0 options s4-1) + (-> gp-0 s4-1) self sv-144 s4-1 @@ -2440,12 +2440,12 @@ ) ((= (-> *progress-save-info* file (-> *progress-state* which-slot) present) 1) (set! s5-0 #t) - (menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 box 0 min x))) + (menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 0))) (set-next-state arg0 'already-exists 0) ) (else (set! s5-0 #t) - (menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 box 0 min x))) + (menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 0))) (set-next-state arg0 'saving 0) ) )