192 if (TurnTimeLeft = 0) or (not CurrentTeam^.ExtDriven and (((CurAmmoGear = nil) or ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) then bShowAmmoMenu:= false; |
192 if (TurnTimeLeft = 0) or (not CurrentTeam^.ExtDriven and (((CurAmmoGear = nil) or ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) = 0)) and hideAmmoMenu)) then bShowAmmoMenu:= false; |
193 if bShowAmmoMenu then |
193 if bShowAmmoMenu then |
194 begin |
194 begin |
195 FollowGear:= nil; |
195 FollowGear:= nil; |
196 if AMxShift = AMWidth then prevPoint.X:= 0; |
196 if AMxShift = AMWidth then prevPoint.X:= 0; |
197 if cReducedQuality then |
197 if (cReducedQuality and rqSlowMenu) <> 0 then |
198 AMxShift:= 0 |
198 AMxShift:= 0 |
199 else |
199 else |
200 if AMxShift > MENUSPEED then |
200 if AMxShift > MENUSPEED then |
201 dec(AMxShift, MENUSPEED) |
201 dec(AMxShift, MENUSPEED) |
202 else |
202 else |
208 CursorPoint.X:= cScreenWidth shr 1; |
208 CursorPoint.X:= cScreenWidth shr 1; |
209 CursorPoint.Y:= cScreenHeight shr 1; |
209 CursorPoint.Y:= cScreenHeight shr 1; |
210 prevPoint:= CursorPoint; |
210 prevPoint:= CursorPoint; |
211 SDL_WarpMouse(CursorPoint.X + cScreenWidth div 2, cScreenHeight - CursorPoint.Y) |
211 SDL_WarpMouse(CursorPoint.X + cScreenWidth div 2, cScreenHeight - CursorPoint.Y) |
212 end; |
212 end; |
213 if cReducedQuality then |
213 if (cReducedQuality and rqSlowMenu) <> 0 then |
214 AMxShift:= AMWidth |
214 AMxShift:= AMWidth |
215 else |
215 else |
216 if AMxShift < (AMWidth - MENUSPEED) then |
216 if AMxShift < (AMWidth - MENUSPEED) then |
217 inc(AMxShift, MENUSPEED) |
217 inc(AMxShift, MENUSPEED) |
218 else |
218 else |
561 // Sky |
561 // Sky |
562 glClear(GL_COLOR_BUFFER_BIT); |
562 glClear(GL_COLOR_BUFFER_BIT); |
563 //glPushMatrix; |
563 //glPushMatrix; |
564 //glScalef(1.0, 1.0, 1.0); |
564 //glScalef(1.0, 1.0, 1.0); |
565 |
565 |
566 if not isPaused then MoveCamera; |
566 if not isPaused then |
567 |
567 MoveCamera; |
568 if not cReducedQuality then |
568 |
569 begin |
569 {if not cReducedQuality then} |
570 // Offsets relative to camera - spare them to wimpier cpus, no bg or flakes for them anyway |
570 if (cReducedQuality and (rqNoBackground or rqKillFlakes or rq2DWater)) = 0 then |
571 ScreenBottom:= (WorldDy - trunc(cScreenHeight/cScaleFactor) - (cScreenHeight div 2) + cWaterLine); |
571 begin |
572 offsetY:= 10 * min(0, -145 - ScreenBottom); |
572 // Offsets relative to camera - spare them to wimpier cpus, no bg or flakes for them anyway |
573 SkyOffset:= offsetY div 35 + cWaveHeight; |
573 ScreenBottom:= (WorldDy - trunc(cScreenHeight/cScaleFactor) - (cScreenHeight div 2) + cWaterLine); |
574 HorizontOffset:= SkyOffset; |
574 offsetY:= 10 * min(0, -145 - ScreenBottom); |
575 if ScreenBottom > SkyOffset then |
575 SkyOffset:= offsetY div 35 + cWaveHeight; |
576 HorizontOffset:= HorizontOffset + ((ScreenBottom-SkyOffset) div 20); |
576 HorizontOffset:= SkyOffset; |
577 |
577 if ScreenBottom > SkyOffset then |
578 // background |
578 HorizontOffset:= HorizontOffset + ((ScreenBottom-SkyOffset) div 20); |
579 DrawRepeated(sprSky, sprSkyL, sprSkyR, (WorldDx + LAND_WIDTH div 2) * 3 div 8, SkyOffset); |
579 |
580 DrawRepeated(sprHorizont, sprHorizontL, sprHorizontR, (WorldDx + LAND_WIDTH div 2) * 3 div 5, HorizontOffset); |
580 // background |
581 |
581 DrawRepeated(sprSky, sprSkyL, sprSkyR, (WorldDx + LAND_WIDTH div 2) * 3 div 8, SkyOffset); |
582 DrawVisualGears(0); |
582 DrawRepeated(sprHorizont, sprHorizontL, sprHorizontR, (WorldDx + LAND_WIDTH div 2) * 3 div 5, HorizontOffset); |
583 |
583 |
584 // Waves |
584 DrawVisualGears(0); |
585 DrawWater(255, SkyOffset); |
585 |
586 DrawWaves( 1, 0 - WorldDx div 32, - cWaveHeight + offsetY div 35, 64); |
586 // Waves |
587 DrawWaves( -1, 25 + WorldDx div 25, - cWaveHeight + offsetY div 38, 48); |
587 DrawWater(255, SkyOffset); |
588 DrawWaves( 1, 75 - WorldDx div 19, - cWaveHeight + offsetY div 45, 32); |
588 DrawWaves( 1, 0 - WorldDx div 32, - cWaveHeight + offsetY div 35, 64); |
589 DrawWaves(-1, 100 + WorldDx div 14, - cWaveHeight + offsetY div 70, 24); |
589 DrawWaves( -1, 25 + WorldDx div 25, - cWaveHeight + offsetY div 38, 48); |
|
590 DrawWaves( 1, 75 - WorldDx div 19, - cWaveHeight + offsetY div 45, 32); |
|
591 DrawWaves(-1, 100 + WorldDx div 14, - cWaveHeight + offsetY div 70, 24); |
590 end |
592 end |
591 else |
593 else |
592 DrawWaves(-1, 100, - (cWaveHeight + (cWaveHeight shr 1)), 0); |
594 DrawWaves(-1, 100, - (cWaveHeight + (cWaveHeight shr 1)), 0); |
593 |
595 |
594 DrawLand(WorldDx, WorldDy); |
596 DrawLand(WorldDx, WorldDy); |
595 |
597 |
596 DrawWater(255, 0); |
598 DrawWater(255, 0); |
597 |
599 |
626 DrawWater(cWaterOpacity, 0); |
628 DrawWater(cWaterOpacity, 0); |
627 |
629 |
628 // Waves |
630 // Waves |
629 DrawWaves( 1, 25 - WorldDx div 9, - cWaveHeight, 12); |
631 DrawWaves( 1, 25 - WorldDx div 9, - cWaveHeight, 12); |
630 |
632 |
631 if not cReducedQuality then |
633 if (cReducedQuality and rq2DWater) = 0 then |
632 begin |
634 begin |
633 //DrawWater(cWaterOpacity, - offsetY div 40); |
635 //DrawWater(cWaterOpacity, - offsetY div 40); |
634 DrawWaves(-1, 50 + WorldDx div 6, - cWaveHeight - offsetY div 40, 8); |
636 DrawWaves(-1, 50 + WorldDx div 6, - cWaveHeight - offsetY div 40, 8); |
635 DrawWater(cWaterOpacity, - offsetY div 20); |
637 DrawWater(cWaterOpacity, - offsetY div 20); |
636 DrawWaves( 1, 75 - WorldDx div 4, - cWaveHeight - offsetY div 20, 2); |
638 DrawWaves( 1, 75 - WorldDx div 4, - cWaveHeight - offsetY div 20, 2); |
637 DrawWater(cWaterOpacity, - offsetY div 10); |
639 DrawWater(cWaterOpacity, - offsetY div 10); |
638 DrawWaves( -1, 25 + WorldDx div 3, - cWaveHeight - offsetY div 10, 0); |
640 DrawWaves( -1, 25 + WorldDx div 3, - cWaveHeight - offsetY div 10, 0); |
639 end |
641 end |
640 else |
642 else |
641 DrawWaves(-1, 50, - (cWaveHeight shr 1), 0); |
643 DrawWaves(-1, 50, - (cWaveHeight shr 1), 0); |
642 |
644 |
643 |
645 |