hedgewars/uWorld.pas
changeset 3523 6592fbb969da
parent 3513 f589230fa21b
child 3537 8f5b3108f29c
equal deleted inserted replaced
3522:156c04c6a3d8 3523:6592fbb969da
   529     tdx, tdy: Double;
   529     tdx, tdy: Double;
   530     grp: TCapGroup;
   530     grp: TCapGroup;
   531     s: string[15];
   531     s: string[15];
   532     highlight: Boolean;
   532     highlight: Boolean;
   533     offset, offsetX, offsetY, ScreenBottom: LongInt;
   533     offset, offsetX, offsetY, ScreenBottom: LongInt;
   534     scale: GLfloat;
       
   535     VertexBuffer: array [0..3] of TVertex2f;
   534     VertexBuffer: array [0..3] of TVertex2f;
   536 begin
   535 begin
   537 if not isPaused then
   536     if not isPaused then
   538     begin
   537     begin
   539     if ZoomValue < zoom then
   538         if ZoomValue < zoom then
   540         begin
   539         begin
   541         zoom:= zoom - 0.002 * Lag;
   540             zoom:= zoom - 0.002 * Lag;
   542         if ZoomValue > zoom then zoom:= ZoomValue
   541             if ZoomValue > zoom then 
   543         end else
   542                 zoom:= ZoomValue
   544     if ZoomValue > zoom then
   543         end 
       
   544     else 
       
   545         if ZoomValue > zoom then
   545         begin
   546         begin
   546         zoom:= zoom + 0.002 * Lag;
   547             zoom:= zoom + 0.002 * Lag;
   547         if ZoomValue < zoom then zoom:= ZoomValue
   548             if ZoomValue < zoom then
       
   549                 zoom:= ZoomValue
   548         end
   550         end
   549     end
   551     end
   550 else
   552 else
   551     ZoomValue:= zoom;
   553     ZoomValue:= zoom;
   552 
   554 
   646             DrawRotatedF(sprTargetP, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
   648             DrawRotatedF(sprTargetP, TargetPoint.X + WorldDx, TargetPoint.Y + WorldDy, 0, 0, (RealTicks shr 3) mod 360);
   647         end;
   649         end;
   648     end;
   650     end;
   649 {$WARNINGS ON}
   651 {$WARNINGS ON}
   650 
   652 
   651 {$IFDEF IPHONEOS}
   653 // this scale is used to keep the various widgets at the same dimension at all zoom levels
   652 scale:= 1.5;
   654 SetScale(cDefaultZoomLevel);
   653 {$ELSE}
       
   654 scale:= 2.0;
       
   655 {$ENDIF}
       
   656 SetScale(scale);
       
   657 
   655 
   658 
   656 
   659 // Turn time
   657 // Turn time
   660 {$IFDEF IPHONEOS}
   658 {$IFDEF IPHONEOS}
   661 offsetX:= cScreenHeight - 13;
   659 offsetX:= cScreenHeight - 13;