Purely stylistic changes to make it easier to read this code for mistakes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9131 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
8e6b4e59b6
commit
baa0ac2188
|
@ -66,8 +66,6 @@ event initialisedEvent(CALL_GAMEINIT)
|
|||
{
|
||||
enableStructure(command ,playnum); //make structures available to build
|
||||
enableStructure(factory ,playnum);
|
||||
// enableStructure(wall ,playnum);
|
||||
// enableStructure(cornerWall ,playnum);
|
||||
enableStructure(oilDerrick ,playnum);
|
||||
enableStructure(powerGen ,playnum);
|
||||
enableStructure(research ,playnum);
|
||||
|
@ -87,7 +85,6 @@ event initialisedEvent(CALL_GAMEINIT)
|
|||
|
||||
event initialisedEventTwo(CALL_GAMEINIT)
|
||||
{
|
||||
|
||||
playnum = 0;
|
||||
while (playnum < 8)
|
||||
{
|
||||
|
@ -95,7 +92,7 @@ event initialisedEventTwo(CALL_GAMEINIT)
|
|||
while (count < numBaseRes)
|
||||
{
|
||||
enableResearch(baseRes[count], playnum);
|
||||
count = count +1;
|
||||
count = count + 1;
|
||||
}
|
||||
|
||||
// enable cyborgs components that can't be enabled with research
|
||||
|
@ -116,52 +113,46 @@ event initialisedEventTwo(CALL_GAMEINIT)
|
|||
}
|
||||
else if(multiPlayerBaseType == CAMP_BASE)
|
||||
{
|
||||
setPowerLevel(2500,playnum);
|
||||
setPowerLevel(2500, playnum);
|
||||
count = 0;
|
||||
while (count < numBaseTech)
|
||||
{
|
||||
completeResearch(defTech[count], playnum);
|
||||
count = count +1;
|
||||
count = count + 1;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
setPowerLevel(2500,playnum);
|
||||
count = 0;
|
||||
while (count < numDefTech)
|
||||
{
|
||||
completeResearch(defTech[count], playnum);
|
||||
count = count +1;
|
||||
count = count + 1;
|
||||
}
|
||||
}
|
||||
|
||||
playnum = playnum+ 1;
|
||||
playnum = playnum + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// /////////////////////////////////////////////////////////////////
|
||||
// END CONDITIONS
|
||||
event checkEndConditions (endConditions)
|
||||
event checkEndConditions(endConditions)
|
||||
{
|
||||
// Losing Conditions
|
||||
if( ( not anyDroidsLeft(selectedPlayer))
|
||||
and ( not anyFactoriesLeft(selectedPlayer))
|
||||
)
|
||||
if ((not anyDroidsLeft(selectedPlayer)) and (not anyFactoriesLeft(selectedPlayer)))
|
||||
{
|
||||
gameLost = TRUE;
|
||||
|
||||
/* If teams enabled check if all team members have lost */
|
||||
if(multiPlayerGameType == SKIRMISH and multiPlayerAlliancesType == ALLIANCES_TEAMS)
|
||||
if (multiPlayerGameType == SKIRMISH and multiPlayerAlliancesType == ALLIANCES_TEAMS)
|
||||
{
|
||||
playnum = 0;
|
||||
while (playnum < multiPlayerMaxPlayers)
|
||||
{
|
||||
if((playnum != selectedPlayer)
|
||||
and allianceExistsBetween(selectedPlayer , playnum))
|
||||
if ((playnum != selectedPlayer) and allianceExistsBetween(selectedPlayer, playnum))
|
||||
{
|
||||
if(anyDroidsLeft(playnum) or anyFactoriesLeft(playnum))
|
||||
{
|
||||
|
|
|
@ -175,8 +175,7 @@ void buttonClearFlash(W_BUTTON *psButton)
|
|||
/* Set a button's state */
|
||||
void buttonSetState(W_BUTTON *psButton, UDWORD state)
|
||||
{
|
||||
ASSERT( !((state & WBUT_LOCK) && (state & WBUT_CLICKLOCK)),
|
||||
"widgSetButtonState: Cannot have WBUT_LOCK and WBUT_CLICKLOCK" );
|
||||
ASSERT(!((state & WBUT_LOCK) && (state & WBUT_CLICKLOCK)), "Cannot have both WBUT_LOCK and WBUT_CLICKLOCK");
|
||||
|
||||
if (state & WBUT_DISABLE)
|
||||
{
|
||||
|
|
|
@ -1149,7 +1149,6 @@ void intResetScreen(BOOL NoAnim)
|
|||
widgSetButtonState(psWScreen, IDRET_INTEL_MAP, 0);
|
||||
widgSetButtonState(psWScreen, IDRET_RESEARCH, 0);
|
||||
widgSetButtonState(psWScreen, IDRET_DESIGN, 0);
|
||||
|
||||
}
|
||||
|
||||
/* Remove whatever extra screen was displayed */
|
||||
|
@ -3812,13 +3811,13 @@ BOOL intAddReticule(void)
|
|||
|
||||
void intRemoveReticule(void)
|
||||
{
|
||||
if(ReticuleUp == true) {
|
||||
widgDelete(psWScreen,IDRET_FORM); // remove reticule
|
||||
if (ReticuleUp == true)
|
||||
{
|
||||
widgDelete(psWScreen, IDRET_FORM); // remove reticule
|
||||
ReticuleUp = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//toggles the Power Bar display on and off
|
||||
void togglePowerBar(void)
|
||||
{
|
||||
|
|
|
@ -2500,7 +2500,7 @@ static BOOL _intAddMissionResult(BOOL result, BOOL bPlaySuccess)
|
|||
sButInit.FontID = font_regular;
|
||||
sButInit.pTip = NULL;
|
||||
sButInit.pDisplay = displayTextOption;
|
||||
//if won or in debug mode
|
||||
// If won or in debug mode
|
||||
if(result || getDebugMappingStatus() || bMultiPlayer)
|
||||
{
|
||||
//continue
|
||||
|
@ -2523,8 +2523,8 @@ static BOOL _intAddMissionResult(BOOL result, BOOL bPlaySuccess)
|
|||
}
|
||||
|
||||
/* Only add save option if in the game for real, ie, not fastplay.
|
||||
And the player hasn't just completed the whole game
|
||||
Don't add save option if just lost and in debug mode*/
|
||||
* And the player hasn't just completed the whole game
|
||||
* Don't add save option if just lost and in debug mode. */
|
||||
if (!bMultiPlayer && !testPlayerHasWon() && !(testPlayerHasLost() && getDebugMappingStatus()))
|
||||
{
|
||||
//save
|
||||
|
|
|
@ -393,14 +393,6 @@ void closeLoadingScreen(void)
|
|||
|
||||
BOOL displayGameOver(BOOL bDidit)
|
||||
{
|
||||
// AlexL says take this out......
|
||||
// setConsolePermanence(true,true);
|
||||
// flushConsoleMessages( );
|
||||
|
||||
// addConsoleMessage(" ", CENTRE_JUSTIFY, SYSTEM_MESSAGE);
|
||||
// addConsoleMessage(_("Game Over"), CENTRE_JUSTIFY, SYSTEM_MESSAGE);
|
||||
// addConsoleMessage(" ", CENTRE_JUSTIFY, SYSTEM_MESSAGE);
|
||||
|
||||
if(bDidit)
|
||||
{
|
||||
setPlayerHasWon(true);
|
||||
|
|
Loading…
Reference in New Issue