hedgewars/uLandTexture.pas
changeset 10494 0eb97cf4c78e
parent 10270 cd78906ed898
child 10634 35d059bd0932
equal deleted inserted replaced
10493:bcbf029e6b08 10494:0eb97cf4c78e
   127                     lx:= x * TEXSIZE;
   127                     lx:= x * TEXSIZE;
   128                     // first check edges
   128                     // first check edges
   129                     while isEmpty and (ty < TEXSIZE) do
   129                     while isEmpty and (ty < TEXSIZE) do
   130                         begin
   130                         begin
   131                         isEmpty:= LandPixels[ly + ty, lx] and AMask = 0;
   131                         isEmpty:= LandPixels[ly + ty, lx] and AMask = 0;
   132                         if isEmpty then isEmpty:= LandPixels[ly + ty, lx + TEXSIZE-1] and AMask = 0;
   132                         if isEmpty then isEmpty:= LandPixels[ly + ty, Pred(lx + TEXSIZE)] and AMask = 0;
   133                         inc(ty)
   133                         inc(ty)
   134                         end;
   134                         end;
   135                     while isEmpty and (tx < TEXSIZE-1) do
   135                     while isEmpty and (tx < TEXSIZE-1) do
   136                         begin
   136                         begin
   137                         isEmpty:= LandPixels[ly, lx + tx] and AMask = 0;
   137                         isEmpty:= LandPixels[ly, lx + tx] and AMask = 0;
   138                         if isEmpty then isEmpty:= LandPixels[ly + TEXSIZE-1, lx + tx] and AMask = 0;
   138                         if isEmpty then isEmpty:= LandPixels[Pred(ly + TEXSIZE), lx + tx] and AMask = 0;
   139                         inc(tx)
   139                         inc(tx)
   140                         end;
   140                         end;
   141                     // then search every other remaining. does this sort of stuff defeat compiler opts?
   141                     // then search every other remaining. does this sort of stuff defeat compiler opts?
   142                     ty:= 2;
   142                     ty:= 2;
   143                     while isEmpty and (ty < TEXSIZE-1) do
   143                     while isEmpty and (ty < TEXSIZE-1) do