temp to not rely on stash, still figuring it out

This commit is contained in:
ManDude
2023-09-12 22:09:07 +01:00
parent 07d97bce8c
commit cf0450f247
7 changed files with 727 additions and 306 deletions
+654 -258
View File
@@ -11,6 +11,8 @@
#include <algorithm>
#include <stdexcept>
#include <array>
#include <unordered_set>
#include "string_util.h"
@@ -37,6 +39,319 @@ GameTextVersion get_text_version_from_name(const std::string& name) {
return sTextVerEnumMap.at(name);
}
static constexpr u32 utf8_hangul_syllable_base = 0xEAB080;
static constexpr int utf8_hangul_lead_consonant_amount = 19;
static constexpr int utf8_hangul_vowel_amount = 21;
static constexpr int utf8_hangul_trail_consonant_amount = 28;
// TABLE FORMAT
// 0 - TWO-JAMO SEQ 1
// 1 - THREE-JAMO SEQ 1
// 2 - TWO-JAMO SEQ 2
// 3 - THREE-JAMO SEQ 2
// special sequences:
// 0x389 - [Xㅜㄴ]
static std::vector<std::unordered_set<int>> s_unsorted_hangul_lead_consonant = {
/* ㄱ */ {0x306},
/* ㄲ */ {0x307},
/* ㄴ */ {0x308, 0x31f},
/* ㄷ */ {0x309, 0x370},
/* ㄸ */ {0x30A},
/* ㄹ */ {0x30b, 0x372},
/* ㅁ */ {0x30C, 0x373},
/* ㅂ */ {0x30d},
/* ㅃ */ {0x30e},
/* ㅅ */ {0x320},
/* ㅆ */ {},
/* ㅇ */ {0x30F, 0x378},
/* ㅈ */ {0x310, 0x379},
/* ㅉ */ {0x311},
/* ㅊ */ {},
/* ㅋ */ {0x312},
/* ㅌ */ {0x313},
/* ㅍ */ {0x314},
/* ㅎ */ {0x32E},
};
static std::vector<std::unordered_set<int>> s_unsorted_hangul_vowel = {
/* ㅏ */ {0x31A, 0x315},
/* ㅐ */ {},
/* ㅑ */ {0x316, 0x31b},
/* ㅒ */ {},
/* ㅓ */ {0x31D, 0x318},
/* ㅔ */ {},
/* ㅕ */ {0x31E, 0x319},
/* ㅖ */ {},
/* ㅗ */ {0x382, 0x37F},
/* ㅘ */ {},
/* ㅙ */ {},
/* ㅚ */ {},
/* ㅛ */ {0x383},
/* ㅜ */ {},
/* ㅝ */ {},
/* ㅞ */ {},
/* ㅟ */ {},
/* ㅠ */ {},
/* ㅡ */ {0x384},
/* ㅢ */ {},
/* ㅣ */ {0x31C, 0x317},
};
static std::vector<std::unordered_set<int>> s_unsorted_hangul_trail_consonant = {
/* */ {},
/* ㄱ */ {0x3C5, 0x3FE},
/* ㄲ */ {},
/* ㄳ */ {},
/* ㄴ */ {0x3C8, 0x3FF},
/* ㄵ */ {},
/* ㄶ */ {},
/* ㄷ */ {},
/* ㄹ */ {0x3CC, 0x186},
/* ㄺ */ {},
/* ㄻ */ {},
/* ㄼ */ {},
/* ㄽ */ {},
/* ㄾ */ {},
/* ㄿ */ {},
/* ㅀ */ {},
/* ㅁ */ {0x187},
/* ㅂ */ {0x188},
/* ㅄ */ {},
/* ㅅ */ {0x3D5, 0x189},
/* ㅆ */ {0x3D6, 0x18A},
/* ㅇ */ {0x3D7, 0x3EE, 0x18B},
/* ㅈ */ {},
/* ㅊ */ {},
/* ㅋ */ {},
/* ㅌ */ {},
/* ㅍ */ {},
/* ㅎ */ {},
};
static std::vector<std::unordered_set<int>> s_unsorted_hangul_other = {
/* */ {},
/* ㄱ */ {0x3C5},
/* ㄲ */ {},
/* ㄳ */ {},
/* ㄴ */ {0x3C8, 0x3C8},
/* ㄵ */ {},
/* ㄶ */ {},
/* ㄷ */ {},
/* ㄹ */ {0x3CC, 0x186},
/* ㄺ */ {},
/* ㄻ */ {},
/* ㄼ */ {},
/* ㄽ */ {},
/* ㄾ */ {},
/* ㄿ */ {},
/* ㅀ */ {},
/* ㅁ */ {0x187},
/* ㅂ */ {0x188},
/* ㅄ */ {},
/* ㅅ */ {0x3D5, 0x189},
/* ㅆ */ {0x3D6, 0x18A},
/* ㅇ */ {0x3D7, 0x3EE, 0x18B},
/* ㅈ */ {},
/* ㅊ */ {},
/* ㅋ */ {},
/* ㅌ */ {},
/* ㅍ */ {},
/* ㅎ */ {},
};
static std::vector<std::vector<int>> s_hangul_lead_consonant = {
/* ㄱ */ {0x306, 0x306, -9999, 0x306},
/* ㄲ */ {-9999, -9999},
/* ㄴ */ {-9999, -9999},
/* ㄷ */ {-9999, -9999, 0x370, -9999},
/* ㄸ */ {-9999, -9999},
/* ㄹ */ {-9999, -9999, 0x372, -9999},
/* ㅁ */ {-9999, 0x30C, 0x373, -9999},
/* ㅂ */ {-9999, -9999},
/* ㅃ */ {-9999, -9999},
/* ㅅ */ {0x320, -9999},
/* ㅆ */ {-9999, -9999},
/* ㅇ */ {-9999, 0x30F, 0x30F, 0x30F, -9999, 0x378},
/* ㅈ */ {0x310, 0x310, -9999, 0x379},
/* ㅉ */ {-9999, -9999},
/* ㅊ */ {-9999, -9999},
/* ㅋ */ {-9999, -9999},
/* ㅌ */ {-9999, -9999},
/* ㅍ */ {-9999, -9999},
/* ㅎ */ {0x32E, -9999},
};
static std::vector<std::vector<int>> s_hangul_vowel = {
/* ㅏ */ {0x31A, 0x315, -9999, 0x31A},
/* ㅐ */ {-9999, -9999},
/* ㅑ */ {-9999, -9999},
/* ㅒ */ {-9999, -9999},
/* ㅓ */ {0x31D, 0x31D, -9999, 0x318},
/* ㅔ */ {-9999, -9999},
/* ㅕ */ {0x31E, 0x319},
/* ㅖ */ {-9999, -9999},
/* ㅗ */ {-9999, -9999, 0x382, 0x37F},
/* ㅘ */ {-9999, -9999},
/* ㅙ */ {-9999, -9999},
/* ㅚ */ {-9999, -9999},
/* ㅛ */ {-9999, -9999, 0x383, -9999},
/* ㅜ */ {-9999, -9999},
/* ㅝ */ {-9999, -9999},
/* ㅞ */ {-9999, -9999},
/* ㅟ */ {-9999, -9999},
/* ㅠ */ {-9999, -9999},
/* ㅡ */ {-9999, -9999, 0x384, -9999},
/* ㅢ */ {-9999, -9999},
/* ㅣ */ {0x31C, 0x317},
};
static std::vector<std::vector<int>> s_hangul_trail_consonant = {
/* */ {-9999},
/* ㄱ */ {0x3C5},
/* ㄲ */ {-9999},
/* ㄳ */ {-9999},
/* ㄴ */ {0x3C8, 0x3C8},
/* ㄵ */ {-9999},
/* ㄶ */ {-9999},
/* ㄷ */ {-9999},
/* ㄹ */ {0x3CC},
/* ㄺ */ {-9999},
/* ㄻ */ {-9999},
/* ㄼ */ {-9999},
/* ㄽ */ {-9999},
/* ㄾ */ {-9999},
/* ㄿ */ {-9999},
/* ㅀ */ {-9999},
/* ㅁ */ {-9999},
/* ㅂ */ {-9999},
/* ㅄ */ {-9999},
/* ㅅ */ {0x3D5},
/* ㅆ */ {0x3D6},
/* ㅇ */ {0x3D7, 0x3EE},
/* ㅈ */ {-9999},
/* ㅊ */ {-9999},
/* ㅋ */ {-9999},
/* ㅌ */ {-9999},
/* ㅍ */ {-9999},
/* ㅎ */ {-9999},
};
// temp
//static std::vector<std::vector<int>> s_hangul_lead_consonant = {
// /* ㄱ */ {0x306, 0x31F, 0x333, 0x35e},
// /* ㄲ */ {0x307, -9999, 0x334},
// /* ㄴ */ {0x308, -9999, 0x335, 0x34a},
// /* ㄷ */ {0x309, 0x326, 0x336, 0x351},
// /* ㄸ */ {0x30A, 0x327, 0x337, 0x352},
// /* ㄹ */ {0x30B, 0x328, 0x338, 0x353},
// /* ㅁ */ {0x30C, -9999, 0x339},
// /* ㅂ */ {0x30D, -9999, 0x33a},
// /* ㅃ */ {0x30E, -9999, 0x33b},
// /* ㅅ */ {-9999, 0x320, 0x34b},
// /* ㅆ */ {-9999, 0x321, 0x34c},
// /* ㅇ */ {0x30F, -9999, 0x33c},
// /* ㅈ */ {0x310, -9999, 0x33d},
// /* ㅉ */ {0x311, -9999, 0x33e},
// /* ㅊ */ {0x32D, 0x358},
// /* ㅋ */ {0x312, -9999, 0x33f, 0x35f},
// /* ㅌ */ {0x313, 0x329, 0x340, 0x354},
// /* ㅍ */ {0x314, 0x32A, 0x341, 0x355},
// /* ㅎ */ {0x32E, 0x359},
//};
//static std::vector<std::vector<int>> s_hangul_vowel_trio = {
// /* ㅏ */ {0x315, -9999},
// /* ㅐ */ {0x342, -9999},
// /* ㅑ */ {0x316, -9999},
// /* ㅒ */ {0x343, -9999},
// /* ㅓ */ {0x318, 0x322, 0x32F},
// /* ㅔ */ {0x344, 0x34d, 0x35a},
// /* ㅕ */ {0x319, 0x323, 0x32B, 0x330},
// /* ㅖ */ {0x345, 0x34e, 0x356, 0x35b},
// /* ㅗ */ {0x360, 0x362},
// /* ㅘ */ {-9999, -9999},
// /* ㅙ */ {-9999, -9999},
// /* ㅚ */ {-9999, -9999},
// /* ㅛ */ {0x361, 0x363},
// /* ㅜ */ {-9999, -9999},
// /* ㅝ */ {-9999, -9999},
// /* ㅞ */ {-9999, -9999},
// /* ㅟ */ {-9999, -9999},
// /* ㅠ */ {-9999, -9999},
// /* ㅡ */ {-9999, -9999},
// /* ㅢ */ {-9999, -9999},
// /* ㅣ */ {0x317, -9999},
//};
//static std::vector<std::vector<int>> s_hangul_vowel_duo = {
// /* ㅏ */ {0x31A, -9999},
// /* ㅐ */ {0x346, -9999},
// /* ㅑ */ {0x31B, -9999},
// /* ㅒ */ {0x347, -9999},
// /* ㅓ */ {0x31D, 0x324, 0x331},
// /* ㅔ */ {0x348, 0x34f, 0x35c},
// /* ㅕ */ {0x31E, 0x325, 0x32C, 0x332},
// /* ㅖ */ {0x349, 0x350, 0x357, 0x35d},
// /* ㅗ */ {-9999, -9999},
// /* ㅘ */ {-9999, -9999},
// /* ㅙ */ {-9999, -9999},
// /* ㅚ */ {-9999, -9999},
// /* ㅛ */ {-9999, -9999},
// /* ㅜ */ {-9999, -9999},
// /* ㅝ */ {-9999, -9999},
// /* ㅞ */ {-9999, -9999},
// /* ㅟ */ {-9999, -9999},
// /* ㅠ */ {-9999, -9999},
// /* ㅡ */ {-9999, -9999},
// /* ㅢ */ {-9999, -9999},
// /* ㅣ */ {0x31C, -9999},
//};
static std::vector<u64> seqs = {};
std::string convert_korean_text_from_game(const char* in) {
std::string out;
while (*in) {
if (*in == 3) {
++in;
while (*in && *in != 3 && *in != 4) {
out.push_back(*in);
++in;
}
} else {
++in;
int len = *in;
++in;
int i = 0;
bool save_seq = true;
u64 seq = 0;
while (*in && *in != 3 && *in != 4) {
if (*in == 5) {
++in;
if (save_seq) {
seq |= (0x100ULL | u8(*in)) << (i * 16);
}
out.push_back(0x1);
} else {
if (save_seq) {
seq |= (0x300ULL | u8(*in)) << (i * 16);
}
out.push_back(0x3);
}
out.push_back(*in);
++in;
++i;
}
if (save_seq && std::find(seqs.begin(), seqs.end(), seq) == seqs.end()) {
seqs.push_back(seq);
std::sort(seqs.begin(), seqs.end());
}
}
}
return out;
}
GameTextFontBank::GameTextFontBank(GameTextVersion version,
std::vector<EncodeInfo>* encode_info,
std::vector<ReplaceInfo>* replace_info,
@@ -53,6 +368,71 @@ GameTextFontBank::GameTextFontBank(GameTextVersion version,
[](const ReplaceInfo& a, const ReplaceInfo& b) { return a.from.size() > b.from.size(); });
}
GameTextFontBank::~GameTextFontBank() {
if (!seqs.empty()) {
printf("\nall seqs:\n");
std::vector<std::vector<u16>> all_jamo_by_pos(4);
std::vector<u16> all_jamo;
for (auto seq : seqs) {
for (int i = 0; i < 4; ++i) {
u16 v = (seq >> (i * 16)) & 0xffff;
if (v == 0) {
break;
}
auto& jamo_seq = all_jamo_by_pos.at(i);
if (std::find(jamo_seq.begin(), jamo_seq.end(), v) == jamo_seq.end()) {
jamo_seq.push_back(v);
}
if (std::find(all_jamo.begin(), all_jamo.end(), v) == all_jamo.end()) {
all_jamo.push_back(v);
}
// printf("0x%x ", v);
}
// printf("\n");
}
std::sort(all_jamo_by_pos.at(0).begin(), all_jamo_by_pos.at(0).end());
std::sort(all_jamo_by_pos.at(1).begin(), all_jamo_by_pos.at(1).end());
std::sort(all_jamo_by_pos.at(2).begin(), all_jamo_by_pos.at(2).end());
std::sort(all_jamo_by_pos.at(3).begin(), all_jamo_by_pos.at(3).end());
std::sort(all_jamo.begin(), all_jamo.end());
printf("\nall first jamo:\n");
for (auto v : all_jamo_by_pos.at(0)) {
printf("0x%x\n", v);
}
printf("\nall second jamo:\n");
for (auto v : all_jamo_by_pos.at(1)) {
printf("0x%x\n", v);
}
printf("\nall third jamo:\n");
for (auto v : all_jamo_by_pos.at(2)) {
printf("0x%x\n", v);
}
printf("\nall fourth jamo:\n");
for (auto v : all_jamo_by_pos.at(3)) {
printf("0x%x\n", v);
}
printf("\nall jamo:\n");
for (auto v : all_jamo) {
printf("%x ", v);
if (std::find(all_jamo_by_pos.at(0).begin(), all_jamo_by_pos.at(0).end(), v) !=
all_jamo_by_pos.at(0).end()) {
printf("pos 1\n");
} else if (std::find(all_jamo_by_pos.at(1).begin(), all_jamo_by_pos.at(1).end(), v) !=
all_jamo_by_pos.at(1).end()) {
printf("pos 2\n");
} else if (std::find(all_jamo_by_pos.at(2).begin(), all_jamo_by_pos.at(2).end(), v) !=
all_jamo_by_pos.at(2).end()) {
printf("pos 3\n");
} else if (std::find(all_jamo_by_pos.at(3).begin(), all_jamo_by_pos.at(3).end(), v) !=
all_jamo_by_pos.at(3).end()) {
printf("pos 4\n");
}
}
seqs.clear();
}
}
/*!
* Finds a remap info that best matches the byte sequence (is the longest match).
*/
@@ -273,9 +653,15 @@ bool GameTextFontBank::valid_char_range(const char in) const {
* 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 GameTextFontBank::convert_game_to_utf8(const char* in, bool korean) const {
std::string temp;
std::string result;
if (korean) {
result = convert_korean_text_from_game(in);
in = result.c_str();
}
while (*in) {
auto remap = find_encode_to_utf8(in);
if (remap != nullptr) {
@@ -288,7 +674,10 @@ std::string GameTextFontBank::convert_game_to_utf8(const char* in) const {
}
in++;
}
replace_to_utf8(temp);
result.clear();
for (size_t i = 0; i < temp.length(); ++i) {
auto c = temp.at(i);
if (c == '\n') {
@@ -906,7 +1295,9 @@ GameTextFontBank g_font_bank_jak1_v2(GameTextVersion::JAK1_V2,
* GAME TEXT FONT BANK - JAK 2
* ================================
* This font is used in:
* - Jak 2 - NTSC - v1
* - Jak II (NTSC-U, NTSC-K)
* - Jak II - Renegade
* - ジャックXダクスター2
*/
static std::unordered_set<char> s_passthrus_jak2 = {'~', ' ', ',', '.', '-', '+', '(', ')',
@@ -1559,262 +1950,267 @@ static std::vector<EncodeInfo> s_encode_info_jak2 = {
{"", {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}},
//{"<H300>", {3, 0x00}},
//{"<H301>", {3, 0x01}},
//{"<H302>", {3, 0x02}},
//{"<H303>", {3, 0x03}},
//{"<H304>", {3, 0x04}},
//{"<H305>", {3, 0x05}},
{"<H186>", {1, 0x86}},
{"<H187>", {1, 0x87}},
{"<H188>", {1, 0x88}},
{"<H189>", {1, 0x89}},
{"<H18a>", {1, 0x8a}},
{"<H306>", {3, 0x06}},
{"<H307>", {3, 0x07}},
{"<H308>", {3, 0x08}},
{"<H309>", {3, 0x09}},
{"<H30a>", {3, 0x0a}},
{"<H30b>", {3, 0x0b}},
{"<H30c>", {3, 0x0c}},
{"<H30d>", {3, 0x0d}},
{"<H30e>", {3, 0x0e}},
{"<H30f>", {3, 0x0f}},
{"<H310>", {3, 0x10}},
{"<H311>", {3, 0x11}},
{"<H312>", {3, 0x12}},
{"<H313>", {3, 0x13}},
{"<H314>", {3, 0x14}},
{"<H315>", {3, 0x15}},
{"<H316>", {3, 0x16}},
{"<H317>", {3, 0x17}},
{"<H318>", {3, 0x18}},
{"<H319>", {3, 0x19}},
{"<H31a>", {3, 0x1a}},
{"<H31b>", {3, 0x1b}},
{"<H31c>", {3, 0x1c}},
{"<H31d>", {3, 0x1d}},
{"<H31e>", {3, 0x1e}},
{"<H31f>", {3, 0x1f}},
{"<H320>", {3, 0x20}},
{"<H321>", {3, 0x21}},
{"<H322>", {3, 0x22}},
{"<H323>", {3, 0x23}},
{"<H324>", {3, 0x24}},
{"<H325>", {3, 0x25}},
{"<H326>", {3, 0x26}},
{"<H327>", {3, 0x27}},
{"<H328>", {3, 0x28}},
{"<H329>", {3, 0x29}},
{"<H32a>", {3, 0x2a}},
{"<H32b>", {3, 0x2b}},
{"<H32c>", {3, 0x2c}},
{"<H32d>", {3, 0x2d}},
{"<H32e>", {3, 0x2e}},
{"<H32f>", {3, 0x2f}},
{"<H330>", {3, 0x30}},
{"<H331>", {3, 0x31}},
{"<H332>", {3, 0x32}},
{"<H333>", {3, 0x33}},
{"<H334>", {3, 0x34}},
{"<H335>", {3, 0x35}},
{"<H336>", {3, 0x36}},
{"<H337>", {3, 0x37}},
{"<H338>", {3, 0x38}},
{"<H339>", {3, 0x39}},
{"<H33a>", {3, 0x3a}},
{"<H33b>", {3, 0x3b}},
{"<H33c>", {3, 0x3c}},
{"<H33d>", {3, 0x3d}},
{"<H33e>", {3, 0x3e}},
{"<H33f>", {3, 0x3f}},
{"<H340>", {3, 0x40}},
{"<H341>", {3, 0x41}},
{"<H342>", {3, 0x42}},
{"<H343>", {3, 0x43}},
{"<H344>", {3, 0x44}},
{"<H345>", {3, 0x45}},
{"<H346>", {3, 0x46}},
{"<H347>", {3, 0x47}},
{"<H348>", {3, 0x48}},
{"<H349>", {3, 0x49}},
{"<H34a>", {3, 0x4a}},
{"<H34b>", {3, 0x4b}},
{"<H34c>", {3, 0x4c}},
{"<H34d>", {3, 0x4d}},
{"<H34e>", {3, 0x4e}},
{"<H34f>", {3, 0x4f}},
{"<H350>", {3, 0x50}},
{"<H351>", {3, 0x51}},
{"<H352>", {3, 0x52}},
{"<H353>", {3, 0x53}},
{"<H354>", {3, 0x54}},
{"<H355>", {3, 0x55}},
{"<H356>", {3, 0x56}},
{"<H357>", {3, 0x57}},
{"<H358>", {3, 0x58}},
{"<H359>", {3, 0x59}},
{"<H35a>", {3, 0x5a}},
{"<H35b>", {3, 0x5b}},
{"<H35c>", {3, 0x5c}},
{"<H35d>", {3, 0x5d}},
{"<H35e>", {3, 0x5e}},
{"<H35f>", {3, 0x5f}},
{"<H360>", {3, 0x60}},
{"<H361>", {3, 0x61}},
{"<H362>", {3, 0x62}},
{"<H363>", {3, 0x63}},
{"<H364>", {3, 0x64}},
{"<H365>", {3, 0x65}},
{"<H366>", {3, 0x66}},
{"<H367>", {3, 0x67}},
{"<H368>", {3, 0x68}},
{"<H369>", {3, 0x69}},
{"<H36a>", {3, 0x6a}},
{"<H36b>", {3, 0x6b}},
{"<H36c>", {3, 0x6c}},
{"<H36d>", {3, 0x6d}},
{"<H36e>", {3, 0x6e}},
{"<H36f>", {3, 0x6f}},
{"<H370>", {3, 0x70}},
{"<H371>", {3, 0x71}},
{"<H372>", {3, 0x72}},
{"<H373>", {3, 0x73}},
{"<H374>", {3, 0x74}},
{"<H375>", {3, 0x75}},
{"<H376>", {3, 0x76}},
{"<H377>", {3, 0x77}},
{"<H378>", {3, 0x78}},
{"<H379>", {3, 0x79}},
{"<H37a>", {3, 0x7a}},
{"<H37b>", {3, 0x7b}},
{"<H37c>", {3, 0x7c}},
{"<H37d>", {3, 0x7d}},
{"<H37e>", {3, 0x7e}},
{"<H37f>", {3, 0x7f}},
{"<H380>", {3, 0x80}},
{"<H381>", {3, 0x81}},
{"<H382>", {3, 0x82}},
{"<H383>", {3, 0x83}},
{"<H384>", {3, 0x84}},
{"<H385>", {3, 0x85}},
{"<H386>", {3, 0x86}},
{"<H387>", {3, 0x87}},
{"<H388>", {3, 0x88}},
{"<H389>", {3, 0x89}},
{"<H38a>", {3, 0x8a}},
{"<H38b>", {3, 0x8b}},
{"<H38c>", {3, 0x8c}},
{"<H38d>", {3, 0x8d}},
{"<H38e>", {3, 0x8e}},
{"<H38f>", {3, 0x8f}},
{"<H390>", {3, 0x90}},
{"<H391>", {3, 0x91}},
{"<H392>", {3, 0x92}},
{"<H393>", {3, 0x93}},
{"<H394>", {3, 0x94}},
{"<H395>", {3, 0x95}},
{"<H396>", {3, 0x96}},
{"<H397>", {3, 0x97}},
{"<H398>", {3, 0x98}},
{"<H399>", {3, 0x99}},
{"<H39a>", {3, 0x9a}},
{"<H39b>", {3, 0x9b}},
{"<H39c>", {3, 0x9c}},
{"<H39d>", {3, 0x9d}},
{"<H39e>", {3, 0x9e}},
{"<H39f>", {3, 0x9f}},
{"<H3a0>", {3, 0xa0}},
{"<H3a1>", {3, 0xa1}},
{"<H3a2>", {3, 0xa2}},
{"<H3a3>", {3, 0xa3}},
{"<H3a4>", {3, 0xa4}},
{"<H3a5>", {3, 0xa5}},
{"<H3a6>", {3, 0xa6}},
{"<H3a7>", {3, 0xa7}},
{"<H3a8>", {3, 0xa8}},
{"<H3a9>", {3, 0xa9}},
{"<H3aa>", {3, 0xaa}},
{"<H3ab>", {3, 0xab}},
{"<H3ac>", {3, 0xac}},
{"<H3ad>", {3, 0xad}},
{"<H3ae>", {3, 0xae}},
{"<H3af>", {3, 0xaf}},
{"<H3b0>", {3, 0xb0}},
{"<H3b1>", {3, 0xb1}},
{"<H3b2>", {3, 0xb2}},
{"<H3b3>", {3, 0xb3}},
{"<H3b4>", {3, 0xb4}},
{"<H3b5>", {3, 0xb5}},
{"<H3b6>", {3, 0xb6}},
{"<H3b7>", {3, 0xb7}},
{"<H3b8>", {3, 0xb8}},
{"<H3b9>", {3, 0xb9}},
{"<H3ba>", {3, 0xba}},
{"<H3bb>", {3, 0xbb}},
{"<H3bc>", {3, 0xbc}},
{"<H3bd>", {3, 0xbd}},
{"<H3be>", {3, 0xbe}},
{"<H3bf>", {3, 0xbf}},
{"<H3c0>", {3, 0xc0}},
{"<H3c1>", {3, 0xc1}},
{"<H3c2>", {3, 0xc2}},
{"<H3c3>", {3, 0xc3}},
{"<H3c4>", {3, 0xc4}},
{"<H3c5>", {3, 0xc5}},
{"<H3c6>", {3, 0xc6}},
{"<H3c7>", {3, 0xc7}},
{"<H3c8>", {3, 0xc8}},
{"<H3c9>", {3, 0xc9}},
{"<H3ca>", {3, 0xca}},
{"<H3cb>", {3, 0xcb}},
{"<H3cc>", {3, 0xcc}},
{"<H3cd>", {3, 0xcd}},
{"<H3ce>", {3, 0xce}},
{"<H3cf>", {3, 0xcf}},
{"<H3d0>", {3, 0xd0}},
{"<H3d1>", {3, 0xd1}},
{"<H3d2>", {3, 0xd2}},
{"<H3d3>", {3, 0xd3}},
{"<H3d4>", {3, 0xd4}},
{"<H3d5>", {3, 0xd5}},
{"<H3d6>", {3, 0xd6}},
{"<H3d7>", {3, 0xd7}},
{"<H3d8>", {3, 0xd8}},
{"<H3d9>", {3, 0xd9}},
{"<H3da>", {3, 0xda}},
{"<H3db>", {3, 0xdb}},
{"<H3dc>", {3, 0xdc}},
{"<H3dd>", {3, 0xdd}},
{"<H3de>", {3, 0xde}},
{"<H3df>", {3, 0xdf}},
{"<H3e0>", {3, 0xe0}},
{"<H3e1>", {3, 0xe1}},
{"<H3e2>", {3, 0xe2}},
{"<H3e3>", {3, 0xe3}},
{"<H3e4>", {3, 0xe4}},
{"<H3e5>", {3, 0xe5}},
{"<H3e6>", {3, 0xe6}},
{"<H3e7>", {3, 0xe7}},
{"<H3e8>", {3, 0xe8}},
{"<H3e9>", {3, 0xe9}},
{"<H3ea>", {3, 0xea}},
{"<H3eb>", {3, 0xeb}},
{"<H3ec>", {3, 0xec}},
{"<H3ed>", {3, 0xed}},
{"<H3ee>", {3, 0xee}},
{"<H3ef>", {3, 0xef}},
{"<H3f0>", {3, 0xf0}},
{"<H3f1>", {3, 0xf1}},
{"<H3f2>", {3, 0xf2}},
{"<H3f3>", {3, 0xf3}},
{"<H3f4>", {3, 0xf4}},
{"<H3f5>", {3, 0xf5}},
{"<H3f6>", {3, 0xf6}},
{"<H3f7>", {3, 0xf7}},
{"<H3f8>", {3, 0xf8}},
{"<H3f9>", {3, 0xf9}},
{"<H3fa>", {3, 0xfa}},
{"<H3fb>", {3, 0xfb}},
{"<H3fc>", {3, 0xfc}},
{"<H3fd>", {3, 0xfd}},
{"<H3fe>", {3, 0xfe}},
{"<H3ff>", {3, 0xff}},
};
GameTextFontBank g_font_bank_jak2(GameTextVersion::JAK2,
+2 -1
View File
@@ -71,6 +71,7 @@ class GameTextFontBank {
std::vector<EncodeInfo>* encode_info,
std::vector<ReplaceInfo>* replace_info,
std::unordered_set<char>* passthrus);
~GameTextFontBank();
const std::vector<EncodeInfo>* encode_info() const { return m_encode_info; }
const std::vector<ReplaceInfo>* replace_info() const { return m_replace_info; }
@@ -83,7 +84,7 @@ class GameTextFontBank {
bool valid_char_range(const char in) const;
std::string convert_utf8_to_game(std::string str, bool escape = false) const;
std::string convert_game_to_utf8(const char* in) const;
std::string convert_game_to_utf8(const char* in, bool korean) const;
};
extern GameTextFontBank g_font_bank_jak1_v1;
@@ -4214,8 +4214,14 @@
},
"convert-korean-text": {
"vars": {
"gp-0": "charp"
}
"gp-0": "src-ptr",
"s5-0": "src-len",
"s3-0": "dst",
"s1-0": "dst-i",
"s4-0": "src-i",
"s2-0": "dst-max"
},
"args": ["src-str"]
},
"(method 55 enemy)": {
"args": ["self"]
+3 -2
View File
@@ -114,7 +114,8 @@ GameTextResult process_game_text(ObjectFileData& data, GameTextVersion version)
// escape characters
if (font_bank_exists(version)) {
result.text[text_id] = get_font_bank(version)->convert_game_to_utf8(text.c_str());
bool korean = version == GameTextVersion::JAK2 && result.language == 6;
result.text[text_id] = get_font_bank(version)->convert_game_to_utf8(text.c_str(), korean);
} else {
result.text[text_id] = goos::get_readable_string(text.c_str()); // HACK!
}
@@ -383,7 +384,7 @@ std::vector<SpoolSubtitleRange> process_spool_subtitles(ObjectFileData& data,
auto text = data.linked_data.get_goal_string_by_label(m_lbl);
// escape characters
if (font_bank_exists(version)) {
msg.text = get_font_bank(version)->convert_game_to_utf8(text.c_str());
msg.text = get_font_bank(version)->convert_game_to_utf8(text.c_str(), m == 6);
} else {
msg.text = goos::get_readable_string(text.c_str()); // HACK!
}
+1 -1
View File
@@ -547,7 +547,7 @@ void update_discord_rpc(u32 discord_info) {
int gems = (int)info->gem_count;
// convert encodings
std::string status = get_font_bank(GameTextVersion::JAK2)
->convert_game_to_utf8(Ptr<String>(info->status).c()->data());
->convert_game_to_utf8(Ptr<String>(info->status).c()->data(), false);
// get rid of special encodings like <COLOR_WHITE>
std::regex r("<.*?>");
+55 -42
View File
@@ -72,76 +72,89 @@
obj
)
(defun convert-korean-text ((arg0 string))
(defun convert-korean-text ((src-str string))
"Converts the provided [[string]] of [[game-text]] into korean. Returns a [[string]]"
(local-vars (v1-21 int))
(let ((gp-0 (-> arg0 data)))
(let ((src-ptr (-> src-str data)))
*expanded-text-line0*
(let ((s4-0 0))
(let ((src-i 0))
0
(let ((s1-0 0)
(s5-0 (length arg0))
(let ((dst-i 0)
(src-len (length src-str))
)
(set! *expand-buf-number* (logxor *expand-buf-number* 1))
(let ((s3-0 (if (zero? *expand-buf-number*)
*expanded-text-line0*
*expanded-text-line1*
)
)
(let ((dst (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)
(let ((dst-max (+ (-> dst allocated-length) -1)))
(clear dst)
(while (< src-i src-len)
(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)
;; code 3 = copy chars until we reach a code 4 or 3
((= (-> src-ptr src-i) 3)
(+! src-i 1)
(while (and (< src-i src-len) (!= (-> src-ptr src-i) 3) (!= (-> src-ptr src-i) 4))
(set! (-> dst data dst-i) (-> src-ptr src-i))
(+! src-i 1)
(+! dst-i 1)
)
)
(else
(let ((v1-17 (+ s4-0 1)))
(-> gp-0 v1-17)
(set! s4-0 (+ v1-17 1))
(let ((v1-17 (+ src-i 1)))
(-> src-ptr v1-17) ;; character byte length. ignored or perhaps debug-only?
(set! src-i (+ 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))
;; the idea here is we render the jamo all at the same position as the texture for each jamo accounts for their offset
;; and then advance when we're done.
;; we use a code of 4 to mark the beginning of a jamo sequence, a.k.a. one hangeul letter.
;; there is jamo at code-page 1 (#x100-#x1ff) and code-page 3 (#x300-#x3ff), though only a handful are in code-page 1.
;; since this requires two bytes per jamo, we assume the jamo is in code-page 3 by default and thus only have to read 1 byte per jamo.
;; however, if we read a code of '5' then that means it is in code-page 1, which means we read 2 bytes.
;; the jamo sequence terminates when we reach a code 3 (copy chars) or code 4 (new letter).
;; when the sequence terminates, we move the font trans forwards and move on with our life.
;; save font trans (~Y)
(set! (-> dst data dst-i) (the-as uint 126))
(let ((v1-19 (+ dst-i 1)))
(set! (-> dst 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 (< src-i src-len) (< v1-20 dst-max) (!= (-> src-ptr src-i) 3) (!= (-> src-ptr src-i) 4))
(cond
((= (-> gp-0 s4-0) 5)
(set! (-> s3-0 data v1-20) (the-as uint 1))
(+! s4-0 1)
((= (-> src-ptr src-i) 5)
(set! (-> dst data v1-20) (the-as uint 1))
(+! src-i 1)
(set! v1-21 (+ v1-20 1))
)
(else
(set! (-> s3-0 data v1-20) (the-as uint 3))
(set! (-> dst 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)
(set! (-> dst data v1-21) (-> src-ptr src-i))
(+! src-i 1)
;; restore font trans (~Z)
(let ((v1-22 (+ v1-21 1)))
(set! (-> s3-0 data v1-22) (the-as uint 126))
(set! (-> dst data v1-22) (the-as uint 126))
(let ((v1-23 (+ v1-22 1)))
(set! (-> s3-0 data v1-23) (the-as uint 90))
(set! (-> dst data v1-23) (the-as uint 90))
(set! v1-20 (+ v1-23 1))
)
)
)
(set! (-> s3-0 data v1-20) (the-as uint 126))
;; advance font trans by 26 (~+26H)
(set! (-> dst data v1-20) (the-as uint 126))
(let ((v1-24 (+ v1-20 1)))
(set! (-> s3-0 data v1-24) (the-as uint 43))
(set! (-> dst data v1-24) (the-as uint 43))
(let ((v1-25 (+ v1-24 1)))
(set! (-> s3-0 data v1-25) (the-as uint 50))
(set! (-> dst data v1-25) (the-as uint 50))
(let ((v1-26 (+ v1-25 1)))
(set! (-> s3-0 data v1-26) (the-as uint 54))
(set! (-> dst 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! (-> dst data v1-27) (the-as uint 72))
(set! dst-i (+ v1-27 1))
)
)
)
@@ -152,8 +165,8 @@
)
)
)
(set! (-> s3-0 data s1-0) (the-as uint 0))
s3-0
(set! (-> dst data dst-i) (the-as uint 0))
dst
)
)
)
@@ -53,10 +53,14 @@
(set-width! fnt (get-screen-x 0.8))
(set-height! fnt (get-screen-y 0.1))
(process-mask-clear! (-> self mask) pause)
(set-master-mode 'pause)
(loop
(suspend)
(set-setting! 'music *music-to-be-less-annoying* 0.0 0)
(set-setting! 'sfx-volume 'abs 0.0 0)
(cond
((not (cpad-hold? 0 r3))
(if (or (cpad-pressed? 0 left) (cpad-hold? 0 l1))