hedgewars/hwengine.dpr
changeset 53 0e27949850e3
parent 51 b6e3ae05857f
child 54 839fd258ae6f
--- a/hedgewars/hwengine.dpr	Sun Jan 15 23:56:47 2006 +0000
+++ b/hedgewars/hwengine.dpr	Thu Jan 19 21:12:20 2006 +0000
@@ -156,6 +156,7 @@
 ////////////////////
 procedure GetParams;
 var c: integer;
+    s: string;
 {$IFDEF DEBUGFILE}
     i: integer;
 begin
@@ -166,10 +167,12 @@
 {$ENDIF}
 if ParamCount=6 then
    begin
-   //TODO: сделать передачу через IPC
    val(ParamStr(1), cScreenWidth, c);
    val(ParamStr(2), cScreenHeight, c);
-   Pathz[ptThemeCurrent]:= Pathz[ptThemes] + ParamStr(3)+'/';
+   // "/mapname" is map, "avematan" is theme
+   s:= ParamStr(3);
+   if (Length(s) > 0) and (s[1] = '/') then Pathz[ptMapCurrent]:= Pathz[ptMaps] + s
+                                       else Pathz[ptThemeCurrent]:= Pathz[ptThemes] + '/' + ParamStr(3);
    val(ParamStr(4), ipcPort, c);
    SetRandomParams(ParamStr(5), rndfillstr);
    cFullScreen:= ParamStr(6)[1] = '1'
@@ -190,10 +193,9 @@
 ////////////////////////////////////////////////////////////////////////////////
 /////////////////////////////// m a i n ////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////
-{$INCLUDE revision.inc}
 
 begin
-WriteLnToConsole('HedgeWars 0.1, svn '+cRevision);
+WriteLnToConsole('HedgeWars 0.1 alpha');
 WriteLnToConsole('  -= by unC0Rr =-  ');
 GetParams;
 Randomize;