--- a/hedgewars/uMobile.pas Thu Sep 22 23:20:11 2011 +0200
+++ b/hedgewars/uMobile.pas Fri Sep 23 09:58:41 2011 +0200
@@ -38,7 +38,7 @@
procedure GameLoading; inline;
procedure GameLoaded; inline;
-procedure AmmoUpdate; // don't inline
+procedure AmmoUpdate; // do not inline
procedure NewTurnBeginning; inline;
procedure SaveBegan; inline;
procedure SaveFinished; inline;
@@ -46,6 +46,7 @@
implementation
uses uVariables;
+// this function is just to determine whether we are running on a limited screen device
function isPhone: Boolean; inline;
begin
{$IFDEF IPHONEOS}
@@ -54,12 +55,17 @@
exit(false);
end;
+// this function should make the device vibrate in some way
procedure performRumble; inline;
const kSystemSoundID_Vibrate = $00000FFF;
begin
+ // do not vibrate while synchronising a demo/save
+ if not fastUntilLag then
+ begin
{$IFDEF IPHONEOS}
- AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
+ AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
{$ENDIF}
+ end;
end;
procedure GameLoading; inline;
@@ -76,7 +82,7 @@
{$ENDIF}
end;
-procedure AmmoUpdate; // don't inline
+procedure AmmoUpdate; // do not inline
begin
{$IFDEF IPHONEOS}
if (CurrentTeam = nil) or
--- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Thu Sep 22 23:20:11 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.h Fri Sep 23 09:58:41 2011 +0200
@@ -65,7 +65,6 @@
void print_free_memory (void);
void playSound (NSString *snd);
-BOOL isApplePhone (void);
NSInteger randomPort (void);
NSString *getModelType (void);
--- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Thu Sep 22 23:20:11 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.m Fri Sep 23 09:58:41 2011 +0200
@@ -63,10 +63,6 @@
#endif
}
-BOOL inline isApplePhone () {
- return (IS_IPAD() == NO);
-}
-
NSString *getModelType () {
size_t size;
// set 'oldp' parameter to NULL to get the size of the data returned so we can allocate appropriate amount of space
--- a/project_files/HedgewarsMobile/Classes/ObjcExports.h Thu Sep 22 23:20:11 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/ObjcExports.h Fri Sep 23 09:58:41 2011 +0200
@@ -27,6 +27,7 @@
NSInteger cachedGrenadeTime();
void clearView();
void setGrenadeTime(NSInteger value);
+BOOL isApplePhone(void);
void startSpinningProgress();
void stopSpinningProgress();
--- a/project_files/HedgewarsMobile/Classes/ObjcExports.m Thu Sep 22 23:20:11 2011 +0200
+++ b/project_files/HedgewarsMobile/Classes/ObjcExports.m Fri Sep 23 09:58:41 2011 +0200
@@ -62,6 +62,10 @@
#pragma mark -
#pragma mark functions called by pascal code
+BOOL inline isApplePhone() {
+ return (IS_IPAD() == NO);
+}
+
void startSpinningProgress() {
gameRunning = NO;
overlay_instance.lowerIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];