move compiler directives to standard pascal
authorkoda
Thu, 05 Nov 2009 16:23:09 +0000
changeset 2599 c7153d2348f3
parent 2598 e118329666ff
child 2600 7b21daf84933
move compiler directives to standard pascal
hedgewars/SDLh.pas
hedgewars/hwengine.pas
hedgewars/options.inc
hedgewars/uAI.pas
hedgewars/uAIActions.pas
hedgewars/uAIMisc.pas
hedgewars/uAmmos.pas
hedgewars/uCollisions.pas
hedgewars/uConsole.pas
hedgewars/uConsts.pas
hedgewars/uFloat.pas
hedgewars/uGame.pas
hedgewars/uGears.pas
hedgewars/uIO.pas
hedgewars/uKeys.pas
hedgewars/uLand.pas
hedgewars/uLandGraphics.pas
hedgewars/uLandObjects.pas
hedgewars/uLandTemplates.pas
hedgewars/uLandTexture.pas
hedgewars/uMisc.pas
hedgewars/uRandom.pas
hedgewars/uSound.pas
hedgewars/uStore.pas
hedgewars/uTeams.pas
hedgewars/uTriggers.pas
hedgewars/uVisualGears.pas
hedgewars/uWorld.pas
--- a/hedgewars/SDLh.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/SDLh.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,9 +19,12 @@
 unit SDLh;
 interface
 
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
-{$IFDEF LINUX or FREEBSD}
+{$IFDEF LINUX}
+{$DEFINE UNIX}
+{$ENDIF}
+{$IFDEF FREEBSD}
 {$DEFINE UNIX}
 {$ENDIF}
 
@@ -32,7 +35,9 @@
   {$linklib pthread}
 {$ENDIF}
 
+{$IFDEF FPC}
 {$PACKRECORDS C}
+{$ENDIF}
 
 {$IFDEF DARWIN}
 	{$PASCALMAINNAME SDL_main}
@@ -205,8 +210,8 @@
 
 
 	PSDL_RWops = ^TSDL_RWops;
-	TSeek = function( context: PSDL_RWops; offset: LongInt; whence: LongInt ): LongInt; cdecl;
-	TRead = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; maxnum : LongInt ): LongInt;  cdecl;
+	TSeek  = function( context: PSDL_RWops; offset: LongInt; whence: LongInt ): LongInt; cdecl;
+	TRead  = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; maxnum : LongInt ): LongInt;  cdecl;
 	TWrite = function( context: PSDL_RWops; Ptr: Pointer; size: LongInt; num: LongInt ): LongInt; cdecl;
 	TClose = function( context: PSDL_RWops ): LongInt; cdecl;
 
--- a/hedgewars/hwengine.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/hwengine.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -20,7 +20,7 @@
 {$ERROR Only Free Pascal supported!}
 {$ENDIF}
 
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 program hwengine;
 uses
--- a/hedgewars/options.inc	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/options.inc	Thu Nov 05 16:23:09 2009 +0000
@@ -16,18 +16,20 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
-{$J+}
+{$IFDEF FPC}
+  {$J+}
+{$ENDIF}
 
 {$DEFINE DEBUGFILE}
-{ $DEFINE DUMP}
-{ $DEFINE TRACEAIACTIONS}
+  {$DEFINE DUMP}
+  {$DEFINE TRACEAIACTIONS}
 
 {$IFDEF IPHONEOS}
-{$DEFINE SDL13}
-{$DEFINE GLES11}
-{$DEFINE TOUCHINPUT}
+  {$DEFINE SDL13}
+  {$DEFINE GLES11}
+  {$DEFINE TOUCHINPUT}
 {$ENDIF}
 
 {$IFDEF TOUCHINPUT}
-{$DEFINE SDL13}
+  {$DEFINE SDL13}
 {$ENDIF}
--- a/hedgewars/uAI.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uAI.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uAI;
 interface
 uses uFloat;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 procedure ProcessBot;
 procedure FreeActionsList;
 
--- a/hedgewars/uAIActions.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uAIActions.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uAIActions;
 interface
 uses uGears, uFloat;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 const MAXACTIONS = 96;
       aia_none       = 0;
       aia_Left       = 1;
--- a/hedgewars/uAIMisc.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uAIMisc.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -16,7 +16,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 unit uAIMisc;
 interface
--- a/hedgewars/uAmmos.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uAmmos.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uAmmos;
 interface
 uses uConsts, uTeams;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 procedure AddAmmoStore(s: shortstring);
 procedure AssignStores;
--- a/hedgewars/uCollisions.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uCollisions.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uCollisions;
 interface
 uses uGears, uFloat;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 const cMaxGearArrayInd = 255;
 
 type PGearArray = ^TGearArray;
--- a/hedgewars/uConsole.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uConsole.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uConsole;
 interface
 uses uFloat;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 const isDeveloperMode: boolean = true;
 type TVariableType = (vtCommand, vtLongInt, vthwFloat, vtBoolean);
      TCommandHandler = procedure (var params: shortstring);
@@ -34,7 +34,6 @@
 procedure doPut(putX, putY: LongInt; fromAI: boolean);
 
 implementation
-{$J+}
 uses uMisc, uStore, Types, uConsts, uGears, uTeams, uIO, uKeys, uWorld, uLand,
      uRandom, uAmmos, uTriggers, uStats, uGame, uChat, SDLh, uSound, uVisualGears;
 
@@ -223,7 +222,7 @@
 if (Message and gm_Attack) <> 0 then ParseCommand('/-attack', true)
 end;
 
-{$INCLUDE CCHandlers.inc}
+{$INCLUDE "CCHandlers.inc"}
 
 initialization
 InitConsole;
--- a/hedgewars/uConsts.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uConsts.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -16,7 +16,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 unit uConsts;
 interface
@@ -30,7 +30,7 @@
 {$ENDIF}
 	uLocale;
 
-{$INCLUDE proto.inc}
+{$INCLUDE "proto.inc"}
 type
 
 	TGameState = (gsLandGen, gsStart, gsGame, gsChat, gsConfirm, gsExit);
--- a/hedgewars/uFloat.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uFloat.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,24 +19,24 @@
 unit uFloat;
 interface
 
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 {$IFDEF FPC}
-{$ifdef FPC_LITTLE_ENDIAN}
+{$IFDEF ENDIAN_LITTLE}
 type hwFloat = record
                isNegative: boolean;
                case byte of
                0: (Frac, Round: Longword);
                1: (QWordValue : QWord);
                end;
-{$else}
+{$ELSE}
 type hwFloat = record
                isNegative: boolean;
                case byte of
                0: (Round, Frac: Longword);
                1: (QWordValue : QWord);
                end;
-{$endif}
+{$ENDIF}
 
 function int2hwFloat (const i: LongInt) : hwFloat;
 
@@ -63,7 +63,9 @@
 function AngleCos(const Angle: Longword): hwFloat;
 function SignAs(const num, signum: hwFloat): hwFloat;
 
+{$IFDEF FPC}
 {$J-}
+{$ENDIF}
 {$WARNINGS OFF}
 const  _1div1024: hwFloat = (isNegative: false; QWordValue:     4194304);
       _1div10000: hwFloat = (isNegative: false; QWordValue:      429496);
@@ -333,7 +335,7 @@
 SignAs.isNegative:= signum.isNegative
 end;
 
-{$INCLUDE SinTable.inc}
+{$INCLUDE "SinTable.inc"}
 
 function AngleSin(const Angle: Longword): hwFloat;
 begin
--- a/hedgewars/uGame.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uGame.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uGame;
 interface
 uses uFloat;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 procedure DoGameTick(Lag: LongInt);
 
--- a/hedgewars/uGears.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uGears.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uGears;
 interface
 uses SDLh, uConsts, uFloat;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 const AllInactive: boolean = false;
       PrvInactive: boolean = false;
 
@@ -117,8 +117,8 @@
 procedure HHSetWeapon(Gear: PGear); forward;
 
 
-{$INCLUDE GSHandlers.inc}
-{$INCLUDE HHHandlers.inc}
+{$INCLUDE "GSHandlers.inc"}
+{$INCLUDE "HHHandlers.inc"}
 
 const doStepHandlers: array[TGearType] of TGearStepProcedure = (
 			@doStepBomb,
--- a/hedgewars/uIO.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uIO.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uIO;
 interface
 uses SDLh;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 const ipcPort: Word = 0;
 
--- a/hedgewars/uKeys.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uKeys.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uKeys;
 interface
 uses uConsts, SDLh;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 type TBinds = array[0..cKeyMaxIndex] of shortstring;
 type TKeyboardState = array[0..cKeyMaxIndex] of Byte;
--- a/hedgewars/uLand.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uLand.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -16,7 +16,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
-{$include options.inc}
+{$INCLUDE "options.inc"}
 
 unit uLand;
 interface
--- a/hedgewars/uLandGraphics.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uLandGraphics.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uLandGraphics;
 interface
 uses uFloat, uConsts;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 type PRangeArray = ^TRangeArray;
      TRangeArray = array[0..31] of record
@@ -292,7 +292,7 @@
     X:= nx - dX8;
     Y:= ny - dY8;
     for t:= -8 to ticks + 8 do
-        {$include tunsetborder.inc}
+        {$INCLUDE "tunsetborder.inc"}
     nx:= nx - dY;
     ny:= ny + dX;
     end;
@@ -302,7 +302,7 @@
     X:= nx - dX8;
     Y:= ny - dY8;
     for t:= 0 to 7 do
-        {$include tunsetborder.inc}
+        {$INCLUDE "tunsetborder.inc"}
     X:= nx;
     Y:= ny;
     for t:= 0 to ticks do
@@ -319,7 +319,7 @@
            end
         end;
     for t:= 0 to 7 do
-        {$include tunsetborder.inc}
+        {$INCLUDE "tunsetborder.inc"}
     nx:= nx - dY;
     ny:= ny + dX;
     end;
@@ -329,7 +329,7 @@
     X:= nx - dX8;
     Y:= ny - dY8;
     for t:= -8 to ticks + 8 do
-        {$include tunsetborder.inc}
+        {$INCLUDE "tunsetborder.inc"}
     nx:= nx - dY;
     ny:= ny + dX;
     end;
--- a/hedgewars/uLandObjects.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uLandObjects.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uLandObjects;
 interface
 uses SDLh;
-{$include options.inc}
+{$INCLUDE "options.inc"}
 
 procedure AddObjects();
 procedure LoadThemeConfig;
--- a/hedgewars/uLandTemplates.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uLandTemplates.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uLandTemplates;
 interface
 uses SDLh;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 const NTPX = Low(TSDL_Rect.x);
 
@@ -38,7 +38,7 @@
                      MaxHedgeHogs: Longword;
                      end;
 ///////////////////////// ORIGINAL SET //////////////////////////////
-// Area expanded to 2848x1424 at Tiy's request to move out border ///
+/// Area expanded to 2848x1424 at Tiys request to move out border ///
 /////////////////////////////////////////////////////////////////////
 const Template0Points: array[0..18] of TSDL_Rect =
       (
--- a/hedgewars/uLandTexture.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uLandTexture.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -16,7 +16,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
-{$include options.inc}
+{$INCLUDE "options.inc"}
 
 unit uLandTexture;
 interface
--- a/hedgewars/uMisc.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uMisc.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -18,7 +18,7 @@
 
 unit uMisc;
 interface
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 uses uConsts, SDLh,
 {$IFDEF GLES11}
 	gles11,
--- a/hedgewars/uRandom.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uRandom.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,8 +19,8 @@
 unit uRandom;
 interface
 uses uFloat;
-{$INCLUDE options.inc}
-{$INCLUDE proto.inc}
+{$INCLUDE "options.inc"}
+{$INCLUDE "proto.inc"}
 
 procedure SetRandomSeed(Seed: shortstring);
 function  GetRandom: hwFloat; overload;
--- a/hedgewars/uSound.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uSound.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uSound;
 interface
 uses SDLh, uConsts;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 type PVoicepack = ^TVoicepack;
 	TVoicepack = record
--- a/hedgewars/uStore.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uStore.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -18,7 +18,7 @@
 
 unit uStore;
 interface
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 uses sysutils, uConsts, uTeams, SDLh,
 {$IFDEF GLES11}
 	gles11,
--- a/hedgewars/uTeams.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uTeams.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -16,7 +16,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 unit uTeams;
 interface
--- a/hedgewars/uTriggers.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uTriggers.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -20,7 +20,7 @@
 
 interface
 uses SDLh, uConsts;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 const trigTurns = $80000001;
 
 type TTrigAction = (taSpawnGear, taSuccessFinish, taFailFinish);
@@ -143,4 +143,4 @@
   end
 end;
 
-end.
\ No newline at end of file
+end.
--- a/hedgewars/uVisualGears.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uVisualGears.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -16,7 +16,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 
 unit uVisualGears;
 interface
--- a/hedgewars/uWorld.pas	Wed Nov 04 01:42:06 2009 +0000
+++ b/hedgewars/uWorld.pas	Thu Nov 05 16:23:09 2009 +0000
@@ -19,7 +19,7 @@
 unit uWorld;
 interface
 uses SDLh, uGears, uConsts, uFloat;
-{$INCLUDE options.inc}
+{$INCLUDE "options.inc"}
 const WorldDx: LongInt = -512;
       WorldDy: LongInt = -256;