ref: 427fe69374f2e789d2121701d258d17f696c7239
parent: 546631fad760d397b285e2e69da6a6ad0fb418bc
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Jun 20 17:17:32 EDT 2019
MessageBoxA usage cleanup
--- a/src/Profile.cpp
+++ b/src/Profile.cpp
@@ -254,21 +254,22 @@
InitFlags();
if (!TransferStage(13, 200, 10, 8))
{
-#if defined(NONPORTABLE) && defined(WINDOWS)
- #ifdef JAPANESE
- MessageBoxA(hWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", MB_OK);
- #else
- MessageBoxA(hWnd, "Failed to load stage", "Error", MB_OK);
- #endif
-#else
- (void)hWnd;
+ #if defined(NONPORTABLE) && defined(WINDOWS)
+ #ifdef JAPANESE
+ MessageBoxA(hWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", MB_OK);
+ #else
+ MessageBoxA(hWnd, "Failed to load stage", "Error", MB_OK);
+ #endif
+ #else
+ (void)hWnd;
- #ifdef JAPANESE
- SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "�G���[", "�X�e�[�W�̓ǂݍ��݂Ɏ��s", NULL);
- #else
- SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
- #endif
-#endif
+ #ifdef JAPANESE
+ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "�G���[", "�X�e�[�W�̓ǂݍ��݂Ɏ��s", NULL);
+ #else
+ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
+ #endif
+ #endif
+
return FALSE;
}
--- a/src/TextScr.cpp
+++ b/src/TextScr.cpp
@@ -695,7 +695,11 @@
if (!TransferStage(z, w, x, y))
{
#if defined(NONPORTABLE) && defined(WINDOWS)
- MessageBoxA(ghWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", 0);
+ #ifdef JAPANESE
+ MessageBoxA(ghWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", MB_OK);
+ #else
+ MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK);
+ #endif
#else
#ifdef JAPANESE
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "�G���[", "�X�e�[�W�̓ǂݍ��݂Ɏ��s", NULL);
@@ -1250,16 +1254,19 @@
else
{
char str_0[0x40];
- #if defined(NONPORTABLE) && defined(WINDOWS)
- sprintf(str_0, "�s���̃R�[�h:<%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, "�G���[", 0);
- #else
- #ifdef JAPANESE
+ #ifdef JAPANESE
sprintf(str_0, "�s���̃R�[�h:<%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, "�G���[", str_0, NULL);
+ #if defined(NONPORTABLE) && defined(WINDOWS)
+ MessageBoxA(NULL, str_0, "�G���[", MB_OK);
#else
+ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "�G���[", str_0, NULL);
+ #endif
+ #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]);
- SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", str_0, NULL);
+ #if defined(NONPORTABLE) && defined(WINDOWS)
+ MessageBoxA(NULL, str_0, "Error", MB_OK);
+ #else
+ SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", str_0, NULL);
#endif
#endif