Made Profile.cpp ASM-accurate

This commit is contained in:
Clownacy 2019-06-20 21:09:22 +01:00
parent 323e33ed36
commit 546631fad7
2 changed files with 11 additions and 17 deletions

View file

@ -243,8 +243,6 @@ BOOL LoadProfile(const char *name)
BOOL InitializeGame(HWND hWnd) BOOL InitializeGame(HWND hWnd)
{ {
(void)hWnd;
InitMyChar(); InitMyChar();
gSelectedArms = 0; gSelectedArms = 0;
gSelectedItem = 0; gSelectedItem = 0;
@ -256,25 +254,21 @@ BOOL InitializeGame(HWND hWnd)
InitFlags(); InitFlags();
if (!TransferStage(13, 200, 10, 8)) if (!TransferStage(13, 200, 10, 8))
{ {
// TODO - restore this when ghWnd is available
/*
#if defined(NONPORTABLE) && defined(WINDOWS) #if defined(NONPORTABLE) && defined(WINDOWS)
#ifdef JAPANESE #ifdef JAPANESE
MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", MB_OK); MessageBoxA(hWnd, "ステージの読み込みに失敗", "エラー", MB_OK);
#else #else
MessageBoxA(ghWnd, "Failed to load stage", "Error", MB_OK); MessageBoxA(hWnd, "Failed to load stage", "Error", MB_OK);
#endif #endif
#else #else
(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 #endif
// #endif
return FALSE; return FALSE;
} }

View file

@ -694,7 +694,7 @@ int TextScriptProc()
y = GetTextScriptNo(gTS.p_read + 19); y = GetTextScriptNo(gTS.p_read + 19);
if (!TransferStage(z, w, x, y)) if (!TransferStage(z, w, x, y))
{ {
#ifdef NONPORTABLE #if defined(NONPORTABLE) && defined(WINDOWS)
MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", 0); MessageBoxA(ghWnd, "ステージの読み込みに失敗", "エラー", 0);
#else #else
#ifdef JAPANESE #ifdef JAPANESE
@ -1250,7 +1250,7 @@ int TextScriptProc()
else else
{ {
char str_0[0x40]; 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]); 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); MessageBoxA(0, str_0, "エラー", 0);
#else #else