Merge branch 'accurate' into portable
This commit is contained in:
commit
71199c7693
7 changed files with 37 additions and 37 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
// Limits for the amount of weapons and items
|
// Limits for the amount of weapons and items
|
||||||
#define ARMS_MAX 8
|
#define ARMS_MAX 8
|
||||||
#define ITEM_MAX 0x20
|
#define ITEM_MAX 32
|
||||||
|
|
||||||
// "Arms" is a synonym of "weapon" here
|
// "Arms" is a synonym of "weapon" here
|
||||||
// "Code" means "ID" here
|
// "Code" means "ID" here
|
||||||
|
|
14
src/Game.cpp
14
src/Game.cpp
|
@ -689,12 +689,11 @@ BOOL Game(void)
|
||||||
|
|
||||||
if (!LoadGenericData())
|
if (!LoadGenericData())
|
||||||
{
|
{
|
||||||
#ifdef JAPANESE
|
#if !defined(JAPANESE) && defined(FIX_BUGS) // The Aeon Genesis translation didn't translate this
|
||||||
Backend_ShowMessageBox("エラー", "汎用ファイルが読めない");
|
|
||||||
#else
|
|
||||||
Backend_ShowMessageBox("Error", "Couldn't read general purpose files");
|
Backend_ShowMessageBox("Error", "Couldn't read general purpose files");
|
||||||
|
#else
|
||||||
|
Backend_ShowMessageBox("エラー", "汎用ファイルが読めない");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -704,12 +703,11 @@ BOOL Game(void)
|
||||||
|
|
||||||
if (!LoadNpcTable(path.c_str()))
|
if (!LoadNpcTable(path.c_str()))
|
||||||
{
|
{
|
||||||
#ifdef JAPANESE
|
#if !defined(JAPANESE) && defined(FIX_BUGS) // The Aeon Genesis translation didn't translate this
|
||||||
Backend_ShowMessageBox("エラー", "NPCテーブルが読めない");
|
|
||||||
#else
|
|
||||||
Backend_ShowMessageBox("Error", "Couldn't read the NPC table");
|
Backend_ShowMessageBox("Error", "Couldn't read the NPC table");
|
||||||
|
#else
|
||||||
|
Backend_ShowMessageBox("エラー", "NPCテーブルが読めない");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ struct DIRECTINPUTSTATUS
|
||||||
BOOL bRight;
|
BOOL bRight;
|
||||||
BOOL bUp;
|
BOOL bUp;
|
||||||
BOOL bDown;
|
BOOL bDown;
|
||||||
BOOL bButton[32]; // The original `Input.cpp` assumed there were 32 buttons (because of DirectInput's `DIJOYSTATE` struct)
|
BOOL bButton[32]; // 32 is the number of buttons in DirectInput's `DIJOYSTATE` struct
|
||||||
};
|
};
|
||||||
|
|
||||||
void ReleaseDirectInput(void);
|
void ReleaseDirectInput(void);
|
||||||
|
|
|
@ -246,12 +246,11 @@ BOOL InitializeGame(void)
|
||||||
InitFlags();
|
InitFlags();
|
||||||
if (!TransferStage(13, 200, 10, 8))
|
if (!TransferStage(13, 200, 10, 8))
|
||||||
{
|
{
|
||||||
#ifdef JAPANESE
|
#if !defined(JAPANESE) && defined(FIX_BUGS) // The Aeon Genesis translation didn't translate this
|
||||||
Backend_ShowMessageBox("エラー", "ステージの読み込みに失敗");
|
|
||||||
#else
|
|
||||||
Backend_ShowMessageBox("Error", "Failed to load stage");
|
Backend_ShowMessageBox("Error", "Failed to load stage");
|
||||||
|
#else
|
||||||
|
Backend_ShowMessageBox("エラー", "ステージの読み込みに失敗");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "Sound.h"
|
#include "Sound.h"
|
||||||
#include "TextScr.h"
|
#include "TextScr.h"
|
||||||
|
|
||||||
PERMIT_STAGE gPermitStage[8];
|
PERMIT_STAGE gPermitStage[STAGE_MAX];
|
||||||
|
|
||||||
int gSelectedStage;
|
int gSelectedStage;
|
||||||
int gStageSelectTitleY;
|
int gStageSelectTitleY;
|
||||||
|
@ -27,7 +27,7 @@ BOOL AddPermitStage(int index, int event)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
while (i < 8)
|
while (i < STAGE_MAX)
|
||||||
{
|
{
|
||||||
if (gPermitStage[i].index == index)
|
if (gPermitStage[i].index == index)
|
||||||
break;
|
break;
|
||||||
|
@ -38,7 +38,7 @@ BOOL AddPermitStage(int index, int event)
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 8)
|
if (i == STAGE_MAX)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
gPermitStage[i].index = index;
|
gPermitStage[i].index = index;
|
||||||
|
@ -51,18 +51,18 @@ BOOL SubPermitStage(int index)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 8; ++i)
|
for (i = 0; i < STAGE_MAX; ++i)
|
||||||
if (gPermitStage[i].index == index)
|
if (gPermitStage[i].index == index)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
if (i == 8)
|
if (i == STAGE_MAX)
|
||||||
#else
|
#else
|
||||||
if (i == 32)
|
if (i == 32) // Same value as 'ITEM_MAX'
|
||||||
#endif
|
#endif
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
for (++i; i < 8; ++i)
|
for (++i; i < STAGE_MAX; ++i)
|
||||||
gPermitStage[i - 1] = gPermitStage[i];
|
gPermitStage[i - 1] = gPermitStage[i];
|
||||||
|
|
||||||
gPermitStage[i - 1].index = 0;
|
gPermitStage[i - 1].index = 0;
|
||||||
|
@ -140,11 +140,14 @@ void PutStageSelectObject(void)
|
||||||
|
|
||||||
PutBitmap3(&rcView, stage_x + (gSelectedStage * 40), (WINDOW_HEIGHT / 2) - 56, &rcCur[flash / 2 % 2], SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, stage_x + (gSelectedStage * 40), (WINDOW_HEIGHT / 2) - 56, &rcCur[flash / 2 % 2], SURFACE_ID_TEXT_BOX);
|
||||||
|
|
||||||
for (i = 0; i < 8; ++i)
|
for (i = 0; i < STAGE_MAX; ++i)
|
||||||
{
|
{
|
||||||
if (gPermitStage[i].index == 0)
|
if (gPermitStage[i].index == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Interestingly, there's code for reading multiple rows of icons
|
||||||
|
// from the 'StageImage.pbm' file when there are more than 8 stages,
|
||||||
|
// despite only 6 icons ever being used.
|
||||||
rcStage.left = (gPermitStage[i].index % 8) * 32;
|
rcStage.left = (gPermitStage[i].index % 8) * 32;
|
||||||
rcStage.right = rcStage.left + 32;
|
rcStage.right = rcStage.left + 32;
|
||||||
rcStage.top = (gPermitStage[i].index / 8) * 16;
|
rcStage.top = (gPermitStage[i].index / 8) * 16;
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
|
|
||||||
#include "WindowsWrapper.h"
|
#include "WindowsWrapper.h"
|
||||||
|
|
||||||
|
#define STAGE_MAX 8 // Note that Cave Story only has 5 stages
|
||||||
|
|
||||||
typedef struct PERMIT_STAGE
|
typedef struct PERMIT_STAGE
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
int event;
|
int event;
|
||||||
} PERMIT_STAGE;
|
} PERMIT_STAGE;
|
||||||
|
|
||||||
extern PERMIT_STAGE gPermitStage[8];
|
extern PERMIT_STAGE gPermitStage[STAGE_MAX];
|
||||||
|
|
||||||
extern int gSelectedStage;
|
extern int gSelectedStage;
|
||||||
extern int gStageSelectTitleY;
|
extern int gStageSelectTitleY;
|
||||||
|
|
|
@ -741,12 +741,11 @@ int TextScriptProc(void)
|
||||||
|
|
||||||
if (!TransferStage(z, w, x, y))
|
if (!TransferStage(z, w, x, y))
|
||||||
{
|
{
|
||||||
#ifdef JAPANESE
|
#if !defined(JAPANESE) && defined(FIX_BUGS) // The Aeon Genesis translation didn't translate this
|
||||||
Backend_ShowMessageBox("エラー", "ステージの読み込みに失敗");
|
|
||||||
#else
|
|
||||||
Backend_ShowMessageBox("Error", "Failed to load stage");
|
Backend_ShowMessageBox("Error", "Failed to load stage");
|
||||||
|
#else
|
||||||
|
Backend_ShowMessageBox("エラー", "ステージの読み込みに失敗");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return enum_ESCRETURN_exit;
|
return enum_ESCRETURN_exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1323,14 +1322,13 @@ int TextScriptProc(void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char str_0[0x40];
|
char str_0[0x40];
|
||||||
#ifdef JAPANESE
|
#if !defined(JAPANESE) && defined(FIX_BUGS) // The Aeon Genesis translation didn't translate this
|
||||||
sprintf(str_0, "不明のコード:<%c%c%c", gTS.data[gTS.p_read + 1], gTS.data[gTS.p_read + 2], gTS.data[gTS.p_read + 3]);
|
|
||||||
Backend_ShowMessageBox("エラー", str_0);
|
|
||||||
#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]);
|
||||||
Backend_ShowMessageBox("Error", str_0);
|
Backend_ShowMessageBox("Error", str_0);
|
||||||
|
#else
|
||||||
|
sprintf(str_0, "不明のコード:<%c%c%c", gTS.data[gTS.p_read + 1], gTS.data[gTS.p_read + 2], gTS.data[gTS.p_read + 3]);
|
||||||
|
Backend_ShowMessageBox("エラー", str_0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return enum_ESCRETURN_exit;
|
return enum_ESCRETURN_exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue