equal
deleted
inserted
replaced
50 end; |
50 end; |
51 |
51 |
52 procedure UpdateLandTexture(X, Width, Y, Height: LongInt); |
52 procedure UpdateLandTexture(X, Width, Y, Height: LongInt); |
53 var tx, ty: Longword; |
53 var tx, ty: Longword; |
54 begin |
54 begin |
|
55 if (Width <= 0) or (Height <= 0) then exit; |
55 TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); |
56 TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); |
56 TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true); |
57 TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true); |
57 TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true); |
58 TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true); |
58 TryDo(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true); |
59 TryDo(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true); |
59 |
60 |