project_files/HedgewarsMobile/Classes/GameConfigViewController.m
changeset 5156 641abe679bf0
parent 5002 a9c44a8ffec8
child 5158 4941df038b95
equal deleted inserted replaced
5155:f2165724605c 5156:641abe679bf0
    22 #import "GameConfigViewController.h"
    22 #import "GameConfigViewController.h"
    23 #import "MapConfigViewController.h"
    23 #import "MapConfigViewController.h"
    24 #import "TeamConfigViewController.h"
    24 #import "TeamConfigViewController.h"
    25 #import "SchemeWeaponConfigViewController.h"
    25 #import "SchemeWeaponConfigViewController.h"
    26 #import "HelpPageViewController.h"
    26 #import "HelpPageViewController.h"
    27 #import "StatsPageViewController.h"
    27 #import "GameInterfaceBridge.h"
    28 #import "CommodityFunctions.h"
    28 #import "CommodityFunctions.h"
    29 #import "UIImageExtra.h"
    29 #import "UIImageExtra.h"
    30 #import "PascalImports.h"
    30 #import "PascalImports.h"
    31 
    31 
    32 @implementation GameConfigViewController
    32 @implementation GameConfigViewController
   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",
   227                                     [NSNumber numberWithInt:self.interfaceOrientation],@"orientation",
   228                                     nil];
   228                                     nil];
   229 
   229 
   230     NSDictionary *allDataNecessary = [NSDictionary dictionaryWithObjectsAndKeys:
   230     GameInterfaceBridge *bridge = [[GameInterfaceBridge alloc] initWithController:self];
   231                                       gameDictionary,@"game_dictionary",
   231 
   232                                       [NSNumber numberWithBool:NO],@"netgame",
   232     [bridge startLocalGame:gameDictionary];
   233                                       @"",@"savefile",
   233 
   234                                       nil];
   234     [bridge release];
   235 
       
   236     // also modify SavedGamesViewController.m
   235     // also modify SavedGamesViewController.m
   237     StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped];
   236    /* StatsPageViewController *statsPage = [[StatsPageViewController alloc] initWithStyle:UITableViewStyleGrouped];
   238     statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
   237     statsPage.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
   239     if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)])
   238     if ([statsPage respondsToSelector:@selector(setModalPresentationStyle:)])
   240         statsPage.modalPresentationStyle = UIModalPresentationPageSheet;
   239         statsPage.modalPresentationStyle = UIModalPresentationPageSheet;
   241 
   240 
   242     NSArray *stats;
   241     NSArray *stats;
   255         statsPage.statsArray = stats;
   254         statsPage.statsArray = stats;
   256         [statsPage.tableView reloadData];
   255         [statsPage.tableView reloadData];
   257         [statsPage viewWillAppear:YES];
   256         [statsPage viewWillAppear:YES];
   258     }
   257     }
   259 
   258 
   260     [statsPage release];
   259     [statsPage release];*/
   261 }
   260 }
   262 
   261 
   263 -(void) loadNiceHogs {
   262 -(void) loadNiceHogs {
   264     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   263     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
   265     NSString *filePath = [NSString stringWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
   264     NSString *filePath = [NSString stringWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];