hedgewars/uWorld.pas
changeset 1812 3d4692e825e7
parent 1807 795f97007833
child 1825 c929f9111141
equal deleted inserted replaced
1811:1b9e33623b7e 1812:3d4692e825e7
    77 begin
    77 begin
    78 if (TurnTimeLeft = 0) or KbdKeyPressed then bShowAmmoMenu:= false;
    78 if (TurnTimeLeft = 0) or KbdKeyPressed then bShowAmmoMenu:= false;
    79 if bShowAmmoMenu then
    79 if bShowAmmoMenu then
    80    begin
    80    begin
    81    if AMxShift = 210 then prevPoint.X:= 0;
    81    if AMxShift = 210 then prevPoint.X:= 0;
    82    if AMxShift > 0 then dec(AMxShift, MENUSPEED);
    82    if cReducedQuality then
       
    83        AMxShift:= 0
       
    84    else
       
    85        if AMxShift > 0 then dec(AMxShift, MENUSPEED);
    83    end else
    86    end else
    84    begin
    87    begin
    85    if AMxShift = 0 then
    88    if AMxShift = 0 then
    86       begin
    89       begin
    87       CursorPoint.X:= cScreenWidth div 2;
    90       CursorPoint.X:= cScreenWidth div 2;
    88       CursorPoint.Y:= cScreenHeight div 2;
    91       CursorPoint.Y:= cScreenHeight div 2;
    89       prevPoint:= CursorPoint;
    92       prevPoint:= CursorPoint;
    90       SDL_WarpMouse(CursorPoint.X, CursorPoint.Y)
    93       SDL_WarpMouse(CursorPoint.X, CursorPoint.Y)
    91       end;
    94       end;
    92    if AMxShift < 210 then inc(AMxShift, MENUSPEED);
    95    if cReducedQuality then
       
    96        AMxShift:= 210
       
    97    else
       
    98        if AMxShift < 210 then inc(AMxShift, MENUSPEED);
    93    end;
    99    end;
    94 
   100 
    95 if CurrentTeam = nil then exit;
   101 if CurrentTeam = nil then exit;
    96 Slot:= 0;
   102 Slot:= 0;
    97 Pos:= -1;
   103 Pos:= -1;
   191 //glPushMatrix;
   197 //glPushMatrix;
   192 //glScalef(1.0, 1.0, 1.0);
   198 //glScalef(1.0, 1.0, 1.0);
   193 
   199 
   194 if not isPaused then MoveCamera;
   200 if not isPaused then MoveCamera;
   195 
   201 
   196 // background
   202 if not cReducedQuality then
   197 DrawRepeated(sprSky, WorldDx * 3 div 8);
   203     begin
   198 DrawRepeated(sprHorizont, WorldDx * 3 div 5);
   204     // background
   199 
   205     DrawRepeated(sprSky, WorldDx * 3 div 8);
   200 DrawVisualGears(0);
   206     DrawRepeated(sprHorizont, WorldDx * 3 div 5);
   201 
   207 
   202 // Waves
   208     DrawVisualGears(0);
   203 {$WARNINGS OFF}
   209 
   204 for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx + (RealTicks shr 6)      ) mod 125), cWaterLine + WorldDy - 64, 0);
   210     // Waves
   205 for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx - (RealTicks shr 6) + 100) mod 125), cWaterLine + WorldDy - 48, 0);
   211     {$WARNINGS OFF}
   206 {$WARNINGS ON}
   212     for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx + (RealTicks shr 6)      ) mod 125), cWaterLine + WorldDy - 64, 0);
       
   213     for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx - (RealTicks shr 6) + 100) mod 125), cWaterLine + WorldDy - 48, 0);
       
   214     {$WARNINGS ON}
       
   215     end;
       
   216 
   207 
   217 
   208 DrawLand(WorldDx, WorldDy);
   218 DrawLand(WorldDx, WorldDy);
   209 // Water
   219 // Water
   210 r.y:= WorldDy + cWaterLine + 32;
   220 r.y:= WorldDy + cWaterLine + 32;
   211 if r.y < cScreenHeight then
   221 if r.y < cScreenHeight then
   247 				end
   257 				end
   248 		end;
   258 		end;
   249 
   259 
   250 DrawGears;
   260 DrawGears;
   251 
   261 
   252 DrawVisualGears(1);
   262 if not cReducedQuality then DrawVisualGears(1);
   253 
   263 
   254 // Waves
   264 // Waves
   255 {$WARNINGS OFF}
   265 {$WARNINGS OFF}
   256 for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx + (RealTicks shr 6) +  25) mod 125), cWaterLine + WorldDy - 32, 0);
   266 for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx + (RealTicks shr 6) +  25) mod 125), cWaterLine + WorldDy - 32, 0);
   257 for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx - (RealTicks shr 6) +  50) mod 125), cWaterLine + WorldDy - 16, 0);
   267 for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx - (RealTicks shr 6) +  50) mod 125), cWaterLine + WorldDy - 16, 0);
   258 for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx + (RealTicks shr 6) +  75) mod 125), cWaterLine + WorldDy     , 0);
   268 for i:= -1 to cWaterSprCount do DrawSprite(sprWater,  i * 125  + ((WorldDx + (RealTicks shr 6) +  75) mod 125), cWaterLine + WorldDy     , 0);
   259 {$WARNINGS ON}
   269 {$WARNINGS ON}
   260 
       
   261 // Turn time
   270 // Turn time
   262 if TurnTimeLeft <> 0 then
   271 if TurnTimeLeft <> 0 then
   263    begin
   272    begin
   264    i:= Succ(Pred(TurnTimeLeft) div 1000);
   273    i:= Succ(Pred(TurnTimeLeft) div 1000);
   265    if i>99 then t:= 112
   274    if i>99 then t:= 112