hedgewars/uLand.pas
changeset 3608 c509bbc779e7
parent 3607 2ad7885615c1
child 3612 b50215a8a43d
equal deleted inserted replaced
3607:2ad7885615c1 3608:c509bbc779e7
    33     TPreview  = packed array[0..127, 0..31] of byte;
    33     TPreview  = packed array[0..127, 0..31] of byte;
    34     TDirtyTag = packed array[0 .. LAND_HEIGHT div 32 - 1, 0 .. LAND_WIDTH div 32 - 1] of byte;
    34     TDirtyTag = packed array[0 .. LAND_HEIGHT div 32 - 1, 0 .. LAND_WIDTH div 32 - 1] of byte;
    35 
    35 
    36 var Land: TCollisionArray;
    36 var Land: TCollisionArray;
    37     LandPixels: TLandArray;
    37     LandPixels: TLandArray;
    38 // LandCollided is reusing DirtyTag size because currently the largest Radius we have is 32px (Piano)
    38     LandDirty: TDirtyTag;
    39     LandDirty, LandCollided: TDirtyTag;
       
    40     hasBorder: boolean; 
    39     hasBorder: boolean; 
    41     hasGirders: boolean;  
    40     hasGirders: boolean;  
    42     isMap: boolean;  
    41     isMap: boolean;  
    43     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.
    42     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.
    44     LandBackSurface: PSDL_Surface;
    43     LandBackSurface: PSDL_Surface;
  1344 procedure initModule;
  1343 procedure initModule;
  1345 begin
  1344 begin
  1346     LandBackSurface:= nil;
  1345     LandBackSurface:= nil;
  1347     digest:= '';
  1346     digest:= '';
  1348     FillChar(LandPixels, sizeof(TLandArray), 0);
  1347     FillChar(LandPixels, sizeof(TLandArray), 0);
  1349     FillChar(LandCollided, sizeof(TDirtyTag), 0);
       
  1350 end;
  1348 end;
  1351 
  1349 
  1352 procedure freeModule;
  1350 procedure freeModule;
  1353 begin
  1351 begin
  1354 
  1352