mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +08:00
.
This commit is contained in:
parent
1a0788203e
commit
c8358ddd9c
@ -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()
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user