cocoaTouch/LevelViewController.m
author smxx
Mon, 19 Apr 2010 13:31:08 +0000
changeset 3359 d17b9f6adae5
parent 3352 ac5d14a35482
child 3374 0d522416d97f
permissions -rw-r--r--
Engine: * Let gears collide once they significantly leave visible area (might need more testing) * Added skipping sound to gears skipping on water surface Frontend: * Fixed loading/saving of control bindings
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
     1
//
3352
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
     2
//  LevelViewController.m
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
     3
//  HedgewarsMobile
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
     4
//
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
     5
//  Created by Vittorio on 02/04/10.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
     7
//
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
     8
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
     9
#import "LevelViewController.h"
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    10
#import "CommodityFunctions.h"
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    11
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    12
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    13
@implementation LevelViewController
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    14
@synthesize teamDictionary, levelArray, levelSprites, lastIndexPath;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    15
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    16
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    17
-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    18
	return rotationManager(interfaceOrientation);
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    19
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    20
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    21
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    22
#pragma mark -
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    23
#pragma mark View lifecycle
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    24
- (void)viewDidLoad {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    25
    [super viewDidLoad];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    26
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    27
    NSArray *array = [[NSArray alloc] initWithObjects:
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
    28
                      NSLocalizedString(@"Human",@""),
3352
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    29
                      NSLocalizedString(@"Brutal",@""),
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    30
                      NSLocalizedString(@"Aggressive",@""),
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    31
                      NSLocalizedString(@"Bully",@""),
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
    32
                      NSLocalizedString(@"Average",@""),
3352
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    33
                      NSLocalizedString(@"Weaky",@""),
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    34
                      nil];
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    35
    self.levelArray = array;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    36
    [array release];
3352
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    37
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    38
    NSMutableArray *sprites = [[NSMutableArray alloc] initWithCapacity:[levelArray count]];
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    39
    for (int i = 0; i < [levelArray count]; i++) {
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    40
        NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/%d.png",BOTLEVELS_DIRECTORY(),i];
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    41
        UIImage *image = [[UIImage alloc] initWithContentsOfFile:botlevelPath];
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    42
        [botlevelPath release];
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    43
        [sprites addObject:image];
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    44
        [image release];
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    45
    }
3352
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    46
    self.levelSprites = sprites;
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    47
    [sprites release];
3352
ac5d14a35482 complete previews on the team settings
koda
parents: 3340
diff changeset
    48
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    49
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    50
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    51
- (void)viewWillAppear:(BOOL)animated {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    52
    [super viewWillAppear:animated];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    53
    
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    54
    // this moves the tableview to the top
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    55
    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    56
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    57
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    58
/*
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    59
- (void)viewDidAppear:(BOOL)animated {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    60
    [super viewDidAppear:animated];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    61
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    62
*/
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    63
/*
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    64
- (void)viewWillDisappear:(BOOL)animated {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    65
    [super viewWillDisappear:animated];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    66
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    67
*/
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    68
/*
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    69
- (void)viewDidDisappear:(BOOL)animated {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    70
    [super viewDidDisappear:animated];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    71
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    72
*/
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    73
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    74
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    75
#pragma mark -
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    76
#pragma mark Table view data source
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    77
-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    78
    return 1;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    79
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    80
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    81
-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    82
    return [self.levelArray count];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    83
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    84
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    85
// Customize the appearance of table view cells.
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
    86
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    87
    static NSString *CellIdentifier = @"Cell";
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    88
    
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
    89
    NSInteger row = [indexPath row];
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    90
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    91
    if (cell == nil) {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    92
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    93
    }
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    94
    
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
    95
    cell.textLabel.text = [levelArray objectAtIndex:row];
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
    96
    NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0];
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
    97
    if ([[hog objectForKey:@"level"] intValue] == row) {
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    98
        cell.accessoryType = UITableViewCellAccessoryCheckmark;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
    99
        self.lastIndexPath = indexPath;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   100
    } else {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   101
        cell.accessoryType = UITableViewCellAccessoryNone;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   102
    }
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   103
    
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   104
    cell.imageView.image = [levelSprites objectAtIndex:row];
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   105
    return cell;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   106
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   107
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   108
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   109
/*
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   110
// Override to support conditional editing of the table view.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   111
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   112
    // Return NO if you do not want the specified item to be editable.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   113
    return YES;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   114
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   115
*/
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   116
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   117
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   118
/*
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   119
// Override to support editing the table view.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   120
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   121
    
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   122
    if (editingStyle == UITableViewCellEditingStyleDelete) {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   123
        // Delete the row from the data source
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   124
        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   125
    }   
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   126
    else if (editingStyle == UITableViewCellEditingStyleInsert) {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   127
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   128
    }   
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   129
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   130
*/
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   131
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   132
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   133
/*
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   134
// Override to support rearranging the table view.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   135
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   136
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   137
*/
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   138
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   139
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   140
/*
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   141
// Override to support conditional rearranging of the table view.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   142
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   143
    // Return NO if you do not want the item to be re-orderable.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   144
    return YES;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   145
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   146
*/
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   147
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   148
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   149
#pragma mark -
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   150
#pragma mark Table view delegate
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   151
- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   152
    int newRow = [indexPath row];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   153
    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   154
    
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   155
    if (newRow != oldRow) {
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   156
        NSMutableArray *hogs = [teamDictionary objectForKey:@"hedgehogs"];
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   157
        
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   158
        for (NSMutableDictionary *hog in hogs) {
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   159
            [hog setObject:[NSNumber numberWithInt:newRow] forKey:@"level"];
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   160
        }
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   161
        
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   162
        // tell our boss to write this new stuff on disk
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   163
        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   164
        [self.tableView reloadData];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   165
        
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   166
        self.lastIndexPath = indexPath;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   167
        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   168
    }
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   169
    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   170
    [self.navigationController popViewControllerAnimated:YES];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   171
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   172
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   173
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   174
#pragma mark -
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   175
#pragma mark Memory management
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   176
-(void) didReceiveMemoryWarning {
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   177
    // Releases the view if it doesn't have a superview.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   178
    [super didReceiveMemoryWarning];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   179
    // Relinquish ownership any cached data, images, etc that aren't in use.
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   180
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   181
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   182
-(void) viewDidUnload {
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   183
    [super viewDidUnload];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   184
    self.lastIndexPath = nil;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   185
    self.teamDictionary = nil;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   186
    self.levelArray = nil;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   187
    self.levelSprites = nil;
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   188
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   189
3340
96dd168b080b fix all of what was committed before
koda
parents: 3339
diff changeset
   190
-(void) dealloc {
3339
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   191
    [levelArray release];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   192
    [levelSprites release];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   193
    [teamDictionary release];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   194
    [lastIndexPath release];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   195
    [super dealloc];
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   196
}
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   197
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   198
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   199
@end
d558bc5a73c5 lots of untested stuff for the ifrontend
koda
parents:
diff changeset
   200