diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index a8336a6d8..f9874c995 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -389,7 +389,6 @@ void StartLevel(MapRecord *level) } } bVanilla = false; - enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;//bVanilla; memset(xsprite,0,sizeof(xsprite)); memset(sprite,0,kMaxSprites*sizeof(spritetype)); //drawLoadingScreen(); @@ -704,13 +703,14 @@ void GameInterface::app_init() Printf(PRINT_NONOTIFY, "Initializing network users\n"); netInitialize(true); - videoInit(); Printf(PRINT_NONOTIFY, "Initializing sound system\n"); sndInit(); registerosdcommands(); gChoke.sub_83ff0(518, sub_84230); UpdateDacs(0, true); + + enginecompatibility_mode = ENGINECOMPATIBILITY_19960925;//bVanilla; } static void gameInit() diff --git a/source/blood/src/view.cpp b/source/blood/src/view.cpp index 6160c986d..0e253e7f0 100644 --- a/source/blood/src/view.cpp +++ b/source/blood/src/view.cpp @@ -322,7 +322,6 @@ void viewInit(void) FontSet(2, 4288, 1); FontSet(3, 4384, 1); FontSet(4, 4480, 0); - enginePostInit(); // This must not be done earlier! lensdata = fileSystem.LoadFile("lens.dat"); dassert(lensdata.Size() == kLensSize * kLensSize * sizeof(int)); diff --git a/source/core/d_net.cpp b/source/core/d_net.cpp index 7eee62175..ae879ce35 100644 --- a/source/core/d_net.cpp +++ b/source/core/d_net.cpp @@ -1745,10 +1745,10 @@ bool D_CheckNetGame (void) if (myconnectindex != Net_Arbitrator && doomcom.numnodes > 1) { - Printf("Arbitrator selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode.\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server"); + Printf(PRINT_NONOTIFY, "Arbitrator selected " TEXTCOLOR_BLUE "%s" TEXTCOLOR_NORMAL " networking mode.\n", NetMode == NET_PeerToPeer ? "peer to peer" : "packet server"); } - if (!batchrun) Printf ("player %i of %i (%i nodes)\n", + if (!batchrun) Printf (PRINT_NONOTIFY, "player %i of %i (%i nodes)\n", myconnectindex+1, doomcom.numplayers, doomcom.numnodes); return true; diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index d6d42d02b..8bf083cc4 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -142,7 +142,7 @@ void DrawFullscreenBlends(); void MainLoop(); -bool AppActive; +bool AppActive = true; FString currentGame; FString LumpFilter; @@ -862,9 +862,11 @@ int RunGame() SetupGameButtons(); gi->app_init(); + enginePostInit(); // This must not be done earlier! + videoInit(); // Duke has transitioned to the new main loop, the other games haven't yet. - if (g_gameType & GAMEFLAG_DUKE | GAMEFLAG_RRALL | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI) + if (g_gameType & (GAMEFLAG_DUKE | GAMEFLAG_RRALL | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI)) { D_CheckNetGame(); MainLoop(); @@ -1150,6 +1152,7 @@ void S_SetSoundPaused(int state) } } } +#if 0 if (!netgame #if 0 //def _DEBUG && !demoplayback @@ -1158,7 +1161,7 @@ void S_SetSoundPaused(int state) { pauseext = !state; } - +#endif } FString G_GetDemoPath() diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 227aed0b3..9b7ab160e 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -229,7 +229,8 @@ void Display() gi->DrawBackground(); break; - case GS_FINALE: + case GS_INTRO: + case GS_INTERMISSION: // screen jobs are not bound by the game ticker so they need to be ticked in the display loop. RunScreenJobFrame(); break; @@ -248,12 +249,15 @@ void Display() NetUpdate(); // send out any new accumulation - // Draw overlay elements - CT_Drawer(); - C_DrawConsole(); - M_Drawer(); - FStat::PrintStat(twod); - DrawRateStuff(); + if (gamestate != GS_INTRO) // do not draw overlays on the intros + { + // Draw overlay elements + CT_Drawer(); + C_DrawConsole(); + M_Drawer(); + FStat::PrintStat(twod); + DrawRateStuff(); + } videoShowFrame(0); } diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index 1176f3be3..5f86d8b7a 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -61,7 +61,6 @@ void uploadCinemaPalettes(); int32_t registerosdcommands(void); void InitFonts(); -int htimer = 0; int EndLevel = false; @@ -86,9 +85,6 @@ void InstallEngine() uploadCinemaPalettes(); LoadPaletteLookups(); InitFonts(); - videoInit(); - - enginecompatibility_mode = ENGINECOMPATIBILITY_19950829; } void RemoveEngine() @@ -628,11 +624,6 @@ void ExitGame() throw CExitEvent(0); } -void InitTimer() -{ - htimer = 1; -} - void GameInterface::app_init() { int i; @@ -673,22 +664,18 @@ void GameInterface::app_init() Printf(PRINT_NONOTIFY, "Definitions file \"%s\" loaded in %d ms.\n", defsfile, etime - stime); } - - enginePostInit(); - InitView(); InitFX(); seq_LoadSequences(); InitStatus(); - InitTimer(); - + for (i = 0; i < kMaxPlayers; i++) { nPlayerLives[i] = kDefaultLives; } - - ResetEngine(); - ResetView(); + resettiming(); GrabPalette(); + + enginecompatibility_mode = ENGINECOMPATIBILITY_19950829; } void mychangespritesect(int nSprite, int nSector) diff --git a/source/exhumed/src/exhumed.h b/source/exhumed/src/exhumed.h index b68612191..12aaabf6e 100644 --- a/source/exhumed/src/exhumed.h +++ b/source/exhumed/src/exhumed.h @@ -106,8 +106,6 @@ extern int GameAction; extern int nNetPlayerCount; -extern int htimer; - extern int nNetTime; extern short nTotalPlayers; diff --git a/source/exhumed/src/sequence.cpp b/source/exhumed/src/sequence.cpp index 10f4b1574..579ed3213 100644 --- a/source/exhumed/src/sequence.cpp +++ b/source/exhumed/src/sequence.cpp @@ -310,6 +310,7 @@ void seq_LoadSequences() } } +#if 0 FILE* f = fopen("seq.dump", "wb"); fwrite(SeqBase, 1, sizeof(SeqBase), f); @@ -326,6 +327,7 @@ void seq_LoadSequences() fwrite(ChunkPict, 1, sizeof(ChunkPict), f); fwrite(ChunkFlag, 1, sizeof(ChunkFlag), f); fclose(f); +#endif nShadowPic = seq_GetFirstSeqPicnum(kSeqShadow); nShadowWidth = tilesiz[nShadowPic].x; diff --git a/source/games/duke/src/game.cpp b/source/games/duke/src/game.cpp index 6ffba1433..ae071be8c 100644 --- a/source/games/duke/src/game.cpp +++ b/source/games/duke/src/game.cpp @@ -272,7 +272,7 @@ static void initTiles() // //--------------------------------------------------------------------------- -static void Startup(void) +void GameInterface::app_init() { if (isRR()) C_SetNotifyFontScale(0.5); ud.god = 0; @@ -313,8 +313,6 @@ static void Startup(void) OnEvent(EVENT_INIT); - enginecompatibility_mode = ENGINECOMPATIBILITY_19961112; - if (engineInit()) G_FatalEngineError(); @@ -348,21 +346,7 @@ static void Startup(void) } ud.last_level = -1; -} - -//--------------------------------------------------------------------------- -// -// main entry point, sets up the game module and the engine, then enters the main loop -// -//--------------------------------------------------------------------------- - -void GameInterface::app_init() -{ - Startup(); - enginePostInit(); - videoInit(); enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;//bVanilla; } - END_DUKE_NS diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 083bfd86f..7dc9ddbad 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -237,8 +237,6 @@ void GameInterface::app_init() if (!loaddefinitionsfile(G_DefFile())) Printf(PRINT_NONOTIFY, "Definitions file loaded.\n"); userConfig.AddDefs.reset(); - enginePostInit(); - videoInit(); InitFX(); }