Split SDL2 code from Profile.cpp and TextScr.cpp
This commit is contained in:
parent
37c5236b9b
commit
584ea57c5d
4 changed files with 15 additions and 10 deletions
|
@ -9,3 +9,5 @@ void PlatformBackend_Init(void);
|
||||||
void PlatformBackend_GetBasePath(char *string_buffer);
|
void PlatformBackend_GetBasePath(char *string_buffer);
|
||||||
|
|
||||||
BOOL PlatformBackend_SystemTask(void);
|
BOOL PlatformBackend_SystemTask(void);
|
||||||
|
|
||||||
|
void PlatformBackend_ShowMessageBox(const char *title, const char *message);
|
||||||
|
|
|
@ -252,3 +252,8 @@ BOOL PlatformBackend_SystemTask(void)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlatformBackend_ShowMessageBox(const char *title, const char *message)
|
||||||
|
{
|
||||||
|
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, title, message, NULL);
|
||||||
|
}
|
||||||
|
|
|
@ -4,10 +4,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "SDL.h"
|
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
|
#include "Backends/Platform.h"
|
||||||
#include "ArmsItem.h"
|
#include "ArmsItem.h"
|
||||||
#include "BossLife.h"
|
#include "BossLife.h"
|
||||||
#include "Fade.h"
|
#include "Fade.h"
|
||||||
|
@ -248,9 +247,9 @@ BOOL InitializeGame(void)
|
||||||
if (!TransferStage(13, 200, 10, 8))
|
if (!TransferStage(13, 200, 10, 8))
|
||||||
{
|
{
|
||||||
#ifdef JAPANESE
|
#ifdef JAPANESE
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
|
PlatformBackend_ShowMessageBox("エラー", "ステージの読み込みに失敗");
|
||||||
#else
|
#else
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
|
PlatformBackend_ShowMessageBox("Error", "Failed to load stage");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -4,10 +4,9 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "SDL.h"
|
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
|
#include "Backends/Platform.h"
|
||||||
#include "ArmsItem.h"
|
#include "ArmsItem.h"
|
||||||
#include "Boss.h"
|
#include "Boss.h"
|
||||||
#include "BossLife.h"
|
#include "BossLife.h"
|
||||||
|
@ -727,9 +726,9 @@ int TextScriptProc(void)
|
||||||
if (!TransferStage(z, w, x, y))
|
if (!TransferStage(z, w, x, y))
|
||||||
{
|
{
|
||||||
#ifdef JAPANESE
|
#ifdef JAPANESE
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "エラー", "ステージの読み込みに失敗", NULL);
|
PlatformBackend_ShowMessageBox("エラー", "ステージの読み込みに失敗");
|
||||||
#else
|
#else
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", "Failed to load stage", NULL);
|
PlatformBackend_ShowMessageBox("Error", "Failed to load stage");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return enum_ESCRETURN_exit;
|
return enum_ESCRETURN_exit;
|
||||||
|
@ -1284,10 +1283,10 @@ int TextScriptProc(void)
|
||||||
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]);
|
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);
|
PlatformBackend_ShowMessageBox("エラー", str_0);
|
||||||
#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]);
|
||||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Error", str_0, NULL);
|
PlatformBackend_ShowMessageBox("Error", str_0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return enum_ESCRETURN_exit;
|
return enum_ESCRETURN_exit;
|
||||||
|
|
Loading…
Add table
Reference in a new issue