equal
deleted
inserted
replaced
64 end; |
64 end; |
65 |
65 |
66 procedure UpdateLandTexture(X, Width, Y, Height: LongInt; landAdded: boolean); |
66 procedure UpdateLandTexture(X, Width, Y, Height: LongInt; landAdded: boolean); |
67 var tx, ty: Longword; |
67 var tx, ty: Longword; |
68 begin |
68 begin |
|
69 if cOnlyStats then exit; |
69 if (Width <= 0) or (Height <= 0) then |
70 if (Width <= 0) or (Height <= 0) then |
70 exit; |
71 exit; |
71 TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); |
72 TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); |
72 TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true); |
73 TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true); |
73 TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true); |
74 TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true); |
91 |
92 |
92 procedure RealLandTexUpdate; |
93 procedure RealLandTexUpdate; |
93 var x, y, ty, tx, lx, ly : LongWord; |
94 var x, y, ty, tx, lx, ly : LongWord; |
94 isEmpty: boolean; |
95 isEmpty: boolean; |
95 begin |
96 begin |
|
97 if cOnlyStats then exit; |
96 (* |
98 (* |
97 if LandTextures[0, 0].tex = nil then |
99 if LandTextures[0, 0].tex = nil then |
98 for x:= 0 to LANDTEXARW -1 do |
100 for x:= 0 to LANDTEXARW -1 do |
99 for y:= 0 to LANDTEXARH - 1 do |
101 for y:= 0 to LANDTEXARH - 1 do |
100 with LandTextures[x, y] do |
102 with LandTextures[x, y] do |