static void START_Title(void) { if (!OnlyOnce) { OnlyOnce = TRUE; DoWipe = FALSE; /* On power up, don't wipe the screen */ } S_StartSong(Song_intro,TRUE); /* Intro music, no looping */ }
void P_Start(void) { TimeMark1 = 0; /* Init the static timers */ TimeMark2 = 0; TimeMark4 = 0; players.AutomapFlags &= AF_GODMODE; /* No automapping specials (but allow godmode) */ AM_Start(); /* Start the automap system */ ST_Start(); /* Init the status bar this level */ G_DoLoadLevel(); /* Load a level into memory */ Randomize(); /* Reset the random number generator */ S_StartSong(Song_e1m1-1+gamemap,TRUE); }
void IN_Start(void) { I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE)); IN_LoadPics(); IN_InitStats(); intermission = true; interstate = -1; skipintermission = false; intertime = 0; oldintertime = 0; AM_Stop(); S_StartSong(mus_intr, true); }
void F_StartFinale (void) { gameaction = ga_nothing; gamestate = GS_FINALE; viewactive = false; automapactive = false; players[consoleplayer].messageTics = 1; players[consoleplayer].message = NULL; switch (gameepisode) { case 1: finaleflat = "FLOOR25"; finaletext = e1text; break; case 2: finaleflat = "FLATHUH1"; finaletext = e2text; break; case 3: finaleflat = "FLTWAWA2"; finaletext = e3text; break; case 4: finaleflat = "FLOOR28"; finaletext = e4text; break; case 5: finaleflat = "FLOOR08"; finaletext = e5text; break; } finalestage = 0; finalecount = 0; finaletextcount = strlen(finaletext)*TEXTSPEED + TEXTWAIT; #ifndef RENDER3D scroll_yval = 0; #else scroll_yval = 200; #endif nextscroll = 0; underwater_init = false; FontABaseLump = W_GetNumForName("FONTA_S") + 1; S_StartSong(mus_cptd, true); }
void P_SetupLevel(int episode, int map, int playermask, skill_t skill) { int i; int parm; char lumpname[9]; int lumpnum; mobj_t *mobj; for (i = 0; i < MAXPLAYERS; i++) { players[i].killcount = players[i].secretcount = players[i].itemcount = 0; } players[consoleplayer].viewz = 1; // will be set by player think // Waiting-for-level-load song; not played if playing music from CD // (the seek time will be so long it will just make loading take // longer) if (!cdmusic) { S_StartSongName("chess", true); } Z_FreeTags(PU_LEVEL, PU_PURGELEVEL - 1); P_InitThinkers(); leveltime = 0; sprintf(lumpname, "MAP%02d", map); lumpnum = W_GetNumForName(lumpname); // // Begin processing map lumps // Note: most of this ordering is important // P_LoadBlockMap(lumpnum + ML_BLOCKMAP); P_LoadVertexes(lumpnum + ML_VERTEXES); P_LoadSectors(lumpnum + ML_SECTORS); P_LoadSideDefs(lumpnum + ML_SIDEDEFS); P_LoadLineDefs(lumpnum + ML_LINEDEFS); P_LoadSubsectors(lumpnum + ML_SSECTORS); P_LoadNodes(lumpnum + ML_NODES); P_LoadSegs(lumpnum + ML_SEGS); rejectmatrix = W_CacheLumpNum(lumpnum + ML_REJECT, PU_LEVEL); P_GroupLines(); bodyqueslot = 0; po_NumPolyobjs = 0; deathmatch_p = deathmatchstarts; P_LoadThings(lumpnum + ML_THINGS); PO_Init(lumpnum + ML_THINGS); // Initialize the polyobjs P_LoadACScripts(lumpnum + ML_BEHAVIOR); // ACS object code // // End of map lump processing // // If deathmatch, randomly spawn the active players TimerGame = 0; if (deathmatch) { for (i = 0; i < MAXPLAYERS; i++) { if (playeringame[i]) { // must give a player spot before deathmatchspawn mobj = P_SpawnMobj(playerstarts[0][i].x << 16, playerstarts[0][i].y << 16, 0, MT_PLAYER_FIGHTER); players[i].mo = mobj; G_DeathMatchSpawnPlayer(i); P_RemoveMobj(mobj); } } //! // @arg <n> // @category net // @vanilla // // For multiplayer games: exit each level after n minutes. // parm = M_CheckParmWithArgs("-timer", 1); if (parm) { TimerGame = atoi(myargv[parm + 1]) * 35 * 60; } } // set up world state P_SpawnSpecials(); // build subsector connect matrix // P_ConnectSubsectors (); // Load colormap and set the fullbright flag i = P_GetMapFadeTable(gamemap); W_ReadLump(i, colormaps); if (i == W_GetNumForName("COLORMAP")) { LevelUseFullBright = true; } else { // Probably fog ... don't use fullbright sprites LevelUseFullBright = false; } // preload graphics if (precache) R_PrecacheLevel(); // Check if the level is a lightning level P_InitLightning(); S_StopAllSound(); SN_StopAllSequences(); S_StartSong(gamemap, true); //printf ("free memory: 0x%x\n", Z_FreeMemory()); }
void P_SetupLevel(int episode, int map, int playermask, skill_t skill) { int i; int parm; char lumpname[9]; char auxName[128]; int lumpnum; mobj_t *mobj; for(i = 0; i < MAXPLAYERS; i++) { players[i].killcount = players[i].secretcount = players[i].itemcount = 0; } players[consoleplayer].viewz = 1; // will be set by player think #ifdef __WATCOMC__ if(i_CDMusic == false) { S_StartSongName("chess", true); // Waiting-for-level-load song } #endif Z_FreeTags(PU_LEVEL, PU_PURGELEVEL-1); P_InitThinkers(); leveltime = 0; if(DevMaps) { sprintf(auxName, "%sMAP%02d.WAD", DevMapsDir, map); W_OpenAuxiliary(auxName); } sprintf(lumpname, "MAP%02d", map); lumpnum = W_GetNumForName(lumpname); // // Begin processing map lumps // Note: most of this ordering is important // P_LoadBlockMap(lumpnum+ML_BLOCKMAP); P_LoadVertexes(lumpnum+ML_VERTEXES); P_LoadSectors(lumpnum+ML_SECTORS); P_LoadSideDefs(lumpnum+ML_SIDEDEFS); P_LoadLineDefs(lumpnum+ML_LINEDEFS); P_LoadSubsectors(lumpnum+ML_SSECTORS); P_LoadNodes(lumpnum+ML_NODES); P_LoadSegs(lumpnum+ML_SEGS); rejectmatrix = W_CacheLumpNum(lumpnum+ML_REJECT, PU_LEVEL); P_GroupLines(); bodyqueslot = 0; po_NumPolyobjs = 0; deathmatch_p = deathmatchstarts; P_LoadThings(lumpnum+ML_THINGS); PO_Init(lumpnum+ML_THINGS); // Initialize the polyobjs P_LoadACScripts(lumpnum+ML_BEHAVIOR); // ACS object code // // End of map lump processing // if(DevMaps) { // Close the auxiliary file, but don't free its loaded lumps. // The next call to W_OpenAuxiliary() will do a full shutdown // of the current auxiliary WAD (free lumps and info lists). W_CloseAuxiliaryFile(); W_UsePrimary(); } // If deathmatch, randomly spawn the active players TimerGame = 0; if(deathmatch) { for (i=0 ; i<MAXPLAYERS ; i++) { if (playeringame[i]) { // must give a player spot before deathmatchspawn mobj = P_SpawnMobj (playerstarts[0][i].x<<16, playerstarts[0][i].y<<16,0, MT_PLAYER_FIGHTER); players[i].mo = mobj; G_DeathMatchSpawnPlayer (i); P_RemoveMobj (mobj); } } parm = M_CheckParm("-timer"); if(parm && parm < myargc-1) { TimerGame = atoi(myargv[parm+1])*35*60; } } // set up world state P_SpawnSpecials (); // build subsector connect matrix // P_ConnectSubsectors (); // Load colormap and set the fullbright flag i = P_GetMapFadeTable(gamemap); W_ReadLump(i, colormaps); if(i == W_GetNumForName("COLORMAP")) { LevelUseFullBright = true; } else { // Probably fog ... don't use fullbright sprites LevelUseFullBright = false; } // preload graphics if (precache) R_PrecacheLevel (); // Check if the level is a lightning level P_InitLightning(); S_StopAllSound(); SN_StopAllSequences(); S_StartSong(gamemap, true); //printf ("free memory: 0x%x\n", Z_FreeMemory()); }