hedgewars/uLandGraphics.pas
changeset 1761 c7038eade58d
parent 1760 55a1edd97911
child 1792 c30c6944bd49
equal deleted inserted replaced
1760:55a1edd97911 1761:c7038eade58d
   321     nx:= nx - dY;
   321     nx:= nx - dY;
   322     ny:= ny + dX;
   322     ny:= ny + dX;
   323     end;
   323     end;
   324 
   324 
   325 t:= max(stY - HalfWidth * 2 - 4 - abs(hwRound(dY * ticks)), 0);
   325 t:= max(stY - HalfWidth * 2 - 4 - abs(hwRound(dY * ticks)), 0);
   326 ty:= min(stY + HalfWidth * 2 + 4 + abs(hwRound(dY * ticks)), 2047) - t;
   326 ty:= min(stY + HalfWidth * 2 + 4 + abs(hwRound(dY * ticks)), LAND_HEIGHT) - t;
   327 UpdateLandTexture(t, ty)
   327 UpdateLandTexture(t, ty)
   328 end;
   328 end;
   329 
   329 
   330 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean): boolean;
   330 function TryPlaceOnLand(cpX, cpY: LongInt; Obj: TSprite; Frame: LongInt; doPlace: boolean): boolean;
   331 var X, Y, bpp, h, w: LongInt;
   331 var X, Y, bpp, h, w: LongInt;
   421 
   421 
   422 procedure SweepDirty;
   422 procedure SweepDirty;
   423 var x, y, xx, yy: LongInt;
   423 var x, y, xx, yy: LongInt;
   424     updatedRow, updatedCell: boolean;
   424     updatedRow, updatedCell: boolean;
   425 begin
   425 begin
   426 for y:= 0 to 63 do
   426 for y:= 0 to LAND_HEIGHT div 32 - 1 do
   427 	begin
   427 	begin
   428 	updatedRow:= false;
   428 	updatedRow:= false;
   429 	
   429 	
   430 	for x:= 0 to 127 do
   430 	for x:= 0 to LAND_WIDTH div 32 - 1 do
   431 		begin
   431 		begin
   432 			repeat
   432 			repeat
   433 			updatedCell:= false;
   433 			updatedCell:= false;
   434 			if LandDirty[y, x] <> 0 then
   434 			if LandDirty[y, x] <> 0 then
   435 				begin
   435 				begin