From 3ab2b112049868aa5f936fa3bb3eeee8a1b5e95b Mon Sep 17 00:00:00 2001 From: Clownacy Date: Sun, 25 Aug 2019 21:07:03 +0100 Subject: [PATCH] Convert Game.cpp to UTF-8 --- src/Game.cpp | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/Game.cpp b/src/Game.cpp index 3afc2217..5d91cb91 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -683,9 +683,20 @@ BOOL Game(HWND hWnd) if (!LoadGenericData()) { -#ifdef WINDOWS - MessageBoxA(hWnd, "”Δ—pƒtƒ@ƒCƒ‹‚ͺ“Η‚ί‚Θ‚’", "ƒGƒ‰[", MB_OK); // "Error - Couldn't read general purpose files" -#endif + #if defined(NONPORTABLE) && defined(WINDOWS) + #ifdef JAPANESE + MessageBoxA(hWnd, "\x94\xC4\x97\x70\x83\x74\x83\x40\x83\x43\x83\x8B\x82\xAA\x93\xC7\x82\xDF\x82\xC8\x82\xA2", "\x83\x47\x83\x89\x81\x5B", MB_OK); + #else + MessageBoxA(hWnd, "Couldn't read general purpose files", "Error", MB_OK); + #endif + #else + #ifdef JAPANESE + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ζ±Žη”¨γƒ•γ‚‘γ‚€γƒ«γŒθͺ­γ‚γͺい", NULL); + #else + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Couldn't read general purpose files", NULL); + #endif + #endif + return FALSE; } @@ -696,9 +707,20 @@ BOOL Game(HWND hWnd) if (!LoadNpcTable(path)) { -#ifdef WINDOWS - MessageBoxA(hWnd, "NPCƒe[ƒuƒ‹‚ͺ“Η‚ί‚Θ‚’", "ƒGƒ‰[", MB_OK); // "Error - Couldn't read the NPC table" -#endif + #if defined(NONPORTABLE) && defined(WINDOWS) + #ifdef JAPANESE + MessageBoxA(hWnd, "\x4E\x50\x43\x83\x65\x81\x5B\x83\x75\x83\x8B\x82\xAA\x93\xC7\x82\xDF\x82\xC8\x82\xA2", "\x83\x47\x83\x89\x81\x5B", MB_OK); + #else + MessageBoxA(hWnd, "Couldn't read the NPC table", "Error", MB_OK); + #endif + #else + #ifdef JAPANESE + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "NPCγƒ†γƒΌγƒ–γƒ«γŒθͺ­γ‚γͺい", NULL); + #else + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Couldn't read the NPC table", NULL); + #endif + #endif + return FALSE; }