hedgewars/uWorld.pas
changeset 7858 2566fc2621d4
parent 7852 d25ffc7271d5
child 7946 a99a79bbd857
equal deleted inserted replaced
7856:70c086d9b03f 7858:2566fc2621d4
  1361     SetScale(cDefaultZoomLevel);
  1361     SetScale(cDefaultZoomLevel);
  1362     if TeamsCount * 20 > Longword(cScreenHeight) div 5 then
  1362     if TeamsCount * 20 > Longword(cScreenHeight) div 5 then
  1363         Tint($FF,$FF,$FF,$FF);
  1363         Tint($FF,$FF,$FF,$FF);
  1364     end;
  1364     end;
  1365 
  1365 
       
  1366 // Lag alert
       
  1367 if isInLag then
       
  1368     DrawSprite(sprLag, 32 - (cScreenWidth shr 1), 32, (RealTicks shr 7) mod 12);
       
  1369 
       
  1370 // Wind bar
       
  1371 {$IFDEF USE_TOUCH_INTERFACE}
       
  1372     offsetX:= cScreenHeight - 13;
       
  1373     offsetY:= (cScreenWidth shr 1) + 74;
       
  1374 {$ELSE}
       
  1375     offsetX:= 30;
       
  1376     offsetY:= 180;
       
  1377 {$ENDIF}
       
  1378     DrawSprite(sprWindBar, (cScreenWidth shr 1) - offsetY, cScreenHeight - offsetX, 0);
       
  1379     if WindBarWidth > 0 then
       
  1380         begin
       
  1381         {$WARNINGS OFF}
       
  1382         r.x:= 8 - (RealTicks shr 6) mod 8;
       
  1383         {$WARNINGS ON}
       
  1384         r.y:= 0;
       
  1385         r.w:= WindBarWidth;
       
  1386         r.h:= 13;
       
  1387         DrawSpriteFromRect(sprWindR, r, (cScreenWidth shr 1) - offsetY + 77, cScreenHeight - offsetX + 2, 13, 0);
       
  1388         end
       
  1389     else
       
  1390         if WindBarWidth < 0 then
       
  1391         begin
       
  1392             {$WARNINGS OFF}
       
  1393             r.x:= (Longword(WindBarWidth) + RealTicks shr 6) mod 8;
       
  1394             {$WARNINGS ON}
       
  1395             r.y:= 0;
       
  1396             r.w:= - WindBarWidth;
       
  1397             r.h:= 13;
       
  1398             DrawSpriteFromRect(sprWindL, r, (cScreenWidth shr 1) - offsetY + 74 + WindBarWidth, cScreenHeight - offsetX + 2, 13, 0);
       
  1399         end;
       
  1400 
       
  1401 // AmmoMenu
       
  1402 if bShowAmmoMenu and ((AMState = AMHidden) or (AMState = AMHiding)) then
       
  1403     begin
       
  1404     if (AMState = AMHidden) then
       
  1405         AMAnimStartTime:= RealTicks
       
  1406     else
       
  1407         AMAnimStartTime:= RealTicks - (AMAnimDuration - (RealTicks - AMAnimStartTime));
       
  1408     AMState:= AMShowingUp;
       
  1409     end;
       
  1410 if not(bShowAmmoMenu) and ((AMstate = AMShowing) or (AMState = AMShowingUp)) then
       
  1411     begin
       
  1412     if (AMState = AMShowing) then
       
  1413         AMAnimStartTime:= RealTicks
       
  1414     else
       
  1415         AMAnimStartTime:= RealTicks - (AMAnimDuration - (RealTicks - AMAnimStartTime));
       
  1416     AMState:= AMHiding;
       
  1417     end; 
       
  1418 
       
  1419 if bShowAmmoMenu or (AMState = AMHiding) then
       
  1420     ShowAmmoMenu;
       
  1421 
       
  1422 // Cursor
       
  1423 if isCursorVisible and bShowAmmoMenu then
       
  1424     DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8);
       
  1425 
       
  1426 // Chat
       
  1427 DrawChat;
       
  1428 
       
  1429 // various captions
       
  1430 if fastUntilLag then
       
  1431     DrawTextureCentered(0, (cScreenHeight shr 1), SyncTexture);
       
  1432 if isPaused then
       
  1433     DrawTextureCentered(0, (cScreenHeight shr 1), PauseTexture);
       
  1434 if not isFirstFrame and (missionTimer <> 0) or isPaused or fastUntilLag or (GameState = gsConfirm) then
       
  1435     begin
       
  1436     if (ReadyTimeLeft = 0) and (missionTimer > 0) then
       
  1437         dec(missionTimer, Lag);
       
  1438     if missionTimer < 0 then
       
  1439         missionTimer:= 0; // avoid subtracting below 0
       
  1440     if missionTex <> nil then
       
  1441         DrawTextureCentered(0, Min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex);
       
  1442     end;
       
  1443 
       
  1444 // fps
       
  1445 {$IFDEF USE_TOUCH_INTERFACE}
       
  1446 offsetX:= pauseButton.frame.y + pauseButton.frame.h + 12;
       
  1447 {$ELSE}
       
  1448 offsetX:= 10;
       
  1449 {$ENDIF}
       
  1450 offsetY:= cOffsetY;
       
  1451 if (RM = rmDefault) or (RM = rmRightEye) then
       
  1452     begin
       
  1453     inc(Frames);
       
  1454 
       
  1455     if cShowFPS or (GameType = gmtDemo) then
       
  1456         inc(CountTicks, Lag);
       
  1457     if (GameType = gmtDemo) and (CountTicks >= 1000) then
       
  1458         begin
       
  1459         i:= GameTicks div 1000;
       
  1460         t:= i mod 60;
       
  1461         s:= inttostr(t);
       
  1462         if t < 10 then
       
  1463             s:= '0' + s;
       
  1464         i:= i div 60;
       
  1465         t:= i mod 60;
       
  1466         s:= inttostr(t) + ':' + s;
       
  1467         if t < 10 then
       
  1468             s:= '0' + s;
       
  1469         s:= inttostr(i div 60) + ':' + s;
       
  1470    
       
  1471     
       
  1472         tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels);
       
  1473         tmpSurface:= doSurfaceConversion(tmpSurface);
       
  1474         FreeTexture(timeTexture);
       
  1475         timeTexture:= Surface2Tex(tmpSurface, false);
       
  1476         SDL_FreeSurface(tmpSurface)
       
  1477         end;
       
  1478 
       
  1479     if timeTexture <> nil then
       
  1480         DrawTexture((cScreenWidth shr 1) - 20 - timeTexture^.w - offsetY, offsetX + timeTexture^.h+5, timeTexture);
       
  1481 
       
  1482     if cShowFPS then
       
  1483         begin
       
  1484         if CountTicks >= 1000 then
       
  1485             begin
       
  1486             FPS:= Frames;
       
  1487             Frames:= 0;
       
  1488             CountTicks:= 0;
       
  1489             s:= inttostr(FPS) + ' fps';
       
  1490             tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels);
       
  1491             tmpSurface:= doSurfaceConversion(tmpSurface);
       
  1492             FreeTexture(fpsTexture);
       
  1493             fpsTexture:= Surface2Tex(tmpSurface, false);
       
  1494             SDL_FreeSurface(tmpSurface)
       
  1495             end;
       
  1496         if fpsTexture <> nil then
       
  1497             DrawTexture((cScreenWidth shr 1) - 60 - offsetY, offsetX, fpsTexture);
       
  1498         end;
       
  1499 
       
  1500     // lag warning (?)
       
  1501     inc(SoundTimerTicks, Lag);
       
  1502 end;
       
  1503 
       
  1504 if SoundTimerTicks >= 50 then
       
  1505 begin
       
  1506     SoundTimerTicks:= 0;
       
  1507     if cVolumeDelta <> 0 then
       
  1508     begin
       
  1509         str(ChangeVolume(cVolumeDelta), s);
       
  1510         AddCaption(Format(trmsg[sidVolume], s), cWhiteColor, capgrpVolume);
       
  1511     end;
       
  1512     if isAudioMuted then
       
  1513         AddCaption(trmsg[sidMute], cWhiteColor, capgrpVolume)
       
  1514 end;
       
  1515 
       
  1516 if GameState = gsConfirm then
       
  1517     DrawTextureCentered(0, (cScreenHeight shr 1), ConfirmTexture);
       
  1518 
       
  1519 if ScreenFade <> sfNone then
       
  1520     begin
       
  1521     if not isFirstFrame then
       
  1522         case ScreenFade of
       
  1523             sfToBlack, sfToWhite:     if ScreenFadeValue + Lag * ScreenFadeSpeed < sfMax then
       
  1524                                           inc(ScreenFadeValue, Lag * ScreenFadeSpeed)
       
  1525                                       else
       
  1526                                           ScreenFadeValue:= sfMax;
       
  1527             sfFromBlack, sfFromWhite: if ScreenFadeValue - Lag * ScreenFadeSpeed > 0 then
       
  1528                                           dec(ScreenFadeValue, Lag * ScreenFadeSpeed)
       
  1529                                       else
       
  1530                                           ScreenFadeValue:= 0;
       
  1531             end;
       
  1532     if ScreenFade <> sfNone then
       
  1533         begin
       
  1534         case ScreenFade of
       
  1535             sfToBlack, sfFromBlack: Tint(0, 0, 0, ScreenFadeValue * 255 div 1000);
       
  1536             sfToWhite, sfFromWhite: Tint($FF, $FF, $FF, ScreenFadeValue * 255 div 1000);
       
  1537             end;
       
  1538 
       
  1539         VertexBuffer[0].X:= -cScreenWidth;
       
  1540         VertexBuffer[0].Y:= cScreenHeight;
       
  1541         VertexBuffer[1].X:= -cScreenWidth;
       
  1542         VertexBuffer[1].Y:= 0;
       
  1543         VertexBuffer[2].X:= cScreenWidth;
       
  1544         VertexBuffer[2].Y:= 0;
       
  1545         VertexBuffer[3].X:= cScreenWidth;
       
  1546         VertexBuffer[3].Y:= cScreenHeight;
       
  1547 
       
  1548         glDisable(GL_TEXTURE_2D);
       
  1549 
       
  1550         glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
       
  1551         glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
       
  1552 
       
  1553         glEnable(GL_TEXTURE_2D);
       
  1554         Tint($FF, $FF, $FF, $FF);
       
  1555         if not isFirstFrame and ((ScreenFadeValue = 0) or (ScreenFadeValue = sfMax)) then
       
  1556             ScreenFade:= sfNone
       
  1557         end
       
  1558     end;
       
  1559 
       
  1560 {$IFDEF USE_VIDEO_RECORDING}
       
  1561 // during video prerecording draw red blinking circle and text 'rec'
       
  1562 if flagPrerecording then
       
  1563     begin
       
  1564     if recTexture = nil then
       
  1565         begin
       
  1566         s:= 'rec';
       
  1567         tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fntBig].Handle, Str2PChar(s), cWhiteColorChannels);
       
  1568         tmpSurface:= doSurfaceConversion(tmpSurface);
       
  1569         FreeTexture(recTexture);
       
  1570         recTexture:= Surface2Tex(tmpSurface, false);
       
  1571         SDL_FreeSurface(tmpSurface)
       
  1572         end;
       
  1573     DrawTexture( -(cScreenWidth shr 1) + 50, 20, recTexture);
       
  1574 
       
  1575     // draw red circle
       
  1576     glDisable(GL_TEXTURE_2D); 
       
  1577     Tint($FF, $00, $00, Byte(Round(127*(1 + sin(SDL_GetTicks()*0.007)))));
       
  1578     glBegin(GL_POLYGON);
       
  1579     for i:= 0 to 20 do
       
  1580         glVertex2f(-(cScreenWidth shr 1) + 30 + sin(i*2*Pi/20)*10, 35 + cos(i*2*Pi/20)*10);
       
  1581     glEnd();
       
  1582     Tint($FF, $FF, $FF, $FF);
       
  1583     glEnable(GL_TEXTURE_2D);
       
  1584     end;
       
  1585 {$ENDIF}
       
  1586 
       
  1587 SetScale(zoom);
       
  1588 
  1366 // Attack bar
  1589 // Attack bar
  1367     if CurrentTeam <> nil then
  1590     if CurrentTeam <> nil then
  1368         case AttackBar of
  1591         case AttackBar of
  1369 (*        1: begin
  1592 (*        1: begin
  1370         r:= StuffPoz[sPowerBar];
  1593         r:= StuffPoz[sPowerBar];
  1384                             i)
  1607                             i)
  1385                 end
  1608                 end
  1386         end;
  1609         end;
  1387 
  1610 
  1388 
  1611 
  1389 // Lag alert
       
  1390 if isInLag then
       
  1391     DrawSprite(sprLag, 32 - (cScreenWidth shr 1), 32, (RealTicks shr 7) mod 12);
       
  1392 
       
  1393 // Wind bar
       
  1394 {$IFDEF USE_TOUCH_INTERFACE}
       
  1395     offsetX:= cScreenHeight - 13;
       
  1396     offsetY:= (cScreenWidth shr 1) + 74;
       
  1397 {$ELSE}
       
  1398     offsetX:= 30;
       
  1399     offsetY:= 180;
       
  1400 {$ENDIF}
       
  1401     DrawSprite(sprWindBar, (cScreenWidth shr 1) - offsetY, cScreenHeight - offsetX, 0);
       
  1402     if WindBarWidth > 0 then
       
  1403         begin
       
  1404         {$WARNINGS OFF}
       
  1405         r.x:= 8 - (RealTicks shr 6) mod 8;
       
  1406         {$WARNINGS ON}
       
  1407         r.y:= 0;
       
  1408         r.w:= WindBarWidth;
       
  1409         r.h:= 13;
       
  1410         DrawSpriteFromRect(sprWindR, r, (cScreenWidth shr 1) - offsetY + 77, cScreenHeight - offsetX + 2, 13, 0);
       
  1411         end
       
  1412     else
       
  1413         if WindBarWidth < 0 then
       
  1414         begin
       
  1415             {$WARNINGS OFF}
       
  1416             r.x:= (Longword(WindBarWidth) + RealTicks shr 6) mod 8;
       
  1417             {$WARNINGS ON}
       
  1418             r.y:= 0;
       
  1419             r.w:= - WindBarWidth;
       
  1420             r.h:= 13;
       
  1421             DrawSpriteFromRect(sprWindL, r, (cScreenWidth shr 1) - offsetY + 74 + WindBarWidth, cScreenHeight - offsetX + 2, 13, 0);
       
  1422         end;
       
  1423 
       
  1424 // AmmoMenu
       
  1425 if bShowAmmoMenu and ((AMState = AMHidden) or (AMState = AMHiding)) then
       
  1426     begin
       
  1427     if (AMState = AMHidden) then
       
  1428         AMAnimStartTime:= RealTicks
       
  1429     else
       
  1430         AMAnimStartTime:= RealTicks - (AMAnimDuration - (RealTicks - AMAnimStartTime));
       
  1431     AMState:= AMShowingUp;
       
  1432     end;
       
  1433 if not(bShowAmmoMenu) and ((AMstate = AMShowing) or (AMState = AMShowingUp)) then
       
  1434     begin
       
  1435     if (AMState = AMShowing) then
       
  1436         AMAnimStartTime:= RealTicks
       
  1437     else
       
  1438         AMAnimStartTime:= RealTicks - (AMAnimDuration - (RealTicks - AMAnimStartTime));
       
  1439     AMState:= AMHiding;
       
  1440     end; 
       
  1441 
       
  1442 if bShowAmmoMenu or (AMState = AMHiding) then
       
  1443     ShowAmmoMenu;
       
  1444 
       
  1445 // Cursor
       
  1446 if isCursorVisible and bShowAmmoMenu then
       
  1447     DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8);
       
  1448 
       
  1449 // Chat
       
  1450 DrawChat;
       
  1451 
       
  1452 // various captions
       
  1453 if fastUntilLag then
       
  1454     DrawTextureCentered(0, (cScreenHeight shr 1), SyncTexture);
       
  1455 if isPaused then
       
  1456     DrawTextureCentered(0, (cScreenHeight shr 1), PauseTexture);
       
  1457 if not isFirstFrame and (missionTimer <> 0) or isPaused or fastUntilLag or (GameState = gsConfirm) then
       
  1458     begin
       
  1459     if (ReadyTimeLeft = 0) and (missionTimer > 0) then
       
  1460         dec(missionTimer, Lag);
       
  1461     if missionTimer < 0 then
       
  1462         missionTimer:= 0; // avoid subtracting below 0
       
  1463     if missionTex <> nil then
       
  1464         DrawTextureCentered(0, Min((cScreenHeight shr 1) + 100, cScreenHeight - 48 - missionTex^.h), missionTex);
       
  1465     end;
       
  1466 
       
  1467 // fps
       
  1468 {$IFDEF USE_TOUCH_INTERFACE}
       
  1469 offsetX:= pauseButton.frame.y + pauseButton.frame.h + 12;
       
  1470 {$ELSE}
       
  1471 offsetX:= 10;
       
  1472 {$ENDIF}
       
  1473 offsetY:= cOffsetY;
       
  1474 if (RM = rmDefault) or (RM = rmRightEye) then
       
  1475     begin
       
  1476     inc(Frames);
       
  1477 
       
  1478     if cShowFPS or (GameType = gmtDemo) then
       
  1479         inc(CountTicks, Lag);
       
  1480     if (GameType = gmtDemo) and (CountTicks >= 1000) then
       
  1481         begin
       
  1482         i:= GameTicks div 1000;
       
  1483         t:= i mod 60;
       
  1484         s:= inttostr(t);
       
  1485         if t < 10 then
       
  1486             s:= '0' + s;
       
  1487         i:= i div 60;
       
  1488         t:= i mod 60;
       
  1489         s:= inttostr(t) + ':' + s;
       
  1490         if t < 10 then
       
  1491             s:= '0' + s;
       
  1492         s:= inttostr(i div 60) + ':' + s;
       
  1493    
       
  1494     
       
  1495         tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels);
       
  1496         tmpSurface:= doSurfaceConversion(tmpSurface);
       
  1497         FreeTexture(timeTexture);
       
  1498         timeTexture:= Surface2Tex(tmpSurface, false);
       
  1499         SDL_FreeSurface(tmpSurface)
       
  1500         end;
       
  1501 
       
  1502     if timeTexture <> nil then
       
  1503         DrawTexture((cScreenWidth shr 1) - 20 - timeTexture^.w - offsetY, offsetX + timeTexture^.h+5, timeTexture);
       
  1504 
       
  1505     if cShowFPS then
       
  1506         begin
       
  1507         if CountTicks >= 1000 then
       
  1508             begin
       
  1509             FPS:= Frames;
       
  1510             Frames:= 0;
       
  1511             CountTicks:= 0;
       
  1512             s:= inttostr(FPS) + ' fps';
       
  1513             tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fnt16].Handle, Str2PChar(s), cWhiteColorChannels);
       
  1514             tmpSurface:= doSurfaceConversion(tmpSurface);
       
  1515             FreeTexture(fpsTexture);
       
  1516             fpsTexture:= Surface2Tex(tmpSurface, false);
       
  1517             SDL_FreeSurface(tmpSurface)
       
  1518             end;
       
  1519         if fpsTexture <> nil then
       
  1520             DrawTexture((cScreenWidth shr 1) - 60 - offsetY, offsetX, fpsTexture);
       
  1521         end;
       
  1522 
       
  1523     // lag warning (?)
       
  1524     inc(SoundTimerTicks, Lag);
       
  1525 end;
       
  1526 
       
  1527 if SoundTimerTicks >= 50 then
       
  1528 begin
       
  1529     SoundTimerTicks:= 0;
       
  1530     if cVolumeDelta <> 0 then
       
  1531     begin
       
  1532         str(ChangeVolume(cVolumeDelta), s);
       
  1533         AddCaption(Format(trmsg[sidVolume], s), cWhiteColor, capgrpVolume);
       
  1534     end;
       
  1535     if isAudioMuted then
       
  1536         AddCaption(trmsg[sidMute], cWhiteColor, capgrpVolume)
       
  1537 end;
       
  1538 
       
  1539 if GameState = gsConfirm then
       
  1540     DrawTextureCentered(0, (cScreenHeight shr 1), ConfirmTexture);
       
  1541 
       
  1542 if ScreenFade <> sfNone then
       
  1543     begin
       
  1544     if not isFirstFrame then
       
  1545         case ScreenFade of
       
  1546             sfToBlack, sfToWhite:     if ScreenFadeValue + Lag * ScreenFadeSpeed < sfMax then
       
  1547                                           inc(ScreenFadeValue, Lag * ScreenFadeSpeed)
       
  1548                                       else
       
  1549                                           ScreenFadeValue:= sfMax;
       
  1550             sfFromBlack, sfFromWhite: if ScreenFadeValue - Lag * ScreenFadeSpeed > 0 then
       
  1551                                           dec(ScreenFadeValue, Lag * ScreenFadeSpeed)
       
  1552                                       else
       
  1553                                           ScreenFadeValue:= 0;
       
  1554             end;
       
  1555     if ScreenFade <> sfNone then
       
  1556         begin
       
  1557         case ScreenFade of
       
  1558             sfToBlack, sfFromBlack: Tint(0, 0, 0, ScreenFadeValue * 255 div 1000);
       
  1559             sfToWhite, sfFromWhite: Tint($FF, $FF, $FF, ScreenFadeValue * 255 div 1000);
       
  1560             end;
       
  1561 
       
  1562         VertexBuffer[0].X:= -cScreenWidth;
       
  1563         VertexBuffer[0].Y:= cScreenHeight;
       
  1564         VertexBuffer[1].X:= -cScreenWidth;
       
  1565         VertexBuffer[1].Y:= 0;
       
  1566         VertexBuffer[2].X:= cScreenWidth;
       
  1567         VertexBuffer[2].Y:= 0;
       
  1568         VertexBuffer[3].X:= cScreenWidth;
       
  1569         VertexBuffer[3].Y:= cScreenHeight;
       
  1570 
       
  1571         glDisable(GL_TEXTURE_2D);
       
  1572 
       
  1573         glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
       
  1574         glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
       
  1575 
       
  1576         glEnable(GL_TEXTURE_2D);
       
  1577         Tint($FF, $FF, $FF, $FF);
       
  1578         if not isFirstFrame and ((ScreenFadeValue = 0) or (ScreenFadeValue = sfMax)) then
       
  1579             ScreenFade:= sfNone
       
  1580         end
       
  1581     end;
       
  1582 
       
  1583 {$IFDEF USE_VIDEO_RECORDING}
       
  1584 // during video prerecording draw red blinking circle and text 'rec'
       
  1585 if flagPrerecording then
       
  1586     begin
       
  1587     if recTexture = nil then
       
  1588         begin
       
  1589         s:= 'rec';
       
  1590         tmpSurface:= TTF_RenderUTF8_Blended(Fontz[fntBig].Handle, Str2PChar(s), cWhiteColorChannels);
       
  1591         tmpSurface:= doSurfaceConversion(tmpSurface);
       
  1592         FreeTexture(recTexture);
       
  1593         recTexture:= Surface2Tex(tmpSurface, false);
       
  1594         SDL_FreeSurface(tmpSurface)
       
  1595         end;
       
  1596     DrawTexture( -(cScreenWidth shr 1) + 50, 20, recTexture);
       
  1597 
       
  1598     // draw red circle
       
  1599     glDisable(GL_TEXTURE_2D); 
       
  1600     Tint($FF, $00, $00, Byte(Round(127*(1 + sin(SDL_GetTicks()*0.007)))));
       
  1601     glBegin(GL_POLYGON);
       
  1602     for i:= 0 to 20 do
       
  1603         glVertex2f(-(cScreenWidth shr 1) + 30 + sin(i*2*Pi/20)*10, 35 + cos(i*2*Pi/20)*10);
       
  1604     glEnd();
       
  1605     Tint($FF, $FF, $FF, $FF);
       
  1606     glEnable(GL_TEXTURE_2D);
       
  1607     end;
       
  1608 {$ENDIF}
       
  1609 
       
  1610 SetScale(zoom);
       
  1611 
       
  1612 // Cursor
  1612 // Cursor
  1613 if isCursorVisible then
  1613 if isCursorVisible then
  1614     begin
  1614     begin
  1615     if not bShowAmmoMenu then
  1615     if not bShowAmmoMenu then
  1616         begin
  1616         begin