222 glEnd(); |
222 glEnd(); |
223 glColor4f(1, 1, 1, 1); // disable coloring |
223 glColor4f(1, 1, 1, 1); // disable coloring |
224 glEnable(GL_TEXTURE_2D) |
224 glEnable(GL_TEXTURE_2D) |
225 end; |
225 end; |
226 |
226 |
|
227 // Attack bar |
|
228 if CurrentTeam <> nil then |
|
229 case AttackBar of |
|
230 (* 1: begin |
|
231 r:= StuffPoz[sPowerBar]; |
|
232 {$WARNINGS OFF} |
|
233 r.w:= (CurrentHedgehog^.Gear^.Power * 256) div cPowerDivisor; |
|
234 {$WARNINGS ON} |
|
235 DrawSpriteFromRect(r, cScreenWidth - 272, cScreenHeight - 48, 16, 0, Surface); |
|
236 end;*) |
|
237 2: with CurrentHedgehog^ do |
|
238 begin |
|
239 tdx:= hwSign(Gear^.dX) * Sin(Gear^.Angle * Pi / cMaxAngle); |
|
240 tdy:= - Cos(Gear^.Angle * Pi / cMaxAngle); |
|
241 for i:= (Gear^.Power * 24) div cPowerDivisor downto 0 do |
|
242 DrawSprite(sprPower, |
|
243 hwRound(Gear^.X) + system.round(WorldDx + tdx * (24 + i * 2)) - 16, |
|
244 hwRound(Gear^.Y) + system.round(WorldDy + tdy * (24 + i * 2)) - 12, |
|
245 i) |
|
246 end |
|
247 end; |
|
248 |
227 DrawGears; |
249 DrawGears; |
228 |
250 |
229 DrawVisualGears(1); |
251 DrawVisualGears(1); |
230 |
252 |
231 // Waves |
253 // Waves |
249 DrawSprite(sprBigDigit, t, cScreenHeight - 48, i mod 10); |
271 DrawSprite(sprBigDigit, t, cScreenHeight - 48, i mod 10); |
250 i:= i div 10 |
272 i:= i div 10 |
251 end; |
273 end; |
252 DrawSprite(sprFrame, t - 4, cScreenHeight - 48, 0); |
274 DrawSprite(sprFrame, t - 4, cScreenHeight - 48, 0); |
253 end; |
275 end; |
254 |
|
255 // Attack bar |
|
256 if CurrentTeam <> nil then |
|
257 case AttackBar of |
|
258 (* 1: begin |
|
259 r:= StuffPoz[sPowerBar]; |
|
260 {$WARNINGS OFF} |
|
261 r.w:= (CurrentHedgehog^.Gear^.Power * 256) div cPowerDivisor; |
|
262 {$WARNINGS ON} |
|
263 DrawSpriteFromRect(r, cScreenWidth - 272, cScreenHeight - 48, 16, 0, Surface); |
|
264 end; |
|
265 *) 2: with CurrentHedgehog^ do |
|
266 begin |
|
267 tdx:= hwSign(Gear^.dX) * Sin(Gear^.Angle * Pi / cMaxAngle); |
|
268 tdy:= - Cos(Gear^.Angle * Pi / cMaxAngle); |
|
269 for i:= (Gear^.Power * 24) div cPowerDivisor downto 0 do |
|
270 DrawSprite(sprPower, hwRound(Gear^.X) + system.round(WorldDx + tdx * (24 + i * 2)) - 16, |
|
271 hwRound(Gear^.Y) + system.round(WorldDy + tdy * (24 + i * 2)) - 12, |
|
272 i) |
|
273 end |
|
274 end; |
|
275 |
276 |
276 // Target |
277 // Target |
277 if TargetPoint.X <> NoPointX then DrawSprite(sprTargetP, TargetPoint.X + WorldDx - 16, TargetPoint.Y + WorldDy - 16, 0); |
278 if TargetPoint.X <> NoPointX then DrawSprite(sprTargetP, TargetPoint.X + WorldDx - 16, TargetPoint.Y + WorldDy - 16, 0); |
278 |
279 |
279 //glPopMatrix; |
280 //glPopMatrix; |