# HG changeset patch # User unc0rr # Date 1289137263 -10800 # Node ID 64e677349124e2e6c7aae902aba84554c0450c73 # Parent 08f4627ad2b31befa73975d063d8372777174295 REmove stupid int64 conversions, provide real fixes to compiler hints diff -r 08f4627ad2b3 -r 64e677349124 hedgewars/uGears.pas --- a/hedgewars/uGears.pas Sun Nov 07 16:33:42 2010 +0300 +++ b/hedgewars/uGears.pas Sun Nov 07 16:41:03 2010 +0300 @@ -1060,8 +1060,8 @@ begin if not (((Ammoz[CurAmmoType].Ammo.Propz and ammoprop_AltUse) <> 0) and ((Gear^.State and gstAttacked) = 0)) then exit; - DrawTexture(round(int64(sx) + 16), round(int64(sy) + 16), ropeIconTex); - DrawTextureF(SpritesData[sprAMAmmos].Texture, 0.75, round(int64(sx) + 30), round(int64(sy) + 30), ord(CurAmmoType) - 1, 1, 32, 32); + DrawTexture(sx + 16, sy + 16, ropeIconTex); + DrawTextureF(SpritesData[sprAMAmmos].Texture, 0.75, sx + 30, sy + 30, ord(CurAmmoType) - 1, 1, 32, 32); end; end; diff -r 08f4627ad2b3 -r 64e677349124 hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Sun Nov 07 16:33:42 2010 +0300 +++ b/hedgewars/uLandObjects.pas Sun Nov 07 16:41:03 2010 +0300 @@ -292,9 +292,9 @@ end end; inc(y, 3); - until y > int64(LAND_HEIGHT) - 1 - Height; + until y >= LAND_HEIGHT - Height; inc(x, getrandom(6) + 3) - until x > int64(LAND_WIDTH) - 1 - Width; + until x >= LAND_WIDTH - Width; bRes:= cnt <> 0; if bRes then begin @@ -341,9 +341,9 @@ end end; inc(y, 12); - until y > int64(LAND_HEIGHT) - 1 - Height - 8; + until y >= LAND_HEIGHT - Height - 8; inc(x, getrandom(12) + 12) - until x > int64(LAND_WIDTH) - 1 - Width; + until x >= LAND_WIDTH - Width; bRes:= cnt <> 0; if bRes then begin diff -r 08f4627ad2b3 -r 64e677349124 hedgewars/uVisualGears.pas --- a/hedgewars/uVisualGears.pas Sun Nov 07 16:33:42 2010 +0300 +++ b/hedgewars/uVisualGears.pas Sun Nov 07 16:41:03 2010 +0300 @@ -369,7 +369,7 @@ if Gear^.Kind = vgtFlake then begin // Damage calc from doMakeExplosion - dmg:= min(101, int64(Radius) + cHHRadius div 2 - (round(abs(Gear^.X - float(X))+abs(Gear^.Y - float(Y))) div 5)); + dmg:= min(101, Radius + cHHRadius div 2 - LongInt(abs(round(Gear^.X) - X) + abs(round(Gear^.Y) - Y)) div 5); if dmg > 1 then begin Gear^.tdX:= 0.02 * dmg + 0.01; diff -r 08f4627ad2b3 -r 64e677349124 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Sun Nov 07 16:33:42 2010 +0300 +++ b/hedgewars/uWorld.pas Sun Nov 07 16:41:03 2010 +0300 @@ -620,8 +620,8 @@ tdy:= - Cos(Gear^.Angle * Pi / cMaxAngle); for i:= (Gear^.Power * 24) div cPowerDivisor downto 0 do DrawSprite(sprPower, - int64(hwRound(Gear^.X)) + GetLaunchX(CurAmmoType, hwSign(Gear^.dX), Gear^.Angle) + round(WorldDx + tdx * (24 + i * 2)) - 16, - int64(hwRound(Gear^.Y)) + GetLaunchY(CurAmmoType, Gear^.Angle) + round(WorldDy + tdy * (24 + i * 2)) - 16, + hwRound(Gear^.X) + GetLaunchX(CurAmmoType, hwSign(Gear^.dX), Gear^.Angle) + LongInt(round(WorldDx + tdx * (24 + i * 2))) - 16, + hwRound(Gear^.Y) + GetLaunchY(CurAmmoType, Gear^.Angle) + LongInt(round(WorldDy + tdy * (24 + i * 2))) - 16, i) end end;