project_files/HedgewarsMobile/Classes/MainMenuViewController.m
author koda
Mon, 02 Aug 2010 00:55:24 +0200
changeset 3703 12d17c6e8855
parent 3701 8c449776ebe6
child 3737 2ba6ac8a114b
permissions -rw-r--r--
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     1
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     2
//  MainMenuViewController.m
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     3
//  hwengine
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     4
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     5
//  Created by Vittorio on 08/01/10.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     7
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     8
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     9
#import "MainMenuViewController.h"
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
    10
#import "CommodityFunctions.h"
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    11
#import "SDL_uikitappdelegate.h"
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
    12
#import "SDL_mixer.h"
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    13
#import "PascalImports.h"
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    14
#import "GameConfigViewController.h"
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    15
#import "SplitViewRootController.h"
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
    16
#import "AboutViewController.h"
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    17
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    18
@implementation MainMenuViewController
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
    19
@synthesize versionLabel, gameConfigViewController, settingsViewController, aboutViewController;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    20
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    21
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    22
    return rotationManager(interfaceOrientation);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    23
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    24
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    25
- (void)didReceiveMemoryWarning {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    26
    // Releases the view if it doesn't have a superview.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    27
    [super didReceiveMemoryWarning];
3701
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
    28
    if (self.settingsViewController.view.superview == nil)
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
    29
        self.settingsViewController = nil;
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
    30
    if (self.gameConfigViewController.view.superview == nil)
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
    31
        self.gameConfigViewController = nil;
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    32
    MSG_MEMCLEAN();
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    33
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    34
3667
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    35
// using a different thread for audio 'cos it's slow
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    36
-(void) initAudioThread {
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    37
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    38
    Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 1, 512);
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    39
    [pool release];
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    40
}
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    41
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    42
-(void) viewDidLoad {
3667
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    43
    [NSThread detachNewThreadSelector:@selector(initAudioThread)
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    44
                             toTarget:self
9359a70df013 use external libs more consistently
koda
parents: 3662
diff changeset
    45
                           withObject:nil];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    46
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    47
    char *ver;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    48
    HW_versionInfo(NULL, &ver);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    49
    NSString *versionNumber = [[NSString alloc] initWithCString:ver];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    50
    self.versionLabel.text = versionNumber;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    51
    [versionNumber release];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    52
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    53
    // listen to request to remove the modalviewcontroller
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    54
    [[NSNotificationCenter defaultCenter] addObserver:self
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    55
                                             selector:@selector(dismissModalViewController)
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    56
                                                 name: @"dismissModalView"
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    57
                                               object:nil];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    58
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    59
    // initialize some files the first time we load the game
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    60
    if (!([[NSFileManager defaultManager] fileExistsAtPath:SETTINGS_FILE()]))
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    61
        [NSThread detachNewThreadSelector:@selector(checkFirstRun) toTarget:self withObject:nil];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    62
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    63
    [super viewDidLoad];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    64
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    65
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    66
// this is called to verify whether it's the first time the app is launched
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    67
// if it is it blocks user interaction with an alertView until files are created
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    68
-(void) checkFirstRun {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    69
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
3660
bc125bea5849 complete settings page rework
koda
parents: 3621
diff changeset
    70
    DLog(@"First time run, creating settings files at %@", SETTINGS_FILE());
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    71
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    72
    // show a popup with an indicator to make the user wait
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    73
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Please wait",@"")
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    74
                                                    message:nil
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    75
                                                   delegate:nil
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    76
                                          cancelButtonTitle:nil
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    77
                                          otherButtonTitles:nil];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    78
    [alert show];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    79
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    80
    UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc]
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    81
                                          initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    82
    indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    83
    [indicator startAnimating];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    84
    [alert addSubview:indicator];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    85
    [indicator release];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    86
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    87
    // create default files (teams/weapons/scheme)
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    88
    createTeamNamed(@"Pirates");
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    89
    createTeamNamed(@"Ninjas");
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    90
    createWeaponNamed(@"Default");
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    91
    createSchemeNamed(@"Default");
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
    92
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    93
    // create settings.plist
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    94
    NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    95
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    96
    [saveDict setObject:@"" forKey:@"username"];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    97
    [saveDict setObject:@"" forKey:@"password"];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    98
    [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"music"];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    99
    [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"sound"];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   100
    [saveDict setObject:[NSNumber numberWithBool:NO] forKey:@"alternate"];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   101
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   102
    [saveDict writeToFile:SETTINGS_FILE() atomically:YES];
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
   103
    [saveDict release];
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
   104
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   105
    // ok let the user take control
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   106
    [alert dismissWithClickedButtonIndex:0 animated:YES];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   107
    [alert release];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   108
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   109
    [pool release];
3621
a8ddf681ba7d initial support for customizing weaponset
koda
parents: 3616
diff changeset
   110
a8ddf681ba7d initial support for customizing weaponset
koda
parents: 3616
diff changeset
   111
    // TODO: instead of this useless runtime initialization, check that all ammos remain compatible with engine
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   112
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   113
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   114
#pragma mark -
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   115
-(IBAction) switchViews:(id) sender {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   116
    UIButton *button = (UIButton *)sender;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   117
    UIAlertView *alert;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   118
    NSString *debugStr;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   119
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   120
    switch (button.tag) {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   121
        case 0:
3701
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   122
            if (nil == self.gameConfigViewController) {
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   123
                GameConfigViewController *gcvc = [[GameConfigViewController alloc] initWithNibName:@"GameConfigViewController" bundle:nil];
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   124
                self.gameConfigViewController = gcvc;
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   125
                [gcvc release];
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   126
            }
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   127
3701
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   128
            [self presentModalViewController:self.gameConfigViewController animated:YES];
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   129
            break;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   130
        case 2:
3701
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   131
            if (nil == self.settingsViewController) {
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   132
                SplitViewRootController *svrc = [[SplitViewRootController alloc] initWithNibName:nil bundle:nil];
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   133
                svrc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   134
                self.settingsViewController = svrc;
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   135
                [svrc release];
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   136
            }
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
   137
3701
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   138
            [self presentModalViewController:self.settingsViewController animated:YES];
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   139
            break;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   140
        case 3:
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   141
            if (nil == self.aboutViewController) {
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   142
                AboutViewController *about = [[AboutViewController alloc] initWithNibName:@"AboutViewController" bundle:nil];
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   143
                about.modalTransitionStyle = UIModalPresentationFormSheet;
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   144
                self.aboutViewController = about;
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   145
                [about release];
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   146
            }
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   147
            
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   148
            [self presentModalViewController:self.aboutViewController animated:YES];
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   149
            /*
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   150
            debugStr = [[NSString alloc] initWithContentsOfFile:DEBUG_FILE()];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   151
            UITextView *scroll = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   152
            scroll.text = debugStr;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   153
            [debugStr release];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   154
            scroll.editable = NO;
3697
d5b30d6373fc remove trailing spaces from end of line
koda
parents: 3667
diff changeset
   155
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   156
            UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   157
            [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   158
            btn.backgroundColor = [UIColor blackColor];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   159
            btn.frame = CGRectMake(self.view.frame.size.height-70, 0, 70, 70);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   160
            [scroll addSubview:btn];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   161
            [self.view addSubview:scroll];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   162
            [scroll release];
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   163
            */
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   164
            break;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   165
        default:
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   166
            alert = [[UIAlertView alloc] initWithTitle:@"Not Yet Implemented"
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   167
                                               message:@"Sorry, this feature is not yet implemented"
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   168
                                              delegate:nil
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   169
                                     cancelButtonTitle:@"Well, don't worry"
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   170
                                     otherButtonTitles:nil];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   171
            [alert show];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   172
            [alert release];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   173
            break;
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   174
    }
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   175
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   176
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   177
// allows child controllers to return to the main controller
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   178
-(void) dismissModalViewController {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   179
    [self dismissModalViewControllerAnimated:YES];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   180
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   181
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   182
-(void) viewDidUnload {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   183
    self.versionLabel = nil;
3701
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   184
    self.gameConfigViewController = nil;
8c449776ebe6 rewrite portions of some uiviewcontrollers
koda
parents: 3697
diff changeset
   185
    self.settingsViewController = nil;
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   186
    self.aboutViewController = nil;
3662
a44406f4369b polish polish polish polish (also: panning horizontal fix, panning momentum, settings page reworked yet again, memory leaks, crashes, segfaults)
koda
parents: 3660
diff changeset
   187
    MSG_DIDUNLOAD();
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   188
    [super viewDidUnload];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   189
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   190
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   191
-(void) dealloc {
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   192
    [versionLabel release];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   193
    [settingsViewController release];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   194
    [gameConfigViewController release];
3703
12d17c6e8855 halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents: 3701
diff changeset
   195
    [aboutViewController release];
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   196
    [super dealloc];
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   197
}
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   198
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
   199
@end