Convert TextScr.cpp to UTF-8

I should probably mention, the other reason I'm converting these to
UTF-8 is because SDL2 doesn't take Shift-JIS strings.
This commit is contained in:
Clownacy 2019-08-25 21:23:01 +01:00
parent 3ab2b11204
commit b814890d09

View file

@ -709,13 +709,13 @@ int TextScriptProc()
{ {
#if defined(NONPORTABLE) && defined(WINDOWS) #if defined(NONPORTABLE) && defined(WINDOWS)
#ifdef JAPANESE #ifdef JAPANESE
MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", MB_OK); MessageBoxA(ghWnd, "\x83\x58\x83\x65\x81\x5B\x83\x57\x82\xCC\x93\xC7\x82\xDD\x8D\x9E\x82\xDD\x82\xC9\x8E\xB8\x94\x73", "\x83\x47\x83\x89\x81\x5B", MB_OK);
#else #else
MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK); MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK);
#endif #endif
#else #else
#ifdef JAPANESE #ifdef JAPANESE
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
#else #else
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
#endif #endif
@ -1273,11 +1273,12 @@ int TextScriptProc()
{ {
char str_0[0x40]; char str_0[0x40];
#ifdef JAPANESE #ifdef JAPANESE
sprintf(str_0, "不明のコード:<%c%c%c", gTS.data[gTS.p_read + 1], gTS.data[gTS.p_read + 2], gTS.data[gTS.p_read + 3]);
#if defined(NONPORTABLE) && defined(WINDOWS) #if defined(NONPORTABLE) && defined(WINDOWS)
MessageBoxA(NULL, str_0, "エラー", MB_OK); sprintf(str_0, "\x95\x73\x96\xBE\x82\xCC\x83\x52\x81\x5B\x83\x68:<%c%c%c", gTS.data[gTS.p_read + 1], gTS.data[gTS.p_read + 2], gTS.data[gTS.p_read + 3]);
MessageBoxA(NULL, str_0, "\x83\x47\x83\x89\x81\x5B", MB_OK);
#else #else
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", str_0, NULL); sprintf(str_0, "不明のコード:<%c%c%c", gTS.data[gTS.p_read + 1], gTS.data[gTS.p_read + 2], gTS.data[gTS.p_read + 3]);
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", str_0, NULL);
#endif #endif
#else #else
sprintf(str_0, "Unknown code:<%c%c%c", gTS.data[gTS.p_read + 1], gTS.data[gTS.p_read + 2], gTS.data[gTS.p_read + 3]); sprintf(str_0, "Unknown code:<%c%c%c", gTS.data[gTS.p_read + 1], gTS.data[gTS.p_read + 2], gTS.data[gTS.p_read + 3]);