- Support for forts game mode option. Works for demos, frontend doesn't support it.
authorunc0rr
Mon, 22 Aug 2005 15:06:42 +0000
changeset 2 4eeab397c3c6
parent 1 30f2d1037d5d
child 3 ffe4ad26a64c
- Support for forts game mode option. Works for demos, frontend doesn't support it. - Updated copyright info for forts
README.txt
hedgewars/fIPC.pas
hedgewars/hw.dpr
hedgewars/uConsole.pas
hedgewars/uConsts.pas
hedgewars/uMisc.pas
--- a/README.txt	Mon Aug 22 13:35:41 2005 +0000
+++ b/README.txt	Mon Aug 22 15:06:42 2005 +0000
@@ -5,6 +5,7 @@
 images in Data/Graphics, 
 sounds in Data/Sounds,
 themes "avematan", "bubbles", "tibet"
+fort "Barrelhouse"
 (c) 2004, 2005 Andrey Korotaev <unC0Rr@gmail.com>
 
 Fonts  
--- a/hedgewars/fIPC.pas	Mon Aug 22 13:35:41 2005 +0000
+++ b/hedgewars/fIPC.pas	Mon Aug 22 15:06:42 2005 +0000
@@ -90,6 +90,7 @@
 SendIPC(format('e$sound %d',[SendMessage(HSetSndCheck, BM_GETCHECK, 0, 0)]));
 case GameType of
     gtLocal: begin
+             SendIPC(format('e$gmflags %d',[0]));
              SendIPC('eaddteam');
              ExecCFG(Pathz[ptTeams] + 'unC0Rr.cfg');
              SendIPC('ecolor 65535');
--- a/hedgewars/hw.dpr	Mon Aug 22 13:35:41 2005 +0000
+++ b/hedgewars/hw.dpr	Mon Aug 22 15:06:42 2005 +0000
@@ -70,8 +70,8 @@
 begin
 case GameState of
    gsLandGen: begin
-              GenLandSurface;
-              //MakeFortsMap;
+              if (GameFlags and gfForts) = 0 then GenLandSurface
+                                             else MakeFortsMap;
               GameState:= gsStart;
               end;
      gsStart: begin
--- a/hedgewars/uConsole.pas	Mon Aug 22 13:35:41 2005 +0000
+++ b/hedgewars/uConsole.pas	Mon Aug 22 15:06:42 2005 +0000
@@ -263,6 +263,7 @@
 RegisterVariable('rdriven' , vtCommand, @chTeamLocal    );
 //RegisterVariable('gravity' , vtReal   , @cGravity       ); гравитация не должна быть доступна вообще
 RegisterVariable('c_height', vtInteger, @cConsoleHeight );
+RegisterVariable('gmflags' , vtInteger, @GameFlags      );
 RegisterVariable('showfps' , vtBoolean, @cShowFPS       );
 RegisterVariable('sound'   , vtBoolean, @isSoundEnabled );
 RegisterVariable('name'    , vtCommand, @chName         );
--- a/hedgewars/uConsts.pas	Mon Aug 22 13:35:41 2005 +0000
+++ b/hedgewars/uConsts.pas	Mon Aug 22 15:06:42 2005 +0000
@@ -101,6 +101,8 @@
 
       cInactDelay = 1500;
 
+      gfForts = $00000001;
+
       gstDrowning       = $00000001;
       gstHHDriven       = $00000002;
       gstMoving         = $00000004;
--- a/hedgewars/uMisc.pas	Mon Aug 22 13:35:41 2005 +0000
+++ b/hedgewars/uMisc.pas	Mon Aug 22 15:06:42 2005 +0000
@@ -43,6 +43,7 @@
 
     GameState     : TGameState = gsLandGen;
     GameType      : TGameType = gmtLocal;
+    GameFlags     : Longword = 0;
     TurnTimeLeft  : Longword = 0;
     cHedgehogTurnTime: Longword = 30000;