hedgewars/uWorld.pas
changeset 11525 c27565c942f5
parent 11524 c6bae7605ea4
child 11878 74e838b7eecc
equal deleted inserted replaced
11524:c6bae7605ea4 11525:c27565c942f5
  1390     if CinematicSteps < 300 then
  1390     if CinematicSteps < 300 then
  1391         begin
  1391         begin
  1392         inc(CinematicSteps, Lag);
  1392         inc(CinematicSteps, Lag);
  1393         if CinematicSteps > 300 then
  1393         if CinematicSteps > 300 then
  1394         CinematicSteps:= 300;
  1394         CinematicSteps:= 300;
  1395         CinematicBarH:= (ViewHeight * CinematicSteps) div 2048;
       
  1396         end;
  1395         end;
  1397     end
  1396     end
  1398 else if CinematicSteps > 0 then
  1397 else if CinematicSteps > 0 then
  1399     begin
  1398     begin
  1400     dec(CinematicSteps, Lag);
  1399     dec(CinematicSteps, Lag);
  1401     if CinematicSteps < 0 then
  1400     if CinematicSteps < 0 then
  1402         CinematicSteps:= 0;
  1401         CinematicSteps:= 0;
  1403     CinematicBarH:= (ViewHeight * CinematicSteps) div 2048;
       
  1404     end;
  1402     end;
  1405 
  1403 
  1406 // render black bars
  1404 // render black bars
  1407 if CinematicSteps > 0 then
  1405 if CinematicSteps > 0 then
  1408     begin
  1406     begin
  1409     r.x:= ViewLeftX;
  1407     r.x:= ViewLeftX;
  1410     r.w:= ViewWidth;
  1408     r.w:= ViewWidth;
  1411     r.y:= ViewTopY;
  1409     r.y:= ViewTopY;
       
  1410     CinematicBarH:= (ViewHeight * CinematicSteps) div 2048;
  1412     r.h:= CinematicBarH;
  1411     r.h:= CinematicBarH;
  1413     DrawRect(r, 0, 0, 0, $FF, true);
  1412     DrawRect(r, 0, 0, 0, $FF, true);
  1414     r.y:= ViewBottomY - r.h;
  1413     r.y:= ViewBottomY - r.h;
  1415     DrawRect(r, 0, 0, 0, $FF, true);
  1414     DrawRect(r, 0, 0, 0, $FF, true);
  1416     end;
  1415     end;