hedgewars/uLand.pas
changeset 9524 0a52c1dd9400
parent 9387 6478ed9ead25
child 9682 aa2431ed87b2
child 9864 f7eb0d87c9b6
equal deleted inserted replaced
9522:a386e1cdc468 9524:0a52c1dd9400
   727                 Land[y, x]:= lfIndestructible;
   727                 Land[y, x]:= lfIndestructible;
   728     // experiment hardcoding cave
   728     // experiment hardcoding cave
   729     // also try basing cave dimensions on map/template dimensions, if they exist
   729     // also try basing cave dimensions on map/template dimensions, if they exist
   730     for w:= 0 to 5 do // width of 3 allowed hogs to be knocked through with grenade
   730     for w:= 0 to 5 do // width of 3 allowed hogs to be knocked through with grenade
   731         begin
   731         begin
   732         for y:= topY to LAND_HEIGHT - 1 do
   732         if (WorldEdge <> weBounce) and (WorldEdge <> weWrap) then
   733                 begin
   733             for y:= topY to LAND_HEIGHT - 1 do
   734                 Land[y, leftX + w]:= lfIndestructible;
       
   735                 Land[y, rightX - w]:= lfIndestructible;
       
   736                 if (y + w) mod 32 < 16 then
       
   737                     c:= AMask
       
   738                 else
       
   739                     c:= AMask or RMask or GMask; // FF00FFFF
       
   740 
       
   741                 if (cReducedQuality and rqBlurryLand) = 0 then
       
   742                     begin
   734                     begin
   743                     LandPixels[y, leftX + w]:= c;
   735                     Land[y, leftX + w]:= lfIndestructible;
   744                     LandPixels[y, rightX - w]:= c;
   736                     Land[y, rightX - w]:= lfIndestructible;
   745                     end
   737                     if (y + w) mod 32 < 16 then
   746                 else
   738                         c:= AMask
   747                     begin
   739                     else
   748                     LandPixels[y div 2, (leftX + w) div 2]:= c;
   740                         c:= AMask or RMask or GMask; // FF00FFFF
   749                     LandPixels[y div 2, (rightX - w) div 2]:= c;
   741 
       
   742                     if (cReducedQuality and rqBlurryLand) = 0 then
       
   743                         begin
       
   744                         LandPixels[y, leftX + w]:= c;
       
   745                         LandPixels[y, rightX - w]:= c;
       
   746                         end
       
   747                     else
       
   748                         begin
       
   749                         LandPixels[y div 2, (leftX + w) div 2]:= c;
       
   750                         LandPixels[y div 2, (rightX - w) div 2]:= c;
       
   751                         end;
   750                     end;
   752                     end;
   751                 end;
       
   752 
   753 
   753         for x:= leftX to rightX do
   754         for x:= leftX to rightX do
   754             begin
   755             begin
   755             Land[topY + w, x]:= lfIndestructible;
   756             Land[topY + w, x]:= lfIndestructible;
   756             if (x + w) mod 32 < 16 then
   757             if (x + w) mod 32 < 16 then