project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 5158 4941df038b95
parent 5156 641abe679bf0
child 5208 878e551f0b4a
equal deleted inserted replaced
5157:a5a6ffc56141 5158:4941df038b95
   222                                     self.mapConfigViewController.staticMapCommand,@"staticmap_command",
   222                                     self.mapConfigViewController.staticMapCommand,@"staticmap_command",
   223                                     self.mapConfigViewController.missionCommand,@"mission_command",
   223                                     self.mapConfigViewController.missionCommand,@"mission_command",
   224                                     self.teamConfigViewController.listOfSelectedTeams,@"teams_list",
   224                                     self.teamConfigViewController.listOfSelectedTeams,@"teams_list",
   225                                     self.schemeWeaponConfigViewController.selectedScheme,@"scheme",
   225                                     self.schemeWeaponConfigViewController.selectedScheme,@"scheme",
   226                                     self.schemeWeaponConfigViewController.selectedWeapon,@"weapon",
   226                                     self.schemeWeaponConfigViewController.selectedWeapon,@"weapon",
   227                                     [NSNumber numberWithInt:self.interfaceOrientation],@"orientation",
       
   228                                     nil];
   227                                     nil];
   229 
   228 
   230     GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self];
   229     GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self];
   231 
   230 
   232     [bridge startLocalGame:gameDictionary];
   231     [bridge startLocalGame:gameDictionary];
   233 
   232 
   234     [bridge release];
   233     [bridge release];
   235     // also modify SavedGamesViewController.m
       
   236    /* StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped];
       
   237     statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
       
   238     if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)])
       
   239         statsPage.modalPresentationStyle = UIModalPresentationPageSheet;
       
   240 
       
   241     NSArray *stats;
       
   242     if (IS_DUALHEAD()) {
       
   243         stats = [[HedgewarsAppDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
       
   244         [self presentModalViewController:statsPage animated:NO];
       
   245     } else {
       
   246         [self performSelector:@selector(presentModalViewController:animated:) withObject:statsPage afterDelay:3];
       
   247         stats = [[HedgewarsAppDelegate sharedAppDelegate] startSDLgame:allDataNecessary];
       
   248     }
       
   249 
       
   250     if ([stats count] <= 1) {
       
   251         DLog(@"%@",stats);
       
   252         [statsPage dismissModalViewControllerAnimated:NO];
       
   253     } else {
       
   254         statsPage.statsArray = stats;
       
   255         [statsPage.tableView reloadData];
       
   256         [statsPage viewWillAppear:YES];
       
   257     }
       
   258 
       
   259     [statsPage release];*/
       
   260 }
   234 }
   261 
   235 
   262 -(void) loadNiceHogs {
   236 -(void) loadNiceHogs {
   263     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   237     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   264     NSString *filePath = [NSString stringWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
   238     NSString *filePath = [NSString stringWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];