command-line argument support added
This commit is contained in:
parent
cededfd346
commit
f891cf8c0f
@ -182,7 +182,7 @@ type
|
|||||||
View1: TMenuItem;
|
View1: TMenuItem;
|
||||||
tbShowAlpha: TToolButton;
|
tbShowAlpha: TToolButton;
|
||||||
tbShowTrace: TToolButton;
|
tbShowTrace: TToolButton;
|
||||||
ToolButton2: TToolButton;
|
tbTraceSeparator: TToolButton;
|
||||||
mnuRenderAll: TMenuItem;
|
mnuRenderAll: TMenuItem;
|
||||||
procedure tbzoomoutwindowClick(Sender: TObject);
|
procedure tbzoomoutwindowClick(Sender: TObject);
|
||||||
procedure mnuimageClick(Sender: TObject);
|
procedure mnuimageClick(Sender: TObject);
|
||||||
@ -2594,7 +2594,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
if FileExists(AppPath + 'apophysis.rand') then
|
if FileExists(AppPath + 'apophysis.rand') then
|
||||||
DeleteFile(AppPath + 'apophysis.rand');
|
DeleteFile(AppPath + 'apophysis.rand');
|
||||||
if (defFlameFile = '') or (not FileExists(defFlameFile)) then
|
|
||||||
|
// get filename from command line argument
|
||||||
|
if ParamCount > 0 then openFile := ParamStr(1)
|
||||||
|
else openFile := defFlameFile;
|
||||||
|
|
||||||
|
if (openFile = '') or (not FileExists(openFile)) then
|
||||||
begin
|
begin
|
||||||
MainCp.Width := Image.Width;
|
MainCp.Width := Image.Width;
|
||||||
MainCp.Height := Image.Height;
|
MainCp.Height := Image.Height;
|
||||||
@ -2607,8 +2612,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
OpenFile := defFlameFile;
|
if (LowerCase(ExtractFileExt(OpenFile)) = '.apo') or (LowerCase(ExtractFileExt(OpenFile)) = '.fla') then
|
||||||
if (LowerCase(ExtractFileExt(defFlameFile)) = '.apo') or (LowerCase(ExtractFileExt(defFlameFile)) = '.fla') then
|
|
||||||
begin
|
begin
|
||||||
ListFlames(OpenFile, 1);
|
ListFlames(OpenFile, 1);
|
||||||
OpenFileType := ftFla;
|
OpenFileType := ftFla;
|
||||||
@ -4206,7 +4210,7 @@ begin
|
|||||||
Tokens := TStringList.Create;
|
Tokens := TStringList.Create;
|
||||||
try
|
try
|
||||||
if (TagName = 'xform') or (TagName = 'finalxform') then
|
if (TagName = 'xform') or (TagName = 'finalxform') then
|
||||||
if (TagName = 'finalxform') and (FinalXformLoaded) then ShowMessage('ERROR: No xforms allowed after FinalXform!')
|
if {(TagName = 'finalxform') and} (FinalXformLoaded) then ShowMessage('ERROR: No xforms allowed after FinalXform!')
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
if (TagName = 'finalxform') or (activeXformSet > 0) then FinalXformLoaded := true;
|
if (TagName = 'finalxform') or (activeXformSet > 0) then FinalXformLoaded := true;
|
||||||
@ -4262,15 +4266,9 @@ begin
|
|||||||
if v <> '' then begin
|
if v <> '' then begin
|
||||||
if v = 'off' then begin
|
if v = 'off' then begin
|
||||||
noPlot := true;
|
noPlot := true;
|
||||||
//RetraceXform := false;
|
|
||||||
end
|
end
|
||||||
// else if v = 'retrace' then begin
|
|
||||||
// noPlot := false;
|
|
||||||
// RetraceXform := true;
|
|
||||||
// end
|
|
||||||
else begin
|
else begin
|
||||||
noPlot := false;
|
noPlot := false;
|
||||||
//RetraceXform := false;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user