merge fixes from branch
authordisplacer
Thu, 15 Mar 2007 22:46:37 +0000
changeset 497 adf1aee202c6
parent 496 00465a8ef129
child 498 9c8b385dc9a1
merge fixes from branch
CMakeLists.txt
INSTALL
QTfrontend/game.cpp
QTfrontend/hwmap.cpp
hedgewars/hwengine.dpr
hedgewars/uMisc.pas
--- a/CMakeLists.txt	Thu Mar 15 02:20:31 2007 +0000
+++ b/CMakeLists.txt	Thu Mar 15 22:46:37 2007 +0000
@@ -1,6 +1,6 @@
 project(hedgewars)
 
-cmake_minimum_required(VERSION 2.4.0)
+cmake_minimum_required(VERSION 2.4.4 FATAL_ERROR)
 
 if(DEFINED DATA_INSTALL_DIR)
 	set(SHAREPATH ${DATA_INSTALL_DIR}/hedgewars/)
--- a/INSTALL	Thu Mar 15 02:20:31 2007 +0000
+++ b/INSTALL	Thu Mar 15 22:46:37 2007 +0000
@@ -6,7 +6,7 @@
  - SDL_mixer >= 1.2
  - SDL_image >= 1.2
  - SDL_ttf >= 2.0
- - CMake >= 2.4.0
+ - CMake >= 2.4.4
  
 1. Configure:
 $ cmake . 
--- a/QTfrontend/game.cpp	Thu Mar 15 02:20:31 2007 +0000
+++ b/QTfrontend/game.cpp	Thu Mar 15 22:46:37 2007 +0000
@@ -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
--- a/QTfrontend/hwmap.cpp	Thu Mar 15 02:20:31 2007 +0000
+++ b/QTfrontend/hwmap.cpp	Thu Mar 15 22:46:37 2007 +0000
@@ -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;
--- a/hedgewars/hwengine.dpr	Thu Mar 15 02:20:31 2007 +0000
+++ b/hedgewars/hwengine.dpr	Thu Mar 15 22:46:37 2007 +0000
@@ -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)
--- a/hedgewars/uMisc.pas	Thu Mar 15 02:20:31 2007 +0000
+++ b/hedgewars/uMisc.pas	Thu Mar 15 22:46:37 2007 +0000
@@ -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;