Code-cleanup:

- make a lot of functions static
- remove unused extern declarations
- fix one function declarations () -> (void)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1254 4a71c877-e1ca-e34f-864e-861f7616d084
master
Stefan Huehner 2007-03-16 20:23:35 +00:00
parent 57674e3545
commit 59843ec8a2
19 changed files with 137 additions and 139 deletions

View File

@ -344,7 +344,7 @@ typedef struct {
static NET_PLAYER_DATA local_player_data[MAX_CONNECTED_PLAYERS] = { { 0, NULL, 0 } };
static NET_PLAYER_DATA global_player_data[MAX_CONNECTED_PLAYERS] = { { 0, NULL, 0 } };
void resize_local_player_data(unsigned int i, unsigned int size) {
static void resize_local_player_data(unsigned int i, unsigned int size) {
if (local_player_data[i].buffer_size < size) {
if (local_player_data[i].data != NULL) {
free(local_player_data[i].data);
@ -354,7 +354,7 @@ void resize_local_player_data(unsigned int i, unsigned int size) {
}
}
void resize_global_player_data(unsigned int i, unsigned int size) {
static void resize_global_player_data(unsigned int i, unsigned int size) {
if (global_player_data[i].buffer_size < size) {
if (global_player_data[i].data != NULL) {
free(global_player_data[i].data);

View File

@ -65,7 +65,7 @@ BOOL clIntroVideo;
BOOL bAllowDebugMode = FALSE;
//! Print usage info
void printUsage(void)
static void printUsage(void)
{
fprintf( stdout,
"Usage:\n"
@ -76,7 +76,7 @@ void printUsage(void)
}
//! Print help and usage info
void printHelp(void)
static void printHelp(void)
{
// Show help
fprintf( stdout,

View File

@ -232,7 +232,7 @@ static BOOL widgGetScreenExtents(UDWORD ID,int *sx,int *sy,int *sw,int *sh)
// Given a widget form id, make the snap that matches it the current one next frame.
//
void SetCurrentSnapFormID(CURSORSNAP *SnapBuffer,UDWORD FormID)
static void SetCurrentSnapFormID(CURSORSNAP *SnapBuffer,UDWORD FormID)
{
{
int x,y,w,h;

View File

@ -80,7 +80,7 @@ extern char aCurrResDir[255]; // Arse
UDWORD cheatHash[CHEAT_MAXCHEAT];
void dataISpriteRelease(void *pData);
static void dataISpriteRelease(void *pData);
extern int scr_lineno;
@ -124,7 +124,7 @@ void dataClearSaveFlag(void)
/* Load the body stats */
BOOL bufferSBODYLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSBODYLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SBODY);
if (!loadBodyStats(pBuffer, size))
@ -142,7 +142,7 @@ BOOL bufferSBODYLoad(char *pBuffer, UDWORD size, void **ppData)
return TRUE;
}
void dataReleaseStats(void *pData)
static void dataReleaseStats(void *pData)
{
freeComponentLists();
statsShutDown();
@ -150,7 +150,7 @@ void dataReleaseStats(void *pData)
/* Load the weapon stats */
BOOL bufferSWEAPONLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSWEAPONLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size, CHEAT_SWEAPON);
if (!loadWeaponStats(pBuffer, size))
@ -169,7 +169,7 @@ BOOL bufferSWEAPONLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the constructor stats */
BOOL bufferSCONSTRLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSCONSTRLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SCONSTR);
if (!loadConstructStats(pBuffer, size))
@ -188,7 +188,7 @@ BOOL bufferSCONSTRLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the ECM stats */
BOOL bufferSECMLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSECMLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SECM);
@ -208,7 +208,7 @@ BOOL bufferSECMLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Propulsion stats */
BOOL bufferSPROPLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSPROPLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SPROP);
@ -228,7 +228,7 @@ BOOL bufferSPROPLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Sensor stats */
BOOL bufferSSENSORLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSSENSORLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SSENSOR);
@ -248,7 +248,7 @@ BOOL bufferSSENSORLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Repair stats */
BOOL bufferSREPAIRLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSREPAIRLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SREPAIR);
@ -268,7 +268,7 @@ BOOL bufferSREPAIRLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Brain stats */
BOOL bufferSBRAINLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSBRAINLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SBRAIN);
@ -288,7 +288,7 @@ BOOL bufferSBRAINLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the PropulsionType stats */
BOOL bufferSPROPTYPESLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSPROPTYPESLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SPROPTY);
@ -304,7 +304,7 @@ BOOL bufferSPROPTYPESLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the propulsion type sound stats */
BOOL bufferSPROPSNDLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSPROPSNDLoad(char *pBuffer, UDWORD size, void **ppData)
{
if (!loadPropulsionSounds(pBuffer, size))
{
@ -317,7 +317,7 @@ BOOL bufferSPROPSNDLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the SSPECABIL stats */
BOOL bufferSSPECABILLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSSPECABILLoad(char *pBuffer, UDWORD size, void **ppData)
{
if (!loadSpecialAbility(pBuffer, size))
{
@ -331,7 +331,7 @@ BOOL bufferSSPECABILLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the STERRTABLE stats */
BOOL bufferSTERRTABLELoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSTERRTABLELoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_STERRT);
@ -347,7 +347,7 @@ BOOL bufferSTERRTABLELoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the body/propulsion IMDs stats */
BOOL bufferSBPIMDLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSBPIMDLoad(char *pBuffer, UDWORD size, void **ppData)
{
if (!loadBodyPropulsionIMDs(pBuffer, size))
{
@ -361,7 +361,7 @@ BOOL bufferSBPIMDLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the weapon sound stats */
BOOL bufferSWEAPSNDLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSWEAPSNDLoad(char *pBuffer, UDWORD size, void **ppData)
{
if (!loadWeaponSounds(pBuffer, size))
{
@ -375,7 +375,7 @@ BOOL bufferSWEAPSNDLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Weapon Effect modifier stats */
BOOL bufferSWEAPMODLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSWEAPMODLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SWEAPMOD);
@ -392,7 +392,7 @@ BOOL bufferSWEAPMODLoad(char *pBuffer, UDWORD size, void **ppData)
/* Load the Template stats */
BOOL bufferSTEMPLLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSTEMPLLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_STEMP);
@ -408,14 +408,14 @@ BOOL bufferSTEMPLLoad(char *pBuffer, UDWORD size, void **ppData)
}
// release the templates
void dataSTEMPLRelease(void *pData)
static void dataSTEMPLRelease(void *pData)
{
//free the storage allocated to the droid templates
droidTemplateShutDown();
}
/* Load the Template weapons stats */
BOOL bufferSTEMPWEAPLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSTEMPWEAPLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_STEMPWEAP);
@ -431,7 +431,7 @@ BOOL bufferSTEMPWEAPLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Structure stats */
BOOL bufferSSTRUCTLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSSTRUCTLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SSTRUCT);
@ -451,14 +451,14 @@ BOOL bufferSSTRUCTLoad(char *pBuffer, UDWORD size, void **ppData)
}
// release the structure stats
void dataSSTRUCTRelease(void *pData)
static void dataSSTRUCTRelease(void *pData)
{
freeStructureLists();
structureStatsShutDown();
}
/* Load the Structure Weapons stats */
BOOL bufferSSTRWEAPLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSSTRWEAPLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SSTRWEAP);
@ -474,7 +474,7 @@ BOOL bufferSSTRWEAPLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Structure Functions stats */
BOOL bufferSSTRFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSSTRFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_STRFUNC);
@ -490,7 +490,7 @@ BOOL bufferSSTRFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Structure strength modifier stats */
BOOL bufferSSTRMODLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSSTRMODLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SSTRMOD);
@ -505,7 +505,7 @@ BOOL bufferSSTRMODLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the Feature stats */
BOOL bufferSFEATLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSFEATLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SFEAT);
@ -522,13 +522,13 @@ BOOL bufferSFEATLoad(char *pBuffer, UDWORD size, void **ppData)
}
// free the feature stats
void dataSFEATRelease(void *pData)
static void dataSFEATRelease(void *pData)
{
featureStatsShutDown();
}
/* Load the Functions stats */
BOOL bufferSFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_SFUNC);
@ -546,20 +546,20 @@ BOOL bufferSFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
}
// release the function stats
void dataSFUNCRelease(void *pData)
static void dataSFUNCRelease(void *pData)
{
FunctionShutDown();
}
// release the research stats
void dataRESCHRelease(void *pData)
static void dataRESCHRelease(void *pData)
{
//free the storage allocated to the stats
ResearchShutDown();
}
/* Load the Research stats */
BOOL bufferRESCHLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferRESCHLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_RESCH);
@ -585,7 +585,7 @@ BOOL bufferRESCHLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the research pre-requisites */
BOOL bufferRPREREQLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferRPREREQLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_RPREREQ);
@ -600,7 +600,7 @@ BOOL bufferRPREREQLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the research components made redundant */
BOOL bufferRCOMPREDLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferRCOMPREDLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_RCOMPRED);
@ -616,7 +616,7 @@ BOOL bufferRCOMPREDLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the research component results */
BOOL bufferRCOMPRESLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferRCOMPRESLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_RCOMPRES);
@ -633,7 +633,7 @@ BOOL bufferRCOMPRESLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the research structures required */
BOOL bufferRSTRREQLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferRSTRREQLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_RSTRREQ);
@ -650,7 +650,7 @@ BOOL bufferRSTRREQLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the research structures made redundant */
BOOL bufferRSTRREDLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferRSTRREDLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_RSTRRED);
@ -665,7 +665,7 @@ BOOL bufferRSTRREDLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the research structure results */
BOOL bufferRSTRRESLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferRSTRRESLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_RSTRRES);
@ -681,7 +681,7 @@ BOOL bufferRSTRRESLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the research functions */
BOOL bufferRFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferRFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
{
calcCheatHash(pBuffer,size,CHEAT_RFUNC);
@ -698,7 +698,7 @@ BOOL bufferRFUNCLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Load the message viewdata */
BOOL bufferSMSGLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferSMSGLoad(char *pBuffer, UDWORD size, void **ppData)
{
VIEWDATA *pViewData;
@ -716,13 +716,13 @@ BOOL bufferSMSGLoad(char *pBuffer, UDWORD size, void **ppData)
// release the message viewdata
void dataSMSGRelease(void *pData)
static void dataSMSGRelease(void *pData)
{
viewDataShutDown((VIEWDATA *)pData);
}
/* Load an imd */
BOOL dataIMDBufferLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataIMDBufferLoad(char *pBuffer, UDWORD size, void **ppData)
{
iIMDShape *psIMD;
char *pBufferPosition = pBuffer;
@ -765,7 +765,7 @@ void dataIMGPAGERelease(void *pData)
}
// Tertiles loader. This version for hardware renderer.
BOOL dataHWTERTILESLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataHWTERTILESLoad(char *pBuffer, UDWORD size, void **ppData)
{
// tile loader.
if (bTilesPCXLoaded)
@ -810,7 +810,7 @@ BOOL dataHWTERTILESLoad(char *pBuffer, UDWORD size, void **ppData)
return TRUE;
}
void dataHWTERTILESRelease(void *pData)
static void dataHWTERTILESRelease(void *pData)
{
iTexture *psSprite = (iTexture*) pData;
@ -826,7 +826,7 @@ void dataHWTERTILESRelease(void *pData)
}
BOOL dataIMGLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataIMGLoad(char *pBuffer, UDWORD size, void **ppData)
{
IMAGEFILE *ImageFile;
@ -841,14 +841,14 @@ BOOL dataIMGLoad(char *pBuffer, UDWORD size, void **ppData)
}
void dataIMGRelease(void *pData)
static void dataIMGRelease(void *pData)
{
iV_FreeImageFile((IMAGEFILE*)pData);
}
/* Load a texturepage into memory */
BOOL bufferTexPageLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL bufferTexPageLoad(char *pBuffer, UDWORD size, void **ppData)
{
char texfile[255];
char texpage[255];
@ -932,7 +932,7 @@ BOOL bufferTexPageLoad(char *pBuffer, UDWORD size, void **ppData)
}
/* Release an iSprite */
void dataISpriteRelease(void *pData)
static void dataISpriteRelease(void *pData)
{
iTexture *psSprite = (iTexture*) pData;
@ -950,7 +950,7 @@ void dataISpriteRelease(void *pData)
/* Release a texPage */
void dataTexPageRelease(void *pData)
static void dataTexPageRelease(void *pData)
{
TEXTUREPAGE *Tpage = (TEXTUREPAGE *) pData;
@ -969,7 +969,7 @@ void dataTexPageRelease(void *pData)
/* Load an audio file */
BOOL dataAudioLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataAudioLoad(char *pBuffer, UDWORD size, void **ppData)
{
if ( audio_Disabled() == TRUE )
{
@ -983,7 +983,7 @@ BOOL dataAudioLoad(char *pBuffer, UDWORD size, void **ppData)
return *ppData != NULL;
}
void dataAudioRelease( void *pData )
static void dataAudioRelease( void *pData )
{
TRACK *psTrack = (TRACK *) pData;
@ -995,7 +995,7 @@ void dataAudioRelease( void *pData )
/* Load an audio file */
BOOL dataAudioCfgLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataAudioCfgLoad(char *pBuffer, UDWORD size, void **ppData)
{
*ppData = NULL;
@ -1012,7 +1012,7 @@ BOOL dataAudioCfgLoad(char *pBuffer, UDWORD size, void **ppData)
/* Load an anim file */
BOOL dataAnimLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataAnimLoad(char *pBuffer, UDWORD size, void **ppData)
{
BASEANIM *psAnim;
@ -1031,7 +1031,7 @@ BOOL dataAnimLoad(char *pBuffer, UDWORD size, void **ppData)
/* Load an audio config file */
BOOL dataAnimCfgLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataAnimCfgLoad(char *pBuffer, UDWORD size, void **ppData)
{
*ppData = NULL;
if ( ParseResourceFile( pBuffer, size ) == FALSE )
@ -1043,13 +1043,13 @@ BOOL dataAnimCfgLoad(char *pBuffer, UDWORD size, void **ppData)
}
void dataAnimRelease( void *pData )
static void dataAnimRelease( void *pData )
{
anim_ReleaseAnim((BASEANIM*)pData);
}
/* Load a string resource file */
BOOL dataStrResLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataStrResLoad(char *pBuffer, UDWORD size, void **ppData)
{
// recreate the string resource if it was freed by a WRF release
if (psStringRes == NULL)
@ -1069,7 +1069,7 @@ BOOL dataStrResLoad(char *pBuffer, UDWORD size, void **ppData)
return TRUE;
}
void dataStrResRelease(void *pData)
static void dataStrResRelease(void *pData)
{
if (psStringRes != NULL)
{
@ -1081,7 +1081,7 @@ void dataStrResRelease(void *pData)
/* Load a script file */
// All scripts, binary or otherwise are now passed through this routine
BOOL dataScriptLoad(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataScriptLoad(char *pBuffer, UDWORD size, void **ppData)
{
SCRIPT_CODE *psProg=NULL;
BLOCK_HEAP *psHeap;
@ -1114,7 +1114,7 @@ BOOL dataScriptLoad(char *pBuffer, UDWORD size, void **ppData)
}
// Load a script variable values file
BOOL dataScriptLoadVals(char *pBuffer, UDWORD size, void **ppData)
static BOOL dataScriptLoadVals(char *pBuffer, UDWORD size, void **ppData)
{
*ppData = NULL;
@ -1138,7 +1138,7 @@ BOOL dataScriptLoadVals(char *pBuffer, UDWORD size, void **ppData)
return TRUE;
}
BOOL dataSaveGameLoad(char *pFile, void **ppData)
static BOOL dataSaveGameLoad(char *pFile, void **ppData)
{
if (!stageTwoInitialise())
{

View File

@ -1543,7 +1543,7 @@ intChooseSystemStats( DROID_TEMPLATE *psTemplate )
/* set SHOWTEMPLATENAME to 0 to show template components in edit box */
#define SHOWTEMPLATENAME 0
char *GetDefaultTemplateName(DROID_TEMPLATE *psTemplate)
static char *GetDefaultTemplateName(DROID_TEMPLATE *psTemplate)
{
COMP_BASE_STATS *psStats;
char *pStr;
@ -4092,7 +4092,7 @@ static BOOL intValidTemplate(DROID_TEMPLATE *psTempl)
// ajl. above function is static. A quick wrapper for the net stuff
BOOL MultiPlayValidTemplate(DROID_TEMPLATE *psTempl)
static BOOL MultiPlayValidTemplate(DROID_TEMPLATE *psTempl)
{
return(intValidTemplate(psTempl) );
}

View File

@ -4435,7 +4435,7 @@ void locateMouse(void)
}
// Render a skybox
void renderSky()
void renderSky(void)
{
static float wind = 0;

View File

@ -271,14 +271,14 @@ BOOL StartDriverMode(DROID *psOldDroid)
return FALSE;
}
void StopEngineNoise(void)
static void StopEngineNoise(void)
{
DrivingAudioTrack=-1;
}
void ChangeDriver(void)
static void ChangeDriver(void)
{
DROID *psDroid;
@ -421,7 +421,7 @@ BOOL driveDroidKilled(DROID *psDroid)
BOOL driveDroidIsBusy(DROID *psDroid)
static BOOL driveDroidIsBusy(DROID *psDroid)
{
if( DroidIsBuilding(psDroid) ||
DroidGoingToBuild(psDroid) ||
@ -789,7 +789,7 @@ void driveDisableInterface(void)
// Get rid of the reticule.
//
void driveDisableInterface2(void)
static void driveDisableInterface2(void)
{
DriveInterfaceEnabled = FALSE;
@ -837,7 +837,7 @@ void driveStartBuild(void)
}
void driveStartDemolish(void)
static void driveStartDemolish(void)
{
intRemoveReticule();
@ -848,7 +848,7 @@ void driveStartDemolish(void)
// Stop structure placement for drive mode.
//
void driveStopBuild(void)
static void driveStopBuild(void)
{
}

View File

@ -1046,7 +1046,7 @@ BOOL droidRemove(DROID *psDroid, DROID *pList[MAX_PLAYERS])
return TRUE;
}
void droidFlameFallCallback( ANIM_OBJECT * psObj )
static void droidFlameFallCallback( ANIM_OBJECT * psObj )
{
DROID *psDroid;
@ -1061,7 +1061,7 @@ void droidFlameFallCallback( ANIM_OBJECT * psObj )
destroyDroid( psDroid );
}
void droidBurntCallback( ANIM_OBJECT * psObj )
static void droidBurntCallback( ANIM_OBJECT * psObj )
{
DROID *psDroid;

View File

@ -393,7 +393,7 @@ static SDWORD clearX,clearY;
static BOOL obstruction;
// callback to find the first clear tile before an obstructed target
BOOL fpathEndPointCallback(SDWORD x, SDWORD y, SDWORD dist)
static BOOL fpathEndPointCallback(SDWORD x, SDWORD y, SDWORD dist)
{
SDWORD vx,vy;

View File

@ -11565,7 +11565,7 @@ UDWORD getSaveGameType(void)
}
// -----------------------------------------------------------------------------------------
SDWORD getCompFromNamePreV7(UDWORD compType, char *pName)
static SDWORD getCompFromNamePreV7(UDWORD compType, char *pName)
{
#ifndef RESOURCE_NAMES
@ -11660,7 +11660,7 @@ SDWORD getCompFromNamePreV7(UDWORD compType, char *pName)
}
// -----------------------------------------------------------------------------------------
SDWORD getStatFromNamePreV7(BOOL isFeature, char *pName)
static SDWORD getStatFromNamePreV7(BOOL isFeature, char *pName)
{
#ifndef RESOURCE_NAMES

View File

@ -2416,7 +2416,7 @@ SDWORD GetObjectBuffer(void)
return -1;
}
SDWORD GetTopicBuffer(void)
static SDWORD GetTopicBuffer(void)
{
SDWORD i;

View File

@ -333,7 +333,7 @@ BOOL mapNew(UDWORD width, UDWORD height)
}
/* load the map data - for version 1 */
BOOL mapLoadV1(char *pFileData, UDWORD fileSize)
static BOOL mapLoadV1(char *pFileData, UDWORD fileSize)
{
UDWORD i,j;
MAP_SAVETILEV1 *psTileData;
@ -383,7 +383,7 @@ BOOL mapLoadV1(char *pFileData, UDWORD fileSize)
}
/* load the map data - for version 1 */
BOOL mapLoadV2(char *pFileData, UDWORD fileSize)
static BOOL mapLoadV2(char *pFileData, UDWORD fileSize)
{
UDWORD i,j;
MAP_SAVETILEV2 *psTileData;
@ -431,7 +431,7 @@ BOOL mapLoadV2(char *pFileData, UDWORD fileSize)
/* load the map data - for version 3 */
BOOL mapLoadV3(char *pFileData, UDWORD fileSize)
static BOOL mapLoadV3(char *pFileData, UDWORD fileSize)
{
UDWORD i,j;
MAP_SAVETILEV2 *psTileData;

View File

@ -159,7 +159,7 @@ extern UDWORD selectedPlayer;
} \
}
void add_msg(MESSAGE *list[MAX_PLAYERS], MESSAGE *msg, UDWORD player)
static void add_msg(MESSAGE *list[MAX_PLAYERS], MESSAGE *msg, UDWORD player)
{
ASSERT( PTRVALID((msg), sizeof(MESSAGE)),
"addMessage: Invalid message pointer" );
@ -534,7 +534,7 @@ BOOL initMessage(void)
return TRUE;
}
BOOL addToViewDataList(VIEWDATA *psViewData, UBYTE numData)
static BOOL addToViewDataList(VIEWDATA *psViewData, UBYTE numData)
{
VIEWDATA_LIST *psAdd;

View File

@ -372,7 +372,7 @@ void moveUpdateBaseSpeed(void)
/* Set a target location for a droid to move to */
// Now returns a BOOL based on the success of the routing
// returns TRUE if the routing was successful ... if FALSE then the calling code should not try to route here again for a while
BOOL _moveDroidToBase(DROID *psDroid, UDWORD x, UDWORD y, BOOL bFormation)
static BOOL _moveDroidToBase(DROID *psDroid, UDWORD x, UDWORD y, BOOL bFormation)
{
FPATH_RETVAL retVal = FPR_OK;
SDWORD fmx1,fmy1, fmx2,fmy2;
@ -546,7 +546,7 @@ BOOL _moveDroidToBase(DROID *psDroid, UDWORD x, UDWORD y, BOOL bFormation)
// Shame about this but the find path code uses too much stack space
// so we can't safely run it in the dcache.
//
BOOL moveDroidToBase(DROID *psDroid, UDWORD x, UDWORD y, BOOL bFormation)
static BOOL moveDroidToBase(DROID *psDroid, UDWORD x, UDWORD y, BOOL bFormation)
{
return _moveDroidToBase(psDroid,x,y,bFormation);
@ -599,7 +599,7 @@ void moveTurnDroid(DROID *psDroid, UDWORD x, UDWORD y)
}
// get the difference in direction
SDWORD moveDirDiff(SDWORD start, SDWORD end)
static SDWORD moveDirDiff(SDWORD start, SDWORD end)
{
SDWORD retval, diff;
@ -659,7 +659,7 @@ SDWORD moveDirDiff(SDWORD start, SDWORD end)
}*/
// Tell a droid to move out the way for a shuffle
void moveShuffleDroid(DROID *psDroid, UDWORD shuffleStart, SDWORD sx, SDWORD sy)
static void moveShuffleDroid(DROID *psDroid, UDWORD shuffleStart, SDWORD sx, SDWORD sy)
{
FRACT shuffleDir, droidDir;
DROID *psCurr;
@ -1326,7 +1326,7 @@ static SDWORD moveObjRadius(BASE_OBJECT *psObj)
// see if a Droid has run over a person
void moveCheckSquished(DROID *psDroid, FRACT mx,FRACT my)
static void moveCheckSquished(DROID *psDroid, FRACT mx,FRACT my)
{
SDWORD i, droidR, rad, radSq;
SDWORD objR;
@ -1378,7 +1378,7 @@ void moveCheckSquished(DROID *psDroid, FRACT mx,FRACT my)
// See if the droid has been stopped long enough to give up on the move
BOOL moveBlocked(DROID *psDroid)
static BOOL moveBlocked(DROID *psDroid)
{
SDWORD xdiff,ydiff, diffSq;
UDWORD blockTime;
@ -1448,7 +1448,7 @@ BOOL moveBlocked(DROID *psDroid)
// See if an object is on a droids target
BOOL moveObjOnTarget(DROID *psDroid, BASE_OBJECT *psObst)
static BOOL moveObjOnTarget(DROID *psDroid, BASE_OBJECT *psObst)
{
SDWORD xdiff, ydiff;
SDWORD radius;
@ -1506,7 +1506,7 @@ BOOL moveObjOnTarget(DROID *psDroid, BASE_OBJECT *psObst)
// Calculate the actual movement to slide around
void moveCalcSlideVector(DROID *psDroid,SDWORD objX, SDWORD objY, FRACT *pMx, FRACT *pMy)
static void moveCalcSlideVector(DROID *psDroid,SDWORD objX, SDWORD objY, FRACT *pMx, FRACT *pMy)
{
SDWORD obstX, obstY;
SDWORD absX, absY;
@ -1558,7 +1558,7 @@ void moveCalcSlideVector(DROID *psDroid,SDWORD objX, SDWORD objY, FRACT *pMx, FR
// see if a droid has run into a blocking tile
void moveCalcBlockingSlide(DROID *psDroid, FRACT *pmx, FRACT *pmy, SDWORD tarDir, SDWORD *pSlideDir)
static void moveCalcBlockingSlide(DROID *psDroid, FRACT *pmx, FRACT *pmy, SDWORD tarDir, SDWORD *pSlideDir)
{
FRACT mx = *pmx,my = *pmy, nx,ny;
SDWORD tx,ty, ntx,nty; // current tile x,y and new tile x,y
@ -1964,7 +1964,7 @@ void moveCalcBlockingSlide(DROID *psDroid, FRACT *pmx, FRACT *pmy, SDWORD tarDir
// see if a droid has run into another droid
// Only consider stationery droids
void moveCalcDroidSlide(DROID *psDroid, FRACT *pmx, FRACT *pmy)
static void moveCalcDroidSlide(DROID *psDroid, FRACT *pmx, FRACT *pmy)
{
SDWORD i, droidR, rad, radSq;
SDWORD objR;
@ -2206,7 +2206,7 @@ void moveCalcDroidSlide(DROID *psDroid, FRACT *pmx, FRACT *pmy)
// Get the distance to a tile if it is on the map
BOOL moveGetTileObst(SDWORD cx,SDWORD cy, SDWORD ox,SDWORD oy, SDWORD *pDist)
static BOOL moveGetTileObst(SDWORD cx,SDWORD cy, SDWORD ox,SDWORD oy, SDWORD *pDist)
{
SDWORD absx, absy;
@ -2231,7 +2231,7 @@ BOOL moveGetTileObst(SDWORD cx,SDWORD cy, SDWORD ox,SDWORD oy, SDWORD *pDist)
// Get a charged particle vector from all nearby objects
void moveGetObstVector2(DROID *psDroid, FRACT *pX, FRACT *pY)
static void moveGetObstVector2(DROID *psDroid, FRACT *pX, FRACT *pY)
{
SDWORD xdiff,ydiff, absX,absY, mag, minMag;
FRACT ox,oy, normX,normY, ratio;
@ -2393,7 +2393,7 @@ void moveGetObstVector2(DROID *psDroid, FRACT *pX, FRACT *pY)
// get an obstacle avoidance vector
void moveGetObstVector3(DROID *psDroid, FRACT *pX, FRACT *pY)
static void moveGetObstVector3(DROID *psDroid, FRACT *pX, FRACT *pY)
{
SDWORD i,xdiff,ydiff;
BASE_OBJECT *psObj;
@ -2497,7 +2497,7 @@ void moveGetObstVector3(DROID *psDroid, FRACT *pX, FRACT *pY)
#define REDARROW 179
// get an obstacle avoidance vector
void moveGetObstVector4(DROID *psDroid, FRACT *pX, FRACT *pY)
static void moveGetObstVector4(DROID *psDroid, FRACT *pX, FRACT *pY)
{
SDWORD i,xdiff,ydiff, absx,absy, dist;
BASE_OBJECT *psObj;
@ -2723,7 +2723,7 @@ void moveGetObstVector4(DROID *psDroid, FRACT *pX, FRACT *pY)
}*/
void moveUpdateRepulsiveVector( FRACT fVObstX, FRACT fVObstY, FRACT fVTarX, FRACT fVTarY,
static void moveUpdateRepulsiveVector( FRACT fVObstX, FRACT fVObstY, FRACT fVTarX, FRACT fVTarY,
FRACT *pfVRepX, FRACT *pfVRepY, FRACT *pfDistTot )
{
FRACT fDistObjSq, fDistObj;
@ -2756,7 +2756,7 @@ void moveUpdateRepulsiveVector( FRACT fVObstX, FRACT fVObstY, FRACT fVTarX, FRAC
}
// get an obstacle avoidance vector
void moveGetObstVector5(DROID *psDroid, FRACT *pX, FRACT *pY)
static void moveGetObstVector5(DROID *psDroid, FRACT *pX, FRACT *pY)
{
SDWORD i,xdiff,ydiff, numObst;
BASE_OBJECT *psObj;
@ -3062,7 +3062,7 @@ void moveCalcBoundary(DROID *psDroid)
// Check if a droid has got to a way point
BOOL moveReachedWayPoint(DROID *psDroid)
static BOOL moveReachedWayPoint(DROID *psDroid)
{
SDWORD droidX,droidY, iRange;
@ -3221,7 +3221,7 @@ SDWORD moveCalcDroidSpeed(DROID *psDroid)
return speed;
}
BOOL moveDroidStopped( DROID *psDroid, SDWORD speed )
static BOOL moveDroidStopped( DROID *psDroid, SDWORD speed )
{
if ((psDroid->sMove.Status == MOVEINACTIVE || psDroid->sMove.Status == MOVEROUTE) &&
speed == 0 && psDroid->sMove.speed == MKF(0))
@ -3234,7 +3234,7 @@ BOOL moveDroidStopped( DROID *psDroid, SDWORD speed )
}
}
void moveUpdateDroidDirection( DROID *psDroid, SDWORD *pSpeed, SDWORD direction,
static void moveUpdateDroidDirection( DROID *psDroid, SDWORD *pSpeed, SDWORD direction,
SDWORD iSpinAngle, SDWORD iSpinSpeed, SDWORD iTurnSpeed, SDWORD *pDroidDir,
FRACT *pfSpeed )
{
@ -3279,7 +3279,7 @@ void moveUpdateDroidDirection( DROID *psDroid, SDWORD *pSpeed, SDWORD direction,
// Calculate current speed perpendicular to droids direction
FRACT moveCalcPerpSpeed( DROID *psDroid, SDWORD iDroidDir, SDWORD iSkidDecel )
static FRACT moveCalcPerpSpeed( DROID *psDroid, SDWORD iDroidDir, SDWORD iSkidDecel )
{
SDWORD adiff;
FRACT perpSpeed;
@ -3298,7 +3298,7 @@ FRACT moveCalcPerpSpeed( DROID *psDroid, SDWORD iDroidDir, SDWORD iSkidDecel )
}
void moveCombineNormalAndPerpSpeeds( DROID *psDroid, FRACT fNormalSpeed,
static void moveCombineNormalAndPerpSpeeds( DROID *psDroid, FRACT fNormalSpeed,
FRACT fPerpSpeed, SDWORD iDroidDir )
{
SDWORD finalDir, adiff;
@ -3361,7 +3361,7 @@ void moveCombineNormalAndPerpSpeeds( DROID *psDroid, FRACT fNormalSpeed,
// Calculate the current speed in the droids normal direction
FRACT moveCalcNormalSpeed( DROID *psDroid, FRACT fSpeed, SDWORD iDroidDir,
static FRACT moveCalcNormalSpeed( DROID *psDroid, FRACT fSpeed, SDWORD iDroidDir,
SDWORD iAccel, SDWORD iDecel )
{
SDWORD adiff;
@ -3393,7 +3393,7 @@ FRACT moveCalcNormalSpeed( DROID *psDroid, FRACT fSpeed, SDWORD iDroidDir,
}
void moveGetDroidPosDiffs( DROID *psDroid, FRACT *pDX, FRACT *pDY )
static void moveGetDroidPosDiffs( DROID *psDroid, FRACT *pDX, FRACT *pDY )
{
FRACT move;
@ -3406,7 +3406,7 @@ void moveGetDroidPosDiffs( DROID *psDroid, FRACT *pDX, FRACT *pDY )
}
// see if the droid is close to the final way point
void moveCheckFinalWaypoint( DROID *psDroid, SDWORD *pSpeed )
static void moveCheckFinalWaypoint( DROID *psDroid, SDWORD *pSpeed )
{
SDWORD xdiff,ydiff, distSq;
SDWORD minEndSpeed = psDroid->baseSpeed/3;
@ -3439,7 +3439,7 @@ void moveCheckFinalWaypoint( DROID *psDroid, SDWORD *pSpeed )
}
}
void moveUpdateDroidPos( DROID *psDroid, FRACT dx, FRACT dy )
static void moveUpdateDroidPos( DROID *psDroid, FRACT dx, FRACT dy )
{
SDWORD iX = 0, iY = 0;
@ -3494,7 +3494,7 @@ void moveUpdateDroidPos( DROID *psDroid, FRACT dx, FRACT dy )
}
/* Update a tracked droids position and speed given target values */
void moveUpdateGroundModel(DROID *psDroid, SDWORD speed, SDWORD direction)
static void moveUpdateGroundModel(DROID *psDroid, SDWORD speed, SDWORD direction)
{
FRACT fPerpSpeed, fNormalSpeed, dx, dy, fSpeed, bx,by;
SDWORD iDroidDir, slideDir;
@ -3721,7 +3721,7 @@ void moveUpdatePersonModel(DROID *psDroid, SDWORD speed, SDWORD direction)
#define VTOL_VERTICAL_SPEED ((((SDWORD)psDroid->baseSpeed / 4) > 60) ? ((SDWORD)psDroid->baseSpeed / 4) : 60)
/* primitive 'bang-bang' vtol height controller */
void moveAdjustVtolHeight( DROID * psDroid, UDWORD iMapHeight )
static void moveAdjustVtolHeight( DROID * psDroid, UDWORD iMapHeight )
{
UDWORD iMinHeight, iMaxHeight, iLevelHeight;
@ -3765,7 +3765,7 @@ void moveMakeVtolHover( DROID *psDroid )
psDroid->z = (UWORD)(map_Height(psDroid->x,psDroid->y) + VTOL_HEIGHT_LEVEL);
}
void moveUpdateVtolModel(DROID *psDroid, SDWORD speed, SDWORD direction)
static void moveUpdateVtolModel(DROID *psDroid, SDWORD speed, SDWORD direction)
{
FRACT fPerpSpeed, fNormalSpeed, dx, dy, fSpeed;
SDWORD iDroidDir, iMapZ, iRoll, slideDir, iSpinSpeed, iTurnSpeed;
@ -3852,7 +3852,7 @@ void moveUpdateVtolModel(DROID *psDroid, SDWORD speed, SDWORD direction)
#ifndef FINALBUILD
void moveGetStatusStr( UBYTE status, char *szStr )
static void moveGetStatusStr( UBYTE status, char *szStr )
{
switch ( status )
{
@ -3898,7 +3898,7 @@ void moveGetStatusStr( UBYTE status, char *szStr )
#define CYBORG_VERTICAL_SPEED ((SDWORD)psDroid->baseSpeed/2)
void
static void
moveCyborgLaunchAnimDone( ANIM_OBJECT *psObj )
{
DROID *psDroid = psObj->psParent;
@ -3913,7 +3913,7 @@ moveCyborgLaunchAnimDone( ANIM_OBJECT *psObj )
psDroid->psCurAnim = NULL;
}
void
static void
moveCyborgTouchDownAnimDone( ANIM_OBJECT *psObj )
{
DROID *psDroid = psObj->psParent;
@ -3926,7 +3926,7 @@ moveCyborgTouchDownAnimDone( ANIM_OBJECT *psObj )
}
void moveUpdateJumpCyborgModel(DROID *psDroid, SDWORD speed, SDWORD direction)
static void moveUpdateJumpCyborgModel(DROID *psDroid, SDWORD speed, SDWORD direction)
{
FRACT fPerpSpeed, fNormalSpeed, dx, dy, fSpeed;
SDWORD iDroidDir;
@ -3953,7 +3953,7 @@ void moveUpdateJumpCyborgModel(DROID *psDroid, SDWORD speed, SDWORD direction)
moveUpdateDroidPos( psDroid, dx, dy );
}
void
static void
moveUpdateCyborgModel( DROID *psDroid, SDWORD moveSpeed, SDWORD moveDir, UBYTE oldStatus )
{
PROPULSION_STATS *psPropStats;
@ -4104,7 +4104,7 @@ moveUpdateCyborgModel( DROID *psDroid, SDWORD moveSpeed, SDWORD moveDir, UBYTE o
psDroid->roll = 0;
}
BOOL moveDescending( DROID *psDroid, UDWORD iMapHeight )
static BOOL moveDescending( DROID *psDroid, UDWORD iMapHeight )
{
if ( psDroid->z > iMapHeight )
@ -4166,7 +4166,7 @@ BOOL moveCheckDroidMovingAndVisible( AUDIO_SAMPLE *psSample )
void movePlayDroidMoveAudio( DROID *psDroid )
static void movePlayDroidMoveAudio( DROID *psDroid )
{
SDWORD iAudioID = NO_SOUND;
PROPULSION_TYPES *psPropType;
@ -4213,7 +4213,7 @@ void movePlayDroidMoveAudio( DROID *psDroid )
BOOL moveDroidStartCallback( AUDIO_SAMPLE *psSample )
static BOOL moveDroidStartCallback( AUDIO_SAMPLE *psSample )
{
DROID *psDroid;
@ -4241,7 +4241,7 @@ BOOL moveDroidStartCallback( AUDIO_SAMPLE *psSample )
void movePlayAudio( DROID *psDroid, BOOL bStarted, BOOL bStoppedBefore, SDWORD iMoveSpeed )
static void movePlayAudio( DROID *psDroid, BOOL bStarted, BOOL bStoppedBefore, SDWORD iMoveSpeed )
{
UBYTE propType;
PROPULSION_STATS *psPropStats;

View File

@ -163,7 +163,7 @@ char debugMenuEntry[DEBUGMENU_MAX_ENTRIES][MAX_STR_LENGTH];
// enumerates maps in the gamedesc file.
// returns only maps that are valid the right 'type'
BOOL enumerateMultiMaps(char *found, UDWORD *players,BOOL first, UBYTE camToUse, UBYTE numPlayers)
static BOOL enumerateMultiMaps(char *found, UDWORD *players,BOOL first, UBYTE camToUse, UBYTE numPlayers)
{
static LEVEL_DATASET *lev;
UBYTE cam;
@ -334,7 +334,7 @@ void displayNumPlayersBut(WIDGET *psWidget, UDWORD xOffset, UDWORD yOffset, UDWO
#define NBTIPS 512
unsigned int check_tip_index(unsigned int i) {
static unsigned int check_tip_index(unsigned int i) {
if (i < NBTIPS) {
return i;
} else {
@ -648,7 +648,7 @@ void addMultiRequest(char *ToFindb,UDWORD mode, UBYTE mapCam, UBYTE numPlayers)
}
void closeMultiRequester(void)
static void closeMultiRequester(void)
{
widgDelete(psRScreen,M_REQUEST);
multiRequestUp = FALSE;
@ -1378,7 +1378,7 @@ BOOL intRunMultiMenu(void)
// ////////////////////////////////////////////////////////////////////////////
BOOL intCheckAllianceValid( UBYTE player1, UBYTE player2 )
static BOOL intCheckAllianceValid( UBYTE player1, UBYTE player2 )
{
UBYTE i, iAlliances, iHumanPlayers;

View File

@ -108,8 +108,6 @@ SDWORD msgStackPos = -1; //top element pointer
// ////////////////////////////////////////////////////////////////////////////
// Remote Prototypes
extern BOOL MultiPlayValidTemplate(DROID_TEMPLATE *psTempl); // for templates.
extern RESEARCH* asResearch; //list of possible research items.
extern PLAYER_RESEARCH* asPlayerResList[MAX_PLAYERS];

View File

@ -139,7 +139,7 @@ static void clearTargets(DROID * psDroid)
//FIXME: unit doesn't shoot while returning to the guard position
// check whether a droid has to move back to the thing it is guarding
void orderCheckGuardPosition(DROID *psDroid, SDWORD range)
static void orderCheckGuardPosition(DROID *psDroid, SDWORD range)
{
SDWORD xdiff, ydiff;
UDWORD x,y;
@ -1382,7 +1382,7 @@ void orderUpdateDroid(DROID *psDroid)
/* Give a command group an order */
void orderCmdGroupBase(DROID_GROUP *psGroup, DROID_ORDER_DATA *psData)
static void orderCmdGroupBase(DROID_GROUP *psGroup, DROID_ORDER_DATA *psData)
{
DROID *psCurr, *psChosen;
SDWORD xdiff,ydiff, currdist, mindist;
@ -1435,7 +1435,7 @@ void orderCmdGroupBase(DROID_GROUP *psGroup, DROID_ORDER_DATA *psData)
// check the position of units giving fire support to this unit and tell
// them to pull back if the sensor is going to move through them
void orderCheckFireSupportPos(DROID *psSensor, DROID_ORDER_DATA *psOrder)
static void orderCheckFireSupportPos(DROID *psSensor, DROID_ORDER_DATA *psOrder)
{
SDWORD fsx,fsy, fsnum, sensorVX,sensorVY, fsVX,fsVY;
FRACT sensorAngle, fsAngle, adiff;
@ -3021,7 +3021,7 @@ void orderCheckList(DROID *psDroid)
// add a location order to a droids order list
BOOL orderDroidLocAdd(DROID *psDroid, DROID_ORDER order, UDWORD x, UDWORD y)
static BOOL orderDroidLocAdd(DROID *psDroid, DROID_ORDER order, UDWORD x, UDWORD y)
{
DROID_ORDER_DATA sOrder;
@ -3042,7 +3042,7 @@ BOOL orderDroidLocAdd(DROID *psDroid, DROID_ORDER order, UDWORD x, UDWORD y)
// add an object order to a droids order list
BOOL orderDroidObjAdd(DROID *psDroid, DROID_ORDER order, BASE_OBJECT *psObj[DROID_MAXWEAPS])
static BOOL orderDroidObjAdd(DROID *psDroid, DROID_ORDER order, BASE_OBJECT *psObj[DROID_MAXWEAPS])
{
DROID_ORDER_DATA sOrder;
UBYTE i;
@ -3491,7 +3491,7 @@ DROID_ORDER chooseOrderObj(DROID *psDroid, BASE_OBJECT *psObj)
return order;
}
void orderPlayOrderObjAudio( UDWORD player, BASE_OBJECT *psObj )
static void orderPlayOrderObjAudio( UDWORD player, BASE_OBJECT *psObj )
{
DROID *psDroid;
@ -3670,7 +3670,7 @@ DROID *FindATransporter(void)
// See if the player has access to a factory in this map.
//
STRUCTURE *FindAFactory(UDWORD player, UDWORD factoryType)
static STRUCTURE *FindAFactory(UDWORD player, UDWORD factoryType)
{
STRUCTURE *psStruct;
@ -3691,7 +3691,7 @@ STRUCTURE *FindAFactory(UDWORD player, UDWORD factoryType)
// See if the player has access to a repair facility in this map.
//
STRUCTURE *FindARepairFacility(void)
static STRUCTURE *FindARepairFacility(void)
{
STRUCTURE *psStruct;
@ -4323,7 +4323,7 @@ BOOL secondaryGotPrimaryOrder(DROID *psDroid, DROID_ORDER order)
// set the state of a numeric group
void secondarySetGroupState(UDWORD player, UDWORD group, SECONDARY_ORDER sec, SECONDARY_STATE state)
static void secondarySetGroupState(UDWORD player, UDWORD group, SECONDARY_ORDER sec, SECONDARY_STATE state)
{
DROID *psCurr;
SECONDARY_STATE currState;
@ -4339,7 +4339,7 @@ void secondarySetGroupState(UDWORD player, UDWORD group, SECONDARY_ORDER sec, SE
}
// get the average secondary state of a numeric group
SECONDARY_STATE secondaryGetAverageGroupState(UDWORD player, UDWORD group, UDWORD mask)
static SECONDARY_STATE secondaryGetAverageGroupState(UDWORD player, UDWORD group, UDWORD mask)
{
#define MAX_STATES 5
struct { UDWORD state, num; } aStateCount[MAX_STATES];

View File

@ -468,7 +468,7 @@ FRACT gHPitch;
//-----------------------------------------------------------------------------------
UDWORD getTileTallObj(UDWORD x, UDWORD y)
static UDWORD getTileTallObj(UDWORD x, UDWORD y)
{
UDWORD i, j;
UDWORD TallObj = 0;

View File

@ -389,7 +389,7 @@ void seq_SetVideoPath(void)
BOOL SeqEndCallBack( AUDIO_SAMPLE *psSample )
static BOOL SeqEndCallBack( AUDIO_SAMPLE *psSample )
{
// psSample;
bAudioPlaying = FALSE;