hedgewars/uLandTexture.pas
changeset 11532 bf86c6cb9341
parent 11317 62287d4044e7
child 15929 128ace913837
equal deleted inserted replaced
11531:d1cf1ff6cabb 11532:bf86c6cb9341
    70     tSize : LongInt;
    70     tSize : LongInt;
    71 begin
    71 begin
    72     if cOnlyStats then exit;
    72     if cOnlyStats then exit;
    73     if (Width <= 0) or (Height <= 0) then
    73     if (Width <= 0) or (Height <= 0) then
    74         exit;
    74         exit;
    75     TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true);
    75     checkFails((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true);
    76     TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true);
    76     checkFails(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true);
    77     TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true);
    77     checkFails((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true);
    78     TryDo(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true);
    78     checkFails(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true);
       
    79     if not allOK then exit;
    79 
    80 
    80     tSize:= TEXSIZE;
    81     tSize:= TEXSIZE;
    81 
    82 
    82     // land textures have half the size/resolution in blurry mode
    83     // land textures have half the size/resolution in blurry mode
    83     if (cReducedQuality and rqBlurryLand) <> 0 then
    84     if (cReducedQuality and rqBlurryLand) <> 0 then