hedgewars/uWorld.pas
changeset 3025 01682ec58eb0
parent 2999 30c4d62cd0c3
child 3032 9c190d3c165b
--- a/hedgewars/uWorld.pas	Fri Mar 19 19:49:33 2010 +0000
+++ b/hedgewars/uWorld.pas	Sat Mar 20 15:16:59 2010 +0000
@@ -516,9 +516,9 @@
 
 // Turn time
 {$IFDEF IPHONEOS}
-offset:= 313;
+offsetX:= cScreenHeight - 13;
 {$ELSE}
-offset:= 48;
+offsetX:= 48;
 {$ENDIF}
 if TurnTimeLeft <> 0 then
    begin
@@ -526,14 +526,14 @@
    if i>99 then t:= 112
       else if i>9 then t:= 96
                   else t:= 80;
-   DrawSprite(sprFrame, -cScreenWidth div 2 + t, cScreenHeight - offset, 1);
+   DrawSprite(sprFrame, -(cScreenWidth shr 1) + t, cScreenHeight - offsetX, 1);
    while i > 0 do
          begin
          dec(t, 32);
-         DrawSprite(sprBigDigit, -cScreenWidth div 2 + t, cScreenHeight - offset, i mod 10);
+         DrawSprite(sprBigDigit, -(cScreenWidth shr 1) + t, cScreenHeight - offsetX, i mod 10);
          i:= i div 10
          end;
-   DrawSprite(sprFrame, -cScreenWidth div 2 + t - 4, cScreenHeight - offset, 0);
+   DrawSprite(sprFrame, -(cScreenWidth shr 1) + t - 4, cScreenHeight - offsetX, 0);
    end;
 
 {$IFNDEF IPHONEOS}
@@ -605,7 +605,6 @@
             end;
 
 // Teams Healths
-
 for t:= 0 to Pred(TeamsCount) do
    with TeamsArray[t]^ do
       begin
@@ -659,8 +658,8 @@
 
 // Wind bar
 {$IFDEF IPHONEOS}
-offsetX:= 305;
-offsetY:= 315;
+offsetX:= cScreenHeight - 13;
+offsetY:= (cScreenWidth shr 1) + 74;
 {$ELSE}
 offsetX:= 30;
 offsetY:= 180;
@@ -709,7 +708,7 @@
 
 // fps
 {$IFDEF IPHONEOS}
-offset:= 300;
+offset:= 8;
 {$ELSE}
 offset:= 10;
 {$ENDIF}
@@ -768,7 +767,7 @@
    end;
 
 if GameState = gsConfirm then
-    DrawCentered(0, cScreenHeight div 2, ConfirmTexture);
+    DrawCentered(0, (cScreenHeight shr 1), ConfirmTexture);
 
 SetScale(zoom);
 
@@ -782,8 +781,8 @@
          i:= Ammo^[CurSlot, CurAmmo].Pos;
          with Ammoz[Ammo^[CurSlot, CurAmmo].AmmoType] do
            if PosCount > 1 then
-              DrawSprite(PosSprite, CursorPoint.X - SpritesData[PosSprite].Width div 2,
-                                    cScreenHeight - CursorPoint.Y - SpritesData[PosSprite].Height div 2,
+              DrawSprite(PosSprite, CursorPoint.X - (SpritesData[PosSprite].Width shr 1),
+                                    cScreenHeight - CursorPoint.Y - (SpritesData[PosSprite].Height shr 1),
                                     i);
          end;
    DrawSprite(sprArrow, CursorPoint.X, cScreenHeight - CursorPoint.Y, (RealTicks shr 6) mod 8)
@@ -923,7 +922,7 @@
 
 procedure HideMission;
 begin
-missionTimer:= 0
+    missionTimer:= 0
 end;
 
 procedure init_uWorld;
@@ -950,7 +949,7 @@
 
 procedure free_uWorld;
 begin
-if missionTex <> nil then FreeTexture(missionTex);
+    if missionTex <> nil then FreeTexture(missionTex);
 end;
 
 end.