summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6a52951)
raw | patch | inline | side by side (parent: 6a52951)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 30 Aug 2019 17:49:27 +0000 (20:49 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 30 Aug 2019 17:49:27 +0000 (20:49 +0300) |
src/game/g_game.pas | patch | blob | history | |
src/game/g_main.pas | patch | blob | history | |
src/game/g_window.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index e6429bc23bbaa28f9776ab1f7a3d872a5fb35791..df45196b1e0b168175efb8de36681b85041e1888 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
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');
//e_WriteLog('Read language file', MSG_NOTIFY);
//g_Language_Load(DataDir + gLanguage + '.txt');
g_Language_Set(gLanguage);
+{$IFNDEF HEADLESS}
g_Menu_Reset();
+{$ENDIF}
gLanguageChange := False;
end;
end;
g_ActiveWindow.Draw();
end;
+{$IFNDEF HEADLESS}
g_Console_Draw();
+{$ENDIF}
if g_debug_Sounds and gGameOn then
begin
g_PlayerModel_FreeData();
g_Texture_DeleteAll();
g_Frames_DeleteAll();
+{$IFNDEF HEADLESS}
//g_Menu_Free(); //k8: this segfaults after resolution change; who cares?
+{$ENDIF}
if NetInitDone then g_Net_Free;
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 2f68e2e604abd00f6b22d791987d15519e82adc5..c3741bc1ec0ab207be3c786a14513da0b4d397f8 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
procedure KeyPress (K: Word);
+{$IFNDEF HEADLESS}
var
Msg: g_gui.TMessage;
+{$ENDIF}
begin
+{$IFNDEF HEADLESS}
case K of
VK_ESCAPE: // <Esc>:
begin
end;
end;
end;
+{$ENDIF}
end;
diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index d703ea2fc2088a829bfa3af1bf07b83d31b44f16..b8d0921b589b98eb4190e598cd1f8ea32766a41f 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
end;
end;
+{$IFNDEF HEADLESS}
if forceUpdate then
begin
DrawMenuBackground('INTER');
g_Console_Draw(True);
SwapBuffers();
end;
+{$ENDIF}
end;
e_SoundUpdate();
// Êîìàíäíàÿ ñòðîêà
if (ParamCount > 0) then g_Game_Process_Params();
+{$IFNDEF HEADLESS}
// Çàïðîñ ÿçûêà
if (not gGameOn) and gAskLanguage then g_Menu_AskLanguage();
+{$ENDIF}
e_WriteLog('Entering the main loop', TMsgType.Notify);