More-accurate ArmsItem.cpp variable arrangement
This commit is contained in:
parent
dbe773f01a
commit
e70074cf64
1 changed files with 11 additions and 8 deletions
|
@ -14,17 +14,18 @@
|
|||
#include "Sound.h"
|
||||
#include "TextScr.h"
|
||||
|
||||
int gArmsEnergyX = 16;
|
||||
ARMS gArmsData[ARMS_MAX];
|
||||
ITEM gItemData[ITEM_MAX];
|
||||
|
||||
int gSelectedArms;
|
||||
int gSelectedItem;
|
||||
|
||||
ARMS gArmsData[ARMS_MAX];
|
||||
ITEM gItemData[ITEM_MAX];
|
||||
static int gCampTitleY;
|
||||
|
||||
/// True if we're in the items section of the inventory (not in the weapons section) (only relevant when the inventory is open)
|
||||
static BOOL gCampActive;
|
||||
static int gCampTitleY;
|
||||
|
||||
int gArmsEnergyX = 16;
|
||||
|
||||
void ClearArmsData(void)
|
||||
{
|
||||
|
@ -175,6 +176,8 @@ BOOL SubItemData(long code)
|
|||
/// Update the inventory cursor
|
||||
void MoveCampCursor(void)
|
||||
{
|
||||
BOOL bChange;
|
||||
|
||||
// Compute the current amount of weapons and items
|
||||
int arms_num = 0;
|
||||
int item_num = 0;
|
||||
|
@ -187,7 +190,7 @@ void MoveCampCursor(void)
|
|||
return; // Empty inventory
|
||||
|
||||
// True if we're currently changing cursor position
|
||||
BOOL bChange = FALSE;
|
||||
bChange = FALSE;
|
||||
|
||||
if (!gCampActive)
|
||||
{
|
||||
|
@ -300,6 +303,8 @@ void MoveCampCursor(void)
|
|||
/// Draw the inventory
|
||||
void PutCampObject(void)
|
||||
{
|
||||
static unsigned int flash;
|
||||
|
||||
int i;
|
||||
|
||||
/// Rect for the current weapon
|
||||
|
@ -347,7 +352,6 @@ void PutCampObject(void)
|
|||
PutBitmap3(&rcView, (WINDOW_WIDTH / 2) - 112, gCampTitleY + 52, &rcTitle2, SURFACE_ID_TEXT_BOX);
|
||||
|
||||
// Draw arms cursor
|
||||
static unsigned int flash;
|
||||
++flash;
|
||||
|
||||
if (gCampActive == FALSE)
|
||||
|
@ -410,7 +414,6 @@ void PutCampObject(void)
|
|||
|
||||
int CampLoop(void)
|
||||
{
|
||||
int arms_num;
|
||||
char old_script_path[MAX_PATH];
|
||||
|
||||
RECT rcView = {0, 0, WINDOW_WIDTH, WINDOW_HEIGHT};
|
||||
|
@ -428,7 +431,7 @@ int CampLoop(void)
|
|||
gSelectedItem = 0;
|
||||
|
||||
// Compute current amount of weapons
|
||||
arms_num = 0;
|
||||
int arms_num = 0;
|
||||
while (gArmsData[arms_num].code != 0)
|
||||
++arms_num;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue