# HG changeset patch # User koda # Date 1257438189 0 # Node ID c7153d2348f3e7145935b33cd152a4bfcf571ab8 # Parent e118329666ff1ea73b07f1dd3becace7e6f50ed6 move compiler directives to standard pascal diff -r e118329666ff -r c7153d2348f3 hedgewars/SDLh.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; diff -r e118329666ff -r c7153d2348f3 hedgewars/hwengine.pas --- 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 diff -r e118329666ff -r c7153d2348f3 hedgewars/options.inc --- 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} diff -r e118329666ff -r c7153d2348f3 hedgewars/uAI.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uAIActions.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uAIMisc.pas --- 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 diff -r e118329666ff -r c7153d2348f3 hedgewars/uAmmos.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uCollisions.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uConsole.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uConsts.pas --- 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); diff -r e118329666ff -r c7153d2348f3 hedgewars/uFloat.pas --- 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 diff -r e118329666ff -r c7153d2348f3 hedgewars/uGame.pas --- 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); diff -r e118329666ff -r c7153d2348f3 hedgewars/uGears.pas --- 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, diff -r e118329666ff -r c7153d2348f3 hedgewars/uIO.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uKeys.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uLand.pas --- 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 diff -r e118329666ff -r c7153d2348f3 hedgewars/uLandGraphics.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uLandObjects.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uLandTemplates.pas --- 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 = ( diff -r e118329666ff -r c7153d2348f3 hedgewars/uLandTexture.pas --- 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 diff -r e118329666ff -r c7153d2348f3 hedgewars/uMisc.pas --- 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, diff -r e118329666ff -r c7153d2348f3 hedgewars/uRandom.pas --- 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; diff -r e118329666ff -r c7153d2348f3 hedgewars/uSound.pas --- 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 diff -r e118329666ff -r c7153d2348f3 hedgewars/uStore.pas --- 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, diff -r e118329666ff -r c7153d2348f3 hedgewars/uTeams.pas --- 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 diff -r e118329666ff -r c7153d2348f3 hedgewars/uTriggers.pas --- 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. diff -r e118329666ff -r c7153d2348f3 hedgewars/uVisualGears.pas --- 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 diff -r e118329666ff -r c7153d2348f3 hedgewars/uWorld.pas --- 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;