From 546631fad760d397b285e2e69da6a6ad0fb418bc Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 20 Jun 2019 21:09:22 +0100 Subject: [PATCH] Made Profile.cpp ASM-accurate --- src/Profile.cpp | 24 +++++++++--------------- src/TextScr.cpp | 4 ++-- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/src/Profile.cpp b/src/Profile.cpp index 290454b7..a41c1efd 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -243,8 +243,6 @@ BOOL LoadProfile(const char *name) BOOL InitializeGame(HWND hWnd) { - (void)hWnd; - InitMyChar(); gSelectedArms = 0; gSelectedItem = 0; @@ -256,25 +254,21 @@ BOOL InitializeGame(HWND hWnd) InitFlags(); if (!TransferStage(13, 200, 10, 8)) { - // TODO - restore this when ghWnd is available - - /* - #if defined(NONPORTABLE) && defined(WINDOWS) -#ifdef JAPANESE - MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", MB_OK); -#else - MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK); -#endif + #ifdef JAPANESE + MessageBoxA(hWnd, "ステージの読み込みに失敗", "エラー", MB_OK); + #else + MessageBoxA(hWnd, "Failed to load stage", "Error", MB_OK); + #endif #else + (void)hWnd; - */ -#ifdef JAPANESE + #ifdef JAPANESE SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL); -#else + #else SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL); + #endif #endif -// #endif return FALSE; } diff --git a/src/TextScr.cpp b/src/TextScr.cpp index aa4c03f0..0dab8ef4 100644 --- a/src/TextScr.cpp +++ b/src/TextScr.cpp @@ -694,7 +694,7 @@ int TextScriptProc() y = GetTextScriptNo(gTS.p_read + 19); if (!TransferStage(z, w, x, y)) { - #ifdef NONPORTABLE + #if defined(NONPORTABLE) && defined(WINDOWS) MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", 0); #else #ifdef JAPANESE @@ -1250,7 +1250,7 @@ int TextScriptProc() else { char str_0[0x40]; - #ifdef NONPORTABLE + #if defined(NONPORTABLE) && defined(WINDOWS) sprintf(str_0, "不明のコード:<%c%c%c", gTS.data[gTS.p_read + 1], gTS.data[gTS.p_read + 2], gTS.data[gTS.p_read + 3]); MessageBoxA(0, str_0, "エラー", 0); #else