hedgewars/uWorld.pas
changeset 9666 8dcb25112d96
parent 9656 18422d205080
child 9670 1954f692e8c6
equal deleted inserted replaced
9665:bfd62e380327 9666:8dcb25112d96
   890 
   890 
   891 glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
   891 glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
   892 glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
   892 glTexCoordPointer(2, GL_FLOAT, 0, @TextureBuffer[0]);
   893 glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
   893 glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
   894 
   894 
   895 Tint($FF, $FF, $FF, $FF);
   895 untint;
   896 
   896 
   897 {for i:= -1 to cWaterSprCount do
   897 {for i:= -1 to cWaterSprCount do
   898     DrawSprite(sprWater,
   898     DrawSprite(sprWater,
   899         i * cWaveWidth + ((WorldDx + (RealTicks shr 6) * Dir + dX) mod cWaveWidth) - (cScreenWidth div 2),
   899         i * cWaveWidth + ((WorldDx + (RealTicks shr 6) * Dir + dX) mod cWaveWidth) - (cScreenWidth div 2),
   900         cWaterLine + WorldDy + dY,
   900         cWaterLine + WorldDy + dY,
  1295         // this approach should be faster than drawing all borders one by one tinted or not
  1295         // this approach should be faster than drawing all borders one by one tinted or not
  1296         if highlight then
  1296         if highlight then
  1297             begin
  1297             begin
  1298             if TeamsCount * 100 > Longword(cScreenHeight) then
  1298             if TeamsCount * 100 > Longword(cScreenHeight) then
  1299                 Tint($FF,$FF,$FF,$80)
  1299                 Tint($FF,$FF,$FF,$80)
  1300             else Tint($FF, $FF, $FF, $FF);
  1300             else untint;
  1301 
  1301 
  1302             // draw name
  1302             // draw name
  1303             r.x:= 2;
  1303             r.x:= 2;
  1304             r.y:= 2;
  1304             r.y:= 2;
  1305             r.w:= NameTagTex^.w - 4;
  1305             r.w:= NameTagTex^.w - 4;
  1344             Tint(SDTint, SDTint, SDTint, $FF);
  1344             Tint(SDTint, SDTint, SDTint, $FF);
  1345         DrawRepeated(sprSky, sprSkyL, sprSkyR, (WorldDx + LAND_WIDTH div 2) * 3 div 8, SkyOffset);
  1345         DrawRepeated(sprSky, sprSkyL, sprSkyR, (WorldDx + LAND_WIDTH div 2) * 3 div 8, SkyOffset);
  1346         ChangeDepth(RM, -cStereo_Horizon);
  1346         ChangeDepth(RM, -cStereo_Horizon);
  1347         DrawRepeated(sprHorizont, sprHorizontL, sprHorizontR, (WorldDx + LAND_WIDTH div 2) * 3 div 5, HorizontOffset);
  1347         DrawRepeated(sprHorizont, sprHorizontL, sprHorizontR, (WorldDx + LAND_WIDTH div 2) * 3 div 5, HorizontOffset);
  1348         if SuddenDeathDmg then
  1348         if SuddenDeathDmg then
  1349             Tint($FF, $FF, $FF, $FF);
  1349             untint;
  1350     end;
  1350     end;
  1351 
  1351 
  1352 DrawVisualGears(0);
  1352 DrawVisualGears(0);
  1353 ChangeDepth(RM, -cStereo_MidDistance);
  1353 ChangeDepth(RM, -cStereo_MidDistance);
  1354 DrawVisualGears(4);
  1354 DrawVisualGears(4);
  1659 
  1659 
  1660         glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
  1660         glVertexPointer(2, GL_FLOAT, 0, @VertexBuffer[0]);
  1661         glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
  1661         glDrawArrays(GL_TRIANGLE_FAN, 0, Length(VertexBuffer));
  1662 
  1662 
  1663         glEnable(GL_TEXTURE_2D);
  1663         glEnable(GL_TEXTURE_2D);
  1664         Tint($FF, $FF, $FF, $FF);
  1664         untint;
  1665         if not isFirstFrame and ((ScreenFadeValue = 0) or (ScreenFadeValue = sfMax)) then
  1665         if not isFirstFrame and ((ScreenFadeValue = 0) or (ScreenFadeValue = sfMax)) then
  1666             ScreenFade:= sfNone
  1666             ScreenFade:= sfNone
  1667         end
  1667         end
  1668     end;
  1668     end;
  1669 
  1669 
  1687     Tint($FF, $00, $00, Byte(Round(127*(1 + sin(SDL_GetTicks()*0.007)))));
  1687     Tint($FF, $00, $00, Byte(Round(127*(1 + sin(SDL_GetTicks()*0.007)))));
  1688     glBegin(GL_POLYGON);
  1688     glBegin(GL_POLYGON);
  1689     for i:= 0 to 20 do
  1689     for i:= 0 to 20 do
  1690         glVertex2f(-(cScreenWidth shr 1) + 30 + sin(i*2*Pi/20)*10, 35 + cos(i*2*Pi/20)*10);
  1690         glVertex2f(-(cScreenWidth shr 1) + 30 + sin(i*2*Pi/20)*10, 35 + cos(i*2*Pi/20)*10);
  1691     glEnd();
  1691     glEnd();
  1692     Tint($FF, $FF, $FF, $FF);
  1692     untint;
  1693     glEnable(GL_TEXTURE_2D);
  1693     glEnable(GL_TEXTURE_2D);
  1694     end;
  1694     end;
  1695 {$ENDIF}
  1695 {$ENDIF}
  1696 
  1696 
  1697 SetScale(zoom);
  1697 SetScale(zoom);