This commit is contained in:
恍兮惚兮 2024-11-30 01:38:07 +08:00
parent 1a0788203e
commit c8358ddd9c
2 changed files with 4 additions and 24 deletions

View File

@ -1397,24 +1397,14 @@ bool InsertBGI3Hook()
void BGI7Filter(TextBuffer *buffer, HookParam *)
{
auto text = reinterpret_cast<LPWSTR>(buffer->buff);
CharFilter(buffer, L'\x0001');
CharFilter(buffer, L'\x0002');
CharFilter(buffer, L'\x0003');
CharFilter(buffer, L'\x0004');
CharFilter(buffer, L'\x0005');
CharFilter(buffer, L'\x000A');
if (text[0] == L'\u3000')
{
buffer->size -= 2;
::memmove(text, text + 1, buffer->size);
}
CharReplacer(buffer, L'\u3000', L' '); // IDSP
if (cpp_wcsnstr(text, L"<", buffer->size / sizeof(wchar_t)))
{
StringFilterBetween(buffer, L"<", 1, L">", 1);
}
CharFilter(buffer, L'');
StringFilterBetween(buffer, L"<", 1, L">", 1);
}
bool InsertBGI7Hook()

View File

@ -2,24 +2,14 @@
//[241129][1305014][Tily] あの日の君を振り向かせて。 DL版 (files)
void BGI7Filter(TextBuffer *buffer, HookParam *)
{
auto text = reinterpret_cast<LPWSTR>(buffer->buff);
CharFilter(buffer, L'\x0001');
CharFilter(buffer, L'\x0002');
CharFilter(buffer, L'\x0003');
CharFilter(buffer, L'\x0004');
CharFilter(buffer, L'\x0005');
CharFilter(buffer, L'\x000A');
if (text[0] == L'\u3000')
{
buffer->size -= 2;
::memmove(text, text + 1, buffer->size);
}
CharReplacer(buffer, L'\u3000', L' '); // IDSP
if (cpp_wcsnstr(text, L"<", buffer->size / sizeof(wchar_t)))
{
StringFilterBetween(buffer, L"<", 1, L">", 1);
}
CharFilter(buffer, L'');
StringFilterBetween(buffer, L"<", 1, L">", 1);
}
bool BGIattach_function1()
{