shithub: cstory

Download patch

ref: 868802baf1be3241b7b42ec4243906165f184367
parent: ea83d4ba8ac1a3e54d2c0e6a33612a5e3897b463
parent: 43f7087ffb7d2226858db3a599fa2f15e8ffca36
author: Clownacy <[email protected]>
date: Sun Aug 25 17:44:35 EDT 2019

Merge branch 'master' into accurate

--- a/src/Backends/Rendering/SDLTexture.cpp
+++ b/src/Backends/Rendering/SDLTexture.cpp
@@ -138,10 +138,10 @@
 	const unsigned char *src_pixel = surface->pixels;
 
 	// Convert the SDL_Surface's colour-keyed pixels to RGBA32
-	for (int y = 0; y < surface->height; ++y)
+	for (unsigned int y = 0; y < surface->height; ++y)
 	{
 
-		for (int x = 0; x < surface->width; ++x)
+		for (unsigned int x = 0; x < surface->width; ++x)
 		{
 			*buffer_pointer++ = src_pixel[0];
 			*buffer_pointer++ = src_pixel[1];
--- a/src/Game.cpp
+++ b/src/Game.cpp
@@ -683,9 +683,20 @@
 
 	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 @@
 
 	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;
 	}
 
--- a/src/Profile.cpp
+++ b/src/Profile.cpp
@@ -256,7 +256,7 @@
 	{
 		#if defined(NONPORTABLE) && defined(WINDOWS)
 			#ifdef JAPANESE
-			MessageBoxA(hWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", MB_OK);
+			MessageBoxA(hWnd, "\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
 			MessageBoxA(hWnd, "Failed to load stage", "Error", MB_OK);
 			#endif
@@ -264,7 +264,7 @@
 			(void)hWnd;
 
 			#ifdef JAPANESE
-			SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "�G���[", "�X�e�[�W�̓ǂݍ��݂Ɏ��s", NULL);
+			SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
 			#else
 			SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
 			#endif
--- a/src/TextScr.cpp
+++ b/src/TextScr.cpp
@@ -709,13 +709,13 @@
 						{
 							#if defined(NONPORTABLE) && defined(WINDOWS)
 								#ifdef JAPANESE
-								MessageBoxA(ghWnd, "�X�e�[�W�̓ǂݍ��݂Ɏ��s", "�G���[", 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
 								MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK);
 								#endif
 							#else
 								#ifdef JAPANESE
-								SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "�G���[", "�X�e�[�W�̓ǂݍ��݂Ɏ��s", NULL);
+								SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
 								#else
 								SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
 								#endif
@@ -1273,11 +1273,12 @@
 					{
 						char str_0[0x40];
 						#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]);
 							#if defined(NONPORTABLE) && defined(WINDOWS)
-								MessageBoxA(NULL, str_0, "�G���[", 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
-								SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "�G���[", 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
 						#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]);