hedgewars/uMobile.pas
changeset 6247 6dfad55fd71c
parent 5994 3c578f531cc1
child 6580 6155187bf599
equal deleted inserted replaced
6246:6b2d19ed521a 6247:6dfad55fd71c
    22 interface
    22 interface
    23 
    23 
    24 {$IFDEF IPHONEOS}
    24 {$IFDEF IPHONEOS}
    25 (*  iOS calls written in ObjcExports.m  *)
    25 (*  iOS calls written in ObjcExports.m  *)
    26 procedure clearView; cdecl; external;
    26 procedure clearView; cdecl; external;
    27 procedure startSpinningProgress; cdecl; external;
    27 procedure startLoadingIndicator; cdecl; external;
    28 procedure stopSpinningProgress; cdecl; external;
    28 procedure stopLoadingIndicator; cdecl; external;
    29 procedure saveBeganSynching; cdecl; external;
       
    30 procedure saveFinishedSynching; cdecl; external;
    29 procedure saveFinishedSynching; cdecl; external;
    31 procedure setGameRunning(arg: boolean); cdecl; external;
       
    32 procedure updateVisualsNewTurn; cdecl; external;
    30 procedure updateVisualsNewTurn; cdecl; external;
    33 function  isApplePhone: Boolean; cdecl; external;
    31 function  isApplePhone: Boolean; cdecl; external;
    34 procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external;
    32 procedure AudioServicesPlaySystemSound(num: LongInt); cdecl; external;
    35 {$ENDIF}
    33 {$ENDIF}
    36 function  isPhone: Boolean; inline;
    34 function  isPhone: Boolean; inline;
    38 
    36 
    39 procedure GameLoading; inline;
    37 procedure GameLoading; inline;
    40 procedure GameLoaded; inline;
    38 procedure GameLoaded; inline;
    41 procedure AmmoUpdate; // do not inline
    39 procedure AmmoUpdate; // do not inline
    42 procedure NewTurnBeginning; inline;
    40 procedure NewTurnBeginning; inline;
    43 procedure SaveBegan; inline;
    41 procedure SaveLoadingEnded; inline;
    44 procedure SaveFinished; inline;
       
    45 
    42 
    46 implementation
    43 implementation
    47 uses uVariables;
    44 uses uVariables;
    48 
    45 
    49 // this function is just to determine whether we are running on a limited screen device
    46 // this function is just to determine whether we are running on a limited screen device
    69 end;
    66 end;
    70 
    67 
    71 procedure GameLoading; inline;
    68 procedure GameLoading; inline;
    72 begin
    69 begin
    73 {$IFDEF IPHONEOS}
    70 {$IFDEF IPHONEOS}
    74     startSpinningProgress();
    71     startLoadingIndicator();
    75 {$ENDIF}
    72 {$ENDIF}
    76 end;
    73 end;
    77 
    74 
    78 procedure GameLoaded; inline;
    75 procedure GameLoaded; inline;
    79 begin
    76 begin
    80 {$IFDEF IPHONEOS}
    77 {$IFDEF IPHONEOS}
    81     stopSpinningProgress();
    78     stopLoadingIndicator();
    82 {$ENDIF}
    79 {$ENDIF}
    83 end;
    80 end;
    84 
    81 
    85 procedure AmmoUpdate; // do not inline
    82 procedure AmmoUpdate; // do not inline
    86 begin
    83 begin
    99     clearView();
    96     clearView();
   100 {$ENDIF}
    97 {$ENDIF}
   101     AmmoUpdate();
    98     AmmoUpdate();
   102 end;
    99 end;
   103 
   100 
   104 procedure SaveBegan; inline;
   101 procedure SaveLoadingEnded; inline;
   105 begin
       
   106 {$IFDEF IPHONEOS}
       
   107     saveBeganSynching();
       
   108 {$ENDIF}
       
   109 end;
       
   110 
       
   111 procedure SaveFinished; inline;
       
   112 begin
   102 begin
   113 {$IFDEF IPHONEOS}
   103 {$IFDEF IPHONEOS}
   114     saveFinishedSynching();
   104     saveFinishedSynching();
   115 {$ENDIF}
   105 {$ENDIF}
   116 end;
   106 end;