1. Fix an assert when winning or losing a skirmish game. 2. Remove some debug messages 3. Now display the mission result screen on the end of a
skirmish/multiplayer game. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1359 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
d19a616013
commit
b8c4065e15
|
@ -1054,6 +1054,12 @@ void intIntelButtonPressed(BOOL proxMsg, UDWORD id)
|
||||||
ASSERT( proxMsg != TRUE,
|
ASSERT( proxMsg != TRUE,
|
||||||
"intIntelButtonPressed: Shouldn't be able to get a proximity message!" );
|
"intIntelButtonPressed: Shouldn't be able to get a proximity message!" );
|
||||||
|
|
||||||
|
if(id == 0)
|
||||||
|
{
|
||||||
|
intRemoveIntelMap();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* message button has been pressed - clear the old button and messageView*/
|
/* message button has been pressed - clear the old button and messageView*/
|
||||||
if (messageID != 0)
|
if (messageID != 0)
|
||||||
{
|
{
|
||||||
|
@ -1257,12 +1263,12 @@ void intRemoveIntelMap(void)
|
||||||
|
|
||||||
// Start the window close animation.
|
// Start the window close animation.
|
||||||
Form = (W_TABFORM*)widgGetFromID(psWScreen,IDINTMAP_FORM);
|
Form = (W_TABFORM*)widgGetFromID(psWScreen,IDINTMAP_FORM);
|
||||||
|
if(Form)
|
||||||
ASSERT(Form != NULL, "intRemoveIntelMap: Form is NULL");
|
{
|
||||||
|
Form->display = intClosePlainForm;
|
||||||
Form->display = intClosePlainForm;
|
Form->disableChildren = TRUE;
|
||||||
Form->disableChildren = TRUE;
|
Form->pUserData = (void*)0; // Used to signal when the close anim has finished.
|
||||||
Form->pUserData = (void*)0; // Used to signal when the close anim has finished.
|
}
|
||||||
ClosingIntelMap = TRUE;
|
ClosingIntelMap = TRUE;
|
||||||
//remove the text label
|
//remove the text label
|
||||||
widgDelete(psWScreen, IDINTMAP_PAUSELABEL);
|
widgDelete(psWScreen, IDINTMAP_PAUSELABEL);
|
||||||
|
|
|
@ -956,7 +956,6 @@ UDWORD i;
|
||||||
{
|
{
|
||||||
if(keyPressed(i))
|
if(keyPressed(i))
|
||||||
{
|
{
|
||||||
debug(LOG_WARNING, "%i pressed (KEY_Q: %i, KEY_P: %i)", i, KEY_Q, KEY_P);
|
|
||||||
return(i); // top row key pressed
|
return(i); // top row key pressed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -965,7 +964,6 @@ UDWORD i;
|
||||||
{
|
{
|
||||||
if(keyPressed(i))
|
if(keyPressed(i))
|
||||||
{
|
{
|
||||||
debug(LOG_WARNING, "%i pressed (KEY_A: %i, KEY_L: %i)", i, KEY_A, KEY_L);
|
|
||||||
return(i); // middle row key pressed
|
return(i); // middle row key pressed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -974,7 +972,6 @@ UDWORD i;
|
||||||
{
|
{
|
||||||
if(keyPressed(i))
|
if(keyPressed(i))
|
||||||
{
|
{
|
||||||
debug(LOG_WARNING, "%i pressed (KEY_Z: %i, KEY_M: %i)", i, KEY_Z, KEY_M);
|
|
||||||
return(i); // bottomw row key pressed
|
return(i); // bottomw row key pressed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3371,12 +3371,12 @@ static BOOL _intAddMissionResult(BOOL result, BOOL bPlaySuccess)
|
||||||
sButInit.pTip = NULL;
|
sButInit.pTip = NULL;
|
||||||
sButInit.pDisplay = displayTextOption;
|
sButInit.pDisplay = displayTextOption;
|
||||||
//if won or in debug mode
|
//if won or in debug mode
|
||||||
if(result || getDebugMappingStatus())
|
if(result || getDebugMappingStatus() || bMultiPlayer)
|
||||||
{
|
{
|
||||||
//continue
|
//continue
|
||||||
sButInit.x = MISSION_2_X;
|
sButInit.x = MISSION_2_X;
|
||||||
// Won the game, so display "Quit to main menu"
|
// Won the game, so display "Quit to main menu"
|
||||||
if(testPlayerHasWon())
|
if(testPlayerHasWon() && !bMultiPlayer)
|
||||||
{
|
{
|
||||||
sButInit.id = IDMISSIONRES_QUIT;
|
sButInit.id = IDMISSIONRES_QUIT;
|
||||||
sButInit.y = MISSION_2_Y-8;
|
sButInit.y = MISSION_2_Y-8;
|
||||||
|
@ -3397,7 +3397,7 @@ static BOOL _intAddMissionResult(BOOL result, BOOL bPlaySuccess)
|
||||||
/* Only add save option if in the game for real, ie, not fastplay.
|
/* Only add save option if in the game for real, ie, not fastplay.
|
||||||
And the player hasn't just completed the whole game
|
And the player hasn't just completed the whole game
|
||||||
Don't add save option if just lost and in debug mode*/
|
Don't add save option if just lost and in debug mode*/
|
||||||
if (!testPlayerHasWon() && !(testPlayerHasLost() && getDebugMappingStatus()))
|
if (!bMultiPlayer && !testPlayerHasWon() && !(testPlayerHasLost() && getDebugMappingStatus()))
|
||||||
{
|
{
|
||||||
//save
|
//save
|
||||||
sButInit.id = IDMISSIONRES_SAVE;
|
sButInit.id = IDMISSIONRES_SAVE;
|
||||||
|
@ -3534,18 +3534,10 @@ static void missionContineButtonPressed( void )
|
||||||
}*/
|
}*/
|
||||||
// intRemoveMissionResultNoAnim();
|
// intRemoveMissionResultNoAnim();
|
||||||
|
|
||||||
|
if (bMultiPlayer)
|
||||||
//just being paranoid here - definately don't want this in the final build
|
|
||||||
#ifdef DEBUG
|
|
||||||
//in the final build we won't be able to get here beciase the CONTINUE button will not be available
|
|
||||||
//if we're in debug mode and we've lost it is preferred if we just return to the game
|
|
||||||
if (getDebugMappingStatus() && testPlayerHasLost())
|
|
||||||
{
|
{
|
||||||
intRemoveMissionResultNoAnim();
|
intRemoveMissionResultNoAnim();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void intProcessMissionResult(UDWORD id)
|
void intProcessMissionResult(UDWORD id)
|
||||||
|
|
|
@ -3244,6 +3244,8 @@ BOOL scrGameOverMessage(void)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// stop the game time??
|
||||||
|
|
||||||
//create the message
|
//create the message
|
||||||
psMessage = addMessage(msgType, FALSE, player);
|
psMessage = addMessage(msgType, FALSE, player);
|
||||||
|
|
||||||
|
@ -3267,8 +3269,9 @@ BOOL scrGameOverMessage(void)
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//this now called when the video Quit is processed
|
// this should be called when the video Quit is processed
|
||||||
//displayGameOver(gameOver);
|
// not always is tough, so better be sure
|
||||||
|
displayGameOver(gameOver);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -425,6 +425,7 @@ BOOL displayGameOver(BOOL bDidit)
|
||||||
|
|
||||||
// this bit decides whether to auto quit to front end.
|
// this bit decides whether to auto quit to front end.
|
||||||
//if(!getDebugMappingStatus())
|
//if(!getDebugMappingStatus())
|
||||||
|
if(!bMultiPlayer)
|
||||||
{
|
{
|
||||||
if(bDidit)
|
if(bDidit)
|
||||||
{
|
{
|
||||||
|
@ -446,6 +447,8 @@ BOOL displayGameOver(BOOL bDidit)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
updateMultiStatsLoses();
|
updateMultiStatsLoses();
|
||||||
|
clearMissionWidgets();
|
||||||
|
intAddMissionResult(bDidit, TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue