hedgewars/uLandGraphics.pas
changeset 10864 9cf20f487ee9
parent 10677 328f526c95b6
child 10877 baad1cc9b749
equal deleted inserted replaced
10863:9d3e1123bd43 10864:9cf20f487ee9
   937                 LandPixels[y,x]:=
   937                 LandPixels[y,x]:=
   938                                 (((((LandPixels[y,x] and RMask shr RShift) div 2)+((ExplosionBorderColor and RMask) shr RShift) div 2) and $FF) shl RShift) or
   938                                 (((((LandPixels[y,x] and RMask shr RShift) div 2)+((ExplosionBorderColor and RMask) shr RShift) div 2) and $FF) shl RShift) or
   939                                 (((((LandPixels[y,x] and GMask shr GShift) div 2)+((ExplosionBorderColor and GMask) shr GShift) div 2) and $FF) shl GShift) or
   939                                 (((((LandPixels[y,x] and GMask shr GShift) div 2)+((ExplosionBorderColor and GMask) shr GShift) div 2) and $FF) shl GShift) or
   940                                 (((((LandPixels[y,x] and BMask shr BShift) div 2)+((ExplosionBorderColor and BMask) shr BShift) div 2) and $FF) shl BShift) or ($FF shl AShift)
   940                                 (((((LandPixels[y,x] and BMask shr BShift) div 2)+((ExplosionBorderColor and BMask) shr BShift) div 2) and $FF) shl BShift) or ($FF shl AShift)
   941             end;
   941             end;
       
   942 {
   942         if (Land[y, x-1] = lfObject) then
   943         if (Land[y, x-1] = lfObject) then
   943             Land[y,x]:= lfObject
   944             Land[y,x]:= lfObject
   944         else if (Land[y, x+1] = lfObject) then
   945         else if (Land[y, x+1] = lfObject) then
   945             Land[y,x]:= lfObject
   946             Land[y,x]:= lfObject
   946         else
   947         else
   947             Land[y,x]:= lfBasic;
   948             Land[y,x]:= lfBasic;
       
   949 }
   948         end
   950         end
   949     else if ((((Land[y, x-1] and lfDamaged) <> 0) and ((Land[y+1,x-1] and lfDamaged) <> 0) and ((Land[y+2,x] and lfDamaged) <> 0))
   951     else if ((((Land[y, x-1] and lfDamaged) <> 0) and ((Land[y+1,x-1] and lfDamaged) <> 0) and ((Land[y+2,x] and lfDamaged) <> 0))
   950     or (((Land[y, x-1] and lfDamaged) <> 0) and ((Land[y-1,x-1] and lfDamaged) <> 0) and ((Land[y-2,x] and lfDamaged) <> 0))
   952     or (((Land[y, x-1] and lfDamaged) <> 0) and ((Land[y-1,x-1] and lfDamaged) <> 0) and ((Land[y-2,x] and lfDamaged) <> 0))
   951     or (((Land[y, x+1] and lfDamaged) <> 0) and ((Land[y+1,x+1] and lfDamaged) <> 0) and ((Land[y+2,x] and lfDamaged) <> 0))
   953     or (((Land[y, x+1] and lfDamaged) <> 0) and ((Land[y+1,x+1] and lfDamaged) <> 0) and ((Land[y+2,x] and lfDamaged) <> 0))
   952     or (((Land[y, x+1] and lfDamaged) <> 0) and ((Land[y-1,x+1] and lfDamaged) <> 0) and ((Land[y-2,x] and lfDamaged) <> 0))
   954     or (((Land[y, x+1] and lfDamaged) <> 0) and ((Land[y-1,x+1] and lfDamaged) <> 0) and ((Land[y-2,x] and lfDamaged) <> 0))
   963                 LandPixels[y,x]:=
   965                 LandPixels[y,x]:=
   964                                 (((((LandPixels[y,x] and RMask shr RShift) * 3 div 4)+((ExplosionBorderColor and RMask) shr RShift) div 4) and $FF) shl RShift) or
   966                                 (((((LandPixels[y,x] and RMask shr RShift) * 3 div 4)+((ExplosionBorderColor and RMask) shr RShift) div 4) and $FF) shl RShift) or
   965                                 (((((LandPixels[y,x] and GMask shr GShift) * 3 div 4)+((ExplosionBorderColor and GMask) shr GShift) div 4) and $FF) shl GShift) or
   967                                 (((((LandPixels[y,x] and GMask shr GShift) * 3 div 4)+((ExplosionBorderColor and GMask) shr GShift) div 4) and $FF) shl GShift) or
   966                                 (((((LandPixels[y,x] and BMask shr BShift) * 3 div 4)+((ExplosionBorderColor and BMask) shr BShift) div 4) and $FF) shl BShift) or ($FF shl AShift)
   968                                 (((((LandPixels[y,x] and BMask shr BShift) * 3 div 4)+((ExplosionBorderColor and BMask) shr BShift) div 4) and $FF) shl BShift) or ($FF shl AShift)
   967             end;
   969             end;
       
   970 {
   968         if (Land[y, x-1] = lfObject) then
   971         if (Land[y, x-1] = lfObject) then
   969             Land[y, x]:= lfObject
   972             Land[y, x]:= lfObject
   970         else if (Land[y, x+1] = lfObject) then
   973         else if (Land[y, x+1] = lfObject) then
   971             Land[y, x]:= lfObject
   974             Land[y, x]:= lfObject
   972         else if (Land[y+1, x] = lfObject) then
   975         else if (Land[y+1, x] = lfObject) then
   973             Land[y, x]:= lfObject
   976             Land[y, x]:= lfObject
   974         else if (Land[y-1, x] = lfObject) then
   977         else if (Land[y-1, x] = lfObject) then
   975         Land[y, x]:= lfObject
   978         Land[y, x]:= lfObject
   976         else Land[y,x]:= lfBasic
   979         else Land[y,x]:= lfBasic
       
   980 }
   977         end
   981         end
   978     end
   982     end
   979 else if ((cReducedQuality and rqBlurryLand) = 0) and ((LandPixels[Y, X] and AMask) = AMask)
   983 else if ((cReducedQuality and rqBlurryLand) = 0) and ((LandPixels[Y, X] and AMask) = AMask)
   980 and (Land[Y, X] and (lfDamaged or lfBasic) = lfBasic)
   984 and (Land[Y, X] and (lfDamaged or lfBasic) = lfBasic)
   981 and (Y > LongInt(topY) + 1) and (Y < LAND_HEIGHT-2) and (X > LongInt(leftX) + 1) and (X < LongInt(rightX) - 1) then
   985 and (Y > LongInt(topY) + 1) and (Y < LAND_HEIGHT-2) and (X > LongInt(leftX) + 1) and (X < LongInt(rightX) - 1) then