shithub: cstory

Download patch

ref: 546631fad760d397b285e2e69da6a6ad0fb418bc
parent: 323e33ed363fe117e27a638ec95b9cf5bd12cce9
author: Clownacy <[email protected]>
date: Thu Jun 20 17:09:22 EDT 2019

Made Profile.cpp ASM-accurate

--- a/src/Profile.cpp
+++ b/src/Profile.cpp
@@ -243,8 +243,6 @@
 
 BOOL InitializeGame(HWND hWnd)
 {
-	(void)hWnd;
-
 	InitMyChar();
 	gSelectedArms = 0;
 	gSelectedItem = 0;
@@ -256,25 +254,21 @@
 	InitFlags();
 	if (!TransferStage(13, 200, 10, 8))
 	{
-		// TODO - restore this when ghWnd is available
-
-		/*
-
 #if defined(NONPORTABLE) && defined(WINDOWS)
-#ifdef JAPANESE
-		MessageBoxA(ghWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", MB_OK);
+	#ifdef JAPANESE
+		MessageBoxA(hWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", MB_OK);
+	#else
+		MessageBoxA(hWnd, "Failed to load stage", "Error", MB_OK);
+	#endif
 #else
-		MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK);
-#endif
-#else
+	(void)hWnd;
 
-		*/
-#ifdef JAPANESE
+	#ifdef JAPANESE
 		SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "�G���[", "�X�e�[�W�̓ǂݍ��݂Ɏ��s", NULL);
-#else
+	#else
 		SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
+	#endif
 #endif
-// #endif
 		return FALSE;
 	}
 
--- a/src/TextScr.cpp
+++ b/src/TextScr.cpp
@@ -694,7 +694,7 @@
 						y = GetTextScriptNo(gTS.p_read + 19);
 						if (!TransferStage(z, w, x, y))
 						{
-							#ifdef NONPORTABLE
+							#if defined(NONPORTABLE) && defined(WINDOWS)
 							MessageBoxA(ghWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", 0);
 							#else
 								#ifdef JAPANESE
@@ -1250,7 +1250,7 @@
 					else
 					{
 						char str_0[0x40];
-						#ifdef NONPORTABLE
+						#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