# HG changeset patch # User koda # Date 1309653197 -7200 # Node ID a3f87be7b09ac4488776c94421a2a359f8d4e750 # Parent a66d5141a3baa3312598da945b342f71ddd00eda ios: disble logging, stop music correctly in preferences, move script command before seed, try using reatin instead of if diff -r a66d5141a3ba -r a3f87be7b09a hedgewars/options.inc --- a/hedgewars/options.inc Sun Jul 03 01:10:39 2011 +0200 +++ b/hedgewars/options.inc Sun Jul 03 02:33:17 2011 +0200 @@ -32,10 +32,11 @@ {$DEFINE HWLIBRARY} {$DEFINE S3D_DISABLED} {$DEFINE GLunit:=gles11} +{$ELSE} + {$DEFINE DEBUGFILE} + //{$DEFINE TRACEAIACTIONS} + //{$DEFINE COUNTTICKS} {$ENDIF} -{$DEFINE DEBUGFILE} -//{$DEFINE TRACEAIACTIONS} -//{$DEFINE COUNTTICKS} //also available LUA_DISABLED diff -r a66d5141a3ba -r a3f87be7b09a project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m --- a/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m Sun Jul 03 01:10:39 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/EngineProtocolNetwork.m Sun Jul 03 02:33:17 2011 +0200 @@ -285,6 +285,11 @@ NSString *saveHeader = @"TS"; [self dumpRawData:[saveHeader UTF8String] ofSize:[saveHeader length]]; + // lua script (if set) + NSString *script = [gameConfig objectForKey:@"mission_command"]; + if ([script length] != 0) + [self sendToEngine:script]; + // seed info [self sendToEngine:[gameConfig objectForKey:@"seed_command"]]; @@ -298,11 +303,6 @@ if ([staticMap length] != 0) [self sendToEngine:staticMap]; - // lua script (if set) - NSString *script = [gameConfig objectForKey:@"mission_command"]; - if ([script length] != 0) - [self sendToEngine:script]; - // theme info [self sendToEngine:[gameConfig objectForKey:@"theme_command"]]; diff -r a66d5141a3ba -r a3f87be7b09a project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m --- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Sun Jul 03 01:10:39 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m Sun Jul 03 02:33:17 2011 +0200 @@ -183,8 +183,7 @@ // release the network manager and the savepath as they are not needed anymore releaseAndNil(self.engineProtocol); - if (self.gameType != gtSave) - releaseAndNil(self.savePath); + releaseAndNil(self.savePath); if ([[userDefaults objectForKey:@"music"] boolValue]) [HedgewarsAppDelegate playBackgroundMusic]; @@ -210,7 +209,7 @@ // set up variables for a save game -(void) startSaveGame:(NSString *)atPath { self.gameType = gtSave; - self.savePath = atPath; + self.savePath = [atPath retain]; [self.engineProtocol spawnThread:self.savePath]; [self prepareEngineLaunch]; diff -r a66d5141a3ba -r a3f87be7b09a project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m --- a/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Sun Jul 03 01:10:39 2011 +0200 +++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m Sun Jul 03 02:33:17 2011 +0200 @@ -62,6 +62,9 @@ [settings setObject:[NSNumber numberWithBool:NO] forKey:@"music"]; theOtherSwitch = (UISwitch *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:1 inSection:1]].accessoryView; [theOtherSwitch setOn:NO animated:YES]; + + if (theOtherSwitch.on) + [HedgewarsAppDelegate pauseBackgroundMusic]; break; case 20: //musicSwitch // if switch above (sound) is off, never turn on diff -r a66d5141a3ba -r a3f87be7b09a project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Jul 03 01:10:39 2011 +0200 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Sun Jul 03 02:33:17 2011 +0200 @@ -701,7 +701,6 @@ 29B97323FDCFA39411CA2CEA /* Frameworks */ = { isa = PBXGroup; children = ( - 612CABAA1391CE68005E9596 /* AVFoundation.framework */, 619599BA1364E65900B429B6 /* Freetype.xcodeproj */, 6195993F1364C82B00B429B6 /* Lua.xcodeproj */, 619598181364BCD200B429B6 /* Tremor.xcodeproj */, @@ -711,6 +710,7 @@ 618E27B612A2C30700C20EF0 /* SDL_net.xcodeproj */, 61798A0B114AB65600BA94A9 /* SDL_ttf.xcodeproj */, 61798934114AB25F00BA94A9 /* AudioToolbox.framework */, + 612CABAA1391CE68005E9596 /* AVFoundation.framework */, 61A117FE1168322700359010 /* CoreGraphics.framework */, 1D30AB110D05D00D00671497 /* Foundation.framework */, 28FD14FF0DC6FC520079059D /* OpenGLES.framework */,