Some cleanups, enabling successful build on GCC 4.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1595 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -36,6 +36,10 @@ void DrawCargoStrings (BYTE OldElement, BYTE NewElement);
|
||||
|
||||
//End Added by Chris
|
||||
|
||||
static void TellMission (RESPONSE_REF R);
|
||||
static void SellMinerals (RESPONSE_REF R);
|
||||
|
||||
|
||||
static LOCDATA commander_desc =
|
||||
{
|
||||
NULL_PTR, /* init_encounter_func */
|
||||
@@ -565,7 +569,6 @@ DefeatUrquan (RESPONSE_REF R)
|
||||
#define HOW_ALLY_AGAINST_URQUAN (1 << 2)
|
||||
#define HOW_STRONG_AGAINST_URQUAN (1 << 3)
|
||||
static BYTE DefeatMask = 0;
|
||||
static void TellMission (RESPONSE_REF R);
|
||||
|
||||
if (PLAYER_SAID (R, how_defeat))
|
||||
{
|
||||
@@ -1720,11 +1723,7 @@ NormalStarbase (RESPONSE_REF R)
|
||||
}
|
||||
|
||||
if (GLOBAL_SIS (TotalElementMass))
|
||||
{
|
||||
static void SellMinerals (RESPONSE_REF R);
|
||||
|
||||
Response (have_minerals, SellMinerals);
|
||||
}
|
||||
if (DiscussDevices (FALSE))
|
||||
Response (new_devices, NormalStarbase);
|
||||
if (CurBulletinMask)
|
||||
|
||||
@@ -44,9 +44,13 @@
|
||||
#define MAX_NAME_CHARS 15
|
||||
#define SAVES_PER_PAGE 5
|
||||
|
||||
static BOOLEAN DoSettings (PMENU_STATE pMS);
|
||||
static BOOLEAN DoNaming (PMENU_STATE pMS);
|
||||
|
||||
static PMENU_STATE pLocMenuState;
|
||||
static BYTE prev_save; //keeps track of the last slot that was saved or loaded
|
||||
|
||||
|
||||
void
|
||||
ConfirmSaveLoad (STAMP *MsgStamp)
|
||||
{
|
||||
@@ -175,6 +179,7 @@ FeedbackSetting (BYTE which_setting)
|
||||
DrawStatusMessage (buf);
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
|
||||
static void
|
||||
FeedbackQuit (BYTE which_setting)
|
||||
{
|
||||
@@ -195,8 +200,6 @@ FeedbackQuit (BYTE which_setting)
|
||||
UnlockMutex (GraphicsLock);
|
||||
}
|
||||
|
||||
static BOOLEAN DoSettings (PMENU_STATE pMS);
|
||||
|
||||
static BOOLEAN
|
||||
DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, SIZE state)
|
||||
{
|
||||
@@ -205,7 +208,6 @@ DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, SIZE state)
|
||||
TEXT lf;
|
||||
COLOR BackGround, ForeGround;
|
||||
FONT Font;
|
||||
static BOOLEAN DoNaming (PMENU_STATE pMS);
|
||||
|
||||
LockMutex (GraphicsLock);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ GetResourceData (uio_Stream *fp, DWORD length, MEM_FLAGS mem_flags)
|
||||
if ((int)(ReadResFile (RDPtr, 1, num_read, fp)) != (int)num_read)
|
||||
break;
|
||||
}
|
||||
((BYTE *) RDPtr) += num_read;
|
||||
RDPtr = (RESOURCE_DATAPTR) ((BYTE *) RDPtr + num_read);
|
||||
} while (length -= num_read);
|
||||
|
||||
UnlockResourceData (RData);
|
||||
|
||||
@@ -45,7 +45,8 @@ ReleaseStringTable (STRING String)
|
||||
{
|
||||
STRING_TABLE StringTable;
|
||||
|
||||
if ((StringTable = GetStringTable (String)) != 0)
|
||||
StringTable = GetStringTable (String);
|
||||
if (StringTable != 0)
|
||||
UnlockStringTable (StringTable);
|
||||
|
||||
return (StringTable);
|
||||
@@ -63,7 +64,8 @@ GetStringTableCount (STRING String)
|
||||
COUNT StringCount;
|
||||
STRING_TABLE StringTable;
|
||||
|
||||
if ((StringTable = GetStringTable (String)) == 0)
|
||||
StringTable = GetStringTable (String);
|
||||
if (StringTable == 0)
|
||||
StringCount = 0;
|
||||
else
|
||||
{
|
||||
@@ -88,7 +90,8 @@ SetAbsStringTableIndex (STRING String, COUNT StringTableIndex)
|
||||
{
|
||||
STRING_TABLE StringTable;
|
||||
|
||||
if ((StringTable = GetStringTable (String)) == 0)
|
||||
StringTable = GetStringTable (String);
|
||||
if (StringTable == 0)
|
||||
String = 0;
|
||||
else
|
||||
{
|
||||
@@ -109,7 +112,8 @@ SetRelStringTableIndex (STRING String, SIZE StringTableOffs)
|
||||
{
|
||||
STRING_TABLE StringTable;
|
||||
|
||||
if ((StringTable = GetStringTable (String)) == 0)
|
||||
StringTable = GetStringTable (String);
|
||||
if (StringTable == 0)
|
||||
String = 0;
|
||||
else
|
||||
{
|
||||
@@ -135,7 +139,8 @@ GetStringLength (STRING String)
|
||||
COUNT StringLength;
|
||||
STRING_TABLE StringTable;
|
||||
|
||||
if ((StringTable = GetStringTable (String)) == 0)
|
||||
StringTable = GetStringTable (String);
|
||||
if (StringTable == 0)
|
||||
StringLength = 0;
|
||||
else
|
||||
{
|
||||
@@ -173,7 +178,8 @@ GetStringSoundClip (STRING String)
|
||||
STRINGPTR StringAddr;
|
||||
STRING_TABLE StringTable;
|
||||
|
||||
if ((StringTable = GetStringTable (String)) == 0)
|
||||
StringTable = GetStringTable (String);
|
||||
if (StringTable == 0)
|
||||
StringAddr = 0;
|
||||
else
|
||||
{
|
||||
@@ -189,8 +195,8 @@ GetStringSoundClip (STRING String)
|
||||
StringAddr = 0;
|
||||
else
|
||||
{
|
||||
StringAddr = (STRINGPTR)StringTablePtr;
|
||||
((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex];
|
||||
StringAddr = (STRINGPTR) ((BYTE *) StringTablePtr +
|
||||
StringTablePtr->StringOffsets[StringIndex]);
|
||||
}
|
||||
UnlockStringTable (StringTable);
|
||||
}
|
||||
@@ -204,7 +210,8 @@ GetStringTimeStamp (STRING String)
|
||||
STRINGPTR StringAddr;
|
||||
STRING_TABLE StringTable;
|
||||
|
||||
if ((StringTable = GetStringTable (String)) == 0)
|
||||
StringTable = GetStringTable (String);
|
||||
if (StringTable == 0)
|
||||
StringAddr = 0;
|
||||
else
|
||||
{
|
||||
@@ -222,8 +229,8 @@ GetStringTimeStamp (STRING String)
|
||||
StringAddr = 0;
|
||||
else
|
||||
{
|
||||
StringAddr = (STRINGPTR)StringTablePtr;
|
||||
((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex];
|
||||
StringAddr = (STRINGPTR) ((BYTE *) StringTablePtr +
|
||||
StringTablePtr->StringOffsets[StringIndex]);
|
||||
}
|
||||
UnlockStringTable (StringTable);
|
||||
}
|
||||
@@ -237,7 +244,8 @@ GetStringAddress (STRING String)
|
||||
STRINGPTR StringAddr;
|
||||
STRING_TABLE StringTable;
|
||||
|
||||
if ((StringTable = GetStringTable (String)) == 0)
|
||||
StringTable = GetStringTable (String);
|
||||
if (StringTable == 0)
|
||||
StringAddr = 0;
|
||||
else
|
||||
{
|
||||
@@ -246,8 +254,8 @@ GetStringAddress (STRING String)
|
||||
|
||||
StringIndex = STRING_INDEX (String);
|
||||
LockStringTable (StringTable, &StringTablePtr);
|
||||
StringAddr = (STRINGPTR)StringTablePtr;
|
||||
((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex];
|
||||
StringAddr = (STRINGPTR) ((BYTE *) StringTablePtr +
|
||||
StringTablePtr->StringOffsets[StringIndex]);
|
||||
UnlockStringTable (StringTable);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
void ConfirmSaveLoad (STAMP *MsgStamp);
|
||||
|
||||
//End Added by Chris
|
||||
static void DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE NewStarShip);
|
||||
|
||||
|
||||
static int flash_selection_func (void *data);
|
||||
@@ -244,8 +245,6 @@ DrawPickFrame (PMELEE_STATE pMS)
|
||||
{
|
||||
FRAME F;
|
||||
RECT r, r0, r1, ship_r;
|
||||
static void DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE
|
||||
NewStarShip);
|
||||
|
||||
GetShipBox (&r0, 0, 0, 0),
|
||||
GetShipBox (&r1, 1, NUM_MELEE_ROWS - 1, NUM_MELEE_COLUMNS - 1),
|
||||
|
||||
Reference in New Issue
Block a user