Merge branch 'master' into accurate

This commit is contained in:
Clownacy 2019-08-25 21:44:35 +01:00
commit 868802baf1
4 changed files with 38 additions and 15 deletions

View file

@ -138,10 +138,10 @@ void Backend_UnlockSurface(Backend_Surface *surface)
const unsigned char *src_pixel = surface->pixels; const unsigned char *src_pixel = surface->pixels;
// Convert the SDL_Surface's colour-keyed pixels to RGBA32 // 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[0];
*buffer_pointer++ = src_pixel[1]; *buffer_pointer++ = src_pixel[1];

View file

@ -683,9 +683,20 @@ BOOL Game(HWND hWnd)
if (!LoadGenericData()) if (!LoadGenericData())
{ {
#ifdef WINDOWS #if defined(NONPORTABLE) && defined(WINDOWS)
MessageBoxA(hWnd, "汎用ファイルが読めない", "エラー", MB_OK); // "Error - Couldn't read general purpose files" #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 #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; return FALSE;
} }
@ -696,9 +707,20 @@ BOOL Game(HWND hWnd)
if (!LoadNpcTable(path)) if (!LoadNpcTable(path))
{ {
#ifdef WINDOWS #if defined(NONPORTABLE) && defined(WINDOWS)
MessageBoxA(hWnd, "NPCテーブルが読めない", "エラー", MB_OK); // "Error - Couldn't read the NPC table" #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 #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; return FALSE;
} }

View file

@ -256,7 +256,7 @@ BOOL InitializeGame(HWND hWnd)
{ {
#if defined(NONPORTABLE) && defined(WINDOWS) #if defined(NONPORTABLE) && defined(WINDOWS)
#ifdef JAPANESE #ifdef JAPANESE
MessageBoxA(hWnd, "ステージの読み込みに失敗", "エラー", 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 #else
MessageBoxA(hWnd, "Failed to load stage", "Error", MB_OK); MessageBoxA(hWnd, "Failed to load stage", "Error", MB_OK);
#endif #endif
@ -264,7 +264,7 @@ BOOL InitializeGame(HWND hWnd)
(void)hWnd; (void)hWnd;
#ifdef JAPANESE #ifdef JAPANESE
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
#else #else
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
#endif #endif

View file

@ -709,13 +709,13 @@ int TextScriptProc()
{ {
#if defined(NONPORTABLE) && defined(WINDOWS) #if defined(NONPORTABLE) && defined(WINDOWS)
#ifdef JAPANESE #ifdef JAPANESE
MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", 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 #else
MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK); MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK);
#endif #endif
#else #else
#ifdef JAPANESE #ifdef JAPANESE
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
#else #else
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
#endif #endif
@ -1273,11 +1273,12 @@ int TextScriptProc()
{ {
char str_0[0x40]; char str_0[0x40];
#ifdef JAPANESE #ifdef JAPANESE
sprintf(str_0, "不明のコード:<%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) #if defined(NONPORTABLE) && defined(WINDOWS)
MessageBoxA(NULL, str_0, "エラー", 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 #else
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", 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 #endif
#else #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]); 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]);