DEADSOFTWARE

render: system: move gl related code from system driver
[d2df-sdl.git] / src / game / g_game.pas
index 85892570c59ceb9e2b65a5b8e8d140d148e173c1..664377ccad70d23e9a067e6e8dba179848495e6f 100644 (file)
@@ -384,6 +384,7 @@ var
   g_rlayer_water: Boolean = true;
   g_rlayer_fore: Boolean = true;
 
+  wNeedTimeReset: Boolean = false;
 
 procedure g_ResetDynlights ();
 procedure g_AddDynLight (x, y, radius: Integer; r, g, b, a: Single);
@@ -1487,13 +1488,7 @@ begin
     g_Game_SetLoadingText(Format('Doom 2D: Forever %s', [GAME_VERSION]), 0, False);
     g_Game_SetLoadingText('', 0, False);
 
-    g_Game_SetLoadingText(_lc[I_LOAD_CONSOLE], 0, False);
-    r_Console_Init;
-    g_Console_Init();
-
     g_Game_SetLoadingText(_lc[I_LOAD_MODELS], 0, False);
-    r_PlayerModel_Initialize;
-
     // load models from all possible wad types, in all known directories
     // this does a loosy job (linear search, ooph!), but meh
     for wext in wadExtensions do
@@ -1547,11 +1542,6 @@ begin
     g_Sound_CreateWADEx('MUSIC_ROUNDMUS', GameWAD+':MUSIC\ROUNDMUS', True, True);
     g_Sound_CreateWADEx('MUSIC_STDENDMUS', GameWAD+':MUSIC\ENDMUS', True);
 
-{$IFNDEF HEADLESS}
-    g_Game_SetLoadingText(_lc[I_LOAD_MENUS], 0, False);
-    g_Menu_Init();
-{$ENDIF}
-
     gMusic := TMusic.Create();
     gMusic.SetByName('MUSIC_MENU');
     gMusic.Play();
@@ -2672,7 +2662,6 @@ begin
   g_Game_StopAllSounds(True);
   gMusic.Free();
   g_Game_FreeData();
-  r_PlayerModel_Finalize;
   g_PlayerModel_FreeData();
   g_Texture_DeleteAll();
   g_Frames_DeleteAll();
@@ -3619,7 +3608,7 @@ begin
       gGameOn := True;
 
       DisableCheats();
-      ResetTimer();
+      wNeedTimeReset := True;
 
       if gGameSettings.GameMode = GM_CTF then
       begin