Exemple #1
0
bool displayGameOver(bool bDidit)
{
	if (bDidit)
	{
		setPlayerHasWon(true);
		multiplayerWinSequence(true);
		if (bMultiPlayer)
		{
			updateMultiStatsWins();
		}
	}
	else
	{
		setPlayerHasLost(true);
		if (bMultiPlayer)
		{
			updateMultiStatsLoses();
		}
	}
	if (bMultiPlayer)
	{
		PLAYERSTATS st = getMultiStats(selectedPlayer);
		saveMultiStats(getPlayerName(selectedPlayer), getPlayerName(selectedPlayer), &st);
	}

	//clear out any mission widgets - timers etc that may be on the screen
	clearMissionWidgets();
	intAddMissionResult(bDidit, true);

	return true;
}
Exemple #2
0
bool displayGameOver(bool bDidit)
{
	if(bDidit)
	{
		setPlayerHasWon(true);
		multiplayerWinSequence(true);
		if(bMultiPlayer)
		{
			updateMultiStatsWins();
		}
	}
	else
	{
		setPlayerHasLost(true);
		if(bMultiPlayer)
		{
			updateMultiStatsLoses();
		}
	}

	//clear out any mission widgets - timers etc that may be on the screen
	clearMissionWidgets();
	intAddMissionResult(bDidit, true);

	return true;
}
Exemple #3
0
/*sets which states need to be paused when the intelligence screen is up*/
void setIntelligencePauseState(void)
{
	if (!bMultiPlayer)
	{
		//need to clear mission widgets from being shown on intel screen
		clearMissionWidgets();
		gameTimeStop();
		setGameUpdatePause(true);
		if(!bInTutorial)
		{	// Don't pause the scripts or the console if the tutorial is running.
			setScriptPause(true);
			setConsolePause(true);
		}
		setScrollPause(true);
		screen_RestartBackDrop();
	}
}
Exemple #4
0
//
// Quick hack to throw up a ingame 'popup' for when the host drops connection.
//
void intAddInGamePopup(void)
{
    //clear out any mission widgets - timers etc that may be on the screen
    clearMissionWidgets();
    setWidgetsStatus(true);
    intResetScreen(false);

    if (isInGamePopupUp) return;

    audio_StopAll();

    if(!gamePaused())
    {
        kf_TogglePauseMode();	// Pause the game.
    }

    W_FORMINIT sFormInit;

    sFormInit.formID	= 0;
    sFormInit.id		= INTINGAMEPOPUP;
    sFormInit.style		= WFORM_PLAIN;
    sFormInit.width		= 600;
    sFormInit.height	= 160;
    sFormInit.x			= (SWORD)(20+D_W);
    sFormInit.y			= (SWORD)((240-(160/2))+D_H);
    sFormInit.pDisplay	= intOpenPlainForm;
    sFormInit.disableChildren= true;

    widgAddForm(psWScreen, &sFormInit);

    // add the text "buttons" now
    W_BUTINIT sButInit;

    sButInit.formID		= INTINGAMEPOPUP;
    sButInit.style		= OPALIGN;
    sButInit.width		= 600;
    sButInit.FontID		= font_large;
    sButInit.x			= 0;
    sButInit.height		= 10;
    sButInit.pDisplay	= displayTextOption;

    sButInit.id			= INTINGAMEOP_POPUP_MSG2;
    sButInit.y			= 20;
    sButInit.pText		= _("Host has quit the game!");

    widgAddButton(psWScreen, &sButInit);

    sButInit.id			= INTINGAMEOP_POPUP_MSG1;
    sButInit.y			= 60;
    sButInit.pText		= _("The game can't continue without the host.");

    widgAddButton(psWScreen, &sButInit);

    sButInit.id			= INTINGAMEOP_POPUP_QUIT;
    sButInit.y			= 124;
    sButInit.pText		= _("-->  QUIT  <--");

    widgAddButton(psWScreen, &sButInit);

    intMode		= INT_POPUPMSG;			// change interface mode.
    isInGamePopupUp = true;
}
Exemple #5
0
static bool _intAddInGameOptions(void)
{
    audio_StopAll();

    //clear out any mission widgets - timers etc that may be on the screen
    clearMissionWidgets();


    setWidgetsStatus(true);

    //if already open, then close!
    if (widgGetFromID(psWScreen,INTINGAMEOP))
    {
        intCloseInGameOptions(false, true);
        return true;
    }

    intResetScreen(false);


    // Pause the game.
    if(!gamePaused())
    {
        kf_TogglePauseMode();
    }

    W_FORMINIT sFormInit;
    sFormInit.width		= INTINGAMEOP_W;

    // add form
    sFormInit.formID	= 0;
    sFormInit.id		= INTINGAMEOP;
    sFormInit.style		= WFORM_PLAIN;
    sFormInit.x			= (SWORD)INTINGAMEOP_X;
    sFormInit.y			= (SWORD)INTINGAMEOP_Y;
    sFormInit.height	= INTINGAMEOP_H;

    if ((!bMultiPlayer || (NetPlay.bComms == 0)) && !bInTutorial)
    {
    }
    else
    {
        sFormInit.height	= INTINGAMEOP_HS;
    }

    sFormInit.pDisplay	= intOpenPlainForm;
    sFormInit.disableChildren= true;

    widgAddForm(psWScreen, &sFormInit);

    // add 'quit' text
    if ((!bMultiPlayer || (NetPlay.bComms == 0)) && !bInTutorial)
    {
        addIGTextButton(INTINGAMEOP_QUIT, INTINGAMEOP_5_Y, INTINGAMEOP_OP_W, _("Quit"), OPALIGN);
    }
    else
    {
        addIGTextButton(INTINGAMEOP_QUIT, INTINGAMEOP_3_Y, INTINGAMEOP_OP_W, _("Quit"), OPALIGN);
    }

    // add 'resume'
    addIGTextButton(INTINGAMEOP_RESUME, INTINGAMEOP_1_Y, INTINGAMEOP_OP_W, _("Resume Game"), OPALIGN);

    // add 'options'
    addIGTextButton(INTINGAMEOP_OPTIONS, INTINGAMEOP_2_Y, INTINGAMEOP_OP_W, _("Audio Options"), OPALIGN);

    if ((!bMultiPlayer || (NetPlay.bComms == 0)) && !bInTutorial)
    {
        // add 'load'
        addIGTextButton(INTINGAMEOP_LOAD, INTINGAMEOP_3_Y, INTINGAMEOP_OP_W, _("Load Game"), OPALIGN);
        // add 'save'
        addIGTextButton(INTINGAMEOP_SAVE, INTINGAMEOP_4_Y, INTINGAMEOP_OP_W, _("Save Game"), OPALIGN);
    }

    intMode		= INT_INGAMEOP;			// change interface mode.
    InGameOpUp	= true;					// inform interface.

    wzSetCursor(CURSOR_DEFAULT);

    return true;
}