Change gArmsEnergyX stuff from hexadecimal to decimal. Also commented some more stuff.

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2019-09-24 09:30:44 +02:00
parent b2b9d8ab12
commit 6645b85139
No known key found for this signature in database
GPG key ID: 1E75F156884F3DCE
2 changed files with 13 additions and 6 deletions

View file

@ -14,7 +14,7 @@
#include "Sound.h"
#include "TextScr.h"
int gArmsEnergyX = 0x10;
int gArmsEnergyX = 16;
int gSelectedArms;
int gSelectedItem;
@ -31,7 +31,7 @@ void ClearArmsData()
#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)
#endif
gArmsEnergyX = 0x20;
gArmsEnergyX = 32;
memset(gArmsData, 0, sizeof(gArmsData));
}
@ -494,7 +494,7 @@ int CampLoop()
// Resume original script
LoadTextScript_Stage(old_script_path);
gArmsEnergyX = 0x20; // ?
gArmsEnergyX = 32; // Displays weapon rotation animation in case the weapon was changed
return 1; // Go to game
}
@ -579,7 +579,7 @@ int RotationArms()
if (gSelectedArms == arms_num)
gSelectedArms = 0;
gArmsEnergyX = 0x20;
gArmsEnergyX = 32;
PlaySoundObject(SND_SWITCH_WEAPON, 1);
return gArmsData[gSelectedArms].code;
@ -618,6 +618,6 @@ int RotationArmsRev()
void ChangeToFirstArms()
{
gSelectedArms = 0;
gArmsEnergyX = 0x20;
gArmsEnergyX = 32;
PlaySoundObject(SND_SWITCH_WEAPON, 1);
}

View file

@ -34,13 +34,20 @@ struct ITEM
#define ITEM_MAX 0x20
/// X coordinate for the weapons energy
/// X coordinate for the weapons HUD section. Set it to 32 for the forward weapon rotation "animation", 0 for the reverse weapon rotation "animation" and 16 to immobilise it
extern int gArmsEnergyX;
/// Currently selected weapon
extern int gSelectedArms;
// Currently selected item
extern int gSelectedItem;
/// Contains data for all the weapons the character currently has
extern ARMS gArmsData[ARMS_MAX];
/// Contains data for all the items the character currently has
extern ITEM gItemData[ITEM_MAX];