hedgewars/uLandObjects.pas
changeset 4639 6de386a42fae
parent 4619 f9356de370bb
child 4669 296dbccdf376
equal deleted inserted replaced
4638:e5b0fa933f7f 4639:6de386a42fae
   224 {$WARNINGS OFF}
   224 {$WARNINGS OFF}
   225 tmpx:= rect.x;
   225 tmpx:= rect.x;
   226 tmpx2:= bx;
   226 tmpx2:= bx;
   227 while (tmpx <= bx - rect.w div 2 - 1) and bRes do
   227 while (tmpx <= bx - rect.w div 2 - 1) and bRes do
   228       begin
   228       begin
   229       bRes:= (Land[rect.y, tmpx] = Color) and (Land[by, tmpx] = Color) and
   229       bRes:= ((rect.y and LAND_HEIGHT_MASK) = 0) and ((by and LAND_HEIGHT_MASK) = 0) and
       
   230              ((tmpx and LAND_WIDTH_MASK) = 0) and ((tmpx2 and LAND_WIDTH_MASK) = 0) and
       
   231              (Land[rect.y, tmpx] = Color) and (Land[by, tmpx] = Color) and
   230              (Land[rect.y, tmpx2] = Color) and (Land[by, tmpx2] = Color);
   232              (Land[rect.y, tmpx2] = Color) and (Land[by, tmpx2] = Color);
   231       inc(tmpx);
   233       inc(tmpx);
   232       dec(tmpx2)
   234       dec(tmpx2)
   233       end;
   235       end;
   234 tmpy:= rect.y+1;
   236 tmpy:= rect.y+1;
   235 tmpy2:= by-1;
   237 tmpy2:= by-1;
   236 while (tmpy <= by - rect.h div 2 - 1) and bRes do
   238 while (tmpy <= by - rect.h div 2 - 1) and bRes do
   237       begin
   239       begin
   238       bRes:= (Land[tmpy, rect.x] = Color) and (Land[tmpy, bx] = Color) and
   240       bRes:= ((tmpy and LAND_HEIGHT_MASK) = 0) and ((tmpy2 and LAND_HEIGHT_MASK) = 0) and
       
   241              ((rect.x and LAND_WIDTH_MASK) = 0) and ((bx and LAND_WIDTH_MASK) = 0) and
       
   242              (Land[tmpy, rect.x] = Color) and (Land[tmpy, bx] = Color) and
   239              (Land[tmpy2, rect.x] = Color) and (Land[tmpy2, bx] = Color);
   243              (Land[tmpy2, rect.x] = Color) and (Land[tmpy2, bx] = Color);
   240       inc(tmpy);
   244       inc(tmpy);
   241       dec(tmpy2)
   245       dec(tmpy2)
   242       end;
   246       end;
   243 {$WARNINGS ON}
   247 {$WARNINGS ON}