// // F_StartFinale // void F_StartFinale (char *music, char *flat, const char *text) { gameaction = ga_nothing; gamestate = GS_FINALE; viewactive = false; // Okay - IWAD dependend stuff. // This has been changed severly, and // some stuff might have changed in the process. // [RH] More flexible now (even more severe changes) // finaleflat, finaletext, and music are now // determined in G_WorldDone() based on data in // a level_info_t and a cluster_info_t. if (*music == 0) S_ChangeMusic (std::string(gameinfo.finaleMusic, 8), !(gameinfo.flags & GI_NOLOOPFINALEMUSIC)); else S_ChangeMusic (std::string(music, 8), !(gameinfo.flags & GI_NOLOOPFINALEMUSIC)); if (*flat == 0) finaleflat = gameinfo.finaleFlat; else finaleflat = flat; if (text) finaletext = text; else finaletext = "Empty message"; finalestage = 0; finalecount = 0; V_SetBlend (0,0,0,0); S_StopAllChannels (); }
// 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; } }
// // F_StartFinale // void F_StartFinale (void) { size_t i; gameaction = ga_nothing; gamestate = GS_FINALE; viewactive = false; automapactive = false; if (logical_gamemission == doom) { S_ChangeMusic(mus_victor, true); } else { S_ChangeMusic(mus_read_m, true); } // Find the right screen and set the text and background for (i=0; i<arrlen(textscreens); ++i) { textscreen_t *screen = &textscreens[i]; // Hack for Chex Quest if (gameversion == exe_chex && screen->mission == doom) { screen->level = 5; } // [crispy] Hack for Master Levels MAP21: Bad Dream if (gamemission == pack_master && screen->mission == pack_master && gamemap == 21) { screen->level = 21; } if (logical_gamemission == screen->mission && (logical_gamemission != doom || gameepisode == screen->episode) && gamemap == screen->level) { finaletext = screen->text; finaleflat = screen->background; } } // Do dehacked substitutions of strings finaletext = DEH_String(finaletext); finaleflat = DEH_String(finaleflat); finalestage = F_STAGE_TEXT; finalecount = 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; } }
void F_StartCast(void) { // Ty 03/23/98 - clumsy but time is of the essence castorder[0].name = s_CC_ZOMBIE, castorder[0].type = MT_POSSESSED; castorder[1].name = s_CC_SHOTGUN, castorder[1].type = MT_SHOTGUY; castorder[2].name = s_CC_HEAVY, castorder[2].type = MT_CHAINGUY; castorder[3].name = s_CC_IMP, castorder[3].type = MT_TROOP; castorder[4].name = s_CC_DEMON, castorder[4].type = MT_SERGEANT; castorder[5].name = s_CC_LOST, castorder[5].type = MT_SKULL; castorder[6].name = s_CC_CACO, castorder[6].type = MT_HEAD; castorder[7].name = s_CC_HELL, castorder[7].type = MT_KNIGHT; castorder[8].name = s_CC_BARON, castorder[8].type = MT_BRUISER; castorder[9].name = s_CC_ARACH, castorder[9].type = MT_BABY; castorder[10].name = s_CC_PAIN, castorder[10].type = MT_PAIN; castorder[11].name = s_CC_REVEN, castorder[11].type = MT_UNDEAD; castorder[12].name = s_CC_MANCU, castorder[12].type = MT_FATSO; castorder[13].name = s_CC_ARCH, castorder[13].type = MT_VILE; castorder[14].name = s_CC_SPIDER, castorder[14].type = MT_SPIDER; castorder[15].name = s_CC_CYBER, castorder[15].type = MT_CYBORG; castorder[16].name = s_CC_HERO, castorder[16].type = MT_PLAYER; castorder[17].name = NULL, castorder[17].type = 0; wipegamestate = -1; // force a screen wipe castnum = 0; caststate = &states[mobjinfo[castorder[castnum].type].seestate]; casttics = caststate->tics; castdeath = false; finalestage = 2; castframes = 0; castonmelee = 0; castattacking = false; S_ChangeMusic(mus_evil, true); }
void F_StartCast (void) { // [RH] Set the names for the cast castorder[0].name = GStrings(CC_ZOMBIE); castorder[1].name = GStrings(CC_SHOTGUN); castorder[2].name = GStrings(CC_HEAVY); castorder[3].name = GStrings(CC_IMP); castorder[4].name = GStrings(CC_DEMON); castorder[5].name = GStrings(CC_LOST); castorder[6].name = GStrings(CC_CACO); castorder[7].name = GStrings(CC_HELL); castorder[8].name = GStrings(CC_BARON); castorder[9].name = GStrings(CC_ARACH); castorder[10].name = GStrings(CC_PAIN); castorder[11].name = GStrings(CC_REVEN); castorder[12].name = GStrings(CC_MANCU); castorder[13].name = GStrings(CC_ARCH); castorder[14].name = GStrings(CC_SPIDER); castorder[15].name = GStrings(CC_CYBER); castorder[16].name = GStrings(CC_HERO); wipegamestate = GS_FORCEWIPE; castnum = 0; caststate = &states[mobjinfo[castorder[castnum].type].seestate]; castsprite = caststate->sprite; casttics = caststate->tics; castdeath = false; finalestage = 2; castframes = 0; castonmelee = 0; castattacking = false; S_ChangeMusic("d_evil", true); }
// // Startup tasks for the frontend. // static void FE_Init(void) { int p; srand(time(NULL)); frontend_done = false; frontend_state = FE_STATE_MAINMENU; frontend_sgcount = 20; frontend_wipe = true; frontend_waitframe = false; currentFEMenu = &mainMenu; S_ChangeMusic(mus_panthr, 1); FE_InitMerchant(); FE_InitBackgrounds(); FE_LoadSlider(); FE_BindMusicTestVar(); // check for +connect_lobby from the Steam client if((p = M_CheckParmWithArgs("+connect_lobby", 1)) > 0) { frontend_autolobby = true; frontend_lobbyid = myargv[p + 1]; } else FE_EnableLobbyListener(); // can accept invites I_SetShowVisualCursor(true); frontend_running = true; }
void MIDIDeviceChanged(int newdev, bool force) { static int oldmididev = INT_MIN; // If a song is playing, move it to the new device. if (oldmididev != newdev || force) { if (currSong != NULL && currSong->IsMIDI()) { MusInfo *song = currSong; if (song->m_Status == MusInfo::STATE_Playing) { if (song->GetDeviceType() == MDEV_FLUIDSYNTH && force) { // FluidSynth must reload the song to change the patch set. auto mi = mus_playing; S_StopMusic(true); S_ChangeMusic(mi.name, mi.baseorder, mi.loop); } else { song->Stop(); song->Start(song->m_Looping); } } } else { S_MIDIDeviceChanged(); } } // 'force' if (!force) oldmididev = newdev; }
// 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"); } }
// 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 } }
void P_SerializeSounds (FArchive &arc) { S_SerializeSounds (arc); DSeqNode::SerializeSequences (arc); char *name = NULL; BYTE order; if (arc.IsStoring ()) { order = S_GetMusic (&name); } arc << name << order; if (arc.IsLoading ()) { if (!S_ChangeMusic (name, order)) if (level.cdtrack == 0 || !S_ChangeCDMusic (level.cdtrack, level.cdid)) S_ChangeMusic (level.Music, level.musicorder); } delete[] name; }
void P_SerializeSounds(FSerializer &arc) { S_SerializeSounds(arc); DSeqNode::SerializeSequences (arc); const char *name = NULL; BYTE order; if (arc.isWriting()) { order = S_GetMusic(&name); } arc.StringPtr("musicname", name) ("musicorder", order); if (arc.isReading()) { if (!S_ChangeMusic(name, order)) if (level.cdtrack == 0 || !S_ChangeCDMusic(level.cdtrack, level.cdid)) S_ChangeMusic(level.Music, level.musicorder); } }
// 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; } }
// // F_StartCast // void F_StartCast (void) { wipegamestate = -1; // force a screen wipe castnum = 0; caststate = &states[mobjinfo[castorder[castnum].type].seestate]; casttics = caststate->tics; castdeath = false; finalestage = F_STAGE_CAST; castframes = 0; castonmelee = 0; castattacking = false; S_ChangeMusic(mus_evil, true); }
void F_StartCast (void) { wipegamestate = -1; // force a screen wipe castnum = 0; caststate = &states[mobjinfo[castorder[castnum].type].seestate]; casttics = caststate->tics; castdeath = FALSE; FinaleStage = 2; castframes = 0; castonmelee = 0; castattacking = FALSE; S_ChangeMusic(mus_evil, TRUE); }
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; } }
// // F_StartCast // void F_StartCast(void) { firstevent = true; wipegamestate = (gamestate_t)(-1); // force a screen wipe castnum = 0; caststate = &states[mobjinfo[castorder[castnum].type].seestate]; casttics = caststate->tics; castrot = 0; castdeath = false; castdeathflip = false; finalestage = F_STAGE_CAST; castframes = 0; castonmelee = 0; castattacking = false; S_ChangeMusic(mus_evil, true, false); }
void F_StartCast (void) { if ( ::g->finalestage != 2 ) { ::g->wipegamestate = (gamestate_t)-1; // force a screen wipe ::g->castnum = 0; ::g->caststate = &::g->states[mobjinfo[castorder[::g->castnum].type].seestate]; ::g->casttics = ::g->caststate->tics; ::g->castdeath = false; ::g->finalestage = 2; ::g->castframes = 0; ::g->castonmelee = 0; ::g->castattacking = false; S_ChangeMusic(mus_evil, true); ::g->caststartmenu = ::g->finalecount + 50; } }
void S_Start(void) { int mnum; if (!mus_card || nomusicparm) return; // kill all playing sounds at start of level // (trust me - a good idea) S_Stop(); //jff 1/22/98 return if music is not enabled if (!mus_card || nomusicparm) return; // start new music for the level //mus_paused = 0; if (idmusnum != -1) mnum = idmusnum; //jff 3/17/98 reload IDMUS music if not -1 else if (gamemode == commercial) mnum = mus_runnin + gamemap - 1; else { static const int spmus[] = // Song - Who? - Where? { mus_e3m4, // American e4m1 mus_e3m2, // Romero e4m2 mus_e3m3, // Shawn e4m3 mus_e1m5, // American e4m4 mus_e2m7, // Tim e4m5 mus_e2m4, // Romero e4m6 mus_e2m6, // J.Anderson e4m7 CHIRON.WAD mus_e2m5, // Shawn e4m8 mus_e1m9 // Tim e4m9 }; if (gameepisode < 4) mnum = mus_e1m1 + (gameepisode - 1) * 9 + gamemap - 1; else mnum = spmus[gamemap - 1]; } S_ChangeMusic(mnum, true); }
// // F_StartCast // static void F_StartCast(void) { firstevent = true; wipegamestate = GS_NONE; // force a screen wipe castnum = 0; caststate = &states[mobjinfo[castorder[castnum].type].seestate]; casttics = caststate->tics; castrot = 0; castdeath = false; castdeathflip = false; finalestage = F_STAGE_CAST; castframes = 0; castonmelee = 0; castattacking = false; if (!M_StringCompare(playername, playername_default)) s_CC_HERO = playername; S_ChangeMusic(mus_evil, true, false, false); }
// // F_StartCast // // haleyjd 09/13/10: [STRIFE] Heavily modified, yet unused. // Evidence suggests this was meant to be started from a menu item. // See m_menu.c for more info. // [SVE]: completed. // void F_StartCast (void) { usergame = false; gameaction = ga_nothing; viewactive = false; automapactive = false; castnum = 0; gamestate = GS_FINALE; caststate = &states[mobjinfo[castorder[castnum].type].seestate]; casttics = caststate->tics; if(casttics > 50) casttics = 50; wipegamestate = -1; // force a screen wipe castdeath = false; finalestage = F_STAGE_CAST; castframes = 0; castonmelee = 0; castattacking = false; S_ChangeMusic(mus_action, 1); I_StartVoice(NULL); // sorry Macil, be quiet for a sec :P }
void DIntermissionController::Ticker () { if (mAdvance) { mSentAdvance = false; } if (mScreen != NULL) { mAdvance |= (mScreen->Ticker() == -1); } if (mAdvance) { mAdvance = false; if (!NextPage()) { switch (mGameState) { case FSTATE_InLevel: if (level.cdtrack == 0 || !S_ChangeCDMusic (level.cdtrack, level.cdid)) S_ChangeMusic (level.Music, level.musicorder); gamestate = GS_LEVEL; wipegamestate = GS_LEVEL; P_ResumeConversation (); viewactive = true; Destroy(); break; case FSTATE_ChangingLevel: gameaction = ga_worlddone; Destroy(); break; default: break; } } } }
// Respond to keyboard input events, // intercept cheats. boolean ST_Responder (event_t* ev) { int i; // Filter automap on/off. if (ev->type == ev_keyup && ((ev->data1 & 0xffff0000) == AM_MSGHEADER)) { switch(ev->data1) { case AM_MSGENTERED: st_gamestate = AutomapState; st_firsttime = true; break; case AM_MSGEXITED: // fprintf(stderr, "AM exited\n"); st_gamestate = FirstPersonState; break; } } // if a user keypress... else if (ev->type == ev_keydown) { if (!netgame) { // b. - enabled for more debug fun. // if (gameskill != sk_nightmare) { // 'dqd' cheat for toggleable god mode if (cht_CheckCheat(&cheat_god, ev->data1)) { plyr->cheats ^= CF_GODMODE; if (plyr->cheats & CF_GODMODE) { if (plyr->mo) plyr->mo->health = 100; plyr->health = 100; plyr->message = STSTR_DQDON; } else plyr->message = STSTR_DQDOFF; } // 'fa' cheat for killer f*****g arsenal else if (cht_CheckCheat(&cheat_ammonokey, ev->data1)) { plyr->armorpoints = 200; plyr->armortype = 2; for (i=0;i<NUMWEAPONS;i++) plyr->weaponowned[i] = true; for (i=0;i<NUMAMMO;i++) plyr->ammo[i] = plyr->maxammo[i]; plyr->message = STSTR_FAADDED; } // 'kfa' cheat for key full ammo else if (cht_CheckCheat(&cheat_ammo, ev->data1)) { plyr->armorpoints = 200; plyr->armortype = 2; for (i=0;i<NUMWEAPONS;i++) plyr->weaponowned[i] = true; for (i=0;i<NUMAMMO;i++) plyr->ammo[i] = plyr->maxammo[i]; for (i=0;i<NUMCARDS;i++) plyr->cards[i] = true; plyr->message = STSTR_KFAADDED; } // 'mus' cheat for changing music else if (cht_CheckCheat(&cheat_mus, ev->data1)) { char buf[3]; int musnum; plyr->message = STSTR_MUS; cht_GetParam(&cheat_mus, buf); if (gamemode == commercial) { musnum = mus_runnin + (buf[0]-'0')*10 + buf[1]-'0' - 1; if (((buf[0]-'0')*10 + buf[1]-'0') > 35) plyr->message = STSTR_NOMUS; else S_ChangeMusic(musnum, 1); } else { musnum = mus_e1m1 + (buf[0]-'1')*9 + (buf[1]-'1'); if (((buf[0]-'1')*9 + buf[1]-'1') > 31) plyr->message = STSTR_NOMUS; else S_ChangeMusic(musnum, 1); } } // Simplified, accepting both "noclip" and "idspispopd". // no clipping mode cheat else if ( cht_CheckCheat(&cheat_noclip, ev->data1) || cht_CheckCheat(&cheat_commercial_noclip,ev->data1) ) { plyr->cheats ^= CF_NOCLIP; if (plyr->cheats & CF_NOCLIP) plyr->message = STSTR_NCON; else plyr->message = STSTR_NCOFF; } // 'behold?' power-up cheats for (i=0;i<6;i++) { if (cht_CheckCheat(&cheat_powerup[i], ev->data1)) { if (!plyr->powers[i]) P_GivePower( plyr, i); else if (i!=pw_strength) plyr->powers[i] = 1; else plyr->powers[i] = 0; plyr->message = STSTR_BEHOLDX; } } // 'behold' power-up menu if (cht_CheckCheat(&cheat_powerup[6], ev->data1)) { plyr->message = STSTR_BEHOLD; } // 'choppers' invulnerability & chainsaw else if (cht_CheckCheat(&cheat_choppers, ev->data1)) { plyr->weaponowned[wp_chainsaw] = true; plyr->powers[pw_invulnerability] = true; plyr->message = STSTR_CHOPPERS; } // 'mypos' for player position else if (cht_CheckCheat(&cheat_mypos, ev->data1)) { static char buf[ST_MSGWIDTH]; sprintf(buf, "ang=0x%x;x,y=(0x%x,0x%x)", players[consoleplayer].mo->angle, players[consoleplayer].mo->x, players[consoleplayer].mo->y); plyr->message = buf; } } // 'clev' change-level cheat if (cht_CheckCheat(&cheat_clev, ev->data1)) { char buf[3]; int epsd; int map; cht_GetParam(&cheat_clev, buf); if (gamemode == commercial) { epsd = 0; map = (buf[0] - '0')*10 + buf[1] - '0'; } else { epsd = buf[0] - '0'; map = buf[1] - '0'; } // Catch invalid maps. if (epsd < 1) return false; if (map < 1) return false; // Ohmygod - this is not going to work. if ((gamemode == retail) && ((epsd > 4) || (map > 9))) return false; if ((gamemode == registered) && ((epsd > 3) || (map > 9))) return false; if ((gamemode == shareware) && ((epsd > 1) || (map > 9))) return false; if ((gamemode == commercial) && (( epsd > 1) || (map > 34))) return false; // So be it. plyr->message = STSTR_CLEV; G_DeferedInitNew(gameskill, epsd, map); } } return false; }
// Respond to keyboard input events, // intercept cheats. boolean ST_Responder (event_t* ev) { int i; // Filter automap on/off. if (ev->type == ev_keyup && ((ev->data1 & 0xffff0000) == AM_MSGHEADER)) { switch(ev->data1) { case AM_MSGENTERED: st_gamestate = AutomapState; st_firsttime = true; break; case AM_MSGEXITED: // fprintf(stderr, "AM exited\n"); st_gamestate = FirstPersonState; break; } } // if a user keypress... else if (ev->type == ev_keydown) { if (!netgame && gameskill != sk_nightmare) { // 'dqd' cheat for toggleable god mode if (cht_CheckCheat(&cheat_god, ev->data2)) { plyr->cheats ^= CF_GODMODE; if (plyr->cheats & CF_GODMODE) { if (plyr->mo) plyr->mo->health = 100; plyr->health = deh_god_mode_health; plyr->message = DEH_String(STSTR_DQDON); } else plyr->message = DEH_String(STSTR_DQDOFF); } // 'fa' cheat for killer f*****g arsenal else if (cht_CheckCheat(&cheat_ammonokey, ev->data2)) { plyr->armorpoints = deh_idfa_armor; plyr->armortype = deh_idfa_armor_class; // [crispy] give backpack if (!plyr->backpack) { for (i=0 ; i<NUMAMMO ; i++) plyr->maxammo[i] *= 2; plyr->backpack = true; } for (i=0;i<NUMWEAPONS;i++) plyr->weaponowned[i] = true; for (i=0;i<NUMAMMO;i++) plyr->ammo[i] = plyr->maxammo[i]; plyr->message = DEH_String(STSTR_FAADDED); } // 'kfa' cheat for key full ammo else if (cht_CheckCheat(&cheat_ammo, ev->data2)) { plyr->armorpoints = deh_idkfa_armor; plyr->armortype = deh_idkfa_armor_class; // [crispy] give backpack if (!plyr->backpack) { for (i=0 ; i<NUMAMMO ; i++) plyr->maxammo[i] *= 2; plyr->backpack = true; } for (i=0;i<NUMWEAPONS;i++) plyr->weaponowned[i] = true; for (i=0;i<NUMAMMO;i++) plyr->ammo[i] = plyr->maxammo[i]; for (i=0;i<NUMCARDS;i++) plyr->cards[i] = true; plyr->message = DEH_String(STSTR_KFAADDED); } // [crispy] implement Boom's "tntem" cheat else if (cht_CheckCheat(&cheat_massacre, ev->data2)) { static char msg[32]; int killcount = ST_cheat_massacre(); M_snprintf(msg, sizeof(msg), "\x1b%c%d \x1b%cMonster%s Killed", '0' + CR_GOLD, killcount, '0' + CR_RED, (killcount == 1) ? "" : "s"); plyr->message = msg; } // [crispy] implement Crispy Doom's "spechits" cheat else if (cht_CheckCheat(&cheat_spechits, ev->data2)) { static char msg[32]; int triggeredlines = ST_cheat_spechits(); M_snprintf(msg, sizeof(msg), "\x1b%c%d \x1b%cSpecial Line%s Triggered", '0' + CR_GOLD, triggeredlines, '0' + CR_RED, (triggeredlines == 1) ? "" : "s"); plyr->message = msg; } // [crispy] implement Boom's "tnthom" cheat else if (cht_CheckCheat(&cheat_hom, ev->data2)) { static char msg[32]; crispy_flashinghom = !crispy_flashinghom; M_snprintf(msg, sizeof(msg), "HOM Detection \x1b%c%s", '0' + CR_GREEN, (crispy_flashinghom) ? "ON" : "OFF"); plyr->message = msg; } // 'mus' cheat for changing music else if (cht_CheckCheat(&cheat_mus, ev->data2)) { char buf[3]; int musnum; plyr->message = DEH_String(STSTR_MUS); cht_GetParam(&cheat_mus, buf); // Note: The original v1.9 had a bug that tried to play back // the Doom II music regardless of gamemode. This was fixed // in the Ultimate Doom executable so that it would work for // the Doom 1 music as well. if (gamemode == commercial || gameversion < exe_ultimate) { musnum = mus_runnin + (buf[0]-'0')*10 + buf[1]-'0' - 1; // [crispy] prevent crash with IDMUS00 if (((buf[0]-'0')*10 + buf[1]-'0') > 35 || musnum < mus_runnin) plyr->message = DEH_String(STSTR_NOMUS); else S_ChangeMusic(musnum, 1); } else { musnum = mus_e1m1 + (buf[0]-'1')*9 + (buf[1]-'1'); // [crispy] prevent crash with IDMUS0x or IDMUSx0 if (((buf[0]-'1')*9 + buf[1]-'1') > 31 || buf[0] < '1' || buf[1] < '1') plyr->message = DEH_String(STSTR_NOMUS); else S_ChangeMusic(musnum, 1); } } // [crispy] allow both idspispopd and idclip cheats in all gamemissions else if ( ( /* logical_gamemission == doom && */ cht_CheckCheat(&cheat_noclip, ev->data2)) || ( /* logical_gamemission != doom && */ cht_CheckCheat(&cheat_commercial_noclip,ev->data2))) { // Noclip cheat. // For Doom 1, use the idspipsopd cheat; for all others, use // idclip plyr->cheats ^= CF_NOCLIP; if (plyr->cheats & CF_NOCLIP) plyr->message = DEH_String(STSTR_NCON); else plyr->message = DEH_String(STSTR_NCOFF); } // [crispy] implement PrBoom+'s "notarget" cheat else if (cht_CheckCheat(&cheat_notarget, ev->data2)) { static char msg[32]; plyr->cheats ^= CF_NOTARGET; M_snprintf(msg, sizeof(msg), "Notarget Mode \x1b%c%s", '0' + CR_GREEN, (plyr->cheats & CF_NOTARGET) ? "ON" : "OFF"); plyr->message = msg; } // 'behold?' power-up cheats for (i=0;i<6;i++) { if (cht_CheckCheat(&cheat_powerup[i], ev->data2)) { if (!plyr->powers[i]) P_GivePower( plyr, i); else if (i!=pw_strength) plyr->powers[i] = 1; else plyr->powers[i] = 0; plyr->message = DEH_String(STSTR_BEHOLDX); } } // 'behold' power-up menu if (cht_CheckCheat(&cheat_powerup[6], ev->data2)) { plyr->message = DEH_String(STSTR_BEHOLD); } // [crispy] implement Boom's "tntweap?" weapon cheats else if (cht_CheckCheat(&cheat_weapon, ev->data2)) { char buf[2]; int w; static char msg[32]; cht_GetParam(&cheat_weapon, buf); w = *buf - '1'; if (w < 0 || w >= NUMWEAPONS) return false; if (w == wp_supershotgun && !crispy_havessg) return false; if ((w == wp_bfg || w == wp_plasma) && gamemode == shareware) return false; // make '1' apply beserker strength toggle if (w == wp_fist) { if (!plyr->powers[pw_strength]) P_GivePower(plyr, pw_strength); else plyr->powers[pw_strength] = 0; M_snprintf(msg, sizeof(msg), DEH_String(STSTR_BEHOLDX)); } else { if ((plyr->weaponowned[w] = !plyr->weaponowned[w])) M_snprintf(msg, sizeof(msg), "Weapon \x1b%c%d\x1b%c Added", '0' + CR_GOLD, w + 1, '0' + CR_RED); else { M_snprintf(msg, sizeof(msg), "Weapon \x1b%c%d\x1b%c Removed", '0' + CR_GOLD, w + 1, '0' + CR_RED); // [crispy] removed current weapon, select another one if (w == plyr->readyweapon) { extern boolean P_CheckAmmo (player_t* player); P_CheckAmmo(plyr); } } } plyr->message = msg; } // 'choppers' invulnerability & chainsaw else if (cht_CheckCheat(&cheat_choppers, ev->data2)) { plyr->weaponowned[wp_chainsaw] = true; plyr->powers[pw_invulnerability] = true; plyr->message = DEH_String(STSTR_CHOPPERS); } // 'mypos' for player position else if (cht_CheckCheat(&cheat_mypos, ev->data2)) { // [crispy] show (human readable) map coordinates // in the upper right corner (like automap stats) /* static char buf[ST_MSGWIDTH]; M_snprintf(buf, sizeof(buf), "ang=0x%x;x,y=(0x%x,0x%x)", players[consoleplayer].mo->angle, players[consoleplayer].mo->x, players[consoleplayer].mo->y); plyr->message = buf; */ p2fromp(plyr)->mapcoords ^= 1; } } // 'clev' change-level cheat if (!netgame && cht_CheckCheat(&cheat_clev, ev->data2)) { char buf[3]; int epsd; int map; cht_GetParam(&cheat_clev, buf); if (gamemission == pack_nerve) { epsd = 2; map = (buf[0] - '0')*10 + buf[1] - '0'; } else if (gamemode == commercial) { epsd = 1; map = (buf[0] - '0')*10 + buf[1] - '0'; } else { epsd = buf[0] - '0'; map = buf[1] - '0'; } // Chex.exe always warps to episode 1. if (gameversion == exe_chex) { epsd = 1; } // Catch invalid maps. if (epsd == 0) // [crispy] allow IDCLEV0x to work in Doom 1 epsd = gameepisode; else if (epsd < 1) return false; if ((map == 0) && (buf[0] - '0' == 0)) // [crispy] IDCLEV00 restarts current map map = gamemap; else if (map < 1) return false; // Ohmygod - this is not going to work. if ((gamemode == retail) && ((epsd > 4) || (map > 9))) return false; if ((gamemode == registered) && ((epsd > 3) || (map > 9))) return false; if ((gamemode == shareware) && ((epsd > 1) || (map > 9))) return false; // The source release has this check as map > 34. However, Vanilla // Doom allows IDCLEV up to MAP40 even though it normally crashes. if ((gamemode == commercial && gamemission != pack_nerve) && (( epsd > 1) || (map > 40))) return false; if ((gamemission == pack_nerve) && (( epsd > 2) || (map > 9))) return false; // So be it. plyr->message = DEH_String(STSTR_CLEV); G_DeferedInitNew(gameskill, epsd, map); // [crispy] eat key press, i.e. don't change weapon upon level change return true; } } return false; }
// // F_StartFinale // void F_StartFinale (void) { gameaction = ga_nothing; gamestate = GS_FINALE; viewactive = false; automapactive = false; // Okay - IWAD dependend stuff. // This has been changed severly, and // some stuff might have changed in the process. switch ( gamemode ) { // DOOM 1 - E1, E3 or E4, but each nine missions case shareware: case registered: case retail: { S_ChangeMusic(mus_victor, true); switch (gameepisode) { case 1: finaleflat = "FLOOR4_8"; finaletext = e1text; break; case 2: finaleflat = "SFLR6_1"; finaletext = e2text; break; case 3: finaleflat = "MFLR8_4"; finaletext = e3text; break; case 4: finaleflat = "MFLR8_3"; finaletext = e4text; break; default: // Ouch. break; } break; } // DOOM II and missions packs with E1, M34 case commercial: { S_ChangeMusic(mus_read_m, true); switch (gamemap) { case 6: finaleflat = "SLIME16"; finaletext = c1text; break; case 11: finaleflat = "RROCK14"; finaletext = c2text; break; case 20: finaleflat = "RROCK07"; finaletext = c3text; break; case 30: finaleflat = "RROCK17"; finaletext = c4text; break; case 15: finaleflat = "RROCK13"; finaletext = c5text; break; case 31: finaleflat = "RROCK19"; finaletext = c6text; break; default: // Ouch. break; } break; } // Indeterminate. default: S_ChangeMusic(mus_read_m, true); finaleflat = "F_SKY1"; // Not used anywhere else. finaletext = c1text; // FIXME - other text, music? break; } finalestage = 0; finalecount = 0; }
void DIntermissionScreen::Init(FIntermissionAction *desc, bool first) { int lumpnum; if (desc->mCdTrack == 0 || !S_ChangeCDMusic (desc->mCdTrack, desc->mCdId)) { if (desc->mMusic.IsEmpty()) { // only start the default music if this is the first action in an intermission if (first) S_ChangeMusic (gameinfo.finaleMusic, gameinfo.finaleOrder, desc->mMusicLooping); } else { S_ChangeMusic (desc->mMusic, desc->mMusicOrder, desc->mMusicLooping); } } mDuration = desc->mDuration; const char *texname = desc->mBackground; if (*texname == '@') { char *pp; unsigned int v = strtoul(texname+1, &pp, 10) - 1; if (*pp == 0 && v < gameinfo.finalePages.Size()) { texname = gameinfo.finalePages[v].GetChars(); } else if (gameinfo.finalePages.Size() > 0) { texname = gameinfo.finalePages[0].GetChars(); } else { texname = gameinfo.TitlePage.GetChars(); } } else if (*texname == '$') { texname = GStrings[texname+1]; } if (texname[0] != 0) { mBackground = TexMan.CheckForTexture(texname, FTexture::TEX_MiscPatch); mFlatfill = desc->mFlatfill; } S_Sound (CHAN_VOICE | CHAN_UI, desc->mSound, 1.0f, ATTN_NONE); if (desc->mPalette.IsNotEmpty() && (lumpnum = Wads.CheckNumForFullName(desc->mPalette, true)) > 0) { PalEntry *palette; const BYTE *orgpal; FMemLump lump; int i; lump = Wads.ReadLump (lumpnum); orgpal = (BYTE *)lump.GetMem(); palette = screen->GetPalette (); for (i = 256; i > 0; i--, orgpal += 3) { *palette++ = PalEntry (orgpal[0], orgpal[1], orgpal[2]); } screen->UpdatePalette (); mPaletteChanged = true; NoWipe = 1; M_EnableMenu(false); } mOverlays.Resize(desc->mOverlays.Size()); for (unsigned i=0; i < mOverlays.Size(); i++) { mOverlays[i].x = desc->mOverlays[i].x; mOverlays[i].y = desc->mOverlays[i].y; mOverlays[i].mCondition = desc->mOverlays[i].mCondition; mOverlays[i].mPic = TexMan.CheckForTexture(desc->mOverlays[i].mName, FTexture::TEX_MiscPatch); } mTicker = 0; }
// // F_StartFinale // OVERLAY void F_StartFinale (void) { gameaction = ga_nothing; gamestate = GS_FINALE; automapmode = (automapmode_e)(automapmode & ~am_active); // killough 3/28/98: clear accelerative text flags acceleratestage = midstage = 0; // Okay - IWAD dependend stuff. // This has been changed severly, and // some stuff might have changed in the process. switch ( gamemode ) { // DOOM 1 - E1, E3 or E4, but each nine missions case shareware: case registered: case retail: { S_ChangeMusic(mus_victor, true); switch (gameepisode) { case 1: finaleflat = bgflatE1; // Ty 03/30/98 - new externalized bg flats finaletext = s_E1TEXT; // Ty 03/23/98 - Was e1text variable. break; case 2: finaleflat = bgflatE2; finaletext = s_E2TEXT; // Ty 03/23/98 - Same stuff for each break; case 3: finaleflat = bgflatE3; finaletext = s_E3TEXT; break; case 4: finaleflat = bgflatE4; finaletext = s_E4TEXT; break; default: // Ouch. break; } break; } // DOOM II and missions packs with E1, M34 case commercial: { S_ChangeMusic(mus_read_m, true); // Ty 08/27/98 - added the gamemission logic switch (gamemap) { case 6: finaleflat = bgflat06; finaletext = (gamemission==pack_tnt) ? s_T1TEXT : (gamemission==pack_plut) ? s_P1TEXT : s_C1TEXT; break; case 11: finaleflat = bgflat11; finaletext = (gamemission==pack_tnt) ? s_T2TEXT : (gamemission==pack_plut) ? s_P2TEXT : s_C2TEXT; break; case 20: finaleflat = bgflat20; finaletext = (gamemission==pack_tnt) ? s_T3TEXT : (gamemission==pack_plut) ? s_P3TEXT : s_C3TEXT; break; case 30: finaleflat = bgflat30; finaletext = (gamemission==pack_tnt) ? s_T4TEXT : (gamemission==pack_plut) ? s_P4TEXT : s_C4TEXT; break; case 15: finaleflat = bgflat15; finaletext = (gamemission==pack_tnt) ? s_T5TEXT : (gamemission==pack_plut) ? s_P5TEXT : s_C5TEXT; break; case 31: finaleflat = bgflat31; finaletext = (gamemission==pack_tnt) ? s_T6TEXT : (gamemission==pack_plut) ? s_P6TEXT : s_C6TEXT; break; default: // Ouch. break; } break; // Ty 08/27/98 - end gamemission logic } // Indeterminate. default: // Ty 03/30/98 - not externalized S_ChangeMusic(mus_read_m, true); finaleflat = "F_SKY1"; // Not used anywhere else. finaletext = s_C1TEXT; // FIXME - other text, music? break; } finalestage = 0; finalecount = 0; }
// // 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); } }
// Respond to keyboard input events, // intercept cheats. boolean ST_Responder (event_t* ev) { int i; // Filter automap on/off. if (ev->type == ev_keyup && ((ev->data1 & 0xffff0000) == AM_MSGHEADER)) { switch(ev->data1) { case AM_MSGENTERED: st_gamestate = AutomapState; st_firsttime = true; break; case AM_MSGEXITED: // fprintf(stderr, "AM exited\n"); st_gamestate = FirstPersonState; break; } } // if a user keypress... else if (ev->type == ev_keydown) { if (!netgame && gameskill != sk_nightmare) { // 'dqd' cheat for toggleable god mode if (cht_CheckCheat(&cheat_god, ev->data2)) { plyr->cheats ^= CF_GODMODE; if (plyr->cheats & CF_GODMODE) { if (plyr->mo) plyr->mo->health = 100; plyr->health = deh_god_mode_health; plyr->message = DEH_String(STSTR_DQDON); } else plyr->message = DEH_String(STSTR_DQDOFF); } // 'fa' cheat for killer f*****g arsenal else if (cht_CheckCheat(&cheat_ammonokey, ev->data2)) { plyr->armorpoints = deh_idfa_armor; plyr->armortype = deh_idfa_armor_class; for (i=0;i<NUMWEAPONS;i++) plyr->weaponowned[i] = true; for (i=0;i<NUMAMMO;i++) plyr->ammo[i] = plyr->maxammo[i]; plyr->message = DEH_String(STSTR_FAADDED); } // 'kfa' cheat for key full ammo else if (cht_CheckCheat(&cheat_ammo, ev->data2)) { plyr->armorpoints = deh_idkfa_armor; plyr->armortype = deh_idkfa_armor_class; for (i=0;i<NUMWEAPONS;i++) plyr->weaponowned[i] = true; for (i=0;i<NUMAMMO;i++) plyr->ammo[i] = plyr->maxammo[i]; for (i=0;i<NUMCARDS;i++) plyr->cards[i] = true; plyr->message = DEH_String(STSTR_KFAADDED); } // 'mus' cheat for changing music else if (cht_CheckCheat(&cheat_mus, ev->data2)) { char buf[3]; int musnum; plyr->message = DEH_String(STSTR_MUS); cht_GetParam(&cheat_mus, buf); // Note: The original v1.9 had a bug that tried to play back // the Doom II music regardless of gamemode. This was fixed // in the Ultimate Doom executable so that it would work for // the Doom 1 music as well. if (gamemode == commercial || gameversion < exe_ultimate) { musnum = mus_runnin + (buf[0]-'0')*10 + buf[1]-'0' - 1; if (((buf[0]-'0')*10 + buf[1]-'0') > 35 && gameversion >= exe_doom_1_8) plyr->message = DEH_String(STSTR_NOMUS); else S_ChangeMusic(musnum, 1); } else { musnum = mus_e1m1 + (buf[0]-'1')*9 + (buf[1]-'1'); if (((buf[0]-'1')*9 + buf[1]-'1') > 31) plyr->message = DEH_String(STSTR_NOMUS); else S_ChangeMusic(musnum, 1); } } else if ( (logical_gamemission == doom && cht_CheckCheat(&cheat_noclip, ev->data2)) || (logical_gamemission != doom && cht_CheckCheat(&cheat_commercial_noclip,ev->data2))) { // Noclip cheat. // For Doom 1, use the idspipsopd cheat; for all others, use // idclip plyr->cheats ^= CF_NOCLIP; if (plyr->cheats & CF_NOCLIP) plyr->message = DEH_String(STSTR_NCON); else plyr->message = DEH_String(STSTR_NCOFF); } // 'behold?' power-up cheats for (i=0;i<6;i++) { if (cht_CheckCheat(&cheat_powerup[i], ev->data2)) { if (!plyr->powers[i]) P_GivePower( plyr, i); else if (i!=pw_strength) plyr->powers[i] = 1; else plyr->powers[i] = 0; plyr->message = DEH_String(STSTR_BEHOLDX); } } // 'behold' power-up menu if (cht_CheckCheat(&cheat_powerup[6], ev->data2)) { plyr->message = DEH_String(STSTR_BEHOLD); } // 'choppers' invulnerability & chainsaw else if (cht_CheckCheat(&cheat_choppers, ev->data2)) { plyr->weaponowned[wp_chainsaw] = true; plyr->powers[pw_invulnerability] = true; plyr->message = DEH_String(STSTR_CHOPPERS); } // 'mypos' for player position else if (cht_CheckCheat(&cheat_mypos, ev->data2)) { static char buf[ST_MSGWIDTH]; M_snprintf(buf, sizeof(buf), "ang=0x%x;x,y=(0x%x,0x%x)", players[consoleplayer].mo->angle, players[consoleplayer].mo->x, players[consoleplayer].mo->y); plyr->message = buf; } } // 'clev' change-level cheat if (!netgame && cht_CheckCheat(&cheat_clev, ev->data2)) { char buf[3]; int epsd; int map; cht_GetParam(&cheat_clev, buf); if (gamemode == commercial) { epsd = 1; map = (buf[0] - '0')*10 + buf[1] - '0'; } else { epsd = buf[0] - '0'; map = buf[1] - '0'; } // Chex.exe always warps to episode 1. if (gameversion == exe_chex) { epsd = 1; } // Catch invalid maps. if (epsd < 1) return false; if (map < 1) return false; // Ohmygod - this is not going to work. if ((gamemode == retail) && ((epsd > 4) || (map > 9))) return false; if ((gamemode == registered) && ((epsd > 3) || (map > 9))) return false; if ((gamemode == shareware) && ((epsd > 1) || (map > 9))) return false; // The source release has this check as map > 34. However, Vanilla // Doom allows IDCLEV up to MAP40 even though it normally crashes. if ((gamemode == commercial) && (( epsd > 1) || (map > 40))) return false; // So be it. plyr->message = DEH_String(STSTR_CLEV); G_DeferedInitNew(gameskill, epsd, map); } } return false; }
// // This cycles through the demo sequences. // FIXME - version dependend demo numbers? // void D_DoAdvanceDemo(void) { if (!advancedemo) return; players[consoleplayer].playerstate = PST_LIVE; // not reborn advancedemo = false; usergame = false; // no save / end game here paused = false; gameaction = ga_nothing; if (gamemode == retail && gameversion != exe_chex) 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_ChangeMusic("d2title.pcm", false); /*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_ChangeMusic("d2title.pcm", false); } 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; } }