This commit is contained in:
恍兮惚兮 2024-11-28 14:11:36 +08:00
parent 7b029f8a9c
commit d77c38e019

View File

@ -376,6 +376,28 @@ namespace ppsspp
s = std::regex_replace(s, std::regex("(#[A-Za-z]+\\[(\\d*[.])?\\d+\\])+"), "");
buffer->from(s);
}
void NPJH50380(TextBuffer *buffer, HookParam *hp)
{
static std::wstring last;
static int lastj = 0;
auto s = buffer->strW();
if (!last.size())
{
buffer->clear();
}
else
{
if (s[0] != last[0])
lastj = 0;
int j = s.size() - 1;
for (; (j >= 0) && (last[j] == s[j]); j--)
;
j += 1;
buffer->from(s.substr(lastj, j - lastj));
lastj = j;
}
last = s;
}
namespace
{
void ULJM05823_1(TextBuffer *buffer, HookParam *hp)
@ -513,6 +535,8 @@ namespace ppsspp
// 華鬼 ~夢のつづき~
{0x88406CC, {0, 0, 0, 0, ULJM05823_1, "ULJM06048"}}, // text
{0x885B7BC, {0, 0, 0, 0, ULJM05823_1, "ULJM06048"}}, // name+text
// サモンナイト3
{0x89DCF90, {0, 6, 0, 0, NPJH50380, "NPJH50380"}},
};
}