From: DeaDDooMER Date: Wed, 29 Mar 2023 16:30:57 +0000 (+0300) Subject: system: remove chdir X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=c0428d85795e63600466f089c35e70bc66d9b5c2;p=d2df-editor.git system: remove chdir --- diff --git a/src/editor/f_addresource.pas b/src/editor/f_addresource.pas index 7703ab2..24c9f83 100644 --- a/src/editor/f_addresource.pas +++ b/src/editor/f_addresource.pas @@ -45,7 +45,7 @@ var implementation uses - f_main, WADSTRUCT, g_language, utils, sfs; + f_main, WADSTRUCT, g_language, utils, sfs, g_options; {$R *.lfm} @@ -64,7 +64,6 @@ begin FFullResourceName := ''; FResourceSelected := False; - ChDir(EditorDir); if FindFirst(EditorDir + 'wads/*.*', faAnyFile, SR) = 0 then repeat if (SR.name <> '.') and (SR.name <> '..') then diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index 22d9877..04d69f8 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -286,7 +286,6 @@ const var MainForm: TMainForm; - EditorDir: String; OpenedMap: String; OpenedWAD: String; @@ -2648,8 +2647,6 @@ var begin Randomize(); - EditorDir := ExtractFilePath(Application.ExeName); - e_WriteLog('Doom 2D: Forever Editor version ' + EDITOR_VERSION, MSG_NOTIFY); e_WriteLog('Build date: ' + EDITOR_BUILDDATE + ' ' + EDITOR_BUILDTIME, MSG_NOTIFY); e_WriteLog('Build hash: ' + g_GetBuildHash(), MSG_NOTIFY); diff --git a/src/editor/f_packmap.pas b/src/editor/f_packmap.pas index e2551ba..fbfe473 100644 --- a/src/editor/f_packmap.pas +++ b/src/editor/f_packmap.pas @@ -53,7 +53,7 @@ implementation uses BinEditor, WADEDITOR, g_map, MAPREADER, MAPWRITER, MAPSTRUCT, - f_main, math, g_language, g_resources, e_log; + f_main, math, g_language, g_resources, g_options, e_log; {$R *.lfm} diff --git a/src/editor/g_options.pas b/src/editor/g_options.pas index f2e5ecc..acb5de9 100644 --- a/src/editor/g_options.pas +++ b/src/editor/g_options.pas @@ -5,6 +5,7 @@ unit g_options; interface var + EditorDir: AnsiString; CfgFileName: AnsiString; GameWad: AnsiString; EditorWad: AnsiString;