Some comments and a FIX_BUGS
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
parent
38a00ec88a
commit
372872eeea
2 changed files with 8 additions and 4 deletions
|
@ -27,6 +27,9 @@ static int gCampTitleY;
|
||||||
|
|
||||||
void ClearArmsData()
|
void ClearArmsData()
|
||||||
{
|
{
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
gSelectedArms = 0; // Should probably be done in order to avoid potential problems
|
||||||
|
#endif
|
||||||
gArmsEnergyX = 0x20;
|
gArmsEnergyX = 0x20;
|
||||||
memset(gArmsData, 0, sizeof(gArmsData));
|
memset(gArmsData, 0, sizeof(gArmsData));
|
||||||
}
|
}
|
||||||
|
@ -149,10 +152,10 @@ BOOL SubItemData(long code)
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < ITEM_MAX; ++i)
|
for (i = 0; i < ITEM_MAX; ++i)
|
||||||
if (gItemData[i].code == code)
|
if (gItemData[i].code == code)
|
||||||
break;
|
break; // Found
|
||||||
|
|
||||||
if (i == ITEM_MAX)
|
if (i == ITEM_MAX)
|
||||||
return FALSE;
|
return FALSE; // Not found
|
||||||
|
|
||||||
// Shift all items from the right to the left
|
// Shift all items from the right to the left
|
||||||
for (++i; i < ITEM_MAX; ++i)
|
for (++i; i < ITEM_MAX; ++i)
|
||||||
|
@ -164,6 +167,7 @@ BOOL SubItemData(long code)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Handle the moving
|
||||||
static void MoveCampCursor()
|
static void MoveCampCursor()
|
||||||
{
|
{
|
||||||
int arms_num = 0;
|
int arms_num = 0;
|
||||||
|
|
|
@ -44,10 +44,10 @@ extern ARMS gArmsData[ARMS_MAX];
|
||||||
extern ITEM gItemData[ITEM_MAX];
|
extern ITEM gItemData[ITEM_MAX];
|
||||||
|
|
||||||
|
|
||||||
/// Clear the weapons array, reverting it to the default state (no weapons)
|
/// Clear the weapons array, reverting it to the default state (no weapons) and adjust variables (initialize weapons basically)
|
||||||
void ClearArmsData();
|
void ClearArmsData();
|
||||||
|
|
||||||
/// Clear the item array, reverting it to the default state (no items)
|
/// Clear the item array, reverting it to the default state (no items) (initialize items basically)
|
||||||
void ClearItemData();
|
void ClearItemData();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue