diff -r 5cc010e79431 -r 4bddcc1a1450 hedgewars/uUtils.pas --- a/hedgewars/uUtils.pas Mon Jul 01 22:28:42 2013 +0300 +++ b/hedgewars/uUtils.pas Mon Jul 01 23:23:22 2013 +0300 @@ -21,7 +21,7 @@ unit uUtils; interface -uses uTypes, uFloat, GLunit; +uses uTypes, uFloat; procedure SplitBySpace(var a, b: shortstring); procedure SplitByChar(var a, b: shortstring; c: char); @@ -41,7 +41,7 @@ function StrToInt(s: shortstring): LongInt; function FloatToStr(n: hwFloat): shortstring; -function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat; inline; +function DxDy2Angle(const _dY, _dX: hwFloat): real; inline; function DxDy2Angle32(const _dY, _dX: hwFloat): LongInt; function DxDy2AttackAngle(const _dY, _dX: hwFloat): LongInt; function DxDy2AttackAnglef(const _dY, _dX: extended): LongInt; @@ -200,7 +200,7 @@ end; -function DxDy2Angle(const _dY, _dX: hwFloat): GLfloat; inline; +function DxDy2Angle(const _dY, _dX: hwFloat): real; inline; var dY, dX: Extended; begin dY:= hwFloat2Float(_dY); @@ -505,6 +505,20 @@ {$I+} {$ENDIF} + //mobile stuff + mobileRecord.getScreenDPI:= @getScreenDPI; //TODO: define external function. +{$IFDEF IPHONEOS} + mobileRecord.PerformRumble:= @AudioServicesPlaySystemSound; + mobileRecord.GameLoading:= @startLoadingIndicator; + mobileRecord.GameLoaded:= @stopLoadingIndicator; + mobileRecord.SaveLoadingEnded:= @saveFinishedSynching; +{$ELSE} + mobileRecord.PerformRumble:= nil; + mobileRecord.GameLoading:= nil; + mobileRecord.GameLoaded:= nil; + mobileRecord.SaveLoadingEnded:= nil; +{$ENDIF} + end; procedure freeModule;