summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a97fbe5)
raw | patch | inline | side by side (parent: a97fbe5)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 22 May 2023 17:34:45 +0000 (20:34 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 22 May 2023 17:34:45 +0000 (20:34 +0300) |
src/editor/Editor.lpr | patch | blob | history | |
src/editor/f_main.pas | patch | blob | history |
diff --git a/src/editor/Editor.lpr b/src/editor/Editor.lpr
index b96ed23cf0adbf4d55c0d167410ffcd8685dead4..171c8564c25c7313e70c80e65dc5cd8d0ee7aa10 100644 (file)
--- a/src/editor/Editor.lpr
+++ b/src/editor/Editor.lpr
end;
procedure CheckParamFiles;
- var i: Integer; path: AnsiString;
+ var i: Integer;
begin
i := ParamFileIndex;
if i <= ParamCount then
- begin
- path := ParamStr(i);
- if path <> '' then
- OpenMap(path, '');
- end;
+ StartMap := ParamStr(i);
end;
procedure InitLogs;
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index ca323f69220c99e1b7d12e4918cea0edba16e6e7..8d11a3b7cb75b8d8b3c70f8be2d690b912c97fcc 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
var
MainForm: TMainForm;
+ StartMap: String;
OpenedMap: String;
OpenedWAD: String;
end;
procedure TMainForm.OnIdle(Sender: TObject; var Done: Boolean);
+ var f: AnsiString;
begin
// FIXME: this is a shitty hack
if not gDataLoaded then
MainForm.FormResize(nil);
end;
Draw();
+ if StartMap <> '' then
+ begin
+ f := StartMap;
+ StartMap := '';
+ OpenMap(f, '');
+ end;
end;
procedure TMainForm.miMapPreviewClick(Sender: TObject);