--- a/hedgewars/hwengine.pas Mon Dec 17 00:18:18 2012 +0100
+++ b/hedgewars/hwengine.pas Mon Dec 17 00:34:49 2012 +0100
@@ -543,62 +543,8 @@
{$IFNDEF HWLIBRARY}
-///////////////////////////////////////////////////////////////////////////////
{$INCLUDE "ArgParsers.inc"}
-procedure GetParams;
-var startIndex,tmpInt: LongInt;
- debug: string;
-begin
- (*
- tmpInt:=0;
- while (tmpInt <= ParamCount) do
- begin
- WriteLn(stdout,inttostr(tmpInt) + ': ' + ParamStr(tmpInt));
- inc(tmpInt);
- end;
- *)
-
- if (ParamCount = 3) and (ParamStr(3) = 'landpreview') then
- begin
- PathPrefix := ParamStr(1);
- ipcPort := StrToInt(ParamStr(2));
- GameType := gmtLandPreview;
- exit;
- end;
-
- //TODO: prepend something so that we can use a cDefaultParamNum of parameters
- if ParamCount = cDefaultParamNum then
- begin
- internalStartGameWithParameters();
- exit;
- end
-{$IFDEF USE_VIDEO_RECORDING}
- else if ParamCount = cVideorecParamNum then
- begin
- internalStartVideoRecordingWithParameters();
- exit;
- end
-{$ENDIF};
-
- UserPathPrefix := '.';
- PathPrefix := cDefaultPathPrefix;
- recordFileName := '';
- startIndex := 1;
- playReplayFileWithParameters(startIndex);
-
- if (recordFileName = '') then
- begin
- DisplayUsage();
- GameType:= gmtSyntax;
- end;
- (*
- WriteLn(stdout,'PathPrefix: ' + PathPrefix);
- WriteLn(stdout,'UserPathPrefix: ' + UserPathPrefix);
- WriteLn(stdout,'recordFilename: ' + recordFilename);
- *)
-end;
-
///////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// m a i n ///////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
@@ -608,9 +554,8 @@
if GameType = gmtLandPreview then
GenLandPreview()
- else if GameType = gmtSyntax then
- //Exit cleanly
- else Game();
+ else if GameType <> gmtSyntax then
+ Game();
// return 1 when engine is not called correctly
halt(LongInt(GameType = gmtSyntax));