Changed scripting functions to use british spelling of "color"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@781 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
e2de834b13
commit
0aeea43f15
|
@ -2043,7 +2043,7 @@ BOOL recvBeacon(NETMSG *pMsg)
|
|||
return addHelpBlip(locX,locY,receiver,sender,beaconReceiveMsg[sender]);
|
||||
}
|
||||
|
||||
STRING *getPlayerColorName(SDWORD player)
|
||||
STRING *getPlayerColourName(SDWORD player)
|
||||
{
|
||||
switch(getPlayerColour(player))
|
||||
{
|
||||
|
|
|
@ -225,7 +225,7 @@ extern DROID_TEMPLATE *NameToTemplate(CHAR *sName,UDWORD player);
|
|||
|
||||
extern STRING *getPlayerName (UDWORD player);
|
||||
extern BOOL setPlayerName (UDWORD player, STRING *sName);
|
||||
extern STRING *getPlayerColorName(SDWORD player);
|
||||
extern STRING *getPlayerColourName(SDWORD player);
|
||||
extern BOOL isHumanPlayer (UDWORD player); //to tell if the player is a computer or not.
|
||||
extern BOOL myResponsibility (UDWORD player);
|
||||
extern BOOL responsibleFor (UDWORD player, UDWORD playerinquestion);
|
||||
|
|
|
@ -5679,7 +5679,7 @@ BOOL scrGetGameStatus(void)
|
|||
}
|
||||
|
||||
//get the colour number used by a player
|
||||
BOOL scrGetPlayerColor(void)
|
||||
BOOL scrGetPlayerColour(void)
|
||||
{
|
||||
SDWORD player, colour;
|
||||
|
||||
|
@ -5690,7 +5690,7 @@ BOOL scrGetPlayerColor(void)
|
|||
|
||||
if (player >= MAX_PLAYERS)
|
||||
{
|
||||
ASSERT( FALSE, "scrGetPlayerColor: player number is too high" );
|
||||
ASSERT( FALSE, "scrGetPlayerColour: player number is too high" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -5705,7 +5705,7 @@ BOOL scrGetPlayerColor(void)
|
|||
}
|
||||
|
||||
//get the colour name of the player ("green", "black" etc)
|
||||
BOOL scrGetPlayerColorName(void)
|
||||
BOOL scrGetPlayerColourName(void)
|
||||
{
|
||||
SDWORD player;
|
||||
|
||||
|
@ -5716,13 +5716,13 @@ BOOL scrGetPlayerColorName(void)
|
|||
|
||||
if (player >= MAX_PLAYERS || player < 0)
|
||||
{
|
||||
ASSERT( FALSE, "scrGetPlayerColorName: wrong player index" );
|
||||
ASSERT( FALSE, "scrGetPlayerColourName: wrong player index" );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!stackPushResult(VAL_STRING, (SDWORD)getPlayerColorName(player)))
|
||||
if (!stackPushResult(VAL_STRING, (SDWORD)getPlayerColourName(player)))
|
||||
{
|
||||
debug(LOG_ERROR, "scrGetPlayerColorName(): failed to push result");
|
||||
debug(LOG_ERROR, "scrGetPlayerColourName(): failed to push result");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -10278,8 +10278,8 @@ SDWORD getPlayerFromString(STRING *playerName)
|
|||
}
|
||||
|
||||
/* check color */
|
||||
debug(LOG_SCRIPT, "checking (%s,%s)",getPlayerColorName(playerIndex), playerName);
|
||||
if (strncasecmp(getPlayerColorName(playerIndex),playerName, 255) == 0)
|
||||
debug(LOG_SCRIPT, "checking (%s,%s)",getPlayerColourName(playerIndex), playerName);
|
||||
if (strncasecmp(getPlayerColourName(playerIndex),playerName, 255) == 0)
|
||||
{
|
||||
debug(LOG_SCRIPT, "matched, returning %d", playerIndex);
|
||||
return playerIndex;
|
||||
|
|
|
@ -435,8 +435,8 @@ typedef enum gamestatus
|
|||
} GAMESTATUS;
|
||||
|
||||
//get the colour number used by a player
|
||||
extern BOOL scrGetPlayerColor(void);
|
||||
extern BOOL scrGetPlayerColorName(void);
|
||||
extern BOOL scrGetPlayerColour(void);
|
||||
extern BOOL scrGetPlayerColourName(void);
|
||||
|
||||
//set the colour number to use for a player
|
||||
extern BOOL scrSetPlayerColour(void);
|
||||
|
|
|
@ -601,10 +601,10 @@ FUNC_SYMBOL asFuncTable[] =
|
|||
{"getGameStatus", scrGetGameStatus, VAL_BOOL, 1, {VAL_INT} },
|
||||
|
||||
//player colour access functions
|
||||
{ "getPlayerColor", scrGetPlayerColor, VAL_INT,
|
||||
{ "getPlayerColour", scrGetPlayerColour, VAL_INT,
|
||||
1, { VAL_INT } },
|
||||
|
||||
{ "getPlayerColorName", scrGetPlayerColorName, VAL_STRING,
|
||||
{ "getPlayerColourName", scrGetPlayerColourName, VAL_STRING,
|
||||
1, { VAL_INT } },
|
||||
|
||||
{ "setPlayerColour", scrSetPlayerColour, VAL_VOID,
|
||||
|
|
Loading…
Reference in New Issue