cocoaTouch/MainMenuViewController.m
changeset 3490 016b3172b645
parent 3479 972ae3ec178a
child 3513 f589230fa21b
equal deleted inserted replaced
3489:aedf289192f5 3490:016b3172b645
    21 }
    21 }
    22 
    22 
    23 - (void)didReceiveMemoryWarning {
    23 - (void)didReceiveMemoryWarning {
    24 	// Releases the view if it doesn't have a superview.
    24 	// Releases the view if it doesn't have a superview.
    25 	[super didReceiveMemoryWarning];
    25 	[super didReceiveMemoryWarning];
       
    26     if (settingsViewController.view.superview == nil) 
       
    27         settingsViewController = nil;
       
    28     if (gameConfigViewController.view.superview == nil) 
       
    29         gameConfigViewController = nil;
       
    30     MSG_MEMCLEAN();
    26 }
    31 }
    27 
    32 
    28 -(void) viewDidLoad {
    33 -(void) viewDidLoad {
    29     char *ver;
    34     char *ver;
    30     HW_versionInfo(NULL, &ver);
    35     HW_versionInfo(NULL, &ver);
    65     [indicator startAnimating];
    70     [indicator startAnimating];
    66     [alert addSubview:indicator];
    71     [alert addSubview:indicator];
    67     [indicator release];
    72     [indicator release];
    68     
    73     
    69     // create a team
    74     // create a team
    70     createTeamNamed(@"Default Team");
    75     createTeamNamed(@"Pirates");
       
    76     createTeamNamed(@"Ninjas");
    71     
    77     
    72     createSchemeNamed(@"testing ftw");
    78     createSchemeNamed(@"Scheme 0");
    73     
    79     
    74     // create settings.plist
    80     // create settings.plist
    75     NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
    81     NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
    76 
    82 
    77     [saveDict setObject:@"" forKey:@"username"];
    83     [saveDict setObject:@"" forKey:@"username"];
   156 -(void) viewDidUnload {
   162 -(void) viewDidUnload {
   157     self.versionLabel = nil;
   163     self.versionLabel = nil;
   158     gameConfigViewController = nil;
   164     gameConfigViewController = nil;
   159     settingsViewController = nil;
   165     settingsViewController = nil;
   160 	[super viewDidUnload];
   166 	[super viewDidUnload];
       
   167     MSG_DIDUNLOAD();
   161 }
   168 }
   162 
   169 
   163 -(void) dealloc {
   170 -(void) dealloc {
   164     [versionLabel release];
   171     [versionLabel release];
   165     [settingsViewController release];
   172     [settingsViewController release];