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:
meep-eep
2005-03-19 02:24:58 +00:00
parent 5189446bdc
commit 00eae82ad3
5 changed files with 34 additions and 26 deletions
+4 -5
View File
@@ -36,6 +36,10 @@ void DrawCargoStrings (BYTE OldElement, BYTE NewElement);
//End Added by Chris //End Added by Chris
static void TellMission (RESPONSE_REF R);
static void SellMinerals (RESPONSE_REF R);
static LOCDATA commander_desc = static LOCDATA commander_desc =
{ {
NULL_PTR, /* init_encounter_func */ NULL_PTR, /* init_encounter_func */
@@ -565,7 +569,6 @@ DefeatUrquan (RESPONSE_REF R)
#define HOW_ALLY_AGAINST_URQUAN (1 << 2) #define HOW_ALLY_AGAINST_URQUAN (1 << 2)
#define HOW_STRONG_AGAINST_URQUAN (1 << 3) #define HOW_STRONG_AGAINST_URQUAN (1 << 3)
static BYTE DefeatMask = 0; static BYTE DefeatMask = 0;
static void TellMission (RESPONSE_REF R);
if (PLAYER_SAID (R, how_defeat)) if (PLAYER_SAID (R, how_defeat))
{ {
@@ -1720,11 +1723,7 @@ NormalStarbase (RESPONSE_REF R)
} }
if (GLOBAL_SIS (TotalElementMass)) if (GLOBAL_SIS (TotalElementMass))
{
static void SellMinerals (RESPONSE_REF R);
Response (have_minerals, SellMinerals); Response (have_minerals, SellMinerals);
}
if (DiscussDevices (FALSE)) if (DiscussDevices (FALSE))
Response (new_devices, NormalStarbase); Response (new_devices, NormalStarbase);
if (CurBulletinMask) if (CurBulletinMask)
+6 -4
View File
@@ -44,9 +44,13 @@
#define MAX_NAME_CHARS 15 #define MAX_NAME_CHARS 15
#define SAVES_PER_PAGE 5 #define SAVES_PER_PAGE 5
static BOOLEAN DoSettings (PMENU_STATE pMS);
static BOOLEAN DoNaming (PMENU_STATE pMS);
static PMENU_STATE pLocMenuState; static PMENU_STATE pLocMenuState;
static BYTE prev_save; //keeps track of the last slot that was saved or loaded static BYTE prev_save; //keeps track of the last slot that was saved or loaded
void void
ConfirmSaveLoad (STAMP *MsgStamp) ConfirmSaveLoad (STAMP *MsgStamp)
{ {
@@ -175,7 +179,8 @@ FeedbackSetting (BYTE which_setting)
DrawStatusMessage (buf); DrawStatusMessage (buf);
UnlockMutex (GraphicsLock); UnlockMutex (GraphicsLock);
} }
static void
static void
FeedbackQuit (BYTE which_setting) FeedbackQuit (BYTE which_setting)
{ {
UNICODE buf[20]; UNICODE buf[20];
@@ -195,8 +200,6 @@ FeedbackQuit (BYTE which_setting)
UnlockMutex (GraphicsLock); UnlockMutex (GraphicsLock);
} }
static BOOLEAN DoSettings (PMENU_STATE pMS);
static BOOLEAN static BOOLEAN
DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, SIZE state) DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, SIZE state)
{ {
@@ -205,7 +208,6 @@ DrawDescriptionString (PMENU_STATE pMS, COUNT which_string, SIZE state)
TEXT lf; TEXT lf;
COLOR BackGround, ForeGround; COLOR BackGround, ForeGround;
FONT Font; FONT Font;
static BOOLEAN DoNaming (PMENU_STATE pMS);
LockMutex (GraphicsLock); LockMutex (GraphicsLock);
+1 -1
View File
@@ -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) if ((int)(ReadResFile (RDPtr, 1, num_read, fp)) != (int)num_read)
break; break;
} }
((BYTE *) RDPtr) += num_read; RDPtr = (RESOURCE_DATAPTR) ((BYTE *) RDPtr + num_read);
} while (length -= num_read); } while (length -= num_read);
UnlockResourceData (RData); UnlockResourceData (RData);
+22 -14
View File
@@ -45,7 +45,8 @@ ReleaseStringTable (STRING String)
{ {
STRING_TABLE StringTable; STRING_TABLE StringTable;
if ((StringTable = GetStringTable (String)) != 0) StringTable = GetStringTable (String);
if (StringTable != 0)
UnlockStringTable (StringTable); UnlockStringTable (StringTable);
return (StringTable); return (StringTable);
@@ -63,7 +64,8 @@ GetStringTableCount (STRING String)
COUNT StringCount; COUNT StringCount;
STRING_TABLE StringTable; STRING_TABLE StringTable;
if ((StringTable = GetStringTable (String)) == 0) StringTable = GetStringTable (String);
if (StringTable == 0)
StringCount = 0; StringCount = 0;
else else
{ {
@@ -88,7 +90,8 @@ SetAbsStringTableIndex (STRING String, COUNT StringTableIndex)
{ {
STRING_TABLE StringTable; STRING_TABLE StringTable;
if ((StringTable = GetStringTable (String)) == 0) StringTable = GetStringTable (String);
if (StringTable == 0)
String = 0; String = 0;
else else
{ {
@@ -109,7 +112,8 @@ SetRelStringTableIndex (STRING String, SIZE StringTableOffs)
{ {
STRING_TABLE StringTable; STRING_TABLE StringTable;
if ((StringTable = GetStringTable (String)) == 0) StringTable = GetStringTable (String);
if (StringTable == 0)
String = 0; String = 0;
else else
{ {
@@ -135,7 +139,8 @@ GetStringLength (STRING String)
COUNT StringLength; COUNT StringLength;
STRING_TABLE StringTable; STRING_TABLE StringTable;
if ((StringTable = GetStringTable (String)) == 0) StringTable = GetStringTable (String);
if (StringTable == 0)
StringLength = 0; StringLength = 0;
else else
{ {
@@ -173,7 +178,8 @@ GetStringSoundClip (STRING String)
STRINGPTR StringAddr; STRINGPTR StringAddr;
STRING_TABLE StringTable; STRING_TABLE StringTable;
if ((StringTable = GetStringTable (String)) == 0) StringTable = GetStringTable (String);
if (StringTable == 0)
StringAddr = 0; StringAddr = 0;
else else
{ {
@@ -189,8 +195,8 @@ GetStringSoundClip (STRING String)
StringAddr = 0; StringAddr = 0;
else else
{ {
StringAddr = (STRINGPTR)StringTablePtr; StringAddr = (STRINGPTR) ((BYTE *) StringTablePtr +
((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex]; StringTablePtr->StringOffsets[StringIndex]);
} }
UnlockStringTable (StringTable); UnlockStringTable (StringTable);
} }
@@ -204,7 +210,8 @@ GetStringTimeStamp (STRING String)
STRINGPTR StringAddr; STRINGPTR StringAddr;
STRING_TABLE StringTable; STRING_TABLE StringTable;
if ((StringTable = GetStringTable (String)) == 0) StringTable = GetStringTable (String);
if (StringTable == 0)
StringAddr = 0; StringAddr = 0;
else else
{ {
@@ -222,8 +229,8 @@ GetStringTimeStamp (STRING String)
StringAddr = 0; StringAddr = 0;
else else
{ {
StringAddr = (STRINGPTR)StringTablePtr; StringAddr = (STRINGPTR) ((BYTE *) StringTablePtr +
((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex]; StringTablePtr->StringOffsets[StringIndex]);
} }
UnlockStringTable (StringTable); UnlockStringTable (StringTable);
} }
@@ -237,7 +244,8 @@ GetStringAddress (STRING String)
STRINGPTR StringAddr; STRINGPTR StringAddr;
STRING_TABLE StringTable; STRING_TABLE StringTable;
if ((StringTable = GetStringTable (String)) == 0) StringTable = GetStringTable (String);
if (StringTable == 0)
StringAddr = 0; StringAddr = 0;
else else
{ {
@@ -246,8 +254,8 @@ GetStringAddress (STRING String)
StringIndex = STRING_INDEX (String); StringIndex = STRING_INDEX (String);
LockStringTable (StringTable, &StringTablePtr); LockStringTable (StringTable, &StringTablePtr);
StringAddr = (STRINGPTR)StringTablePtr; StringAddr = (STRINGPTR) ((BYTE *) StringTablePtr +
((BYTE *) StringAddr) += StringTablePtr->StringOffsets[StringIndex]; StringTablePtr->StringOffsets[StringIndex]);
UnlockStringTable (StringTable); UnlockStringTable (StringTable);
} }
+1 -2
View File
@@ -51,6 +51,7 @@
void ConfirmSaveLoad (STAMP *MsgStamp); void ConfirmSaveLoad (STAMP *MsgStamp);
//End Added by Chris //End Added by Chris
static void DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE NewStarShip);
static int flash_selection_func (void *data); static int flash_selection_func (void *data);
@@ -244,8 +245,6 @@ DrawPickFrame (PMELEE_STATE pMS)
{ {
FRAME F; FRAME F;
RECT r, r0, r1, ship_r; RECT r, r0, r1, ship_r;
static void DrawMeleeShipStrings (PMELEE_STATE pMS, BYTE
NewStarShip);
GetShipBox (&r0, 0, 0, 0), GetShipBox (&r0, 0, 0, 0),
GetShipBox (&r1, 1, NUM_MELEE_ROWS - 1, NUM_MELEE_COLUMNS - 1), GetShipBox (&r1, 1, NUM_MELEE_ROWS - 1, NUM_MELEE_COLUMNS - 1),