DEADSOFTWARE

system: remove chdir
[d2df-editor.git] / src / editor / f_main.pas
index 34a7287afeadcaa5549b3ddf1305d68d8faac0bb..04d69f82c9e3f4610dde61af1675511577fdc741 100644 (file)
@@ -286,7 +286,6 @@ const
 
 var
   MainForm: TMainForm;
-  EditorDir: String;
   OpenedMap: String;
   OpenedWAD: String;
 
@@ -2617,10 +2616,10 @@ var
   config: TConfig;
 begin
   ID := 0;
-  g_ReadResource(EditorDir + 'data/game.wad', 'FONTS', cfgres, cfgdata, cfglen);
+  g_ReadResource(GameWad, 'FONTS', cfgres, cfgdata, cfglen);
   if cfgdata <> nil then
   begin
-    if not g_CreateTextureWAD('FONT_STD', EditorDir + 'data/game.wad:FONTS\' + texture) then
+    if not g_CreateTextureWAD('FONT_STD', GameWad + ':FONTS\' + texture) then
       e_WriteLog('ERROR ERROR ERROR', MSG_WARNING);
 
     config := TConfig.CreateMem(cfgdata, cfglen);
@@ -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);