# HG changeset patch # User koda # Date 1304186765 -7200 # Node ID 851c6fbb44e696499288bfe412bd6bff0ccdef55 # Parent 881c14f81d12edb5b026af1f764a56bcb22875ef small fix for starting the ios game diff -r 881c14f81d12 -r 851c6fbb44e6 hedgewars/PascalExports.pas --- a/hedgewars/PascalExports.pas Fri Apr 29 17:11:08 2011 +0400 +++ b/hedgewars/PascalExports.pas Sat Apr 30 20:06:05 2011 +0200 @@ -28,8 +28,7 @@ * http://en.wikipedia.org/wiki/X86_calling_conventions#cdecl *) interface -uses uTypes, uConsts, uVariables, GLunit, uKeys, uSound, uAmmos, uUtils, - uCommands, uMobile; +uses uTypes, uConsts, uVariables, GLunit, uKeys, uSound, uAmmos, uUtils, uCommands; {$INCLUDE "config.inc"} procedure HW_versionInfo(netProto: PLongInt; versionStr: PPChar); cdecl; export; @@ -201,7 +200,6 @@ // equivalent to esc+y; when closeFrontend = true the game exits after memory cleanup procedure HW_terminate(closeFrontend: boolean); cdecl; export; begin - {$IFDEF IPHONEOS}setGameRunning(false);{$ENDIF} alsoShutdownFrontend:= closeFrontend; ParseCommand('forcequit', true); end; diff -r 881c14f81d12 -r 851c6fbb44e6 project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m --- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Fri Apr 29 17:11:08 2011 +0400 +++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Sat Apr 30 20:06:05 2011 +0200 @@ -61,7 +61,6 @@ [self.overlayController setUseClassicMenu:[[dict objectForKey:@"menu"] boolValue]]; [self.overlayController setInitialOrientation:[[dict objectForKey:@"orientation"] intValue]]; - objcExportsInit(self.overlayController); UIWindow *gameWindow = (IS_DUALHEAD() ? [HedgewarsAppDelegate sharedAppDelegate].uiwindow : [[UIApplication sharedApplication] keyWindow]); [gameWindow addSubview:self.overlayController.view]; @@ -129,6 +128,8 @@ [localeString release]; [ipcString release]; + objcExportsInit(self.overlayController); + // this is the pascal fuction that starts the game, wrapped around isInGame [HedgewarsAppDelegate sharedAppDelegate].isInGame = YES; Game(gameArgs); diff -r 881c14f81d12 -r 851c6fbb44e6 project_files/HedgewarsMobile/Classes/ObjcExports.m --- a/project_files/HedgewarsMobile/Classes/ObjcExports.m Fri Apr 29 17:11:08 2011 +0400 +++ b/project_files/HedgewarsMobile/Classes/ObjcExports.m Sat Apr 30 20:06:05 2011 +0200 @@ -101,6 +101,9 @@ } void saveBeganSynching() { + savedGame = YES; + stopSpinningProgress(); + overlay_instance.view.backgroundColor = [UIColor blackColor]; overlay_instance.view.alpha = 0.75; overlay_instance.view.userInteractionEnabled = NO; @@ -114,9 +117,6 @@ [overlay_instance.savesIndicator startAnimating]; [overlay_instance.view addSubview:overlay_instance.savesIndicator]; [overlay_instance.savesIndicator release]; - - savedGame = YES; - stopSpinningProgress(); } void saveFinishedSynching() { @@ -131,7 +131,6 @@ [overlay_instance.savesIndicator performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1]; gameRunning = YES; - savedGame = NO; } void updateVisualsNewTurn(void) {