void CheatMusFunc(PlayerPawn *p, const byte *arg) { // 'mus' cheat for changing music int musnum; const char *msg; msg = STSTR_MUS; if (game.mode == gm_doom2) { musnum = (arg[0]-'0')*10 + arg[1]-'0'; if (musnum < 1 || musnum > 35) msg = STSTR_NOMUS; else S_StartMusic(musnum + mus_runnin - 1, true); } else { musnum = (arg[0]-'1')*9 + (arg[1]-'1'); if (musnum < 0 || musnum > 31) msg = STSTR_NOMUS; else S_StartMusic(musnum + mus_e1m1, true); } p->player->SetMessage(msg, false); }
// // This cycles through the demo sequences. // FIXME - version dependend demo numbers? // void D_DoAdvanceDemo (void) { players[consoleplayer].playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; demosequence = (demosequence+1)%6; switch (demosequence) { case 0: if (commercial) pagetic = 35 * 11; else pagetic = 170; gamestate = GS_DEMOSCREEN; pagename = "TITLEPIC"; if (commercial) S_StartMusic(mus_dm2ttl); else S_StartMusic (mus_intro); break; case 1: G_DeferedPlayDemo ("demo1"); break; case 2: pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = "CREDIT"; break; case 3: G_DeferedPlayDemo ("demo2"); break; case 4: gamestate = GS_DEMOSCREEN; if (commercial) { pagetic = 35 * 11; pagename = "TITLEPIC"; S_StartMusic(mus_dm2ttl); } else { pagetic = 200; pagename = "HELP2"; } break; case 5: G_DeferedPlayDemo ("demo3"); break; } }
// // This cycles through the demo sequences. // void D_DoAdvanceDemo(void) { static boolean starttitle = true; players[consoleplayer].playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; gamestate = GS_DEMOSCREEN; blurred = false; if ((demosequence = !demosequence)) { pagename = (TITLEPIC ? "TITLEPIC" : (DMENUPIC ? "DMENUPIC" : "INTERPIC")); pagetic = 20 * TICRATE; S_StartMusic(gamemode == commercial ? mus_dm2ttl : mus_intro); } else { pagename = "CREDIT"; pagetic = 10 * TICRATE; } if (starttitle) starttitle = false; else forcewipe = true; }
// // F_Ticker // void F_Ticker (void) { // denis - do this serverside only // check for skipping // [RH] Non-commercial can be skipped now, too if (serverside && finalecount > 50 && finalestage != 1) { // go on to the next level // [RH] or just reveal the entire message if we're still ticking it Players::iterator it = players.begin(); for (;it != players.end();++it) if (it->cmd.buttons) break; if (it != players.end()) { /*if (finalecount < (signed)(strlen (finaletext)*TEXTSPEED)) { finalecount = strlen (finaletext)*TEXTSPEED; } else {*/ if (!strncmp (level.nextmap, "EndGame", 7) || (gamemode == retail_chex && !strncmp (level.nextmap, "E1M6", 4))) // [ML] Chex mode: game is over { // after E1M5 if (level.nextmap[7] == 'C') { F_StartCast (); } else { finalecount = 0; finalestage = 1; wipegamestate = GS_FORCEWIPE; if (level.nextmap[7] == '3') S_StartMusic ("d_bunny"); } } else { gameaction = ga_worlddone; } //} } } // advance animation finalecount++; if (finalestage == 2) { F_CastTicker (); return; } }
static void Title_Start(void) { gameaction = ga_nothing; pagetic = gametic; menuactive = true; paused = false; gamestate = GS_NONE; S_StartMusic(mus_title); M_SetMainMenu(); }
// // F_Ticker // void F_Ticker (void) { int i; // check for skipping if ( (gamemode == GAME_MODE_COMMERCIAL) && ( finalecount > 50) ) { // go on to the next level for (i = 0 ; i < MAXPLAYERS ; i++) if (players[i].cmd.buttons) { break; } if (i < MAXPLAYERS) { if (gamemap == 30) { F_StartCast (); } else { gameaction = ga_worlddone; } } } // advance animation finalecount++; if (finalestage == 2) { F_CastTicker (); return; } if ( gamemode == GAME_MODE_COMMERCIAL) { return; } if (!finalestage && finalecount > strlen (finaletext)*TEXTSPEED + TEXTWAIT) { finalecount = 0; finalestage = 1; wipegamestate = -1; // force a wipe if (gameepisode == 3) { S_StartMusic (mus_bunny); } } }
// // F_Ticker // void F_Ticker (void) { size_t i; // check for skipping if ( (gamemode == commercial) && ( finalecount > 50) ) { // go on to the next level for (i=0 ; i<MAXPLAYERS ; i++) if (players[i].cmd.buttons) break; if (i < MAXPLAYERS) { if (gamemission == pack_nerve && singleplayer && gamemap == 8) F_StartCast (); else if (gamemission == pack_master && singleplayer && (gamemap == 20 || gamemap == 21)) F_StartCast (); else if (gamemap == 30) F_StartCast (); else gameaction = ga_worlddone; } } // advance animation finalecount++; if (finalestage == F_STAGE_CAST) { F_CastTicker (); return; } if ( gamemode == commercial) return; if (finalestage == F_STAGE_TEXT && finalecount>strlen (finaletext)*TEXTSPEED + TEXTWAIT) { finalecount = 0; finalestage = F_STAGE_ARTSCREEN; wipegamestate = -1; // force a wipe if (gameepisode == 3) S_StartMusic (mus_bunny); } }
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 } } } }
// // F_Ticker // void F_Ticker (void) { int i; // check for skipping if ( (gamemode == commercial) && ( finalecount > 50) ) { // go on to the next level for (i=0 ; i<MAXPLAYERS ; i++) if (players[i].cmd.buttons) break; if (i < MAXPLAYERS) { if (gamemap == 30) F_StartCast (); else gameaction = ga_worlddone; } } // advance animation finalecount++; if (finalestage == 2) { F_CastTicker (); return; } if ( gamemode == commercial) return; if (!finalestage && finalecount>strlen (finaletext)*TEXTSPEED + TEXTWAIT) { finalecount = 0; finalestage = 1; wipegamestate = -1; // force a wipe #ifdef USE_SOUND if (gameepisode == 3) S_StartMusic (mus_bunny); #endif } }
void P_Start(void) { int i; mapdef_t* map; map = P_GetMapInfo(gamemap); for(i = 0; i < MAXPLAYERS; i++) { // players can't be hurt on title map if(map->forcegodmode) { players[i].cheats |= CF_GODMODE; } // turn off godmode on hectic map else if(map->clearchts) { players[i].cheats &= ~CF_GODMODE; } else { break; } } // turn off/clear some things AM_Reset(); AM_Stop(); M_ClearRandom(); // do a nice little fade in effect P_FadeInBrightness(); // autoactivate line specials P_ActivateLineByTag(999, players[0].mo); // enable menu and set gamestate allowmenu = true; gamestate = GS_LEVEL; S_StartMusic(map->music); }
// // 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; } } } }
// // F_Ticker // void F_Ticker (void) { int i; // check for skipping if ( (::g->gamemode == commercial) && ( ::g->finalecount > 50) ) { // go on to the next level for (i=0 ; i<MAXPLAYERS ; i++) if (::g->players[i].cmd.buttons) break; if ( finaleButtonPressed || i < MAXPLAYERS) { bool castStarted = false; if( ::g->gamemission == doom2 || ::g->gamemission == pack_plut || ::g->gamemission == pack_tnt ) { if (::g->gamemap == 30) { F_StartCast (); castStarted = true; } } else if( ::g->gamemission == pack_master ) { if( :: g->gamemap == 21 ) { F_StartCast (); castStarted = true; } } else if( ::g->gamemission == pack_nerve ) { if( :: g->gamemap == 8 ) { F_StartCast (); castStarted = true; } } if( castStarted == false ) { ::g->gameaction = ga_worlddone; } } } bool SkipTheText = finaleButtonPressed; // advance animation ::g->finalecount++; finaleButtonPressed = false; if (::g->finalestage == 2) { F_CastTicker (); return; } if ( ::g->gamemode == commercial) { startButtonPressed = false; return; } if( SkipTheText && ( ::g->finalecount > 50) ) { ::g->finalecount = static_cast<int>(strlen(finaletext)) * TEXTSPEED + TEXTWAIT; } if (!::g->finalestage && ::g->finalecount > static_cast<int>(strlen(finaletext)) * TEXTSPEED + TEXTWAIT) { ::g->finalecount = 0; ::g->finalestage = 1; ::g->wipegamestate = (gamestate_t)-1; // force a wipe if (::g->gameepisode == 3) S_StartMusic (mus_bunny); } startButtonPressed = false; }
// // This cycles through the demo sequences. // FIXME - version dependend demo numbers? // void D_DoAdvanceDemo (void) { players[consoleplayer].playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; // The Ultimate Doom executable changed the demo sequence to add // a DEMO4 demo. Final Doom was based on Ultimate, so also // includes this change; however, the Final Doom IWADs do not // include a DEMO4 lump, so the game bombs out with an error // when it reaches this point in the demo sequence. // However! There is an alternate version of Final Doom that // includes a fixed executable. if (gameversion == exe_ultimate || gameversion == exe_final) demosequence = (demosequence+1)%7; else demosequence = (demosequence+1)%6; switch (demosequence) { case 0: if ( gamemode == commercial ) pagetic = TICRATE * 11; else pagetic = 170; gamestate = GS_DEMOSCREEN; pagename = DEH_String("TITLEPIC"); if ( gamemode == commercial ) S_StartMusic(mus_dm2ttl); else S_StartMusic (mus_intro); break; case 1: G_DeferedPlayDemo(DEH_String("demo1")); break; case 2: pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = DEH_String("CREDIT"); break; case 3: G_DeferedPlayDemo(DEH_String("demo2")); break; case 4: gamestate = GS_DEMOSCREEN; if ( gamemode == commercial) { pagetic = TICRATE * 11; pagename = DEH_String("TITLEPIC"); S_StartMusic(mus_dm2ttl); } else { pagetic = 200; if ( gamemode == retail ) pagename = DEH_String("CREDIT"); else pagename = DEH_String("HELP2"); } break; case 5: G_DeferedPlayDemo(DEH_String("demo3")); break; // THE DEFINITIVE DOOM Special Edition demo case 6: G_DeferedPlayDemo(DEH_String("demo4")); break; } // The Doom 3: BFG Edition version of doom2.wad does not have a // TITLETPIC lump. Use INTERPIC instead as a workaround. if (bfgedition && !strcasecmp(pagename, "TITLEPIC") && W_CheckNumForName("titlepic") < 0) { pagename = DEH_String("INTERPIC"); } }
// // This cycles through the demo sequences. // void D_DoAdvanceDemo (void) { const char *pagename = NULL; consoleplayer().playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; // [Russell] - Old demo sequence used in original games, zdoom's // dynamic one was too dynamic for its own good // [Nes] - Newer demo sequence with better flow. if (W_CheckNumForName("DEMO4") >= 0 && gamemode != retail_chex) demosequence = (demosequence+1)%8; else demosequence = (demosequence+1)%6; switch (demosequence) { case 0: if (gamemode == commercial) pagetic = TICRATE * 11; else pagetic = 170; gamestate = GS_DEMOSCREEN; pagename = "TITLEPIC"; S_StartMusic(gameinfo.titleMusic); break; case 1: G_DeferedPlayDemo("DEMO1"); break; case 2: pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = "CREDIT"; break; case 3: G_DeferedPlayDemo("DEMO2"); break; case 4: gamestate = GS_DEMOSCREEN; if (gamemode == commercial || gamemode == retail) { if (gamemode == commercial) pagetic = TICRATE * 11; else pagetic = 170; pagename = "TITLEPIC"; S_StartMusic(gameinfo.titleMusic); } else { pagetic = 200; if (gamemode == retail_chex) // [ML] Chex mode just cycles this screen pagename = "CREDIT"; else pagename = "HELP2"; } break; case 5: G_DeferedPlayDemo("DEMO3"); break; case 6: pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = "CREDIT"; break; case 7: G_DeferedPlayDemo("DEMO4"); break; } // [Russell] - Still need this toilet humor for now unfortunately if (pagename) { int width, height; patch_t *data; if (gameinfo.flags & GI_PAGESARERAW) { data = W_CachePatch (pagename); width = 320; height = 200; } else { data = W_CachePatch (pagename); width = data->width(); height = data->height(); } if (page && (page->width != width || page->height != height)) { I_FreeScreen(page); page = NULL; } if (page == NULL) page = I_AllocateScreen (width, height, 8); page->Lock (); if (gameinfo.flags & GI_PAGESARERAW) page->DrawBlock (0, 0, 320, 200, (byte *)data); else page->DrawPatch (data, 0, 0); page->Unlock (); } }
// // This cycles through the demo sequences. // void D_DoAdvanceDemo (void) { const char *pagename = NULL; consoleplayer().playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; // [Russell] - Old demo sequence used in original games, zdoom's // dynamic one was too dynamic for its own good // [Nes] - Newer demo sequence with better flow. if (W_CheckNumForName("DEMO4") >= 0 && gamemode != retail_chex) demosequence = (demosequence+1)%8; else demosequence = (demosequence+1)%6; switch (demosequence) { case 0: if (gameinfo.flags & GI_MAPxx) pagetic = TICRATE * 11; else pagetic = 170; gamestate = GS_DEMOSCREEN; pagename = gameinfo.titlePage; S_StartMusic(gameinfo.titleMusic); break; case 1: G_DeferedPlayDemo("DEMO1"); break; case 2: pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = gameinfo.creditPage1; break; case 3: G_DeferedPlayDemo("DEMO2"); break; case 4: gamestate = GS_DEMOSCREEN; if ((gameinfo.flags & GI_MAPxx) || (gameinfo.flags & GI_MENUHACK_RETAIL)) { if (gameinfo.flags & GI_MAPxx) pagetic = TICRATE * 11; else pagetic = 170; pagename = gameinfo.titlePage; S_StartMusic(gameinfo.titleMusic); } else { pagetic = 200; if (gamemode == retail_chex) // [ML] Chex mode just cycles this screen pagename = gameinfo.creditPage1; else pagename = gameinfo.creditPage2; } break; case 5: G_DeferedPlayDemo("DEMO3"); break; case 6: pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = gameinfo.creditPage2; break; case 7: G_DeferedPlayDemo("DEMO4"); break; } // [Russell] - Still need this toilet humor for now unfortunately if (pagename) { const int width = 320, height = 200; patch_t *data; if (page && (page->width != screen->width || page->height != screen->height)) { I_FreeScreen(page); page = NULL; } data = W_CachePatch (pagename); if (page == NULL) { if (screen->isProtectedRes()) page = I_AllocateScreen(data->width(), data->height(), 8); else page = I_AllocateScreen(screen->width, screen->height, 8); } page->Lock (); if (gameinfo.flags & GI_PAGESARERAW) page->DrawBlock (0, 0, width, height, (byte *)data); else page->DrawPatchFullScreen(data); page->Unlock (); } }
// // This cycles through the demo sequences. // FIXME - version dependend demo numbers? // void D_DoAdvanceDemo(void) { players[consoleplayer].playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; if (gamemode == retail) { demosequence = (demosequence+1)%7; } else { demosequence = (demosequence+1)%6; } switch (demosequence) { case 0: { if (gamemode == commercial) { pagetic = TICRATE * 11; } else { pagetic = 170; } gamestate = GS_DEMOSCREEN; pagename = "TITLEPIC"; if (gamemode == commercial) { S_StartMusic(mus_dm2ttl); } else { S_StartMusic(mus_intro); } break; } case 1: { G_DeferedPlayDemo("demo1"); break; } case 2: { pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = "CREDIT"; break; } case 3: { G_DeferedPlayDemo("demo2"); break; } case 4: { gamestate = GS_DEMOSCREEN; if (gamemode == commercial) { pagetic = TICRATE * 11; pagename = "TITLEPIC"; S_StartMusic(mus_dm2ttl); } else { pagetic = 200; if (gamemode == retail) { pagename = "CREDIT"; } else { pagename = "HELP2"; } } break; } case 5: { G_DeferedPlayDemo("demo3"); break; } // THE DEFINITIVE DOOM Special Edition demo case 6: { G_DeferedPlayDemo("demo4"); break; } } }
static void D_DrawTitle1(const char *name) { S_StartMusic(mus_intro); pagetic = (TICRATE*170)/35; D_SetPageName(name); }
// // This cycles through the demo sequences. // FIXME - version dependend demo numbers? // // [STRIFE] Modified for the opening slideshow and the exit screen // void D_DoAdvanceDemo (void) { players[consoleplayer].playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; // villsa 09/12/10: [STRIFE] converted pagetics to ticrate switch (demosequence) { case -5: // exit the game I_Quit(); return; case -4: // show exit screen menuactive = false; pagetic = 3*TICRATE; gamestate = GS_DEMOSCREEN; pagename = DEH_String("PANEL7"); S_StartMusic(mus_fast); if(isdemoversion) demosequence = -3; // show Velocity logo else demosequence = -5; // exit return; case -3: // show Velocity logo for demo version pagetic = 6*TICRATE; gamestate = GS_DEMOSCREEN; pagename = DEH_String("vellogo"); demosequence = -5; // exit return; case -2: // title screen pagetic = 6*TICRATE; gamestate = GS_DEMOSCREEN; pagename = DEH_String("TITLEPIC"); S_StartMusic(mus_logo); demosequence = -1; // start intro cinematic return; case -1: // start of intro cinematic pagetic = 10; gamestate = GS_DEMOSCREEN; pagename = DEH_String("PANEL0"); S_StartSound(NULL, sfx_rb2act); wipegamestate = -1; break; case 0: // Rogue logo pagetic = 4*TICRATE; gamestate = GS_DEMOSCREEN; pagename = DEH_String("RGELOGO"); wipegamestate = -1; break; case 1: pagetic = 7*TICRATE; // The comet struck our planet without gamestate = GS_DEMOSCREEN; // warning.We lost our paradise in a pagename = DEH_String("PANEL1"); // single, violent stroke. I_StartVoice(DEH_String("pro1")); S_StartMusic(mus_intro); break; case 2: pagetic = 9*TICRATE; // The impact released a virus which gamestate = GS_DEMOSCREEN; // swept through the land and killed pagename = DEH_String("PANEL2"); // millions. They turned out to be I_StartVoice(DEH_String("pro2")); // the lucky ones... break; case 3: pagetic = 12*TICRATE; // For those that did not die became gamestate = GS_DEMOSCREEN; // mutations of humanity. Some became pagename = DEH_String("PANEL3"); // fanatics who heard the voice of a I_StartVoice(DEH_String("pro3")); // malignant God in their heads, and break; // called themselves the Order. case 4: pagetic = 11*TICRATE; // Those of us who were deaf to this pagename = DEH_String("PANEL4"); // voice suffer horribly and are gamestate = GS_DEMOSCREEN; // forced to serve these ruthless I_StartVoice(DEH_String("pro4")); // psychotics, who wield weapons more break; // powerful than anything we can muster. case 5: pagetic = 10*TICRATE; // They destroy our women and children, gamestate = GS_DEMOSCREEN; // so that we must hide them underground, pagename = DEH_String("PANEL5"); // and live like animals in constant I_StartVoice(DEH_String("pro5")); // fear for our lives. break; case 6: // But there are whispers of discontent. pagetic = 16*TICRATE; // If we organize, can we defeat our gamestate = GS_DEMOSCREEN; // masters? Weapons are being stolen, pagename = DEH_String("PANEL6"); // soldiers are being trained. A I_StartVoice(DEH_String("pro6")); // Movement is born! Born of lifelong break; // STRIFE! case 7: // titlepic again - unused... pagetic = 9*TICRATE; gamestate = GS_DEMOSCREEN; pagename = DEH_String("TITLEPIC"); wipegamestate = -1; break; case 8: // demo ClearTmp(); pagetic = 9*TICRATE; G_DeferedPlayDemo(DEH_String("demo1")); break; case 9: // velocity logo? - unused... pagetic = 6*TICRATE; gamestate = GS_DEMOSCREEN; pagename = DEH_String("vellogo"); wipegamestate = -1; break; case 10: // credits gamestate = GS_DEMOSCREEN; pagetic = 12*TICRATE; pagename = DEH_String("CREDIT"); wipegamestate = -1; break; default: break; } ++demosequence; if(demosequence > 11) demosequence = -2; if(demosequence == 7 || demosequence == 9) ++demosequence; }
// // This cycles through the demo sequences. // void D_DoAdvanceDemo (void) { const char *pagename = NULL; consoleplayer().playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; // [Russell] - Old demo sequence used in original games, zdoom's // dynamic one was too dynamic for its own good // [Nes] - Newer demo sequence with better flow. if (W_CheckNumForName("DEMO4") >= 0 && gamemode != retail_chex) demosequence = (demosequence+1)%8; else demosequence = (demosequence+1)%6; switch (demosequence) { case 0: if (gameinfo.flags & GI_MAPxx) pagetic = TICRATE * 11; else pagetic = 170; gamestate = GS_DEMOSCREEN; pagename = gameinfo.titlePage; S_StartMusic(gameinfo.titleMusic); break; case 1: G_DeferedPlayDemo("DEMO1"); break; case 2: pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = gameinfo.creditPage1; break; case 3: G_DeferedPlayDemo("DEMO2"); break; case 4: gamestate = GS_DEMOSCREEN; if ((gameinfo.flags & GI_MAPxx) || (gameinfo.flags & GI_MENUHACK_RETAIL)) { if (gameinfo.flags & GI_MAPxx) pagetic = TICRATE * 11; else pagetic = 170; pagename = gameinfo.titlePage; S_StartMusic(gameinfo.titleMusic); } else { pagetic = 200; if (gamemode == retail_chex) // [ML] Chex mode just cycles this screen pagename = gameinfo.creditPage1; else pagename = gameinfo.creditPage2; } break; case 5: G_DeferedPlayDemo("DEMO3"); break; case 6: pagetic = 200; gamestate = GS_DEMOSCREEN; pagename = gameinfo.creditPage2; break; case 7: G_DeferedPlayDemo("DEMO4"); break; } // [Russell] - Still need this toilet humor for now unfortunately if (pagename) { Texture::TextureSourceType textype = (gameinfo.flags & GI_PAGESARERAW) ? Texture::TEX_RAW : Texture::TEX_PATCH; page_texhandle = texturemanager.getHandle(pagename, textype); } }
// // F_DoSlideShow // // [STRIFE] New function // haleyjd 09/13/10: Handles slideshow states. Begging to be tabulated! // static void F_DoSlideShow(void) { patch_t *patch; switch(slideshow_state) { case SLIDE_UNKNOWN: // state #0, seems to be unused slideshow_tics = 700; slideshow_state = SLIDE_EXIT; // falls through into state 1, so above is pointless? ... case SLIDE_PROGRAMMER1: // state #1 slideshow_panel = DEH_String("SS2F1"); I_StartVoice(DEH_String("MAC10")); slideshow_state = SLIDE_PROGRAMMER2; slideshow_tics = 315; break; case SLIDE_PROGRAMMER2: // state #2 slideshow_panel = DEH_String("SS2F2"); I_StartVoice(DEH_String("MAC11")); slideshow_state = SLIDE_PROGRAMMER3; slideshow_tics = 350; break; case SLIDE_PROGRAMMER3: // state #3 slideshow_panel = DEH_String("SS2F3"); I_StartVoice(DEH_String("MAC12")); slideshow_state = SLIDE_PROGRAMMER4; slideshow_tics = 420; break; case SLIDE_PROGRAMMER4: // state #4 slideshow_panel = DEH_String("SS2F4"); I_StartVoice(DEH_String("MAC13")); slideshow_state = SLIDE_EXITHACK; // End of slides slideshow_tics = 595; break; case SLIDE_SIGIL1: // state #5 slideshow_panel = DEH_String("SS3F1"); I_StartVoice(DEH_String("MAC16")); slideshow_state = SLIDE_SIGIL2; slideshow_tics = 350; break; case SLIDE_SIGIL2: // state #6 slideshow_panel = DEH_String("SS3F2"); I_StartVoice(DEH_String("MAC17")); slideshow_state = SLIDE_SIGIL3; slideshow_tics = 420; break; case SLIDE_SIGIL3: // state #7 slideshow_panel = DEH_String("SS3F3"); I_StartVoice(DEH_String("MAC18")); slideshow_tics = 420; slideshow_state = SLIDE_SIGIL4; break; case SLIDE_SIGIL4: // state #8 slideshow_panel = DEH_String("SS3F4"); I_StartVoice(DEH_String("MAC19")); slideshow_tics = 385; slideshow_state = SLIDE_EXITHACK; // End of slides break; case SLIDE_GOODEND1: // state #10 slideshow_panel = DEH_String("SS4F1"); S_StartMusic(mus_happy); I_StartVoice(DEH_String("RIE01")); slideshow_state = SLIDE_GOODEND2; slideshow_tics = 455; break; case SLIDE_GOODEND2: // state #11 slideshow_panel = DEH_String("SS4F2"); I_StartVoice(DEH_String("BBX01")); slideshow_state = SLIDE_GOODEND3; slideshow_tics = 385; break; case SLIDE_GOODEND3: // state #12 slideshow_panel = DEH_String("SS4F3"); I_StartVoice(DEH_String("BBX02")); slideshow_state = SLIDE_GOODEND4; slideshow_tics = 490; break; case SLIDE_GOODEND4: // state #13 slideshow_panel = DEH_String("SS4F4"); slideshow_state = SLIDE_EXIT; // Go to end credits slideshow_tics = 980; break; case SLIDE_BADEND1: // state #14 S_StartMusic(mus_sad); slideshow_panel = DEH_String("SS5F1"); I_StartVoice(DEH_String("SS501b")); slideshow_state = SLIDE_BADEND2; slideshow_tics = 385; break; case SLIDE_BADEND2: // state #15 slideshow_panel = DEH_String("SS5F2"); I_StartVoice(DEH_String("SS502b")); slideshow_state = SLIDE_BADEND3; slideshow_tics = 350; break; case SLIDE_BADEND3: // state #16 slideshow_panel = DEH_String("SS5F3"); I_StartVoice(DEH_String("SS503b")); slideshow_state = SLIDE_EXIT; // Go to end credits slideshow_tics = 385; break; case SLIDE_BLAHEND1: // state #17 S_StartMusic(mus_end); slideshow_panel = DEH_String("SS6F1"); I_StartVoice(DEH_String("SS601A")); slideshow_state = SLIDE_BLAHEND2; slideshow_tics = 280; break; case SLIDE_BLAHEND2: // state #18 S_StartMusic(mus_end); slideshow_panel = DEH_String("SS6F2"); I_StartVoice(DEH_String("SS602A")); slideshow_state = SLIDE_BLAHEND3; slideshow_tics = 280; break; case SLIDE_BLAHEND3: // state #19 S_StartMusic(mus_end); slideshow_panel = DEH_String("SS6F3"); I_StartVoice(DEH_String("SS603A")); slideshow_state = SLIDE_EXIT; // Go to credits slideshow_tics = 315; break; case SLIDE_DEMOEND1: // state #25 - only exists in 1.31 slideshow_panel = DEH_String("PANEL7"); slideshow_tics = 175; slideshow_state = SLIDE_DEMOEND2; break; case SLIDE_DEMOEND2: // state #26 - ditto slideshow_panel = DEH_String("VELLOGO"); slideshow_tics = 175; slideshow_state = SLIDE_EXIT; // Go to end credits break; case SLIDE_EXITHACK: // state -99: super hack state gamestate = GS_LEVEL; P_DialogStartP1(); break; case SLIDE_HACKHACK: // state -9: unknown bizarre unused state S_StartSound(NULL, sfx_rifle); slideshow_tics = 3150; break; case SLIDE_EXIT: // state -1: proceed to next finale stage finalecount = 0; finalestage = F_STAGE_ARTSCREEN; wipegamestate = -1; S_ChangeMusic(mus_fast, 1); // [SVE]: loop the ending music. // haleyjd 20130301: The ONLY glitch fixed in 1.31 of Strife // *would* be something this insignificant, of course! if(gameversion != exe_strife_1_31) slideshow_state = SLIDE_CHOCO; // haleyjd: see below... break; case SLIDE_CHOCO: // haleyjd 09/14/10: This wouldn't be necessary except that Choco // doesn't support the V_MarkRect dirty rectangles system. This // just so happens to have hidden the fact that the ending // does a screenfade every ~19 seconds due to remaining stuck in // SLIDE_EXIT state above, UNLESS the menus were active - the // V_MarkRect calls in the menu system cause it to be visible. // This means that in order to get the same behavior as the vanilla // EXE, I need different code. So, come to this state and only set // wipegamestate if menuactive is true. finalecount = 0; finalestage = F_STAGE_ARTSCREEN; if(menuactive) wipegamestate = -1; S_StartMusic(mus_fast); slideshow_state = SLIDE_CHOCO; // remain here. break; default: break; } finalecount = 0; if(gameversion != exe_strife_1_31) // See above. This was removed in 1.31. { patch = (patch_t *)W_CacheLumpName(DEH_String("PANEL0"), PU_CACHE); V_DrawPatch(0, 0, patch); } }
static void D_DrawTitle2(const char *name) { S_StartMusic(mus_dm2ttl); D_SetPageName(name); }
static void InitStats(void) { int i; int j; signed int slaughterfrags; int posnum; int slaughtercount; int playercount; #if 0 int oldCluster; char *msgLumpName; int msgSize; int msgLump; extern int LeaveMap; #endif if(!deathmatch) { #if 0 gametype = SINGLE; HubCount = 0; oldCluster = P_GetMapCluster(gamemap); if(oldCluster != P_GetMapCluster(LeaveMap)) { if(oldCluster >= 1 && oldCluster <= 5) { if(!overrideHubMsg) { msgLumpName = ClusMsgLumpNames[oldCluster - 1]; msgLump = W_CheckNumForName(msgLumpName); if(msgLump < 0) { HubText = "correct hub message not found"; } else { msgSize = W_LumpLength(msgLump); if(msgSize >= MAX_INTRMSN_MESSAGE_SIZE) { Con_Error("Cluster message too long (%s)", msgLumpName); } gi.W_ReadLump(msgLump, ClusterMessage); ClusterMessage[msgSize] = 0; // Append terminator HubText = ClusterMessage; } } else { HubText = "null hub message"; } HubCount = strlen(HubText) * TEXTSPEED + TEXTWAIT; S_StartSongName("hub", true); } } #endif } else { gametype = DEATHMATCH; slaughterboy = 0; slaughterfrags = -9999; posnum = 0; playercount = 0; slaughtercount = 0; for(i = 0; i < MAXPLAYERS; i++) { totalFrags[i] = 0; if(players[i].plr->ingame) { playercount++; for(j = 0; j < MAXPLAYERS; j++) { if(players[i].plr->ingame) { totalFrags[i] += players[i].frags[j]; } } posnum++; } if(totalFrags[i] > slaughterfrags) { slaughterboy = 1 << i; slaughterfrags = totalFrags[i]; slaughtercount = 1; } else if(totalFrags[i] == slaughterfrags) { slaughterboy |= 1 << i; slaughtercount++; } } if(playercount == slaughtercount) { // don't do the slaughter stuff if everyone is equal slaughterboy = 0; } S_StartMusic("hub", true); } }