hedgewars/uLandObjects.pas
changeset 30 794e98e11b66
parent 27 c374fe590272
child 35 9367f246fb5f
equal deleted inserted replaced
29:9311259d5242 30:794e98e11b66
   143      repeat
   143      repeat
   144        k:= CountNonZeroz(x2, y);
   144        k:= CountNonZeroz(x2, y);
   145        inc(x2, 2)
   145        inc(x2, 2)
   146      until (x2 > 1900) or (k = 0) or (k = 16) or (x2 > i);
   146      until (x2 > 1900) or (k = 0) or (k = 16) or (x2 > i);
   147      if (x2 < 1900) and (k = 16) and (x2 - x1 > 250)
   147      if (x2 < 1900) and (k = 16) and (x2 - x1 > 250)
   148         and not CheckIntersect(x1, y, x2 - x1, 16) then break;
   148         and not CheckIntersect(x1 - 32, y - 64, x2 - x1 + 64, 144) then break;
   149      end;
   149      end;
   150 x1:= 0;
   150 x1:= 0;
   151 until y > 900;
   151 until y > 900;
   152 if x1 > 0 then
   152 if x1 > 0 then
   153    begin
   153    begin
   164    r.y:= 0;
   164    r.y:= 0;
   165    r.w:= x2 - rr.x;
   165    r.w:= x2 - rr.x;
   166    r.h:= 16;
   166    r.h:= 16;
   167    SDL_UpperBlit(tmpsurf, @r, Surface, @rr);
   167    SDL_UpperBlit(tmpsurf, @r, Surface, @rr);
   168    SDL_FreeSurface(tmpsurf);
   168    SDL_FreeSurface(tmpsurf);
   169    AddRect(x1 - 8, y - 8, x2 - x1 + 16, 72);
   169    AddRect(x1 - 8, y - 32, x2 - x1 + 16, 80);
   170    for k:= y to y + 15 do
   170    for k:= y to y + 15 do
   171        for i:= x1 to x2 do Land[k, i]:= $FFFFFF
   171        for i:= x1 to x2 do Land[k, i]:= $FFFFFF
   172    end else Result:= false
   172    end else Result:= false
   173 end;
   173 end;
   174 
   174