--- a/hedgewars/uConsts.pas Sat Jul 03 00:11:23 2010 +0200
+++ b/hedgewars/uConsts.pas Sat Jul 03 01:31:18 2010 +0200
@@ -183,7 +183,6 @@
TScreenFade = (sfNone, sfInit, sfToBlack, sfFromBlack, sfToWhite, sfFromWhite);
const sfMax = 1000;
-const
// message constants
errmsgCreateSurface = 'Error creating SDL surface';
errmsgTransparentSet = 'Error setting transparent color';
@@ -241,25 +240,6 @@
tpHigh = 0.75;
tpHighest = 1.00;
- {* REFERENCE
- 4096 -> $FFFFF000
- 2048 -> $FFFFF800
- 1024 -> $FFFFFC00
- 512 -> $FFFFFE00 *}
-
-{$IFDEF LOWRES}
- // default for iphone pre 3gs
- LAND_WIDTH = 2048;
- LAND_HEIGHT = 1024;
- LAND_WIDTH_MASK = $FFFFF800;
- LAND_HEIGHT_MASK = $FFFFFC00;
-{$ELSE}
- LAND_WIDTH = 4096;
- LAND_HEIGHT = 2048;
- LAND_WIDTH_MASK = $FFFFF000;
- LAND_HEIGHT_MASK = $FFFFF800;
-{$ENDIF}
-
// To allow these to layer, going to treat them as masks. The bottom byte is reserved for objects
// TODO - set lfBasic for all solid land, ensure all uses of the flags can handle multiple flag bits
lfBasic = $8000; // white
@@ -468,6 +448,10 @@
var PathPrefix: shortstring = './';
Pathz: array[TPathType] of shortstring;
CountTexz: array[1..Pred(AMMO_INFINITE)] of PTexture;
+ LAND_WIDTH :longint;
+ LAND_HEIGHT :longint;
+ LAND_WIDTH_MASK :longWord;
+ LAND_HEIGHT_MASK :longWord;
const
cTagsMasks : array[0..15] of byte = (7, 0, 0, 0, 15, 6, 4, 5, 0, 0, 0, 0, 0, 14, 12, 13);
@@ -2186,12 +2170,30 @@
procedure freeModule;
implementation
+uses uMisc;
procedure initModule;
-
begin
Pathz:= cPathz;
-
+ {* REFERENCE
+ 4096 -> $FFFFF000
+ 2048 -> $FFFFF800
+ 1024 -> $FFFFFC00
+ 512 -> $FFFFFE00 *}
+ if (cReducedQuality and rqLowRes) <> 0 then
+ begin
+ LAND_WIDTH:= 2048;
+ LAND_HEIGHT:= 1024;
+ LAND_WIDTH_MASK:= $FFFFF800;
+ LAND_HEIGHT_MASK:= $FFFFFC00;
+ end
+ else
+ begin
+ LAND_WIDTH:= 4096;
+ LAND_HEIGHT:= 2048;
+ LAND_WIDTH_MASK:= $FFFFF000;
+ LAND_HEIGHT_MASK:= $FFFFF800
+ end;
end;
procedure freeModule;