444 begin |
444 begin |
445 zoom:= zoom + 0.002 * Lag; |
445 zoom:= zoom + 0.002 * Lag; |
446 if ZoomValue < zoom then zoom:= ZoomValue |
446 if ZoomValue < zoom then zoom:= ZoomValue |
447 end; |
447 end; |
448 |
448 |
449 screenBottom:= WorldDy - trunc(cScreenHeight/zoom) - (cScreenHeight div 2) + cWaterLine; |
449 screenBottom:= WorldDy - trunc(cScreenHeight/cScaleFactor) - (cScreenHeight div 2) + cWaterLine; |
450 |
450 |
451 // Sky |
451 // Sky |
452 glClear(GL_COLOR_BUFFER_BIT); |
452 glClear(GL_COLOR_BUFFER_BIT); |
453 glEnable(GL_BLEND); |
453 glEnable(GL_BLEND); |
454 glEnable(GL_TEXTURE_2D); |
454 glEnable(GL_TEXTURE_2D); |
458 if not isPaused then MoveCamera; |
458 if not isPaused then MoveCamera; |
459 |
459 |
460 if not cReducedQuality then |
460 if not cReducedQuality then |
461 begin |
461 begin |
462 // background |
462 // background |
463 DrawRepeated(sprSky, sprSkyL, sprSkyR, (WorldDx + LAND_WIDTH div 2) * 3 div 8, - cWaveHeight - screenBottom div 20); |
463 DrawRepeated(sprSky, sprSkyL, sprSkyR, (WorldDx + LAND_WIDTH div 2) * 3 div 8, 0); |
464 DrawRepeated(sprHorizont, sprHorizontL, sprHorizontR, (WorldDx + LAND_WIDTH div 2) * 3 div 5, 0); |
464 DrawRepeated(sprHorizont, sprHorizontL, sprHorizontR, (WorldDx + LAND_WIDTH div 2) * 3 div 5, - cWaveHeight - screenBottom div 10); |
465 |
465 |
466 DrawVisualGears(0); |
466 DrawVisualGears(0); |
467 end; |
467 end; |
468 |
468 |
469 // Waves |
469 // Waves |
470 offsetY:= 10 * min(0, -128 - screenBottom); |
470 offsetY:= 10 * min(0, -145 - screenBottom); |
471 DrawWaves( 1, 0 + WorldDx div 90, - cWaveHeight + offsetY div 35, 0.25); |
471 DrawWaves( 1, 0 + WorldDx div 32, - cWaveHeight + offsetY div 35, 0.25); |
472 DrawWaves( -1, 25 + WorldDx div 80, - cWaveHeight + offsetY div 38, 0.19); |
472 DrawWaves( -1, 25 + WorldDx div 25, - cWaveHeight + offsetY div 38, 0.19); |
473 DrawWaves( 1, 75 + WorldDx div 70, - cWaveHeight + offsetY div 45, 0.14); |
473 DrawWaves( 1, 75 + WorldDx div 19, - cWaveHeight + offsetY div 45, 0.14); |
474 DrawWaves(-1, 100 + WorldDx div 60, - cWaveHeight + offsetY div 70, 0.09); |
474 DrawWaves(-1, 100 + WorldDx div 14, - cWaveHeight + offsetY div 70, 0.09); |
475 |
475 |
476 |
476 |
477 DrawLand(WorldDx, WorldDy); |
477 DrawLand(WorldDx, WorldDy); |
478 |
478 |
479 DrawWater(255); |
479 DrawWater(255); |
507 DrawVisualGears(2); |
507 DrawVisualGears(2); |
508 |
508 |
509 DrawWater(cWaterOpacity); |
509 DrawWater(cWaterOpacity); |
510 |
510 |
511 // Waves |
511 // Waves |
512 DrawWaves( 1, 25 + WorldDx div 50, - cWaveHeight, 0.05); |
512 DrawWaves( 1, 25 + WorldDx div 9, - cWaveHeight, 0.05); |
513 DrawWaves(-1, 50 + WorldDx div 40, 1 - cWaveHeight - offsetY div 40, 0.03); |
513 DrawWaves(-1, 50 + WorldDx div 6, 1 - cWaveHeight - offsetY div 40, 0.03); |
514 DrawWaves( 1, 75 + WorldDx div 20, 3- cWaveHeight - offsetY div 20, 0.01); |
514 DrawWaves( 1, 75 + WorldDx div 4, 3- cWaveHeight - offsetY div 20, 0.01); |
515 DrawWaves( -1, 25 + WorldDx div 10, 5 - cWaveHeight - offsetY div 10, 0); |
515 DrawWaves( -1, 25 + WorldDx div 3, 5 - cWaveHeight - offsetY div 10, 0); |
516 |
516 |
517 |
517 |
518 {$WARNINGS OFF} |
518 {$WARNINGS OFF} |
519 // Target |
519 // Target |
520 if TargetPoint.X <> NoPointX then |
520 if TargetPoint.X <> NoPointX then |