Clean-up ArmsItem.cpp
This commit is contained in:
parent
5914ce01ef
commit
1a0cb626f8
2 changed files with 64 additions and 56 deletions
106
src/ArmsItem.cpp
106
src/ArmsItem.cpp
|
@ -26,7 +26,7 @@ ITEM gItemData[ITEM_MAX];
|
||||||
static BOOL gCampActive;
|
static BOOL gCampActive;
|
||||||
static int gCampTitleY;
|
static int gCampTitleY;
|
||||||
|
|
||||||
void ClearArmsData()
|
void ClearArmsData(void)
|
||||||
{
|
{
|
||||||
#ifdef FIX_BUGS
|
#ifdef FIX_BUGS
|
||||||
gSelectedArms = 0; // Should probably be done in order to avoid potential problems with the selected weapon being invalid (like is done in SubArmsData)
|
gSelectedArms = 0; // Should probably be done in order to avoid potential problems with the selected weapon being invalid (like is done in SubArmsData)
|
||||||
|
@ -35,7 +35,7 @@ void ClearArmsData()
|
||||||
memset(gArmsData, 0, sizeof(gArmsData));
|
memset(gArmsData, 0, sizeof(gArmsData));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearItemData()
|
void ClearItemData(void)
|
||||||
{
|
{
|
||||||
memset(gItemData, 0, sizeof(gItemData));
|
memset(gItemData, 0, sizeof(gItemData));
|
||||||
}
|
}
|
||||||
|
@ -173,7 +173,7 @@ BOOL SubItemData(long code)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update the inventory cursor
|
/// Update the inventory cursor
|
||||||
void MoveCampCursor()
|
void MoveCampCursor(void)
|
||||||
{
|
{
|
||||||
// Compute the current amount of weapons and items
|
// Compute the current amount of weapons and items
|
||||||
int arms_num = 0;
|
int arms_num = 0;
|
||||||
|
@ -186,10 +186,10 @@ void MoveCampCursor()
|
||||||
if (arms_num == 0 && item_num == 0)
|
if (arms_num == 0 && item_num == 0)
|
||||||
return; // Empty inventory
|
return; // Empty inventory
|
||||||
|
|
||||||
/// True if we're currently changing cursor position
|
// True if we're currently changing cursor position
|
||||||
BOOL bChange = FALSE;
|
BOOL bChange = FALSE;
|
||||||
|
|
||||||
if (gCampActive == FALSE)
|
if (!gCampActive)
|
||||||
{
|
{
|
||||||
// Handle selected weapon
|
// Handle selected weapon
|
||||||
if (gKeyTrg & gKeyLeft)
|
if (gKeyTrg & gKeyLeft)
|
||||||
|
@ -207,7 +207,7 @@ void MoveCampCursor()
|
||||||
if (gKeyTrg & (gKeyUp | gKeyDown))
|
if (gKeyTrg & (gKeyUp | gKeyDown))
|
||||||
{
|
{
|
||||||
// If there are any items, we're changing to the items section, since the weapons section has only 1 row
|
// If there are any items, we're changing to the items section, since the weapons section has only 1 row
|
||||||
if (item_num)
|
if (item_num != 0)
|
||||||
gCampActive = TRUE;
|
gCampActive = TRUE;
|
||||||
|
|
||||||
bChange = TRUE;
|
bChange = TRUE;
|
||||||
|
@ -228,7 +228,7 @@ void MoveCampCursor()
|
||||||
if (gSelectedItem % 6 == 0)
|
if (gSelectedItem % 6 == 0)
|
||||||
gSelectedItem += 5;
|
gSelectedItem += 5;
|
||||||
else
|
else
|
||||||
--gSelectedItem;
|
gSelectedItem -= 1;
|
||||||
|
|
||||||
bChange = TRUE;
|
bChange = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -236,11 +236,11 @@ void MoveCampCursor()
|
||||||
if (gKeyTrg & gKeyRight)
|
if (gKeyTrg & gKeyRight)
|
||||||
{
|
{
|
||||||
if (gSelectedItem == item_num - 1)
|
if (gSelectedItem == item_num - 1)
|
||||||
gSelectedItem = 6 * (gSelectedItem / 6); // Round down to multiple of 6
|
gSelectedItem = (gSelectedItem / 6) * 6; // Round down to multiple of 6
|
||||||
else if (gSelectedItem % 6 == 5)
|
else if (gSelectedItem % 6 == 5)
|
||||||
gSelectedItem -= 5; // Loop around row
|
gSelectedItem -= 5; // Loop around row
|
||||||
else
|
else
|
||||||
++gSelectedItem;
|
gSelectedItem += 1;
|
||||||
|
|
||||||
bChange = TRUE;
|
bChange = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ void MoveCampCursor()
|
||||||
gSelectedItem = item_num - 1; // Don't allow selecting a non-existing item
|
gSelectedItem = item_num - 1; // Don't allow selecting a non-existing item
|
||||||
|
|
||||||
if (gCampActive && gKeyTrg & gKeyOk)
|
if (gCampActive && gKeyTrg & gKeyOk)
|
||||||
StartTextScript(gItemData[gSelectedItem].code + 6000);
|
StartTextScript(6000 + gItemData[gSelectedItem].code);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bChange)
|
if (bChange)
|
||||||
|
@ -279,8 +279,8 @@ void MoveCampCursor()
|
||||||
// Switch to a weapon
|
// Switch to a weapon
|
||||||
PlaySoundObject(SND_SWITCH_WEAPON, 1);
|
PlaySoundObject(SND_SWITCH_WEAPON, 1);
|
||||||
|
|
||||||
if (arms_num)
|
if (arms_num != 0)
|
||||||
StartTextScript(gArmsData[gSelectedArms].code + 1000);
|
StartTextScript(1000 + gArmsData[gSelectedArms].code);
|
||||||
else
|
else
|
||||||
StartTextScript(1000);
|
StartTextScript(1000);
|
||||||
}
|
}
|
||||||
|
@ -289,8 +289,8 @@ void MoveCampCursor()
|
||||||
// Switch to an item
|
// Switch to an item
|
||||||
PlaySoundObject(SND_YES_NO_CHANGE_CHOICE, 1);
|
PlaySoundObject(SND_YES_NO_CHANGE_CHOICE, 1);
|
||||||
|
|
||||||
if (item_num)
|
if (item_num != 0)
|
||||||
StartTextScript(gItemData[gSelectedItem].code + 5000);
|
StartTextScript(5000 + gItemData[gSelectedItem].code);
|
||||||
else
|
else
|
||||||
StartTextScript(5000);
|
StartTextScript(5000);
|
||||||
}
|
}
|
||||||
|
@ -298,7 +298,7 @@ void MoveCampCursor()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Draw the inventory
|
/// Draw the inventory
|
||||||
void PutCampObject()
|
void PutCampObject(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -333,27 +333,27 @@ void PutCampObject()
|
||||||
RECT rcBoxBottom = {0, 16, 244, 24};
|
RECT rcBoxBottom = {0, 16, 244, 24};
|
||||||
|
|
||||||
// Draw box
|
// Draw box
|
||||||
PutBitmap3(&rcView, (WINDOW_WIDTH - 244) / 2, (WINDOW_HEIGHT - 224) / 2, &rcBoxTop, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (WINDOW_WIDTH / 2) - 122, (WINDOW_HEIGHT / 2) - 112, &rcBoxTop, SURFACE_ID_TEXT_BOX);
|
||||||
for (i = 1; i < 18; ++i)
|
for (i = 1; i < 18; ++i)
|
||||||
PutBitmap3(&rcView, (WINDOW_WIDTH - 244) / 2, ((WINDOW_HEIGHT - 240) / 2) + (8 * (i + 1)), &rcBoxBody, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (WINDOW_WIDTH / 2) - 122, ((WINDOW_HEIGHT / 2) - 120) + ((i + 1) * 8), &rcBoxBody, SURFACE_ID_TEXT_BOX);
|
||||||
PutBitmap3(&rcView, (WINDOW_WIDTH - 244) / 2, ((WINDOW_HEIGHT - 240) / 2) + (8 * (i + 1)), &rcBoxBottom, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (WINDOW_WIDTH / 2) - 122, ((WINDOW_HEIGHT / 2) - 120) + ((i + 1) * 8), &rcBoxBottom, SURFACE_ID_TEXT_BOX);
|
||||||
|
|
||||||
// Move titles
|
// Move titles
|
||||||
if (gCampTitleY > (WINDOW_HEIGHT - 208) / 2)
|
if (gCampTitleY > (WINDOW_HEIGHT / 2) - 104)
|
||||||
--gCampTitleY;
|
--gCampTitleY;
|
||||||
|
|
||||||
// Draw titles
|
// Draw titles
|
||||||
PutBitmap3(&rcView, (WINDOW_WIDTH - 224) / 2, gCampTitleY, &rcTitle1, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (WINDOW_WIDTH / 2) - 112, gCampTitleY, &rcTitle1, SURFACE_ID_TEXT_BOX);
|
||||||
PutBitmap3(&rcView, (WINDOW_WIDTH - 224) / 2, gCampTitleY + 52, &rcTitle2, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (WINDOW_WIDTH / 2) - 112, gCampTitleY + 52, &rcTitle2, SURFACE_ID_TEXT_BOX);
|
||||||
|
|
||||||
// Draw arms cursor
|
// Draw arms cursor
|
||||||
static unsigned int flash;
|
static unsigned int flash;
|
||||||
++flash;
|
++flash;
|
||||||
|
|
||||||
if (gCampActive == FALSE)
|
if (gCampActive == FALSE)
|
||||||
PutBitmap3(&rcView, 40 * gSelectedArms + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT / 2) - 96, &rcCur1[(flash / 2) % 2], SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (gSelectedArms * 40) + (WINDOW_WIDTH / 2) - 112, (WINDOW_HEIGHT / 2) - 96, &rcCur1[(flash / 2) % 2], SURFACE_ID_TEXT_BOX);
|
||||||
else
|
else
|
||||||
PutBitmap3(&rcView, 40 * gSelectedArms + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT / 2) - 96, &rcCur1[1], SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (gSelectedArms * 40) + (WINDOW_WIDTH / 2) - 112, (WINDOW_HEIGHT / 2) - 96, &rcCur1[1], SURFACE_ID_TEXT_BOX);
|
||||||
|
|
||||||
// Draw weapons
|
// Draw weapons
|
||||||
for (i = 0; i < ARMS_MAX; ++i)
|
for (i = 0; i < ARMS_MAX; ++i)
|
||||||
|
@ -368,30 +368,30 @@ void PutCampObject()
|
||||||
rcArms.bottom = rcArms.top + 16;
|
rcArms.bottom = rcArms.top + 16;
|
||||||
|
|
||||||
// Draw the icon, slash and "Lv"
|
// Draw the icon, slash and "Lv"
|
||||||
PutBitmap3(&rcView, 40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 192) / 2, &rcArms, SURFACE_ID_ARMS_IMAGE);
|
PutBitmap3(&rcView, (i * 40) + (WINDOW_WIDTH / 2) - 112, (WINDOW_HEIGHT / 2) - 96, &rcArms, SURFACE_ID_ARMS_IMAGE);
|
||||||
PutBitmap3(&rcView, 40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 128) / 2, &rcPer, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (i * 40) + (WINDOW_WIDTH / 2) - 112, (WINDOW_HEIGHT / 2) - 64, &rcPer, SURFACE_ID_TEXT_BOX);
|
||||||
PutBitmap3(&rcView, 40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 160) / 2, &rcLv, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (i * 40) + (WINDOW_WIDTH / 2) - 112, (WINDOW_HEIGHT / 2) - 80, &rcLv, SURFACE_ID_TEXT_BOX);
|
||||||
PutNumber4(40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 160) / 2, gArmsData[i].level, FALSE);
|
PutNumber4((i * 40) + (WINDOW_WIDTH / 2) - 112, (WINDOW_HEIGHT / 2) - 80, gArmsData[i].level, FALSE);
|
||||||
|
|
||||||
// Draw ammo
|
// Draw ammo
|
||||||
if (gArmsData[i].max_num)
|
if (gArmsData[i].max_num)
|
||||||
{
|
{
|
||||||
PutNumber4(40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 144) / 2, gArmsData[i].num, FALSE);
|
PutNumber4((i * 40) + (WINDOW_WIDTH / 2) - 112, (WINDOW_HEIGHT / 2) - 72, gArmsData[i].num, FALSE);
|
||||||
PutNumber4(40 * i + (WINDOW_WIDTH - 224) / 2, (WINDOW_HEIGHT - 128) / 2, gArmsData[i].max_num, FALSE);
|
PutNumber4((i * 40) + (WINDOW_WIDTH / 2) - 112, (WINDOW_HEIGHT / 2) - 64, gArmsData[i].max_num, FALSE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Weapon doesn't use ammunition
|
// Weapon doesn't use ammunition
|
||||||
PutBitmap3(&rcView, 40 * i + (WINDOW_WIDTH - 192) / 2, (WINDOW_HEIGHT - 144) / 2, &rcNone, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (i * 40) + (WINDOW_WIDTH - 192) / 2, (WINDOW_HEIGHT / 2) - 72, &rcNone, SURFACE_ID_TEXT_BOX);
|
||||||
PutBitmap3(&rcView, 40 * i + (WINDOW_WIDTH - 192) / 2, (WINDOW_HEIGHT - 128) / 2, &rcNone, SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, (i * 40) + (WINDOW_WIDTH - 192) / 2, (WINDOW_HEIGHT / 2) - 64, &rcNone, SURFACE_ID_TEXT_BOX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw items cursor
|
// Draw items cursor
|
||||||
if (gCampActive == TRUE)
|
if (gCampActive == TRUE)
|
||||||
PutBitmap3(&rcView, 32 * (gSelectedItem % 6) + (WINDOW_WIDTH - 224) / 2, 16 * (gSelectedItem / 6) + (WINDOW_HEIGHT - 88) / 2, &rcCur2[(flash / 2) % 2], SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, ((gSelectedItem % 6) * 32) + (WINDOW_WIDTH / 2) - 112, ((gSelectedItem / 6) * 16) + (WINDOW_HEIGHT / 2) - 44, &rcCur2[flash / 2 % 2], SURFACE_ID_TEXT_BOX);
|
||||||
else
|
else
|
||||||
PutBitmap3(&rcView, 32 * (gSelectedItem % 6) + (WINDOW_WIDTH - 224) / 2, 16 * (gSelectedItem / 6) + (WINDOW_HEIGHT - 88) / 2, &rcCur2[1], SURFACE_ID_TEXT_BOX);
|
PutBitmap3(&rcView, ((gSelectedItem % 6) * 32) + (WINDOW_WIDTH / 2) - 112, ((gSelectedItem / 6) * 16) + (WINDOW_HEIGHT / 2) - 44, &rcCur2[1], SURFACE_ID_TEXT_BOX);
|
||||||
|
|
||||||
for (i = 0; i < ITEM_MAX; ++i)
|
for (i = 0; i < ITEM_MAX; ++i)
|
||||||
{
|
{
|
||||||
|
@ -399,16 +399,16 @@ void PutCampObject()
|
||||||
break; // Invalid item
|
break; // Invalid item
|
||||||
|
|
||||||
// Get rect for next item
|
// Get rect for next item
|
||||||
rcItem.left = 32 * (gItemData[i].code % 8);
|
rcItem.left = (gItemData[i].code % 8) * 32;
|
||||||
rcItem.right = rcItem.left + 32;
|
rcItem.right = rcItem.left + 32;
|
||||||
rcItem.top = 16 * (gItemData[i].code / 8);
|
rcItem.top = (gItemData[i].code / 8) * 16;
|
||||||
rcItem.bottom = rcItem.top + 16;
|
rcItem.bottom = rcItem.top + 16;
|
||||||
|
|
||||||
PutBitmap3(&rcView, 32 * (i % 6) + (WINDOW_WIDTH - 224) / 2, 16 * (i / 6) + (WINDOW_HEIGHT - 88) / 2, &rcItem, SURFACE_ID_ITEM_IMAGE);
|
PutBitmap3(&rcView, ((i % 6) * 32) + (WINDOW_WIDTH / 2) - 112, ((i / 6) * 16) + (WINDOW_HEIGHT / 2) - 44, &rcItem, SURFACE_ID_ITEM_IMAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CampLoop()
|
int CampLoop(void)
|
||||||
{
|
{
|
||||||
int arms_num;
|
int arms_num;
|
||||||
char old_script_path[MAX_PATH];
|
char old_script_path[MAX_PATH];
|
||||||
|
@ -421,7 +421,7 @@ int CampLoop()
|
||||||
// Load the inventory script
|
// Load the inventory script
|
||||||
LoadTextScript2("ArmsItem.tsc");
|
LoadTextScript2("ArmsItem.tsc");
|
||||||
|
|
||||||
gCampTitleY = (WINDOW_HEIGHT - 192) / 2;
|
gCampTitleY = (WINDOW_HEIGHT / 2) - 96;
|
||||||
|
|
||||||
// Put the cursor on the first weapon
|
// Put the cursor on the first weapon
|
||||||
gCampActive = FALSE;
|
gCampActive = FALSE;
|
||||||
|
@ -432,10 +432,10 @@ int CampLoop()
|
||||||
while (gArmsData[arms_num].code != 0)
|
while (gArmsData[arms_num].code != 0)
|
||||||
++arms_num;
|
++arms_num;
|
||||||
|
|
||||||
if (arms_num)
|
if (arms_num != 0)
|
||||||
StartTextScript(gArmsData[gSelectedArms].code + 1000);
|
StartTextScript(1000 + gArmsData[gSelectedArms].code);
|
||||||
else
|
else
|
||||||
StartTextScript(gItemData[gSelectedItem].code + 5000);
|
StartTextScript(5000 + gItemData[gSelectedItem].code);
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -500,7 +500,9 @@ int CampLoop()
|
||||||
|
|
||||||
BOOL CheckItem(long a)
|
BOOL CheckItem(long a)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ITEM_MAX; ++i)
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < ITEM_MAX; ++i)
|
||||||
if (gItemData[i].code == a)
|
if (gItemData[i].code == a)
|
||||||
return TRUE; // Found
|
return TRUE; // Found
|
||||||
|
|
||||||
|
@ -509,7 +511,9 @@ BOOL CheckItem(long a)
|
||||||
|
|
||||||
BOOL CheckArms(long a)
|
BOOL CheckArms(long a)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ARMS_MAX; ++i)
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < ARMS_MAX; ++i)
|
||||||
if (gArmsData[i].code == a)
|
if (gArmsData[i].code == a)
|
||||||
return TRUE; // Found
|
return TRUE; // Found
|
||||||
|
|
||||||
|
@ -542,9 +546,11 @@ BOOL ChargeArmsEnergy(long num)
|
||||||
return TRUE; // Always successfull
|
return TRUE; // Always successfull
|
||||||
}
|
}
|
||||||
|
|
||||||
void FullArmsEnergy()
|
void FullArmsEnergy(void)
|
||||||
{
|
{
|
||||||
for (int a = 0; a < ARMS_MAX; a++)
|
int a;
|
||||||
|
|
||||||
|
for (a = 0; a < ARMS_MAX; ++a)
|
||||||
{
|
{
|
||||||
if (gArmsData[a].code == 0)
|
if (gArmsData[a].code == 0)
|
||||||
continue; // Don't change empty weapons
|
continue; // Don't change empty weapons
|
||||||
|
@ -553,7 +559,7 @@ void FullArmsEnergy()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int RotationArms()
|
int RotationArms(void)
|
||||||
{
|
{
|
||||||
// Get amount of weapons
|
// Get amount of weapons
|
||||||
int arms_num = 0;
|
int arms_num = 0;
|
||||||
|
@ -585,7 +591,7 @@ int RotationArms()
|
||||||
return gArmsData[gSelectedArms].code;
|
return gArmsData[gSelectedArms].code;
|
||||||
}
|
}
|
||||||
|
|
||||||
int RotationArmsRev()
|
int RotationArmsRev(void)
|
||||||
{
|
{
|
||||||
// Get amount of weapons
|
// Get amount of weapons
|
||||||
int arms_num = 0;
|
int arms_num = 0;
|
||||||
|
@ -598,7 +604,9 @@ int RotationArmsRev()
|
||||||
ResetSpurCharge();
|
ResetSpurCharge();
|
||||||
|
|
||||||
// Select previous valid weapon
|
// Select previous valid weapon
|
||||||
if (--gSelectedArms < 0)
|
--gSelectedArms;
|
||||||
|
|
||||||
|
if (gSelectedArms < 0)
|
||||||
gSelectedArms = arms_num - 1;
|
gSelectedArms = arms_num - 1;
|
||||||
|
|
||||||
while (gSelectedArms < arms_num)
|
while (gSelectedArms < arms_num)
|
||||||
|
@ -615,7 +623,7 @@ int RotationArmsRev()
|
||||||
return gArmsData[gSelectedArms].code;
|
return gArmsData[gSelectedArms].code;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChangeToFirstArms()
|
void ChangeToFirstArms(void)
|
||||||
{
|
{
|
||||||
gSelectedArms = 0;
|
gSelectedArms = 0;
|
||||||
gArmsEnergyX = 32;
|
gArmsEnergyX = 32;
|
||||||
|
|
|
@ -55,10 +55,10 @@ extern ITEM gItemData[ITEM_MAX];
|
||||||
|
|
||||||
|
|
||||||
/// Clear the weapons array, reverting it to the default state (no weapons) and adjust variables (initialize weapons basically)
|
/// Clear the weapons array, reverting it to the default state (no weapons) and adjust variables (initialize weapons basically)
|
||||||
void ClearArmsData();
|
void ClearArmsData(void);
|
||||||
|
|
||||||
/// Clear the item array, reverting it to the default state (no items) (initialize items basically)
|
/// Clear the item array, reverting it to the default state (no items) (initialize items basically)
|
||||||
void ClearItemData();
|
void ClearItemData(void);
|
||||||
|
|
||||||
|
|
||||||
/// Add code to the weapons, setting max_num as the max ammo, or find code and add max_num to its ammo. Fails if no space is available and the weapon isn't
|
/// Add code to the weapons, setting max_num as the max ammo, or find code and add max_num to its ammo. Fails if no space is available and the weapon isn't
|
||||||
|
@ -80,7 +80,7 @@ BOOL SubItemData(long code);
|
||||||
|
|
||||||
|
|
||||||
/// Inventory loop. Returns mode.
|
/// Inventory loop. Returns mode.
|
||||||
int CampLoop();
|
int CampLoop(void);
|
||||||
|
|
||||||
|
|
||||||
/// Search for a in the items. Returns whether a was found
|
/// Search for a in the items. Returns whether a was found
|
||||||
|
@ -97,16 +97,16 @@ BOOL UseArmsEnergy(long num);
|
||||||
BOOL ChargeArmsEnergy(long num);
|
BOOL ChargeArmsEnergy(long num);
|
||||||
|
|
||||||
/// Set every weapons ammunition to its maximum ammunition
|
/// Set every weapons ammunition to its maximum ammunition
|
||||||
void FullArmsEnergy();
|
void FullArmsEnergy(void);
|
||||||
|
|
||||||
|
|
||||||
// "Rotation" means "Weapons currently owned by the player (present in the weapons array)"
|
// "Rotation" means "Weapons currently owned by the player (present in the weapons array)"
|
||||||
|
|
||||||
/// Change the current weapon to the next one in the rotation. Returns the ID of the newly selected weapon
|
/// Change the current weapon to the next one in the rotation. Returns the ID of the newly selected weapon
|
||||||
int RotationArms();
|
int RotationArms(void);
|
||||||
|
|
||||||
/// Change the current weapon to the previous one in the rotation. Returns the ID of the newly selected weapon
|
/// Change the current weapon to the previous one in the rotation. Returns the ID of the newly selected weapon
|
||||||
int RotationArmsRev();
|
int RotationArmsRev(void);
|
||||||
|
|
||||||
/// Change the current weapon to be the first one and play the usual rotation animation
|
/// Change the current weapon to be the first one and play the usual rotation animation
|
||||||
void ChangeToFirstArms();
|
void ChangeToFirstArms(void);
|
||||||
|
|
Loading…
Add table
Reference in a new issue