Commented some func decls in ArmsItem.h and changed a "32" to "0x20" in the cpp

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2019-09-17 10:25:18 +02:00
parent 9bb916e99d
commit f2a2b3fd0c
No known key found for this signature in database
GPG key ID: 1E75F156884F3DCE
2 changed files with 29 additions and 7 deletions

View file

@ -569,6 +569,6 @@ int RotationArmsRev()
void ChangeToFirstArms() void ChangeToFirstArms()
{ {
gSelectedArms = 0; gSelectedArms = 0;
gArmsEnergyX = 32; gArmsEnergyX = 0x20;
PlaySoundObject(4, 1); PlaySoundObject(4, 1);
} }

View file

@ -28,10 +28,13 @@ struct ITEM
int code; int code;
}; };
// 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 0x20
/// X coordinate for the weapons energy
extern int gArmsEnergyX; extern int gArmsEnergyX;
extern int gSelectedArms; extern int gSelectedArms;
@ -40,40 +43,59 @@ extern int gSelectedItem;
extern ARMS gArmsData[ARMS_MAX]; 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)
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)
void ClearItemData(); void ClearItemData();
/// 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 already present /// 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 already present
BOOL AddArmsData(long code, long max_num); BOOL AddArmsData(long code, long max_num);
/// Remove code from the weapon array. Fails if code is not found. /// Remove code from the weapons. Fails if code is not found
BOOL SubArmsData(long code); BOOL SubArmsData(long code);
/// Replace code1 with code2, setting max_num as its max ammo. Fails if code1 is not found. /// Replace code1 with code2, setting max_num as its max ammo. Fails if code1 is not found
BOOL TradeArms(long code1, long code2, long max_num); BOOL TradeArms(long code1, long code2, long max_num);
/// Add code to the items. Fails if no space is left /// Add code to the items. Fails if no space is left
BOOL AddItemData(long code); BOOL AddItemData(long code);
/// Remove code from the item array. Fails if code is not found. /// Remove code from the items. Fails if code is not found
BOOL SubItemData(long code); BOOL SubItemData(long code);
/// Inventory loop. Returns mode. /// Inventory loop. Returns mode.
int CampLoop(); int CampLoop();
/// Search for a in the items. Returns whether a was found.
/// Search for a in the items. Returns whether a was found
BOOL CheckItem(long a); BOOL CheckItem(long a);
/// Search for a in the weapons. Returns whether a was found. /// Search for a in the weapons. Returns whether a was found
BOOL CheckArms(long a); BOOL CheckArms(long a);
/// Remove num ammo from the currently selected weapon. Returns whether there was any ammo left to fire.
/// Remove num ammo from the currently selected weapon. Returns whether there was any ammo left to fire
BOOL UseArmsEnergy(long num); BOOL UseArmsEnergy(long num);
/// Add num ammo to the currently selected weapon (capped at the maximum ammunition). Returns true
BOOL ChargeArmsEnergy(long num); BOOL ChargeArmsEnergy(long num);
/// Set every weapons ammunition to its maximum ammunition
void FullArmsEnergy(); void FullArmsEnergy();
// "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
int RotationArms(); int RotationArms();
/// Change the current weapon to the previous one in the rotation. Returns the ID of the newly selected weapon
int RotationArmsRev(); int RotationArmsRev();
/// Change the current weapon to be the first one and play the usual rotation animation
void ChangeToFirstArms(); void ChangeToFirstArms();