More comments in ArmsItem

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2019-09-23 07:28:48 +02:00
parent eb46198635
commit 9d8018e901
No known key found for this signature in database
GPG key ID: 1E75F156884F3DCE

View file

@ -203,13 +203,14 @@ static void MoveCampCursor()
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 (item_num)
gCampActive = TRUE;
bChange = TRUE;
}
// Loop around gSelectedArms if needed
if (gSelectedArms < 0)
gSelectedArms = arms_num - 1;
@ -513,24 +514,24 @@ BOOL CheckArms(long a)
{
for (int i = 0; i < ARMS_MAX; ++i)
if (gArmsData[i].code == a)
return TRUE;
return TRUE; // Found
return FALSE;
return FALSE; // Not found
}
BOOL UseArmsEnergy(long num)
{
if (gArmsData[gSelectedArms].max_num == 0)
return TRUE;
return TRUE; // No ammo needed
if (gArmsData[gSelectedArms].num == 0)
return FALSE;
return FALSE; // No ammo left
gArmsData[gSelectedArms].num -= num;
if (gArmsData[gSelectedArms].num < 0)
gArmsData[gSelectedArms].num = 0;
return TRUE;
return TRUE; // Was able to spend ammo
}
BOOL ChargeArmsEnergy(long num)