summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b7f7681)
raw | patch | inline | side by side (parent: b7f7681)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 29 Aug 2019 19:33:20 +0000 (22:33 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 29 Aug 2019 19:33:20 +0000 (22:33 +0300) |
src/game/Doom2DF.lpr | patch | blob | history | |
src/game/g_game.pas | patch | blob | history | |
src/game/g_main.pas | patch | blob | history |
diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index 3239be1e6fd0bd800cee48c3a34d2d362f708093..f8d946e730c74329686fae4c3cfccf10654b61ec 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
SetEnvVar('TIMIDITY_CFG', 'timidity.cfg');
{$ENDIF ANDROID}
- for f := 1 to ParamCount do
+ f := 1;
+ while f <= ParamCount do
begin
- if ParamStr(f) = '--gdb' then noct := true
- else if ParamStr(f) = '--log' then conbufDumpToStdOut := true
- else if ParamStr(f) = '--safe-log' then e_SetSafeSlowLog(true);
+ case ParamStr(f) of
+ '--gdb': noct := true;
+ '--log': conbufDumpToStdOut := true;
+ '--safe-log': e_SetSafeSlowLog(true);
+ '--log-file':
+ if f + 1 <= ParamCount then
+ begin
+ Inc(f);
+ LogFileName := ParamStr(f)
+ end;
+ end;
+ Inc(f)
end;
+
+ if LogFileName = '' then
+ begin
+{$IFDEF HEADLESS}
+ LogFileName := 'Doom2DF_H.log';
+{$ELSE}
+ LogFileName := 'Doom2DF.log';
+{$ENDIF}
+ end;
+
if noct then
begin
Main()
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index 77fd80ac499b78f21c870be4cb5a75d167fca1e2..e6429bc23bbaa28f9776ab1f7a3d872a5fb35791 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
ANNOUNCE_ALL = 3;
CONFIG_FILENAME = 'Doom2DF.cfg';
- LOG_FILENAME = 'Doom2DF.log';
TEST_MAP_NAME = '$$$_TEST_$$$';
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index b5595832e9573dd1fd2242dbbf32af4085fce7ff..2f68e2e604abd00f6b22d791987d15519e82adc5 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
MapsDir: string;
ModelsDir: string;
GameWAD: string;
+ LogFileName: string;
implementation
ModelsDir := DataDir + 'models/';
GameWAD := DataDir + 'Game.wad';
- e_InitLog(GameDir + '/' + LOG_FILENAME, TWriteMode.WM_NEWFILE);
+ e_InitLog(GameDir + '/' + LogFileName, TWriteMode.WM_NEWFILE);
e_WriteLog(
'Doom 2D: Forever version ' + GAME_VERSION +