summaryrefslogtreecommitdiff
blob: 0bf26eb716db25b525844e5ded885bb81d985ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Index: QTfrontend/game.cpp
===================================================================
--- QTfrontend/game.cpp	(revision 510)
+++ QTfrontend/game.cpp	(revision 512)
@@ -204,6 +204,7 @@
 QStringList HWGame::setArguments()
 {
 	QStringList arguments;
+	arguments << cfgdir->absolutePath();
 	arguments << resolutions[0][config->vid_Resolution()];
 	arguments << resolutions[1][config->vid_Resolution()];
 	arguments << "16"; // bpp
Index: QTfrontend/hwmap.cpp
===================================================================
--- QTfrontend/hwmap.cpp	(revision 510)
+++ QTfrontend/hwmap.cpp	(revision 512)
@@ -15,6 +15,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */
 
+#include "hwconsts.h"
 #include "hwmap.h"
 
 HWMap::HWMap() :
@@ -35,6 +36,7 @@
 QStringList HWMap::setArguments()
 {
   QStringList arguments;
+  arguments << cfgdir->absolutePath();
   arguments << QString("%1").arg(ipc_port);
   arguments << "landpreview";
   return arguments;
Index: hedgewars/hwengine.dpr
===================================================================
--- hedgewars/hwengine.dpr	(revision 510)
+++ hedgewars/hwengine.dpr	(revision 512)
@@ -176,27 +176,27 @@
 {$ENDIF}
 
 case ParamCount of
-11: begin
-     val(ParamStr(1), cScreenWidth, c);
-     val(ParamStr(2), cScreenHeight, c);
-     cBitsStr:= ParamStr(3);
+12: begin
+     val(ParamStr(2), cScreenWidth, c);
+     val(ParamStr(3), cScreenHeight, c);
+     cBitsStr:= ParamStr(4);
      val(cBitsStr, cBits, c);
-     val(ParamStr(4), ipcPort, c);
-     cFullScreen:= ParamStr(5) = '1';
-     isSoundEnabled:= ParamStr(6) = '1';
-     cLocaleFName:= ParamStr(7);
-     val(ParamStr(8), cInitVolume, c);
-     val(ParamStr(9), cTimerInterval, c);
-     PathPrefix:= ParamStr(10);
-     cShowFPS:= ParamStr(11) = '1';
+     val(ParamStr(5), ipcPort, c);
+     cFullScreen:= ParamStr(6) = '1';
+     isSoundEnabled:= ParamStr(7) = '1';
+     cLocaleFName:= ParamStr(8);
+     val(ParamStr(9), cInitVolume, c);
+     val(ParamStr(10), cTimerInterval, c);
+     PathPrefix:= ParamStr(11);
+     cShowFPS:= ParamStr(12) = '1';
      for p:= Succ(Low(TPathType)) to High(TPathType) do
          if p <> ptMapCurrent then Pathz[p]:= PathPrefix + '/' + Pathz[p];
      AddClouds
      end;
-  2: begin
-     val(ParamStr(1), ipcPort, c);
+  3: begin
+     val(ParamStr(2), ipcPort, c);
      GameType:= gmtLandPreview;
-     if ParamStr(2) <> 'landpreview' then OutError(errmsgShouldntRun, true);
+     if ParamStr(3) <> 'landpreview' then OutError(errmsgShouldntRun, true);
      end
    else
    OutError(errmsgShouldntRun, true)
Index: hedgewars/uMisc.pas
===================================================================
--- hedgewars/uMisc.pas	(revision 510)
+++ hedgewars/uMisc.pas	(revision 512)
@@ -253,9 +253,10 @@
 
 {$IFDEF DEBUGFILE}
 {$I-}
-for i:= 0 to 7 do
+if ParamCount > 0 then
+  for i:= 0 to 7 do
     begin
-    Assign(f, 'debug' + inttostr(i) + '.txt');
+    Assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt');
     rewrite(f);
     if IOResult = 0 then break
     end;