//========================================================================== // R_DrawMapTitle //========================================================================== void R_DrawMapTitle(void) { float alpha = 1; int y = 12; char *lname, *lauthor; if(!cfg.mapTitle || actual_leveltime > 6 * 35) return; // Make the text a bit smaller. gl.MatrixMode(DGL_MODELVIEW); gl.PushMatrix(); gl.Translatef(160, y, 0); gl.Scalef(.75f, .75f, 1); // Scale to 3/4 gl.Translatef(-160, -y, 0); if(actual_leveltime < 35) alpha = actual_leveltime / 35.0f; if(actual_leveltime > 5 * 35) alpha = 1 - (actual_leveltime - 5 * 35) / 35.0f; lname = (char *) Get(DD_MAP_NAME); lauthor = (char *) Get(DD_MAP_AUTHOR); // Use stardard map name if DED didn't define it. if(!lname) lname = P_GetMapName(gamemap); gl.Color4f(1, 1, 1, alpha); if(lname) { MN_DrTextB_CS(lname, 160 - MN_TextBWidth(lname) / 2, y); y += 20; } gl.Color4f(.5f, .5f, .5f, alpha); if(lauthor) { MN_DrTextA_CS(lauthor, 160 - MN_TextAWidth(lauthor) / 2, y); } gl.MatrixMode(DGL_MODELVIEW); gl.PopMatrix(); }
void D_DoomMain(void) { GameMission_t gamemission; int p; I_AtExit(D_HexenQuitMessage, false); startepisode = 1; autostart = false; startskill = sk_medium; startmap = 1; gamemode = commercial; I_PrintBanner(PACKAGE_STRING); // Initialize subsystems ST_Message("V_Init: allocate screens.\n"); V_Init(); // Load defaults before initing other systems ST_Message("M_LoadDefaults: Load system defaults.\n"); D_BindVariables(); #ifdef _WIN32 //! // @platform windows // @vanilla // // Save configuration data and savegames in c:\hexndata, // allowing play from CD. // cdrom = M_ParmExists("-cdrom"); #endif if (cdrom) { M_SetConfigDir("c:\\hexndata\\"); } else { M_SetConfigDir(NULL); } D_SetDefaultSavePath(); M_SetConfigFilenames("hexen.cfg", PROGRAM_PREFIX "hexen.cfg"); M_LoadDefaults(); I_AtExit(M_SaveDefaults, false); // Now that the savedir is loaded from .CFG, make sure it exists CreateSavePath(); ST_Message("Z_Init: Init zone memory allocation daemon.\n"); Z_Init(); // haleyjd: removed WATCOMC ST_Message("W_Init: Init WADfiles.\n"); iwadfile = D_FindIWAD(IWAD_MASK_HEXEN, &gamemission); if (iwadfile == NULL) { I_Error("Game mode indeterminate. No IWAD was found. Try specifying\n" "one with the '-iwad' command line parameter."); } D_AddFile(iwadfile); W_CheckCorrectIWAD(hexen); D_IdentifyVersion(); D_SetGameDescription(); AdjustForMacIWAD(); HandleArgs(); I_PrintStartupBanner(gamedescription); ST_Message("MN_Init: Init menu system.\n"); MN_Init(); ST_Message("CT_Init: Init chat mode data.\n"); CT_Init(); InitMapMusicInfo(); // Init music fields in mapinfo ST_Message("S_InitScript\n"); S_InitScript(); ST_Message("SN_InitSequenceScript: Registering sound sequences.\n"); SN_InitSequenceScript(); ST_Message("I_Init: Setting up machine state.\n"); I_CheckIsScreensaver(); I_InitTimer(); I_InitJoystick(); I_InitSound(false); I_InitMusic(); #ifdef FEATURE_MULTIPLAYER ST_Message("NET_Init: Init networking subsystem.\n"); NET_Init(); #endif D_ConnectNetGame(); S_Init(); S_Start(); ST_Message("ST_Init: Init startup screen.\n"); ST_Init(); // Show version message now, so it's visible during R_Init() ST_Message("R_Init: Init Hexen refresh daemon"); R_Init(); ST_Message("\n"); //if (M_CheckParm("-net")) // ST_NetProgress(); // Console player found ST_Message("P_Init: Init Playloop state.\n"); P_Init(); // Check for command line warping. Follows P_Init() because the // MAPINFO.TXT script must be already processed. WarpCheck(); ST_Message("D_CheckNetGame: Checking network game status.\n"); D_CheckNetGame(); ST_Message("SB_Init: Loading patches.\n"); SB_Init(); ST_Done(); if (autostart) { ST_Message("Warp to Map %d (\"%s\":%d), Skill %d\n", WarpMap, P_GetMapName(startmap), startmap, startskill + 1); } CheckRecordFrom(); p = M_CheckParm("-record"); if (p && p < myargc - 1) { G_RecordDemo(startskill, 1, startepisode, startmap, myargv[p + 1]); H2_GameLoop(); // Never returns } p = M_CheckParmWithArgs("-playdemo", 1); if (p) { singledemo = true; // Quit after one demo G_DeferedPlayDemo(demolumpname); H2_GameLoop(); // Never returns } p = M_CheckParmWithArgs("-timedemo", 1); if (p) { G_TimeDemo(demolumpname); H2_GameLoop(); // Never returns } //! // @arg <s> // @vanilla // // Load the game in savegame slot s. // p = M_CheckParmWithArgs("-loadgame", 1); if (p) { G_LoadGame(atoi(myargv[p + 1])); } if (gameaction != ga_loadgame) { UpdateState |= I_FULLSCRN; BorderNeedRefresh = true; if (autostart || netgame) { G_StartNewInit(); G_InitNew(startskill, startepisode, startmap); } else { H2_StartTitle(); } } H2_GameLoop(); // Never returns }