d/jak2: finish progress menu code and initialize the camera (#1945)

This PR does a few main things:
- finish decompiling the progress related code
- implemented changes necessary to load the text files end-to-end
   - japanese/korean character encodings were not added
- finish more camera code, which is required to spawn the progress menu
/ init the default language settings needed for text
  - initialized the camera as well

Still havn't opened the menu as there are a lot of checks around
`*target*` which I havn't yet gone through and attempted to comment out.
This commit is contained in:
Tyler Wilding
2022-10-11 18:30:26 -04:00
committed by GitHub
parent 18fa543621
commit f6bdc07990
79 changed files with 32950 additions and 3881 deletions
+28 -2
View File
@@ -56,6 +56,20 @@
"jak1"
]
},
{
"type": "default",
"project": "CMakeLists.txt",
"projectTarget": "offline-test.exe (bin\\offline-test.exe)",
"name": "Tests - Offline Tests - Jak 2 - Specific File",
"args": [
"--iso_data_path",
"${workspaceRoot}/iso_data/jak2",
"--game",
"jak2",
"--file",
"progress"
]
},
{
"type": "default",
"project": "CMakeLists.txt",
@@ -88,14 +102,14 @@
"type": "default",
"project": "CMakeLists.txt",
"projectTarget": "gk.exe (bin\\gk.exe)",
"name": "Game 2 - Runtime (boot)",
"name": "Game - Jak 2 - Runtime (boot)",
"args": ["-boot", "-fakeiso", "-debug", "-v", "-jak2"]
},
{
"type": "default",
"project": "CMakeLists.txt",
"projectTarget": "gk.exe (bin\\gk.exe)",
"name": "Game 2 - Runtime (no boot)",
"name": "Game - Jak 2 - Runtime (no boot)",
"args": ["-fakeiso", "-debug", "-v", "-jak2"]
},
{
@@ -152,6 +166,18 @@
"${workspaceRoot}/decompiler_out"
]
},
{
"type": "default",
"project": "CMakeLists.txt",
"projectTarget": "decompiler.exe (bin\\decompiler.exe)",
"name": "Decompiler - Jak 2 - Extract",
"args": [
"${workspaceRoot}/decompiler/config/jak2_ntsc_v1.jsonc",
"${workspaceRoot}/iso_data",
"${workspaceRoot}/decompiler_out",
"--config-override \"{\\\"decompile_code\\\": false}\""
]
},
{
"type": "default",
"project": "CMakeLists.txt",
+5 -5
View File
@@ -34,7 +34,7 @@ tasks:
- sh: test -f {{.DECOMP_BIN_RELEASE_DIR}}/decompiler{{.EXE_FILE_EXTENSION}}
msg: "Couldn't locate decompiler executable in '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler'"
cmds:
- '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler "./decompiler/config/{{.DECOMP_CONFIG}}" ./iso_data ./decompiler_out --config-override "{\\\"decompile_code\\\": false}"'
- '{{.DECOMP_BIN_RELEASE_DIR}}/decompiler "./decompiler/config/{{.DECOMP_CONFIG}}" ./iso_data ./decompiler_out --config-override "{\\\"decompile_code\\\":false,\\\"allowed_objects\\\":[]}"'
boot-game:
desc: "Boots the game, it will fail if it's not already compiled!"
preconditions:
@@ -89,6 +89,9 @@ tasks:
decomp-clean:
cmds:
- python ./scripts/tasks/clean-decomp.py --game "{{.GAME}}"
lint-gsrc-file:
cmds:
- python ./scripts/gsrc/lint-gsrc-file.py --game {{.GAME}} --file {{.FILE}}
update-gsrc:
cmds:
- python ./scripts/gsrc/update-gsrc-via-refs.py --game "{{.GAME}}" --decompiler "{{.DECOMP_BIN_RELEASE_DIR}}/decompiler" --decompiler_config {{.DECOMP_CONFIG}}
@@ -96,6 +99,7 @@ tasks:
cmds:
- task: decomp-file
- python ./scripts/gsrc/update-from-decomp.py --game "{{.GAME}}" --file {{.FILE}}
- task: lint-gsrc-file
# TOOLS
analyze-ee-memory:
cmds:
@@ -131,10 +135,6 @@ tasks:
ignore_error: true
- python ./scripts/update_decomp_reference.py ./failures ./test/decompiler/reference/ --game {{.GAME}}
- task: offline-test-file
# check-gsrc-file:
# cmds:
# - python ./scripts/check-gsrc-file.py --files "{{.FILES}}"
type-test:
cmds:
- cmd: '{{.GOALCTEST_BIN_RELEASE_DIR}}/goalc-test --gtest_brief=0 --gtest_filter="*Jak2TypeConsistency*"'
ignore_error: true
+2 -2
View File
@@ -42,15 +42,15 @@ add_library(common
util/DgoWriter.cpp
util/diff.cpp
util/FileUtil.cpp
util/FontUtils.cpp
util/json_util.cpp
util/read_iso_file.cpp
util/SimpleThreadGroup.cpp
util/Timer.cpp
util/os.cpp
util/print_float.cpp
util/FontUtils.cpp
util/FrameLimiter.cpp
util/unicode_util.cpp)
util/unicode_util.cpp )
target_link_libraries(common fmt lzokay replxx libzstd_static)
+301 -16
View File
@@ -29,7 +29,8 @@ bool hex_char(char c) {
const std::unordered_map<std::string, GameTextVersion> sTextVerEnumMap = {
{"jak1-v1", GameTextVersion::JAK1_V1},
{"jak1-v2", GameTextVersion::JAK1_V2}};
{"jak1-v2", GameTextVersion::JAK1_V2},
{"jak2", GameTextVersion::JAK2}};
const std::string& get_text_version_name(GameTextVersion version) {
for (auto& [name, ver] : sTextVerEnumMap) {
@@ -119,6 +120,10 @@ std::string GameTextFontBank::replace_to_utf8(std::string& str) const {
}
std::string GameTextFontBank::replace_to_game(std::string& str) const {
for (auto& info : *m_replace_info) {
if (info.to.empty()) {
// Skip empty replacements, else it's an infinite loop
continue;
}
auto pos = str.find(info.to);
while (pos != std::string::npos) {
str.replace(pos, info.to.size(), info.from);
@@ -157,6 +162,19 @@ std::string GameTextFontBank::convert_utf8_to_game(std::string str) const {
return str;
}
bool GameTextFontBank::valid_char_range(const char in) const {
if (m_version == GameTextVersion::JAK1_V1 || m_version == GameTextVersion::JAK1_V2) {
return ((in >= '0' && in <= '9') || (in >= 'A' && in <= 'Z') ||
m_passthrus->find(in) != m_passthrus->end()) &&
in != '\\';
} else if (m_version == GameTextVersion::JAK2) {
return ((in >= '0' && in <= '9') || (in >= 'A' && in <= 'Z') || (in >= 'a' && in <= 'z') ||
m_passthrus->find(in) != m_passthrus->end()) &&
in != '\\';
}
return false;
}
/*!
* Turn a normal readable string into a string readable in the in-game font encoding and converts
* \cXX escape sequences
@@ -219,9 +237,7 @@ std::string GameTextFontBank::convert_game_to_utf8(const char* in) const {
if (remap != nullptr) {
result.append(remap->chars);
in += remap->bytes.size() - 1;
} else if (((*in >= '0' && *in <= '9') || (*in >= 'A' && *in <= 'Z') ||
m_passthrus->find(*in) != m_passthrus->end()) &&
*in != '\\') {
} else if (valid_char_range(*in)) {
result.push_back(*in);
} else if (*in == '\n') {
result += "\\n";
@@ -250,9 +266,9 @@ static std::vector<ReplaceInfo> s_replace_info_null = {};
* - Jak & Daxter: The Precursor Legacy (Black Label)
*/
static std::unordered_set<char> s_passthrus = {'~', ' ', ',', '.', '-', '+', '(', ')',
'!', ':', '?', '=', '%', '*', '/', '#',
';', '<', '>', '@', '[', '_'};
static std::unordered_set<char> s_passthrus_jak1 = {'~', ' ', ',', '.', '-', '+', '(', ')',
'!', ':', '?', '=', '%', '*', '/', '#',
';', '<', '>', '@', '[', '_'};
static std::vector<EncodeInfo> s_encode_info_jak1 = {
// random
@@ -578,10 +594,10 @@ static std::vector<ReplaceInfo> s_replace_info_jak1 = {
{"~Y~22L<~Z~Y~24L#~Z~Y~1L>~Z~Y~23L[~Z~+26H", "<PAD_SQUARE>"}, // custom
};
GameTextFontBank g_font_bank_jak1(GameTextVersion::JAK1_V1,
&s_encode_info_jak1,
&s_replace_info_jak1,
&s_passthrus);
GameTextFontBank g_font_bank_jak1_v1(GameTextVersion::JAK1_V1,
&s_encode_info_jak1,
&s_replace_info_jak1,
&s_passthrus_jak1);
/*!
* ================================
@@ -815,12 +831,281 @@ static std::vector<EncodeInfo> s_encode_info_jak1_v2 = {
GameTextFontBank g_font_bank_jak1_v2(GameTextVersion::JAK1_V2,
&s_encode_info_jak1_v2,
&s_replace_info_jak1,
&s_passthrus);
&s_passthrus_jak1);
/*!
* ================================
* GAME TEXT FONT BANK - JAK 2
* ================================
* This font is used in:
* - Jak 2 - NTSC - v1
*/
static std::unordered_set<char> s_passthrus_jak2 = {'~', ' ', ',', '.', '-', '+', '(', ')',
'!', ':', '?', '=', '%', '*', '/', '#',
';', '<', '>', '@', '[', '_'};
static std::vector<ReplaceInfo> s_replace_info_jak2 = {
// other
{"A~Y~-21H~-5Vº~Z", "Å"},
{"N~Y~-6Hº~Z~+10H", ""},
{"~+4VÇ~-4V", "ç"},
// tildes
{"N~Y~-22H~-4V<TIL>~Z", "Ñ"},
{"n~Y~-24H~-4V<TIL>~Z", "ñ"},
{"A~Y~-21H~-5V<TIL>~Z", "Ã"},
{"O~Y~-22H~-4V<TIL>~Z", "Õ"},
// acute accents
{"A~Y~-21H~-5V'~Z", "Á"},
{"A~Y~-26H~-8V'~Z", "<Á_V2>"}, // unfortunate...
{"a~Y~-25H~-5V'~Z", "á"},
{"E~Y~-23H~-9V'~Z", "É"},
{"e~Y~-26H~-5V'~Z", "é"},
{"I~Y~-19H~-5V'~Z", "Í"},
{"i~Y~-19H~-8V'~Z", "í"},
{"O~Y~-22H~-4V'~Z", "Ó"},
{"o~Y~-26H~-4V'~Z", "ó"},
{"U~Y~-24H~-3V'~Z", "Ú"},
{"u~Y~-24H~-3V'~Z", "ú"},
// circumflex
{"A~Y~-20H~-4V^~Z", "Â"},
{"a~Y~-24H~-5V^~Z", "â"},
{"E~Y~-20H~-5V^~Z", "Ê"},
{"e~Y~-25H~-4V^~Zt", "ê"},
{"I~Y~-19H~-5V^~Z", "Î"},
{"i~Y~-19H~-8V^~Z", "î"},
{"O~Y~-20H~-4V^~Z", "Ô"},
{"o~Y~-25H~-4V^~Z", "ô"},
{"U~Y~-24H~-3V^~Z", "Û"},
{"u~Y~-23H~-3V^~Z", "û"},
// grave accents
{"A~Y~-26H~-8V`~Z", "À"},
{"a~Y~-25H~-5V`~Z", "à"},
{"E~Y~-23H~-9V`~Z", "È"},
{"e~Y~-26H~-5V`~Z", "è"},
{"I~Y~-19H~-5V`~Z", "Ì"},
{"i~Y~-19H~-8V`~Z", "ì"},
{"O~Y~-22H~-4V`~Z", "Ò"},
{"o~Y~-26H~-4V`~Z", "ò"},
{"U~Y~-24H~-3V`~Z", "Ù"},
{"u~Y~-24H~-3V`~Z", "ù"},
// umlaut
{"A~Y~-26H~-8V¨~Z", "Ä"},
{"a~Y~-25H~-5V¨~Z", "ä"},
{"E~Y~-20H~-5V¨~Z", "Ë"},
{"I~Y~-19H~-5V¨~Z", "Ï"},
{"O~Y~-26H~-8V¨~Z", "Ö"},
{"o~Y~-26H~-4V¨~Z", "ö"},
{"U~Y~-25H~-8V¨~Z", "Ü"},
{"u~Y~-24H~-3V¨~Z", "ü"},
// dakuten katakana
{"~Yウ~Z゛", ""},
{"~Yカ~Z゛", ""},
{"~Yキ~Z゛", ""},
{"~Yク~Z゛", ""},
{"~Yケ~Z゛", ""},
{"~Yコ~Z゛", ""},
{"~Yサ~Z゛", ""},
{"~Yシ~Z゛", ""},
{"~Yス~Z゛", ""},
{"~Yセ~Z゛", ""},
{"~Yソ~Z゛", ""},
{"~Yタ~Z゛", ""},
{"~Yチ~Z゛", ""},
{"~Yツ~Z゛", ""},
{"~Yテ~Z゛", ""},
{"~Yト~Z゛", ""},
{"~Yハ~Z゛", ""},
{"~Yヒ~Z゛", ""},
{"~Yフ~Z゛", ""},
{"~Yヘ~Z゛", ""},
{"~Yホ~Z゛", ""},
// handakuten katakana
{"~Yハ~Z゜", ""},
{"~Yヒ~Z゜", ""},
{"~Yフ~Z゜", ""},
{"~Yヘ~Z゜", ""},
{"~Yホ~Z゜", ""},
// dakuten hiragana
{"~Yか~Z゛", ""},
{"~Yき~Z゛", ""},
{"~Yく~Z゛", ""},
{"~Yけ~Z゛", ""},
{"~Yこ~Z゛", ""},
{"~Yさ~Z゛", ""},
{"~Yし~Z゛", ""},
{"~Yす~Z゛", ""},
{"~Yせ~Z゛", ""},
{"~Yそ~Z゛", ""},
{"~Yた~Z゛", ""},
{"~Yち~Z゛", ""},
{"~Yつ~Z゛", ""},
{"~Yて~Z゛", ""},
{"~Yと~Z゛", ""},
{"~Yは~Z゛", ""},
{"~Yひ~Z゛", ""},
{"~Yふ~Z゛", ""},
{"~Yへ~Z゛", ""},
{"~Yほ~Z゛", ""},
// handakuten hiragana
{"~Yは~Z゜", ""},
{"~Yひ~Z゜", ""},
{"~Yふ~Z゜", ""},
{"~Yへ~Z゜", ""},
{"~Yほ~Z゜", ""},
// japanese punctuation
{",~+8H", ""},
{"~+8H ", " "},
// (hack) special case kanji
{"~~", ""},
// playstation buttons
// - face
{"~Y~22L<~Z~Y~27L*~Z~Y~1L>~Z~Y~23L[~Z~+26H", "<PAD_X>"},
{"~Y~22L<~Z~Y~26L;~Z~Y~1L>~Z~Y~23L[~Z~+26H", "<PAD_TRIANGLE>"},
{"~Y~22L<~Z~Y~25L@~Z~Y~1L>~Z~Y~23L[~Z~+26H", "<PAD_CIRCLE>"},
{"~Y~22L<~Z~Y~24L#~Z~Y~1L>~Z~Y~23L[~Z~+26H", "<PAD_SQUARE>"},
// - dpad
{"~Y~22L<SYM7>~Z~3L~+17H~-13V<SYM8>~Z~22L~+17H~+14V<SYM9>~Z~22L~+32H<SYM10>~Z~+56H",
"<PAD_DPAD_UP>"},
{"~Y~22L<SYM7>~Z~3L~+17H~-13V<SYM8>~Z~3L~+17H~+14V<SYM9>~Z~22L~+32H<SYM10>~Z~+56H",
"<PAD_DPAD_DOWN>"},
{"~Y~22L<SYM7>~Z~22L~+17H~-13V<SYM8>~Z~22L~+17H~+14V<SYM9>~Z~22L~+32H<SYM10>~Z~+56H",
"<PAD_DPAD_ANY>"},
// - shoulder
{"~Y~22L~-2H~-12V<SYM1><SYM2>~Z~22L~-2H~+17V<SYM3><SYM4>~Z~1L~+4H~+3V<SYM5>~Z~+38H",
"<PAD_L1>"},
{"~Y~22L~-2H~-12V<SYM1><SYM2>~Z~22L~-2H~+17V<SYM3><SYM4>~Z~1L~+6H~+3V<SYM6>~Z~+38H",
"<PAD_R1>"},
{"~Y~22L~-2H~-6V<SYM11><SYM12>~Z~22L~-2H~+16V<SYM15><SYM14>~Z~1L~+5H~-2V<SYM13>~Z~+38H",
"<PAD_R2>"},
{"~Y~22L~-2H~-6V<SYM11><SYM12>~Z~22L~-2H~+16V<SYM15><SYM14>~Z~1L~+5H~-2V<SYM22>~Z~+38H",
"<PAD_L2>"},
// - analog
{"~1L~+8H~Y<SYM16>~Z~6L~-16H<SYM21>~Z~+16h~6L<SYM20>~Z~6L~-15V<SYM24>~Z~+13V~6L<SYM28>~Z~-10H~+"
"9V~"
"6L<SYM17>~Z~+10H~+9V~6L<SYM31>~Z~-10H~-11V~6L<SYM23>~Z~+10H~-11V~6L<SYM29>~Z~+32H",
"<PAD_ANALOG_ANY>"},
{"~Y~1L~+8H<SYM16>~Z~6L~-8H<SYM21>~Z~+24H~6L<SYM20>~Z~+40H", "<PAD_ANALOG_LEFT_RIGHT>"},
{"~Y~1L<SYM16>~Z~6L~-15V<SYM24>~Z~+13V~6L<SYM28>~Z~+26H", "<PAD_ANALOG_UP_DOWN>"},
// icons
{"~Y~6L<~Z~Y~1L>~Z~Y~23L[~Z~+26H", "<ICON_MISSION_COMPLETE>"},
{"~Y~3L<~Z~Y~1L>~Z~Y~23L[~Z~+26H", "<ICON_MISSION_TODO>"},
// flags
{"~Y~6L<SYM18>~Z~+15H~1L<SYM18>~Z~+30H~3L<SYM18>~Z~+45H", "<FLAG_ITALIAN>"},
{"~Y~5L<SYM19>~Z~3L<SYM32>~<SYM26>~-1H~Y~5L<SYM19>~Z~3L<SYM32>~Z~+26H", "<FLAG_SPAIN>"},
{"~Y~39L~~~Z~3L<SYM33>~Z~5L<SYM25>~<SYM26>~-1H~Y~39L~~~Z~3L<SYM33>~Z~5L<SYM25>~Z~+26H",
"<FLAG_GERMAN>"},
{"~Y~7L<SYM18>~Z~+15H~1L<SYM18>~Z~+30H~3L<SYM18>~Z~+47H", "<FLAG_FRANCE>"},
{"~Y~1L<SYM19>~Z~3L<SYM34>~Z~7L<SYM37>~<SYM26>~-1H~Y~1L<SYM19>~Z~3L<SYM30>~Z~7L<SYM42>~Z~+26H",
"<FLAG_USA>"},
{"~Y~1L<SYM19>~Z~3L<SYM35>~Z~7L<SYM38>~<SYM26>~-1H~Y~1L<SYM19>~Z~3L<SYM40>~Z~+26H",
"<FLAG_UK>"},
{"~Y~1L<SYM19>~Z~39L<SYM36>~<SYM26>~-1H~Y~1L<SYM19>~Z~39L<SYM39>~Z~-11H~7L<SYM41>~Z~-11H~3L<"
"SYM43>~Z~+26H",
"<FLAG_JAPAN>"},
{"~Y~1L<SYM19>~<SYM26>~-1H~Y~1L<SYM19>~Z~-11H~3L<SYM27>~Z~+26H", "<FLAG_SOUTH_KOREA>"},
// weird stuff
// - descenders
{"~+7Vp~-7V", "p"},
{"~+7Vy~-7V", "y"},
{"~+7Vg~-7V", "g"},
{"~+7Vq~-7V", "q"},
{"~+1Vj~-1V", "j"},
{"\\\\\\\\", "\\n"},
// - symbols and ligatures
{"~-4H~-3V\\c19~+3V~-4H",
"<SUPERSCRIPT_QUOTE>"}, // used for the 4<__> place in spanish. the 5th uses the same
// character but looks different...?
{"~Y~-6Hº~Z~+10H", "°"},
// Color / Emphasis
{"~[~1L", "<COLOR_WHITE>"},
{"~[~32L", "<COLOR_DEFAULT>"}};
static std::vector<EncodeInfo> s_encode_info_jak2 = {
{"_", {0x03}}, // large space
{"ˇ", {0x10}}, // caron
{"`", {0x11}}, // grave accent
{"'", {0x12}}, // apostrophe
{"^", {0x13}}, // circumflex
{"<TIL>", {0x14}}, // tilde
{"¨", {0x15}}, // umlaut
{"º", {0x16}}, // numero/overring
{"¡", {0x17}}, // inverted exclamation mark
{"¿", {0x18}}, // inverted question mark
{"Ç", {0x1d}}, // c-cedilla
{"ß", {0x1f}}, // eszett
{"œ", {0x5e}}, // ligature o+e
// Re-purposed japanese/korean symbols that are used as part of drawing icons/flags/pad buttons
// TODO - japanese and korean encodings
{"<SYM26>", {0x5d}},
{"<SYM33>", {0x7f}},
{"<SYM25>", {0x80}},
{"<SYM18>", {0x81}},
{"<SYM19>", {0x85}},
{"<SYM27>", {0x86}},
{"<SYM36>", {0x87}},
{"<SYM39>", {0x88}},
{"<SYM43>", {0x89}},
{"<SYM41>", {0x8a}},
{"<SYM32>", {0x8b}},
{"<SYM34>", {0x8c}},
{"<SYM30>", {0x8d}},
{"<SYM37>", {0x8e}},
{"<SYM42>", {0x8f}},
{"<SYM40>", {0x90}},
{"<SYM16>", {0x91}},
{"<SYM6>", {0x94}},
{"<SYM5>", {0x95}},
{"<SYM13>", {0x96}},
{"<SYM22>", {0x97}},
{"<SYM28>", {0x98}},
{"<SYM31>", {0x99}},
{"<SYM35>", {0x9a}},
{"<SYM38>", {0x9b}},
{"<SYM24>", {0x9c}},
{"<SYM23>", {0x9d}},
{"<SYM21>", {0x9e}},
{"<SYM17>", {0x9f}},
{"<SYM9>", {0xa0}},
{"<SYM7>", {0xa1}},
{"<SYM8>", {0xa2}},
{"<SYM10>", {0xa3}},
{"<SYM20>", {0xa4}},
{"<SYM29>", {0xa5}},
{"<SYM1>", {0xa6}},
{"<SYM2>", {0xa7}},
{"<SYM11>", {0xa8}},
{"<SYM12>", {0xa9}},
{"<SYM3>", {0xb0}},
{"<SYM4>", {0xb1}},
{"<SYM14>", {0xb3}},
{"<SYM15>", {0xb2}},
};
GameTextFontBank g_font_bank_jak2(GameTextVersion::JAK2,
&s_encode_info_null,
&s_replace_info_null,
&s_passthrus);
&s_encode_info_jak2,
//&s_replace_info_null,
&s_replace_info_jak2,
&s_passthrus_jak2);
/*!
* ========================
@@ -830,7 +1115,7 @@ GameTextFontBank g_font_bank_jak2(GameTextVersion::JAK2,
*/
std::map<GameTextVersion, GameTextFontBank*> g_font_banks = {
{GameTextVersion::JAK1_V1, &g_font_bank_jak1},
{GameTextVersion::JAK1_V1, &g_font_bank_jak1_v1},
{GameTextVersion::JAK1_V2, &g_font_bank_jak1_v2},
{GameTextVersion::JAK2, &g_font_bank_jak2}};
+4
View File
@@ -75,6 +75,10 @@ class GameTextFontBank {
GameTextVersion version() const { return m_version; }
// TODO - methods would help make this code a lot better for different game versions
// hacking it for now
bool valid_char_range(const char in) const;
std::string convert_utf8_to_game_with_escape(const std::string& str) const;
std::string convert_utf8_to_game(std::string str) const;
std::string convert_game_to_utf8(const char* in) const;
+32 -14
View File
@@ -1360,23 +1360,41 @@ void SimpleExpressionElement::update_from_stack_mult_si(const Env& env,
FormStack& stack,
std::vector<FormElement*>* result,
bool allow_side_effects) {
auto arg0_i = is_int_type(env, m_my_idx, m_expr.get_arg(0).var());
auto arg1_i = is_int_type(env, m_my_idx, m_expr.get_arg(1).var());
if (m_expr.get_arg(0).is_int()) {
// annoyingly there's a mult3 v1, r0, v1 in jak 2.
auto arg1_i = is_int_type(env, m_my_idx, m_expr.get_arg(1).var());
auto args = pop_to_forms({m_expr.get_arg(0).var(), m_expr.get_arg(1).var()}, env, pool, stack,
allow_side_effects);
auto args = pop_to_forms({m_expr.get_arg(1).var()}, env, pool, stack, allow_side_effects);
if (!arg0_i) {
args.at(0) = pool.form<CastElement>(TypeSpec("int"), args.at(0));
if (!arg1_i) {
args.at(0) = pool.form<CastElement>(TypeSpec("int"), args.at(1));
}
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::MULTIPLICATION),
pool.form<SimpleAtomElement>(SimpleAtom::make_int_constant(m_expr.get_arg(0).get_int())),
args.at(0));
result->push_back(new_form);
} else {
auto arg0_i = is_int_type(env, m_my_idx, m_expr.get_arg(0).var());
auto arg1_i = is_int_type(env, m_my_idx, m_expr.get_arg(1).var());
auto args = pop_to_forms({m_expr.get_arg(0).var(), m_expr.get_arg(1).var()}, env, pool, stack,
allow_side_effects);
if (!arg0_i) {
args.at(0) = pool.form<CastElement>(TypeSpec("int"), args.at(0));
}
if (!arg1_i) {
args.at(1) = pool.form<CastElement>(TypeSpec("int"), args.at(1));
}
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::MULTIPLICATION), args.at(0), args.at(1));
result->push_back(new_form);
}
if (!arg1_i) {
args.at(1) = pool.form<CastElement>(TypeSpec("int"), args.at(1));
}
auto new_form = pool.alloc_element<GenericElement>(
GenericOperator::make_fixed(FixedOperatorKind::MULTIPLICATION), args.at(0), args.at(1));
result->push_back(new_form);
}
void SimpleExpressionElement::update_from_stack_force_si_2(const Env& env,
File diff suppressed because it is too large Load Diff
+31 -4
View File
@@ -117,12 +117,11 @@
// CFG failed
"draw-inline-array-instance-shrub",
// "reset-target-tracking",
"target-land-effect",
"(method 12 effect-control)",
"(method 11 effect-control)",
"(method 10 effect-control)",
"progress-trans",
"(anon-function 2 scene)",
"(method 10 bigmap)",
"(method 9 editable-region)", // condition branch assert hit
"(method 57 enemy)",
@@ -245,7 +244,17 @@
" textures ~192H~5DK ~280Htextures~456H~5DK~%": 2,
" misc ~192H~5DK ~280Hsprite~456H~5DK~%": 2,
" entity ~192H~5DK~%": 1,
" pris-geo ~192H~5DK ~280Hpris-fragment~456H~5DK~%": 2
" pris-geo ~192H~5DK ~280Hpris-fragment~456H~5DK~%": 2,
"~33L~S~32L ~S": 2,
"~32L~S ~33L~S~1L": 2,
"~35L~S~33L ~S": 2,
"~1L~S~35L ~S": 2,
"~35L~S ~1L~S~1L": 2,
"~33L~S~35L ~S": 2,
"~33L~C~34L~S~33L~C": 3,
"~35L~S ~33L~S~1L": 2,
"~33L~S ~35L~S~1L": 2,
"~33L~C": 1
},
"blocks_ending_in_asm_branch": {
@@ -254,6 +263,7 @@
"circle-circle-xz-intersect": [
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
],
"load-game-text-info": [15, 16, 17, 19, 20, 21],
"find-knot-span": [0, 1, 2, 3, 5, 6, 7, 8, 9],
@@ -331,7 +341,9 @@
],
"(method 27 conveyor)": [5, 14, 22],
"(method 44 nav-graph)": [1, 3, 6, 13, 17],
"(method 11 sparticle-launch-control)": [18, 24, 25, 28, 29, 32, 33, 34, 36, 41, 55, 58, 93, 95]
"(method 11 sparticle-launch-control)": [
18, 24, 25, 28, 29, 32, 33, 34, 36, 41, 55, 58, 93, 95
]
},
// Sometimes the game might use format strings that are fetched dynamically,
@@ -340,6 +352,21 @@
// e.g. "function-name":[[op, argc], [op, argc], ...]
// where "op" is the op number for the call to format.
"dynamic_format_arg_counts": {
"(method 10 menu-loading-option)": [[118, 1]],
"(method 10 menu-insufficient-space-option)": [
[63, 1],
[103, 1]
],
"(method 10 menu-secrets-insufficient-space-option)": [[55, 1]],
"(method 10 menu-card-removed-option)": [[48, 1]],
"(method 10 menu-format-card-option)": [[49, 1]],
"(method 10 menu-create-game-option)": [[49, 1]],
"(method 10 menu-error-auto-saving-option)": [[72, 1]],
"(method 10 menu-error-loading-option)": [
[64, 1],
[99, 1]
],
"(method 10 menu-insert-card-option)": [[48, 1]],
"(method 16 fail-mission)": [
[68, 1],
[101, 1],
+7 -1
View File
@@ -184,5 +184,11 @@
"streamed_audio_file_names": [],
"levels_to_extract": ["PRI.DGO", "CTA.DGO", "CWI.DGO", "LWIDEA.DGO", "VI1.DGO"]
"levels_to_extract": [
"PRI.DGO",
"CTA.DGO",
"CWI.DGO",
"LWIDEA.DGO",
"VI1.DGO"
]
}
+101 -2
View File
@@ -103,7 +103,7 @@
],
"text": [
["L96", "vector4"],
["L95", "matrix"],
["L95", "vector4w-4"],
["L96", "vector4w"]
],
"joint-mod": [["L189", "(inline-array quaternion)", 3]],
@@ -275,5 +275,104 @@
"tie-methods": [["L328", "(inline-array tie-init-data)", 6]],
"blocking-plane": [["L43", "vector"]],
"elec-gate": [["L141", "attack-info"]],
"part-tester": [["L35", "uint64", true], ["L30", "uint64", true]]
"part-tester": [
["L35", "uint64", true],
["L30", "uint64", true]
],
"progress-draw": [
["L933", "uint64", true],
["L934", "uint64", true],
["L935", "uint64", true],
["L936", "uint64", true],
["L937", "uint64", true],
["L938", "uint64", true],
["L939", "uint64", true],
["L940", "uint64", true],
["L941", "uint64", true],
["L942", "uint64", true],
["L943", "uint64", true],
["L944", "uint64", true],
["L945", "uint64", true],
["L946", "uint64", true],
["L947", "uint64", true],
["L948", "uint64", true],
["L949", "uint64", true],
["L950", "uint64", true],
["L951", "uint64", true],
["L952", "uint64", true],
["L953", "uint64", true],
["L954", "uint64", true],
["L955", "uint64", true],
["L956", "uint64", true],
["L957", "uint64", true],
["L958", "uint64", true],
["L959", "uint64", true],
["L960", "uint64", true],
["L961", "uint64", true],
["L962", "uint64", true],
["L963", "uint64", true],
["L964", "uint64", true],
["L965", "uint64", true],
["L966", "uint64", true],
["L967", "uint64", true],
["L968", "uint64", true],
["L969", "uint64", true],
["L970", "uint64", true],
["L971", "uint64", true],
["L972", "uint64", true],
["L973", "uint64", true],
["L974", "uint64", true],
["L975", "uint64", true],
["L976", "uint64", true],
["L977", "uint64", true],
["L978", "uint64", true],
["L979", "uint64", true],
["L980", "uint64", true],
["L981", "uint64", true],
["L982", "uint64", true],
["L983", "uint64", true],
["L984", "uint64", true],
["L985", "uint64", true],
["L986", "uint64", true],
["L987", "uint64", true],
["L988", "uint64", true],
["L989", "uint64", true],
["L990", "uint64", true],
["L991", "uint64", true],
["L992", "uint64", true],
["L993", "uint64", true],
["L994", "uint64", true],
["L995", "uint64", true],
["L996", "uint64", true],
["L997", "uint64", true],
["L998", "uint64", true],
["L999", "uint64", true],
["L1000", "uint64", true],
["L1001", "uint64", true],
["L1002", "uint64", true],
["L1003", "uint64", true],
["L1004", "uint64", true],
["L1005", "uint64", true],
["L1006", "uint64", true],
["L1007", "uint64", true],
["L1008", "uint64", true],
["L1009", "uint64", true],
["L1010", "uint64", true],
["L1011", "uint64", true],
["L1012", "uint64", true],
["L1013", "uint64", true],
["L1014", "uint64", true],
["L1015", "uint64", true],
["L1016", "uint64", true],
["L1017", "uint64", true],
["L1018", "uint64", true],
["L1019", "uint64", true],
["L1020", "uint64", true],
["L1021", "uint64", true],
["L1022", "uint64", true],
["L1023", "uint64", true],
["L1024", "uint64", true],
["L1025", "uint64", true],
["L1041", "uint64", true]
]
}
+11 -12
View File
@@ -928,16 +928,15 @@
[16, "vector"],
[32, "vector"]
],
"particle-adgif-callback": [
[16, ["inline-array", "vector", 4]]
],
"sparticle-respawn-heights": [
[16, "vector"]
],
"sparticle-respawn-timer": [
[16, "vector"]
],
"check-drop-level-rain": [
[16, "vector"]
]
"particle-adgif-callback": [[16, ["inline-array", "vector", 4]]],
"sparticle-respawn-heights": [[16, "vector"]],
"sparticle-respawn-timer": [[16, "vector"]],
"check-drop-level-rain": [[16, "vector"]],
"progress-post": [[112, "hud-box"]],
"(method 10 menu-missions-option)": [[224, "hud-box"]],
"(method 10 menu-secret-option)": [[64, "hud-box"]],
"(method 10 menu-highscores-option)": [[16, "hud-box"]],
"master-track-target": [[16, "vector"]],
"cam-string-line-of-sight": [[192, "collide-query"]],
"(enter cam-circular)": [[32, "collide-query"]]
}
+138 -35
View File
@@ -670,7 +670,8 @@
],
"print-game-text": [
[225, "v1", "float"],
[241, "v1", "float"]
[241, "v1", "float"],
[[324, 327], "v1", "dma-packet"]
],
"warp-test": [[[18, 23], "v1", "dma-packet"]],
"fx-copy-buf": [
@@ -964,7 +965,10 @@
[5, "s5", "glst-named-node"],
[6, "v1", "glst-named-node"]
],
"(event time-of-day-tick)": [[10, "v1", "float"], [148, "v1", "float"]],
"(event time-of-day-tick)": [
[10, "v1", "float"],
[148, "v1", "float"]
],
"cam-slave-get-vector-with-offset": [[[52, 61], "s3", "vector"]],
"cam-slave-get-interp-time": [[43, "f0", "float"]],
"cam-standard-event-handler": [
@@ -986,21 +990,14 @@
[542, "v1", "camera-slave"],
[611, "a0", "vector"],
[786, "v1", "float"],
[789, "v1", "float"]
],
"master-track-target": [
[53, "gp", "process-focusable"],
[100, "gp", "process-focusable"],
[121, "gp", "process-focusable"],
[132, "gp", "process-focusable"]
],
"reset-target-tracking": [
[14, "gp", "process-focusable"],
[40, "gp", "process-focusable"],
[51, "gp", "process-focusable"],
[65, "gp", "process-focusable"],
[86, "gp", "process-focusable"]
[789, "v1", "float"],
[589, "v1", "float"],
[593, "v1", "float"],
[602, "v1", "float"],
[606, "v1", "float"]
],
"master-track-target": [[[53, 526], "gp", "target"]],
"reset-target-tracking": [[[14, 138], "gp", "process-focusable"]],
"reset-follow": [[[12, 18], "a0", "process-focusable"]],
"(code cam-pov)": [
[15, "a1", "pov-camera"],
@@ -1026,7 +1023,8 @@
[92, "s1", "(inline-array collide-cache-tri)"],
[205, "s1", "(inline-array collide-cache-tri)"],
[135, "s1", "(inline-array collide-cache-tri)"],
[175, "s1", "(inline-array collide-cache-tri)"]
[175, "s1", "(inline-array collide-cache-tri)"],
[375, "v1", "(inline-array tracking-spline)"]
],
"cam-dist-analog-input": [[32, "f0", "float"]],
"(event cam-string)": [
@@ -1466,9 +1464,7 @@
[[0, 31], "v1", "(array int32)"],
[47, "v1", "(array int32)"]
],
"sparticle-texture-day-night": [
[[21, 78], "s2", "(array int32)"]
],
"sparticle-texture-day-night": [[[21, 78], "s2", "(array int32)"]],
"sparticle-mode-animate": [
[5, "v1", "(array symbol)"],
[[7, 16], "a1", "(array uint32)"],
@@ -1480,7 +1476,6 @@
// [33, "a0", "(pointer int64)"],
[44, "v1", "(pointer int32)"],
[46, "v1", "(pointer int32)"]
],
"(method 2 sparticle-cpuinfo)": [[14, "f0", "float"]],
"sp-kill-particle": [
@@ -1936,7 +1931,6 @@
[171, "v1", "float"],
[195, "v1", "float"],
[199, "v1", "float"],
// [281, "f0", "float"],
[220, "v1", "float"]
],
"(method 45 nav-mesh)": [[15, "v1", "entity-nav-mesh"]],
@@ -2608,9 +2602,7 @@
[[58, 64], "v1", "dma-packet"],
[66, "v1", "(pointer int32)"]
],
"(enter othercam-running)": [[[50, 60], "gp", "process-drawable"]],
"(code othercam-running)": [[[2, 65], "s2", "process-drawable"]],
"(method 10 progress)": [[45, "t9", "(function progress none)"]],
"hud-ring-cell-init-by-other": [
[36, "a0", "progress"],
[45, "v1", "progress"],
@@ -2619,6 +2611,7 @@
[159, "a1", "progress"],
[178, "a1", "progress"]
],
"(enter othercam-running)": [[[50, 60], "gp", "process-drawable"]],
"(post idle hud-ring-cell)": [
[8, "a1", "progress"],
[13, "v1", "progress"],
@@ -2797,9 +2790,7 @@
["_stack_", 16, "res-tag"],
[[29, 45], "v1", "(pointer float)"]
],
"unpack-comp-rle": [[[10, 26], "a0", "(pointer int8)"]],
"(method 16 level)": [
[222, "v1", "(pointer uint128)"],
[223, "a1", "(pointer uint128)"],
@@ -2811,12 +2802,8 @@
[[171, 193], "s2", "(pointer uint8)"],
[227, "v1", "(pointer uint8)"]
],
"set-fog-height!": [
[2, "v1", "(array texture-anim)"]
],
"unpack-comp-huf": [
[[21,23], "t3", "(pointer uint16)"]
],
"set-fog-height!": [[2, "v1", "(array texture-anim)"]],
"unpack-comp-huf": [[[21, 23], "t3", "(pointer uint16)"]],
"(method 10 elec-gate)": [[13, "t9", "(function process-drawable none)"]],
"(method 11 elec-gate)": [
[180, "a0", "vector"],
@@ -2977,7 +2964,123 @@
[99, "a0", "dma-packet"],
[97, "a1", "dma-packet"]
],
"(code part-tester-idle)": [
[[16, 22], "s5", "process-drawable"]
]
"(code part-tester-idle)": [[[16, 22], "s5", "process-drawable"]],
"(method 25 progress)": [[[19, 31], "a0", "menu-option"]],
"(method 24 progress)": [
[70, "a0", "(array menu-option)"],
[71, "a0", "menu-on-off-game-vibrations-option"],
[76, "a0", "(array menu-option)"],
[77, "a0", "menu-on-off-game-subtitles-option"],
[82, "a0", "(array menu-option)"],
[83, "a0", "menu-language-option"],
[87, "a0", "(array menu-option)"],
[88, "a0", "menu-language-option"],
[91, "v1", "(array menu-option)"],
[92, "v1", "menu-language-option"],
[95, "v1", "(array menu-option)"],
[96, "v1", "menu-language-option"],
[101, "a0", "(array menu-option)"],
[102, "a0", "menu-on-off-option"],
[107, "a0", "(array menu-option)"],
[108, "a0", "menu-on-off-option"],
[113, "a0", "(array menu-option)"],
[114, "a0", "menu-on-off-option"],
[119, "a0", "(array menu-option)"],
[120, "a0", "menu-on-off-option"],
[125, "a0", "(array menu-option)"],
[126, "a0", "menu-slider-option"],
[131, "a0", "(array menu-option)"],
[132, "a0", "menu-slider-option"],
[137, "a0", "(array menu-option)"],
[138, "a0", "menu-slider-option"],
[141, "v1", "(array menu-option)"],
[142, "v1", "menu-missions-option"]
],
"(method 31 progress)": [
[61, "v1", "(array menu-option)"],
[62, "v1", "menu-missions-option"]
],
"(method 32 progress)": [
[296, "v1", "(array menu-option)"],
[297, "v1", "menu-select-start-option"],
[306, "v1", "(array menu-option)"],
[307, "v1", "menu-select-scene-option"],
[371, "v1", "(array menu-option)"],
[372, "v1", "menu-missions-option"],
[380, "v1", "(array menu-option)"],
[381, "v1", "menu-highscores-option"],
[384, "v1", "(array menu-option)"],
[385, "v1", "menu-highscores-option"]
],
"draw-highlight": [[[44, 47], "v1", "dma-packet"]],
"end-scissor": [[[16, 19], "v1", "dma-packet"]],
"begin-scissor-secret": [[[49, 52], "v1", "dma-packet"]],
"end-scissor-secret": [[[16, 19], "v1", "dma-packet"]],
"begin-scissor-missions": [[[49, 52], "v1", "dma-packet"]],
"end-scissor-missions": [[[16, 19], "v1", "dma-packet"]],
"begin-scissor-scene": [[[49, 52], "v1", "dma-packet"]],
"end-scissor-scene": [[[16, 19], "v1", "dma-packet"]],
"begin-scissor-level": [[[49, 52], "v1", "dma-packet"]],
"end-scissor-level": [[[16, 19], "v1", "dma-packet"]],
"(method 10 menu-highscores-option)": [
[17, "v1", "float"],
[51, "f0", "float"],
[14, "v1", "float"]
],
"draw-percent-bar": [[[38, 41], "v1", "dma-packet"]],
"draw-highscore-icon": [[[36, 39], "v1", "dma-packet"]],
"begin-scissor": [[[70, 73], "v1", "dma-packet"]],
"draw-savegame-box": [[[25, 28], "v1", "dma-packet"]],
"draw-decoration": [[[176, 179], "v1", "dma-packet"]],
"draw-missions-decoration": [[[137, 140], "v1", "dma-packet"]],
"draw-sound-options-decoration": [[[151, 154], "v1", "dma-packet"]],
"draw-decoration-secrets": [[[139, 142], "v1", "dma-packet"]],
"draw-decoration-load-save": [[[173, 176], "v1", "dma-packet"]],
"(method 10 menu-secret-option)": [
[25, "v1", "float"],
[22, "v1", "float"],
[63, "f0", "float"],
[[137, 140], "v1", "dma-packet"]
],
"(method 10 menu-memcard-slot-option)": [
[[333, 336], "v1", "dma-packet"],
[[552, 555], "v1", "dma-packet"],
[[874, 877], "v1", "dma-packet"],
[[941, 944], "v1", "dma-packet"],
[[1034, 1037], "v1", "dma-packet"],
[[1107, 1110], "v1", "dma-packet"],
[[1186, 1189], "v1", "dma-packet"],
[59, "f0", "float"]
],
"(method 10 menu-icon-info-option)": [[[71, 74], "v1", "dma-packet"]],
"find-mission-text-at-index": [
[
201,
"v1",
"symbol" // this is a lie, but it's needed to work around the useless`cmove-#f-zero` it's not a symbol
]
],
"(method 10 menu-missions-option)": [[78, "f0", "float"]],
"draw-highscore-cup": [[[74, 77], "v1", "dma-packet"]],
"(method 10 menu-slider-option)": [
[[415, 418], "v1", "dma-packet"],
[[768, 771], "v1", "dma-packet"]
],
"(method 10 menu-sub-menu-option)": [
[[237, 240], "v1", "dma-packet"],
[[334, 337], "v1", "dma-packet"]
],
"(event idle progress)": [
[[10, 80], "v1", "mc-status-code"],
[[147, 217], "v1", "mc-status-code"]
],
"memcard-unlocked-secrets?": [[50, "s5", "int"]],
"(method 10 progress)": [[45, "t9", "(function progress none)"]],
"load-game-text-info": [[4, "v1", "game-text-info"]],
"(method 16 camera-master)": [[[11, 15], "a2", "target"]],
"master-choose-entity": [
["_stack_", 96, "res-tag"],
[[87, 247], "s3", "(pointer camera-slave)"]
],
"cam-string-joystick": [[785, "v1", "process-drawable"]]
}
+2 -2
View File
@@ -33,9 +33,9 @@
"disassemble_data": false,
// unpack textures to assets folder
"process_tpages": false,
"process_tpages": true,
// unpack game text to assets folder
"process_game_text": false,
"process_game_text": true,
// unpack game count to assets folder
"process_game_count": true,
// write goal imports for art groups
+16 -5
View File
@@ -995,7 +995,12 @@ goos::Object decompile_structure(const TypeSpec& type,
}
if (all_zero) {
// field has nothing in it, just skip it.
// 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;
}
@@ -1007,7 +1012,7 @@ goos::Object decompile_structure(const TypeSpec& type,
// 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()) {
if (!field_type_info->is_reference() && field.type() != TypeSpec("object")) {
// value type. need to get bytes.
ASSERT(!field.is_inline());
if (field.is_array()) {
@@ -1201,9 +1206,15 @@ goos::Object decompile_structure(const TypeSpec& type,
if (field.type() == TypeSpec("symbol")) {
continue;
}
field_defs_out.emplace_back(
field.name(), decompile_at_label(field.type(), labels.at(word.label_id()), labels,
words, ts, file, version));
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"));
+12
View File
@@ -0,0 +1,12 @@
;; "project file" for text make tool.
;; it's very simple... a list of (action args...)
;; currently the only action available is 'file'
;; and it takes 1 argument: input filename.
(text
;; NOTE : we compile using the fixed v2 encoding because it's what we use.
(file "$DECOMP/assets/game_text.txt") ;; this is the decompiler-generated file!
;; add custom files down here
)
+41 -1
View File
@@ -8,7 +8,22 @@
constexpr PerGameVersion<int> STR_RPC_ID(0xdeb5, 0xfab4);
constexpr int STR_RPC_CHANNEL = 4;
struct RPC_Str_Cmd {
/*
(deftype load-chunk-msg (structure)
((rsvd uint16 :offset-assert 0)
(result load-msg-result :offset-assert 2)
(address pointer :offset-assert 4)
(section uint32 :offset-assert 8)
(maxlen uint32 :offset-assert 12)
(id uint32 :offset 4)
(basename uint8 48 :offset-assert 16)
)
:method-count-assert 9
:size-assert #x40
:flag-assert #x900000040
)
*/
struct RPC_Str_Cmd_Jak1 {
u16 rsvd; // 0, seems unused
u16 result; // 2, return code. see STR_RPC_RESULT_XXX
u32 ee_addr; // 4, GOAL address to load to.
@@ -18,6 +33,31 @@ struct RPC_Str_Cmd {
char name[64]; // file name
};
/*
(deftype load-chunk-msg (structure)
((rsvd uint16 :offset-assert 0)
(result load-msg-result :offset-assert 2)
(address pointer :offset-assert 4)
(section uint32 :offset-assert 8)
(maxlen uint32 :offset-assert 12)
(dummy uint32 4 :offset-assert 16)
(basename sound-stream-name :inline :offset-assert 32)
)
:method-count-assert 9
:size-assert #x50
:flag-assert #x900000050
)
*/
struct RPC_Str_Cmd_Jak2 {
u16 rsvd;
u16 result; // 2
u32 address;
s32 section; // 8
u32 maxlen;
u32 dummy[4];
char basename[48]; // 32
};
struct RPC_Play_Cmd {
u16 rsvd;
u16 result;
+1
View File
@@ -13,6 +13,7 @@ Ptr<uint8_t> link_and_exec(Ptr<uint8_t> data,
Ptr<kheapinfo> heap,
uint32_t flags,
bool jump_from_c_to_goal);
u64 link_and_exec_wrapper(u64* args);
u32 link_busy();
void link_reset();
uint64_t link_begin(u64* args);
+2 -2
View File
@@ -1652,7 +1652,7 @@ int InitHeapAndSymbol() {
make_function_symbol_from_c("kmemclose", (void*)kmemclose);
make_function_symbol_from_c("new-dynamic-structure", (void*)new_dynamic_structure);
make_function_symbol_from_c("method-set!", (void*)method_set);
make_stack_arg_function_symbol_from_c("link", (void*)link_and_exec);
make_stack_arg_function_symbol_from_c("link", (void*)link_and_exec_wrapper);
make_function_symbol_from_c("link-busy?", (void*)link_busy);
make_function_symbol_from_c("link-reset", (void*)link_reset);
make_function_symbol_from_c("dgo-load", (void*)load_and_link_dgo);
@@ -1770,4 +1770,4 @@ s64 load_and_link(const char* /*filename*/,
ASSERT(false);
return 0;
}
} // namespace jak2
} // namespace jak2
+54 -6
View File
@@ -21,9 +21,11 @@
using namespace iop;
static RPC_Str_Cmd sSTRBuf;
static RPC_Str_Cmd_Jak1 sSTRBufJak1;
static RPC_Str_Cmd_Jak2 sSTRBufJak2;
static RPC_Play_Cmd sPLAYBuf[2]; // todo type
void* RPC_STR(unsigned int fno, void* _cmd, int y);
void* RPC_STR_jak1(unsigned int fno, void* _cmd, int y);
void* RPC_STR_jak2(unsigned int fno, void* _cmd, int y);
void* RPC_PLAY(unsigned int fno, void* _cmd, int y);
static constexpr int PLAY_MSG_SIZE = 0x40;
@@ -48,7 +50,8 @@ constexpr int STR_INDEX_CACHE_SIZE = 4;
CacheEntry sCache[STR_INDEX_CACHE_SIZE];
void stream_init_globals() {
memset(&sSTRBuf, 0, sizeof(RPC_Str_Cmd));
memset(&sSTRBufJak1, 0, sizeof(RPC_Str_Cmd_Jak1));
memset(&sSTRBufJak2, 0, sizeof(RPC_Str_Cmd_Jak2));
memset(&sPLAYBuf, 0, sizeof(RPC_Play_Cmd));
}
@@ -62,7 +65,16 @@ u32 STRThread() {
CpuDisableIntr();
sceSifInitRpc(0);
sceSifSetRpcQueue(&dq, GetThreadId());
sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR, &sSTRBuf, nullptr, nullptr, &dq);
if (g_game_version == GameVersion::Jak1) {
sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR_jak1, &sSTRBufJak1, nullptr,
nullptr, &dq);
} else if (g_game_version == GameVersion::Jak2) {
sceSifRegisterRpc(&serve, STR_RPC_ID[g_game_version], RPC_STR_jak2, &sSTRBufJak2, nullptr,
nullptr, &dq);
} else {
ASSERT_MSG(false, "unsupported game version in STRThread initialization!");
}
CpuEnableIntr();
sceSifRpcLoop(&dq);
return 0;
@@ -84,10 +96,10 @@ u32 PLAYThread() {
/*!
* The STR RPC handler.
*/
void* RPC_STR(unsigned int fno, void* _cmd, int y) {
void* RPC_STR_jak1(unsigned int fno, void* _cmd, int y) {
(void)fno;
(void)y;
auto* cmd = (RPC_Str_Cmd*)_cmd;
auto* cmd = (RPC_Str_Cmd_Jak1*)_cmd;
if (cmd->chunk_id < 0) {
// it's _not_ a stream file. So we just treat it like a normal load.
@@ -162,6 +174,42 @@ void* RPC_STR(unsigned int fno, void* _cmd, int y) {
return cmd;
}
/*!
* The STR RPC handler.
*/
void* RPC_STR_jak2(unsigned int fno, void* _cmd, int y) {
(void)fno;
(void)y;
auto* cmd = (RPC_Str_Cmd_Jak2*)_cmd;
if (cmd->section < 0) {
// it's _not_ a stream file. So we just treat it like a normal load.
// find the file with the given name
auto file_record = isofs->find(cmd->basename);
if (file_record == nullptr) {
// file not found!
printf("[OVERLORD STR] Failed to find file %s for loading.\n", cmd->basename);
cmd->result = STR_RPC_RESULT_ERROR;
} else {
// load directly to the EE
cmd->maxlen = LoadISOFileToEE(file_record, cmd->address, cmd->maxlen);
if (cmd->maxlen) {
// successful load!
cmd->result = STR_RPC_RESULT_DONE;
} else {
// there was an error loading.
cmd->result = STR_RPC_RESULT_ERROR;
}
}
} else {
// TODO - not yet implemented
ASSERT_MSG(false, "this branch of RPC_STR has not yet been implemented!");
cmd->result = STR_RPC_RESULT_ERROR;
}
return cmd;
}
void* RPC_PLAY([[maybe_unused]] unsigned int fno, void* _cmd, int size) {
s32 n_messages = size / PLAY_MSG_SIZE;
char namebuf[16];
+2 -2
View File
@@ -380,7 +380,7 @@
;; Text
;;;;;;;;;;;;;;;;;;;;;
(defstep :in "game/assets/game_text.gp"
(defstep :in "game/assets/jak1/game_text.gp"
:tool 'text
:out '("$OUT/iso/0COMMON.TXT"
"$OUT/iso/1COMMON.TXT"
@@ -391,7 +391,7 @@
"$OUT/iso/6COMMON.TXT")
)
(defstep :in "game/assets/game_subtitle.gp"
(defstep :in "game/assets/jak1/game_subtitle.gp"
:tool 'subtitle
:out '("$OUT/iso/0SUBTIT.TXT"
"$OUT/iso/3SUBTIT.TXT"
@@ -17,6 +17,9 @@
;; NOTE - for cam-states
(define-extern cam-collision-record-save (function vector vector int symbol camera-slave none))
(define-extern cam-debug-add-los-tri (function (inline-array collide-cache-tri) vector vector none))
(define-extern slave-los-state->string (function slave-los-state string))
(define-extern cam-debug-reset-coll-tri (function none))
;; NOTE - for cam-layout
(define-extern camera-line-setup (function vector4w none))
File diff suppressed because it is too large Load Diff
+1 -8
View File
@@ -39,11 +39,4 @@
(none)
)
;; removed because it doesn't work yet.
(format #t "skipping cam-start~%")
(format 0 "skipping cam-start~%")
; (cam-start #f)
(cam-start #f)
File diff suppressed because it is too large Load Diff
+2 -12
View File
@@ -15,10 +15,7 @@
(set! (-> (&-> arg0 0 data arg4) 0) (-> s4-0 x))
(set! (-> (&-> arg0 0 data arg4) 4) (-> s4-0 y))
(set! (-> (&-> arg0 0 data arg4) 8) (-> s4-0 z))
(let ((f0-5 (-> s4-0 w)))
(set! (-> (&-> arg0 0 data arg4) 12) f0-5)
f0-5
)
(set! (-> (&-> arg0 0 data arg4) 12) (-> s4-0 w))
)
)
@@ -26,10 +23,7 @@
(set! (-> arg0 x) arg1)
(set! (-> arg0 y) arg2)
(set! (-> arg0 z) arg3)
(let ((f0-3 1.0))
(set! (-> arg0 w) f0-3)
f0-3
)
(set! (-> arg0 w) 1.0)
)
(defun update-view-planes ((arg0 math-camera) (arg1 (inline-array plane)) (arg2 float) (arg3 matrix))
@@ -647,7 +641,3 @@
)
)
)
+7 -9
View File
@@ -48,6 +48,11 @@
(declare-type camera-master process)
(define-extern cam-master-init (function none :behavior camera-master))
;; NOTE - for cam-master
(define-extern cam-master-effect (function none :behavior camera-master))
(define-extern camera-master-debug (function camera-master none))
(define-extern group-rain-screend-drop sparticle-launch-group)
(define-extern parameter-ease-sin-clamp (function float float))
;; DECOMP BEGINS
@@ -122,7 +127,7 @@
(tracking-spline-method-19 (_type_ float vector tracking-spline-sampler) vector 19)
(tracking-spline-method-20 (_type_ vector int) none 20)
(tracking-spline-method-21 (_type_ vector float float float) vector 21)
(tracking-spline-method-22 (_type_ float) none 22)
(tracking-spline-method-22 (_type_ float) symbol 22)
(debug-draw-spline (_type_) none 23)
)
)
@@ -448,13 +453,6 @@
(:methods
(camera-master-method-14 (_type_ vector) vector 14)
(camera-master-method-15 (_type_ vector) vector 15)
(camera-master-method-16 (_type_ symbol) none 16)
(camera-master-method-16 (_type_ symbol) int 16)
)
)
0
+176 -264
View File
@@ -52,6 +52,7 @@
)
)
;; WARN: Return type mismatch uint128 vs uint.
(defun cam-slave-get-flags ((arg0 entity) (arg1 symbol))
(let ((s5-0 (res-lump-value arg0 arg1 uint128 :time -1000000000.0))
(s3-0 (method-of-type res-lump get-property-value))
@@ -854,6 +855,7 @@
)
)
;; WARN: Return type mismatch int vs symbol.
(defmethod tracking-spline-method-22 tracking-spline ((obj tracking-spline) (arg0 float))
(when (< arg0 (-> obj summed-len))
(let ((s5-0 (new 'stack-no-clear 'tracking-spline-sampler)))
@@ -865,8 +867,7 @@
(tracking-spline-method-14 obj s5-0)
)
)
0
(none)
(the-as symbol 0)
)
(defmethod tracking-spline-method-9 tracking-spline ((obj tracking-spline))
@@ -898,7 +899,7 @@
)
(set! (-> obj free-point) -134250495)
(dotimes (v1-21 32)
(when (zero? (logand s5-0 1))
(when (not (logtest? s5-0 1))
(set! (-> obj point v1-21 next) (-> obj free-point))
(set! (-> obj free-point) v1-21)
)
@@ -1545,11 +1546,7 @@
(sv-272 matrix)
(sv-288 vector)
)
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(rlet ((vf0 :class vf)
(vf4 :class vf)
(vf5 :class vf)
(vf6 :class vf)
@@ -1582,21 +1579,11 @@
(vector-normalize! s0-0 f28-0)
)
(vector-! (-> arg0 looking-interesting) (-> *camera* settings point-of-interest) (-> arg0 follow-pt))
(let ((v1-15 (-> arg0 looking-interesting)))
(let ((a0-16 (-> arg0 follow-pt))
(a1-7 (-> arg0 looking-interesting))
(f0-4 (-> arg0 point-of-interest-blend value))
)
(.lvf vf2 (&-> a1-7 quad))
(.lvf vf1 (&-> a0-16 quad))
(let ((a0-17 f0-4))
(.mov vf3 a0-17)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-15 quad) vf4)
(vector+float*!
(-> arg0 looking-interesting)
(-> arg0 follow-pt)
(-> arg0 looking-interesting)
(-> arg0 point-of-interest-blend value)
)
)
(else
@@ -1612,9 +1599,19 @@
(set! sv-240 (new 'stack-no-clear 'matrix))
(set! sv-224 (new 'stack-no-clear 'vector))
(vector-normalize-copy! sv-224 s0-0 1.0)
;; NOTE - manually fixed - #1819
(let* ((v1-24 (-> *camera* local-down)))
(set! f0-9 (vector-dot v1-24 sv-224)))
;; (let* ((v1-25 (-> *camera* local-down))
;; (f0-8 (-> sv-224 x))
;; (f1-1 (-> sv-224 y))
;; (f2-0 (-> sv-224 z))
;; (f3-0 (-> v1-25 x))
;; (f4-0 (-> v1-25 y))
;; (f5-0 (-> v1-25 z))
;; )
;; (.mula.s f0-8 f3-0)
;; (.madda.s f1-1 f4-0)
;; (.madd.s f0-9 f2-0 f5-0)
;; )
(set! f0-9 (vector-dot (-> *camera* local-down) sv-224))
(let* ((f28-1 f0-9)
(f0-11 (acos (fabs f28-1)))
)
@@ -1637,10 +1634,10 @@
)
(matrix-rotate-x! sv-240 f30-0)
(let ((t9-6 matrix*!)
(a0-29 s1-0)
(a0-28 s1-0)
(a2-3 s1-0)
)
(t9-6 a0-29 sv-240 a2-3)
(t9-6 a0-28 sv-240 a2-3)
)
)
)
@@ -1664,17 +1661,17 @@
(slave-matrix-blend-2 (-> arg0 inv-mat) arg2 s0-0 s1-0)
)
(else
(let* ((v1-59 (-> arg0 inv-mat))
(let* ((v1-60 (-> arg0 inv-mat))
(a3-2 s1-0)
(a0-35 (-> a3-2 vector 0 quad))
(a0-34 (-> a3-2 vector 0 quad))
(a1-19 (-> a3-2 vector 1 quad))
(a2-7 (-> a3-2 vector 2 quad))
(a3-3 (-> a3-2 trans quad))
)
(set! (-> v1-59 vector 0 quad) a0-35)
(set! (-> v1-59 vector 1 quad) a1-19)
(set! (-> v1-59 vector 2 quad) a2-7)
(set! (-> v1-59 trans quad) a3-3)
(set! (-> v1-60 vector 0 quad) a0-34)
(set! (-> v1-60 vector 1 quad) a1-19)
(set! (-> v1-60 vector 2 quad) a2-7)
(set! (-> v1-60 trans quad) a3-3)
)
)
)
@@ -1710,16 +1707,6 @@
)
)
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4]
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
@@ -1733,249 +1720,174 @@
(sv-176 matrix)
(sv-192 vector)
)
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
(set! sv-144 arg5)
(let ((s0-0 (new-stack-vector0)))
(set! sv-160 (new 'stack-no-clear 'vector))
(set! (-> sv-160 quad) (the-as uint128 0))
1.0
1.0
(let ((s3-0 (new-stack-vector0)))
0.0
1.0
(set! sv-176 (new 'stack-no-clear 'matrix))
(set! (-> sv-176 vector 0 quad) (the-as uint128 0))
(set! (-> sv-176 vector 1 quad) (the-as uint128 0))
(set! (-> sv-176 vector 2 quad) (the-as uint128 0))
(set! (-> sv-176 trans quad) (the-as uint128 0))
(cond
((< 1.0 arg3)
(set! arg3 1.0)
)
(init-vf0-vector)
(set! sv-144 arg5)
(let ((s0-0 (new-stack-vector0)))
(set! sv-160 (new 'stack-no-clear 'vector))
(set! (-> sv-160 quad) (the-as uint128 0))
1.0
1.0
(let ((s3-0 (new-stack-vector0)))
0.0
1.0
(set! sv-176 (new 'stack-no-clear 'matrix))
(set! (-> sv-176 vector 0 quad) (the-as uint128 0))
(set! (-> sv-176 vector 1 quad) (the-as uint128 0))
(set! (-> sv-176 vector 2 quad) (the-as uint128 0))
(set! (-> sv-176 trans quad) (the-as uint128 0))
(cond
((< 1.0 arg3)
(set! arg3 1.0)
)
((< arg3 0.0)
(set! arg3 0.0)
)
)
(cond
(arg4
(vector-flatten! s0-0 arg1 arg4)
(vector-flatten! sv-160 arg2 arg4)
(set! f30-0 (vector-normalize-ret-len! s0-0 1.0))
(set! f28-0 (vector-normalize-ret-len! sv-160 1.0))
(vector-normalize! (vector-cross! s3-0 sv-160 s0-0) 1.0)
(let ((f26-0 (vector-dot arg4 s3-0)))
(vector-normalize-copy! s3-0 arg4 1.0)
(if (< f26-0 0.0)
(vector-negate! s3-0 s3-0)
)
)
)
(else
(set! (-> s0-0 quad) (-> arg1 quad))
(set! (-> sv-160 quad) (-> arg2 quad))
(set! f30-0 (vector-normalize-ret-len! s0-0 1.0))
(set! f28-0 (vector-normalize-ret-len! sv-160 1.0))
(vector-normalize! (vector-cross! s3-0 arg2 arg1) 1.0)
((< arg3 0.0)
(set! arg3 0.0)
)
)
(cond
(arg4
(vector-flatten! s0-0 arg1 arg4)
(vector-flatten! sv-160 arg2 arg4)
(set! f30-0 (vector-normalize-ret-len! s0-0 1.0))
(set! f28-0 (vector-normalize-ret-len! sv-160 1.0))
(vector-normalize! (vector-cross! s3-0 sv-160 s0-0) 1.0)
(let ((f26-0 (vector-dot arg4 s3-0)))
(vector-normalize-copy! s3-0 arg4 1.0)
(if (< f26-0 0.0)
(vector-negate! s3-0 s3-0)
)
)
)
(let ((t9-10 acos))
;; NOTE - manually fixed - #1819
(let* ((v1-22 (-> *camera* local-down)))
(set! f0-10 (vector-dot v1-22 sv-160)))
(let* ((f1-3 (t9-10 f0-10))
(f0-12 (* arg3 f1-3))
(else
(set! (-> s0-0 quad) (-> arg1 quad))
(set! (-> sv-160 quad) (-> arg2 quad))
(set! f30-0 (vector-normalize-ret-len! s0-0 1.0))
(set! f28-0 (vector-normalize-ret-len! sv-160 1.0))
(vector-normalize! (vector-cross! s3-0 arg2 arg1) 1.0)
)
)
(let ((t9-10 acos))
;; (let* ((v1-22 s0-0)
;; (f0-9 (-> v1-22 x))
;; (f1-2 (-> v1-22 y))
;; (f2-0 (-> v1-22 z))
;; (f3-0 (-> sv-160 x))
;; (f4-0 (-> sv-160 y))
;; (f5-0 (-> sv-160 z))
;; )
;; (.mula.s f0-9 f3-0)
;; (.madda.s f1-2 f4-0)
;; (.madd.s f0-10 f2-0 f5-0)
;; )
(set! f0-10 (vector-dot s0-0 sv-160))
(let* ((f1-3 (t9-10 f0-10))
(f0-12 (* arg3 f1-3))
)
(when (< sv-144 f0-12)
(set! f0-12 sv-144)
(set! arg3 (/ sv-144 f1-3))
)
(let* ((f0-13 (cos f0-12))
(t9-12 matrix-axis-sin-cos!)
(a0-20 sv-176)
(a1-13 s3-0)
(f1-5 1.0)
(f2-3 f0-13)
)
(when (< sv-144 f0-12)
(set! f0-12 sv-144)
(set! arg3 (/ sv-144 f1-3))
)
(let* ((f0-13 (cos f0-12))
(t9-12 matrix-axis-sin-cos!)
(a0-20 sv-176)
(a1-13 s3-0)
(f1-5 1.0)
(f2-3 f0-13)
)
(t9-12 a0-20 a1-13 (sqrtf (- f1-5 (* f2-3 f2-3))) f0-13)
)
)
)
(vector-matrix*! arg0 s0-0 sv-176)
(let ((s0-1 vector-normalize!))
(set! sv-192 arg0)
(let ((a1-16 (lerp f30-0 f28-0 arg3)))
(s0-1 sv-192 a1-16)
)
)
(when arg4
(let ((v1-33 arg0))
(let ((a0-24 arg0)
(a1-17 s3-0)
(f0-15 (vector-dot arg1 s3-0))
)
(.lvf vf2 (&-> a1-17 quad))
(.lvf vf1 (&-> a0-24 quad))
(let ((a0-25 f0-15))
(.mov vf3 a0-25)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-33 quad) vf4)
)
(let ((v1-34 arg0))
(let ((a0-26 arg0)
(a1-18 s3-0)
(f0-17 (* arg3 (vector-dot (vector-! (new-stack-vector0) arg2 arg1) s3-0)))
)
(.lvf vf2 (&-> a1-18 quad))
(.lvf vf1 (&-> a0-26 quad))
(let ((a0-27 f0-17))
(.mov vf3 a0-27)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-34 quad) vf4)
(t9-12 a0-20 a1-13 (sqrtf (- f1-5 (* f2-3 f2-3))) f0-13)
)
)
)
(vector-matrix*! arg0 s0-0 sv-176)
(let ((s0-1 vector-normalize!))
(set! sv-192 arg0)
(let ((a1-16 (lerp f30-0 f28-0 arg3)))
(s0-1 sv-192 a1-16)
)
)
(when arg4
(vector+float*! arg0 arg0 s3-0 (vector-dot arg1 s3-0))
(vector+float*! arg0 arg0 s3-0 (* arg3 (vector-dot (vector-! (new-stack-vector0) arg2 arg1) s3-0)))
)
)
arg0
)
arg0
)
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; WARN: Stack slot offset 144 signed mismatch
;; ERROR: Unsupported inline assembly instruction kind - [mula.s f0, f3]
;; ERROR: Unsupported inline assembly instruction kind - [madda.s f1, f4]
;; ERROR: Unsupported inline assembly instruction kind - [madd.s f0, f2, f5]
(defun v-slrp3! ((arg0 vector) (arg1 vector) (arg2 vector) (arg3 vector) (arg4 float))
(local-vars (f0-7 float) (f26-0 float) (f28-0 float) (sv-144 float) (sv-160 vector))
(rlet ((acc :class vf)
(vf0 :class vf)
(vf1 :class vf)
(vf2 :class vf)
(vf3 :class vf)
(vf4 :class vf)
)
(init-vf0-vector)
(set! sv-144 arg4)
(let ((s1-0 (new-stack-vector0)))
(set! sv-160 (new 'stack-no-clear 'vector))
(set! (-> sv-160 quad) (the-as uint128 0))
0.0
0.0
(let ((s3-0 (new-stack-vector0))
(f30-0 1.0)
)
0.0
(let ((s0-0 (new-stack-matrix0)))
(cond
(arg3
(vector-flatten! s1-0 arg1 arg3)
(vector-flatten! sv-160 arg2 arg3)
(set! f28-0 (vector-normalize-ret-len! s1-0 1.0))
(set! f26-0 (vector-normalize-ret-len! sv-160 1.0))
(vector-normalize! (vector-cross! s3-0 sv-160 s1-0) 1.0)
(let ((f24-0 (vector-dot arg3 s3-0)))
(vector-normalize-copy! s3-0 arg3 1.0)
(if (< f24-0 0.0)
(vector-negate! s3-0 s3-0)
)
)
)
(else
(set! (-> s1-0 quad) (-> arg1 quad))
(set! (-> sv-160 quad) (-> arg2 quad))
(set! f28-0 (vector-normalize-ret-len! s1-0 1.0))
(set! f26-0 (vector-normalize-ret-len! sv-160 1.0))
(vector-normalize! (vector-cross! s3-0 arg2 arg1) 1.0)
)
)
(let ((t9-10 acos))
;; NOTE - manually fixed - #1819
(let* ((v1-10 (-> *camera* local-down)))
(set! f0-7 (vector-dot v1-10 sv-160)))
(let ((f0-8 (t9-10 f0-7)))
(when (< sv-144 f0-8)
(set! f30-0 (/ sv-144 f0-8))
(set! f0-8 sv-144)
)
(let* ((f0-9 (cos f0-8))
(t9-12 matrix-axis-sin-cos!)
(a0-20 s0-0)
(a1-13 s3-0)
(f1-3 1.0)
(f2-1 f0-9)
)
(t9-12 a0-20 a1-13 (sqrtf (- f1-3 (* f2-1 f2-1))) f0-9)
)
)
)
(vector-matrix*! arg0 s1-0 s0-0)
(set! sv-144 arg4)
(let ((s1-0 (new-stack-vector0)))
(set! sv-160 (new 'stack-no-clear 'vector))
(set! (-> sv-160 quad) (the-as uint128 0))
0.0
0.0
(let ((s3-0 (new-stack-vector0))
(f30-0 1.0)
)
(vector-normalize! arg0 (lerp f28-0 f26-0 f30-0))
(when arg3
(let ((v1-21 arg0))
(let ((a0-24 arg0)
(a1-17 s3-0)
(f0-11 (vector-dot arg1 s3-0))
0.0
(let ((s0-0 (new-stack-matrix0)))
(cond
(arg3
(vector-flatten! s1-0 arg1 arg3)
(vector-flatten! sv-160 arg2 arg3)
(set! f28-0 (vector-normalize-ret-len! s1-0 1.0))
(set! f26-0 (vector-normalize-ret-len! sv-160 1.0))
(vector-normalize! (vector-cross! s3-0 sv-160 s1-0) 1.0)
(let ((f24-0 (vector-dot arg3 s3-0)))
(vector-normalize-copy! s3-0 arg3 1.0)
(if (< f24-0 0.0)
(vector-negate! s3-0 s3-0)
)
(.lvf vf2 (&-> a1-17 quad))
(.lvf vf1 (&-> a0-24 quad))
(let ((a0-25 f0-11))
(.mov vf3 a0-25)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-21 quad) vf4)
)
(let ((v1-22 arg0))
(let ((a0-26 arg0)
(a1-18 s3-0)
(f0-14 (* f30-0 (vector-dot (vector-! (new-stack-vector0) arg2 arg1) s3-0)))
)
(.lvf vf2 (&-> a1-18 quad))
(.lvf vf1 (&-> a0-26 quad))
(let ((a0-27 f0-14))
(.mov vf3 a0-27)
)
)
(.add.x.vf vf4 vf0 vf0 :mask #b1000)
(.mul.x.vf acc vf2 vf3)
(.add.mul.w.vf vf4 vf1 vf0 acc :mask #b111)
(.svf (&-> v1-22 quad) vf4)
(else
(set! (-> s1-0 quad) (-> arg1 quad))
(set! (-> sv-160 quad) (-> arg2 quad))
(set! f28-0 (vector-normalize-ret-len! s1-0 1.0))
(set! f26-0 (vector-normalize-ret-len! sv-160 1.0))
(vector-normalize! (vector-cross! s3-0 arg2 arg1) 1.0)
)
)
(let ((t9-10 acos))
;; (let* ((v1-10 s1-0)
;; (f0-6 (-> v1-10 x))
;; (f1-0 (-> v1-10 y))
;; (f2-0 (-> v1-10 z))
;; (f3-0 (-> sv-160 x))
;; (f4-0 (-> sv-160 y))
;; (f5-0 (-> sv-160 z))
;; )
;; (.mula.s f0-6 f3-0)
;; (.madda.s f1-0 f4-0)
;; (.madd.s f0-7 f2-0 f5-0)
;; )
(set! f0-7 (vector-dot s1-0 sv-160))
(let ((f0-8 (t9-10 f0-7)))
(when (< sv-144 f0-8)
(set! f30-0 (/ sv-144 f0-8))
(set! f0-8 sv-144)
)
(let* ((f0-9 (cos f0-8))
(t9-12 matrix-axis-sin-cos!)
(a0-20 s0-0)
(a1-13 s3-0)
(f1-3 1.0)
(f2-1 f0-9)
)
(t9-12 a0-20 a1-13 (sqrtf (- f1-3 (* f2-1 f2-1))) f0-9)
)
)
)
(vector-matrix*! arg0 s1-0 s0-0)
)
(vector-normalize! arg0 (lerp f28-0 f26-0 f30-0))
(when arg3
(vector+float*! arg0 arg0 s3-0 (vector-dot arg1 s3-0))
(vector+float*! arg0 arg0 s3-0 (* f30-0 (vector-dot (vector-! (new-stack-vector0) arg2 arg1) s3-0)))
)
)
arg0
)
arg0
)
+1 -1
View File
@@ -390,7 +390,7 @@
(get-skeleton-origin (_type_) vector 9)
(draw-control-method-10 () none 10)
(draw-control-method-11 () none 11)
(draw-control-method-12 (_type_ int int) none 12)
(draw-control-method-12 (_type_ uint int) none 12)
(draw-control-method-13 () none 13)
(draw-control-method-14 (_type_ cspace-array joint-control) none 14)
)
+48 -24
View File
@@ -14,13 +14,16 @@
(define-extern add-debug-x (function symbol bucket-id vector rgba symbol))
(define-extern add-debug-vector (function symbol bucket-id vector vector meters rgba symbol))
(define-extern add-debug-line2d (function symbol bucket-id vector vector vector symbol))
(define-extern add-debug-line2d (function symbol bucket-id vector4w vector4w vector4w symbol))
(define-extern add-debug-text-3d (function symbol bucket-id string vector font-color vector2h symbol))
(define-extern add-debug-text-sphere (function symbol bucket-id vector meters string rgba symbol))
;; NOTE - for debug
(define-extern add-debug-sphere (function symbol bucket-id vector meters rgba symbol))
;; NOTE - for joint-mod-h
(define-extern add-debug-matrix (function symbol bucket-id matrix meters matrix))
;; NOTE - for menu
;; +++debug-menu-msg
(defenum debug-menu-msg
@@ -65,6 +68,7 @@
:flag-assert #x900000010
)
(deftype debug-vertex (structure)
((trans vector4w :inline :offset-assert 0)
(normal vector3h :inline :offset-assert 16)
@@ -87,27 +91,47 @@
:flag-assert #x900004b10
)
(define *color-black* (new 'static 'rgba :a #x80))
(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
(define *color-red* (new 'static 'rgba :r #xff :a #x80))
(define *color-green* (new 'static 'rgba :g #xff :a #x80))
(define *color-blue* (new 'static 'rgba :b #xff :a #x80))
(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80))
(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80))
(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80))
(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80))
(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80))
(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80))
(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80))
(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80))
(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80))
(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80))
(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80))
(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80))
(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80))
(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80))
(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80))
(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80))
(define-extern add-debug-matrix (function symbol bucket-id matrix meters matrix))
(define *color-black* (new 'static 'rgba :a #x80))
(define *color-white* (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80))
(define *color-gray* (new 'static 'rgba :r #x80 :g #x80 :b #x80 :a #x80))
(define *color-red* (new 'static 'rgba :r #xff :a #x80))
(define *color-green* (new 'static 'rgba :g #xff :a #x80))
(define *color-blue* (new 'static 'rgba :b #xff :a #x80))
(define *color-cyan* (new 'static 'rgba :g #xff :b #xff :a #x80))
(define *color-magenta* (new 'static 'rgba :r #xff :b #xff :a #x80))
(define *color-yellow* (new 'static 'rgba :r #xff :g #xff :a #x80))
(define *color-light-red* (new 'static 'rgba :r #xff :g #x80 :b #x80 :a #x80))
(define *color-light-green* (new 'static 'rgba :r #x80 :g #xff :b #x80 :a #x80))
(define *color-light-blue* (new 'static 'rgba :r #x80 :g #x80 :b #xff :a #x80))
(define *color-light-cyan* (new 'static 'rgba :r #x80 :g #xff :b #xff :a #x80))
(define *color-light-magenta* (new 'static 'rgba :r #xff :g #x80 :b #xff :a #x80))
(define *color-light-yellow* (new 'static 'rgba :r #xff :g #xff :b #x80 :a #x80))
(define *color-dark-red* (new 'static 'rgba :r #x80 :a #x80))
(define *color-dark-green* (new 'static 'rgba :g #x80 :a #x80))
(define *color-dark-blue* (new 'static 'rgba :b #x80 :a #x80))
(define *color-dark-cyan* (new 'static 'rgba :g #x80 :b #x80 :a #x80))
(define *color-dark-magenta* (new 'static 'rgba :r #x80 :b #x80 :a #x80))
(define *color-dark-yellow* (new 'static 'rgba :r #x80 :g #x80 :a #x80))
(define *color-orange* (new 'static 'rgba :r #xff :g #x80 :a #x80))
+19 -22
View File
@@ -670,8 +670,7 @@
#f
)
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector) (end vector) (color vector))
"Draw a line in screen coordinates"
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector4w) (end vector4w) (color vector4w))
(if (not enable)
(return #f)
)
@@ -683,11 +682,11 @@
)
(set! (-> p0 quad) (-> start quad))
(set! (-> p1 quad) (-> end quad))
(set! (-> p0 x) (* (+ (-> p0 x) 2048) 16))
(set! (-> p0 y) (* -16 (- 2048 (-> p0 y))))
(set! (-> p0 x) (the-as int (* (+ (-> p0 x) 2048) 16)))
(set! (-> p0 y) (* -16 (the-as int (- 2048 (the-as int (-> p0 y))))))
(set! (-> p0 z) #x7fffff)
(set! (-> p1 x) (* (+ (-> p1 x) 2048) 16))
(set! (-> p1 y) (* -16 (- 2048 (-> p1 y))))
(set! (-> p1 x) (the-as int (* (+ (-> p1 x) 2048) 16)))
(set! (-> p1 y) (* -16 (the-as int (- 2048 (the-as int (-> p1 y))))))
(set! (-> p1 z) #x7fffff)
(let ((a0-18 (the-as (pointer uint64) (-> buf base))))
(let* ((a1-7 buf)
@@ -701,22 +700,20 @@
(let* ((a1-8 buf)
(giftag (the-as gs-gif-tag (-> a1-8 base)))
)
(set! (-> giftag tag)
(new 'static 'gif-tag64
:nloop #x1
:eop #x1
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type line) :iip #x1 :abe #x1)
:nreg #x4
)
(set! (-> giftag tag) (new 'static 'gif-tag64
:nloop #x1
:eop #x1
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type line) :iip #x1 :abe #x1)
:nreg #x4
)
)
(set! (-> giftag regs)
(new 'static 'gif-tag-regs
:regs0 (gif-reg-id rgbaq)
:regs1 (gif-reg-id xyzf2)
:regs2 (gif-reg-id rgbaq)
:regs3 (gif-reg-id xyzf2)
)
(set! (-> giftag regs) (new 'static 'gif-tag-regs
:regs0 (gif-reg-id rgbaq)
:regs1 (gif-reg-id xyzf2)
:regs2 (gif-reg-id rgbaq)
:regs3 (gif-reg-id xyzf2)
)
)
(set! (-> a1-8 base) (&+ (the-as pointer giftag) 16))
)
@@ -1943,4 +1940,4 @@
)
0
(none)
)
)
+7 -26
View File
@@ -9,29 +9,6 @@
(declare-type continue-point basic)
(declare-type game-save basic)
(defenum mc-status-code
:type uint32
; (busy 0)
(ok 1)
; (bad-handle 2)
; (format-failed 3)
; (internal-error 4)
; (write-error 5)
; (read-error 6)
; (new-game 7)
; (no-memory 8)
; (no-card 9)
; (no-last 10)
; (no-format 11)
; (no-file 12)
; (no-save 13)
; (no-space 14)
; (bad-version 15)
; (no-process 16)
; (no-auto-save 17)
)
(defenum continue-flags
:type uint32
:bitfield #t
@@ -131,6 +108,10 @@
(define-extern bug-report-display (function symbol int))
(define-extern trsq->continue-point (function trsq int))
;; NOTE - for progress
(declare-type highscore-info structure)
(define-extern *highscore-info-array* (array highscore-info))
(declare-type entity-perm structure)
(define-extern *task-level* (array symbol))
@@ -276,7 +257,7 @@
(debug-features game-feature :offset-assert 136)
(secrets game-secrets :offset-assert 144)
(unknown-pad1 uint32 :offset-assert 148)
(purchase-secrets uint32 :offset-assert 152)
(purchase-secrets game-secrets :offset-assert 152)
(unknown-pad2 uint32 :offset-assert 156)
(gun-type int32 :offset-assert 160)
(gun-ammo float 4 :offset-assert 164)
@@ -295,7 +276,7 @@
(last-continue continue-point :offset-assert 244)
(play-list (array game-task-info) :offset-assert 248)
(sub-task-list (array game-task-node-info) :offset-assert 252)
(unknown-pad5 (array game-task-node-info) :offset-assert 256)
(mission-list (array game-task-node-info) :offset-assert 256)
(task-counter uint32 :offset-assert 260)
(unknown-pad6 (array uint16) :offset-assert 264)
(level-opened uint8 32 :offset-assert 268)
@@ -318,7 +299,7 @@
(letterbox-time time-frame :offset-assert 400)
(hint-play-time time-frame :offset-assert 408)
(display-text-time time-frame :offset-assert 416)
(display-text-handle uint64 :offset-assert 424)
(display-text-handle handle :offset-assert 424)
(death-movie-tick int32 :offset-assert 432)
(want-auto-save symbol :offset-assert 436)
(auto-save-proc handle :offset-assert 440)
+1 -1
View File
@@ -1636,7 +1636,7 @@
0
)
(if (zero? (-> gp-0 display-text-handle))
(set! (-> gp-0 display-text-handle) (the-as uint #f))
(set! (-> gp-0 display-text-handle) (the-as handle #f))
)
(if (zero? (-> gp-0 game-score))
(set! (-> gp-0 game-score) (new 'global 'boxed-array float 152))
+3 -3
View File
@@ -390,7 +390,7 @@
(and (!= *cheat-mode* 'camera) (or (zero? *screen-shot-work*) (= (-> *screen-shot-work* count) -1)))
)
(draw-string-xy
"pause or something like that" ;;(lookup-text! *common-text* (game-text-id pause) #f)
(lookup-text! *common-text* (game-text-id pause) #f)
buf
256
(if (< (-> *display* base-clock frame-counter) (-> *game-info* letterbox-time))
@@ -539,7 +539,7 @@
)
;; load text files as needed from the menu update
; (load-level-text-files -1)
(load-level-text-files -1)
;; post-processing filter drawing
; (if (-> *screen-filter* draw?)
@@ -719,7 +719,7 @@
; )
(let ((gp-1 *display*))
(set! *teleport* #t)
; (update *setting-control*)
(update *setting-control*)
(init-time-of-day-context *time-of-day-context*)
(format 0 "about to display-sync~%")
(display-sync gp-1)
+1 -1
View File
@@ -12305,7 +12305,7 @@
)
)
)
(set! (-> gp-0 unknown-pad5) (new 'global 'boxed-array game-task-node-info 324))
(set! (-> gp-0 mission-list) (new 'global 'boxed-array game-task-node-info 324))
(dotimes (v1-3 (-> gp-0 sub-task-list length))
(if (-> gp-0 sub-task-list v1-3 info)
(set! (-> gp-0 sub-task-list v1-3 info manager) (the-as handle #f))
@@ -249,6 +249,9 @@
(define-extern task-node-open? (function game-task-node symbol))
(define-extern play-task (function game-task symbol symbol string))
;; NOTE - for progress
(define-extern restart-mission (function int))
;; DECOMP BEGINS
(defun-debug game-task->string ((arg0 game-task))
-1
View File
@@ -971,7 +971,6 @@
(defun matrix-axis-angle! ((arg0 matrix) (arg1 vector) (arg2 float))
"Create an axis-angle rotation matrix."
(matrix-axis-sin-cos! arg0 arg1 (sin arg2) (cos arg2))
(none)
)
(defun matrix-lerp! ((arg0 matrix) (arg1 matrix) (arg2 matrix) (arg3 float))
@@ -53,17 +53,19 @@
:flag-assert #x1b005000cc
(:methods
(get-trans (_type_ int) vector 20)
(get-quat (_type_) quaternion 21)
(get-quat (_type_ int) quaternion 21)
(get-transv (_type_) vector 22)
(process-focusable-method-23 (_type_) none 23)
(process-focusable-method-24 (_type_) none 24)
(process-focusable-method-25 (_type_) int 25)
(process-focusable-method-24 (_type_) float 24)
(process-focusable-method-25 (_type_) time-frame 25)
(process-focusable-method-26 (_type_) none 26)
)
)
;; WARN: Return type mismatch structure vs vector.
(defmethod get-trans process-focusable ((obj process-focusable) (arg0 int))
"@returns the `trans` [[vector]] from the process's `root` (typically either a [[trsqv]] or a [[collide-shape]]"
(let ((gp-0 (-> obj root)))
(the-as vector (cond
((zero? arg0)
@@ -87,7 +89,7 @@
(-> obj root transv)
)
(defmethod get-quat process-focusable ((obj process-focusable))
(defmethod get-quat process-focusable ((obj process-focusable) (arg0 int))
(-> obj root quat)
)
@@ -97,8 +99,7 @@
)
(defmethod process-focusable-method-24 process-focusable ((obj process-focusable))
0
(none)
0.0
)
(defmethod process-focusable-method-26 process-focusable ((obj process-focusable))
@@ -106,12 +107,7 @@
(none)
)
;; WARN: Return type mismatch int vs time-frame.
(defmethod process-focusable-method-25 process-focusable ((obj process-focusable))
0
(the-as time-frame 0)
)
0
+25
View File
@@ -5,6 +5,31 @@
;; name in dgo: memcard-h
;; dgos: ENGINE, GAME
;; +++mc-status-code
(defenum mc-status-code
:type uint32
(busy 0)
(ok 1)
(bad-handle 2)
(format-failed 3)
(internal-error 4)
(write-error 5)
(read-error 6)
(new-game 7)
(no-memory 8)
(no-card 9)
(no-last 10)
(no-format 11)
(no-file 12)
(no-save 13)
(no-space 14)
(bad-version 15)
(no-process 16)
(no-auto-save 17)
)
;; ---mc-status-code
;; DECOMP BEGINS
(deftype mc-handle (int32)
@@ -286,8 +286,6 @@
(none)
)
;; definition for function target-board-halfpipe-trans
;; WARN: Return type mismatch int vs none.
(defbehavior target-board-halfpipe-trans target ()
(when (and (logtest? (focus-status halfpipe) (-> self focus-status)) *camera*)
(let ((gp-0 (new 'stack-no-clear 'vector)))
@@ -318,8 +316,6 @@
(none)
)
;; definition for function target-board-resolve-points
;; WARN: Return type mismatch int vs none.
(defbehavior target-board-resolve-points target ((arg0 float) (arg1 float) (arg2 float) (arg3 float))
(when (= (-> self board main mode) (joint-mod-mode rotate))
(let ((f0-1 (fabs (-> self board troty-cum))))
@@ -398,7 +394,7 @@
(t9-8 (the-as vector a0-4) (the-as float a1-0))
)
)
(when (zero? (logand (-> self control old-status) (cshape-moving-flags on-surface)))
(when (not (logtest? (-> self control old-status) (cshape-moving-flags on-surface)))
(let ((gp-0 (new 'stack-no-clear 'vector)))
(set! (-> gp-0 quad) (-> self control trans quad))
(set! (-> gp-0 y) (+ 2048.0 (-> gp-0 y)))
@@ -491,8 +487,6 @@
(none)
)
;; definition for function target-board-halfpipe-check
;; INFO: Used lq/sq
(defbehavior target-board-halfpipe-check target ()
(local-vars (v0-3 collide-action))
(let ((gp-0 (vector-flatten!
@@ -532,7 +526,6 @@
)
)
;; definition for function target-board-jump-trans
(defbehavior target-board-jump-trans target ()
(when (and (!= (-> self state-time) (-> self clock frame-counter)) (jump-hit-ground-stuck?))
(set! (-> self board jump-land-time) (-> self clock frame-counter))
@@ -544,8 +537,8 @@
(if (and (cpad-pressed? (-> self control unknown-cpad-info00 number) x)
(< (vector-dot (-> self control dynam gravity-normal) (-> self control transv)) 12288.0)
(< -61440.0 (vector-dot (-> self control dynam gravity-normal) (-> self control transv)))
(and (zero? (logand (water-flags touch-water) (-> self water flags)))
(zero? (logand (-> self state-flags) (state-flags sf7)))
(and (not (logtest? (water-flags touch-water) (-> self water flags)))
(not (logtest? (-> self state-flags) (state-flags sf7)))
(not (and (-> self next-state) (= (-> self next-state name) 'target-board-wall-kick)))
)
)
@@ -555,7 +548,6 @@
(none)
)
;; failed to figure out what this is:
(defstate target-board-start (target)
:event target-board-handler
:exit target-board-exit
@@ -568,10 +560,9 @@
:post target-post
)
;; failed to figure out what this is:
(defstate target-board-stance (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('lip)
(when (and (= (-> self control ground-pat mode) (pat-mode halfpipe))
(< (-> self control poly-angle) 0.5)
@@ -588,7 +579,7 @@
)
(set! (-> self board halfpipe-lip-time) (-> self clock frame-counter))
(set! (-> self board halfpipe-side-time) (-> self clock frame-counter))
(set! (-> self board halfpipe-lip-event) (the-as symbol (-> arg3 param 0)))
(set! (-> self board halfpipe-lip-event) (the-as symbol (-> event param 0)))
(let ((v0-2 (the-as object (logior (-> self control root-prim prim-core action) (collide-action no-normal-reset))))
)
(set! (-> self control root-prim prim-core action) (the-as collide-action v0-2))
@@ -599,13 +590,13 @@
(('jump)
(go
target-board-jump
(the-as meters (-> arg3 param 0))
(the-as meters (-> arg3 param 1))
(the-as symbol (-> arg3 param 2))
(the-as meters (-> event param 0))
(the-as meters (-> event param 1))
(the-as symbol (-> event param 2))
)
)
(else
(target-board-handler arg0 arg1 arg2 arg3)
(target-board-handler proc arg1 event-type event)
)
)
)
@@ -641,7 +632,7 @@
)
:trans (behavior ()
(if (and (cpad-hold? (-> self control unknown-cpad-info00 number) l1)
(zero? (logand (-> self state-flags) (state-flags sf9)))
(not (logtest? (-> self state-flags) (state-flags sf9)))
(< (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
)
@@ -826,7 +817,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-duck-stance (target)
:event (-> target-board-stance event)
:enter (behavior ()
@@ -840,8 +830,7 @@
(none)
)
:trans (behavior ()
(if (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1))
)
(if (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1))
(logtest? (-> self state-flags) (state-flags sf9))
(>= (- (-> self clock frame-counter) (-> self control unknown-time-frame06))
(the-as time-frame (-> *TARGET-bank* ground-timeout))
@@ -936,13 +925,12 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-jump (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(if (and (= arg2 'edge-grab) (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.1)))
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(if (and (= event-type 'edge-grab) (< (- (-> self clock frame-counter) (-> self state-time)) (seconds 0.1)))
(return #f)
)
(target-board-handler arg0 arg1 arg2 arg3)
(target-board-handler proc arg1 event-type event)
)
:enter (behavior ((arg0 meters) (arg1 meters) (arg2 symbol))
(local-vars
@@ -1154,10 +1142,9 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-halfpipe (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('edge-grab)
(format
#t
@@ -1202,14 +1189,14 @@
)
)
(('grenade)
(if (< (the-as float (-> arg3 param 0))
(if (< (the-as float (-> event param 0))
(vector-dot (-> self control dynam gravity-normal) (-> self control transv))
)
(go target-board-grenade (process->handle arg0))
(go target-board-grenade (process->handle proc))
)
)
(else
(target-board-handler arg0 arg1 arg2 arg3)
(target-board-handler proc arg1 event-type event)
)
)
)
@@ -1419,7 +1406,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-falling (target)
:event target-board-handler
:enter (behavior ()
@@ -1503,7 +1489,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-jump-kick (target)
:event target-board-handler
:enter (behavior ()
@@ -1555,7 +1540,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-wall-kick (target)
:event target-board-handler
:enter (behavior ((arg0 vector) (arg1 float))
@@ -1605,7 +1589,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-flip (target)
:event (-> target-board-jump event)
:enter (behavior ((arg0 float) (arg1 float) (arg2 symbol))
@@ -1698,8 +1681,7 @@
(let ((f0-9 (analog-input (the int (* 128.0 (-> s5-0 z))) 0.0 96.0 110.0 1.0))
(s4-0 0)
)
(while (not (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons r1))
)
(while (not (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) r1))
(or (= f0-9 0.0) (jump-hit-ground-stuck?) (< (target-time-to-ground) (seconds 0.5)))
)
(nonzero? s4-0)
@@ -1788,7 +1770,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-hold (target)
:event (-> target-board-jump event)
:enter (behavior ((arg0 float) (arg1 float) (arg2 symbol))
@@ -1865,8 +1846,7 @@
(set! (-> v1-0 z) (* -0.0078125 (+ -128.0 (the float (-> self control unknown-cpad-info00 lefty)))))
(set! (-> v1-0 w) 1.0)
(let ((f30-0 (analog-input (the int (* 128.0 (-> v1-0 z))) 0.0 96.0 110.0 1.0)))
(while (not (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons l1))
)
(while (not (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) l1))
(jump-hit-ground-stuck?)
(< (target-time-to-ground) (seconds 0.3))
)
@@ -1993,7 +1973,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-trickx (target)
:event (-> target-board-jump event)
:enter (-> target-board-hold enter)
@@ -2032,8 +2011,7 @@
(let ((f0-9 (analog-input (the int (* 128.0 (-> s5-0 z))) 0.0 96.0 110.0 1.0))
(s4-0 0)
)
(while (not (and (or (zero? (logand (-> *cpad-list* cpads (-> self control unknown-cpad-info00 number) button0-abs 0) (pad-buttons r1))
)
(while (not (and (or (not (cpad-hold? (-> self control unknown-cpad-info00 number) r1))
(or (= f0-9 0.0) (jump-hit-ground-stuck?) (< (target-time-to-ground) (seconds 0.5)))
)
(nonzero? s4-0)
@@ -2103,7 +2081,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-hit-ground (target)
:event target-board-handler
:enter (behavior ()
@@ -2188,7 +2165,6 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-turn-to (target)
:event target-board-handler
:enter (behavior ((arg0 vector) (arg1 time-frame))
@@ -2257,15 +2233,14 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-ride-edge (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('edge-grab 'push-transv 'push-trans)
#f
)
(('end-mode)
(when (-> arg3 param 0)
(when (-> event param 0)
(let ((v1-6 (/ (- (-> self clock frame-counter) (-> self board ride-start-time)) 300)))
(if (> v1-6 0)
(add-to-trick-list (-> self board) (board-tricks board-rail) (* 100.0 (the float v1-6)))
@@ -2275,7 +2250,7 @@
(go target-board-turn-to (-> self control transv) (seconds 0.2))
)
(else
(target-board-handler arg0 arg1 arg2 arg3)
(target-board-handler proc arg1 event-type event)
)
)
)
@@ -2531,15 +2506,14 @@
)
)
;; failed to figure out what this is:
(defstate target-board-grenade (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('target)
(handle->process (-> self control unknown-handle02))
)
(else
(target-board-handler arg0 arg1 arg2 arg3)
(target-board-handler proc arg1 event-type event)
)
)
)
@@ -2642,21 +2616,20 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-get-on (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('attack 'attack-or-shove 'attack-invinc)
(target-attacked
arg2
(the-as attack-info (-> arg3 param 1))
arg0
(the-as process (-> arg3 param 0))
event-type
(the-as attack-info (-> event param 1))
proc
(the-as process (-> event param 0))
target-hit
)
)
(else
(target-generic-event-handler arg0 arg1 arg2 arg3)
(target-generic-event-handler proc arg1 event-type event)
)
)
)
@@ -2800,15 +2773,14 @@
:post target-board-post
)
;; failed to figure out what this is:
(defstate target-board-pegasus (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(case arg2
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(case event-type
(('end-mode)
(go target-jump 16384.0 16384.0 (the-as surface #f))
)
(else
(target-generic-event-handler arg0 arg1 arg2 arg3)
(target-generic-event-handler proc arg1 event-type event)
)
)
)
@@ -2844,13 +2816,7 @@
(when s4-1
(set! (-> self control unknown-vector38 quad) (-> (get-trans (the-as process-focusable s4-1) 0) quad))
(set! (-> self control unknown-vector38 y) (+ 4096.0 (-> self control unknown-vector38 y)))
(let* ((s3-2 (-> self control unknown-vector40))
(a0-15 (the-as process-focusable s4-1))
(t9-4 (method-of-object a0-15 get-quat))
)
0
(set! (-> s3-2 quad) (-> (t9-4 a0-15) vec quad))
)
(set! (-> self control unknown-vector40 quad) (-> (get-quat (the-as process-focusable s4-1) 0) vec quad))
)
(let ((f28-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 30.0))))
(let ((f26-0 f28-0))
@@ -2904,7 +2870,6 @@
)
)
;; failed to figure out what this is:
(defstate target-board-get-off (target)
:event (-> target-board-get-on event)
:enter (behavior ((arg0 object) (arg1 symbol))
@@ -3103,23 +3068,22 @@
)
)
;; failed to figure out what this is:
(defstate target-board-grab (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(cond
((and (= arg2 'query) (= (-> arg3 param 0) 'mode))
((and (= event-type 'query) (= (-> event param 0) 'mode))
(-> self state name)
)
(else
(case arg2
(case event-type
(('end-mode)
(go target-board-stance)
)
(('clone-anim)
(go target-board-clone-anim (process->handle (the-as process (-> arg3 param 0))))
(go target-board-clone-anim (process->handle (the-as process (-> event param 0))))
)
(('change-mode)
(case (-> arg3 param 0)
(case (-> event param 0)
(('normal)
enter-state
'stance
@@ -3128,7 +3092,7 @@
)
)
(else
(target-generic-event-handler arg0 arg1 arg2 arg3)
(target-generic-event-handler proc arg1 event-type event)
)
)
)
@@ -3169,11 +3133,11 @@
)
(defstate target-board-clone-anim (target)
:event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block))
(if (and (= arg2 'trans) (= (-> arg3 param 0) 'restore))
:event (behavior ((proc process) (arg1 int) (event-type symbol) (event event-message-block))
(if (and (= event-type 'trans) (= (-> event param 0) 'restore))
(set! (-> self control unknown-word04) (the-as uint #f))
)
((-> target-board-grab event) arg0 arg1 arg2 arg3)
((-> target-board-grab event) proc arg1 event-type event)
)
:enter (-> target-clone-anim enter)
:exit (behavior ()
@@ -3196,7 +3160,6 @@
:post target-no-ja-move-post
)
;; failed to figure out what this is:
(defstate target-board-hit (target)
:event target-board-handler
:exit (behavior ()
@@ -3258,7 +3221,7 @@
)
self
((method-of-type attack-info attack-info-method-11))
(when (zero? (logand (-> gp-0 mask) (attack-info-mask vector)))
(when (not (logtest? (-> gp-0 mask) (attack-info-mask vector)))
(vector-z-quaternion! (-> gp-0 vector) (-> self control unknown-quaternion00))
(vector-xz-normalize! (-> gp-0 vector) (- (fabs (-> gp-0 shove-back))))
(set! (-> gp-0 vector y) (-> gp-0 shove-up))
+2 -2
View File
@@ -1842,11 +1842,11 @@
(when (!= (-> self beard?) v1-248)
(cond
(v1-248
(draw-control-method-12 (-> self draw) 2 0)
(draw-control-method-12 (-> self draw) (the-as uint 2) 0)
(set! (-> self beard?) #t)
)
(else
(draw-control-method-12 (-> self draw) 0 2)
(draw-control-method-12 (-> self draw) (the-as uint 0) 2)
(set! (-> self beard?) #f)
)
)
+19 -53
View File
@@ -5,8 +5,13 @@
;; name in dgo: bigmap-h
;; dgos: ENGINE, GAME
;; DECOMP BEGINS
(declare-type bigmap-compressed-layers structure)
(define-extern *bigmap-compressed-layers* bigmap-compressed-layers)
(declare-type bigmap basic)
(define-extern *bigmap* bigmap)
;; DECOMP BEGINS
(deftype bigmap-bit-mask (structure)
((data uint8 6656 :offset-assert 0)
@@ -16,6 +21,7 @@
:flag-assert #x900001a00
)
(deftype bigmap-layer-mask (structure)
((data uint8 26624 :offset-assert 0)
)
@@ -24,6 +30,7 @@
:flag-assert #x900006800
)
(deftype bigmap-image (structure)
((clut-offset uint32 :offset-assert 0)
(image-offset uint32 :offset-assert 4)
@@ -35,6 +42,7 @@
:flag-assert #x900000011
)
(deftype bigmap-info (vector)
((scale float :offset 8)
(inv-scale float :offset 12)
@@ -44,6 +52,7 @@
:flag-assert #x900000010
)
(deftype bigmap-info-array (structure)
((data bigmap-info 21 :inline :offset-assert 0)
)
@@ -52,6 +61,7 @@
:flag-assert #x900000150
)
(deftype bigmap-compressed-layers (structure)
((data uint32 20 :offset-assert 0)
(layer0 uint32 :offset 0)
@@ -79,7 +89,6 @@
:size-assert #x50
:flag-assert #x900000050
)
(define-extern *bigmap-compressed-layers* bigmap-compressed-layers)
(deftype bigmap (basic)
@@ -130,7 +139,7 @@
(new (symbol type) _type_ 0)
(initialize (_type_) none 9)
(update (_type_) none 10)
(bigmap-method-11 () none 11)
(bigmap-method-11 (_type_ int int int int) none 11)
(bigmap-method-12 () none 12)
(bigmap-method-13 () none 13)
(bigmap-method-14 (_type_) none 14)
@@ -150,6 +159,7 @@
)
)
(defmethod new bigmap ((allocation symbol) (type-to-make type))
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> gp-0 bigmap-image)
@@ -199,57 +209,18 @@
(set! (-> gp-0 sprite-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)))
(set! (-> gp-0 sprite-tmpl dma-vif vif0) (new 'static 'vif-tag))
(set! (-> gp-0 sprite-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1))
(set! (-> gp-0 sprite-tmpl gif0)
(the uint64 (new 'static 'gif-tag64
:nloop #x1
:eop #x1
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type sprite) :tme #x1 :abe #x1 :fst #x1)
:nreg #x5
)
)
)
(set! (-> gp-0 sprite-tmpl gif1)
(the uint64 (new 'static 'gif-tag-regs
:regs0 (gif-reg-id rgbaq)
:regs1 (gif-reg-id uv)
:regs2 (gif-reg-id xyz2)
:regs3 (gif-reg-id uv)
:regs4 (gif-reg-id xyz2)
)
)
)
(set! (-> gp-0 sprite-tmpl gif0) (the-as uint #x50ab400000008001))
(set! (-> gp-0 sprite-tmpl gif1) (the-as uint #x53531))
(set! (-> gp-0 draw-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)))
(set! (-> gp-0 draw-tmpl dma-vif vif0) (new 'static 'vif-tag))
(set! (-> gp-0 draw-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1))
(set! (-> gp-0 draw-tmpl gif0)
(the uint64 (new 'static 'gif-tag64
:nloop #x1
:eop #x1
:pre #x1
:prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :tme #x1 :abe #x1 :fst #x1)
:nreg #x9
)
)
)
(set! (-> gp-0 draw-tmpl gif1) (the uint64 (new 'static 'gif-tag-regs
:regs0 (gif-reg-id rgbaq)
:regs1 (gif-reg-id uv)
:regs2 (gif-reg-id xyz2)
:regs3 (gif-reg-id uv)
:regs4 (gif-reg-id xyz2)
:regs5 (gif-reg-id uv)
:regs6 (gif-reg-id xyz2)
:regs7 (gif-reg-id uv)
:regs8 (gif-reg-id xyz2)
)
)
)
(set! (-> gp-0 draw-tmpl gif0) (the-as uint #x90aa400000008001))
(set! (-> gp-0 draw-tmpl gif1) (the-as uint #x535353531))
(set! (-> gp-0 adgif-tmpl dma-vif dma) (new 'static 'dma-tag :qwc #x6 :id (dma-tag-id cnt)))
(set! (-> gp-0 adgif-tmpl dma-vif vif0) (new 'static 'vif-tag))
(set! (-> gp-0 adgif-tmpl dma-vif vif1) (new 'static 'vif-tag :imm #x6 :cmd (vif-cmd direct) :msk #x1))
(set! (-> gp-0 adgif-tmpl gif0) (the uint64 (new 'static 'gif-tag64 :nloop #x5 :eop #x1 :nreg #x1)))
(set! (-> gp-0 adgif-tmpl gif1) (the uint64 (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))))
(set! (-> gp-0 adgif-tmpl gif0) (the-as uint #x1000000000008005))
(set! (-> gp-0 adgif-tmpl gif1) (the-as uint 14))
(set-vector! (-> gp-0 offset) 0.0 0.0 0.0 0.0)
(set-vector! (-> gp-0 scroll) 0.0 0.0 0.0 0.0)
(set-vector! (-> gp-0 pos) 0 0 0 0)
@@ -292,8 +263,3 @@
)
)
)
(define-extern *bigmap* bigmap)
+66 -9
View File
@@ -10,6 +10,15 @@
:bitfield #t
)
;; NOTE - for progress
(define-extern hide-hud (function symbol none))
(define-extern hud-hidden? (function symbol))
(declare-type hud-sprite structure)
(define-extern set-hud-piece-position! (function hud-sprite int int none))
(define-extern show-hud (function object none))
(declare-type hud process)
(define-extern hud-init-by-other (function object :behavior hud))
;; DECOMP BEGINS
(deftype hud-string (basic)
@@ -24,6 +33,7 @@
:flag-assert #x900000030
)
(deftype hud-sprite (structure)
((pos vector4w :inline :offset-assert 0)
(color vector4w :inline :offset-assert 16)
@@ -37,11 +47,12 @@
:size-assert #x34
:flag-assert #xb00000034
(:methods
(hud-sprite-method-9 () none 9)
(hud-sprite-method-9 (_type_ dma-buffer level) none 9)
(hud-sprite-method-10 () none 10)
)
)
(deftype hud-box (structure)
((min vector2 :inline :offset-assert 0)
(max vector2 :inline :offset-assert 8)
@@ -51,16 +62,17 @@
:size-assert #x20
:flag-assert #x1000000020
(:methods
(hud-box-method-9 () none 9)
(hud-box-method-9 (_type_ dma-buffer) none 9)
(hud-box-method-10 () none 10)
(hud-box-method-11 () none 11)
(hud-box-method-12 () none 12)
(hud-box-method-13 (_type_ dma-buffer float) int 13)
(hud-box-method-14 () none 14)
(hud-box-method-15 () none 15)
(hud-box-method-14 (_type_) none 14)
(hud-box-method-15 (_type_) none 15)
)
)
(deftype hud-icon (basic)
((icon (pointer manipy) :offset-assert 4)
(pos vector4w :inline :offset-assert 16)
@@ -72,6 +84,7 @@
:flag-assert #x900000028
)
(deftype hud-value (basic)
((current int32 :offset-assert 4)
(target int32 :offset-assert 8)
@@ -84,6 +97,7 @@
:flag-assert #x900000010
)
(deftype hud (process)
((trigger-time time-frame :offset-assert 128)
(last-hide-time time-frame :offset-assert 136)
@@ -116,6 +130,7 @@
)
)
(deftype hud-ashelin (hud)
()
:heap-base #xb30
@@ -124,6 +139,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-cargo (hud)
()
:heap-base #xb30
@@ -132,6 +148,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-citizen (hud)
()
:heap-base #xb30
@@ -140,6 +157,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-cpanel (hud)
()
:heap-base #xb30
@@ -148,6 +166,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-dig-clasp (hud)
()
:heap-base #xb30
@@ -156,6 +175,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-gun (hud)
()
:heap-base #xb30
@@ -164,6 +184,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-health (hud)
()
:heap-base #xb30
@@ -172,6 +193,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-dark-eco-symbol (hud)
()
:heap-base #xb30
@@ -180,6 +202,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-helldog (hud)
()
:heap-base #xb30
@@ -188,6 +211,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-lurker (hud)
()
:heap-base #xb30
@@ -196,6 +220,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-map (hud)
()
:heap-base #xb30
@@ -204,6 +229,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-moneybag (hud)
()
:heap-base #xb30
@@ -212,6 +238,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-pegasus (hud)
()
:heap-base #xb30
@@ -220,6 +247,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-plasmite (hud)
()
:heap-base #xb30
@@ -228,6 +256,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-dig-button (hud)
()
:heap-base #xb30
@@ -236,6 +265,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-predator (hud)
()
:heap-base #xb30
@@ -244,6 +274,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-heatmeter (hud)
()
:heap-base #xb30
@@ -252,6 +283,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-progress (hud)
()
:heap-base #xb30
@@ -260,6 +292,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-rocketsensor (hud)
()
:heap-base #xb30
@@ -268,6 +301,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-ruffians (hud)
()
:heap-base #xb30
@@ -276,6 +310,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-score (hud)
()
:heap-base #xb30
@@ -284,6 +319,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-sig (hud)
()
:heap-base #xb30
@@ -292,6 +328,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-skill (hud)
()
:heap-base #xb30
@@ -300,6 +337,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-skullgem (hud)
()
:heap-base #xb30
@@ -308,6 +346,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-timer (hud)
()
:heap-base #xb30
@@ -316,6 +355,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-turret (hud)
()
:heap-base #xb30
@@ -324,6 +364,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-squid (hud)
()
:heap-base #xb30
@@ -332,6 +373,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-gunturret (hud)
()
:heap-base #xb30
@@ -340,6 +382,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-gruntegg (hud)
()
:heap-base #xb30
@@ -348,6 +391,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-crimsonhover (hud)
()
:heap-base #xb30
@@ -356,6 +400,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-metalkor (hud)
()
:heap-base #xb30
@@ -364,6 +409,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-big-score (hud)
()
:heap-base #xb30
@@ -372,6 +418,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-goal (hud)
()
:heap-base #xb30
@@ -380,6 +427,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-miss (hud)
()
:heap-base #xb30
@@ -388,6 +436,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-race-timer (hud)
()
:heap-base #xb30
@@ -396,6 +445,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-race-lap-counter (hud)
()
:heap-base #xb30
@@ -404,6 +454,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-race-turbo-counter (hud)
()
:heap-base #xb30
@@ -412,6 +463,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-race-position (hud)
()
:heap-base #xb30
@@ -420,6 +472,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-race-map (hud)
()
:heap-base #xb30
@@ -428,6 +481,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-samos-old (hud)
()
:heap-base #xb30
@@ -436,6 +490,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-samos-young (hud)
()
:heap-base #xb30
@@ -444,6 +499,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-lurker-button (hud)
()
:heap-base #xb30
@@ -452,6 +508,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-widow (hud)
()
:heap-base #xb30
@@ -460,6 +517,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-race-final-stats (hud)
()
:heap-base #xb30
@@ -468,6 +526,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-mech-air-tank (hud)
()
:heap-base #xb30
@@ -476,6 +535,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-homing-beacon (hud)
()
:heap-base #xb30
@@ -484,6 +544,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-dark-eco-pickup (hud)
()
:heap-base #xb30
@@ -492,6 +553,7 @@
:flag-assert #x1b0b300ba4
)
(deftype hud-green-eco-pickup (hud)
()
:heap-base #xb30
@@ -499,8 +561,3 @@
:size-assert #xba4
:flag-assert #x1b0b300ba4
)
(define-extern hud-init-by-other (function object :behavior hud))
(define-extern show-hud (function object none))
File diff suppressed because it is too large Load Diff
+85 -24
View File
@@ -11,6 +11,16 @@
(declare-type menu-option basic)
(declare-type menu-option-list basic)
(declare-type progress process-drawable)
(define-extern *progress-process* (pointer progress))
(define-extern activate-progress (function process symbol none))
(define-extern memcard-unlocked-secrets? (function symbol game-secrets))
(define-extern progress-selected (function int int :behavior progress))
(define-extern get-num-highscores (function int))
(define-extern get-next-highscore (function int int))
(define-extern get-prev-highscore (function int int))
;; DECOMP BEGINS
(deftype progress (process-drawable)
@@ -61,29 +71,34 @@
)
)
(deftype menu-option (basic)
((name uint32 :offset-assert 4)
(scale basic :offset-assert 8)
(box bounding-box 1 :inline :offset-assert 16)
((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)
)
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
(:methods
(respond-progress (_type_ progress object symbol) int 9)
(menu-option-method-10 () none 10)
(respond-progress (_type_ progress object) int :behavior progress 9)
(menu-option-method-10 (_type_ progress font-context int symbol) none 10)
(menu-option-method-11 () none 11)
)
)
(deftype menu-on-off-option (menu-option)
((value-to-modify pointer :offset-assert 48)
((value-to-modify (pointer symbol) :offset-assert 48)
)
:method-count-assert 12
:size-assert #x34
:flag-assert #xc00000034
)
(deftype menu-yes-no-option (menu-option)
((value-to-modify pointer :offset-assert 48)
)
@@ -92,17 +107,19 @@
:flag-assert #xc00000034
)
(deftype menu-language-option (menu-option)
((language-selection uint64 :offset-assert 48)
(language-direction basic :offset-assert 56)
(language-transition basic :offset-assert 60)
(language-x-offset int32 :offset-assert 64)
((language-selection language-enum :offset-assert 48)
(language-direction symbol :offset-assert 56)
(language-transition basic :offset-assert 60)
(language-x-offset int32 :offset-assert 64)
)
:method-count-assert 12
:size-assert #x44
:flag-assert #xc00000044
)
(deftype menu-quit-option (menu-option)
()
:method-count-assert 12
@@ -110,6 +127,7 @@
:flag-assert #xc00000030
)
(deftype menu-slider-option (menu-option)
((value-to-modify pointer :offset-assert 48)
(sprites hud-sprite 5 :inline :offset-assert 64)
@@ -119,6 +137,7 @@
:flag-assert #xc00000180
)
(deftype menu-sub-menu-option (menu-option)
((next-state basic :offset-assert 48)
(pad uint8 44 :offset-assert 52)
@@ -128,6 +147,7 @@
:flag-assert #xc00000060
)
(deftype menu-sub-menu-sound-option (menu-option)
((next-state basic :offset-assert 48)
)
@@ -136,6 +156,7 @@
:flag-assert #xc00000034
)
(deftype menu-stereo-mode-sound-option (menu-option)
()
:method-count-assert 12
@@ -143,6 +164,7 @@
:flag-assert #xc00000030
)
(deftype menu-sub-menu-graphic-option (menu-option)
((next-state basic :offset-assert 48)
)
@@ -151,6 +173,7 @@
:flag-assert #xc00000034
)
(deftype menu-unlocked-menu-option (menu-sub-menu-option)
()
:method-count-assert 12
@@ -158,6 +181,7 @@
:flag-assert #xc00000060
)
(deftype menu-main-menu-option (menu-option)
((next-state basic :offset-assert 48)
)
@@ -166,6 +190,7 @@
:flag-assert #xc00000034
)
(deftype menu-memcard-slot-option (menu-option)
((sprites hud-sprite 5 :inline :offset-assert 48)
(pad uint8 32 :offset-assert 368)
@@ -175,6 +200,7 @@
:flag-assert #xc00000190
)
(deftype menu-loading-option (menu-option)
()
:method-count-assert 12
@@ -182,6 +208,7 @@
:flag-assert #xc00000030
)
(deftype menu-insufficient-space-option (menu-option)
((last-move uint64 :offset-assert 48)
)
@@ -190,6 +217,7 @@
:flag-assert #xc00000038
)
(deftype menu-secrets-insufficient-space-option (menu-option)
()
:method-count-assert 12
@@ -197,6 +225,7 @@
:flag-assert #xc00000030
)
(deftype menu-insert-card-option (menu-option)
()
:method-count-assert 12
@@ -204,6 +233,7 @@
:flag-assert #xc00000030
)
(deftype menu-error-loading-option (menu-option)
()
:method-count-assert 12
@@ -211,6 +241,7 @@
:flag-assert #xc00000030
)
(deftype menu-error-auto-saving-option (menu-option)
()
:method-count-assert 12
@@ -218,6 +249,7 @@
:flag-assert #xc00000030
)
(deftype menu-card-removed-option (menu-option)
()
:method-count-assert 12
@@ -225,6 +257,7 @@
:flag-assert #xc00000030
)
(deftype menu-error-disc-removed-option (menu-option)
()
:method-count-assert 12
@@ -232,6 +265,7 @@
:flag-assert #xc00000030
)
(deftype menu-error-reading-option (menu-option)
()
:method-count-assert 12
@@ -239,6 +273,7 @@
:flag-assert #xc00000030
)
(deftype menu-icon-info-option (menu-option)
((sprites hud-sprite 2 :inline :offset-assert 48)
)
@@ -247,6 +282,7 @@
:flag-assert #xc000000b0
)
(deftype menu-format-card-option (menu-option)
()
:method-count-assert 12
@@ -254,6 +290,7 @@
:flag-assert #xc00000030
)
(deftype menu-already-exists-option (menu-option)
()
:method-count-assert 12
@@ -261,6 +298,7 @@
:flag-assert #xc00000030
)
(deftype menu-create-game-option (menu-option)
()
:method-count-assert 12
@@ -268,6 +306,7 @@
:flag-assert #xc00000030
)
(deftype menu-video-mode-warning-option (menu-option)
()
:method-count-assert 12
@@ -275,6 +314,7 @@
:flag-assert #xc00000030
)
(deftype menu-video-mode-ok-option (menu-option)
()
:method-count-assert 12
@@ -282,6 +322,7 @@
:flag-assert #xc00000030
)
(deftype menu-progressive-mode-warning-option (menu-option)
()
:method-count-assert 12
@@ -289,6 +330,7 @@
:flag-assert #xc00000030
)
(deftype menu-progressive-mode-ok-option (menu-option)
()
:method-count-assert 12
@@ -296,6 +338,7 @@
:flag-assert #xc00000030
)
(deftype menu-select-start-option (menu-option)
((task-index int32 :offset-assert 48)
(real-task-index int32 :offset-assert 52)
@@ -306,6 +349,7 @@
:flag-assert #xc00000040
)
(deftype menu-select-scene-option (menu-option)
((task-index int32 :offset-assert 48)
(last-move uint64 :offset-assert 56)
@@ -315,6 +359,7 @@
:flag-assert #xc00000040
)
(deftype menu-bigmap-option (menu-option)
()
:method-count-assert 12
@@ -322,6 +367,7 @@
:flag-assert #xc00000030
)
(deftype paged-menu-option (menu-option)
((page-index int32 :offset-assert 48)
(prev-page-index int32 :offset-assert 52)
@@ -333,6 +379,7 @@
:flag-assert #xc00000040
)
(deftype menu-missions-option (paged-menu-option)
((task-line-index int32 :offset-assert 64)
(last-move uint64 :offset-assert 72)
@@ -342,6 +389,7 @@
:flag-assert #xc00000050
)
(deftype menu-highscores-option (paged-menu-option)
((last-move uint64 :offset-assert 64)
(sprites hud-sprite 2 :inline :offset-assert 80)
@@ -351,6 +399,7 @@
:flag-assert #xc000000d0
)
(deftype secret-item-option (menu-option)
((cost int32 :offset-assert 48)
(can-toggle symbol :offset-assert 52)
@@ -362,20 +411,22 @@
:flag-assert #xc0000003e
)
(deftype menu-secret-option (menu-option)
((item-index int32 :offset-assert 48)
(prev-item-index int32 :offset-assert 52)
(num-items int32 :offset-assert 56)
(num-hero-items int32 :offset-assert 60)
(secret-items basic :offset-assert 64)
(last-move uint64 :offset-assert 72)
(sprites hud-sprite 2 :inline :offset-assert 80)
((item-index int32 :offset-assert 48)
(prev-item-index int32 :offset-assert 52)
(num-items int32 :offset-assert 56)
(num-hero-items int32 :offset-assert 60)
(secret-items (array secret-item-option) :offset-assert 64)
(last-move uint64 :offset-assert 72)
(sprites hud-sprite 2 :inline :offset-assert 80)
)
:method-count-assert 12
:size-assert #xd0
:flag-assert #xc000000d0
)
(deftype menu-option-list (basic)
((y-center int32 :offset-assert 4)
(y-space int32 :offset-assert 8)
@@ -387,15 +438,17 @@
:flag-assert #x900000010
)
(deftype menu-qr-option (menu-option)
((last-move uint64 :offset-assert 48)
(value-to-modify uint32 :offset 60)
((last-move uint64 :offset-assert 48)
(value-to-modify function :offset 60)
)
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-restart-mission-qr-option (menu-qr-option)
((next-state basic :offset-assert 64)
)
@@ -404,6 +457,7 @@
:flag-assert #xc00000044
)
(deftype menu-quit-qr-option (menu-qr-option)
((next-state basic :offset-assert 64)
)
@@ -412,6 +466,7 @@
:flag-assert #xc00000044
)
(deftype menu-sub-menu-qr-option (menu-qr-option)
((next-state basic :offset-assert 64)
)
@@ -420,6 +475,7 @@
:flag-assert #xc00000044
)
(deftype menu-graphic-option (menu-option)
((last-move uint64 :offset-assert 48)
(value-to-modify pointer :offset 60)
@@ -429,6 +485,7 @@
:flag-assert #xc00000040
)
(deftype menu-on-off-progressive-scan-graphic-option (menu-graphic-option)
()
:method-count-assert 12
@@ -436,6 +493,7 @@
:flag-assert #xc00000040
)
(deftype menu-aspect-ratio-option (menu-graphic-option)
()
:method-count-assert 12
@@ -443,6 +501,7 @@
:flag-assert #xc00000040
)
(deftype menu-center-screen-graphic-option (menu-graphic-option)
((next-state basic :offset-assert 64)
)
@@ -451,6 +510,7 @@
:flag-assert #xc00000044
)
(deftype menu-video-mode-option (menu-graphic-option)
()
:method-count-assert 12
@@ -458,6 +518,7 @@
:flag-assert #xc00000040
)
(deftype menu-game-option (menu-option)
((last-move uint64 :offset-assert 48)
(value-to-modify pointer :offset 60)
@@ -467,6 +528,7 @@
:flag-assert #xc00000040
)
(deftype menu-on-off-game-vibrations-option (menu-game-option)
()
:method-count-assert 12
@@ -474,6 +536,7 @@
:flag-assert #xc00000040
)
(deftype menu-on-off-game-subtitles-option (menu-game-option)
()
:method-count-assert 12
@@ -481,6 +544,7 @@
:flag-assert #xc00000040
)
(deftype menu-sub-menu-game-option (menu-game-option)
((next-state basic :offset-assert 64)
)
@@ -489,6 +553,7 @@
:flag-assert #xc00000044
)
(deftype menu-language-game-option (menu-game-option)
((language-selection uint64 :offset-assert 64)
(language-direction basic :offset-assert 72)
@@ -500,6 +565,7 @@
:flag-assert #xc00000054
)
(deftype menu-subtitle-language-game-option (menu-game-option)
((language-selection uint64 :offset-assert 64)
(language-direction basic :offset-assert 72)
@@ -510,8 +576,3 @@
:size-assert #x54
:flag-assert #xc00000054
)
;; DECOMP ENDS
(define-extern *progress-process* (pointer progress))
(define-extern activate-progress (function process symbol none))
@@ -7,3 +7,930 @@
;; DECOMP BEGINS
(let ((a0-0 (new 'static 'skeleton-group
:name "skel-hud-ring"
:extra #f
:info #f
:art-group-name "hud-ring"
:bounds (new 'static 'vector :w 225280.0)
:version #x7
)
)
)
(set! (-> a0-0 jgeo) 0)
(set! (-> a0-0 janim) 2)
(set! (-> a0-0 mgeo 0) 1)
(set! (-> a0-0 lod-dist 0) 4095996000.0)
(add-to-loading-level a0-0)
)
(let ((a0-1 (new 'static 'skeleton-group
:name "skel-hud-ring-part"
:extra #f
:info #f
:art-group-name "hud-ring"
:bounds (new 'static 'vector :w 225280.0)
:version #x7
)
)
)
(set! (-> a0-1 jgeo) 3)
(set! (-> a0-1 janim) 5)
(set! (-> a0-1 mgeo 0) 4)
(set! (-> a0-1 lod-dist 0) 4095996000.0)
(add-to-loading-level a0-1)
)
(define *main-options* (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))
(define *main-kiosk-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))
(define *title* (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))
(define *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))
(define *game-options-japan* (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))
(define *graphic-options* (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))
(define *sound-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))
(define *load-save-options* (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))
(define *loading-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))
(define *secrets-insufficient-space-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))
(define *error-loading-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))
(define *card-removed-options* (new 'static 'menu-option-list :y-center #x104 :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))
(define *error-reading-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))
(define *format-card-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))
(define *create-game-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))
(define *video-mode-ok-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82))
(define *progressive-mode-warning-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))
(define *quit-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82))
(define *select-start-options*
"List of [[menu-select-start-option]]"
(new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)
)
(define *select-scene-options*
"List of [[menu-select-scene-option]]"
(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))
(define *missions-options*
"List of [[menu-missions-option]]"
(new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)
)
(define *highscores-options*
"List of [[menu-highscores-option]]"
(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))
(define *language-name-remap*
(the-as (array game-text-id)
(new 'static 'boxed-array :type uint32 #x111 #x112 #x113 #x114 #x115 #x117 #x116 #x30b)
)
)
(define *stereo-mode-name-remap*
(the-as (array game-text-id) (new 'static 'boxed-array :type uint32 #x104 #x105 #x106))
)
(define *hud-ring-graphic-remap*
(new 'static 'boxed-array :type uint64 #x80 #x40 #x10 #x4 #x8 #x400 #x20 #x100 #x200 #x2)
)
(define *hud-ring-kiosk-graphic-remap*
(new 'static 'boxed-array :type uint64 #x40 #x80 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200)
)
(define *hud-ring-demo-graphic-remap*
(new 'static 'boxed-array :type uint64 #x80 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200 #x200)
)
(deftype hud-scene-info (basic)
((name string :offset-assert 4)
(continue string :offset-assert 8)
(info object :offset-assert 12)
(info-str string :offset 12)
(info-list pair :offset 12)
(text uint32 :offset-assert 16)
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
(define *hud-select-scene-act1*
(new 'static 'boxed-array :type hud-scene-info
(new 'static 'hud-scene-info
:name "intro"
:continue "village1-start"
:info '("intro-samos-hut" "intro-vortex" "intro-city-square" "intro-prison")
:text #x307
)
(new 'static 'hud-scene-info
:name "city-help-kid-intro"
:continue "ctyslumb-fort"
:info "city-help-kid-intro"
:text #x28c
)
(new 'static 'hud-scene-info
:name "city-help-kid-resolution"
:continue "ctyslumb-fort"
:info "city-help-kid-resolution"
:text #x28d
)
(new 'static 'hud-scene-info
:name "ruins-tower-intro"
:continue "ctysluma-tower-intro"
:info "ruins-tower-intro"
:text #x281
)
(new 'static 'hud-scene-info
:name "ruins-tower-victory"
:continue "ruins-hut"
:info "ruins-tower-victory"
:text #x282
)
(new 'static 'hud-scene-info :name "atoll-1-int" :continue "hideout-start" :info "atoll-1-int" :text #x2c8)
(new 'static 'hud-scene-info :name "atoll-1-res" :continue "atoll-movie" :info "atoll-1-res" :text #x2c9)
(new 'static 'hud-scene-info
:name "fortress-2-intro"
:continue "hideout-start"
:info "fortress-2-intro"
:text #x2bc
)
(new 'static 'hud-scene-info
:name "fortress-blow-up-ammo-res-a"
:continue "fordumpc-start"
:info "fortress-blow-up-ammo-res-a"
:text #x2bd
)
(new 'static 'hud-scene-info
:name "fortress-blow-up-ammo-res-b"
:continue "fordumpc-explode-movie"
:info "fortress-blow-up-ammo-res-b"
:text #x2be
)
(new 'static 'hud-scene-info
:name "city-krew-delivery-intro"
:continue "hideout-start"
:info "city-krew-delivery-intro"
:text #x28f
)
(new 'static 'hud-scene-info
:name "krew-delivery-res"
:continue "hiphog-start"
:info "krew-delivery-res"
:text #x290
)
(new 'static 'hud-scene-info :name "atoll-2-intro" :continue "hiphog-start" :info "atoll-2-intro" :text #x2ca)
(new 'static 'hud-scene-info
:name "atoll-sig-intro"
:continue "atoll-movie"
:info "atoll-sig-intro"
:text #x2ce
)
(new 'static 'hud-scene-info
:name "atoll-sig-tank"
:continue "atoll-movie"
:info "atoll-sig-tank"
:text #x2cf
)
(new 'static 'hud-scene-info
:name "atoll-sniper-a"
:continue "atoll-movie"
:info "atoll-sniper-a"
:text #x2d0
)
(new 'static 'hud-scene-info
:name "atoll-sniper-b"
:continue "atoll-movie"
:info "atoll-sniper-b"
:text #x2d1
)
(new 'static 'hud-scene-info
:name "atoll-sniper-c"
:continue "atoll-movie"
:info "atoll-sniper-c"
:text #x2d2
)
(new 'static 'hud-scene-info
:name "atoll-sniper-d"
:continue "atoll-movie"
:info "atoll-sniper-d"
:text #x2d3
)
(new 'static 'hud-scene-info
:name "atoll-sniper-e"
:continue "atoll-movie"
:info "atoll-sniper-e"
:text #x2d4
)
(new 'static 'hud-scene-info
:name "city-oracle-intro"
:continue "oracle-start"
:info "city-oracle-intro"
:text #x29d
)
(new 'static 'hud-scene-info
:name "city-oracle-level-0"
:continue "oracle-start"
:info "city-oracle-level-0"
:text #x29e
)
(new 'static 'hud-scene-info
:name "city-oracle-level-1"
:continue "oracle-start"
:info "city-oracle-level-1"
:text #x29f
)
(new 'static 'hud-scene-info
:name "city-oracle-level-2"
:continue "oracle-start"
:info "city-oracle-level-2"
:text #x2a0
)
(new 'static 'hud-scene-info
:name "city-oracle-level-3"
:continue "oracle-start"
:info "city-oracle-level-3"
:text #x2a1
)
(new 'static 'hud-scene-info :name "sewer-1-intro" :continue "hiphog-start" :info "sewer-1-intro" :text #x2c1)
(new 'static 'hud-scene-info :name "sewer-1-res" :continue "hiphog-start" :info "sewer-1-res" :text #x2c2)
(new 'static 'hud-scene-info
:name "city-get-yellow-gun"
:continue "gungame-movie"
:info "city-get-yellow-gun"
:text #x2b2
)
(new 'static 'hud-scene-info
:name "vin-rescue-intro"
:continue "hideout-start"
:info "vin-rescue-intro"
:text #x286
)
(new 'static 'hud-scene-info :name "vin-rescue" :continue "strip-start" :info "vin-rescue" :text #x287)
(new 'static 'hud-scene-info
:name "city-keira-delivery-intro"
:continue "hiphog-start"
:info "city-keira-delivery-intro"
:text #x2a7
)
(new 'static 'hud-scene-info
:name "city-krew-collection-intro"
:continue "hiphog-start"
:info "city-krew-collection-intro"
:text #x2a2
)
(new 'static 'hud-scene-info
:name "city-krew-collection-res"
:continue "hiphog-start"
:info "city-krew-collection-res"
:text #x2a3
)
(new 'static 'hud-scene-info
:name "city-keira-hover-challenge-intro"
:continue "garage-start-skate"
:info "city-keira-hover-challenge-intro"
:text #x294
)
(new 'static 'hud-scene-info
:name "city-put-hoverboard"
:continue "skatea-start"
:info "city-put-hoverboard"
:text #x2b4
)
(new 'static 'hud-scene-info
:name "city-keira-hover-challenge-res"
:continue "garage-start-skate"
:info "city-keira-hover-challenge-res"
:text #x295
)
(new 'static 'hud-scene-info
:name "atoll-3-intro"
:continue "hideout-start"
:info "atoll-3-intro"
:text #x2cb
)
(new 'static 'hud-scene-info
:name "atoll-save-ashelin-res-a"
:continue "atoll-movie"
:info "atoll-save-ashelin-res-a"
:text #x2cc
)
(new 'static 'hud-scene-info
:name "atoll-save-ashelin-res-b"
:continue "atoll-movie"
:info "atoll-save-ashelin-res-b"
:text #x2cd
)
(new 'static 'hud-scene-info
:name "drill-kill-metal-heads-intro"
:continue "vinroom-start"
:info "drill-kill-metal-heads-intro"
:text #x2d5
)
(new 'static 'hud-scene-info
:name "mountain-finditems-intro"
:continue "onintent-start"
:info "mountain-finditems-intro"
:text #x2d9
)
(new 'static 'hud-scene-info
:name "mountain-gear-res"
:continue "mountain-start"
:info "mountain-gear-res"
:text #x2da
)
(new 'static 'hud-scene-info
:name "mountain-shard-res"
:continue "mountain-start"
:info "mountain-shard-res"
:text #x2db
)
(new 'static 'hud-scene-info
:name "mountain-lens-res"
:continue "mountain-start"
:info "mountain-lens-res"
:text #x2dc
)
(new 'static 'hud-scene-info
:name "city-switch-on-power-intro"
:continue "vinroom-start"
:info "city-switch-on-power-intro"
:text #x293
)
(new 'static 'hud-scene-info
:name "palace-outside-window-res"
:continue "palroof-throne"
:info "palace-outside-window-res"
:text #x2dd
)
(new 'static 'hud-scene-info
:name "palace-outside-window-res-b"
:continue "palroof-boss"
:info "palace-outside-window-res-b"
:text #x2de
)
(new 'static 'hud-scene-info
:name "palace-boss-res"
:continue "palroof-boss"
:info "palace-boss-res"
:text #x2df
)
(new 'static 'hud-scene-info
:name "city-shuttle-underground-intro"
:continue "hideout-start"
:info "city-shuttle-underground-intro"
:text #x2a8
)
(new 'static 'hud-scene-info
:name "ruins-sacred-intro"
:continue "hideout-start"
:info "ruins-sacred-intro"
:text #x283
)
(new 'static 'hud-scene-info
:name "ruins-sacred-victory"
:continue "ruins-hut"
:info "ruins-sacred-victory"
:text #x284
)
)
)
(define *hud-select-scene-act2*
(new 'static 'boxed-array :type hud-scene-info
(new 'static 'hud-scene-info
:name "forest-catch-metal-heads-intro"
:continue "hideout-start"
:info "forest-catch-metal-heads-intro"
:text #x2f1
)
(new 'static 'hud-scene-info
:name "city-get-hoverboard"
:continue "ctyfarma-airlock-movie"
:info "city-get-hoverboard"
:text #x2b3
)
(new 'static 'hud-scene-info
:name "city-escort-kid-intro"
:continue "escort-kid-intro"
:info "city-escort-kid-intro"
:text #x2a4
)
(new 'static 'hud-scene-info
:name "dig-knock-down-scaffolding-intro"
:continue "vinroom-start"
:info "dig-knock-down-scaffolding-intro"
:text #x2f6
)
(new 'static 'hud-scene-info
:name "dig-digger-explode"
:continue "dig1-start"
:info "dig-digger-explode"
:text #x2fa
)
(new 'static 'hud-scene-info
:name "city-intercept-tanker-intro"
:continue "ctymarkb-tanker"
:info "city-intercept-tanker-intro"
:text #x291
)
(new 'static 'hud-scene-info
:name "city-intercept-tanker-res"
:continue "ctymarkb-tanker"
:info "city-intercept-tanker-res"
:text #x292
)
(new 'static 'hud-scene-info
:name "city-meet-brutter-intro"
:continue "hiphog-start"
:info "city-meet-brutter-intro"
:text #x2a5
)
(new 'static 'hud-scene-info
:name "city-meet-brutter-res"
:continue "kiosk-start"
:info "city-meet-brutter-res"
:text #x2a6
)
(new 'static 'hud-scene-info :name "sewer-2-intro" :continue "hiphog-start" :info "sewer-2-intro" :text #x2c3)
(new 'static 'hud-scene-info
:name "sewer-drain-res"
:continue "sewer-start"
:info "sewer-drain-res"
:text #x2c4
)
(new 'static 'hud-scene-info
:name "ecowells-intro"
:continue "vinroom-start"
:info "ecowells-intro"
:text #x28a
)
(new 'static 'hud-scene-info
:name "ecowells-victory"
:continue "strip-start"
:info "ecowells-victory"
:text #x28b
)
(new 'static 'hud-scene-info
:name "drill-destroy-ship-intro"
:continue "vinroom-start"
:info "drill-destroy-ship-intro"
:text #x2d6
)
(new 'static 'hud-scene-info
:name "forest-hunt-camo-metal-heads-intro"
:continue "hiphog-start"
:info "forest-hunt-camo-metal-heads-intro"
:text #x2f2
)
(new 'static 'hud-scene-info
:name "city-class-3-race-intro"
:continue "garage-class3-movie"
:info "city-class-3-race-intro"
:text #x296
)
(new 'static 'hud-scene-info
:name "city-class-3-race-res"
:continue "garage-class3-movie"
:info "city-class-3-race-res"
:text #x297
)
(new 'static 'hud-scene-info
:name "city-protect-slums-intro"
:continue "ctyslumc-seal-movie"
:info "city-protect-slums-intro"
:text #x2ba
)
(new 'static 'hud-scene-info
:name "dig-find-totem-intro"
:continue "onintent-start"
:info "dig-find-totem-intro"
:text #x2f8
)
(new 'static 'hud-scene-info
:name "city-air-train-in-caspad"
:continue "ctyport-air-train"
:info "city-air-train-in-caspad"
:text #x2b6
)
(new 'static 'hud-scene-info
:name "caspad-air-train-out"
:continue "caspad-warp"
:info "caspad-air-train-out"
:text #x2e5
)
(new 'static 'hud-scene-info
:name "dig-find-totem-res"
:continue "dig-totem"
:info "dig-find-totem-res"
:text #x2f9
)
(new 'static 'hud-scene-info
:name "caspad-air-train-in"
:continue "caspad-warp"
:info "caspad-air-train-in"
:text #x2e4
)
(new 'static 'hud-scene-info
:name "city-air-train-out"
:continue "ctyport-air-train"
:info "city-air-train-out"
:text #x2b8
)
(new 'static 'hud-scene-info
:name "city-destroy-guard-vehicles-intro"
:continue "hideout-start"
:info "city-destroy-guard-vehicles-intro"
:text #x28e
)
(new 'static 'hud-scene-info
:name "city-play-onin-game-intro"
:continue "onintent-start"
:info "city-play-onin-game-intro"
:text #x2a9
)
(new 'static 'hud-scene-info
:name "city-play-onin-game-res"
:continue "onintent-start"
:info "city-play-onin-game-res"
:text #x2aa
)
(new 'static 'hud-scene-info
:name "canyon-insert-items-intro"
:continue "mountain-movie"
:info "canyon-insert-items-intro"
:text #x2fc
)
(new 'static 'hud-scene-info
:name "canyon-insert-items-res"
:continue "mincan-city"
:info "canyon-insert-items-res"
:text #x2fb
)
(new 'static 'hud-scene-info
:name "tomb-face-tests-intro"
:continue "tombd-start"
:info "tomb-face-tests-intro"
:text #x2e6
)
(new 'static 'hud-scene-info
:name "tomb-boulder-start"
:continue "tomb-boulder"
:info "tomb-boulder-start"
:text #x2ef
)
(new 'static 'hud-scene-info
:name "tomb-spider-scare"
:continue "tomb-boulder-explode"
:info "tomb-spider-scare"
:text #x2f0
)
(new 'static 'hud-scene-info
:name "tomb-unlock-start"
:continue "tomb-water-switch"
:info "tomb-unlock-start"
:text #x2e9
)
(new 'static 'hud-scene-info
:name "tomb-unlock-water"
:continue "tomb-water-switch"
:info "tomb-unlock-water"
:text #x2ea
)
(new 'static 'hud-scene-info
:name "tomb-unlock-poles"
:continue "tomb-poles-switch"
:info "tomb-unlock-poles"
:text #x2eb
)
(new 'static 'hud-scene-info
:name "tomb-boss-open"
:continue "tombboss-start"
:info "tomb-boss-open"
:text #x2ec
)
(new 'static 'hud-scene-info
:name "tomb-boss-intro"
:continue "tombboss-start"
:info "tomb-boss-intro"
:text #x2ed
)
(new 'static 'hud-scene-info
:name "tomb-boss-res"
:continue "tombboss-start"
:info "tomb-boss-res"
:text #x2ee
)
)
)
(define *hud-select-scene-act3*
(new 'static 'boxed-array :type hud-scene-info
(new 'static 'hud-scene-info
:name "fortress-save-friends-intro-a"
:continue "hideout-start"
:info "fortress-save-friends-intro-a"
:text #x2bf
)
(new 'static 'hud-scene-info
:name "fortress-save-friends-res"
:continue "prison-start"
:info "fortress-save-friends-res"
:text #x2c0
)
(new 'static 'hud-scene-info
:name "sewer-blow-up-statue-intro"
:continue "hiphog-start"
:info "sewer-blow-up-statue-intro"
:text #x2c5
)
(new 'static 'hud-scene-info
:name "sewer-hosehead"
:continue "sewesc-start"
:info "sewer-hosehead"
:text #x2c7
)
(new 'static 'hud-scene-info
:name "sewer-blow-up-statue-res"
:continue "sewesc-start"
:info "sewer-blow-up-statue-res"
:text #x2c6
)
(new 'static 'hud-scene-info
:name "city-class-2-race-intro"
:continue "garage-class3-movie"
:info "city-class-2-race-intro"
:text #x298
)
(new 'static 'hud-scene-info
:name "city-class-2-race-res"
:continue "garage-class3-movie"
:info "city-class-2-race-res"
:text #x299
)
(new 'static 'hud-scene-info
:name "city-stop-bomb-bots-intro"
:continue "hideout-start"
:info "city-stop-bomb-bots-intro"
:text #x2ac
)
(new 'static 'hud-scene-info
:name "city-get-dark-gun"
:continue "gungame-movie"
:info "city-get-dark-gun"
:text #x2b5
)
(new 'static 'hud-scene-info
:name "city-errol-challenge-intro"
:continue "hiphog-start"
:info "city-errol-challenge-intro"
:text #x2ad
)
(new 'static 'hud-scene-info
:name "city-errol-challenge-res"
:continue "garage-start-class3"
:info "city-errol-challenge-res"
:text #x2bb
)
(new 'static 'hud-scene-info
:name "ruins-get-to-hut-res"
:continue "ruins-hut"
:info "ruins-get-to-hut-res"
:text #x285
)
(new 'static 'hud-scene-info
:name "forest-protect-samos-intro-a"
:continue "onintent-start"
:info "forest-protect-samos-intro-a"
:text #x2f3
)
(new 'static 'hud-scene-info
:name "forest-protect-samos-intro-b"
:continue "forest-tree"
:info "forest-protect-samos-intro-b"
:text #x2f4
)
(new 'static 'hud-scene-info
:name "forest-protect-samos-res"
:continue "forest-tree"
:info "forest-protect-samos-res"
:text #x2f5
)
(new 'static 'hud-scene-info :name "crane-intro" :continue "vinroom-start" :info "crane-intro" :text #x288)
(new 'static 'hud-scene-info :name "crane-victory" :continue "strip-start" :info "crane-victory" :text #x289)
(new 'static 'hud-scene-info
:name "drill-destroy-control-tower-intro"
:continue "vinroom-start"
:info "drill-destroy-control-tower-intro"
:text #x2d7
)
(new 'static 'hud-scene-info
:name "drill-top-explode"
:continue "drillmid-checkpoint"
:info "drill-top-explode"
:text #x2d8
)
(new 'static 'hud-scene-info
:name "city-save-lurkers-intro"
:continue "kiosk-start"
:info "city-save-lurkers-intro"
:text #x2ab
)
(new 'static 'hud-scene-info
:name "city-class-1-race-intro-a"
:continue "garage-class3-movie"
:info "city-class-1-race-intro-a"
:text #x29a
)
(new 'static 'hud-scene-info
:name "city-class-1-race-intro-b"
:continue "stadiumd-start"
:info "city-class-1-race-intro-b"
:text #x29b
)
(new 'static 'hud-scene-info
:name "city-class-1-race-res"
:continue "stadiumd-start"
:info "city-class-1-race-res"
:text #x29c
)
(new 'static 'hud-scene-info
:name "palace-sneak-in-res"
:continue "palroof-throne"
:info "palace-sneak-in-res"
:text #x2e0
)
(new 'static 'hud-scene-info
:name "castle-krew-boss-fight-intro"
:continue "casboss-start"
:info "castle-krew-boss-fight-intro"
:text #x2e2
)
(new 'static 'hud-scene-info
:name "castle-krew-boss-fight-res"
:continue "casboss-start"
:info "castle-krew-boss-fight-res"
:text #x2e3
)
(new 'static 'hud-scene-info
:name "city-ashelin-drop-off"
:continue "ctyport-air-train-ashelin"
:info "city-ashelin-drop-off"
:text #x2b9
)
(new 'static 'hud-scene-info
:name "city-whack-a-metal-intro"
:continue "hiphog-start"
:info "city-whack-a-metal-intro"
:text #x2ae
)
(new 'static 'hud-scene-info
:name "city-whack-a-metal-res"
:continue "hiphog-start"
:info "city-whack-a-metal-res"
:text #x2af
)
(new 'static 'hud-scene-info
:name "city-defend-stadium-intro"
:continue "stadium-blimp"
:info "city-defend-stadium-intro"
:text #x2b0
)
(new 'static 'hud-scene-info
:name "city-defend-stadium-res"
:continue "stadium-blimp"
:info "city-defend-stadium-res"
:text #x2b1
)
(new 'static 'hud-scene-info
:name "under-find-sig-res"
:continue "under-start"
:info "under-find-sig-res"
:text #x2fd
)
(new 'static 'hud-scene-info
:name "under-centipede-one"
:continue "under-start"
:info "under-centipede-one"
:text #x2fe
)
(new 'static 'hud-scene-info
:name "under-centipede-two"
:continue "under-start"
:info "under-centipede-two"
:text #x2ff
)
(new 'static 'hud-scene-info
:name "under-centipede-three"
:continue "under-start"
:info "under-centipede-three"
:text #x300
)
(new 'static 'hud-scene-info
:name "under-get-sig-out-res"
:continue "under-start"
:info "under-get-sig-out-res"
:text #x301
)
(new 'static 'hud-scene-info
:name "consite-find-baron-res"
:continue "consite-start"
:info "consite-find-baron-res"
:text #x2e1
)
(new 'static 'hud-scene-info
:name "nest-break-barrier-res"
:continue "nest-gun"
:info "nest-break-barrier-res"
:text #x302
)
(new 'static 'hud-scene-info
:name "nest-air-train-out"
:continue "nest-warp"
:info "nest-air-train-out"
:text #x303
)
(new 'static 'hud-scene-info
:name "nest-air-train-in"
:continue "nest-warp"
:info "nest-air-train-in"
:text #x304
)
(new 'static 'hud-scene-info
:name "nest-boss-intro"
:continue "nestb-boss"
:info "nest-kor-boss-fight-intro-b"
:text #x306
)
(new 'static 'hud-scene-info
:name "nest-boss-mid"
:continue "nestb-boss"
:info "nest-kor-boss-fight-mid"
:text #x305
)
(new 'static 'hud-scene-info
:name "outro"
:continue "nestb-outro"
:info '("outro-nest" "outro-palace" "outro-hiphog" "outro-port")
:text #x308
)
)
)
File diff suppressed because it is too large Load Diff
+10
View File
@@ -5,6 +5,16 @@
;; name in dgo: text-h
;; dgos: ENGINE, GAME
;; NOTE - for progress
(define-extern disable-level-text-file-loading "Disables [[*level-text-file-load-flag*]]" (function none))
(define-extern enable-level-text-file-loading "Disables [[*level-text-file-load-flag*]]" (function none))
(define-extern load-game-text-info
"Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for
the game-text-info, and heap is the heap to load to. The heap will be cleared."
(function string symbol kheap int))
(define-extern print-game-text-scaled "Print text, with a given scaling" (function string float font-context int none))
(define-extern print-game-text "Print text." (function string font-context symbol int int float))
;; DECOMP BEGINS
(deftype game-text (structure)
+123 -62
View File
@@ -5,16 +5,76 @@
;; name in dgo: text-id-h
;; dgos: ENGINE, GAME
;; DECOMP BEGINS
;; +++game-text-id
(defenum game-text-id
:type uint32
:bitfield #f
;; GAME-TEXT-ID ENUM BEGINS
(null 0)
(pause #x0101)
(pause 257)
(progress-sound-music-volume 264)
(progress-sound-speech-volume 265)
(progress-on 270)
(progress-off 271)
(progress-move-dpad 272)
(progress-aspect-ratio 280)
(progress-progressive-scan 281)
(progress-video-mode 282)
(progress-root-game-options 283)
(progress-root-graphic-options 284)
(progress-root-sound-options 285)
(progress-aspect-4x3 286)
(progress-aspect-16x9 287)
(progress-refresh-60hz 288)
(progress-refresh-50hz 289)
(progress-demo-exit 291)
(progress-yes 292)
(progress-no 293)
(progress-back 294)
(progress-ok 295)
(progress-next 296)
(progress-previous 297)
(progress-continue-without-saving 298)
(progress-select-file-to-save 299)
(progress-select-file-to-load 300)
(progress-load-game 301)
(progress-save-game 302)
(progress-slot-empty 303)
(progress-title-options 304)
(progress-title-new-game 305)
(progress-title-prompt 306)
(progress-quit 307)
(progress-root-show-map 308)
(progress-root-highscores 310)
(progress-highscores-1st 311)
(progress-highscores-2nd 312)
(progress-highscores-3rd 313)
(progress-highscores-4th 314)
(progress-highscores-5th 315)
(progress-highscores-6th 316)
(progress-highscores-7th 317)
(progress-highscores-8th 318)
(progress-root-secrets 339)
(progress-secrets-unlocked 340)
(progress-main-secrets-hero-mode 345)
(progress-main-secrets-sceneplayer-1 346)
(progress-main-secrets-sceneplayer-2 347)
(progress-main-secrets-sceneplayer-3 348)
(progress-main-secrets-scrapbook 349)
(progress-main-secrets-mega-scrapbook 350)
(progress-main-secrets-scrapbook-3 351)
(progress-main-secrets-levelselect 352)
(progress-secrets-orb-label 360)
(progress-root-missions 361)
(progress-root-restart-mission 366)
(progress-missions-icon-todo 367)
(progress-missions-icon-completed 368)
(progress-missions-none 369)
(progress-unknown-game 370)
(progress-unknown-square-to-reset 377)
(progress-unknown-oi1un23i13 380)
(progress-unknown-kjanskd 381)
(progress-unknown-retry? 382)
(progress-secrets-go-to-title-screen 383)
(text-x180 #x0180)
(text-x181 #x0181)
(text-x182 #x0182)
@@ -27,48 +87,45 @@
(text-x189 #x0189)
(text-x18a #x018a)
(text-x18b #x018b)
(text-x18c #x018c)
(text-x18d #x018d)
(text-x18e #x018e)
(text-x18f #x018f)
(text-x190 #x0190)
(text-x191 #x0191)
(text-x192 #x0192)
(text-x193 #x0193)
(text-x194 #x0194)
(text-x195 #x0195)
(text-x196 #x0196)
(text-x197 #x0197)
(text-x198 #x0198)
(text-x199 #x0199)
(text-x19a #x019a)
(text-x19b #x019b)
(text-x19c #x019c)
(text-x19d #x019d)
(text-x19e #x019e)
(text-x19f #x019f)
(text-x1a0 #x01a0)
(progress-graphics-60hz-change-notice 395)
(progress-graphics-progressivescan-change-notice 396)
(progress-graphics-progressivescan-warning-1 397)
(progress-graphics-progressivescan-warning-2 398)
(progress-graphics-60hz-change-complete 399)
(progress-graphics-progressivescan-change-complete 400)
(progress-graphics-mode-revert? 401)
(progress-disc-removed-notice 402)
(progress-disc-removed-prompt 403)
(progress-disc-read-error 404)
(progress-disc-read-error-prompt 405)
(progress-quit-game-confirm 406)
(progress-memcard-not-found 409)
(progress-memcard-unformatted 410)
(progress-memcard-space-requirement 411)
(progress-memcard-insert-card-with-jak2 412)
(progress-memcard-insert-card-with-space-to-save 413)
(progress-memcard-formatting-required-notice 414)
(progress-memcard-loading-data 416)
(text-x1a1 #x01a1)
(text-x1a2 #x01a2)
(text-x1a3 #x01a3)
(text-x1a4 #x01a4)
(text-x1a5 #x01a5)
(text-x1a6 #x01a6)
(text-x1a7 #x01a7)
(text-x1a8 #x01a8)
(text-x1a9 #x01a9)
(text-x1aa #x01aa)
(progress-memcard-dont-remove 419)
(progress-memcard-overwrite-warning 420)
(progress-memcard-overwrite-confirm 421)
(progress-memcard-format-prompt 422)
(progress-memcard-continue? 423)
(progress-memcard-go-back? 424)
(progress-memcard-error-while-saving 426)
(text-x1ab #x01ab)
(text-x1ac #x01ac)
(text-x1ad #x01ad)
(text-x1ae #x01ae)
(text-x1af #x01af)
(text-x1b0 #x01b0)
(text-x1b1 #x01b1)
(text-x1b2 #x01b2)
(text-x1b3 #x01b3)
(text-x1b4 #x01b4)
(text-x1b5 #x01b5)
(progress-memcard-check 429)
(progress-memcard-check-and-try-again 430)
(progress-memcard-was-removed 431)
(progress-autosave-disabled 432)
(progress-autosave-reenabling-info 433)
(progress-memcard-no-jak2-found 434)
(progress-memcard-create-jak2-file? 435)
(progress-autosave-explanation 436)
(progress-autosave-dont-remove 437)
(text-x1b6 #x01b6)
(text-x1b7 #x01b7)
(text-x1b8 #x01b8)
@@ -163,22 +220,23 @@
(text-x211 #x0211)
(text-x212 #x0212)
(text-x213 #x0213)
(text-x214 #x0214)
(text-x215 #x0215)
(text-x216 #x0216)
(text-x217 #x0217)
(text-x218 #x0218)
(text-x219 #x0219)
(text-x21a #x021a)
(text-x21b #x021b)
(text-x21c #x021c)
(text-x21d #x021d)
(text-x21e #x021e)
(text-x21f #x021f)
(text-x220 #x0220)
(text-x221 #x0221)
(text-x222 #x0222)
(text-x223 #x0223)
(progress-locations-haven-city 531)
(progress-locations-fortress 532)
(progress-locations-landing-pad 533)
(progress-locations-palace-roof 534)
(progress-locations-palace 535)
(progress-locations-weapons-factory 536)
(progress-locations-dead-town 537)
(progress-locations-pumping-station 538)
(progress-locations-sewer 539)
(progress-locations-strip-mine 540)
(progress-locations-mountain-temple 541)
(progress-locations-haven-forest 542)
(progress-locations-drill-platform 543)
(progress-locations-mars-tomb 544)
(progress-locations-dig 545)
(progress-locations-underport 546)
(progress-locations-nest 547)
(text-x224 #x0224)
(text-x225 #x0225)
(text-x226 #x0226)
@@ -223,5 +281,8 @@
(text-x24d #x024d)
(text-x24e #x024e)
(text-x24f #x024f)
;; GAME-TEXT-ID ENUM ENDS
)
(progress-unknown-continue 784)
)
;; ---game-text-id
;; DECOMP BEGINS
+592
View File
@@ -7,3 +7,595 @@
;; DECOMP BEGINS
(kmemopen global "text")
(define *expand-buf-number* 0)
(define *game-text-word* (new 'global 'string 256 (the-as string #f)))
(define *game-text-line* (new 'global 'string 1024 (the-as string #f)))
(define *expanded-text-line0* (new 'global 'string 1024 (the-as string #f)))
(define *expanded-text-line1* (new 'global 'string 1024 (the-as string #f)))
(define *level-text-file-load-flag* #t)
(when (zero? (-> *common-text-heap* base))
(let ((gp-0 *common-text-heap*))
(set! (-> gp-0 base) (kmalloc global #x10000 (kmalloc-flags) "heap"))
(set! (-> gp-0 current) (-> gp-0 base))
(set! (-> gp-0 top-base) (&+ (-> gp-0 base) #x10000))
(set! (-> gp-0 top) (-> gp-0 top-base))
)
)
(kmemclose)
(defmethod relocate game-text-info ((obj game-text-info) (arg0 int))
(let ((v1-1 (-> *level* loading-level)))
(when v1-1
(set! (-> v1-1 loaded-text-info (-> v1-1 loaded-text-info-count)) obj)
(+! (-> v1-1 loaded-text-info-count) 1)
)
)
obj
)
(defmethod length game-text-info ((obj game-text-info))
(-> obj length)
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of game-text-info ((obj game-text-info))
(the-as int (+ (-> obj type size) (* (-> obj length) 8)))
)
(defmethod mem-usage game-text-info ((obj game-text-info) (arg0 memory-usage-block) (arg1 int))
(set! (-> arg0 length) (max 84 (-> arg0 length)))
(set! (-> arg0 data 83 name) "string")
(+! (-> arg0 data 83 count) 1)
(let ((v1-6 (asize-of obj)))
(+! (-> arg0 data 83 used) v1-6)
(+! (-> arg0 data 83 total) (logand -16 (+ v1-6 15)))
)
(dotimes (s4-0 (-> obj length))
(set! (-> arg0 length) (max 84 (-> arg0 length)))
(set! (-> arg0 data 83 name) "string")
(+! (-> arg0 data 83 count) 1)
(let ((v1-18 (asize-of (-> obj data s4-0 text))))
(+! (-> arg0 data 83 used) v1-18)
(+! (-> arg0 data 83 total) (logand -16 (+ v1-18 15)))
)
)
obj
)
(defun convert-korean-text ((arg0 string))
"Converts the provided [[string]] of [[game-text]] into korean. Returns a [[string]]"
(local-vars (v1-21 int))
(let ((gp-0 (-> arg0 data)))
*expanded-text-line0*
(let ((s4-0 0))
0
(let ((s1-0 0)
(s5-0 (length arg0))
)
(set! *expand-buf-number* (logxor *expand-buf-number* 1))
(let ((s3-0 (if (zero? *expand-buf-number*)
*expanded-text-line0*
*expanded-text-line1*
)
)
)
(let ((s2-0 (+ (-> s3-0 allocated-length) -1)))
(clear s3-0)
(while (< s4-0 s5-0)
(cond
((= (-> gp-0 s4-0) 3)
(+! s4-0 1)
(while (and (< s4-0 s5-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4))
(set! (-> s3-0 data s1-0) (-> gp-0 s4-0))
(+! s4-0 1)
(+! s1-0 1)
)
)
(else
(let ((v1-17 (+ s4-0 1)))
(-> gp-0 v1-17)
(set! s4-0 (+ v1-17 1))
)
(set! (-> s3-0 data s1-0) (the-as uint 126))
(let ((v1-19 (+ s1-0 1)))
(set! (-> s3-0 data v1-19) (the-as uint 89))
(let ((v1-20 (+ v1-19 1)))
(while (and (< s4-0 s5-0) (< v1-20 s2-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4))
(cond
((= (-> gp-0 s4-0) 5)
(set! (-> s3-0 data v1-20) (the-as uint 1))
(+! s4-0 1)
(set! v1-21 (+ v1-20 1))
)
(else
(set! (-> s3-0 data v1-20) (the-as uint 3))
(set! v1-21 (+ v1-20 1))
)
)
(set! (-> s3-0 data v1-21) (-> gp-0 s4-0))
(+! s4-0 1)
(let ((v1-22 (+ v1-21 1)))
(set! (-> s3-0 data v1-22) (the-as uint 126))
(let ((v1-23 (+ v1-22 1)))
(set! (-> s3-0 data v1-23) (the-as uint 90))
(set! v1-20 (+ v1-23 1))
)
)
)
(set! (-> s3-0 data v1-20) (the-as uint 126))
(let ((v1-24 (+ v1-20 1)))
(set! (-> s3-0 data v1-24) (the-as uint 43))
(let ((v1-25 (+ v1-24 1)))
(set! (-> s3-0 data v1-25) (the-as uint 50))
(let ((v1-26 (+ v1-25 1)))
(set! (-> s3-0 data v1-26) (the-as uint 54))
(let ((v1-27 (+ v1-26 1)))
(set! (-> s3-0 data v1-27) (the-as uint 72))
(set! s1-0 (+ v1-27 1))
)
)
)
)
)
)
)
)
)
)
(set! (-> s3-0 data s1-0) (the-as uint 0))
s3-0
)
)
)
)
)
(defmethod lookup-text! game-text-info ((obj game-text-info) (arg0 game-text-id) (arg1 symbol))
(cond
((= obj #f)
(cond
(arg1
(the-as string #f)
)
(else
(format (clear *temp-string*) "NO GAME TEXT")
*temp-string*
)
)
)
(else
(let* ((a1-2 0)
(a3-0 (+ (-> obj length) 1))
(v1-2 (/ (+ a1-2 a3-0) 2))
)
(let ((t0-0 -1))
(while (and (!= (-> obj data v1-2 id) arg0) (!= v1-2 t0-0))
(if (< (the-as uint arg0) (the-as uint (-> obj data v1-2 id)))
(set! a3-0 v1-2)
(set! a1-2 v1-2)
)
(set! t0-0 v1-2)
(set! v1-2 (/ (+ a1-2 a3-0) 2))
)
)
(cond
((!= (-> obj data v1-2 id) arg0)
(cond
(arg1
(the-as string #f)
)
(else
(format (clear *temp-string*) "UNKNOWN ID ~X" arg0)
*temp-string*
)
)
)
((= (-> obj language-id) 6)
(convert-korean-text (-> obj data v1-2 text))
)
(else
(-> obj data v1-2 text)
)
)
)
)
)
)
(defmethod lookup-text level ((obj level) (arg0 game-text-id) (arg1 symbol))
(let ((v1-0 *common-text*))
(dotimes (a3-0 (-> obj loaded-text-info-count))
(if (= (-> obj loaded-text-info a3-0 language-id) (-> *setting-control* user-current language))
(set! v1-0 (-> obj loaded-text-info a3-0))
)
)
(lookup-text! v1-0 arg0 arg1)
)
)
(define text-is-loading #f)
;; WARN: Found some very strange gotos. Check result carefully, this is not well tested.
(defun load-game-text-info ((arg0 string) (arg1 symbol) (arg2 kheap))
"Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for
the game-text-info, and heap is the heap to load to. The heap will be cleared."
(local-vars (v0-3 int) (sv-16 game-text-info) (sv-24 int) (sv-32 int) (sv-40 int))
(set! sv-16 (the-as game-text-info (-> arg1 value)))
(set! sv-24 (the-as int (-> *setting-control* user-current language)))
(set! sv-32 0)
(set! sv-40 (&- (-> arg2 top) (the-as uint (-> arg2 base))))
(if (and (= (scf-get-territory) 1) (= sv-24 (language-enum english)) (not (demo?)))
(set! sv-24 7)
)
(when (or (= sv-16 #f) (!= (-> sv-16 language-id) sv-24) (not (string= (-> sv-16 group-name) arg0)))
(let ((v1-16 arg2))
(set! (-> v1-16 current) (-> v1-16 base))
)
(b! #t cfg-17 :delay (nop!))
(label cfg-16)
(set! v0-3 0)
(b! #t cfg-30 :delay (nop!))
(label cfg-17)
(let ((s3-0 str-load))
(format (clear *temp-string*) "~D~S.TXT" sv-24 arg0)
(b!
(not (s3-0
*temp-string*
-1
(logand -64 (&+ (-> arg2 current) 63))
(&- (-> arg2 top) (the-as uint (-> arg2 current)))
)
)
cfg-16
:delay (nop!)
)
)
(label cfg-19)
(let ((v1-20 (str-load-status (the-as (pointer int32) (& sv-32)))))
(b! (!= v1-20 'error) cfg-22 :delay (empty-form))
(format 0 "Error loading text~%")
(set! v0-3 0)
(b! #t cfg-30 :delay (nop!))
(the-as none 0)
(b! #t cfg-27 :delay (nop!))
(label cfg-22)
(cond
((>= sv-32 (+ sv-40 -300))
(format 0 "Game text heap overrun!~%")
(return 0)
)
((= v1-20 'busy)
(nop!)
(nop!)
(nop!)
(nop!)
(nop!)
(nop!)
(goto cfg-19)
)
)
)
(label cfg-27)
(let ((s2-1 (logand -64 (&+ (-> arg2 current) 63))))
(flush-cache 0)
(let ((s3-1 link))
(format (clear *temp-string*) "~D~S.TXT" sv-24 arg0)
(set! (-> arg1 value) (s3-1 s2-1 (-> *temp-string* data) sv-32 arg2 0))
)
)
(if (<= (the-as int (-> arg1 value)) 0)
(set! (-> arg1 value) (the-as object #f))
)
)
(set! v0-3 0)
(label cfg-30)
v0-3
)
(defun load-level-text-files ((arg0 int))
"Load the text files needed for level idx.
This function made more sense back when text files were split up, but in the end they put everything
in a single text group and file."
(if (or *level-text-file-load-flag* (>= arg0 0))
(load-game-text-info "common" '*common-text* *common-text-heap*)
)
0
(none)
)
(defun draw-debug-text-box ((arg0 font-context))
"Draws some lines"
(when *cheat-mode*
(let ((s5-0 (new 'static 'vector4w))
(gp-0 (new 'static 'vector4w-4))
)
(set-vector!
(-> gp-0 vector 0)
(the int (+ -256.0 (-> arg0 origin x)))
(the int (+ -208.0 (-> arg0 origin y)))
0
1
)
(set-vector!
(-> gp-0 vector 1)
(the int (+ -256.0 (-> arg0 width) (-> arg0 origin x)))
(the int (+ -208.0 (-> arg0 origin y)))
0
1
)
(set-vector!
(-> gp-0 vector 2)
(the int (+ -256.0 (-> arg0 width) (-> arg0 origin x)))
(the int (+ -208.0 (-> arg0 height) (-> arg0 origin y)))
0
1
)
(set-vector!
(-> gp-0 vector 3)
(the int (+ -256.0 (-> arg0 origin x)))
(the int (+ -208.0 (-> arg0 height) (-> arg0 origin y)))
0
1
)
(set-vector! s5-0 128 128 128 128)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (the-as vector4w (-> gp-0 vector)) (-> gp-0 vector 1) s5-0)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 1) (-> gp-0 vector 2) s5-0)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 2) (-> gp-0 vector 3) s5-0)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 3) (the-as vector4w (-> gp-0 vector)) s5-0)
)
)
0
(none)
)
(defun print-game-text-scaled ((arg0 string) (arg1 float) (arg2 font-context) (arg3 int))
"Print text, with a given scaling"
(let ((f26-0 (-> arg2 width))
(f30-0 (-> arg2 height))
(f24-0 (-> arg2 origin x))
(f22-0 (-> arg2 origin y))
(f28-0 (-> arg2 scale))
)
(let ((f0-1 (* (-> arg2 width) arg1))
(f1-2 (* (-> arg2 height) arg1))
)
(if (logtest? (-> arg2 flags) (font-flags middle))
(+! (-> arg2 origin x) (* 0.5 (- f26-0 f0-1)))
)
(if (logtest? (-> arg2 flags) (font-flags left))
(+! (-> arg2 origin y) (* 0.5 (- f30-0 f1-2)))
)
(let ((v1-10 arg2))
(set! (-> v1-10 scale) (* f28-0 arg1))
)
(set! (-> arg2 width) f0-1)
(set! (-> arg2 height) f1-2)
)
(print-game-text arg0 arg2 #f 44 320)
(set! (-> arg2 origin x) f24-0)
(set! (-> arg2 origin y) f22-0)
(set! (-> arg2 width) f26-0)
(set! (-> arg2 height) f30-0)
(set! (-> arg2 scale) f28-0)
)
0
(none)
)
(defun print-game-text ((arg0 string) (arg1 font-context) (arg2 symbol) (arg3 int) (arg4 int))
"Print text."
(local-vars
(sv-16 float)
(sv-20 float)
(sv-24 font-flags)
(sv-28 font-color)
(sv-32 (pointer uint8))
(sv-36 float)
(sv-40 float)
(sv-44 float)
(sv-48 float)
(sv-52 float)
(sv-56 float)
(sv-64 int)
(sv-72 uint)
(sv-80 int)
(sv-88 int)
(sv-96 int)
(sv-104 uint)
(sv-108 symbol)
(sv-112 int)
(sv-120 int)
)
(cond
((< 0.1 (-> arg1 scale))
(set! sv-16 (-> arg1 origin x))
(set! sv-20 (-> arg1 origin y))
(set! sv-24 (-> arg1 flags))
(set! sv-28 (-> arg1 color))
(when (logtest? (-> arg1 flags) (font-flags left))
(logclear! (-> arg1 flags) (font-flags left))
(+! (-> arg1 origin y)
(the float (the int (* 0.5 (- (-> arg1 height) (print-game-text arg0 arg1 #t 44 320)))))
)
)
(set! sv-32 (-> arg0 data))
(set! sv-36 (-> arg1 origin x))
(set! sv-40 (-> arg1 origin x))
(set! sv-44 (+ (-> arg1 origin x) (-> arg1 width)))
(set! sv-48 (+ (-> arg1 origin y) (-> arg1 height)))
(set! sv-52 (-> (get-string-length " " arg1) length))
(set! sv-56 (* (if (logtest? (-> arg1 flags) (font-flags large))
(the float arg3)
28.0
)
(-> arg1 scale)
)
)
(set! sv-64 0)
(if (logtest? (-> arg1 flags) (font-flags middle))
(+! (-> arg1 origin x) (* 0.5 (-> arg1 width)))
)
(set! sv-72 (-> sv-32 0))
(set! sv-80 0)
(set! sv-88 0)
(set! sv-96 0)
(set! sv-104 (-> sv-32 1))
(set! sv-108 (the-as symbol #f))
(set! sv-112 0)
(set! sv-120 0)
(set! (-> *game-text-line* data 0) (the-as uint 0))
(while (and (not (and (zero? sv-72) (zero? sv-80) (zero? sv-88))) (>= sv-48 (-> arg1 origin y)))
(set! sv-120 0)
(set! sv-32 (&-> sv-32 1))
(set! sv-104 (-> sv-32 0))
(set! sv-32 (&-> sv-32 -1))
(cond
((and (> sv-72 0) (< sv-72 (the-as uint 4)))
(set! (-> *game-text-word* data sv-80) sv-72)
(set! sv-80 (+ sv-80 1))
(set! (-> *game-text-word* data sv-80) sv-104)
(set! sv-80 (+ sv-80 1))
(set! sv-32 (&-> sv-32 1))
)
((= sv-72 32)
(set! (-> *game-text-word* data sv-80) sv-72)
(set! sv-80 (+ sv-80 1))
(set! sv-108 #t)
)
((zero? sv-72)
(if (nonzero? sv-80)
(set! sv-108 #t)
)
(set! sv-112 (+ sv-112 1))
)
((and (= sv-72 92) (= sv-104 92))
(set! sv-32 (&-> sv-32 1))
(if (nonzero? sv-80)
(set! sv-108 #t)
)
(set! sv-112 (+ sv-112 1))
)
((and (= sv-72 95) (= sv-104 95))
(set! sv-32 (&-> sv-32 1))
(set! (-> *game-text-word* data sv-80) (the-as uint 32))
(set! sv-80 (+ sv-80 1))
)
(else
(set! (-> *game-text-word* data sv-80) sv-72)
(set! sv-80 (+ sv-80 1))
)
)
(when sv-108
(set! (-> *game-text-word* data sv-80) (the-as uint 0))
(let ((f30-1 sv-36))
(set! sv-120 (the int (the-as float (-> (get-string-length *game-text-word* arg1) length))))
(let ((f0-26 (+ f30-1 (the float sv-120))))
(if (= (-> *game-text-word* data (+ sv-80 -1)) 32)
(set! f0-26 (- f0-26 (the-as float sv-52)))
)
(cond
((< sv-44 f0-26)
(set! sv-112 (+ sv-112 1))
)
(else
(copy-charp<-charp (&-> *game-text-line* data sv-88) (-> *game-text-word* data))
(set! sv-88 (+ sv-88 sv-80))
(set! sv-80 0)
(set! sv-36 (+ sv-36 (the float sv-120)))
(set! sv-108 (the-as symbol #f))
)
)
)
)
)
(while (> sv-112 0)
(let ((f30-2 (+ (-> arg1 origin y) sv-56)))
(when (and (>= sv-96 (the-as int (-> arg1 start-line))) #t)
(when (= (-> *game-text-line* data (+ sv-88 -1)) 32)
(set! (-> *game-text-line* data (+ sv-88 -1)) (the-as uint 0))
0
)
(if (nonzero? (-> *game-text-line* data 0))
(set! sv-64 (+ sv-64 1))
)
(when (not arg2)
(let* ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf))
(s3-1 (-> s2-1 base))
)
(draw-string *game-text-line* s2-1 arg1)
(set! (-> arg1 color) (-> *font-work* last-color))
(let ((a3-2 (-> s2-1 base)))
(let ((v1-121 (the-as object (-> s2-1 base))))
(set! (-> (the-as dma-packet v1-121) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
(set! (-> (the-as dma-packet v1-121) vif0) (new 'static 'vif-tag))
(set! (-> (the-as dma-packet v1-121) vif1) (new 'static 'vif-tag))
(set! (-> s2-1 base) (&+ (the-as pointer v1-121) 16))
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
(the-as bucket-id arg4)
s3-1
(the-as (pointer dma-tag) a3-2)
)
)
)
)
(set! (-> arg1 origin y) f30-2)
)
)
(set! sv-96 (+ sv-96 1))
(set! (-> *game-text-line* data 0) (the-as uint 0))
(set! sv-88 0)
(set! sv-112 (+ sv-112 -1))
(set! sv-36 sv-40)
(when sv-108
(copy-charp<-charp (&-> *game-text-line* data sv-88) (-> *game-text-word* data))
(set! sv-88 (+ sv-88 sv-80))
(set! sv-80 0)
(set! sv-108 (the-as symbol #f))
(set! sv-36 (+ sv-36 (the float sv-120)))
)
)
(when (nonzero? sv-72)
(set! sv-32 (&-> sv-32 1))
(set! sv-72 (-> sv-32 0))
)
)
(set! (-> arg1 origin x) sv-16)
(set! (-> arg1 origin y) sv-20)
(set! (-> arg1 flags) sv-24)
(set! (-> arg1 color) sv-28)
(if (> sv-64 0)
(* sv-56 (the float sv-64))
0.0
)
)
(else
0.0
)
)
)
(defun disable-level-text-file-loading ()
"Disables [[*level-text-file-load-flag*]]"
(set! *level-text-file-load-flag* #f)
0
(none)
)
(defun enable-level-text-file-loading ()
"Disables [[*level-text-file-load-flag*]]"
(set! *level-text-file-load-flag* #t)
0
(none)
)
+4 -4
View File
@@ -993,7 +993,7 @@
(set! (-> v1-52 name) 'unbox)
(set! (-> v1-52 spec) '((return macro (object)) (function macro (symbol)) (value eval (bfloat binteger))))
(set! (-> v1-52 func) (lambda ((arg0 script-context)) (cond
((zero? (logand (the-as int (-> arg0 param 1)) 7))
((not (logtest? (the-as int (-> arg0 param 1)) 7))
(/ (the-as int (-> arg0 param 1)) 8)
)
(else
@@ -2717,7 +2717,7 @@
"close a task stage."
(when (-> arg0 side-effect?)
(cond
((zero? (logand (the-as int (-> arg0 param 1)) 7))
((not (logtest? (the-as int (-> arg0 param 1)) 7))
(task-node-close! (the-as game-task-node (command-get-int (-> arg0 param 1) 0)))
)
(else
@@ -2755,7 +2755,7 @@
"close a task stage."
(when (-> arg0 side-effect?)
(cond
((zero? (logand (the-as int (-> arg0 param 1)) 7))
((not (logtest? (the-as int (-> arg0 param 1)) 7))
(task-node-open! (the-as game-task-node (command-get-int (-> arg0 param 1) 0)))
)
(else
@@ -2801,7 +2801,7 @@
(lambda ((arg0 script-context))
"test whether the need resolution stage of a task is closed (actually tests the bit array)"
(cond
((zero? (logand (the-as int (-> arg0 param 1)) 7))
((not (logtest? (the-as int (-> arg0 param 1)) 7))
(task-node-closed? (the-as game-task-node (command-get-int (-> arg0 param 1) 0)))
)
(else
+22 -1
View File
@@ -659,6 +659,22 @@
"blocking-plane-ag"
)
;;;;;;;;;;;;;;;;;;;;;
;; Text
;;;;;;;;;;;;;;;;;;;;;
(defstep :in "game/assets/jak2/game_text.gp"
:tool 'text
:out '("$OUT/iso/0COMMON.TXT"
"$OUT/iso/1COMMON.TXT"
"$OUT/iso/2COMMON.TXT"
"$OUT/iso/3COMMON.TXT"
"$OUT/iso/4COMMON.TXT"
"$OUT/iso/5COMMON.TXT"
"$OUT/iso/6COMMON.TXT"
"$OUT/iso/7COMMON.TXT")
)
;;;;;;;;;;;;;;;;;;;;;
;; COMMON CITY STUFF
;;;;;;;;;;;;;;;;;;;;;
@@ -848,7 +864,8 @@
;; the iso group is a group of files built by the "(mi)" command.
(group-list "iso"
`(,@(reverse *all-vis*)
`("$OUT/iso/0COMMON.TXT"
,@(reverse *all-vis*)
,@(reverse *all-str*)
,@(reverse *all-sbk*)
,@(reverse *all-mus*)
@@ -856,6 +873,10 @@
,@(reverse *all-cgos*))
)
(group-list "text"
`("$OUT/iso/0COMMON.TXT")
)
;; used for the type consistency test.
(group-list "all-code"
`(,@(reverse *all-gc*))
+1 -1
View File
@@ -140,7 +140,7 @@ void Compiler::compile_static_structure_inline(const goos::Object& form,
}
} else if (is_structure(field_info.type) || is_pair(field_info.type) ||
is_symbol(field_info.type)) {
is_symbol(field_info.type) || field_info.type == TypeSpec("object")) {
if (is_pair(field_info.type)) {
ASSERT(!field_info.field.is_inline());
}
-67
View File
@@ -1,67 +0,0 @@
import re
from jak1_file_list import file_list
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument("--files")
args = parser.parse_args()
files = args.files.split(",")
throw_error = False
method_split_pattern = re.compile('t9-\d+\s\(method-of-object')
function_split_pattern = re.compile('\(t9-\d+\)')
missing_res_tag_pattern = re.compile('(sv-\d{2,} int)')
decompiler_error_pattern = re.compile(';; ERROR')
missing_arg = re.compile('local-vars.*none\)')
for file in files:
src_path = ""
for f in file_list:
if f[2] != 3:
continue
if f[0] == file:
src_path = f[4]
break
if not os.path.exists("./goal_src/{}".format(src_path)):
print("{} couldn't find in /goal_src!".format(file))
throw_error = True
continue
file_path = "./goal_src/{}/{}.gc".format(src_path, file)
with open(file_path) as f:
for lineno, line in enumerate(f):
method_split_match = method_split_pattern.search(line)
if method_split_match:
print("method_split - {}:{}".format(file_path, lineno + 1))
throw_error = True
continue
function_split_match = function_split_pattern.search(line)
if function_split_match:
print("function_split - {}:{}".format(file_path, lineno + 1))
throw_error = True
continue
missing_res_tag_match = missing_res_tag_pattern.search(line)
if missing_res_tag_match:
print("missing_res_tag - {}:{}".format(file_path, lineno + 1))
throw_error = True
continue
decompiler_error_match = decompiler_error_pattern.search(line)
if decompiler_error_match:
print("decompiler_error - {}:{}".format(file_path, lineno + 1))
throw_error = True
continue
missing_arg_match = missing_arg.search(line)
if missing_arg_match:
print("missing_arg - {}:{}".format(file_path, lineno + 1))
throw_error = True
continue
if throw_error:
print("found potential problems!")
exit(1)
else:
print("looks good!")
+62
View File
@@ -0,0 +1,62 @@
import re
import argparse
import os
from utils import get_gsrc_path_from_filename
parser = argparse.ArgumentParser("lint-gsrc-file")
parser.add_argument("--game", help="The name of the game", type=str)
parser.add_argument("--file", help="The name of the file", type=str)
args = parser.parse_args()
throw_error = False
# TODO - if more code is added here overtime, be smarter about this / group errors
method_split_pattern = re.compile('method-of-type')
function_split_pattern = re.compile('\(t9-\d+(?:\s+[^\s]+\s*)?\)')
missing_res_tag_pattern = re.compile('.pcpyud')
decompiler_error_pattern = re.compile(';; ERROR')
missing_arg = re.compile('local-vars.*[at].*\s+none\)')
casting_stack_var = re.compile('the-as\s+[^\s]*\s+.*\(new \'stack')
src_path = get_gsrc_path_from_filename(args.game, args.file)
print("Linting GOAL_SRC File...")
with open(src_path) as f:
for lineno, line in enumerate(f):
method_split_match = method_split_pattern.search(line)
if method_split_match:
print("method_split - {}:{}".format(src_path, lineno + 1))
throw_error = True
continue
function_split_match = function_split_pattern.search(line)
if function_split_match:
print("function_split - {}:{}".format(src_path, lineno + 1))
throw_error = True
continue
missing_res_tag_match = missing_res_tag_pattern.search(line)
if missing_res_tag_match:
print("missing_res_tag - {}:{}".format(src_path, lineno + 1))
throw_error = True
continue
decompiler_error_match = decompiler_error_pattern.search(line)
if decompiler_error_match:
print("decompiler_error - {}:{}".format(src_path, lineno + 1))
throw_error = True
continue
missing_arg_match = missing_arg.search(line)
if missing_arg_match:
print("missing_arg - {}:{}".format(src_path, lineno + 1))
throw_error = True
continue
casting_stack_var_match = casting_stack_var.search(line)
if casting_stack_var_match:
print("casting stack var - {}:{}".format(src_path, lineno + 1))
throw_error = True
continue
if throw_error:
print("Found potential problems, exiting with code 1!")
exit(1)
else:
print("Looks good!")
+2 -1
View File
@@ -93,7 +93,8 @@ lines_to_ignore = [
";; failed to figure",
";; Used lq/sq",
";; this part is debug only",
";; WARN: Return type mismatch int vs none"
";; WARN: Return type mismatch int vs none",
";; WARN: Stack slot offset"
]
if decomp_ignore_errors:
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -114,7 +114,7 @@
(tracking-spline-method-19 (_type_ float vector tracking-spline-sampler) vector 19)
(tracking-spline-method-20 (_type_ vector int) none 20)
(tracking-spline-method-21 (_type_ vector float float float) vector 21)
(tracking-spline-method-22 (_type_ float) none 22)
(tracking-spline-method-22 (_type_ float) symbol 22)
(debug-draw-spline (_type_) none 23)
)
)
@@ -628,7 +628,7 @@
(:methods
(camera-master-method-14 (_type_ vector) vector 14)
(camera-master-method-15 (_type_ vector) vector 15)
(camera-master-method-16 (_type_ symbol) none 16)
(camera-master-method-16 (_type_ symbol) int 16)
)
)
+2 -3
View File
@@ -892,7 +892,7 @@
)
;; definition for method 22 of type tracking-spline
;; WARN: Return type mismatch int vs none.
;; WARN: Return type mismatch int vs symbol.
(defmethod tracking-spline-method-22 tracking-spline ((obj tracking-spline) (arg0 float))
(when (< arg0 (-> obj summed-len))
(let ((s5-0 (new 'stack-no-clear 'tracking-spline-sampler)))
@@ -904,8 +904,7 @@
(tracking-spline-method-14 obj s5-0)
)
)
0
(none)
(the-as symbol 0)
)
;; definition for method 9 of type tracking-spline
+1 -1
View File
@@ -611,7 +611,7 @@
(get-skeleton-origin (_type_) vector 9)
(draw-control-method-10 () none 10)
(draw-control-method-11 () none 11)
(draw-control-method-12 (_type_ int int) none 12)
(draw-control-method-12 (_type_ uint int) none 12)
(draw-control-method-13 () none 13)
(draw-control-method-14 (_type_ cspace-array joint-control) none 14)
)
+1 -1
View File
@@ -708,7 +708,7 @@
;; definition (debug) for function add-debug-line2d
;; INFO: Used lq/sq
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector) (end vector) (color vector))
(defun-debug add-debug-line2d ((enable symbol) (bucket bucket-id) (start vector4w) (end vector4w) (color vector4w))
(if (not enable)
(return #f)
)
+3 -3
View File
@@ -243,7 +243,7 @@
(debug-features game-feature :offset-assert 136)
(secrets game-secrets :offset-assert 144)
(unknown-pad1 uint32 :offset-assert 148)
(purchase-secrets uint32 :offset-assert 152)
(purchase-secrets game-secrets :offset-assert 152)
(unknown-pad2 uint32 :offset-assert 156)
(gun-type int32 :offset-assert 160)
(gun-ammo float 4 :offset-assert 164)
@@ -262,7 +262,7 @@
(last-continue continue-point :offset-assert 244)
(play-list (array game-task-info) :offset-assert 248)
(sub-task-list (array game-task-node-info) :offset-assert 252)
(unknown-pad5 (array game-task-node-info) :offset-assert 256)
(mission-list (array game-task-node-info) :offset-assert 256)
(task-counter uint32 :offset-assert 260)
(unknown-pad6 (array uint16) :offset-assert 264)
(level-opened uint8 32 :offset-assert 268)
@@ -285,7 +285,7 @@
(letterbox-time time-frame :offset-assert 400)
(hint-play-time time-frame :offset-assert 408)
(display-text-time time-frame :offset-assert 416)
(display-text-handle uint64 :offset-assert 424)
(display-text-handle handle :offset-assert 424)
(death-movie-tick int32 :offset-assert 432)
(want-auto-save symbol :offset-assert 436)
(auto-save-proc handle :offset-assert 440)
+1 -1
View File
@@ -1670,7 +1670,7 @@
0
)
(if (zero? (-> gp-0 display-text-handle))
(set! (-> gp-0 display-text-handle) (the-as uint #f))
(set! (-> gp-0 display-text-handle) (the-as handle #f))
)
(if (zero? (-> gp-0 game-score))
(set! (-> gp-0 game-score) (new 'global 'boxed-array float 152))
+1 -1
View File
@@ -12301,7 +12301,7 @@
)
)
)
(set! (-> gp-0 unknown-pad5) (new 'global 'boxed-array game-task-node-info 324))
(set! (-> gp-0 mission-list) (new 'global 'boxed-array game-task-node-info 324))
(dotimes (v1-3 (-> gp-0 sub-task-list length))
(if (-> gp-0 sub-task-list v1-3 info)
(set! (-> gp-0 sub-task-list v1-3 info manager) (the-as handle #f))
-2
View File
@@ -1001,10 +1001,8 @@
)
;; definition for function matrix-axis-angle!
;; WARN: Return type mismatch matrix vs none.
(defun matrix-axis-angle! ((arg0 matrix) (arg1 vector) (arg2 float))
(matrix-axis-sin-cos! arg0 arg1 (sin arg2) (cos arg2))
(none)
)
;; definition for function matrix-lerp!
+3 -3
View File
@@ -580,9 +580,9 @@
(goto cfg-4)
)
(format #t "[~8x] ~A~%" obj 'vector4w-4)
(format #t "~1Tdata[16] @ #x~X~%" (-> obj data))
(format #t "~1Tquad[4] @ #x~X~%" (-> obj data))
(format #t "~1Tvector[4] @ #x~X~%" (-> obj data))
(format #t "~1Tdata[16] @ #x~X~%" (-> obj vector))
(format #t "~1Tquad[4] @ #x~X~%" (-> obj vector))
(format #t "~1Tvector[4] @ #x~X~%" (-> obj vector))
(label cfg-4)
obj
)
@@ -11,11 +11,11 @@
:flag-assert #x1b005000cc
(:methods
(get-trans (_type_ int) vector 20)
(get-quat (_type_) quaternion 21)
(get-quat (_type_ int) quaternion 21)
(get-transv (_type_) vector 22)
(process-focusable-method-23 (_type_) none 23)
(process-focusable-method-24 (_type_) none 24)
(process-focusable-method-25 (_type_) int 25)
(process-focusable-method-24 (_type_) float 24)
(process-focusable-method-25 (_type_) time-frame 25)
(process-focusable-method-26 (_type_) none 26)
)
)
@@ -63,7 +63,7 @@
)
;; definition for method 21 of type process-focusable
(defmethod get-quat process-focusable ((obj process-focusable))
(defmethod get-quat process-focusable ((obj process-focusable) (arg0 int))
(-> obj root quat)
)
@@ -75,10 +75,8 @@
)
;; definition for method 24 of type process-focusable
;; WARN: Return type mismatch int vs none.
(defmethod process-focusable-method-24 process-focusable ((obj process-focusable))
0
(none)
0.0
)
;; definition for method 26 of type process-focusable
@@ -89,8 +87,9 @@
)
;; definition for method 25 of type process-focusable
;; WARN: Return type mismatch int vs time-frame.
(defmethod process-focusable-method-25 process-focusable ((obj process-focusable))
0
(the-as time-frame 0)
)
;; failed to figure out what this is:
+1 -7
View File
@@ -2817,13 +2817,7 @@
(when s4-1
(set! (-> self control unknown-vector38 quad) (-> (get-trans (the-as process-focusable s4-1) 0) quad))
(set! (-> self control unknown-vector38 y) (+ 4096.0 (-> self control unknown-vector38 y)))
(let* ((s3-2 (-> self control unknown-vector40))
(a0-15 (the-as process-focusable s4-1))
(t9-4 (method-of-object a0-15 get-quat))
)
0
(set! (-> s3-2 quad) (-> (t9-4 a0-15) vec quad))
)
(set! (-> self control unknown-vector40 quad) (-> (get-quat (the-as process-focusable s4-1) 0) vec quad))
)
(let ((f28-0 (sin (lerp-scale 0.0 16384.0 (ja-aframe-num 0) 0.0 30.0))))
(let ((f26-0 f28-0))
+2 -2
View File
@@ -1867,11 +1867,11 @@
(when (!= (-> self beard?) v1-248)
(cond
(v1-248
(draw-control-method-12 (-> self draw) 2 0)
(draw-control-method-12 (-> self draw) (the-as uint 2) 0)
(set! (-> self beard?) #t)
)
(else
(draw-control-method-12 (-> self draw) 0 2)
(draw-control-method-12 (-> self draw) (the-as uint 0) 2)
(set! (-> self beard?) #f)
)
)
+1 -1
View File
@@ -231,7 +231,7 @@
(new (symbol type) _type_ 0)
(initialize (_type_) none 9)
(update (_type_) none 10)
(bigmap-method-11 () none 11)
(bigmap-method-11 (_type_ int int int int) none 11)
(bigmap-method-12 () none 12)
(bigmap-method-13 () none 13)
(bigmap-method-14 (_type_) none 14)
+4 -4
View File
@@ -44,7 +44,7 @@
:size-assert #x34
:flag-assert #xb00000034
(:methods
(hud-sprite-method-9 () none 9)
(hud-sprite-method-9 (_type_ dma-buffer level) none 9)
(hud-sprite-method-10 () none 10)
)
)
@@ -77,13 +77,13 @@
:size-assert #x20
:flag-assert #x1000000020
(:methods
(hud-box-method-9 () none 9)
(hud-box-method-9 (_type_ dma-buffer) none 9)
(hud-box-method-10 () none 10)
(hud-box-method-11 () none 11)
(hud-box-method-12 () none 12)
(hud-box-method-13 (_type_ dma-buffer float) int 13)
(hud-box-method-14 () none 14)
(hud-box-method-15 () none 15)
(hud-box-method-14 (_type_) none 14)
(hud-box-method-15 (_type_) none 15)
)
)
File diff suppressed because it is too large Load Diff
+21 -19
View File
@@ -90,16 +90,18 @@
;; definition of type menu-option
(deftype menu-option (basic)
((name uint32 :offset-assert 4)
(scale basic :offset-assert 8)
(box bounding-box 1 :inline :offset-assert 16)
((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)
)
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
(:methods
(respond-progress (_type_ progress object symbol) int 9)
(menu-option-method-10 () none 10)
(respond-progress (_type_ progress object) int :behavior progress 9)
(menu-option-method-10 (_type_ progress font-context int symbol) none 10)
(menu-option-method-11 () none 11)
)
)
@@ -120,7 +122,7 @@
;; definition of type menu-on-off-option
(deftype menu-on-off-option (menu-option)
((value-to-modify pointer :offset-assert 48)
((value-to-modify (pointer symbol) :offset-assert 48)
)
:method-count-assert 12
:size-assert #x34
@@ -168,10 +170,10 @@
;; definition of type menu-language-option
(deftype menu-language-option (menu-option)
((language-selection uint64 :offset-assert 48)
(language-direction basic :offset-assert 56)
(language-transition basic :offset-assert 60)
(language-x-offset int32 :offset-assert 64)
((language-selection language-enum :offset-assert 48)
(language-direction symbol :offset-assert 56)
(language-transition basic :offset-assert 60)
(language-x-offset int32 :offset-assert 64)
)
:method-count-assert 12
:size-assert #x44
@@ -990,13 +992,13 @@
;; definition of type menu-secret-option
(deftype menu-secret-option (menu-option)
((item-index int32 :offset-assert 48)
(prev-item-index int32 :offset-assert 52)
(num-items int32 :offset-assert 56)
(num-hero-items int32 :offset-assert 60)
(secret-items basic :offset-assert 64)
(last-move uint64 :offset-assert 72)
(sprites hud-sprite 2 :inline :offset-assert 80)
((item-index int32 :offset-assert 48)
(prev-item-index int32 :offset-assert 52)
(num-items int32 :offset-assert 56)
(num-hero-items int32 :offset-assert 60)
(secret-items (array secret-item-option) :offset-assert 64)
(last-move uint64 :offset-assert 72)
(sprites hud-sprite 2 :inline :offset-assert 80)
)
:method-count-assert 12
:size-assert #xd0
@@ -1053,8 +1055,8 @@
;; definition of type menu-qr-option
(deftype menu-qr-option (menu-option)
((last-move uint64 :offset-assert 48)
(value-to-modify uint32 :offset 60)
((last-move uint64 :offset-assert 48)
(value-to-modify function :offset 60)
)
:method-count-assert 12
:size-assert #x40
@@ -0,0 +1,995 @@
;;-*-Lisp-*-
(in-package goal)
;; failed to figure out what this is:
(let ((a0-0 (new 'static 'skeleton-group
:name "skel-hud-ring"
:extra #f
:info #f
:art-group-name "hud-ring"
:bounds (new 'static 'vector :w 225280.0)
:version #x7
)
)
)
(set! (-> a0-0 jgeo) 0)
(set! (-> a0-0 janim) 2)
(set! (-> a0-0 mgeo 0) 1)
(set! (-> a0-0 lod-dist 0) 4095996000.0)
(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
:info #f
:art-group-name "hud-ring"
:bounds (new 'static 'vector :w 225280.0)
:version #x7
)
)
)
(set! (-> a0-1 jgeo) 3)
(set! (-> a0-1 janim) 5)
(set! (-> a0-1 mgeo 0) 4)
(set! (-> a0-1 lod-dist 0) 4095996000.0)
(add-to-loading-level a0-1)
)
;; 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))
;; 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))
;; 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))
;; 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))
;; definition for symbol *title*, type menu-option-list
(define *title* (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))
;; definition for symbol *options*, type menu-option-list
(define *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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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)
)
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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))
;; 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)
)
;; 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))
;; 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))
;; 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)
)
;; 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)
)
;; 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))
;; 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)
)
;; 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)
)
;; 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))
;; 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)
(info object :offset-assert 12)
(info-str string :offset 12)
(info-list pair :offset 12)
(text uint32 :offset-assert 16)
)
:method-count-assert 9
:size-assert #x14
: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
:name "intro"
:continue "village1-start"
:info '("intro-samos-hut" "intro-vortex" "intro-city-square" "intro-prison")
:text #x307
)
(new 'static 'hud-scene-info
:name "city-help-kid-intro"
:continue "ctyslumb-fort"
:info "city-help-kid-intro"
:text #x28c
)
(new 'static 'hud-scene-info
:name "city-help-kid-resolution"
:continue "ctyslumb-fort"
:info "city-help-kid-resolution"
:text #x28d
)
(new 'static 'hud-scene-info
:name "ruins-tower-intro"
:continue "ctysluma-tower-intro"
:info "ruins-tower-intro"
:text #x281
)
(new 'static 'hud-scene-info
:name "ruins-tower-victory"
:continue "ruins-hut"
:info "ruins-tower-victory"
:text #x282
)
(new 'static 'hud-scene-info :name "atoll-1-int" :continue "hideout-start" :info "atoll-1-int" :text #x2c8)
(new 'static 'hud-scene-info :name "atoll-1-res" :continue "atoll-movie" :info "atoll-1-res" :text #x2c9)
(new 'static 'hud-scene-info
:name "fortress-2-intro"
:continue "hideout-start"
:info "fortress-2-intro"
:text #x2bc
)
(new 'static 'hud-scene-info
:name "fortress-blow-up-ammo-res-a"
:continue "fordumpc-start"
:info "fortress-blow-up-ammo-res-a"
:text #x2bd
)
(new 'static 'hud-scene-info
:name "fortress-blow-up-ammo-res-b"
:continue "fordumpc-explode-movie"
:info "fortress-blow-up-ammo-res-b"
:text #x2be
)
(new 'static 'hud-scene-info
:name "city-krew-delivery-intro"
:continue "hideout-start"
:info "city-krew-delivery-intro"
:text #x28f
)
(new 'static 'hud-scene-info
:name "krew-delivery-res"
:continue "hiphog-start"
:info "krew-delivery-res"
:text #x290
)
(new 'static 'hud-scene-info :name "atoll-2-intro" :continue "hiphog-start" :info "atoll-2-intro" :text #x2ca)
(new 'static 'hud-scene-info
:name "atoll-sig-intro"
:continue "atoll-movie"
:info "atoll-sig-intro"
:text #x2ce
)
(new 'static 'hud-scene-info
:name "atoll-sig-tank"
:continue "atoll-movie"
:info "atoll-sig-tank"
:text #x2cf
)
(new 'static 'hud-scene-info
:name "atoll-sniper-a"
:continue "atoll-movie"
:info "atoll-sniper-a"
:text #x2d0
)
(new 'static 'hud-scene-info
:name "atoll-sniper-b"
:continue "atoll-movie"
:info "atoll-sniper-b"
:text #x2d1
)
(new 'static 'hud-scene-info
:name "atoll-sniper-c"
:continue "atoll-movie"
:info "atoll-sniper-c"
:text #x2d2
)
(new 'static 'hud-scene-info
:name "atoll-sniper-d"
:continue "atoll-movie"
:info "atoll-sniper-d"
:text #x2d3
)
(new 'static 'hud-scene-info
:name "atoll-sniper-e"
:continue "atoll-movie"
:info "atoll-sniper-e"
:text #x2d4
)
(new 'static 'hud-scene-info
:name "city-oracle-intro"
:continue "oracle-start"
:info "city-oracle-intro"
:text #x29d
)
(new 'static 'hud-scene-info
:name "city-oracle-level-0"
:continue "oracle-start"
:info "city-oracle-level-0"
:text #x29e
)
(new 'static 'hud-scene-info
:name "city-oracle-level-1"
:continue "oracle-start"
:info "city-oracle-level-1"
:text #x29f
)
(new 'static 'hud-scene-info
:name "city-oracle-level-2"
:continue "oracle-start"
:info "city-oracle-level-2"
:text #x2a0
)
(new 'static 'hud-scene-info
:name "city-oracle-level-3"
:continue "oracle-start"
:info "city-oracle-level-3"
:text #x2a1
)
(new 'static 'hud-scene-info :name "sewer-1-intro" :continue "hiphog-start" :info "sewer-1-intro" :text #x2c1)
(new 'static 'hud-scene-info :name "sewer-1-res" :continue "hiphog-start" :info "sewer-1-res" :text #x2c2)
(new 'static 'hud-scene-info
:name "city-get-yellow-gun"
:continue "gungame-movie"
:info "city-get-yellow-gun"
:text #x2b2
)
(new 'static 'hud-scene-info
:name "vin-rescue-intro"
:continue "hideout-start"
:info "vin-rescue-intro"
:text #x286
)
(new 'static 'hud-scene-info :name "vin-rescue" :continue "strip-start" :info "vin-rescue" :text #x287)
(new 'static 'hud-scene-info
:name "city-keira-delivery-intro"
:continue "hiphog-start"
:info "city-keira-delivery-intro"
:text #x2a7
)
(new 'static 'hud-scene-info
:name "city-krew-collection-intro"
:continue "hiphog-start"
:info "city-krew-collection-intro"
:text #x2a2
)
(new 'static 'hud-scene-info
:name "city-krew-collection-res"
:continue "hiphog-start"
:info "city-krew-collection-res"
:text #x2a3
)
(new 'static 'hud-scene-info
:name "city-keira-hover-challenge-intro"
:continue "garage-start-skate"
:info "city-keira-hover-challenge-intro"
:text #x294
)
(new 'static 'hud-scene-info
:name "city-put-hoverboard"
:continue "skatea-start"
:info "city-put-hoverboard"
:text #x2b4
)
(new 'static 'hud-scene-info
:name "city-keira-hover-challenge-res"
:continue "garage-start-skate"
:info "city-keira-hover-challenge-res"
:text #x295
)
(new 'static 'hud-scene-info
:name "atoll-3-intro"
:continue "hideout-start"
:info "atoll-3-intro"
:text #x2cb
)
(new 'static 'hud-scene-info
:name "atoll-save-ashelin-res-a"
:continue "atoll-movie"
:info "atoll-save-ashelin-res-a"
:text #x2cc
)
(new 'static 'hud-scene-info
:name "atoll-save-ashelin-res-b"
:continue "atoll-movie"
:info "atoll-save-ashelin-res-b"
:text #x2cd
)
(new 'static 'hud-scene-info
:name "drill-kill-metal-heads-intro"
:continue "vinroom-start"
:info "drill-kill-metal-heads-intro"
:text #x2d5
)
(new 'static 'hud-scene-info
:name "mountain-finditems-intro"
:continue "onintent-start"
:info "mountain-finditems-intro"
:text #x2d9
)
(new 'static 'hud-scene-info
:name "mountain-gear-res"
:continue "mountain-start"
:info "mountain-gear-res"
:text #x2da
)
(new 'static 'hud-scene-info
:name "mountain-shard-res"
:continue "mountain-start"
:info "mountain-shard-res"
:text #x2db
)
(new 'static 'hud-scene-info
:name "mountain-lens-res"
:continue "mountain-start"
:info "mountain-lens-res"
:text #x2dc
)
(new 'static 'hud-scene-info
:name "city-switch-on-power-intro"
:continue "vinroom-start"
:info "city-switch-on-power-intro"
:text #x293
)
(new 'static 'hud-scene-info
:name "palace-outside-window-res"
:continue "palroof-throne"
:info "palace-outside-window-res"
:text #x2dd
)
(new 'static 'hud-scene-info
:name "palace-outside-window-res-b"
:continue "palroof-boss"
:info "palace-outside-window-res-b"
:text #x2de
)
(new 'static 'hud-scene-info
:name "palace-boss-res"
:continue "palroof-boss"
:info "palace-boss-res"
:text #x2df
)
(new 'static 'hud-scene-info
:name "city-shuttle-underground-intro"
:continue "hideout-start"
:info "city-shuttle-underground-intro"
:text #x2a8
)
(new 'static 'hud-scene-info
:name "ruins-sacred-intro"
:continue "hideout-start"
:info "ruins-sacred-intro"
:text #x283
)
(new 'static 'hud-scene-info
:name "ruins-sacred-victory"
:continue "ruins-hut"
:info "ruins-sacred-victory"
:text #x284
)
)
)
;; 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
:name "forest-catch-metal-heads-intro"
:continue "hideout-start"
:info "forest-catch-metal-heads-intro"
:text #x2f1
)
(new 'static 'hud-scene-info
:name "city-get-hoverboard"
:continue "ctyfarma-airlock-movie"
:info "city-get-hoverboard"
:text #x2b3
)
(new 'static 'hud-scene-info
:name "city-escort-kid-intro"
:continue "escort-kid-intro"
:info "city-escort-kid-intro"
:text #x2a4
)
(new 'static 'hud-scene-info
:name "dig-knock-down-scaffolding-intro"
:continue "vinroom-start"
:info "dig-knock-down-scaffolding-intro"
:text #x2f6
)
(new 'static 'hud-scene-info
:name "dig-digger-explode"
:continue "dig1-start"
:info "dig-digger-explode"
:text #x2fa
)
(new 'static 'hud-scene-info
:name "city-intercept-tanker-intro"
:continue "ctymarkb-tanker"
:info "city-intercept-tanker-intro"
:text #x291
)
(new 'static 'hud-scene-info
:name "city-intercept-tanker-res"
:continue "ctymarkb-tanker"
:info "city-intercept-tanker-res"
:text #x292
)
(new 'static 'hud-scene-info
:name "city-meet-brutter-intro"
:continue "hiphog-start"
:info "city-meet-brutter-intro"
:text #x2a5
)
(new 'static 'hud-scene-info
:name "city-meet-brutter-res"
:continue "kiosk-start"
:info "city-meet-brutter-res"
:text #x2a6
)
(new 'static 'hud-scene-info :name "sewer-2-intro" :continue "hiphog-start" :info "sewer-2-intro" :text #x2c3)
(new 'static 'hud-scene-info
:name "sewer-drain-res"
:continue "sewer-start"
:info "sewer-drain-res"
:text #x2c4
)
(new 'static 'hud-scene-info
:name "ecowells-intro"
:continue "vinroom-start"
:info "ecowells-intro"
:text #x28a
)
(new 'static 'hud-scene-info
:name "ecowells-victory"
:continue "strip-start"
:info "ecowells-victory"
:text #x28b
)
(new 'static 'hud-scene-info
:name "drill-destroy-ship-intro"
:continue "vinroom-start"
:info "drill-destroy-ship-intro"
:text #x2d6
)
(new 'static 'hud-scene-info
:name "forest-hunt-camo-metal-heads-intro"
:continue "hiphog-start"
:info "forest-hunt-camo-metal-heads-intro"
:text #x2f2
)
(new 'static 'hud-scene-info
:name "city-class-3-race-intro"
:continue "garage-class3-movie"
:info "city-class-3-race-intro"
:text #x296
)
(new 'static 'hud-scene-info
:name "city-class-3-race-res"
:continue "garage-class3-movie"
:info "city-class-3-race-res"
:text #x297
)
(new 'static 'hud-scene-info
:name "city-protect-slums-intro"
:continue "ctyslumc-seal-movie"
:info "city-protect-slums-intro"
:text #x2ba
)
(new 'static 'hud-scene-info
:name "dig-find-totem-intro"
:continue "onintent-start"
:info "dig-find-totem-intro"
:text #x2f8
)
(new 'static 'hud-scene-info
:name "city-air-train-in-caspad"
:continue "ctyport-air-train"
:info "city-air-train-in-caspad"
:text #x2b6
)
(new 'static 'hud-scene-info
:name "caspad-air-train-out"
:continue "caspad-warp"
:info "caspad-air-train-out"
:text #x2e5
)
(new 'static 'hud-scene-info
:name "dig-find-totem-res"
:continue "dig-totem"
:info "dig-find-totem-res"
:text #x2f9
)
(new 'static 'hud-scene-info
:name "caspad-air-train-in"
:continue "caspad-warp"
:info "caspad-air-train-in"
:text #x2e4
)
(new 'static 'hud-scene-info
:name "city-air-train-out"
:continue "ctyport-air-train"
:info "city-air-train-out"
:text #x2b8
)
(new 'static 'hud-scene-info
:name "city-destroy-guard-vehicles-intro"
:continue "hideout-start"
:info "city-destroy-guard-vehicles-intro"
:text #x28e
)
(new 'static 'hud-scene-info
:name "city-play-onin-game-intro"
:continue "onintent-start"
:info "city-play-onin-game-intro"
:text #x2a9
)
(new 'static 'hud-scene-info
:name "city-play-onin-game-res"
:continue "onintent-start"
:info "city-play-onin-game-res"
:text #x2aa
)
(new 'static 'hud-scene-info
:name "canyon-insert-items-intro"
:continue "mountain-movie"
:info "canyon-insert-items-intro"
:text #x2fc
)
(new 'static 'hud-scene-info
:name "canyon-insert-items-res"
:continue "mincan-city"
:info "canyon-insert-items-res"
:text #x2fb
)
(new 'static 'hud-scene-info
:name "tomb-face-tests-intro"
:continue "tombd-start"
:info "tomb-face-tests-intro"
:text #x2e6
)
(new 'static 'hud-scene-info
:name "tomb-boulder-start"
:continue "tomb-boulder"
:info "tomb-boulder-start"
:text #x2ef
)
(new 'static 'hud-scene-info
:name "tomb-spider-scare"
:continue "tomb-boulder-explode"
:info "tomb-spider-scare"
:text #x2f0
)
(new 'static 'hud-scene-info
:name "tomb-unlock-start"
:continue "tomb-water-switch"
:info "tomb-unlock-start"
:text #x2e9
)
(new 'static 'hud-scene-info
:name "tomb-unlock-water"
:continue "tomb-water-switch"
:info "tomb-unlock-water"
:text #x2ea
)
(new 'static 'hud-scene-info
:name "tomb-unlock-poles"
:continue "tomb-poles-switch"
:info "tomb-unlock-poles"
:text #x2eb
)
(new 'static 'hud-scene-info
:name "tomb-boss-open"
:continue "tombboss-start"
:info "tomb-boss-open"
:text #x2ec
)
(new 'static 'hud-scene-info
:name "tomb-boss-intro"
:continue "tombboss-start"
:info "tomb-boss-intro"
:text #x2ed
)
(new 'static 'hud-scene-info
:name "tomb-boss-res"
:continue "tombboss-start"
:info "tomb-boss-res"
:text #x2ee
)
)
)
;; 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
:name "fortress-save-friends-intro-a"
:continue "hideout-start"
:info "fortress-save-friends-intro-a"
:text #x2bf
)
(new 'static 'hud-scene-info
:name "fortress-save-friends-res"
:continue "prison-start"
:info "fortress-save-friends-res"
:text #x2c0
)
(new 'static 'hud-scene-info
:name "sewer-blow-up-statue-intro"
:continue "hiphog-start"
:info "sewer-blow-up-statue-intro"
:text #x2c5
)
(new 'static 'hud-scene-info
:name "sewer-hosehead"
:continue "sewesc-start"
:info "sewer-hosehead"
:text #x2c7
)
(new 'static 'hud-scene-info
:name "sewer-blow-up-statue-res"
:continue "sewesc-start"
:info "sewer-blow-up-statue-res"
:text #x2c6
)
(new 'static 'hud-scene-info
:name "city-class-2-race-intro"
:continue "garage-class3-movie"
:info "city-class-2-race-intro"
:text #x298
)
(new 'static 'hud-scene-info
:name "city-class-2-race-res"
:continue "garage-class3-movie"
:info "city-class-2-race-res"
:text #x299
)
(new 'static 'hud-scene-info
:name "city-stop-bomb-bots-intro"
:continue "hideout-start"
:info "city-stop-bomb-bots-intro"
:text #x2ac
)
(new 'static 'hud-scene-info
:name "city-get-dark-gun"
:continue "gungame-movie"
:info "city-get-dark-gun"
:text #x2b5
)
(new 'static 'hud-scene-info
:name "city-errol-challenge-intro"
:continue "hiphog-start"
:info "city-errol-challenge-intro"
:text #x2ad
)
(new 'static 'hud-scene-info
:name "city-errol-challenge-res"
:continue "garage-start-class3"
:info "city-errol-challenge-res"
:text #x2bb
)
(new 'static 'hud-scene-info
:name "ruins-get-to-hut-res"
:continue "ruins-hut"
:info "ruins-get-to-hut-res"
:text #x285
)
(new 'static 'hud-scene-info
:name "forest-protect-samos-intro-a"
:continue "onintent-start"
:info "forest-protect-samos-intro-a"
:text #x2f3
)
(new 'static 'hud-scene-info
:name "forest-protect-samos-intro-b"
:continue "forest-tree"
:info "forest-protect-samos-intro-b"
:text #x2f4
)
(new 'static 'hud-scene-info
:name "forest-protect-samos-res"
:continue "forest-tree"
:info "forest-protect-samos-res"
:text #x2f5
)
(new 'static 'hud-scene-info :name "crane-intro" :continue "vinroom-start" :info "crane-intro" :text #x288)
(new 'static 'hud-scene-info :name "crane-victory" :continue "strip-start" :info "crane-victory" :text #x289)
(new 'static 'hud-scene-info
:name "drill-destroy-control-tower-intro"
:continue "vinroom-start"
:info "drill-destroy-control-tower-intro"
:text #x2d7
)
(new 'static 'hud-scene-info
:name "drill-top-explode"
:continue "drillmid-checkpoint"
:info "drill-top-explode"
:text #x2d8
)
(new 'static 'hud-scene-info
:name "city-save-lurkers-intro"
:continue "kiosk-start"
:info "city-save-lurkers-intro"
:text #x2ab
)
(new 'static 'hud-scene-info
:name "city-class-1-race-intro-a"
:continue "garage-class3-movie"
:info "city-class-1-race-intro-a"
:text #x29a
)
(new 'static 'hud-scene-info
:name "city-class-1-race-intro-b"
:continue "stadiumd-start"
:info "city-class-1-race-intro-b"
:text #x29b
)
(new 'static 'hud-scene-info
:name "city-class-1-race-res"
:continue "stadiumd-start"
:info "city-class-1-race-res"
:text #x29c
)
(new 'static 'hud-scene-info
:name "palace-sneak-in-res"
:continue "palroof-throne"
:info "palace-sneak-in-res"
:text #x2e0
)
(new 'static 'hud-scene-info
:name "castle-krew-boss-fight-intro"
:continue "casboss-start"
:info "castle-krew-boss-fight-intro"
:text #x2e2
)
(new 'static 'hud-scene-info
:name "castle-krew-boss-fight-res"
:continue "casboss-start"
:info "castle-krew-boss-fight-res"
:text #x2e3
)
(new 'static 'hud-scene-info
:name "city-ashelin-drop-off"
:continue "ctyport-air-train-ashelin"
:info "city-ashelin-drop-off"
:text #x2b9
)
(new 'static 'hud-scene-info
:name "city-whack-a-metal-intro"
:continue "hiphog-start"
:info "city-whack-a-metal-intro"
:text #x2ae
)
(new 'static 'hud-scene-info
:name "city-whack-a-metal-res"
:continue "hiphog-start"
:info "city-whack-a-metal-res"
:text #x2af
)
(new 'static 'hud-scene-info
:name "city-defend-stadium-intro"
:continue "stadium-blimp"
:info "city-defend-stadium-intro"
:text #x2b0
)
(new 'static 'hud-scene-info
:name "city-defend-stadium-res"
:continue "stadium-blimp"
:info "city-defend-stadium-res"
:text #x2b1
)
(new 'static 'hud-scene-info
:name "under-find-sig-res"
:continue "under-start"
:info "under-find-sig-res"
:text #x2fd
)
(new 'static 'hud-scene-info
:name "under-centipede-one"
:continue "under-start"
:info "under-centipede-one"
:text #x2fe
)
(new 'static 'hud-scene-info
:name "under-centipede-two"
:continue "under-start"
:info "under-centipede-two"
:text #x2ff
)
(new 'static 'hud-scene-info
:name "under-centipede-three"
:continue "under-start"
:info "under-centipede-three"
:text #x300
)
(new 'static 'hud-scene-info
:name "under-get-sig-out-res"
:continue "under-start"
:info "under-get-sig-out-res"
:text #x301
)
(new 'static 'hud-scene-info
:name "consite-find-baron-res"
:continue "consite-start"
:info "consite-find-baron-res"
:text #x2e1
)
(new 'static 'hud-scene-info
:name "nest-break-barrier-res"
:continue "nest-gun"
:info "nest-break-barrier-res"
:text #x302
)
(new 'static 'hud-scene-info
:name "nest-air-train-out"
:continue "nest-warp"
:info "nest-air-train-out"
:text #x303
)
(new 'static 'hud-scene-info
:name "nest-air-train-in"
:continue "nest-warp"
:info "nest-air-train-in"
:text #x304
)
(new 'static 'hud-scene-info
:name "nest-boss-intro"
:continue "nestb-boss"
:info "nest-kor-boss-fight-intro-b"
:text #x306
)
(new 'static 'hud-scene-info
:name "nest-boss-mid"
:continue "nestb-boss"
:info "nest-kor-boss-fight-mid"
:text #x305
)
(new 'static 'hud-scene-info
:name "outro"
:continue "nestb-outro"
:info '("outro-nest" "outro-palace" "outro-hiphog" "outro-port")
:text #x308
)
)
)
File diff suppressed because it is too large Load Diff
+294 -59
View File
@@ -93,15 +93,15 @@
)
;; definition for function convert-korean-text
(defun convert-korean-text ((arg0 game-text))
"Converts the provided [[game-text]] into korean. Returns a [[string]]"
(defun convert-korean-text ((arg0 string))
"Converts the provided [[string]] of [[game-text]] into korean. Returns a [[string]]"
(local-vars (v1-21 int))
(let ((gp-0 (&-> arg0 text)))
(let ((gp-0 (-> arg0 data)))
*expanded-text-line0*
(let ((s4-0 0))
0
(let ((s1-0 0)
(s5-0 ((method-of-type string length) (the-as string arg0)))
(s5-0 (length arg0))
)
(set! *expand-buf-number* (logxor *expand-buf-number* 1))
(let ((s3-0 (if (zero? *expand-buf-number*)
@@ -114,33 +114,26 @@
(clear s3-0)
(while (< s4-0 s5-0)
(cond
((= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3)
((= (-> gp-0 s4-0) 3)
(+! s4-0 1)
(while (and (< s4-0 s5-0)
(!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3)
(!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 4)
)
(set! (-> s3-0 data s1-0) (-> (the-as (pointer uint8) (&+ gp-0 s4-0))))
(while (and (< s4-0 s5-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4))
(set! (-> s3-0 data s1-0) (-> gp-0 s4-0))
(+! s4-0 1)
(+! s1-0 1)
)
)
(else
(let ((v1-17 (+ s4-0 1)))
(-> (the-as (pointer uint8) (&+ gp-0 v1-17)))
(-> gp-0 v1-17)
(set! s4-0 (+ v1-17 1))
)
(set! (-> s3-0 data s1-0) (the-as uint 126))
(let ((v1-19 (+ s1-0 1)))
(set! (-> s3-0 data v1-19) (the-as uint 89))
(let ((v1-20 (+ v1-19 1)))
(while (and (< s4-0 s5-0)
(< v1-20 s2-0)
(!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 3)
(!= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 4)
)
(while (and (< s4-0 s5-0) (< v1-20 s2-0) (!= (-> gp-0 s4-0) 3) (!= (-> gp-0 s4-0) 4))
(cond
((= (-> (the-as (pointer uint8) (&+ gp-0 s4-0))) 5)
((= (-> gp-0 s4-0) 5)
(set! (-> s3-0 data v1-20) (the-as uint 1))
(+! s4-0 1)
(set! v1-21 (+ v1-20 1))
@@ -150,7 +143,7 @@
(set! v1-21 (+ v1-20 1))
)
)
(set! (-> s3-0 data v1-21) (-> (the-as (pointer uint8) (&+ gp-0 s4-0))))
(set! (-> s3-0 data v1-21) (-> gp-0 s4-0))
(+! s4-0 1)
(let ((v1-22 (+ v1-21 1)))
(set! (-> s3-0 data v1-22) (the-as uint 126))
@@ -230,7 +223,7 @@
)
)
((= (-> obj language-id) 6)
(convert-korean-text (the-as game-text (-> obj data v1-2 text)))
(convert-korean-text (-> obj data v1-2 text))
)
(else
(-> obj data v1-2 text)
@@ -257,7 +250,261 @@
(define text-is-loading #f)
;; definition for function load-game-text-info
;; ERROR: function was not converted to expressions. Cannot decompile.
;; WARN: Found some very strange gotos. Check result carefully, this is not well tested.
;; ERROR: failed type prop at 3: Could not figure out load: (set! v1 (l.wu gp))
;; WARN: Return type mismatch none vs int.
(defun load-game-text-info ((a0-0 string) (a1-0 symbol) (a2-0 kheap))
"Load text, if needed. txt-name is the group name, curr-text is the _symbol_ for
the game-text-info, and heap is the heap to load to. The heap will be cleared."
(local-vars
(v0-0 none)
(v0-1 none)
(v0-2 none)
(v0-3 none)
(v0-4 none)
(v0-5 none)
(v0-6 none)
(v0-7 none)
(v0-8 none)
(v0-9 none)
(v0-10 none)
(v0-11 none)
(v0-12 none)
(v0-13 none)
(v1-0 game-text-info)
(v1-1 none)
(v1-2 none)
(v1-3 none)
(v1-4 none)
(v1-5 none)
(v1-6 none)
(v1-7 none)
(v1-9 none)
(v1-10 none)
(v1-11 none)
(v1-12 none)
(v1-13 none)
(v1-14 none)
(v1-16 none)
(v1-17 none)
(v1-18 none)
(v1-20 none)
(v1-21 none)
(v1-24 none)
(v1-25 none)
(v1-26 none)
(a0-1 none)
(a0-2 none)
(a0-3 none)
(a0-4 none)
(a0-5 none)
(a0-6 none)
(a0-7 none)
(a0-8 none)
(a0-10 none)
(a0-11 none)
(a0-12 none)
(a0-13 none)
(a0-14 none)
(a0-15 none)
(a0-17 none)
(a0-18 none)
(a0-19 none)
(a0-20 none)
(a0-21 none)
(a0-22 none)
(a1-2 none)
(a1-3 none)
(a1-4 none)
(a1-5 none)
(a1-6 none)
(a1-7 none)
(a1-8 none)
(a1-9 none)
(a2-1 none)
(a2-2 none)
(a2-3 none)
(a2-4 none)
(a2-5 none)
(a2-6 none)
(a3-1 none)
(a3-2 none)
(t0-0 none)
(s1-0 none)
(s2-0 none)
(s2-1 none)
(s3-0 none)
(s3-1 none)
(t9-0 none)
(t9-1 none)
(t9-2 none)
(t9-3 none)
(t9-4 none)
(t9-5 none)
(t9-6 none)
(t9-7 none)
(t9-8 none)
(t9-9 none)
(t9-10 none)
(t9-11 none)
(t9-12 none)
(sv-16 none)
(sv-24 none)
(sv-32 none)
(sv-40 none)
)
(when (begin
(when (begin
(and (begin
(set! v1-0 (the-as game-text-info (l.wu a1-0)))
(set! sv-16 v1-0)
(set! v1-1 (the-as none *setting-control*))
(set! v1-2 (the-as none (l.d (+ v1-1 28))))
(set! sv-24 v1-2)
(set! sv-32 0)
(set! v1-3 (the-as none (-> a2-0 top)))
(set! a0-1 (the-as none (-> a2-0 base)))
(set! v1-4 (the-as none (- v1-3 a0-1)))
(set! sv-40 v1-4)
(set! t9-0 (the-as none scf-get-territory))
(set! v0-0 (the-as none (call!)))
(set! v1-5 (the-as none (+ v0-0 -1)))
(set! a0-2 (the-as none (zero? v1-5)))
a0-2
)
(begin (set! v1-7 sv-24) (zero? v1-7))
(begin (set! t9-1 (the-as none demo?)) (set! v0-1 (the-as none (call!))) (set! v1-6 (the-as none (not v0-1))))
)
v1-6
)
(set! v1-9 (the-as none 7))
(set! sv-24 v1-9)
)
(or (begin (set! v1-10 sv-16) (set! a0-3 (the-as none (= v1-10 #f))) a0-3)
(begin
(set! v1-12 sv-16)
(set! v1-13 (the-as none (l.w (+ v1-12 4))))
(set! a0-4 sv-24)
(set! a0-5 (the-as none (!= v1-13 a0-4)))
a0-5
)
(begin
(set! t9-2 (the-as none string=))
(set! v1-14 sv-16)
(set! a0-6 (the-as none (l.wu (+ v1-14 8))))
(set! a1-1 (the-as none a0-0))
(set! v0-2 (the-as none (call!)))
(set! v1-11 (the-as none (not v0-2)))
)
)
v1-11
)
(cond
((begin
(set! v1-16 (the-as none a2-0))
(set! a0-7 (the-as none (l.wu v1-16)))
(s.w! (+ v1-16 8) a0-7)
((b! #t L50 (nop!)) (nop!))
(label cfg-16)
(set! v0-3 (the-as none 0))
((b! #t L56 (nop!)) (nop!))
(label cfg-17)
(set! s3-0 (the-as none str-load))
(set! s2-0 (the-as none format))
(set! t9-3 (the-as none clear))
(set! a0-8 (the-as none *temp-string*))
(call!)
(set! a0-9 (the-as none v0-4))
(set! a1-2 (the-as none L100))
(set! a2-1 sv-24)
(set! a3-0 (the-as none a0-0))
(set! t9-4 (the-as none s2-0))
(call!)
(set! a0-10 (the-as none *temp-string*))
(set! a1-3 (the-as none -1))
(set! v1-17 (the-as none -64))
(set! a2-2 (the-as none (l.wu (+ a2-0 8))))
(set! a2-3 (the-as none (+ a2-2 63)))
(set! a2-4 (the-as none (logand v1-17 a2-3)))
(set! v1-18 (the-as none (l.wu (+ a2-0 4))))
(set! a3-1 (the-as none (l.wu (+ a2-0 8))))
(set! a3-2 (the-as none (- v1-18 a3-1)))
(set! t9-5 (the-as none s3-0))
(set! v0-6 (the-as none (call!)))
((b! (not v0-6) L49 (nop!)) (nop!))
(label cfg-19)
(set! t9-6 (the-as none str-load-status))
(set! a0-11 (& sv-32))
(set! v0-7 (the-as none (call!)))
(set! v1-20 (the-as none v0-7))
(set! a0-12 (the-as none 'error))
((b! (!= v1-20 a0-12) L52 (set! a0-13 #f)) (empty-form))
(set! t9-7 (the-as none format))
(set! a0-14 (the-as none 0))
(set! a1-4 (the-as none L99))
(call!)
(set! v0-3 (the-as none 0))
((b! #t L56 (nop!)) (nop!))
(set! v1-21 (the-as none 0))
((b! #t L54 (nop!)) (nop!))
(label cfg-22)
(set! a0-15 sv-32)
(set! a1-5 sv-40)
(set! a1-6 (the-as none (+ a1-5 -300)))
(>=.si a0-15 a1-6)
)
(return (begin
(set! t9-8 (the-as none format))
(set! a0-17 (the-as none 0))
(set! a1-7 (the-as none L98))
(call!)
(set! v0-3 (the-as none 0))
)
)
)
((begin (set! a0-18 (the-as none 'busy)) (= v1-20 a0-18))
(begin (nop!) (nop!) (nop!) (nop!) (nop!) (nop!) (goto cfg-19))
)
)
(if (begin
(label cfg-27)
(set! v1-24 (the-as none -64))
(set! a0-19 (the-as none (l.wu (+ a2-0 8))))
(set! a0-20 (the-as none (+ a0-19 63)))
(set! s2-1 (the-as none (logand v1-24 a0-20)))
(set! t9-9 (the-as none flush-cache))
(set! a0-21 (the-as none 0))
(call!)
(set! s3-1 (the-as none link))
(set! s1-0 (the-as none format))
(set! t9-10 (the-as none clear))
(set! a0-22 (the-as none *temp-string*))
(call!)
(set! a0-23 (the-as none v0-11))
(set! a1-8 (the-as none L100))
(set! a2-5 sv-24)
(set! t9-11 (the-as none s1-0))
(set! a3-3 (the-as none a0-0))
(call!)
(set! v1-25 (the-as none *temp-string*))
(set! a1-9 (the-as none (+ v1-25 4)))
(set! a2-6 sv-32)
(set! t0-0 (the-as none 0))
(set! t9-12 (the-as none s3-1))
(set! a0-24 (the-as none s2-1))
(set! a3-4 (the-as none a2-0))
(set! v0-13 (the-as none (call!)))
(s.w! a1-0 v0-13)
(set! v1-26 (the-as none (l.wu a1-0)))
(<=0.si v1-26)
)
(s.w! a1-0 #f)
)
)
(set! v0-3 (the-as none 0))
(label cfg-30)
(ret-value v0-3)
)
;; definition for function load-level-text-files
;; WARN: Return type mismatch int vs none.
@@ -278,53 +525,41 @@
"Draws some lines"
(when *cheat-mode*
(let ((s5-0 (new 'static 'vector4w))
(gp-0 (new 'static 'matrix))
(gp-0 (new 'static 'vector4w-4))
)
(set-vector!
(-> gp-0 vector 0)
(the-as float (the int (+ -256.0 (-> arg0 origin x))))
(the-as float (the int (+ -208.0 (-> arg0 origin y))))
0.0
(the-as float #x1)
(the int (+ -256.0 (-> arg0 origin x)))
(the int (+ -208.0 (-> arg0 origin y)))
0
1
)
(set-vector!
(-> gp-0 vector 1)
(the-as float (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))))
(the-as float (the int (+ -208.0 (-> arg0 origin y))))
0.0
(the-as float #x1)
(the int (+ -256.0 (-> arg0 width) (-> arg0 origin x)))
(the int (+ -208.0 (-> arg0 origin y)))
0
1
)
(set-vector!
(-> gp-0 vector 2)
(the-as float (the int (+ -256.0 (-> arg0 width) (-> arg0 origin x))))
(the-as float (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))))
0.0
(the-as float #x1)
(the int (+ -256.0 (-> arg0 width) (-> arg0 origin x)))
(the int (+ -208.0 (-> arg0 height) (-> arg0 origin y)))
0
1
)
(set-vector!
(-> gp-0 trans)
(the-as float (the int (+ -256.0 (-> arg0 origin x))))
(the-as float (the int (+ -208.0 (-> arg0 height) (-> arg0 origin y))))
0.0
(the-as float #x1)
(-> gp-0 vector 3)
(the int (+ -256.0 (-> arg0 origin x)))
(the int (+ -208.0 (-> arg0 height) (-> arg0 origin y)))
0
1
)
(set-vector! s5-0 128 128 128 128)
(add-debug-line2d
#t
(bucket-id debug-no-zbuf1)
(the-as vector (-> gp-0 vector))
(-> gp-0 vector 1)
(the-as vector s5-0)
)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 1) (-> gp-0 vector 2) (the-as vector s5-0))
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 2) (-> gp-0 trans) (the-as vector s5-0))
(add-debug-line2d
#t
(bucket-id debug-no-zbuf1)
(-> gp-0 trans)
(the-as vector (-> gp-0 vector))
(the-as vector s5-0)
)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (the-as vector4w (-> gp-0 vector)) (-> gp-0 vector 1) s5-0)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 1) (-> gp-0 vector 2) s5-0)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 2) (-> gp-0 vector 3) s5-0)
(add-debug-line2d #t (bucket-id debug-no-zbuf1) (-> gp-0 vector 3) (the-as vector4w (-> gp-0 vector)) s5-0)
)
)
0
@@ -573,11 +808,11 @@
(draw-string *game-text-line* s2-1 arg1)
(set! (-> arg1 color) (-> *font-work* last-color))
(let ((a3-2 (-> s2-1 base)))
(let ((v1-121 (-> s2-1 base)))
(set! (-> (the-as (pointer int64) v1-121)) #x20000000)
(s.w! (+ v1-121 8) 0)
(s.w! (+ v1-121 12) 0)
(set! (-> s2-1 base) (&+ v1-121 16))
(let ((v1-121 (the-as object (-> s2-1 base))))
(set! (-> (the-as dma-packet v1-121) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
(set! (-> (the-as dma-packet v1-121) vif0) (new 'static 'vif-tag))
(set! (-> (the-as dma-packet v1-121) vif1) (new 'static 'vif-tag))
(set! (-> s2-1 base) (&+ (the-as pointer v1-121) 16))
)
(dma-bucket-insert-tag
(-> *display* frames (-> *display* on-screen) bucket-group)
+6 -23
View File
@@ -27,6 +27,8 @@
"rand-vu-init",
"rand-vu",
"rand-vu-nostep",
// text - TODO - https://github.com/open-goal/jak-project/issues/1939
"load-game-text-info",
// MATRIX
"matrix-axis-sin-cos-vu!",
"matrix-axis-sin-cos!",
@@ -63,10 +65,6 @@
"(method 17 trsqv)",
// history - rgba issues
"history-draw",
// text - cfg failure
"load-game-text-info",
// - never fixed this one in jak 1, assumed there was an original bug?
"print-game-text",
// joint asm
"cspace<-parented-transformq-joint!",
"(method 11 art-joint-anim-manager)",
@@ -91,22 +89,12 @@
"v-slrp2!",
"v-slrp3!",
// cam-master
// - focus understanding / decomp crashes
"reset-target-tracking",
// - incomplete bitfield?
"(method 16 camera-master)",
"master-track-target",
// cam-states
// - mostly decompiler crashes/hangs
"cam-bike-code",
"cam-stick-code",
"cam-string-code",
"cam-string-line-of-sight",
"cam-string-joystick", // whats butt-handle!
"cam-circular-code",
"cam-circular-position",
"cam-los-collide", // vector-dot with stack
// cam-update
"update-visible", // assertion crash when filling out bsp-header
// - vector-dot issue
"cam-los-collide",
// sparticle-launcher
// - field loaded as signed and unsigned
"sp-relaunch-particle-3d",
@@ -173,10 +161,5 @@
],
"skip_compile_states": {
"cam-bike": [
"code" // hang
],
"cam-stick": ["code"],
"cam-circular": ["enter", "event"]
}
}