# HG changeset patch
# User koda
# Date 1256488509 0
# Node ID 0dfa56a8513c09b9ad3364b844399ae946cda34e
# Parent  204e6b2885bce27d181599a7838a0fb5316e7f77
fix a segfault in the iphone simulator by moving options.inc at the beginning of the file

diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/hwengine.pas
--- a/hedgewars/hwengine.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/hwengine.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -20,6 +20,8 @@
 {$ERROR Only Free Pascal supported!}
 {$ENDIF}
 
+{$INCLUDE options.inc}
+
 program hwengine;
 uses
 	SDLh in 'SDLh.pas',
@@ -58,8 +60,6 @@
 	uChat in 'uChat.pas',
 	uLandTexture in 'uLandTexture.pas';
 
-{$INCLUDE options.inc}
-
 // also: GSHandlers.inc
 //       CCHandlers.inc
 //       HHHandlers.inc
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uAIMisc.pas
--- a/hedgewars/uAIMisc.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uAIMisc.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -16,10 +16,11 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
+{$INCLUDE options.inc}
+
 unit uAIMisc;
 interface
 uses SDLh, uConsts, uGears, uFloat;
-{$INCLUDE options.inc}
 
 type TTarget = record
                Point: TPoint;
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uConsts.pas
--- a/hedgewars/uConsts.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uConsts.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -16,6 +16,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
+{$INCLUDE options.inc}
+
 unit uConsts;
 interface
 
@@ -28,7 +30,6 @@
 {$ENDIF}
 	uLocale;
 
-{$INCLUDE options.inc}
 {$INCLUDE proto.inc}
 type
 
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uFloat.pas
--- a/hedgewars/uFloat.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uFloat.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -29,14 +29,14 @@
                0: (Frac, Round: Longword);
                1: (QWordValue : QWord);
                end;
-{$else FPC_LITTLE_ENDIAN}
+{$else}
 type hwFloat = record
                isNegative: boolean;
                case byte of
                0: (Round, Frac: Longword);
                1: (QWordValue : QWord);
                end;
-{$endif FPC_LITTLE_ENDIAN}
+{$endif}
 
 function int2hwFloat (const i: LongInt) : hwFloat;
 
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uLand.pas
--- a/hedgewars/uLand.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uLand.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -16,6 +16,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
+{$include options.inc}
+
 unit uLand;
 interface
 uses SDLh, uLandTemplates, uFloat,
@@ -25,7 +27,6 @@
 	GL,
 {$ENDIF}
 	uConsts;
-{$include options.inc}
 type TLandArray = packed array[0 .. LAND_HEIGHT - 1, 0 .. LAND_WIDTH - 1] of LongWord;
 TCollisionArray = packed array[0 .. LAND_HEIGHT - 1, 0 .. LAND_WIDTH - 1] of Word;
 	TPreview  = packed array[0..127, 0..31] of byte;
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uLandTexture.pas
--- a/hedgewars/uLandTexture.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uLandTexture.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -16,6 +16,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
+{$include options.inc}
+
 unit uLandTexture;
 interface
 uses SDLh;
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uMisc.pas
--- a/hedgewars/uMisc.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uMisc.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -18,6 +18,7 @@
 
 unit uMisc;
 interface
+{$INCLUDE options.inc}
 uses uConsts, SDLh,
 {$IFDEF GLES11}
 	gles11,
@@ -25,7 +26,6 @@
 	GL,
 {$ENDIF}
 	uFloat;
-{$INCLUDE options.inc}
 var
 	isCursorVisible : boolean = false;
 	isTerminated    : boolean = false;
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uStore.pas
--- a/hedgewars/uStore.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uStore.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -18,6 +18,7 @@
 
 unit uStore;
 interface
+{$INCLUDE options.inc}
 uses sysutils, uConsts, uTeams, SDLh,
 {$IFDEF GLES11}
 	gles11,
@@ -25,7 +26,6 @@
 	GL, GLext,
 {$ENDIF}
 uFloat;
-{$INCLUDE options.inc}
 
 procedure StoreInit;
 procedure StoreLoad;
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uTeams.pas
--- a/hedgewars/uTeams.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uTeams.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -16,6 +16,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
+{$INCLUDE options.inc}
+
 unit uTeams;
 interface
 uses SDLh, uConsts, uKeys, uGears, uRandom, uFloat, uStats, uVisualGears,
@@ -25,7 +27,6 @@
 	GL,
 {$ENDIF}
 	uSound;
-{$INCLUDE options.inc}
 
 type PHHAmmo = ^THHAmmo;
 	THHAmmo = array[0..cMaxSlotIndex, 0..cMaxSlotAmmoIndex] of TAmmo;
diff -r 204e6b2885bc -r 0dfa56a8513c hedgewars/uVisualGears.pas
--- a/hedgewars/uVisualGears.pas	Sun Oct 25 15:55:49 2009 +0000
+++ b/hedgewars/uVisualGears.pas	Sun Oct 25 16:35:09 2009 +0000
@@ -16,6 +16,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  *)
 
+{$INCLUDE options.inc}
+
 unit uVisualGears;
 interface
 uses SDLh, uConsts,
@@ -25,7 +27,6 @@
 	GL,
 {$ENDIF}
 	uFloat;
-{$INCLUDE options.inc}
 
 type PVisualGear = ^TVisualGear;
 	TVGearStepProcedure = procedure (Gear: PVisualGear; Steps: Longword);