# HG changeset patch # User koda # Date 1287614501 -7200 # Node ID d92509c2f2553c82feb86cad4b026d9f219cac37 # Parent aa24192417a87aec1339dcc7d354a91a28a0bc14 some more memory opt diff -r aa24192417a8 -r d92509c2f255 project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m --- a/project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m Tue Oct 19 23:58:27 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/AmmoMenuViewController.m Thu Oct 21 00:41:41 2010 +0200 @@ -279,9 +279,9 @@ if (theButton.currentTitle == nil) { HW_setWeapon(theButton.tag); playSound(@"clickSound"); + if (IS_DUALHEAD() == NO) + [self disappear]; } - if (IS_DUALHEAD() == NO) - [self disappear]; } -(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { diff -r aa24192417a8 -r d92509c2f255 project_files/HedgewarsMobile/Classes/GameConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Tue Oct 19 23:58:27 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m Thu Oct 21 00:41:41 2010 +0200 @@ -212,11 +212,12 @@ if ([[gameDictionary allKeys] count] == 11) { NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:gameDictionary,@"game_dictionary", @"",@"savefile", [NSNumber numberWithBool:NO],@"netgame", nil]; + // let's hide all the views while the game is on + UIViewController *dummy = [[UIViewController alloc] init]; + [self presentModalViewController:dummy animated:NO]; [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:allDataNecessary]; - - // tell controllers that they're being reloaded - [self.mapConfigViewController viewWillAppear:YES]; - [self.schemeWeaponConfigViewController viewWillAppear:YES]; + [self dismissModalViewControllerAnimated:NO]; + [dummy release]; } else { DLog(@"gameconfig data not complete!!"); [self.parentViewController dismissModalViewControllerAnimated:YES]; diff -r aa24192417a8 -r d92509c2f255 project_files/HedgewarsMobile/Classes/MapConfigViewController.m --- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Tue Oct 19 23:58:27 2010 +0200 +++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m Thu Oct 21 00:41:41 2010 +0200 @@ -467,7 +467,13 @@ -(void) didReceiveMemoryWarning { self.dataSourceArray = nil; - //self.lastIndexPath = nil; + + self.previewButton = nil; + self.tableView = nil; + self.maxLabel = nil; + self.sizeLabel = nil; + self.segmentedControl = nil; + self.slider = nil; MSG_MEMCLEAN(); [super didReceiveMemoryWarning]; diff -r aa24192417a8 -r d92509c2f255 project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj --- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Tue Oct 19 23:58:27 2010 +0200 +++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj Thu Oct 21 00:41:41 2010 +0200 @@ -1452,7 +1452,7 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* Test Lua */ = { + 1D6058900D05DD3D006BFB54 /* Hedgewars */ = { isa = PBXNativeTarget; buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Hedgewars" */; buildPhases = ( @@ -1536,7 +1536,7 @@ ); projectRoot = ""; targets = ( - 1D6058900D05DD3D006BFB54 /* Test Lua */, + 1D6058900D05DD3D006BFB54 /* Hedgewars */, 928301160F10CAFC00CC5A3C /* fpc */, 6179928B114AE0C800BA94A9 /* UpdateDataFolder */, ); diff -r aa24192417a8 -r d92509c2f255 project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib --- a/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Tue Oct 19 23:58:27 2010 +0200 +++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib Thu Oct 21 00:41:41 2010 +0200 @@ -151,7 +151,7 @@ 292 - {{778, 725}, {42, 21}} + {{778, 724}, {42, 21}} NO YES