132 DrawSprite(sprAMSlotKeys, x + 2, y + 1, i); |
132 DrawSprite(sprAMSlotKeys, x + 2, y + 1, i); |
133 t:= 0; |
133 t:= 0; |
134 g:= 0; |
134 g:= 0; |
135 while (t <= cMaxSlotAmmoIndex) and (Ammo^[i, t].Count > 0) do |
135 while (t <= cMaxSlotAmmoIndex) and (Ammo^[i, t].Count > 0) do |
136 begin |
136 begin |
137 if (Ammo^[i, t].AmmoType <> amNothing) then |
137 if (Ammo^[i, t].AmmoType <> amNothing) then |
138 begin |
138 begin |
139 l:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber; |
139 l:= Ammoz[Ammo^[i, t].AmmoType].SkipTurns - CurrentTeam^.Clan^.TurnNumber; |
140 |
140 |
141 if l >= 0 then |
141 if l >= 0 then |
142 begin |
142 begin |
143 DrawSprite(sprAMAmmosBW, x + g * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType)-1); |
143 DrawSprite(sprAMAmmosBW, x + g * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType)-1); |
144 DrawSprite(sprTurnsLeft, x + g * 33 + 51, y + 17, l); |
144 DrawSprite(sprTurnsLeft, x + g * 33 + 51, y + 17, l); |
145 end else |
145 end else |
146 DrawSprite(sprAMAmmos, x + g * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType)-1); |
146 DrawSprite(sprAMAmmos, x + g * 33 + 35, y + 1, LongInt(Ammo^[i, t].AmmoType)-1); |
147 |
147 |
148 if (Slot = i) |
148 if (Slot = i) |
149 and (CursorPoint.X >= x + g * 33 + 35) |
149 and (CursorPoint.X >= x + g * 33 + 35) |
150 and (CursorPoint.X < x + g * 33 + 68) then |
150 and (CursorPoint.X < x + g * 33 + 68) then |
151 begin |
151 begin |
152 if (l < 0) then DrawSprite(sprAMSelection, x + g * 33 + 35, y + 1, 0); |
152 if (l < 0) then DrawSprite(sprAMSelection, x + g * 33 + 35, y + 1, 0); |
153 Pos:= t; |
153 Pos:= t; |
154 end; |
154 end; |
155 inc(g) |
155 inc(g) |
156 end; |
156 end; |
157 inc(t) |
157 inc(t) |
158 end |
158 end |
159 end; |
159 end; |
160 dec(y, 1); |
160 dec(y, 1); |
161 DrawSprite(sprAMBorders, x, y, 0); |
161 DrawSprite(sprAMBorders, x, y, 0); |
162 |
162 |
296 end; |
296 end; |
297 |
297 |
298 begin |
298 begin |
299 if ZoomValue < zoom then |
299 if ZoomValue < zoom then |
300 begin |
300 begin |
301 zoom:= zoom - 0.001 * Lag; |
301 zoom:= zoom - 0.002 * Lag; |
302 if ZoomValue > zoom then zoom:= ZoomValue |
302 if ZoomValue > zoom then zoom:= ZoomValue |
303 end else |
303 end else |
304 if ZoomValue > zoom then |
304 if ZoomValue > zoom then |
305 begin |
305 begin |
306 zoom:= zoom + 0.001 * Lag; |
306 zoom:= zoom + 0.002 * Lag; |
307 if ZoomValue < zoom then zoom:= ZoomValue |
307 if ZoomValue < zoom then zoom:= ZoomValue |
308 end; |
308 end; |
309 |
309 |
310 // Sky |
310 // Sky |
311 glClear(GL_COLOR_BUFFER_BIT); |
311 glClear(GL_COLOR_BUFFER_BIT); |