hedgewars/uLand.pas
changeset 2152 a2811690da1b
parent 2096 356468481e74
child 2154 3d2917be12c3
equal deleted inserted replaced
2151:541d3a475442 2152:a2811690da1b
    17  *)
    17  *)
    18 
    18 
    19 unit uLand;
    19 unit uLand;
    20 interface
    20 interface
    21 uses SDLh, uLandTemplates, uFloat, 
    21 uses SDLh, uLandTemplates, uFloat, 
    22 {$IFDEF IPHONE}
    22 {$IFDEF GLES11}
    23 	gles11,
    23 	gles11,
    24 {$ELSE}
    24 {$ELSE}
    25 	GL,
    25 	GL,
    26 {$ENDIF}
    26 {$ENDIF}
    27 	uConsts;
    27 	uConsts;
    32 
    32 
    33 var  Land: TLandArray;
    33 var  Land: TLandArray;
    34      LandPixels: TLandArray;
    34      LandPixels: TLandArray;
    35      LandDirty: TDirtyTag;
    35      LandDirty: TDirtyTag;
    36      hasBorder: boolean; // I'm putting this here for now.  I'd like it to be toggleable by user (so user can set a border on a non-cave map) - will turn off air attacks
    36      hasBorder: boolean; // I'm putting this here for now.  I'd like it to be toggleable by user (so user can set a border on a non-cave map) - will turn off air attacks
    37      hasGirders: boolean;  // I think should be on template by template basis. some caverns might have open water and large spaces.  Some islands don't need? It might be better to tweak the girder code based upon space above.  dunno.
    37      hasGirders: boolean;  // I think should be on template by template basis. some caverns might have open water and large spaces.  Some islands do not need? It might be better to tweak the girder code based upon space above.  dunno.
    38      playHeight, playWidth, leftX, rightX, topY, MaxHedgehogs: Longword;  // idea is that a template can specify height/width.  Or, a map, a height/width by the dimensions of the image.  If the map has pixels near top of image, it triggers border.  Maybe not a good idea, but, for now?  Could also be used to prevent placing a girder outside play area on maps with hasBorder = true
    38      playHeight, playWidth, leftX, rightX, topY, MaxHedgehogs: Longword;  // idea is that a template can specify height/width.  Or, a map, a height/width by the dimensions of the image.  If the map has pixels near top of image, it triggers border.  Maybe not a good idea, but, for now?  Could also be used to prevent placing a girder outside play area on maps with hasBorder = true
    39 
    39 
    40 // in your coding style, it appears to be "isXXXX" for a verb, and "FooBar" for everything else - should be PlayHeight ?
    40 // in your coding style, it appears to be "isXXXX" for a verb, and "FooBar" for everything else - should be PlayHeight ?
    41 
    41 
    42 procedure GenMap;
    42 procedure GenMap;
    75 AddFileLog('CheckLandDigest: ' + s);
    75 AddFileLog('CheckLandDigest: ' + s);
    76 {$ENDIF}
    76 {$ENDIF}
    77 if digest = '' then
    77 if digest = '' then
    78    digest:= s
    78    digest:= s
    79 else
    79 else
       
    80 {$IFDEF IPHONEOS}
       
    81    //TryDo(s = digest, 'Different maps generated, sorry', false)
       
    82 {$ELSE}
    80    TryDo(s = digest, 'Different maps generated, sorry', true)
    83    TryDo(s = digest, 'Different maps generated, sorry', true)
       
    84 {$ENDIF}
    81 end;
    85 end;
    82 
    86 
    83 procedure DrawLine(X1, Y1, X2, Y2: LongInt; Color: Longword);
    87 procedure DrawLine(X1, Y1, X2, Y2: LongInt; Color: Longword);
    84 var
    88 var
    85   eX, eY, dX, dY: LongInt;
    89   eX, eY, dX, dY: LongInt;