mirror of
https://github.com/open-goal/jak-project
synced 2026-07-09 14:55:51 -04:00
fix jak 2 text encoding/decoding + minor decomp type fixes (#2476)
Now all text in all non-Korean languages is built correctly.
This commit is contained in:
+524
-167
@@ -56,7 +56,6 @@ GameTextFontBank::GameTextFontBank(GameTextVersion version,
|
||||
std::sort(
|
||||
m_replace_info->begin(), m_replace_info->end(),
|
||||
[](const ReplaceInfo& a, const ReplaceInfo& b) { return a.from.size() > b.from.size(); });
|
||||
(void)m_version;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -105,62 +104,170 @@ const EncodeInfo* GameTextFontBank::find_encode_to_game(const std::string& in, i
|
||||
return best_info;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Finds a remap info that best matches the byte sequence (is the longest match).
|
||||
*/
|
||||
const ReplaceInfo* GameTextFontBank::find_replace_to_utf8(const std::string& in, int off) const {
|
||||
const ReplaceInfo* best_info = nullptr;
|
||||
for (auto& info : *m_replace_info) {
|
||||
if (info.from.empty() || in.size() - off < info.from.size())
|
||||
continue;
|
||||
|
||||
bool found = true;
|
||||
for (int i = 0; found && i < (int)info.from.size(); ++i) {
|
||||
if (in.at(i + off) != info.from.at(i)) {
|
||||
found = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (found && (!best_info || info.to.length() > best_info->to.length())) {
|
||||
best_info = &info;
|
||||
}
|
||||
}
|
||||
return best_info;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Finds a remap info that best matches the character sequence (is the longest match).
|
||||
*/
|
||||
const ReplaceInfo* GameTextFontBank::find_replace_to_game(const std::string& in, int off) const {
|
||||
const ReplaceInfo* best_info = nullptr;
|
||||
for (auto& info : *m_replace_info) {
|
||||
if (info.to.length() == 0 || in.size() - off < info.to.size())
|
||||
continue;
|
||||
|
||||
bool found = true;
|
||||
for (int i = 0; found && i < (int)info.to.length(); ++i) {
|
||||
if (in.at(i + off) != info.to.at(i)) {
|
||||
found = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (found && (!best_info || info.to.length() > best_info->to.length())) {
|
||||
best_info = &info;
|
||||
}
|
||||
}
|
||||
return best_info;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Try to replace specific substrings with better variants.
|
||||
* These are for hiding confusing text transforms.
|
||||
*/
|
||||
std::string GameTextFontBank::replace_to_utf8(std::string& str) const {
|
||||
for (auto& info : *m_replace_info) {
|
||||
auto pos = str.find(info.from);
|
||||
while (pos != std::string::npos) {
|
||||
str.replace(pos, info.from.size(), info.to);
|
||||
pos = str.find(info.from, pos + info.to.size());
|
||||
std::string newstr;
|
||||
|
||||
for (int i = 0; i < (int)str.length();) {
|
||||
auto remap = find_replace_to_utf8(str, i);
|
||||
if (!remap) {
|
||||
newstr.push_back(str.at(i));
|
||||
i += 1;
|
||||
} else {
|
||||
for (auto b : remap->to) {
|
||||
newstr.push_back(b);
|
||||
}
|
||||
i += remap->from.length();
|
||||
}
|
||||
}
|
||||
|
||||
str = newstr;
|
||||
return str;
|
||||
}
|
||||
|
||||
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);
|
||||
pos = str.find(info.to, pos + info.from.size());
|
||||
std::string newstr;
|
||||
|
||||
for (int i = 0; i < (int)str.length();) {
|
||||
auto remap = find_replace_to_game(str, i);
|
||||
if (!remap) {
|
||||
newstr.push_back(str.at(i));
|
||||
i += 1;
|
||||
} else {
|
||||
for (auto b : remap->from) {
|
||||
newstr.push_back(b);
|
||||
}
|
||||
i += remap->to.length();
|
||||
}
|
||||
}
|
||||
|
||||
str = newstr;
|
||||
return str;
|
||||
}
|
||||
|
||||
std::string GameTextFontBank::encode_utf8_to_game(std::string& str) const {
|
||||
std::string new_str;
|
||||
std::string newstr;
|
||||
|
||||
for (int i = 0; i < (int)str.length();) {
|
||||
auto remap = find_encode_to_game(str, i);
|
||||
if (!remap) {
|
||||
new_str.push_back(str.at(i));
|
||||
newstr.push_back(str.at(i));
|
||||
i += 1;
|
||||
} else {
|
||||
for (auto b : remap->bytes) {
|
||||
new_str.push_back(b);
|
||||
newstr.push_back(b);
|
||||
}
|
||||
i += remap->chars.length();
|
||||
}
|
||||
}
|
||||
|
||||
str = new_str;
|
||||
str = newstr;
|
||||
return str;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Turn a normal readable string into a string readable in the Jak 1 font encoding.
|
||||
* Turn a normal readable string into a string readable in the in-game font encoding and converts
|
||||
* \cXX escape sequences
|
||||
*/
|
||||
std::string GameTextFontBank::convert_utf8_to_game(std::string str) const {
|
||||
replace_to_game(str);
|
||||
encode_utf8_to_game(str);
|
||||
return str;
|
||||
std::string GameTextFontBank::convert_utf8_to_game(std::string str, bool escape) const {
|
||||
std::string newstr;
|
||||
|
||||
if (escape) {
|
||||
for (size_t i = 0; i < str.size(); ++i) {
|
||||
auto c = str.at(i);
|
||||
if (c == '"') {
|
||||
newstr.push_back('"');
|
||||
i += 1;
|
||||
} else if (c == '\\') {
|
||||
if (i + 1 >= str.size()) {
|
||||
throw std::runtime_error("incomplete string escape code");
|
||||
}
|
||||
auto p = str.at(i + 1);
|
||||
if (p == 'c') {
|
||||
if (i + 3 >= str.size()) {
|
||||
throw std::runtime_error("incomplete string escape code");
|
||||
}
|
||||
auto first = str.at(i + 2);
|
||||
auto second = str.at(i + 3);
|
||||
if (!hex_char(first) || !hex_char(second)) {
|
||||
throw std::runtime_error("invalid character escape hex number");
|
||||
}
|
||||
char hex_num[3] = {first, second, '\0'};
|
||||
std::size_t end = 0;
|
||||
auto value = std::stoul(hex_num, &end, 16);
|
||||
if (end != 2) {
|
||||
throw std::runtime_error("invalid character escape");
|
||||
}
|
||||
ASSERT(value < 256);
|
||||
newstr.push_back(char(value));
|
||||
i += 3;
|
||||
} else if (p == '"' || p == '\\') {
|
||||
newstr.push_back(p);
|
||||
i += 1;
|
||||
} else {
|
||||
throw std::runtime_error(
|
||||
fmt::format("unknown string escape code '{}' (0x{:x})", p, u32(p)));
|
||||
}
|
||||
} else {
|
||||
newstr.push_back(c);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
newstr = str;
|
||||
}
|
||||
|
||||
replace_to_game(newstr);
|
||||
encode_utf8_to_game(newstr);
|
||||
return newstr;
|
||||
}
|
||||
|
||||
bool GameTextFontBank::valid_char_range(const char in) const {
|
||||
@@ -176,83 +283,48 @@ bool GameTextFontBank::valid_char_range(const char in) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Turn a normal readable string into a string readable in the in-game font encoding and converts
|
||||
* \cXX escape sequences
|
||||
*/
|
||||
std::string GameTextFontBank::convert_utf8_to_game_with_escape(const std::string& str) const {
|
||||
std::string newstr;
|
||||
|
||||
for (size_t i = 0; i < str.size(); ++i) {
|
||||
auto c = str.at(i);
|
||||
if (c == '"') {
|
||||
newstr.push_back('"');
|
||||
i += 1;
|
||||
} else if (c == '\\') {
|
||||
if (i + 1 >= str.size()) {
|
||||
throw std::runtime_error("incomplete string escape code");
|
||||
}
|
||||
auto p = str.at(i + 1);
|
||||
if (p == 'c') {
|
||||
if (i + 3 >= str.size()) {
|
||||
throw std::runtime_error("incomplete string escape code");
|
||||
}
|
||||
auto first = str.at(i + 2);
|
||||
auto second = str.at(i + 3);
|
||||
if (!hex_char(first) || !hex_char(second)) {
|
||||
throw std::runtime_error("invalid character escape hex number");
|
||||
}
|
||||
char hex_num[3] = {first, second, '\0'};
|
||||
std::size_t end = 0;
|
||||
auto value = std::stoul(hex_num, &end, 16);
|
||||
if (end != 2) {
|
||||
throw std::runtime_error("invalid character escape");
|
||||
}
|
||||
ASSERT(value < 256);
|
||||
newstr.push_back(char(value));
|
||||
i += 3;
|
||||
} else if (p == '"') {
|
||||
newstr.push_back(p);
|
||||
i += 1;
|
||||
} else {
|
||||
throw std::runtime_error("unknown string escape code");
|
||||
}
|
||||
} else {
|
||||
newstr.push_back(c);
|
||||
}
|
||||
}
|
||||
|
||||
replace_to_game(newstr);
|
||||
encode_utf8_to_game(newstr);
|
||||
return newstr;
|
||||
}
|
||||
|
||||
/*!
|
||||
* Convert a string from the game-text font encoding to something normal.
|
||||
* Unprintable characters become escape sequences, including tab and newline.
|
||||
*/
|
||||
std::string GameTextFontBank::convert_game_to_utf8(const char* in) const {
|
||||
std::string temp;
|
||||
std::string result;
|
||||
std::string test = in;
|
||||
if (test.find("America") != std::string::npos) {
|
||||
printf("");
|
||||
}
|
||||
while (*in) {
|
||||
auto remap = find_encode_to_utf8(in);
|
||||
if (remap != nullptr) {
|
||||
result.append(remap->chars);
|
||||
temp.append(remap->chars);
|
||||
in += remap->bytes.size() - 1;
|
||||
} else if (valid_char_range(*in)) {
|
||||
result.push_back(*in);
|
||||
} else if (*in == '\n') {
|
||||
result += "\\n";
|
||||
} else if (*in == '\t') {
|
||||
result += "\\t";
|
||||
} else if (*in == '\\') {
|
||||
result += "\\\\";
|
||||
} else if (*in == '"') {
|
||||
result += "\\\"";
|
||||
} else if (valid_char_range(*in) || *in == '\n' || *in == '\t' || *in == '\\' || *in == '\"') {
|
||||
temp.push_back(*in);
|
||||
} else {
|
||||
result += fmt::format("\\c{:02x}", uint8_t(*in));
|
||||
temp += fmt::format("\\c{:02x}", uint8_t(*in));
|
||||
}
|
||||
in++;
|
||||
}
|
||||
replace_to_utf8(temp);
|
||||
for (int i = 0; i < temp.length(); ++i) {
|
||||
auto c = temp.at(i);
|
||||
if (c == '\n') {
|
||||
result += "\\n";
|
||||
} else if (c == '\t') {
|
||||
result += "\\t";
|
||||
} else if (c == '\\') {
|
||||
if (i < temp.length() - 1 && temp.at(i + 1) == 'c') {
|
||||
result.push_back(c);
|
||||
} else {
|
||||
result += "\\\\";
|
||||
}
|
||||
} else if (c == '"') {
|
||||
result += "\\\"";
|
||||
} else {
|
||||
result.push_back(c);
|
||||
}
|
||||
}
|
||||
return replace_to_utf8(result);
|
||||
}
|
||||
|
||||
@@ -848,13 +920,13 @@ GameTextFontBank g_font_bank_jak1_v2(GameTextVersion::JAK1_V2,
|
||||
|
||||
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", "Nº"},
|
||||
{"~+4VÇ~-4V", "ç"},
|
||||
{"~+4Vç~-4V", ",c"},
|
||||
|
||||
// tildes
|
||||
{"N~Y~-22H~-4V<TIL>~Z", "Ñ"},
|
||||
@@ -968,9 +1040,6 @@ static std::vector<ReplaceInfo> s_replace_info_jak2 = {
|
||||
{",~+8H", "、"},
|
||||
{"~+8H ", " "},
|
||||
|
||||
// (hack) special case kanji
|
||||
{"~~", "世"},
|
||||
|
||||
// playstation buttons
|
||||
// - face
|
||||
{"~Y~22L<~Z~Y~27L*~Z~Y~1L>~Z~Y~23L[~Z~+26H", "<PAD_X>"},
|
||||
@@ -978,47 +1047,73 @@ static std::vector<ReplaceInfo> s_replace_info_jak2 = {
|
||||
{"~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",
|
||||
{"~Y~22L<PAD_PART_DPAD_L>~Z~3L~+17H~-13V<PAD_PART_DPAD_U>~Z~22L~+17H~+14V<PAD_PART_DPAD_D>~Z~"
|
||||
"22L~+32H<PAD_PART_DPAD_R>~Z~+56H",
|
||||
"<PAD_DPAD_UP>"},
|
||||
{"~Y~22L<SYM7>~Z~3L~+17H~-13V<SYM8>~Z~3L~+17H~+14V<SYM9>~Z~22L~+32H<SYM10>~Z~+56H",
|
||||
{"~Y~22L<PAD_PART_DPAD_L>~Z~3L~+17H~-13V<PAD_PART_DPAD_U>~Z~3L~+17H~+14V<PAD_PART_DPAD_D>~Z~"
|
||||
"22L~+32H<PAD_PART_DPAD_R>~Z~+56H",
|
||||
"<PAD_DPAD_DOWN>"},
|
||||
{"~Y~22L<SYM7>~Z~22L~+17H~-13V<SYM8>~Z~22L~+17H~+14V<SYM9>~Z~22L~+32H<SYM10>~Z~+56H",
|
||||
{"~Y~22L<PAD_PART_DPAD_L>~Z~22L~+17H~-13V<PAD_PART_DPAD_U>~Z~22L~+17H~+14V<PAD_PART_DPAD_D>~Z~"
|
||||
"22L~+32H<PAD_PART_DPAD_R>~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",
|
||||
{"~Y~22L~-2H~-12V<PAD_PART_SHOULDER_TOP_LEFT><PAD_PART_SHOULDER_TOP_RIGHT>~Z~22L~-2H~+17V<PAD_"
|
||||
"PART_SHOULDER_BOTTOM_LEFT><PAD_PART_SHOULDER_BOTTOM_RIGHT>~Z~1L~+4H~+3V<PAD_PART_L1_NAME>~Z~+"
|
||||
"38H",
|
||||
"<PAD_L1>"},
|
||||
{"~Y~22L~-2H~-12V<SYM1><SYM2>~Z~22L~-2H~+17V<SYM3><SYM4>~Z~1L~+6H~+3V<SYM6>~Z~+38H",
|
||||
{"~Y~22L~-2H~-12V<PAD_PART_SHOULDER_TOP_LEFT><PAD_PART_SHOULDER_TOP_RIGHT>~Z~22L~-2H~+17V<PAD_"
|
||||
"PART_SHOULDER_BOTTOM_LEFT><PAD_PART_SHOULDER_BOTTOM_RIGHT>~Z~1L~+6H~+3V<PAD_PART_R1_NAME>~Z~+"
|
||||
"38H",
|
||||
"<PAD_R1>"},
|
||||
{"~Y~22L~-2H~-6V<SYM11><SYM12>~Z~22L~-2H~+16V<SYM15><SYM14>~Z~1L~+5H~-2V<SYM13>~Z~+38H",
|
||||
{"~Y~22L~-2H~-6V<PAD_PART_TRIGGER_TOP_LEFT><PAD_PART_TRIGGER_TOP_RIGHT>~Z~22L~-2H~+16V<PAD_"
|
||||
"PART_TRIGGER_BOTTOM_LEFT><PAD_PART_TRIGGER_BOTTOM_RIGHT>~Z~1L~+5H~-2V<PAD_PART_R2_NAME>~Z~+"
|
||||
"38H",
|
||||
"<PAD_R2>"},
|
||||
{"~Y~22L~-2H~-6V<SYM11><SYM12>~Z~22L~-2H~+16V<SYM15><SYM14>~Z~1L~+5H~-2V<SYM22>~Z~+38H",
|
||||
{"~Y~22L~-2H~-6V<PAD_PART_TRIGGER_TOP_LEFT><PAD_PART_TRIGGER_TOP_RIGHT>~Z~22L~-2H~+16V<PAD_"
|
||||
"PART_TRIGGER_BOTTOM_LEFT><PAD_PART_TRIGGER_BOTTOM_RIGHT>~Z~1L~+5H~-2V<PAD_PART_L2_NAME>~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",
|
||||
{"~1L~+8H~Y<PAD_PART_STICK>~Z~6L~-16H<PAD_PART_STICK_LEFT>~Z~+16h~6L<PAD_PART_STICK_RIGHT>~Z~"
|
||||
"6L~-15V<PAD_PART_STICK_DOWN>~Z~+13V~6L<PAD_PART_STICK_UP>~Z~-10H~+9V~6L<PAD_PART_STICK_UP_"
|
||||
"LEFT>~Z~+10H~+9V~6L<PAD_PART_STICK_UP_RIGHT>~Z~-10H~-11V~6L<PAD_PART_STICK_DOWN_LEFT>~Z~+10H~"
|
||||
"-11V~6L<PAD_PART_STICK_DOWN_RIGHT>~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>"},
|
||||
{"~Y~1L~+8H<PAD_PART_STICK>~Z~6L~-8H<PAD_PART_STICK_LEFT>~Z~+24H~6L<PAD_PART_STICK_RIGHT>~Z~+"
|
||||
"40H",
|
||||
"<PAD_ANALOG_LEFT_RIGHT>"},
|
||||
{"~Y~1L<PAD_PART_STICK>~Z~6L~-15V<PAD_PART_STICK_DOWN>~Z~+13V~6L<PAD_PART_STICK_UP>~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",
|
||||
{"~Y~6L<FLAG_PART_VERT_STRIPE_LARGE>~Z~+15H~1L<FLAG_PART_VERT_STRIPE_LARGE>~Z~+30H~3L<FLAG_"
|
||||
"PART_VERT_STRIPE_LARGE>~Z~+45H",
|
||||
"<FLAG_ITALIAN>"},
|
||||
{"~Y~5L<FLAG_PART_FILL>~Z~3L<FLAG_PART_TOP_BOTTOM_STRIPE>~]~-1H~Y~5L<FLAG_PART_FILL>~Z~3L<FLAG_"
|
||||
"PART_TOP_BOTTOM_STRIPE>~Z~+26H",
|
||||
"<FLAG_SPAIN>"},
|
||||
{"~Y~39L~~~Z~3L<FLAG_PART_HORZ_TRIPE_MIDDLE>~Z~5L<FLAG_PART_HORZ_TRIPE_BOTTOM>~]~-1H~Y~39L~~~Z~"
|
||||
"3L<FLAG_PART_HORZ_TRIPE_MIDDLE>~Z~5L<FLAG_PART_HORZ_TRIPE_BOTTOM>~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",
|
||||
{"~Y~7L<FLAG_PART_VERT_STRIPE_LARGE>~Z~+15H~1L<FLAG_PART_VERT_STRIPE_LARGE>~Z~+30H~3L<FLAG_"
|
||||
"PART_VERT_STRIPE_LARGE>~Z~+47H",
|
||||
"<FLAG_FRANCE>"},
|
||||
{"~Y~1L<FLAG_PART_FILL>~Z~3L<FLAG_PART_UK_CROSS_LEFT>~Z~7L<FLAG_PART_UK_FILL_LEFT>~]~-1H~Y~1L<"
|
||||
"FLAG_PART_FILL>~Z~3L<FLAG_PART_UK_CROSS_RIGHT>~Z~7L<FLAG_PART_UK_FILL_RIGHT>~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",
|
||||
{"~Y~1L<FLAG_PART_FILL>~Z~3L<FLAG_PART_USA_STRIPES_LEFT>~Z~7L<FLAG_PART_USA_STARS>~]~-"
|
||||
"1H~Y~1L<FLAG_PART_FILL>~Z~3L<FLAG_PART_USA_STRIPES_RIGHT>~Z~+26H",
|
||||
"<FLAG_USA>"},
|
||||
{"~Y~1L<FLAG_PART_FILL>~Z~39L<FLAG_PART_KOREA_TRIGRAMS_LEFT>~]~-1H~Y~1L<FLAG_PART_FILL>~Z~39L<"
|
||||
"FLAG_PART_KOREA_TRIGRAMS_RIGHT>~Z~-11H~7L<FLAG_PART_KOREA_CIRCLE_FILL>~Z~-11H~3L<"
|
||||
"FLAG_PART_KOREA_CIRCLE_TOP>~Z~+26H",
|
||||
"<FLAG_KOREA>"},
|
||||
{"~Y~1L<SYM19>~<SYM26>~-1H~Y~1L<SYM19>~Z~-11H~3L<SYM27>~Z~+26H", "<FLAG_JAPAN>"},
|
||||
{"~Y~1L<FLAG_PART_FILL>~]~-1H~Y~1L<FLAG_PART_FILL>~Z~-11H~3L<FLAG_PART_JAPAN_SUN>~Z~+26H",
|
||||
"<FLAG_JAPAN>"},
|
||||
|
||||
// weird stuff
|
||||
// - descenders
|
||||
@@ -1028,10 +1123,11 @@ static std::vector<ReplaceInfo> s_replace_info_jak2 = {
|
||||
{"~+7Vq~-7V", "q"},
|
||||
{"~+1Vj~-1V", "j"},
|
||||
|
||||
{"\\\\\\\\", "\\n"}, // wtf happened here!?
|
||||
{"\\\\",
|
||||
"~%"}, // this is 2 slashes, duplicated because we use an escape sequence when decompiling
|
||||
|
||||
// - symbols and ligatures
|
||||
{"~-4H~-3V\\c19~+3V~-4H",
|
||||
{"~-4H~-3V<SOMETHING>~+3V~-4H",
|
||||
"<SUPERSCRIPT_QUOTE>"}, // used for the 4<__> place in spanish. the 5th uses the same
|
||||
// character but looks different...?
|
||||
{"~Y~-6Hº~Z~+10H", "°"},
|
||||
@@ -1041,7 +1137,6 @@ static std::vector<ReplaceInfo> s_replace_info_jak2 = {
|
||||
{"~[~32L", "<COLOR_DEFAULT>"}};
|
||||
|
||||
static std::vector<EncodeInfo> s_encode_info_jak2 = {
|
||||
{"_", {0x03}}, // large space
|
||||
{"ˇ", {0x10}}, // caron
|
||||
{"`", {0x11}}, // grave accent
|
||||
{"'", {0x12}}, // apostrophe
|
||||
@@ -1051,59 +1146,64 @@ static std::vector<EncodeInfo> s_encode_info_jak2 = {
|
||||
{"º", {0x16}}, // numero/overring
|
||||
{"¡", {0x17}}, // inverted exclamation mark
|
||||
{"¿", {0x18}}, // inverted question mark
|
||||
{"ç", {0x1d}}, // c-cedilla
|
||||
{"Ç", {0x1e}}, // c-cedilla
|
||||
{"ß", {0x1f}}, // eszett
|
||||
{"<SOMETHING>", {0x19}},
|
||||
{"ç", {0x1d}}, // c-cedilla
|
||||
{"Ç", {0x1e}}, // 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}},
|
||||
{"<FLAG_PART_HORZ_TRIPE_MIDDLE>", {0x7f}},
|
||||
{"<FLAG_PART_HORZ_TRIPE_BOTTOM>", {0x80}},
|
||||
{"<FLAG_PART_VERT_STRIPE_LARGE>", {0x81}},
|
||||
{"<FLAG_PART_VERT_STRIPE_RIGHT>", {0x82}},
|
||||
{"<FLAG_PART_VERT_STRIPE_LEFT>", {0x83}},
|
||||
{"<FLAG_PART_VERT_STRIPE_MIDDLE>", {0x84}},
|
||||
{"<FLAG_PART_FILL>", {0x85}},
|
||||
{"<FLAG_PART_JAPAN_SUN>", {0x86}},
|
||||
{"<FLAG_PART_KOREA_TRIGRAMS_LEFT>", {0x87}},
|
||||
{"<FLAG_PART_KOREA_TRIGRAMS_RIGHT>", {0x88}},
|
||||
{"<FLAG_PART_KOREA_CIRCLE_TOP>", {0x89}},
|
||||
{"<FLAG_PART_KOREA_CIRCLE_FILL>", {0x8a}},
|
||||
{"<FLAG_PART_TOP_BOTTOM_STRIPE>", {0x8b}},
|
||||
{"<FLAG_PART_UK_CROSS_LEFT>", {0x8c}},
|
||||
{"<FLAG_PART_UK_CROSS_RIGHT>", {0x8d}},
|
||||
{"<FLAG_PART_UK_FILL_LEFT>", {0x8e}},
|
||||
{"<FLAG_PART_UK_FILL_RIGHT>", {0x8f}},
|
||||
{"<FLAG_PART_USA_STRIPES_RIGHT>", {0x90}},
|
||||
{"<PAD_PART_STICK>", {0x91}},
|
||||
{"<PAD_PART_SELECT>", {0x92}},
|
||||
{"<PAD_PART_TRIGGER_BACK>", {0x93}},
|
||||
{"<PAD_PART_R1_NAME>", {0x94}},
|
||||
{"<PAD_PART_L1_NAME>", {0x95}},
|
||||
{"<PAD_PART_R2_NAME>", {0x96}},
|
||||
{"<PAD_PART_L2_NAME>", {0x97}},
|
||||
{"<PAD_PART_STICK_UP>", {0x98}},
|
||||
{"<PAD_PART_STICK_UP_RIGHT>", {0x99}},
|
||||
{"<FLAG_PART_USA_STRIPES_LEFT>", {0x9a}},
|
||||
{"<FLAG_PART_USA_STARS>", {0x9b}},
|
||||
{"<PAD_PART_STICK_DOWN>", {0x9c}},
|
||||
{"<PAD_PART_STICK_DOWN_LEFT>", {0x9d}},
|
||||
{"<PAD_PART_STICK_LEFT>", {0x9e}},
|
||||
{"<PAD_PART_STICK_UP_LEFT>", {0x9f}},
|
||||
{"<PAD_PART_DPAD_D>", {0xa0}},
|
||||
{"<PAD_PART_DPAD_L>", {0xa1}},
|
||||
{"<PAD_PART_DPAD_U>", {0xa2}},
|
||||
{"<PAD_PART_DPAD_R>", {0xa3}},
|
||||
{"<PAD_PART_STICK_RIGHT>", {0xa4}},
|
||||
{"<PAD_PART_STICK_DOWN_RIGHT>", {0xa5}},
|
||||
{"<PAD_PART_SHOULDER_TOP_LEFT>", {0xa6}},
|
||||
{"<PAD_PART_SHOULDER_TOP_RIGHT>", {0xa7}},
|
||||
{"<PAD_PART_TRIGGER_TOP_LEFT>", {0xa8}},
|
||||
{"<PAD_PART_TRIGGER_TOP_RIGHT>", {0xa9}},
|
||||
{"<PAD_PART_TRIGGER_SHIM1>", {0xaa}},
|
||||
{"<PAD_PART_TRIGGER_SHIM2>", {0xab}},
|
||||
{"<PAD_PART_SHOULDER_SHIM2>", {0xac}},
|
||||
|
||||
{"<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}},
|
||||
{"<PAD_PART_SHOULDER_BOTTOM_LEFT>", {0xb0}},
|
||||
{"<PAD_PART_SHOULDER_BOTTOM_RIGHT>", {0xb1}},
|
||||
{"<PAD_PART_TRIGGER_BOTTOM_LEFT>", {0xb2}},
|
||||
{"<PAD_PART_TRIGGER_BOTTOM_RIGHT>", {0xb3}},
|
||||
// {"入", {1, 0x00}},
|
||||
// {"年", {1, 0x01}},
|
||||
// punctuation
|
||||
@@ -1459,7 +1559,7 @@ static std::vector<EncodeInfo> s_encode_info_jak2 = {
|
||||
{"予", {2, 0x83}},
|
||||
{"用", {2, 0x84}},
|
||||
{"落", {2, 0x85}},
|
||||
// {"録", {2, 0x86}},
|
||||
{"緑", {2, 0x86}},
|
||||
|
||||
{"封", {2, 0x88}},
|
||||
{"印", {2, 0x89}},
|
||||
@@ -1467,6 +1567,263 @@ static std::vector<EncodeInfo> s_encode_info_jak2 = {
|
||||
{"最", {2, 0x8b}},
|
||||
{"刻", {2, 0x8c}},
|
||||
{"足", {2, 0x8d}},
|
||||
|
||||
{"<K300>", {3, 0x00}},
|
||||
{"<K301>", {3, 0x01}},
|
||||
{"<K302>", {3, 0x02}},
|
||||
{"<K303>", {3, 0x03}},
|
||||
{"<K304>", {3, 0x04}},
|
||||
{"<K305>", {3, 0x05}},
|
||||
{"<K306>", {3, 0x06}},
|
||||
{"<K307>", {3, 0x07}},
|
||||
{"<K308>", {3, 0x08}},
|
||||
{"<K309>", {3, 0x09}},
|
||||
{"<K30a>", {3, 0x0a}},
|
||||
{"<K30b>", {3, 0x0b}},
|
||||
{"<K30c>", {3, 0x0c}},
|
||||
{"<K30d>", {3, 0x0d}},
|
||||
{"<K30e>", {3, 0x0e}},
|
||||
{"<K30f>", {3, 0x0f}},
|
||||
{"<K310>", {3, 0x10}},
|
||||
{"<K311>", {3, 0x11}},
|
||||
{"<K312>", {3, 0x12}},
|
||||
{"<K313>", {3, 0x13}},
|
||||
{"<K314>", {3, 0x14}},
|
||||
{"<K315>", {3, 0x15}},
|
||||
{"<K316>", {3, 0x16}},
|
||||
{"<K317>", {3, 0x17}},
|
||||
{"<K318>", {3, 0x18}},
|
||||
{"<K319>", {3, 0x19}},
|
||||
{"<K31a>", {3, 0x1a}},
|
||||
{"<K31b>", {3, 0x1b}},
|
||||
{"<K31c>", {3, 0x1c}},
|
||||
{"<K31d>", {3, 0x1d}},
|
||||
{"<K31e>", {3, 0x1e}},
|
||||
{"<K31f>", {3, 0x1f}},
|
||||
{"<K320>", {3, 0x20}},
|
||||
{"<K321>", {3, 0x21}},
|
||||
{"<K322>", {3, 0x22}},
|
||||
{"<K323>", {3, 0x23}},
|
||||
{"<K324>", {3, 0x24}},
|
||||
{"<K325>", {3, 0x25}},
|
||||
{"<K326>", {3, 0x26}},
|
||||
{"<K327>", {3, 0x27}},
|
||||
{"<K328>", {3, 0x28}},
|
||||
{"<K329>", {3, 0x29}},
|
||||
{"<K32a>", {3, 0x2a}},
|
||||
{"<K32b>", {3, 0x2b}},
|
||||
{"<K32c>", {3, 0x2c}},
|
||||
{"<K32d>", {3, 0x2d}},
|
||||
{"<K32e>", {3, 0x2e}},
|
||||
{"<K32f>", {3, 0x2f}},
|
||||
{"<K330>", {3, 0x30}},
|
||||
{"<K331>", {3, 0x31}},
|
||||
{"<K332>", {3, 0x32}},
|
||||
{"<K333>", {3, 0x33}},
|
||||
{"<K334>", {3, 0x34}},
|
||||
{"<K335>", {3, 0x35}},
|
||||
{"<K336>", {3, 0x36}},
|
||||
{"<K337>", {3, 0x37}},
|
||||
{"<K338>", {3, 0x38}},
|
||||
{"<K339>", {3, 0x39}},
|
||||
{"<K33a>", {3, 0x3a}},
|
||||
{"<K33b>", {3, 0x3b}},
|
||||
{"<K33c>", {3, 0x3c}},
|
||||
{"<K33d>", {3, 0x3d}},
|
||||
{"<K33e>", {3, 0x3e}},
|
||||
{"<K33f>", {3, 0x3f}},
|
||||
{"<K340>", {3, 0x40}},
|
||||
{"<K341>", {3, 0x41}},
|
||||
{"<K342>", {3, 0x42}},
|
||||
{"<K343>", {3, 0x43}},
|
||||
{"<K344>", {3, 0x44}},
|
||||
{"<K345>", {3, 0x45}},
|
||||
{"<K346>", {3, 0x46}},
|
||||
{"<K347>", {3, 0x47}},
|
||||
{"<K348>", {3, 0x48}},
|
||||
{"<K349>", {3, 0x49}},
|
||||
{"<K34a>", {3, 0x4a}},
|
||||
{"<K34b>", {3, 0x4b}},
|
||||
{"<K34c>", {3, 0x4c}},
|
||||
{"<K34d>", {3, 0x4d}},
|
||||
{"<K34e>", {3, 0x4e}},
|
||||
{"<K34f>", {3, 0x4f}},
|
||||
{"<K350>", {3, 0x50}},
|
||||
{"<K351>", {3, 0x51}},
|
||||
{"<K352>", {3, 0x52}},
|
||||
{"<K353>", {3, 0x53}},
|
||||
{"<K354>", {3, 0x54}},
|
||||
{"<K355>", {3, 0x55}},
|
||||
{"<K356>", {3, 0x56}},
|
||||
{"<K357>", {3, 0x57}},
|
||||
{"<K358>", {3, 0x58}},
|
||||
{"<K359>", {3, 0x59}},
|
||||
{"<K35a>", {3, 0x5a}},
|
||||
{"<K35b>", {3, 0x5b}},
|
||||
{"<K35c>", {3, 0x5c}},
|
||||
{"<K35d>", {3, 0x5d}},
|
||||
{"<K35e>", {3, 0x5e}},
|
||||
{"<K35f>", {3, 0x5f}},
|
||||
{"<K360>", {3, 0x60}},
|
||||
{"<K361>", {3, 0x61}},
|
||||
{"<K362>", {3, 0x62}},
|
||||
{"<K363>", {3, 0x63}},
|
||||
{"<K364>", {3, 0x64}},
|
||||
{"<K365>", {3, 0x65}},
|
||||
{"<K366>", {3, 0x66}},
|
||||
{"<K367>", {3, 0x67}},
|
||||
{"<K368>", {3, 0x68}},
|
||||
{"<K369>", {3, 0x69}},
|
||||
{"<K36a>", {3, 0x6a}},
|
||||
{"<K36b>", {3, 0x6b}},
|
||||
{"<K36c>", {3, 0x6c}},
|
||||
{"<K36d>", {3, 0x6d}},
|
||||
{"<K36e>", {3, 0x6e}},
|
||||
{"<K36f>", {3, 0x6f}},
|
||||
{"<K370>", {3, 0x70}},
|
||||
{"<K371>", {3, 0x71}},
|
||||
{"<K372>", {3, 0x72}},
|
||||
{"<K373>", {3, 0x73}},
|
||||
{"<K374>", {3, 0x74}},
|
||||
{"<K375>", {3, 0x75}},
|
||||
{"<K376>", {3, 0x76}},
|
||||
{"<K377>", {3, 0x77}},
|
||||
{"<K378>", {3, 0x78}},
|
||||
{"<K379>", {3, 0x79}},
|
||||
{"<K37a>", {3, 0x7a}},
|
||||
{"<K37b>", {3, 0x7b}},
|
||||
{"<K37c>", {3, 0x7c}},
|
||||
{"<K37d>", {3, 0x7d}},
|
||||
{"<K37e>", {3, 0x7e}},
|
||||
{"<K37f>", {3, 0x7f}},
|
||||
{"<K380>", {3, 0x80}},
|
||||
{"<K381>", {3, 0x81}},
|
||||
{"<K382>", {3, 0x82}},
|
||||
{"<K383>", {3, 0x83}},
|
||||
{"<K384>", {3, 0x84}},
|
||||
{"<K385>", {3, 0x85}},
|
||||
{"<K386>", {3, 0x86}},
|
||||
{"<K387>", {3, 0x87}},
|
||||
{"<K388>", {3, 0x88}},
|
||||
{"<K389>", {3, 0x89}},
|
||||
{"<K38a>", {3, 0x8a}},
|
||||
{"<K38b>", {3, 0x8b}},
|
||||
{"<K38c>", {3, 0x8c}},
|
||||
{"<K38d>", {3, 0x8d}},
|
||||
{"<K38e>", {3, 0x8e}},
|
||||
{"<K38f>", {3, 0x8f}},
|
||||
{"<K390>", {3, 0x90}},
|
||||
{"<K391>", {3, 0x91}},
|
||||
{"<K392>", {3, 0x92}},
|
||||
{"<K393>", {3, 0x93}},
|
||||
{"<K394>", {3, 0x94}},
|
||||
{"<K395>", {3, 0x95}},
|
||||
{"<K396>", {3, 0x96}},
|
||||
{"<K397>", {3, 0x97}},
|
||||
{"<K398>", {3, 0x98}},
|
||||
{"<K399>", {3, 0x99}},
|
||||
{"<K39a>", {3, 0x9a}},
|
||||
{"<K39b>", {3, 0x9b}},
|
||||
{"<K39c>", {3, 0x9c}},
|
||||
{"<K39d>", {3, 0x9d}},
|
||||
{"<K39e>", {3, 0x9e}},
|
||||
{"<K39f>", {3, 0x9f}},
|
||||
{"<K3a0>", {3, 0xa0}},
|
||||
{"<K3a1>", {3, 0xa1}},
|
||||
{"<K3a2>", {3, 0xa2}},
|
||||
{"<K3a3>", {3, 0xa3}},
|
||||
{"<K3a4>", {3, 0xa4}},
|
||||
{"<K3a5>", {3, 0xa5}},
|
||||
{"<K3a6>", {3, 0xa6}},
|
||||
{"<K3a7>", {3, 0xa7}},
|
||||
{"<K3a8>", {3, 0xa8}},
|
||||
{"<K3a9>", {3, 0xa9}},
|
||||
{"<K3aa>", {3, 0xaa}},
|
||||
{"<K3ab>", {3, 0xab}},
|
||||
{"<K3ac>", {3, 0xac}},
|
||||
{"<K3ad>", {3, 0xad}},
|
||||
{"<K3ae>", {3, 0xae}},
|
||||
{"<K3af>", {3, 0xaf}},
|
||||
{"<K3b0>", {3, 0xb0}},
|
||||
{"<K3b1>", {3, 0xb1}},
|
||||
{"<K3b2>", {3, 0xb2}},
|
||||
{"<K3b3>", {3, 0xb3}},
|
||||
{"<K3b4>", {3, 0xb4}},
|
||||
{"<K3b5>", {3, 0xb5}},
|
||||
{"<K3b6>", {3, 0xb6}},
|
||||
{"<K3b7>", {3, 0xb7}},
|
||||
{"<K3b8>", {3, 0xb8}},
|
||||
{"<K3b9>", {3, 0xb9}},
|
||||
{"<K3ba>", {3, 0xba}},
|
||||
{"<K3bb>", {3, 0xbb}},
|
||||
{"<K3bc>", {3, 0xbc}},
|
||||
{"<K3bd>", {3, 0xbd}},
|
||||
{"<K3be>", {3, 0xbe}},
|
||||
{"<K3bf>", {3, 0xbf}},
|
||||
{"<K3c0>", {3, 0xc0}},
|
||||
{"<K3c1>", {3, 0xc1}},
|
||||
{"<K3c2>", {3, 0xc2}},
|
||||
{"<K3c3>", {3, 0xc3}},
|
||||
{"<K3c4>", {3, 0xc4}},
|
||||
{"<K3c5>", {3, 0xc5}},
|
||||
{"<K3c6>", {3, 0xc6}},
|
||||
{"<K3c7>", {3, 0xc7}},
|
||||
{"<K3c8>", {3, 0xc8}},
|
||||
{"<K3c9>", {3, 0xc9}},
|
||||
{"<K3ca>", {3, 0xca}},
|
||||
{"<K3cb>", {3, 0xcb}},
|
||||
{"<K3cc>", {3, 0xcc}},
|
||||
{"<K3cd>", {3, 0xcd}},
|
||||
{"<K3ce>", {3, 0xce}},
|
||||
{"<K3cf>", {3, 0xcf}},
|
||||
{"<K3d0>", {3, 0xd0}},
|
||||
{"<K3d1>", {3, 0xd1}},
|
||||
{"<K3d2>", {3, 0xd2}},
|
||||
{"<K3d3>", {3, 0xd3}},
|
||||
{"<K3d4>", {3, 0xd4}},
|
||||
{"<K3d5>", {3, 0xd5}},
|
||||
{"<K3d6>", {3, 0xd6}},
|
||||
{"<K3d7>", {3, 0xd7}},
|
||||
{"<K3d8>", {3, 0xd8}},
|
||||
{"<K3d9>", {3, 0xd9}},
|
||||
{"<K3da>", {3, 0xda}},
|
||||
{"<K3db>", {3, 0xdb}},
|
||||
{"<K3dc>", {3, 0xdc}},
|
||||
{"<K3dd>", {3, 0xdd}},
|
||||
{"<K3de>", {3, 0xde}},
|
||||
{"<K3df>", {3, 0xdf}},
|
||||
{"<K3e0>", {3, 0xe0}},
|
||||
{"<K3e1>", {3, 0xe1}},
|
||||
{"<K3e2>", {3, 0xe2}},
|
||||
{"<K3e3>", {3, 0xe3}},
|
||||
{"<K3e4>", {3, 0xe4}},
|
||||
{"<K3e5>", {3, 0xe5}},
|
||||
{"<K3e6>", {3, 0xe6}},
|
||||
{"<K3e7>", {3, 0xe7}},
|
||||
{"<K3e8>", {3, 0xe8}},
|
||||
{"<K3e9>", {3, 0xe9}},
|
||||
{"<K3ea>", {3, 0xea}},
|
||||
{"<K3eb>", {3, 0xeb}},
|
||||
{"<K3ec>", {3, 0xec}},
|
||||
{"<K3ed>", {3, 0xed}},
|
||||
{"<K3ee>", {3, 0xee}},
|
||||
{"<K3ef>", {3, 0xef}},
|
||||
{"<K3f0>", {3, 0xf0}},
|
||||
{"<K3f1>", {3, 0xf1}},
|
||||
{"<K3f2>", {3, 0xf2}},
|
||||
{"<K3f3>", {3, 0xf3}},
|
||||
{"<K3f4>", {3, 0xf4}},
|
||||
{"<K3f5>", {3, 0xf5}},
|
||||
{"<K3f6>", {3, 0xf6}},
|
||||
{"<K3f7>", {3, 0xf7}},
|
||||
{"<K3f8>", {3, 0xf8}},
|
||||
{"<K3f9>", {3, 0xf9}},
|
||||
{"<K3fa>", {3, 0xfa}},
|
||||
{"<K3fb>", {3, 0xfb}},
|
||||
{"<K3fc>", {3, 0xfc}},
|
||||
{"<K3fd>", {3, 0xfd}},
|
||||
{"<K3fe>", {3, 0xfe}},
|
||||
{"<K3ff>", {3, 0xff}},
|
||||
};
|
||||
|
||||
GameTextFontBank g_font_bank_jak2(GameTextVersion::JAK2,
|
||||
|
||||
@@ -58,6 +58,8 @@ class GameTextFontBank {
|
||||
|
||||
const EncodeInfo* find_encode_to_utf8(const char* in) const;
|
||||
const EncodeInfo* find_encode_to_game(const std::string& in, int off = 0) const;
|
||||
const ReplaceInfo* find_replace_to_utf8(const std::string& in, int off = 0) const;
|
||||
const ReplaceInfo* find_replace_to_game(const std::string& in, int off = 0) const;
|
||||
|
||||
std::string replace_to_utf8(std::string& str) const;
|
||||
std::string replace_to_game(std::string& str) const;
|
||||
@@ -79,8 +81,7 @@ class GameTextFontBank {
|
||||
// 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_utf8_to_game(std::string str, bool escape = false) const;
|
||||
std::string convert_game_to_utf8(const char* in) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -7612,7 +7612,7 @@
|
||||
(bigmap-index uint32 :offset-assert 20)
|
||||
(bigmap-image external-art-buffer :offset-assert 24)
|
||||
(tpage external-art-buffer :offset-assert 28)
|
||||
(progress-minimap symbol :offset-assert 32)
|
||||
(progress-minimap texture-page :offset-assert 32)
|
||||
(mask-index uint32 :offset-assert 36)
|
||||
(bit-mask bigmap-bit-mask :offset-assert 40)
|
||||
(compressed-next-index uint32 :offset-assert 44)
|
||||
@@ -32921,7 +32921,7 @@
|
||||
"Handles various events for the enemy
|
||||
@TODO - unsure if there is a pattern for the events and this should have a more specific name"
|
||||
(_type_ process int symbol event-message-block) object 74)
|
||||
(enemy-method-75 (_type_ process touching-shapes-entry) object 75)
|
||||
(enemy-method-75 (_type_ process event-message-block) object 75)
|
||||
(enemy-method-76 (_type_ process event-message-block) symbol 76)
|
||||
(enemy-method-77 (_type_ (pointer float)) symbol 77)
|
||||
(enemy-method-78 (_type_ (pointer float)) symbol 78)
|
||||
@@ -32959,7 +32959,7 @@
|
||||
(enemy-method-101 (_type_) none 101)
|
||||
(enemy-method-102 (_type_) symbol 102)
|
||||
(enemy-method-103 (_type_) collide-spec 103)
|
||||
(enemy-method-104 (_type_ process uint uint) symbol :behavior process 104)
|
||||
(enemy-method-104 (_type_ process touching-shapes-entry uint) symbol :behavior process 104)
|
||||
(enemy-method-105 (_type_ process) enemy-flag 105)
|
||||
(enemy-method-106 (_type_ process object int attack-info) none :behavior enemy 106)
|
||||
(get-enemy-target
|
||||
|
||||
@@ -4192,5 +4192,25 @@
|
||||
"v1-123": ["v1-123", "vector4w"],
|
||||
"a0-62": ["a0-62", "vector4w"]
|
||||
}
|
||||
},
|
||||
"(method 75 rhino)": {
|
||||
"vars": {
|
||||
"s5-0": ["touch-entry", "touching-shapes-entry"]
|
||||
}
|
||||
},
|
||||
"(method 75 enemy)": {
|
||||
"vars": {
|
||||
"s4-0": ["touch-entry", "touching-shapes-entry"]
|
||||
}
|
||||
},
|
||||
"(method 76 bot)": {
|
||||
"vars": {
|
||||
"s3-0": "touch-entry"
|
||||
}
|
||||
},
|
||||
"convert-korean-text": {
|
||||
"vars": {
|
||||
"gp-0": "charp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,8 +645,8 @@ void SubtitleEditor::draw_subtitle_options(GameSubtitleSceneInfo& scene, bool cu
|
||||
} else if (linetext.empty() || subtitleLine.offscreen) {
|
||||
ImGui::PopStyleColor();
|
||||
}
|
||||
auto newtext = font->convert_utf8_to_game_with_escape(linetext);
|
||||
auto newspkr = font->convert_utf8_to_game_with_escape(linespkr);
|
||||
auto newtext = font->convert_utf8_to_game(linetext, true);
|
||||
auto newspkr = font->convert_utf8_to_game(linespkr, true);
|
||||
subtitleLine.line = newtext;
|
||||
subtitleLine.speaker = newspkr;
|
||||
}
|
||||
@@ -669,10 +669,9 @@ void SubtitleEditor::draw_new_cutscene_line_form() {
|
||||
if (ImGui::Button("Add Text Entry")) {
|
||||
auto font = get_font_bank(
|
||||
parse_text_only_version(m_subtitle_db.m_banks[m_current_language]->file_path));
|
||||
m_current_scene->add_line(m_current_scene_frame,
|
||||
font->convert_utf8_to_game_with_escape(m_current_scene_text),
|
||||
font->convert_utf8_to_game_with_escape(m_current_scene_speaker),
|
||||
m_current_scene_offscreen);
|
||||
m_current_scene->add_line(
|
||||
m_current_scene_frame, font->convert_utf8_to_game(m_current_scene_text, true),
|
||||
font->convert_utf8_to_game(m_current_scene_speaker, true), m_current_scene_offscreen);
|
||||
}
|
||||
}
|
||||
if (m_current_scene_frame < 0) {
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod enemy-method-104 ashelin ((obj ashelin) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 ashelin ((obj ashelin) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(if (and (= (-> arg0 type) target)
|
||||
(-> obj next-state)
|
||||
(let ((v1-4 (-> obj next-state name)))
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
(react-to-focus (_type_) none 72)
|
||||
(kill-prefer-falling (_type_) object 73)
|
||||
(general-event-handler (_type_ process int symbol event-message-block) object 74)
|
||||
(enemy-method-75 (_type_ process touching-shapes-entry) object 75)
|
||||
(enemy-method-75 (_type_ process event-message-block) object 75)
|
||||
(enemy-method-76 (_type_ process event-message-block) symbol 76)
|
||||
(enemy-method-77 (_type_ (pointer float)) symbol 77)
|
||||
(enemy-method-78 (_type_ (pointer float)) symbol 78)
|
||||
@@ -384,7 +384,7 @@
|
||||
(enemy-method-101 (_type_) none 101)
|
||||
(enemy-method-102 (_type_) symbol 102)
|
||||
(enemy-method-103 (_type_) collide-spec 103)
|
||||
(enemy-method-104 (_type_ process uint uint) symbol :behavior process 104)
|
||||
(enemy-method-104 (_type_ process touching-shapes-entry uint) symbol :behavior process 104)
|
||||
(enemy-method-105 (_type_ process) enemy-flag 105)
|
||||
(enemy-method-106 (_type_ process object int attack-info) none :behavior enemy 106)
|
||||
(get-enemy-target (_type_) process-focusable 107)
|
||||
|
||||
@@ -456,7 +456,7 @@
|
||||
(a3-1 (+ (-> v1-13 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-13 attack-id) a3-1)
|
||||
(if (t9-2 a0-5 a1-3 (the-as uint a2-3) a3-1)
|
||||
(if (t9-2 a0-5 a1-3 a2-3 a3-1)
|
||||
(return 0)
|
||||
)
|
||||
)
|
||||
@@ -633,7 +633,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-method-104 enemy ((obj enemy) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 enemy ((obj enemy) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(let ((v1-1 (-> obj enemy-info attack-damage)))
|
||||
(if (and (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) (= v1-1 1))
|
||||
(set! v1-1 2)
|
||||
@@ -642,7 +642,7 @@
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'attack)
|
||||
(set! (-> a1-2 param 0) arg1)
|
||||
(set! (-> a1-2 param 0) (the-as uint arg1))
|
||||
(let ((a0-10 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id damage knock))))
|
||||
(set! (-> a0-10 id) arg2)
|
||||
(set! (-> a0-10 shove-back) (-> obj enemy-info attack-shove-back))
|
||||
@@ -1621,9 +1621,11 @@ This commonly includes things such as:
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 17]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 28]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 37]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 89]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 105]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 202]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 211]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 274]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 346]
|
||||
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 407]
|
||||
@@ -1658,7 +1660,7 @@ This commonly includes things such as:
|
||||
(and (not (logtest? (enemy-flag multi-focus) (-> obj enemy-flags))) (nonzero? (-> obj hit-points)))
|
||||
)
|
||||
((= arg2 'touch)
|
||||
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
|
||||
(enemy-method-75 obj arg0 arg3)
|
||||
)
|
||||
((= arg2 'touched)
|
||||
(when (logtest? (-> obj enemy-flags) (enemy-flag attackable-backup))
|
||||
@@ -1753,7 +1755,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(else
|
||||
(set! (-> obj incoming attack-id) (-> (the-as attack-info s2-0) id))
|
||||
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
|
||||
(enemy-method-75 obj arg0 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2050,28 +2052,27 @@ This commonly includes things such as:
|
||||
(find-offending-process-focusable arg0 arg1)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch object vs none.
|
||||
(defmethod enemy-method-75 enemy ((obj enemy) (arg0 process) (arg1 touching-shapes-entry))
|
||||
(let* ((s4-0 (-> arg1 handle1))
|
||||
(defmethod enemy-method-75 enemy ((obj enemy) (arg0 process) (arg1 event-message-block))
|
||||
(let* ((touch-entry (the-as touching-shapes-entry (-> arg1 param 0)))
|
||||
(s2-0 arg0)
|
||||
(s3-0 (if (type? s2-0 process-focusable)
|
||||
(the-as process-focusable s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s4-0 s3-0)
|
||||
(when (and (the-as uint touch-entry) s3-0)
|
||||
(cond
|
||||
((and (focus-test? obj dangerous)
|
||||
(and s3-0 (not (logtest? (-> s3-0 focus-status) (focus-status disable dead ignore grabbed))))
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s4-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s4-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
@@ -2081,18 +2082,18 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 (the-as uint s4-0) a3-2)
|
||||
(enemy-method-104 obj arg0 touch-entry a3-2)
|
||||
)
|
||||
)
|
||||
((and ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s4-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action no-standon)
|
||||
(collide-action)
|
||||
)
|
||||
(not (logtest? (-> obj root-override2 penetrated-by) (-> s3-0 root-override penetrate-using)))
|
||||
)
|
||||
(if (send-shoves (-> obj root-override2) arg0 (the-as touching-shapes-entry s4-0) 0.7 6144.0 16384.0)
|
||||
(if (send-shoves (-> obj root-override2) arg0 touch-entry 0.7 6144.0 16384.0)
|
||||
(send-event obj 'bouncing-off arg0)
|
||||
)
|
||||
)
|
||||
@@ -2128,7 +2129,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 s4-0 a3-2)
|
||||
(enemy-method-104 obj arg0 (the-as touching-shapes-entry s4-0) a3-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
(bigmap-index uint32 :offset-assert 20)
|
||||
(bigmap-image external-art-buffer :offset-assert 24)
|
||||
(tpage external-art-buffer :offset-assert 28)
|
||||
(progress-minimap symbol :offset-assert 32)
|
||||
(progress-minimap texture-page :offset-assert 32)
|
||||
(mask-index uint32 :offset-assert 36)
|
||||
(bit-mask bigmap-bit-mask :offset-assert 40)
|
||||
(compressed-next-index uint32 :offset-assert 44)
|
||||
|
||||
@@ -677,7 +677,7 @@
|
||||
(set! (-> *texture-relocate-later* memcpy) #f)
|
||||
(set! (-> obj progress-minimap)
|
||||
(the-as
|
||||
symbol
|
||||
texture-page
|
||||
(link (-> obj tpage buf) (-> obj tpage load-file data) (-> obj tpage len) (-> obj tpage heap) 4)
|
||||
)
|
||||
)
|
||||
@@ -1026,7 +1026,7 @@
|
||||
)
|
||||
)
|
||||
(when (-> obj progress-minimap)
|
||||
(unload-page *texture-pool* (the-as texture-page (-> obj progress-minimap)))
|
||||
(unload-page *texture-pool* (-> obj progress-minimap))
|
||||
(set! (-> *level* default-level texture-page 3) (the-as texture-page 0))
|
||||
(set! (-> obj progress-minimap) #f)
|
||||
)
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 s3-0 a3-2)
|
||||
(enemy-method-104 obj arg0 (the-as touching-shapes-entry s3-0) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -944,7 +944,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-method-104 bot ((obj bot) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 bot ((obj bot) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(cond
|
||||
((and (= (-> arg0 type) target) (not (logtest? (-> obj bot-flags) (bot-flags attacked))))
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -975,7 +975,7 @@
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'attack)
|
||||
(set! (-> a1-2 param 0) arg1)
|
||||
(set! (-> a1-2 param 0) (the-as uint arg1))
|
||||
(let ((v1-14 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id))))
|
||||
(set! (-> v1-14 id) arg2)
|
||||
(set! (-> v1-14 shove-back) (-> obj enemy-info-override attack-shove-back))
|
||||
@@ -1005,7 +1005,7 @@
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(let* ((touch-entry (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-6 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
@@ -1019,14 +1019,14 @@
|
||||
(not (logtest? (-> (the-as process-focusable v1-6) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(the-as touching-shapes-entry touch-entry)
|
||||
(-> obj root-override2)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(the-as touching-shapes-entry touch-entry)
|
||||
(-> obj root-override2)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
@@ -1036,7 +1036,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 s3-0 a3-2)
|
||||
(enemy-method-104 obj arg0 (the-as touching-shapes-entry touch-entry) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
|
||||
@@ -968,6 +968,13 @@ This commonly includes things such as:
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
(defmethod set-elec-scale! caspad-elec-gate ((obj caspad-elec-gate) (arg0 float))
|
||||
"Added, original game did not define this and would crash on call."
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(define *caspad-elec-gate-params* (new 'static 'elec-gate-params
|
||||
:bolt-spec (new 'static 'lightning-spec
|
||||
:name #f
|
||||
|
||||
@@ -658,7 +658,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-method-104 tomb-baby-spider ((obj tomb-baby-spider) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 tomb-baby-spider ((obj tomb-baby-spider) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(let* ((s1-0 arg0)
|
||||
(s2-0 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
@@ -678,7 +678,7 @@
|
||||
(set! (-> a1-5 from) (process->ppointer self))
|
||||
(set! (-> a1-5 num-params) 2)
|
||||
(set! (-> a1-5 message) 'attack)
|
||||
(set! (-> a1-5 param 0) arg1)
|
||||
(set! (-> a1-5 param 0) (the-as uint arg1))
|
||||
(let ((v1-9 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id damage knock))))
|
||||
(set! (-> v1-9 id) arg2)
|
||||
(set! (-> v1-9 shove-back) (* f0-0 (-> obj enemy-info-override attack-shove-back)))
|
||||
|
||||
@@ -114,7 +114,72 @@
|
||||
:default-hit-points 4
|
||||
:gnd-collide-with (collide-spec backgnd)
|
||||
:overlaps-others-collide-with-filter (collide-spec jak bot player-list)
|
||||
:penetrate-knocked #xffffffffffffffff
|
||||
:penetrate-knocked (penetrate
|
||||
touch
|
||||
generic-attack
|
||||
lunge
|
||||
flop
|
||||
punch
|
||||
spin
|
||||
roll
|
||||
uppercut
|
||||
bonk
|
||||
tube
|
||||
vehicle
|
||||
flut-attack
|
||||
board
|
||||
mech
|
||||
mech-punch
|
||||
mech-bonk
|
||||
dark-skin
|
||||
dark-punch
|
||||
dark-bomb
|
||||
dark-giant
|
||||
shield
|
||||
explode
|
||||
jak-yellow-shot
|
||||
jak-red-shot
|
||||
jak-blue-shot
|
||||
jak-dark-shot
|
||||
enemy-yellow-shot
|
||||
enemy-dark-shot
|
||||
eco-yellow
|
||||
eco-red
|
||||
eco-blue
|
||||
eco-green
|
||||
knocked
|
||||
penetrate-33
|
||||
penetrate-34
|
||||
penetrate-35
|
||||
penetrate-36
|
||||
penetrate-37
|
||||
penetrate-38
|
||||
penetrate-39
|
||||
penetrate-40
|
||||
penetrate-41
|
||||
penetrate-42
|
||||
penetrate-43
|
||||
penetrate-44
|
||||
penetrate-45
|
||||
penetrate-46
|
||||
penetrate-47
|
||||
penetrate-48
|
||||
penetrate-49
|
||||
penetrate-50
|
||||
penetrate-51
|
||||
penetrate-52
|
||||
penetrate-53
|
||||
penetrate-54
|
||||
penetrate-55
|
||||
penetrate-56
|
||||
penetrate-57
|
||||
penetrate-58
|
||||
penetrate-59
|
||||
penetrate-60
|
||||
penetrate-61
|
||||
penetrate-62
|
||||
penetrate-63
|
||||
)
|
||||
:movement-gravity (meters -100)
|
||||
:friction 0.8
|
||||
:attack-shove-back (meters 3)
|
||||
@@ -380,7 +445,7 @@
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-method-104 metalmonk ((obj metalmonk) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 metalmonk ((obj metalmonk) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(let* ((s3-0 arg0)
|
||||
(a0-2 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
@@ -414,7 +479,7 @@
|
||||
(set! (-> a1-10 from) (process->ppointer self))
|
||||
(set! (-> a1-10 num-params) 2)
|
||||
(set! (-> a1-10 message) 'attack)
|
||||
(set! (-> a1-10 param 0) arg1)
|
||||
(set! (-> a1-10 param 0) (the-as uint arg1))
|
||||
(let ((v1-17 (new 'static 'attack-info :mask (attack-info-mask vector mode angle id))))
|
||||
(set! (-> v1-17 id) arg2)
|
||||
(set! (-> v1-17 angle) 'front)
|
||||
|
||||
@@ -780,52 +780,55 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod enemy-method-75 rhino ((obj rhino) (arg0 process) (arg1 touching-shapes-entry))
|
||||
(let* ((s5-0 (-> arg1 handle1))
|
||||
;; WARN: Return type mismatch symbol vs object.
|
||||
(defmethod enemy-method-75 rhino ((obj rhino) (arg0 process) (arg1 event-message-block))
|
||||
(let* ((touch-entry (the-as touching-shapes-entry (-> arg1 param 0)))
|
||||
(s3-0 arg0)
|
||||
(v1-0 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s5-0 v1-0)
|
||||
(cond
|
||||
((and (focus-test? obj dangerous) ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s5-0)
|
||||
(-> obj root-override2)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s5-0)
|
||||
(-> obj root-override2)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
)
|
||||
(-> obj persistent-attack-id)
|
||||
(-> obj attack-id)
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 (the-as uint s5-0) a3-2)
|
||||
(the-as
|
||||
object
|
||||
(when (and (the-as uint touch-entry) v1-0)
|
||||
(cond
|
||||
((and (focus-test? obj dangerous) ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
)
|
||||
(-> obj persistent-attack-id)
|
||||
(-> obj attack-id)
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 touch-entry a3-2)
|
||||
)
|
||||
)
|
||||
(((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action no-standon)
|
||||
(collide-action)
|
||||
)
|
||||
(send-shoves (-> obj root-override2) arg0 touch-entry 0.7 6144.0 16384.0)
|
||||
)
|
||||
)
|
||||
(((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s5-0)
|
||||
(-> obj root-override2)
|
||||
(collide-action no-standon)
|
||||
(collide-action)
|
||||
)
|
||||
(send-shoves (-> obj root-override2) arg0 (the-as touching-shapes-entry s5-0) 0.7 6144.0 16384.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod enemy-method-104 rhino ((obj rhino) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 rhino ((obj rhino) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(if (and (-> obj next-state) (= (-> obj next-state name) 'victory))
|
||||
'attack-or-shove
|
||||
'attack
|
||||
@@ -851,7 +854,7 @@
|
||||
(set! (-> a1-6 from) (process->ppointer self))
|
||||
(set! (-> a1-6 num-params) 2)
|
||||
(set! (-> a1-6 message) 'attack)
|
||||
(set! (-> a1-6 param 0) arg1)
|
||||
(set! (-> a1-6 param 0) (the-as uint arg1))
|
||||
(let ((v1-16 (new 'static 'attack-info :mask (attack-info-mask vector mode angle id))))
|
||||
(set! (-> v1-16 id) arg2)
|
||||
(set! (-> v1-16 angle) 'front)
|
||||
|
||||
+5
-1
@@ -285,7 +285,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 104 of type ashelin
|
||||
(defmethod enemy-method-104 ashelin ((obj ashelin) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 ashelin ((obj ashelin) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(if (and (= (-> arg0 type) target)
|
||||
(-> obj next-state)
|
||||
(let ((v1-4 (-> obj next-state name)))
|
||||
@@ -1505,3 +1505,7 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+6
-2
@@ -455,7 +455,7 @@
|
||||
(react-to-focus (_type_) none 72)
|
||||
(kill-prefer-falling (_type_) object 73)
|
||||
(general-event-handler (_type_ process int symbol event-message-block) object 74)
|
||||
(enemy-method-75 (_type_ process touching-shapes-entry) object 75)
|
||||
(enemy-method-75 (_type_ process event-message-block) object 75)
|
||||
(enemy-method-76 (_type_ process event-message-block) symbol 76)
|
||||
(enemy-method-77 (_type_ (pointer float)) symbol 77)
|
||||
(enemy-method-78 (_type_ (pointer float)) symbol 78)
|
||||
@@ -484,7 +484,7 @@
|
||||
(enemy-method-101 (_type_) none 101)
|
||||
(enemy-method-102 (_type_) symbol 102)
|
||||
(enemy-method-103 (_type_) collide-spec 103)
|
||||
(enemy-method-104 (_type_ process uint uint) symbol :behavior process 104)
|
||||
(enemy-method-104 (_type_ process touching-shapes-entry uint) symbol :behavior process 104)
|
||||
(enemy-method-105 (_type_ process) enemy-flag 105)
|
||||
(enemy-method-106 (_type_ process object int attack-info) none :behavior enemy 106)
|
||||
(get-enemy-target (_type_) process-focusable 107)
|
||||
@@ -746,3 +746,7 @@
|
||||
(logclear! (-> obj flags) (enemy-flag lock-focus))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+18
-14
@@ -479,7 +479,7 @@
|
||||
(a3-1 (+ (-> v1-13 attack-id) 1))
|
||||
)
|
||||
(set! (-> v1-13 attack-id) a3-1)
|
||||
(if (t9-2 a0-5 a1-3 (the-as uint a2-3) a3-1)
|
||||
(if (t9-2 a0-5 a1-3 a2-3 a3-1)
|
||||
(return 0)
|
||||
)
|
||||
)
|
||||
@@ -674,7 +674,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 104 of type enemy
|
||||
(defmethod enemy-method-104 enemy ((obj enemy) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 enemy ((obj enemy) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(let ((v1-1 (-> obj enemy-info attack-damage)))
|
||||
(if (and (logtest? (-> *game-info* secrets) (game-secrets hero-mode)) (= v1-1 1))
|
||||
(set! v1-1 2)
|
||||
@@ -683,7 +683,7 @@
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'attack)
|
||||
(set! (-> a1-2 param 0) arg1)
|
||||
(set! (-> a1-2 param 0) (the-as uint arg1))
|
||||
(let ((a0-10 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id damage knock))))
|
||||
(set! (-> a0-10 id) arg2)
|
||||
(set! (-> a0-10 shove-back) (-> obj enemy-info attack-shove-back))
|
||||
@@ -1746,7 +1746,7 @@ This commonly includes things such as:
|
||||
(and (not (logtest? (enemy-flag multi-focus) (-> obj enemy-flags))) (nonzero? (-> obj hit-points)))
|
||||
)
|
||||
((= arg2 'touch)
|
||||
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
|
||||
(enemy-method-75 obj arg0 arg3)
|
||||
)
|
||||
((= arg2 'touched)
|
||||
(when (logtest? (-> obj enemy-flags) (enemy-flag attackable-backup))
|
||||
@@ -1841,7 +1841,7 @@ This commonly includes things such as:
|
||||
)
|
||||
(else
|
||||
(set! (-> obj incoming attack-id) (-> (the-as attack-info s2-0) id))
|
||||
(enemy-method-75 obj arg0 (the-as touching-shapes-entry arg3))
|
||||
(enemy-method-75 obj arg0 arg3)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -2143,27 +2143,27 @@ This commonly includes things such as:
|
||||
)
|
||||
|
||||
;; definition for method 75 of type enemy
|
||||
(defmethod enemy-method-75 enemy ((obj enemy) (arg0 process) (arg1 touching-shapes-entry))
|
||||
(let* ((s4-0 (-> arg1 handle1))
|
||||
(defmethod enemy-method-75 enemy ((obj enemy) (arg0 process) (arg1 event-message-block))
|
||||
(let* ((touch-entry (the-as touching-shapes-entry (-> arg1 param 0)))
|
||||
(s2-0 arg0)
|
||||
(s3-0 (if (type? s2-0 process-focusable)
|
||||
(the-as process-focusable s2-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(when (and s4-0 s3-0)
|
||||
(when (and (the-as uint touch-entry) s3-0)
|
||||
(cond
|
||||
((and (focus-test? obj dangerous)
|
||||
(and s3-0 (not (logtest? (-> s3-0 focus-status) (focus-status disable dead ignore grabbed))))
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s4-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s4-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
@@ -2173,18 +2173,18 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 (the-as uint s4-0) a3-2)
|
||||
(enemy-method-104 obj arg0 touch-entry a3-2)
|
||||
)
|
||||
)
|
||||
((and ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s4-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action no-standon)
|
||||
(collide-action)
|
||||
)
|
||||
(not (logtest? (-> obj root-override2 penetrated-by) (-> s3-0 root-override penetrate-using)))
|
||||
)
|
||||
(if (send-shoves (-> obj root-override2) arg0 (the-as touching-shapes-entry s4-0) 0.7 6144.0 16384.0)
|
||||
(if (send-shoves (-> obj root-override2) arg0 touch-entry 0.7 6144.0 16384.0)
|
||||
(send-event obj 'bouncing-off arg0)
|
||||
)
|
||||
)
|
||||
@@ -2221,7 +2221,7 @@ This commonly includes things such as:
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 s4-0 a3-2)
|
||||
(enemy-method-104 obj arg0 (the-as touching-shapes-entry s4-0) a3-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -3901,3 +3901,7 @@ This commonly includes things such as:
|
||||
(defbehavior ja-group-index? enemy ((arg0 int))
|
||||
(ja-group? (-> self draw art-group data arg0))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -191,7 +191,7 @@
|
||||
(bigmap-index uint32 :offset-assert 20)
|
||||
(bigmap-image external-art-buffer :offset-assert 24)
|
||||
(tpage external-art-buffer :offset-assert 28)
|
||||
(progress-minimap symbol :offset-assert 32)
|
||||
(progress-minimap texture-page :offset-assert 32)
|
||||
(mask-index uint32 :offset-assert 36)
|
||||
(bit-mask bigmap-bit-mask :offset-assert 40)
|
||||
(compressed-next-index uint32 :offset-assert 44)
|
||||
@@ -406,3 +406,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1123
File diff suppressed because it is too large
Load Diff
+8
-8
@@ -96,7 +96,7 @@
|
||||
(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)))
|
||||
(let ((charp (-> arg0 data)))
|
||||
*expanded-text-line0*
|
||||
(let ((s4-0 0))
|
||||
0
|
||||
@@ -114,26 +114,26 @@
|
||||
(clear s3-0)
|
||||
(while (< s4-0 s5-0)
|
||||
(cond
|
||||
((= (-> gp-0 s4-0) 3)
|
||||
((= (-> charp 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))
|
||||
(while (and (< s4-0 s5-0) (!= (-> charp s4-0) 3) (!= (-> charp s4-0) 4))
|
||||
(set! (-> s3-0 data s1-0) (-> charp s4-0))
|
||||
(+! s4-0 1)
|
||||
(+! s1-0 1)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((v1-17 (+ s4-0 1)))
|
||||
(-> gp-0 v1-17)
|
||||
(-> charp 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))
|
||||
(while (and (< s4-0 s5-0) (< v1-20 s2-0) (!= (-> charp s4-0) 3) (!= (-> charp s4-0) 4))
|
||||
(cond
|
||||
((= (-> gp-0 s4-0) 5)
|
||||
((= (-> charp s4-0) 5)
|
||||
(set! (-> s3-0 data v1-20) (the-as uint 1))
|
||||
(+! s4-0 1)
|
||||
(set! v1-21 (+ v1-20 1))
|
||||
@@ -143,7 +143,7 @@
|
||||
(set! v1-21 (+ v1-20 1))
|
||||
)
|
||||
)
|
||||
(set! (-> s3-0 data v1-21) (-> gp-0 s4-0))
|
||||
(set! (-> s3-0 data v1-21) (-> charp s4-0))
|
||||
(+! s4-0 1)
|
||||
(let ((v1-22 (+ v1-21 1)))
|
||||
(set! (-> s3-0 data v1-22) (the-as uint 126))
|
||||
|
||||
+5
-1
@@ -104,7 +104,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 s3-0 a3-2)
|
||||
(enemy-method-104 obj arg0 (the-as touching-shapes-entry s3-0) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -351,3 +351,7 @@
|
||||
(go (method-of-object obj active))
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+10
-6
@@ -967,7 +967,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 104 of type bot
|
||||
(defmethod enemy-method-104 bot ((obj bot) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 bot ((obj bot) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(cond
|
||||
((and (= (-> arg0 type) target) (not (logtest? (-> obj bot-flags) (bot-flags attacked))))
|
||||
(let ((a1-1 (new 'stack-no-clear 'event-message-block)))
|
||||
@@ -998,7 +998,7 @@
|
||||
(set! (-> a1-2 from) (process->ppointer self))
|
||||
(set! (-> a1-2 num-params) 2)
|
||||
(set! (-> a1-2 message) 'attack)
|
||||
(set! (-> a1-2 param 0) arg1)
|
||||
(set! (-> a1-2 param 0) (the-as uint arg1))
|
||||
(let ((v1-14 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id))))
|
||||
(set! (-> v1-14 id) arg2)
|
||||
(set! (-> v1-14 shove-back) (-> obj enemy-info-override attack-shove-back))
|
||||
@@ -1029,7 +1029,7 @@
|
||||
)
|
||||
(else
|
||||
(when (!= (-> arg0 type) target)
|
||||
(let* ((s3-0 (-> arg1 param 0))
|
||||
(let* ((touch-entry (-> arg1 param 0))
|
||||
(s2-0 arg0)
|
||||
(v1-6 (if (type? s2-0 process-focusable)
|
||||
s2-0
|
||||
@@ -1043,14 +1043,14 @@
|
||||
(not (logtest? (-> (the-as process-focusable v1-6) focus-status) (focus-status disable dead ignore grabbed)))
|
||||
)
|
||||
((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(the-as touching-shapes-entry touch-entry)
|
||||
(-> obj root-override2)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s3-0)
|
||||
(the-as touching-shapes-entry touch-entry)
|
||||
(-> obj root-override2)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
@@ -1060,7 +1060,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 s3-0 a3-2)
|
||||
(enemy-method-104 obj arg0 (the-as touching-shapes-entry touch-entry) a3-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
@@ -2095,3 +2095,7 @@ If the player is too far, play a warning speech."
|
||||
(none)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Generated
Vendored
+6
-2
@@ -677,7 +677,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 104 of type tomb-baby-spider
|
||||
(defmethod enemy-method-104 tomb-baby-spider ((obj tomb-baby-spider) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 tomb-baby-spider ((obj tomb-baby-spider) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(let* ((s1-0 arg0)
|
||||
(s2-0 (if (type? s1-0 process-focusable)
|
||||
s1-0
|
||||
@@ -697,7 +697,7 @@
|
||||
(set! (-> a1-5 from) (process->ppointer self))
|
||||
(set! (-> a1-5 num-params) 2)
|
||||
(set! (-> a1-5 message) 'attack)
|
||||
(set! (-> a1-5 param 0) arg1)
|
||||
(set! (-> a1-5 param 0) (the-as uint arg1))
|
||||
(let ((v1-9 (new 'static 'attack-info :mask (attack-info-mask mode shove-back shove-up id damage knock))))
|
||||
(set! (-> v1-9 id) arg2)
|
||||
(set! (-> v1-9 shove-back) (* f0-0 (-> obj enemy-info-override attack-shove-back)))
|
||||
@@ -827,3 +827,7 @@
|
||||
|
||||
;; failed to figure out what this is:
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Generated
Vendored
+6
-2
@@ -507,7 +507,7 @@
|
||||
|
||||
;; definition for method 104 of type metalmonk
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod enemy-method-104 metalmonk ((obj metalmonk) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 metalmonk ((obj metalmonk) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(let* ((s3-0 arg0)
|
||||
(a0-2 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
@@ -541,7 +541,7 @@
|
||||
(set! (-> a1-10 from) (process->ppointer self))
|
||||
(set! (-> a1-10 num-params) 2)
|
||||
(set! (-> a1-10 message) 'attack)
|
||||
(set! (-> a1-10 param 0) arg1)
|
||||
(set! (-> a1-10 param 0) (the-as uint arg1))
|
||||
(let ((v1-17 (new 'static 'attack-info :mask (attack-info-mask vector mode angle id))))
|
||||
(set! (-> v1-17 id) arg2)
|
||||
(set! (-> v1-17 angle) 'front)
|
||||
@@ -1350,3 +1350,7 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+14
-10
@@ -1047,8 +1047,8 @@
|
||||
|
||||
;; definition for method 75 of type rhino
|
||||
;; WARN: Return type mismatch symbol vs object.
|
||||
(defmethod enemy-method-75 rhino ((obj rhino) (arg0 process) (arg1 touching-shapes-entry))
|
||||
(let* ((s5-0 (-> arg1 handle1))
|
||||
(defmethod enemy-method-75 rhino ((obj rhino) (arg0 process) (arg1 event-message-block))
|
||||
(let* ((touch-entry (the-as touching-shapes-entry (-> arg1 param 0)))
|
||||
(s3-0 arg0)
|
||||
(v1-0 (if (type? s3-0 process-focusable)
|
||||
s3-0
|
||||
@@ -1057,17 +1057,17 @@
|
||||
)
|
||||
(the-as
|
||||
object
|
||||
(when (and s5-0 v1-0)
|
||||
(when (and (the-as uint touch-entry) v1-0)
|
||||
(cond
|
||||
((and (focus-test? obj dangerous) ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s5-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action deadly)
|
||||
(collide-action)
|
||||
)
|
||||
)
|
||||
(let ((a3-2 (if ((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s5-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action persistent-attack)
|
||||
(collide-action)
|
||||
@@ -1077,16 +1077,16 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(enemy-method-104 obj arg0 (the-as uint s5-0) a3-2)
|
||||
(enemy-method-104 obj arg0 touch-entry a3-2)
|
||||
)
|
||||
)
|
||||
(((method-of-type touching-shapes-entry prims-touching-action?)
|
||||
(the-as touching-shapes-entry s5-0)
|
||||
touch-entry
|
||||
(-> obj root-override2)
|
||||
(collide-action no-standon)
|
||||
(collide-action)
|
||||
)
|
||||
(send-shoves (-> obj root-override2) arg0 (the-as touching-shapes-entry s5-0) 0.7 6144.0 16384.0)
|
||||
(send-shoves (-> obj root-override2) arg0 touch-entry 0.7 6144.0 16384.0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -1096,7 +1096,7 @@
|
||||
|
||||
;; definition for method 104 of type rhino
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod enemy-method-104 rhino ((obj rhino) (arg0 process) (arg1 uint) (arg2 uint))
|
||||
(defmethod enemy-method-104 rhino ((obj rhino) (arg0 process) (arg1 touching-shapes-entry) (arg2 uint))
|
||||
(if (and (-> obj next-state) (= (-> obj next-state name) 'victory))
|
||||
'attack-or-shove
|
||||
'attack
|
||||
@@ -1122,7 +1122,7 @@
|
||||
(set! (-> a1-6 from) (process->ppointer self))
|
||||
(set! (-> a1-6 num-params) 2)
|
||||
(set! (-> a1-6 message) 'attack)
|
||||
(set! (-> a1-6 param 0) arg1)
|
||||
(set! (-> a1-6 param 0) (the-as uint arg1))
|
||||
(let ((v1-16 (new 'static 'attack-info :mask (attack-info-mask vector mode angle id))))
|
||||
(set! (-> v1-16 id) arg2)
|
||||
(set! (-> v1-16 angle) 'front)
|
||||
@@ -2131,3 +2131,7 @@
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -89,7 +89,8 @@
|
||||
],
|
||||
|
||||
"skip_compile_files": [
|
||||
"drill-baron"
|
||||
"drill-baron",
|
||||
"bigmap"
|
||||
],
|
||||
|
||||
"skip_compile_functions": [
|
||||
|
||||
Reference in New Issue
Block a user