Fixed some compiler and linker warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@849 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
e3b77d82d2
commit
a7e6ef3b23
|
@ -21,6 +21,8 @@
|
|||
#define MAX_LEN_LOG_LINE 512
|
||||
#define MAX_LEN_DEBUG_PART 12
|
||||
|
||||
char last_called_script_event[MAX_EVENT_NAME_LEN];
|
||||
|
||||
static debug_callback * callbackRegistry = NULL;
|
||||
static BOOL enabled_debug_parts[LOG_LAST];
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
#endif
|
||||
|
||||
/* stores name of the last function or event called by scripts */
|
||||
char last_called_script_event[100];
|
||||
#define MAX_EVENT_NAME_LEN 100
|
||||
extern char last_called_script_event[MAX_EVENT_NAME_LEN];
|
||||
|
||||
/*
|
||||
*
|
||||
|
|
|
@ -144,7 +144,7 @@ BOOL SavePlayerAIExperience(SDWORD nPlayer, BOOL bNotify)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL SetUpOutputFile(char * pMapName,SDWORD nPlayer) // FIXME pMapName is unused!!!
|
||||
BOOL SetUpOutputFile(SDWORD nPlayer)
|
||||
{
|
||||
char sPlayer[255] = "";
|
||||
char SaveDir[MAX_PATH] = "multiplay/learndata/";
|
||||
|
@ -246,8 +246,8 @@ BOOL WriteAISaveData(SDWORD nPlayer)
|
|||
UDWORD PosXY[MAX_OIL_ENTRIES]; //Locations, 0=x,1=y,2=x etc
|
||||
SDWORD i;
|
||||
|
||||
/* Prepair experience file for the current map */
|
||||
if(!SetUpOutputFile(game.map,nPlayer))
|
||||
/* prepare experience file for the current map */
|
||||
if(!SetUpOutputFile(nPlayer))
|
||||
{
|
||||
debug(LOG_ERROR,"Failed to prepare experience file for player %d",nPlayer);
|
||||
return FALSE;
|
||||
|
@ -485,7 +485,6 @@ BOOL canRecallOilAt(SDWORD nPlayer, SDWORD x, SDWORD y)
|
|||
BOOL ReadAISaveData(SDWORD nPlayer)
|
||||
{
|
||||
FEATURE *psFeature;
|
||||
SDWORD x=0,y=0;
|
||||
SDWORD NumEntries=0; //How many derricks/oil resources will be saved
|
||||
UDWORD PosXY[MAX_OIL_ENTRIES]; //Locations, 0=x,1=y,2=x etc
|
||||
SDWORD i;
|
||||
|
@ -676,8 +675,6 @@ BOOL ReadAISaveData(SDWORD nPlayer)
|
|||
BOOL OilResourceAt(UDWORD OilX,UDWORD OilY, SDWORD VisibleToPlayer)
|
||||
{
|
||||
FEATURE *psFeature;
|
||||
SDWORD x=0,y=0;
|
||||
SDWORD NumEntries=0; //How many derricks/oil resources will be saved
|
||||
BOOL Found;
|
||||
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ extern BOOL ReadAISaveData(SDWORD nPlayer);
|
|||
extern BOOL WriteAISaveData(SDWORD nPlayer);
|
||||
|
||||
extern BOOL SetUpInputFile(SDWORD nPlayer);
|
||||
extern BOOL SetUpOutputFile(char * pMapName,SDWORD nPlayer);
|
||||
extern BOOL SetUpOutputFile(SDWORD nPlayer);
|
||||
|
||||
extern BOOL StoreBaseDefendLoc(SDWORD x, SDWORD y, SDWORD nPlayer);
|
||||
extern BOOL StoreOilDefendLoc(SDWORD x, SDWORD y, SDWORD nPlayer);
|
||||
|
|
|
@ -703,7 +703,7 @@ proj_InFlightDirectFunc( PROJ_OBJECT *psObj )
|
|||
// rad = fastRoot(dx,dy);
|
||||
rad = (SDWORD)iSQRT( dx*dx + dy*dy );
|
||||
//Watermelon:extended life span
|
||||
extendRad = (SDWORD)rad * 1.5f;
|
||||
extendRad = (SDWORD)(rad * 1.5f);
|
||||
|
||||
|
||||
if (rad == 0)
|
||||
|
@ -797,7 +797,7 @@ proj_InFlightDirectFunc( PROJ_OBJECT *psObj )
|
|||
{
|
||||
wpRadius = 2;
|
||||
//Watermelon:extended life span
|
||||
extendRad = (SDWORD)rad * 1.2f;
|
||||
extendRad = (SDWORD)(rad * 1.2f);
|
||||
}
|
||||
else if (psStats->weaponSubClass == WSC_CANNON ||
|
||||
psStats->weaponSubClass == WSC_FLAME ||
|
||||
|
@ -809,7 +809,7 @@ proj_InFlightDirectFunc( PROJ_OBJECT *psObj )
|
|||
{
|
||||
wpRadius = 3;
|
||||
//Watermelon:extended life span
|
||||
extendRad = (SDWORD)rad * 1.5f;
|
||||
extendRad = (SDWORD)(rad * 1.5f);
|
||||
}
|
||||
else if (psStats->weaponSubClass == WSC_AAGUN)
|
||||
{
|
||||
|
@ -1022,7 +1022,7 @@ proj_InFlightIndirectFunc( PROJ_OBJECT *psObj )
|
|||
psObj->pitch = (SWORD)( RAD_TO_DEG(atan2(fVVert, psObj->vXY)) );
|
||||
|
||||
//Watermelon:extended life span for artillery projectile
|
||||
extendRad = (SDWORD)iRad * 1.2f;
|
||||
extendRad = (SDWORD)(iRad * 1.2f);
|
||||
|
||||
if(psStats->weaponSubClass == WSC_FLAME)
|
||||
{
|
||||
|
|
|
@ -3839,7 +3839,7 @@ BOOL scrRefTest(void)
|
|||
{
|
||||
SDWORD Num = 0;
|
||||
|
||||
if (!stackPopParams(1,VAL_INT, Num));
|
||||
if (!stackPopParams(1,VAL_INT, Num))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -7842,7 +7842,6 @@ BOOL scrNumPlayerWeapObjInRange(void)
|
|||
BOOL scrNumEnemyObjInRange(void)
|
||||
{
|
||||
SDWORD player,range,rangeX,rangeY;
|
||||
UDWORD numEnemies = 0;
|
||||
BOOL bVTOLs;
|
||||
|
||||
if (!stackPopParams(5, VAL_INT, &player, VAL_INT, &rangeX,
|
||||
|
@ -10487,9 +10486,9 @@ BOOL scrMatch(void)
|
|||
{
|
||||
char *sToParse = NULL, *sToMatch = NULL;
|
||||
char *wordNeed = NULL, *wordFound = NULL;
|
||||
SDWORD players=0,readCountParse=0,readCountMatch=0;
|
||||
SDWORD readCountParse=0,readCountMatch=0;
|
||||
SDWORD fieldAssignedParse=0,fieldAssignedMatch=0;
|
||||
BOOL ok = TRUE,bEndParse=FALSE,bEndMatch=FALSE;
|
||||
BOOL ok = TRUE;
|
||||
SDWORD *nResult;
|
||||
|
||||
if (!stackPopParams(3, VAL_STRING, &strParam1, VAL_STRING, &strParam2, VAL_REF|VAL_INT, &nResult))
|
||||
|
@ -10714,7 +10713,7 @@ BOOL scrToPow(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
result.v.fval = pow(x,y);
|
||||
result.v.fval = (float)pow(x,y);
|
||||
if (!stackPushResult(VAL_FLOAT, &result))
|
||||
{
|
||||
debug(LOG_ERROR, "scrToPow(): failed to push result");
|
||||
|
|
Loading…
Reference in New Issue