示例#1
0
// Updates stuff each tick
void WI_Ticker(void)
{
    // counter for general background animation
    bcnt++;  

    if (bcnt == 1)
    {
	// intermission music
  	if ( gamemode == commercial )
	  S_ChangeMusic(mus_dm2int, true);
	else
	  S_ChangeMusic(mus_inter, true); 
    }

    WI_checkForAccelerate();

    switch (state)
    {
      case StatCount:
	if (deathmatch) WI_updateDeathmatchStats();
	else if (netgame) WI_updateNetgameStats();
	else WI_updateStats();
	break;
	
      case ShowNextLoc:
	WI_updateShowNextLoc();
	break;
	
      case NoState:
	WI_updateNoState();
	break;
    }

}
示例#2
0
// Updates stuff each tick
void WI_Ticker(void)
{
    if (menuactive || paused)
        return;

    // counter for general background animation
    bcnt++;

    if (bcnt == 1)
        // intermission music
        S_ChangeMusic(gamemode == commercial ? mus_dm2int : mus_inter, true, false);

    WI_checkForAccelerate();

    switch (state)
    {
        case StatCount:
            if (deathmatch)
                WI_updateDeathmatchStats();
            else if (netgame)
                WI_updateNetgameStats();
            else
                WI_updateStats();
            break;

        case ShowNextLoc:
            WI_updateShowNextLoc();
            break;

        case NoState:
            WI_updateNoState();
            break;
    }
}
示例#3
0
// Updates stuff each tick
void WI_Ticker (void)
{
	// counter for general background animation
	bcnt++;

	if (bcnt == 1)
	{
		// intermission music
		if ((gameinfo.flags & GI_MAPxx))
			S_ChangeMusic ("d_dm2int", true);
		else
			S_ChangeMusic ("d_inter", true);
	}

    WI_checkForAccelerate();

	switch (state)
	{
		case StatCount:
			if (multiplayer && sv_maxplayers > 1)
			{
				if (sv_gametype == 0 && !wi_newintermission && sv_maxplayers < 5)
					WI_updateNetgameStats();
				else
					WI_updateNoState();
			}
			else
				WI_updateStats();
			break;

		case ShowNextLoc:
			WI_updateShowNextLoc();
			break;

		case NoState:
			WI_updateNoState();
			break;
	}

	// [ML] If cl_autoscreenshot is on, take a screenshot 3 seconds
	//		after the level end. (Multiplayer only)
	if (cl_autoscreenshot && multiplayer && bcnt == (3 * TICRATE))
	{
		AddCommandString("screenshot");
	}
}
示例#4
0
OVERLAY void F_Ticker(void)
{
  int i;
  if (!demo_compatibility)
    WI_checkForAccelerate();  // killough 3/28/98: check for acceleration
  else
    if (gamemode == commercial && finalecount > 50) // check for skipping
      for (i=0; i<MAXPLAYERS; i++)
        if (players[i].cmd.buttons)
          goto next_level;      // go on to the next level

  // advance animation
  finalecount++;
 
  if (finalestage == 2)
    F_CastTicker();

  if (!finalestage)
    {
      fixed_t speed, endcount;
      speed = demo_compatibility ? TEXTSPEED : Get_TextSpeed();
      endcount = FixedMul(strlen(finaletext) * FRACUNIT, speed);
      endcount += (midstage ? NEWTEXTWAIT : TEXTWAIT);
      /* killough 2/28/98: changed to allow acceleration */
      if (finalecount > endcount ||
          (midstage && acceleratestage)) {       
        if (gamemode != commercial)       // Doom 1 / Ultimate Doom episode end
          {                               // with enough time, it's automatic
            finalecount = 0;
            finalestage = 1;
            wipegamestate = (gamestate_t)-1;         // force a wipe
            if (gameepisode == 3)
              S_StartMusic(mus_bunny);
          }
        else   // you must press a button to continue in Doom 2
          if (!demo_compatibility && midstage)
            {
            next_level:
              if (gamemap == 30)
                F_StartCast();              // cast of Doom 2 characters
              else
                gameaction = ga_worlddone;  // next level, e.g. MAP07
            }
      }
    }
}
示例#5
0
// Updates stuff each tick
void WI_Ticker ()
{
	// counter for general background animation
	bcnt++;  

	if (bcnt == 1)
	{
		// intermission music
		if (gameinfo.gametype == GAME_Heretic)
			S_ChangeMusic ("mus_intr");
		else if (gameinfo.gametype == GAME_Hexen)
			S_ChangeMusic ("hub");
		else if (gamemode == commercial)
			S_ChangeMusic ("d_dm2int");
		else
			S_ChangeMusic ("d_inter"); 
	}

	WI_checkForAccelerate ();

	switch (state)
	{
	case StatCount:
		if (deathmatch)
			WI_updateDeathmatchStats ();
		else if (multiplayer)
			WI_updateNetgameStats ();
		else
			WI_updateStats ();
		break;
	
	case ShowNextLoc:
		WI_updateShowNextLoc ();
		break;
	
	case NoState:
		WI_updateNoState ();
		break;

	case LeavingIntermission:
		break;	// Silence GCC
	}
}
示例#6
0
// Updates stuff each tick
void WI_Ticker (void)
{
    // counter for general background animation
    bcnt++;

    if (bcnt == 1)
    {
        // intermission music
        if ((gameinfo.flags & GI_MAPxx))
            S_ChangeMusic ("d_dm2int", true);
        else
            S_ChangeMusic ("d_inter", true);
    }

    WI_checkForAccelerate();

    switch (state)
    {
    case StatCount:
        if (multiplayer && sv_maxplayers > 1)
        {
            if (sv_gametype == 0 && !wi_newintermission && sv_maxplayers < 5)
                WI_updateNetgameStats();
            else
                WI_updateNoState();
        }
        else
            WI_updateStats();
        break;

    case ShowNextLoc:
        WI_updateShowNextLoc();
        break;

    case NoState:
        WI_updateNoState();
        break;
    }
}
示例#7
0
文件: wi_stuff.c 项目: jezze/doom
void WI_Ticker(void)
{

    bcnt++;

    if (bcnt == 1)
    {

        if (gamemode == commercial)
            S_ChangeMusic(mus_dm2int, true);
        else
            S_ChangeMusic(mus_inter, true);

    }

    WI_checkForAccelerate();

    switch (state)
    {

    case StatCount:
        WI_updateStats();

        break;

    case ShowNextLoc:
        WI_updateShowNextLoc();

        break;

    case NoState:
        WI_updateNoState();

        break;

    }

}
示例#8
0
//
// F_Ticker
//
void F_Ticker(void)
{
    if (menuactive || paused || consoleactive)
        return;

    WI_checkForAccelerate();

    // advance animation
    finalecount++;

    if (finalestage == F_STAGE_CAST)
        F_CastTicker();

    if (finalestage == F_STAGE_TEXT)
    {
        if (finalecount > FixedMul(strlen(finaletext) * FRACUNIT, TextSpeed())
            + (midstage ? NEWTEXTWAIT : TEXTWAIT) || (midstage && acceleratestage))
        {
            if (gamemode != commercial)
            {
                finalecount = 0;
                finalestage = 1;
                wipegamestate = GS_NONE;        // force a wipe
                if (gameepisode == 3)
                    S_StartMusic(mus_bunny);
            }
            else if (midstage)
            {
                if (gamemap == 30 || (gamemission == pack_nerve && gamemap == 8))
                    F_StartCast();
                else
                    gameaction = ga_worlddone;
            }
        }
    }
}