hedgewars/uLandGraphics.pas
changeset 6355 734fed7aefd3
parent 6132 6384c502795f
child 6453 11c578d30bd3
equal deleted inserted replaced
6353:d8f62c805619 6355:734fed7aefd3
   231                end
   231                end
   232            else
   232            else
   233                begin
   233                begin
   234                by:= t div 2; bx:= i div 2;
   234                by:= t div 2; bx:= i div 2;
   235                end;
   235                end;
   236            if ((Land[t, i] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and not disableLandBack then
   236            if ((Land[t, i] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and (not disableLandBack) then
   237                begin
   237                begin
   238                inc(cnt);
   238                inc(cnt);
   239                LandPixels[by, bx]:= LandBackPixel(i, t)
   239                LandPixels[by, bx]:= LandBackPixel(i, t)
   240                end
   240                end
   241            else if ((Land[t, i] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   241            else if ((Land[t, i] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   253                end
   253                end
   254            else
   254            else
   255                begin
   255                begin
   256                by:= t div 2; bx:= i div 2;
   256                by:= t div 2; bx:= i div 2;
   257                end;
   257                end;
   258            if ((Land[t, i] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and not disableLandBack then
   258            if ((Land[t, i] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and (not disableLandBack) then
   259                begin
   259                begin
   260                inc(cnt);
   260                inc(cnt);
   261                LandPixels[by, bx]:= LandBackPixel(i, t)
   261                LandPixels[by, bx]:= LandBackPixel(i, t)
   262                end
   262                end
   263            else if ((Land[t, i] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   263            else if ((Land[t, i] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   275                end
   275                end
   276            else
   276            else
   277                begin
   277                begin
   278                by:= t div 2; bx:= i div 2;
   278                by:= t div 2; bx:= i div 2;
   279                end;
   279                end;
   280            if ((Land[t, i] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and not disableLandBack then
   280            if ((Land[t, i] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and (not disableLandBack) then
   281                begin
   281                begin
   282                inc(cnt);
   282                inc(cnt);
   283                LandPixels[by, bx]:= LandBackPixel(i, t)
   283                LandPixels[by, bx]:= LandBackPixel(i, t)
   284                end
   284                end
   285            else if ((Land[t, i] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   285            else if ((Land[t, i] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   296                end
   296                end
   297            else
   297            else
   298                begin
   298                begin
   299                by:= t div 2; bx:= i div 2;
   299                by:= t div 2; bx:= i div 2;
   300                end;
   300                end;
   301            if ((Land[t, i] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and not disableLandBack then
   301            if ((Land[t, i] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and not (disableLandBack) then
   302                begin
   302                begin
   303                inc(cnt);
   303                inc(cnt);
   304                LandPixels[by, bx]:= LandBackPixel(i, t)
   304                LandPixels[by, bx]:= LandBackPixel(i, t)
   305                end
   305                end
   306            else if ((Land[t, i] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   306            else if ((Land[t, i] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   466                     end
   466                     end
   467                 else
   467                 else
   468                     begin
   468                     begin
   469                     by:= ty div 2; bx:= tx div 2;
   469                     by:= ty div 2; bx:= tx div 2;
   470                     end;
   470                     end;
   471                 if ((Land[ty, tx] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and not disableLandBack then
   471                 if ((Land[ty, tx] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and (not disableLandBack) then
   472                     LandPixels[by, bx]:= LandBackPixel(tx, ty)
   472                     LandPixels[by, bx]:= LandBackPixel(tx, ty)
   473                 else if ((Land[ty, tx] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   473                 else if ((Land[ty, tx] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then 
   474                     LandPixels[by, bx]:= 0
   474                     LandPixels[by, bx]:= 0
   475                 end
   475                 end
   476             end;
   476             end;
   586                 end
   586                 end
   587             else
   587             else
   588                 begin
   588                 begin
   589                 by:= ty div 2; bx:= tx div 2;
   589                 by:= ty div 2; bx:= tx div 2;
   590                 end;
   590                 end;
   591             if ((Land[ty, tx] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and not disableLandBack then
   591             if ((Land[ty, tx] and lfBasic) <> 0) and (((LandPixels[by,bx] and AMask) shr AShift) = 255) and (not disableLandBack) then
   592                 LandPixels[by, bx]:= LandBackPixel(tx, ty)
   592                 LandPixels[by, bx]:= LandBackPixel(tx, ty)
   593             else if ((Land[ty, tx] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then
   593             else if ((Land[ty, tx] and lfObject) <> 0) or (((LandPixels[by,bx] and AMask) shr AShift) < 255) then
   594                 LandPixels[by, bx]:= 0;
   594                 LandPixels[by, bx]:= 0;
   595             Land[ty, tx]:= 0;
   595             Land[ty, tx]:= 0;
   596             end
   596             end