lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
authorkoda
Thu, 29 Apr 2010 17:19:06 +0000
changeset 3374 0d522416d97f
parent 3373 c1ff724a5c34
child 3375 88bb88294e06
lazy loading for all the tables with images (might affect performance but ui feels much more responsive) code rearranged a little game configuration for ipad
cocoaTouch/DetailViewController.m
cocoaTouch/FlagsViewController.h
cocoaTouch/FlagsViewController.m
cocoaTouch/FortsViewController.h
cocoaTouch/FortsViewController.m
cocoaTouch/GameConfigViewController.h
cocoaTouch/GameConfigViewController.m
cocoaTouch/GravesViewController.h
cocoaTouch/GravesViewController.m
cocoaTouch/HogHatViewController.h
cocoaTouch/HogHatViewController.m
cocoaTouch/LevelViewController.m
cocoaTouch/MainMenuViewController.m
cocoaTouch/MapConfigViewController.m
cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h
cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m
cocoaTouch/SingleTeamViewController.h
cocoaTouch/SingleTeamViewController.m
cocoaTouch/SplitViewRootController.h
cocoaTouch/SplitViewRootController.m
cocoaTouch/TeamConfigViewController.h
cocoaTouch/TeamConfigViewController.m
cocoaTouch/otherSrc/CommodityFunctions.h
cocoaTouch/xib/GameConfigViewController-iPad.xib
cocoaTouch/xib/MapConfigViewController-iPad.xib
project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj
project_files/HedgewarsMobile/Info.plist
--- a/cocoaTouch/DetailViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/DetailViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -44,7 +44,6 @@
         [self.view addSubview:label];
         [label release];
         
-        
         //[self.navigationController pushViewController:nextController animated:NO];
     } else {
         self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
--- a/cocoaTouch/FlagsViewController.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/FlagsViewController.h	Thu Apr 29 17:19:06 2010 +0000
@@ -12,14 +12,12 @@
 @interface FlagsViewController : UITableViewController {
     NSDictionary *teamDictionary;
 
-    NSArray *flagArray;
-    NSArray *flagSprites;
-    
+    NSArray *flagArray;    
     NSIndexPath *lastIndexPath;
 }
 
 @property (nonatomic,retain) NSDictionary * teamDictionary;
 @property (nonatomic,retain) NSArray *flagArray;
-@property (nonatomic,retain) NSArray *flagSprites;
 @property (nonatomic,retain) NSIndexPath *lastIndexPath;
+
 @end
--- a/cocoaTouch/FlagsViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/FlagsViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -10,7 +10,7 @@
 #import "CommodityFunctions.h"
 
 @implementation FlagsViewController
-@synthesize teamDictionary, flagArray, flagSprites, lastIndexPath;
+@synthesize teamDictionary, flagArray, lastIndexPath;
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
@@ -20,60 +20,31 @@
 
 #pragma mark -
 #pragma mark View lifecycle
-- (void)viewDidLoad {
+-(void) viewDidLoad {
     [super viewDidLoad];
 
-    NSString *flagsDirectory = FLAGS_DIRECTORY();
-    NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:flagsDirectory error:NULL];
-    self.flagArray = array;
-    
-    NSMutableArray *spriteArray = [[NSMutableArray alloc] initWithCapacity:[flagArray count]];
-    for (NSString *flagName in flagArray) {
-        NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", flagsDirectory, flagName];
-        UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile];
-        [flagFile release];
-        [spriteArray addObject:flagSprite];
-        [flagSprite release];
-    }
-    self.flagSprites = spriteArray;
-    [spriteArray release];
+    self.flagArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FLAGS_DIRECTORY() error:NULL];
 }
 
-- (void)viewWillAppear:(BOOL)animated {
+-(void) viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     [self.tableView reloadData];
     [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
 }
 
-/*
-- (void)viewDidAppear:(BOOL)animated {
-    [super viewDidAppear:animated];
-}
-*/
-/*
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-}
-*/
-/*
-- (void)viewDidDisappear:(BOOL)animated {
-    [super viewDidDisappear:animated];
-}
-*/
-
 
 #pragma mark -
 #pragma mark Table view data source
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
     return 1;
 }
 
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     return [flagArray count];
 }
 
 // Customize the appearance of table view cells.
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     
     static NSString *CellIdentifier = @"Cell";
     
@@ -82,8 +53,15 @@
         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
     }
     
-    cell.imageView.image = [flagSprites objectAtIndex:[indexPath row]];
-    cell.textLabel.text = [[flagArray objectAtIndex:[indexPath row]] stringByDeletingPathExtension];
+    NSString *flag = [flagArray objectAtIndex:[indexPath row]];
+    
+    NSString *flagFile = [[NSString alloc] initWithFormat:@"%@/%@", FLAGS_DIRECTORY(), flag];
+    UIImage *flagSprite = [[UIImage alloc] initWithContentsOfFile:flagFile];
+    [flagFile release];
+    cell.imageView.image = flagSprite;
+    [flagSprite release];
+    
+    cell.textLabel.text = [flag stringByDeletingPathExtension];
     if ([cell.textLabel.text isEqualToString:[self.teamDictionary objectForKey:@"flag"]]) {
         cell.accessoryType = UITableViewCellAccessoryCheckmark;
         self.lastIndexPath = indexPath;
@@ -95,49 +73,9 @@
 }
 
 
-/*
-// Override to support conditional editing of the table view.
-- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the specified item to be editable.
-    return YES;
-}
-*/
-
-
-/*
-// Override to support editing the table view.
-- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    if (editingStyle == UITableViewCellEditingStyleDelete) {
-        // Delete the row from the data source
-        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
-    }   
-    else if (editingStyle == UITableViewCellEditingStyleInsert) {
-        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
-    }   
-}
-*/
-
-
-/*
-// Override to support rearranging the table view.
-- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
-}
-*/
-
-
-/*
-// Override to support conditional rearranging of the table view.
-- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the item to be re-orderable.
-    return YES;
-}
-*/
-
-
 #pragma mark -
 #pragma mark Table view delegate
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     int newRow = [indexPath row];
     int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
     
@@ -147,38 +85,38 @@
 
         // tell our boss to write this new stuff on disk
         [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        [self.tableView reloadData];
 
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
         self.lastIndexPath = indexPath;
-        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
     }
-    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
     [self.navigationController popViewControllerAnimated:YES];
 }
 
 
 #pragma mark -
 #pragma mark Memory management
-- (void)didReceiveMemoryWarning {
+-(void) didReceiveMemoryWarning {
     // Releases the view if it doesn't have a superview.
     [super didReceiveMemoryWarning];
     // Relinquish ownership any cached data, images, etc that aren't in use.
 }
 
-- (void)viewDidUnload {
+-(void) viewDidUnload {
     self.teamDictionary = nil;
     self.lastIndexPath = nil;
     self.flagArray = nil;
-    self.flagSprites = nil;
     [super viewDidUnload];
 }
 
-
-- (void)dealloc {
+-(void) dealloc {
     [teamDictionary release];
     [lastIndexPath release];
     [flagArray release];
-    [flagSprites release];
     [super dealloc];
 }
 
--- a/cocoaTouch/FortsViewController.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/FortsViewController.h	Thu Apr 29 17:19:06 2010 +0000
@@ -13,13 +13,12 @@
     NSDictionary *teamDictionary;
 
     NSArray *fortArray;
-    NSArray *fortSprites;
-    
+//    NSArray *fortSprites;
     NSIndexPath *lastIndexPath;
 }
 
 @property (nonatomic,retain) NSDictionary * teamDictionary;
 @property (nonatomic,retain) NSArray *fortArray;
-@property (nonatomic,retain) NSArray *fortSprites;
+//@property (nonatomic,retain) NSArray *fortSprites;
 @property (nonatomic,retain) NSIndexPath *lastIndexPath;
 @end
--- a/cocoaTouch/FortsViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/FortsViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -11,7 +11,7 @@
 #import "UIImageExtra.h"
 
 @implementation FortsViewController
-@synthesize teamDictionary, fortArray, fortSprites, lastIndexPath;
+@synthesize teamDictionary, fortArray, lastIndexPath;
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
@@ -21,11 +21,10 @@
 
 #pragma mark -
 #pragma mark View lifecycle
-- (void)viewDidLoad {
+-(void) viewDidLoad {
     [super viewDidLoad];
 
-    NSString *fortsDirectory = FORTS_DIRECTORY();
-    NSArray *directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath: fortsDirectory error:NULL];
+    NSArray *directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FORTS_DIRECTORY() error:NULL];
     NSMutableArray *filteredContents = [[NSMutableArray alloc] initWithCapacity:([directoryContents count] / 2)];
     // we need to remove the double entries and the L.png suffix
     for (int i = 0; i < [directoryContents count]; i++) {
@@ -35,12 +34,10 @@
             [filteredContents addObject:correctName];
         } 
     }
-    
     self.fortArray = filteredContents;
     [filteredContents release];
     
-    //NSLog(@"%@",fortArray);
-    
+    /*
     // this creates a scaled down version of the image
     NSMutableArray *spriteArray = [[NSMutableArray alloc] initWithCapacity:[fortArray count]];
     for (NSString *fortName in fortArray) {
@@ -52,6 +49,7 @@
     }
     self.fortSprites = spriteArray;
     [spriteArray release];
+    */
     
     // statically set row height instead of using delegate method for performance reasons
     self.tableView.rowHeight = 200;
@@ -64,36 +62,19 @@
     [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
 }
 
-/*
-- (void)viewDidAppear:(BOOL)animated {
-    [super viewDidAppear:animated];
-}
-*/
-/*
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-}
-*/
-/*
-- (void)viewDidDisappear:(BOOL)animated {
-    [super viewDidDisappear:animated];
-}
-*/
-
 
 #pragma mark -
 #pragma mark Table view data source
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
     return 1;
 }
 
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [fortArray count];
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self.fortArray count];
 }
 
 // Customize the appearance of table view cells.
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     static NSString *CellIdentifier = @"Cell";
     
     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
@@ -102,8 +83,17 @@
                                        reuseIdentifier:CellIdentifier] autorelease];
     }
     
-    cell.imageView.image = [fortSprites objectAtIndex:[indexPath row]];
-    cell.textLabel.text = [fortArray objectAtIndex:[indexPath row]];
+    NSString *fortName = [fortArray objectAtIndex:[indexPath row]];
+    cell.textLabel.text = fortName;
+    
+    // this creates a scaled down version of the image
+    // TODO: create preview files, scaling is way too slow!
+    NSString *fortFile = [[NSString alloc] initWithFormat:@"%@/%@L.png", FORTS_DIRECTORY(), fortName];
+    UIImage *fortSprite = [[UIImage alloc] initWithContentsOfFile:fortFile];
+    [fortFile release];
+    cell.imageView.image = [fortSprite scaleToSize:CGSizeMake(196,196)];
+    [fortSprite release];
+    
     cell.detailTextLabel.text = @"Insert funny description here";
     if ([cell.textLabel.text isEqualToString:[self.teamDictionary objectForKey:@"fort"]]) {
         cell.accessoryType = UITableViewCellAccessoryCheckmark;
@@ -116,49 +106,9 @@
 }
 
 
-/*
-// Override to support conditional editing of the table view.
-- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the specified item to be editable.
-    return YES;
-}
-*/
-
-
-/*
-// Override to support editing the table view.
-- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    if (editingStyle == UITableViewCellEditingStyleDelete) {
-        // Delete the row from the data source
-        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
-    }   
-    else if (editingStyle == UITableViewCellEditingStyleInsert) {
-        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
-    }   
-}
-*/
-
-
-/*
-// Override to support rearranging the table view.
-- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
-}
-*/
-
-
-/*
-// Override to support conditional rearranging of the table view.
-- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the item to be re-orderable.
-    return YES;
-}
-*/
-
-
 #pragma mark -
 #pragma mark Table view delegate
--(void) tableView:(UITableView *)atableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     int newRow = [indexPath row];
     int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
     
@@ -168,12 +118,15 @@
 
         // tell our boss to write this new stuff on disk
         [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        [self.tableView reloadData];
-
+        
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
         self.lastIndexPath = indexPath;
-        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
     }
-    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
     [self.navigationController popViewControllerAnimated:YES];
 }
 
@@ -190,7 +143,7 @@
     self.teamDictionary = nil;
     self.lastIndexPath = nil;
     self.fortArray = nil;
-    self.fortSprites = nil;
+//    self.fortSprites = nil;
     [super viewDidUnload];
 }
 
@@ -199,7 +152,7 @@
     [teamDictionary release];
     [lastIndexPath release];
     [fortArray release];
-    [fortSprites release];
+//    [fortSprites release];
     [super dealloc];
 }
 
--- a/cocoaTouch/GameConfigViewController.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/GameConfigViewController.h	Thu Apr 29 17:19:06 2010 +0000
@@ -11,25 +11,12 @@
 @class TeamConfigViewController;
 @class MapConfigViewController;
 
-@interface GameConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
-    UITableView *availableTeamsTableView;
-    UIButton *mapButton;
-    UIButton *randomButton;
-    UIButton *weaponsButton;
-    UIButton *schemesButton;
-    UIBarButtonItem *startButton;
-    
+@interface GameConfigViewController : UIViewController {    
     UIViewController *activeController;
     MapConfigViewController *mapConfigViewController;
     TeamConfigViewController *teamConfigViewController;
 }
 
-@property (nonatomic,retain) IBOutlet UITableView *availableTeamsTableView;
-@property (nonatomic,retain) IBOutlet UIButton *weaponsButton;
-@property (nonatomic,retain) IBOutlet UIButton *schemesButton;
-@property (nonatomic,retain) IBOutlet UIButton *mapButton;
-@property (nonatomic,retain) IBOutlet UIButton *randomButton;
-@property (nonatomic,retain) IBOutlet UIBarButtonItem *startButton;
 
 -(IBAction) buttonPressed:(id) sender;
 -(IBAction) segmentPressed:(id) sender;
--- a/cocoaTouch/GameConfigViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/GameConfigViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -13,7 +13,6 @@
 #import "TeamConfigViewController.h"
 
 @implementation GameConfigViewController
-@synthesize availableTeamsTableView, weaponsButton, schemesButton, mapButton, randomButton, startButton;
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@@ -105,7 +104,14 @@
 }
 
 -(void) viewDidLoad {
-    mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+        mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil];
+        teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStylePlain];
+        teamConfigViewController.view.frame = CGRectMake(0, 224, 300, 500);
+        teamConfigViewController.view.backgroundColor = [UIColor clearColor];
+        [mapConfigViewController.view addSubview:teamConfigViewController.view];
+    } else
+        mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
     activeController = mapConfigViewController;
     
     [self.view addSubview:mapConfigViewController.view];
@@ -139,12 +145,6 @@
     activeController = nil;
     mapConfigViewController = nil;
     teamConfigViewController = nil;
-    self.availableTeamsTableView = nil;
-    self.weaponsButton = nil;
-    self.schemesButton = nil;
-    self.mapButton = nil;
-    self.randomButton = nil;
-    self.startButton = nil;
     [super viewDidUnload];
 }
 
@@ -153,12 +153,6 @@
     [activeController release];
     [mapConfigViewController release];
     [teamConfigViewController release];
-    [availableTeamsTableView release];
-    [weaponsButton release];
-    [schemesButton release];
-    [mapButton release];
-    [randomButton release];
-    [startButton release];
     [super dealloc];
 }
 
--- a/cocoaTouch/GravesViewController.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/GravesViewController.h	Thu Apr 29 17:19:06 2010 +0000
@@ -13,13 +13,11 @@
     NSMutableDictionary *teamDictionary;
     
     NSArray *graveArray;
-    NSArray *graveSprites;
     NSIndexPath *lastIndexPath;
 }
 
 @property (nonatomic,retain) NSMutableDictionary *teamDictionary;
 @property (nonatomic,retain) NSArray *graveArray;
-@property (nonatomic,retain) NSArray *graveSprites;
 @property (nonatomic,retain) NSIndexPath *lastIndexPath;
 
 @end
--- a/cocoaTouch/GravesViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/GravesViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -11,7 +11,7 @@
 #import "UIImageExtra.h"
 
 @implementation GravesViewController
-@synthesize teamDictionary, graveArray, graveSprites, lastIndexPath;
+@synthesize teamDictionary, graveArray, lastIndexPath;
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
@@ -21,50 +21,20 @@
 
 #pragma mark -
 #pragma mark View lifecycle
-- (void)viewDidLoad {
+-(void) viewDidLoad {
     [super viewDidLoad];
 
-    // load all the voices names and store them into voiceArray
-    NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:GRAVES_DIRECTORY() error:NULL];
-    self.graveArray = array;
-    
-    NSMutableArray *sprites = [[NSMutableArray alloc] initWithCapacity:[graveArray count]];
-    for (NSString *graveName in graveArray) {
-        NSString *gravePath = [[NSString alloc] initWithFormat:@"%@/%@",GRAVES_DIRECTORY(),graveName];
-        // because we also have multi frame graves, let's take the first one only
-        UIImage *graveSprite = [[UIImage alloc] initWithContentsOfFile:gravePath andCutAt:CGRectMake(0, 0, 32, 32)];
-        [gravePath release];        
-
-        [sprites addObject:graveSprite];
-        [graveSprite release];
-    }
-    self.graveSprites = sprites;
-    [sprites release];
+    // load all the grave names and store them into graveArray
+    self.graveArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:GRAVES_DIRECTORY() error:NULL];
 }
 
-- (void)viewWillAppear:(BOOL)animated {
+-(void) viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
-    
+    [self.tableView reloadData];
     // this moves the tableview to the top
     [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
 }
 
-/*
-- (void)viewDidAppear:(BOOL)animated {
-    [super viewDidAppear:animated];
-}
-*/
-/*
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-}
-*/
-/*
-- (void)viewDidDisappear:(BOOL)animated {
-    [super viewDidDisappear:animated];
-}
-*/
-
 
 #pragma mark -
 #pragma mark Table view data source
@@ -77,7 +47,7 @@
 }
 
 // Customize the appearance of table view cells.
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     
     static NSString *CellIdentifier = @"Cell";
     
@@ -85,8 +55,8 @@
     if (cell == nil)
         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
     
-    NSString *grave = [[graveArray objectAtIndex:[indexPath row]] stringByDeletingPathExtension];
-    cell.textLabel.text = grave;
+    NSString *grave = [graveArray objectAtIndex:[indexPath row]];
+    cell.textLabel.text = [grave stringByDeletingPathExtension];
     
     if ([grave isEqualToString:[teamDictionary objectForKey:@"grave"]]) {
         cell.accessoryType = UITableViewCellAccessoryCheckmark;
@@ -94,52 +64,18 @@
     } else {
         cell.accessoryType = UITableViewCellAccessoryNone;
     }
+
+    NSString *graveFilePath = [[NSString alloc] initWithFormat:@"%@/%@",GRAVES_DIRECTORY(),grave];
+    // because we also have multi frame graves, let's take the first one only
+    UIImage *graveSprite = [[UIImage alloc] initWithContentsOfFile:graveFilePath andCutAt:CGRectMake(0, 0, 32, 32)];
+    [graveFilePath release];        
+    cell.imageView.image = graveSprite;
+    [graveSprite release];
     
-    cell.imageView.image = [graveSprites objectAtIndex:[indexPath row]];
     return cell;
 }
 
 
-/*
-// Override to support conditional editing of the table view.
-- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the specified item to be editable.
-    return YES;
-}
-*/
-
-
-/*
-// Override to support editing the table view.
-- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    if (editingStyle == UITableViewCellEditingStyleDelete) {
-        // Delete the row from the data source
-        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
-    }   
-    else if (editingStyle == UITableViewCellEditingStyleInsert) {
-        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
-    }   
-}
-*/
-
-
-/*
-// Override to support rearranging the table view.
-- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
-}
-*/
-
-
-/*
-// Override to support conditional rearranging of the table view.
-- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the item to be re-orderable.
-    return YES;
-}
-*/
-
-
 #pragma mark -
 #pragma mark Table view delegate
 -(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -151,12 +87,15 @@
         
         // tell our boss to write this new stuff on disk
         [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        [self.tableView reloadData];
         
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
         self.lastIndexPath = indexPath;
-        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
     }
-    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
     [self.navigationController popViewControllerAnimated:YES];
 }
 
@@ -174,11 +113,9 @@
     self.lastIndexPath = nil;
     self.teamDictionary = nil;
     self.graveArray = nil;
-    self.graveSprites = nil;
 }
 
 - (void)dealloc {
-    [graveSprites release];
     [graveArray release];
     [teamDictionary release];
     [lastIndexPath release];
--- a/cocoaTouch/HogHatViewController.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/HogHatViewController.h	Thu Apr 29 17:19:06 2010 +0000
@@ -14,14 +14,14 @@
     NSInteger selectedHog;
     
     NSArray *hatArray;
-    NSArray *hatSprites;
+    UIImage *normalHogSprite;
     NSIndexPath *lastIndexPath;
 }
 
 @property (nonatomic,retain) NSDictionary *teamDictionary;
 @property (nonatomic) NSInteger selectedHog;
 @property (nonatomic,retain) NSArray *hatArray;
-@property (nonatomic,retain) NSArray *hatSprites;
+@property (nonatomic,retain) UIImage *normalHogSprite;
 @property (nonatomic,retain) NSIndexPath *lastIndexPath;
 
 @end
--- a/cocoaTouch/HogHatViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/HogHatViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -11,7 +11,7 @@
 #import "UIImageExtra.h"
 
 @implementation HogHatViewController
-@synthesize teamDictionary, hatArray, hatSprites, lastIndexPath, selectedHog;
+@synthesize teamDictionary, hatArray, normalHogSprite, lastIndexPath, selectedHog;
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
@@ -29,22 +29,12 @@
     NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:hatsDirectory error:NULL];
     self.hatArray = array;
     
+    // load the base hog image, drawing will occure in cellForRow...
     NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
-    UIImage *normalHogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
+    UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
     [normalHogFile release];
-    
-    // load all the hat images from the previous array but save only the first sprite and store it in hatSprites
-    NSMutableArray *spriteArray = [[NSMutableArray alloc] initWithCapacity:[hatArray count]];
-    for (NSString *hat in hatArray) {
-        NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/%@", hatsDirectory,hat];
-        UIImage *hatSprite = [[UIImage alloc] initWithContentsOfFile: hatFile andCutAt:CGRectMake(0, 0, 32, 32)];
-        [hatFile release];
-        [spriteArray addObject:[normalHogSprite mergeWith:hatSprite atPoint:CGPointMake(0, -5)]];
-        [hatSprite release];
-    }
-    [normalHogSprite release];
-    self.hatSprites = spriteArray;
-    [spriteArray release];
+    self.normalHogSprite = hogSprite;
+    [hogSprite release];
 }
 
 - (void)viewWillAppear:(BOOL)animated {
@@ -57,22 +47,6 @@
     [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
 }
 
-/*
-- (void)viewDidAppear:(BOOL)animated {
-    [super viewDidAppear:animated];
-}
-*/
-/*
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-}
-*/
-/*
-- (void)viewDidDisappear:(BOOL)animated {
-    [super viewDidDisappear:animated];
-}
-*/
-
 
 #pragma mark -
 #pragma mark Table view data source
@@ -90,16 +64,19 @@
     static NSString *CellIdentifier = @"Cell";
     
     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
+    if (cell == nil) 
         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    }
     
     NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog];
+    NSString *hat = [hatArray objectAtIndex:[indexPath row]];
+    cell.textLabel.text = [hat stringByDeletingPathExtension];
     
-    NSString *hat = [[hatArray objectAtIndex:[indexPath row]] stringByDeletingPathExtension];
-    cell.textLabel.text = hat;
-    cell.imageView.image = [hatSprites objectAtIndex:[indexPath row]];
-    
+    NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/%@", HATS_DIRECTORY(), hat];
+    UIImage *hatSprite = [[UIImage alloc] initWithContentsOfFile: hatFile andCutAt:CGRectMake(0, 0, 32, 32)];
+    [hatFile release];
+    cell.imageView.image = [self.normalHogSprite mergeWith:hatSprite atPoint:CGPointMake(0, -5)];
+    [hatSprite release];
+        
     if ([hat isEqualToString:[hog objectForKey:@"hat"]]) {
         cell.accessoryType = UITableViewCellAccessoryCheckmark;
         self.lastIndexPath = indexPath;
@@ -111,46 +88,6 @@
 }
 
 
-/*
-// Override to support conditional editing of the table view.
-- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the specified item to be editable.
-    return YES;
-}
-*/
-
-
-/*
-// Override to support editing the table view.
-- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    if (editingStyle == UITableViewCellEditingStyleDelete) {
-        // Delete the row from the data source
-        [tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:YES];
-    }   
-    else if (editingStyle == UITableViewCellEditingStyleInsert) {
-        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
-    }   
-}
-*/
-
-
-/*
-// Override to support rearranging the table view.
-- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
-}
-*/
-
-
-/*
-// Override to support conditional rearranging of the table view.
-- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Return NO if you do not want the item to be re-orderable.
-    return YES;
-}
-*/
-
-
 #pragma mark -
 #pragma mark Table view delegate
 - (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
@@ -159,7 +96,7 @@
     
     if (newRow != oldRow) {
         // if the two selected rows differ update data on the hog dictionary and reload table content
-	// TODO: maybe this section could be cleaned up
+        // TODO: maybe this section could be cleaned up
         NSDictionary *oldHog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog];
         
         NSMutableDictionary *newHog = [[NSMutableDictionary alloc] initWithDictionary: oldHog];
@@ -169,12 +106,15 @@
         
         // tell our boss to write this new stuff on disk
         [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        [self.tableView reloadData];
         
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
         self.lastIndexPath = indexPath;
-        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
     } 
-    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
     [self.navigationController popViewControllerAnimated:YES];
 }
 
@@ -190,7 +130,7 @@
 - (void)viewDidUnload {
     [super viewDidUnload];
     self.lastIndexPath = nil;
-    self.hatSprites = nil;
+    self.normalHogSprite = nil;
     self.teamDictionary = nil;
     self.hatArray = nil;
 }
@@ -198,7 +138,7 @@
 - (void)dealloc {
     [hatArray release];
     [teamDictionary release];
-    [hatSprites release];
+    [normalHogSprite release];
     [lastIndexPath release];
     [super dealloc];
 }
--- a/cocoaTouch/LevelViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/LevelViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -34,44 +34,15 @@
                       nil];
     self.levelArray = array;
     [array release];
-
-    NSMutableArray *sprites = [[NSMutableArray alloc] initWithCapacity:[levelArray count]];
-    for (int i = 0; i < [levelArray count]; i++) {
-        NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/%d.png",BOTLEVELS_DIRECTORY(),i];
-        UIImage *image = [[UIImage alloc] initWithContentsOfFile:botlevelPath];
-        [botlevelPath release];
-        [sprites addObject:image];
-        [image release];
-    }
-    self.levelSprites = sprites;
-    [sprites release];
-
 }
 
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
-    
+    [self.tableView reloadData];
     // this moves the tableview to the top
     [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
 }
 
-/*
-- (void)viewDidAppear:(BOOL)animated {
-    [super viewDidAppear:animated];
-}
-*/
-/*
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-}
-*/
-/*
-- (void)viewDidDisappear:(BOOL)animated {
-    [super viewDidDisappear:animated];
-}
-*/
-
-
 #pragma mark -
 #pragma mark Table view data source
 -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
@@ -101,7 +72,12 @@
         cell.accessoryType = UITableViewCellAccessoryNone;
     }
     
-    cell.imageView.image = [levelSprites objectAtIndex:row];
+    NSString *botlevelPath = [[NSString alloc] initWithFormat:@"%@/%d.png",BOTLEVELS_DIRECTORY(),row];
+    UIImage *levelImage = [[UIImage alloc] initWithContentsOfFile:botlevelPath];
+    [botlevelPath release];
+    cell.imageView.image = levelImage;
+    [levelImage release];
+
     return cell;
 }
 
--- a/cocoaTouch/MainMenuViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/MainMenuViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -131,7 +131,7 @@
     
     switch (button.tag) {
         case 0:
-            if (nil == gameConfigViewController) {
+            if (1) { // bug in UIModalTransitionStylePartialCurl?
                 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
                     configNibName = @"GameConfigViewController-iPad";
                 else
@@ -145,7 +145,7 @@
 #endif
             }
             
-            [self presentModalViewController:gameConfigViewController animated:YES];    
+            [self presentModalViewController:gameConfigViewController animated:YES];
             break;
         case 2:
             if (nil == splitRootViewController) {
--- a/cocoaTouch/MapConfigViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/MapConfigViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -35,10 +35,8 @@
 
 -(void) engineProtocol:(NSInteger) port {
 	IPaddress ip;
-	BOOL clientQuit, serverQuit;
-
-    serverQuit = NO;
-    clientQuit =NO;
+	BOOL serverQuit = NO;
+    
 	if (SDLNet_Init() < 0) {
 		NSLog(@"SDLNet_Init: %s", SDLNet_GetError());
         serverQuit = YES;
@@ -94,7 +92,7 @@
 
     // draw the buffer (1 pixel per component, 0= transparent 1= color)
     int xc = 0;
-    int yc = 0;
+    int yc = -1;
     UIGraphicsBeginImageContext(CGSizeMake(256,128));      
     CGContextRef context = UIGraphicsGetCurrentContext();       
     UIGraphicsPushContext(context);  
@@ -407,14 +405,15 @@
     self.mapGenCommand = mapgen;
     [self updatePreview];
     
-    // nice animation for updating the table when needed
-    if (((oldPage == 0 || oldPage == 2) && newPage == 1) ||
-        (oldPage == 1 && (newPage == 0 || newPage == 2))) {
-        [UIView beginAnimations:@"moving out table" context:NULL];
-        self.tableView.frame = CGRectMake(480, 0, 185, 276);
-        [UIView commitAnimations];
-        [self performSelector:@selector(moveTable) withObject:nil afterDelay:0.2];
-    }
+    // nice animation for updating the table when appropriate (on iphone)
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
+        if (((oldPage == 0 || oldPage == 2) && newPage == 1) ||
+            (oldPage == 1 && (newPage == 0 || newPage == 2))) {
+            [UIView beginAnimations:@"moving out table" context:NULL];
+            self.tableView.frame = CGRectMake(480, 0, 185, 276);
+            [UIView commitAnimations];
+            [self performSelector:@selector(moveTable) withObject:nil afterDelay:0.2];
+        }
     oldPage = newPage;
 }
 
@@ -457,6 +456,7 @@
     self.templateFilterCommand = @"e$template_filter 0";
     self.mazeSizeCommand = @"e$maze_size 0";
     self.mapGenCommand = @"e$mapgen 0";
+    self.lastIndexPath = [NSIndexPath indexPathForRow:0 inSection:0];
     
     oldValue = 5;
     oldPage = 0;
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h	Thu Apr 29 17:19:06 2010 +0000
@@ -42,13 +42,3 @@
 
 @end
 
-#ifndef __IPHONE_3_2	// if iPhoneOS is 3.2 or greater then __IPHONE_3_2 will be defined
-
-typedef enum {
-    UIUserInterfaceIdiomPhone,           // iPhone and iPod touch style UI
-    UIUserInterfaceIdiomPad,             // iPad style UI
-} UIUserInterfaceIdiom;
-
-#define UI_USER_INTERFACE_IDIOM() UIUserInterfaceIdiomPhone
-
-#endif // ifndef __IPHONE_3_2
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Thu Apr 29 17:19:06 2010 +0000
@@ -30,6 +30,7 @@
 #import "PascalImports.h"
 #import "MainMenuViewController.h"
 #import "OverlayViewController.h"
+#import "CommodityFunctions.h"
 
 #ifdef main
 #undef main
@@ -121,7 +122,7 @@
     else
         viewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPhone" bundle:nil];
 	[uiwindow addSubview:viewController.view];
-	
+    
 	// Set working directory to resource path
 	[[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];
 
--- a/cocoaTouch/SingleTeamViewController.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/SingleTeamViewController.h	Thu Apr 29 17:19:06 2010 +0000
@@ -19,7 +19,7 @@
     
     UITextField *textFieldBeingEdited;
     NSString *teamName;
-    NSArray *hatArray;
+    UIImage *normalHogSprite;
     
     NSArray *secondaryItems;
     BOOL isWriteNeeded;
@@ -35,7 +35,7 @@
 @property (nonatomic,retain) NSMutableDictionary *teamDictionary;
 @property (nonatomic,retain) UITextField *textFieldBeingEdited;
 @property (nonatomic,retain) NSString *teamName;
-@property (nonatomic,retain) NSArray *hatArray;
+@property (nonatomic,retain) UIImage *normalHogSprite;
 @property (nonatomic,retain) NSArray *secondaryItems;
 
 -(void) writeFile;
--- a/cocoaTouch/SingleTeamViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/SingleTeamViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -19,7 +19,7 @@
 #define TEAMNAME_TAG 1234
 
 @implementation SingleTeamViewController
-@synthesize teamDictionary, hatArray, secondaryItems, textFieldBeingEdited, teamName;
+@synthesize teamDictionary, normalHogSprite, secondaryItems, textFieldBeingEdited, teamName;
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
@@ -106,6 +106,13 @@
     self.secondaryItems = array;
     [array release];
 
+    // load the base hog image, drawing will occure in cellForRow...
+    NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
+    UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
+    [normalHogFile release];
+    self.normalHogSprite = hogSprite;
+    [hogSprite release];
+    
     // listen if any childController modifies the plist and write it if needed
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setWriteNeeded) name:@"setWriteNeedTeams" object:nil];
     isWriteNeeded = NO;
@@ -126,26 +133,6 @@
     
     self.teamName = self.title;
     
-    // load the images of the hat for aach hog
-    NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
-    UIImage *normalHogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
-    [normalHogFile release];
-    
-    NSArray *hogArray = [self.teamDictionary objectForKey:@"hedgehogs"];
-    NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[hogArray count]];
-    for (NSDictionary *hog in hogArray) {
-        NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/%@.png",HATS_DIRECTORY(),[hog objectForKey:@"hat"]];
-
-        UIImage *hatSprite = [[UIImage alloc] initWithContentsOfFile:hatFile andCutAt:CGRectMake(0, 0, 32, 32)];
-        [hatFile release];        
-        
-        [array addObject:[normalHogSprite mergeWith:hatSprite atPoint:CGPointMake(0, -5)]];
-        [hatSprite release];
-    }
-    [normalHogSprite release];
-    self.hatArray = array;
-    [array release];
-    
     [self.tableView reloadData];
 }
 
@@ -276,8 +263,12 @@
             
             hogArray = [self.teamDictionary objectForKey:@"hedgehogs"];
             
-            cell.imageView.image = [self.hatArray objectAtIndex:row];
-            
+            NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/%@.png", HATS_DIRECTORY(), [[hogArray objectAtIndex:row] objectForKey:@"hat"]];
+            UIImage *hatSprite = [[UIImage alloc] initWithContentsOfFile: hatFile andCutAt:CGRectMake(0, 0, 32, 32)];
+            [hatFile release];
+            cell.imageView.image = [self.normalHogSprite mergeWith:hatSprite atPoint:CGPointMake(0, -5)];
+            [hatSprite release];
+                        
             for (UIView *oneView in cell.contentView.subviews) {
                 if ([oneView isMemberOfClass:[UITextField class]]) {
                     // we find the uitextfied and we'll use its tag to understand which one is being edited
@@ -421,7 +412,7 @@
     self.teamDictionary = nil;
     self.textFieldBeingEdited = nil;
     self.teamName = nil;
-    self.hatArray = nil;
+    self.normalHogSprite = nil;
     self.secondaryItems = nil;
     hogHatViewController = nil;
     flagsViewController = nil;
@@ -435,7 +426,7 @@
     [teamDictionary release];
     [textFieldBeingEdited release];
     [teamName release];
-    [hatArray release];
+    [normalHogSprite release];
     [secondaryItems release];
     [hogHatViewController release];
     [fortsViewController release];
--- a/cocoaTouch/SplitViewRootController.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/SplitViewRootController.h	Thu Apr 29 17:19:06 2010 +0000
@@ -13,6 +13,4 @@
     DetailViewController *detailViewController;
 }
 
-@property (nonatomic,retain) DetailViewController *detailViewController;
-
 @end
--- a/cocoaTouch/SplitViewRootController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/SplitViewRootController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -12,7 +12,6 @@
 #import "CommodityFunctions.h"
 
 @implementation SplitViewRootController
-@synthesize detailViewController;
 
 
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@@ -28,24 +27,26 @@
 // load the view programmatically; we need a splitViewController that handles a MasterViewController 
 // (which is just a UITableViewController) and a DetailViewController where we present options
 -(void) viewDidLoad {
-    self.detailViewController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
-    [detailViewController release];
-    UINavigationController *detailedNavController = [[UINavigationController alloc] initWithRootViewController:self.detailViewController];
+    detailViewController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
+    UINavigationController *detailedNavController = [[UINavigationController alloc] initWithRootViewController:detailViewController];
     [detailViewController release];
 
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+        self.view.frame = CGRectMake(0, 0, 1024, 768);
+    
     id splitViewRootController;
     
     Class splitViewControllerClass = NSClassFromString(@"UISplitViewController");
     if (splitViewControllerClass) {
         splitViewRootController = [[splitViewControllerClass alloc] init];
         //[[splitViewRootController view] setAutoresizingMask: UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth];
-
-        [[splitViewRootController view] setFrame:CGRectMake(0, 0, 1024, 1024)]; // yeah it's funny
+        
+        [[splitViewRootController view] setFrame:CGRectMake(0, 0, 1024, 768)];
         MasterViewController *masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
         
         UINavigationController *mainNavController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
     
-        masterViewController.detailViewController = self.detailViewController;
+        masterViewController.detailViewController = detailViewController;
 
         [masterViewController release];
 
@@ -53,13 +54,11 @@
         [mainNavController release];
         [detailedNavController release];
         
-        [splitViewRootController setDelegate:self.detailViewController];
+        [splitViewRootController setDelegate:detailViewController];
         [detailViewController release];
 
         // add view to main controller
         [self.view addSubview:[splitViewRootController view]];
-        //[splitViewRootController release];
-
     } else {
         [self.view addSubview:detailedNavController.view];
     }
@@ -68,9 +67,10 @@
 }
          
 -(void) viewDidUnload {
+    detailViewController = nil;
     [super viewDidUnload];
-    self.detailViewController = nil;
 }
+
 -(void) dealloc {
     [detailViewController release];
     [super dealloc];
--- a/cocoaTouch/TeamConfigViewController.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/TeamConfigViewController.h	Thu Apr 29 17:19:06 2010 +0000
@@ -16,6 +16,5 @@
 
 @property (nonatomic, retain) NSMutableArray *listOfTeams;
 @property (nonatomic, retain) NSMutableArray *listOfSelectedTeams;
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
 
 @end
--- a/cocoaTouch/TeamConfigViewController.m	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/TeamConfigViewController.m	Thu Apr 29 17:19:06 2010 +0000
@@ -25,12 +25,14 @@
     
     CGSize screenSize = [[UIScreen mainScreen] bounds].size;
     self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
+    self.tableView.backgroundColor = [UIColor redColor];
 }
 
 -(void) viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
 
-    unsigned int colors[6] = { 4421353, 4100897, 10632635, 16749353, 14483456, 7566195 };
+    // integer representation of various color (defined in SquareButtonView)
+    NSUInteger colors[6] = { 4421353, 4100897, 10632635, 16749353, 14483456, 7566195 };
     NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL];
     NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[contentsOfDir count]];
     for (int i = 0; i < [contentsOfDir count]; i++) {
@@ -51,22 +53,6 @@
     [self.tableView reloadData];
 }
 
-/*
-- (void)viewDidAppear:(BOOL)animated {
-    [super viewDidAppear:animated];
-}
-*/
-/*
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-}
-*/
-/*
-- (void)viewDidDisappear:(BOOL)animated {
-    [super viewDidDisappear:animated];
-}
-*/
-
 -(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
     return rotationManager(interfaceOrientation);
 }
@@ -93,14 +79,14 @@
 }
 
 // Customize the appearance of table view cells.
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
     static NSString *CellIdentifier0 = @"Cell0";
     static NSString *CellIdentifier1 = @"Cell1";
     NSInteger section = [indexPath section];
     UITableViewCell *cell;
     
     if (section == 0) {
-        cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier0];
+        cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier0];
         if (cell == nil) {
             cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease];
 
@@ -136,7 +122,7 @@
         [squareButton selectColor:[[selectedRow objectForKey:@"color"] intValue]];
         squareButton.ownerDictionary = selectedRow;
     } else {
-        cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
+        cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1];
         if (cell == nil) 
             cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease];
         
@@ -187,7 +173,7 @@
 
 #pragma mark -
 #pragma mark Table view delegate
--(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     NSInteger row = [indexPath row];
     NSInteger section = [indexPath section];
 
@@ -198,7 +184,7 @@
         [self.listOfSelectedTeams addObject:[self.listOfTeams objectAtIndex:row]];
         [self.listOfTeams removeObjectAtIndex:row];      
     }
-    [self.tableView reloadData];
+    [aTableView reloadData];
 }
 
 
@@ -216,7 +202,7 @@
 
 
 -(void) dealloc {
-    [listOfTeams release];
+    [self.listOfTeams release];
     [super dealloc];
 }
 
--- a/cocoaTouch/otherSrc/CommodityFunctions.h	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/otherSrc/CommodityFunctions.h	Thu Apr 29 17:19:06 2010 +0000
@@ -34,3 +34,12 @@
 NSInteger randomPort ();
 void popError (const char *title, const char *message);
 
+
+#ifndef __IPHONE_3_2	// if iPhoneOS is 3.2 or greater then __IPHONE_3_2 will be defined
+typedef enum {
+    UIUserInterfaceIdiomPhone,           // iPhone and iPod touch style UI
+    UIUserInterfaceIdiomPad,             // iPad style UI
+} UIUserInterfaceIdiom;
+#define UI_USER_INTERFACE_IDIOM() UIUserInterfaceIdiomPhone
+#endif // ifndef __IPHONE_3_2
+
--- a/cocoaTouch/xib/GameConfigViewController-iPad.xib	Thu Apr 29 02:43:28 2010 +0000
+++ b/cocoaTouch/xib/GameConfigViewController-iPad.xib	Thu Apr 29 17:19:06 2010 +0000
@@ -42,52 +42,7 @@
 				<int key="NSvFlags">292</int>
 				<object class="NSMutableArray" key="NSSubviews">
 					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIPickerView" id="737511154">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">290</int>
-						<string key="NSFrame">{{754, 303}, {266, 216}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<bool key="IBUIShowsSelectionIndicator">YES</bool>
-					</object>
-					<object class="IBUIPickerView" id="918241339">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">290</int>
-						<string key="NSFrame">{{754, 51}, {266, 216}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<bool key="IBUIShowsSelectionIndicator">YES</bool>
-					</object>
-					<object class="IBUITableView" id="829449116">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">274</int>
-						<string key="NSFrame">{{20, 111}, {242, 396}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<object class="NSColor" key="IBUIBackgroundColor" id="25907977">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MQA</bytes>
-						</object>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<bool key="IBUIBouncesZoom">NO</bool>
-						<int key="IBUISeparatorStyle">1</int>
-						<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
-						<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
-						<float key="IBUIRowHeight">44</float>
-						<float key="IBUISectionHeaderHeight">22</float>
-						<float key="IBUISectionFooterHeight">22</float>
-					</object>
-					<object class="IBUIScrollView" id="295385433">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{300, 51}, {446, 456}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIMultipleTouchEnabled">YES</bool>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<bool key="IBUIBouncesZoom">NO</bool>
-					</object>
-					<object class="IBUIToolbar" id="141751576">
+					<object class="IBUIToolbar" id="836721772">
 						<reference key="NSNextResponder" ref="766721923"/>
 						<int key="NSvFlags">266</int>
 						<string key="NSFrame">{{0, 724}, {1024, 44}}</string>
@@ -97,30 +52,34 @@
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<object class="NSMutableArray" key="IBUIItems">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBUIBarButtonItem" id="164195326">
+							<object class="IBUIBarButtonItem" id="80281356">
 								<string key="IBUITitle">Back</string>
 								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 								<int key="IBUIStyle">1</int>
-								<reference key="IBUIToolbar" ref="141751576"/>
+								<reference key="IBUIToolbar" ref="836721772"/>
 							</object>
-							<object class="IBUIBarButtonItem" id="438091291">
+							<object class="IBUIBarButtonItem" id="716161941">
 								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-								<reference key="IBUIToolbar" ref="141751576"/>
+								<reference key="IBUIToolbar" ref="836721772"/>
 								<int key="IBUISystemItemIdentifier">5</int>
 							</object>
-							<object class="IBUIBarButtonItem" id="693480499">
+							<object class="IBUIBarButtonItem" id="919181414">
 								<int key="IBUITag">1</int>
 								<string key="IBUITitle">Start Game</string>
 								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+								<float key="IBUIWidth">90</float>
 								<int key="IBUIStyle">2</int>
-								<reference key="IBUIToolbar" ref="141751576"/>
+								<reference key="IBUIToolbar" ref="836721772"/>
 							</object>
 						</object>
 					</object>
 				</object>
 				<string key="NSFrameSize">{1024, 768}</string>
 				<reference key="NSSuperview"/>
-				<reference key="IBUIBackgroundColor" ref="25907977"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MQA</bytes>
+				</object>
 				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
 					<int key="interfaceOrientation">3</int>
@@ -142,18 +101,18 @@
 				<object class="IBConnectionRecord">
 					<object class="IBCocoaTouchEventConnection" key="connection">
 						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="164195326"/>
+						<reference key="source" ref="80281356"/>
 						<reference key="destination" ref="841351856"/>
 					</object>
-					<int key="connectionID">19</int>
+					<int key="connectionID">17</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBCocoaTouchEventConnection" key="connection">
 						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="693480499"/>
+						<reference key="source" ref="919181414"/>
 						<reference key="destination" ref="841351856"/>
 					</object>
-					<int key="connectionID">22</int>
+					<int key="connectionID">23</int>
 				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
@@ -181,59 +140,35 @@
 						<reference key="object" ref="766721923"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="295385433"/>
-							<reference ref="918241339"/>
-							<reference ref="737511154"/>
-							<reference ref="141751576"/>
-							<reference ref="829449116"/>
+							<reference ref="836721772"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">10</int>
-						<reference key="object" ref="737511154"/>
-						<reference key="parent" ref="766721923"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">12</int>
-						<reference key="object" ref="918241339"/>
-						<reference key="parent" ref="766721923"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">13</int>
-						<reference key="object" ref="829449116"/>
-						<reference key="parent" ref="766721923"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">14</int>
-						<reference key="object" ref="295385433"/>
-						<reference key="parent" ref="766721923"/>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">15</int>
-						<reference key="object" ref="141751576"/>
+						<reference key="object" ref="836721772"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="164195326"/>
-							<reference ref="438091291"/>
-							<reference ref="693480499"/>
+							<reference ref="80281356"/>
+							<reference ref="919181414"/>
+							<reference ref="716161941"/>
 						</object>
 						<reference key="parent" ref="766721923"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">16</int>
-						<reference key="object" ref="164195326"/>
-						<reference key="parent" ref="141751576"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">17</int>
-						<reference key="object" ref="438091291"/>
-						<reference key="parent" ref="141751576"/>
+						<reference key="object" ref="80281356"/>
+						<reference key="parent" ref="836721772"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">18</int>
-						<reference key="object" ref="693480499"/>
-						<reference key="parent" ref="141751576"/>
+						<reference key="object" ref="919181414"/>
+						<reference key="parent" ref="836721772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">22</int>
+						<reference key="object" ref="716161941"/>
+						<reference key="parent" ref="836721772"/>
 					</object>
 				</object>
 			</object>
@@ -243,16 +178,12 @@
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<string>-1.CustomClassName</string>
 					<string>-2.CustomClassName</string>
-					<string>10.IBPluginDependency</string>
-					<string>12.IBPluginDependency</string>
-					<string>13.IBPluginDependency</string>
-					<string>14.IBPluginDependency</string>
 					<string>15.IBPluginDependency</string>
 					<string>16.IBPluginDependency</string>
-					<string>17.IBPluginDependency</string>
 					<string>18.IBPluginDependency</string>
 					<string>2.IBEditorWindowLastContentRect</string>
 					<string>2.IBPluginDependency</string>
+					<string>22.IBPluginDependency</string>
 				</object>
 				<object class="NSMutableArray" key="dict.values">
 					<bool key="EncodedWithXMLCoder">YES</bool>
@@ -261,13 +192,9 @@
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>{{252, 103}, {1024, 768}}</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>{{269, 237}, {1024, 768}}</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -286,7 +213,7 @@
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">22</int>
+			<int key="maxID">29</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -295,28 +222,16 @@
 					<string key="className">GameConfigViewController</string>
 					<string key="superclassName">UIViewController</string>
 					<object class="NSMutableDictionary" key="actions">
-						<string key="NS.key.0">buttonPressed:</string>
-						<string key="NS.object.0">id</string>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
 						<bool key="EncodedWithXMLCoder">YES</bool>
 						<object class="NSArray" key="dict.sortedKeys">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>availableTeamsTableView</string>
-							<string>mapButton</string>
-							<string>randomButton</string>
-							<string>schemesButton</string>
-							<string>startButton</string>
-							<string>weaponsButton</string>
+							<string>buttonPressed:</string>
+							<string>segmentPressed:</string>
 						</object>
 						<object class="NSMutableArray" key="dict.values">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>UITableView</string>
-							<string>UIButton</string>
-							<string>UIButton</string>
-							<string>UIButton</string>
-							<string>UIBarButtonItem</string>
-							<string>UIButton</string>
+							<string>id</string>
+							<string>id</string>
 						</object>
 					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -477,43 +392,11 @@
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
-					<string key="className">UIButton</string>
-					<string key="superclassName">UIControl</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIControl</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIPickerView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIPickerView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
 					<string key="className">UIResponder</string>
 					<string key="superclassName">NSObject</string>
 					<reference key="sourceIdentifier" ref="786211723"/>
 				</object>
 				<object class="IBPartialClassDescription">
-					<string key="className">UIScrollView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
 					<string key="className">UISearchBar</string>
 					<string key="superclassName">UIView</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -530,14 +413,6 @@
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
-					<string key="className">UITableView</string>
-					<string key="superclassName">UIScrollView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UITableView.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
 					<string key="className">UIToolbar</string>
 					<string key="superclassName">UIView</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -609,7 +484,7 @@
 			<integer value="3100" key="NS.object.0"/>
 		</object>
 		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj</string>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/Hedgewars.xcodeproj</string>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 		<string key="IBCocoaTouchPluginVersion">87</string>
 	</data>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cocoaTouch/xib/MapConfigViewController-iPad.xib	Thu Apr 29 17:19:06 2010 +0000
@@ -0,0 +1,784 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">800</int>
+		<string key="IBDocument.SystemVersion">10D573</string>
+		<string key="IBDocument.InterfaceBuilderVersion">762</string>
+		<string key="IBDocument.AppKitVersion">1038.29</string>
+		<string key="IBDocument.HIToolboxVersion">460.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+			<string key="NS.object.0">87</string>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<integer value="1"/>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys" id="0">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="IBProxyObject" id="372490531">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBProxyObject" id="975951072">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBUIView" id="191373211">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">274</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUISegmentedControl" id="88728219">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{756, 170}, {240, 30}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBSegmentControlStyle">2</int>
+						<int key="IBNumberOfSegments">3</int>
+						<int key="IBSelectedSegmentIndex">0</int>
+						<object class="NSArray" key="IBSegmentTitles">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>Random</string>
+							<string>Map</string>
+							<string>Maze</string>
+						</object>
+						<object class="NSMutableArray" key="IBSegmentWidths">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<real value="0.0"/>
+							<real value="0.0"/>
+							<real value="0.0"/>
+						</object>
+						<object class="NSMutableArray" key="IBSegmentEnabledStates">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<boolean value="YES"/>
+							<boolean value="YES"/>
+							<boolean value="YES"/>
+						</object>
+						<object class="NSMutableArray" key="IBSegmentContentOffsets">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>{0, 0}</string>
+							<string>{0, 0}</string>
+							<string>{0, 0}</string>
+						</object>
+						<object class="NSMutableArray" key="IBSegmentImages">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="NSNull" id="4"/>
+							<reference ref="4"/>
+							<reference ref="4"/>
+						</object>
+					</object>
+					<object class="IBUISlider" id="938256702">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{573, 37}, {149, 23}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<float key="IBUIValue">0.05000000074505806</float>
+						<float key="IBUIMaxValue">0.05000000074505806</float>
+					</object>
+					<object class="IBUIButton" id="326163764">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{746, 20}, {256, 128}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<object class="NSFont" key="IBUIFont" id="261639815">
+							<string key="NSName">Helvetica-Bold</string>
+							<double key="NSSize">15</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<int key="IBUIButtonType">1</int>
+						<object class="NSColor" key="IBUIHighlightedTitleColor" id="437070330">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleShadowColor" id="65043801">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MC41AA</bytes>
+						</object>
+					</object>
+					<object class="IBUILabel" id="634417433">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{627, 110}, {42, 21}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<string key="IBUIText">...</string>
+						<object class="NSColor" key="IBUITextColor" id="306081020">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MCAwIDAAA</bytes>
+						</object>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">1</int>
+						<float key="IBUIMinimumFontSize">10</float>
+						<int key="IBUITextAlignment">1</int>
+					</object>
+					<object class="IBUILabel" id="743202682">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{575, 67}, {145, 29}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<int key="IBUIContentMode">7</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<string key="IBUIText">Label</string>
+						<object class="NSFont" key="IBUIFont">
+							<string key="NSName">Helvetica</string>
+							<double key="NSSize">24</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<reference key="IBUITextColor" ref="306081020"/>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">1</int>
+						<float key="IBUIMinimumFontSize">10</float>
+						<int key="IBUITextAlignment">1</int>
+					</object>
+					<object class="IBUITableView" id="565214171">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">274</int>
+						<string key="NSFrame">{{724, 224}, {300, 500}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MSAwAA</bytes>
+						</object>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<bool key="IBUIBouncesZoom">NO</bool>
+						<int key="IBUISeparatorStyle">1</int>
+						<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
+						<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
+						<float key="IBUIRowHeight">44</float>
+						<float key="IBUISectionHeaderHeight">22</float>
+						<float key="IBUISectionFooterHeight">22</float>
+					</object>
+					<object class="IBUIButton" id="967260168">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">-2147483356</int>
+						<string key="NSFrame">{{0, 224}, {300, 500}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="261639815"/>
+						<int key="IBUIButtonType">1</int>
+						<string key="IBUINormalTitle">teams section</string>
+						<reference key="IBUIHighlightedTitleColor" ref="437070330"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="65043801"/>
+					</object>
+				</object>
+				<string key="NSFrameSize">{1024, 724}</string>
+				<reference key="NSSuperview"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">2</int>
+					<bytes key="NSRGB">MC44MzkyMTU3NTU1IDAuODQ3MDU4ODkyMyAwLjg3MDU4ODMwMjYAA</bytes>
+				</object>
+				<object class="IBUISimulatedToolbarMetrics" key="IBUISimulatedBottomBarMetrics"/>
+				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+					<int key="interfaceOrientation">3</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">view</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="191373211"/>
+					</object>
+					<int key="connectionID">3</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">updatePreview</string>
+						<reference key="source" ref="326163764"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">12</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">previewButton</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="326163764"/>
+					</object>
+					<int key="connectionID">13</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">maxLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="634417433"/>
+					</object>
+					<int key="connectionID">16</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">sizeLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="743202682"/>
+					</object>
+					<int key="connectionID">18</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">sliderChanged:</string>
+						<reference key="source" ref="938256702"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">13</int>
+					</object>
+					<int key="connectionID">19</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">sliderEndedChanging:</string>
+						<reference key="source" ref="938256702"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">20</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">segmentedControl</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="88728219"/>
+					</object>
+					<int key="connectionID">21</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">segmentedControlChanged:</string>
+						<reference key="source" ref="88728219"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">13</int>
+					</object>
+					<int key="connectionID">22</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">slider</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="938256702"/>
+					</object>
+					<int key="connectionID">23</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">dataSource</string>
+						<reference key="source" ref="565214171"/>
+						<reference key="destination" ref="372490531"/>
+					</object>
+					<int key="connectionID">26</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">delegate</string>
+						<reference key="source" ref="565214171"/>
+						<reference key="destination" ref="372490531"/>
+					</object>
+					<int key="connectionID">27</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">tableView</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="565214171"/>
+					</object>
+					<int key="connectionID">32</int>
+				</object>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<reference key="object" ref="0"/>
+						<reference key="children" ref="1000"/>
+						<nil key="parent"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">1</int>
+						<reference key="object" ref="191373211"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="88728219"/>
+							<reference ref="565214171"/>
+							<reference ref="967260168"/>
+							<reference ref="938256702"/>
+							<reference ref="634417433"/>
+							<reference ref="743202682"/>
+							<reference ref="326163764"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="372490531"/>
+						<reference key="parent" ref="0"/>
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="975951072"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">7</int>
+						<reference key="object" ref="88728219"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">8</int>
+						<reference key="object" ref="938256702"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">11</int>
+						<reference key="object" ref="634417433"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">17</int>
+						<reference key="object" ref="743202682"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">25</int>
+						<reference key="object" ref="565214171"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">Table View (Themes)</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">39</int>
+						<reference key="object" ref="967260168"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">9</int>
+						<reference key="object" ref="326163764"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.CustomClassName</string>
+					<string>-2.CustomClassName</string>
+					<string>1.IBEditorWindowLastContentRect</string>
+					<string>1.IBPluginDependency</string>
+					<string>11.IBPluginDependency</string>
+					<string>17.IBPluginDependency</string>
+					<string>25.IBPluginDependency</string>
+					<string>39.IBPluginDependency</string>
+					<string>7.IBPluginDependency</string>
+					<string>8.IBPluginDependency</string>
+					<string>9.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>MapConfigViewController</string>
+					<string>UIResponder</string>
+					<string>{{255, -206}, {1024, 768}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="activeLocalization"/>
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0"/>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="sourceID"/>
+			<int key="maxID">48</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">MapConfigViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>segmentedControlChanged:</string>
+							<string>sliderChanged:</string>
+							<string>sliderEndedChanging:</string>
+							<string>updatePreview</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<bool key="EncodedWithXMLCoder">YES</bool>
+						<object class="NSArray" key="dict.sortedKeys">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>maxLabel</string>
+							<string>previewButton</string>
+							<string>segmentedControl</string>
+							<string>sizeLabel</string>
+							<string>slider</string>
+							<string>tableView</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>UILabel</string>
+							<string>UIButton</string>
+							<string>UISegmentedControl</string>
+							<string>UILabel</string>
+							<string>UISlider</string>
+							<string>UITableView</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">../../cocoaTouch/MapConfigViewController.h</string>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableArray" key="referencedPartialClassDescriptionsV3.2+">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSError.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSFileManager.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyValueCoding.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyValueObserving.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSKeyedArchiver.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSNetServices.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSObject.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSPort.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSRunLoop.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSStream.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSThread.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSURL.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">Foundation.framework/Headers/NSXMLParser.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIAccessibility.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UINibLoading.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="567455553">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIButton</string>
+					<string key="superclassName">UIControl</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIControl</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIControl.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UILabel</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UILabel.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIResponder</string>
+					<string key="superclassName">NSObject</string>
+					<reference key="sourceIdentifier" ref="567455553"/>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIScrollView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIScrollView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UISearchBar</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISearchBar.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UISearchDisplayController</string>
+					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISearchDisplayController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UISegmentedControl</string>
+					<string key="superclassName">UIControl</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISegmentedControl.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UISlider</string>
+					<string key="superclassName">UIControl</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISlider.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UITableView</string>
+					<string key="superclassName">UIScrollView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UITableView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UITextField.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIView</string>
+					<string key="superclassName">UIResponder</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIView.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UINavigationController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIPopoverController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UITabBarController.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIViewController</string>
+					<string key="superclassName">UIResponder</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIViewController.h</string>
+					</object>
+				</object>
+			</object>
+		</object>
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
+			<integer value="800" key="NS.object.0"/>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
+			<integer value="3000" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/Hedgewars.xcodeproj</string>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">87</string>
+	</data>
+</archive>
--- a/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj	Thu Apr 29 02:43:28 2010 +0000
+++ b/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj	Thu Apr 29 17:19:06 2010 +0000
@@ -41,6 +41,7 @@
 		6151347E116C2803001F16D1 /* Icon-iPad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6151347D116C2803001F16D1 /* Icon-iPad.png */; };
 		615134B1116C2C5F001F16D1 /* OverlayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 615134B0116C2C5F001F16D1 /* OverlayViewController.xib */; };
 		615A92911183E31C006CA772 /* MapConfigViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 615A92901183E31C006CA772 /* MapConfigViewController-iPhone.xib */; };
+		617814E8118947A200C6A535 /* MapConfigViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 617814E7118947A200C6A535 /* MapConfigViewController-iPad.xib */; };
 		61798816114AA34C00BA94A9 /* hwengine.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E7114AA34C00BA94A9 /* hwengine.pas */; };
 		61798818114AA34C00BA94A9 /* hwLibrary.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987E9114AA34C00BA94A9 /* hwLibrary.pas */; };
 		6179881B114AA34C00BA94A9 /* PascalExports.pas in Sources */ = {isa = PBXBuildFile; fileRef = 617987EC114AA34C00BA94A9 /* PascalExports.pas */; };
@@ -245,6 +246,7 @@
 		6151347D116C2803001F16D1 /* Icon-iPad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-iPad.png"; path = "../../cocoaTouch/resources/Icon-iPad.png"; sourceTree = SOURCE_ROOT; };
 		615134B0116C2C5F001F16D1 /* OverlayViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = OverlayViewController.xib; path = ../../cocoaTouch/xib/OverlayViewController.xib; sourceTree = SOURCE_ROOT; };
 		615A92901183E31C006CA772 /* MapConfigViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MapConfigViewController-iPhone.xib"; path = "../../cocoaTouch/xib/MapConfigViewController-iPhone.xib"; sourceTree = SOURCE_ROOT; };
+		617814E7118947A200C6A535 /* MapConfigViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MapConfigViewController-iPad.xib"; path = "../../cocoaTouch/xib/MapConfigViewController-iPad.xib"; sourceTree = SOURCE_ROOT; };
 		617987E1114AA34C00BA94A9 /* CCHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = CCHandlers.inc; path = ../../hedgewars/CCHandlers.inc; sourceTree = SOURCE_ROOT; };
 		617987E4114AA34C00BA94A9 /* GSHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = GSHandlers.inc; path = ../../hedgewars/GSHandlers.inc; sourceTree = SOURCE_ROOT; };
 		617987E5114AA34C00BA94A9 /* HHHandlers.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = HHHandlers.inc; path = ../../hedgewars/HHHandlers.inc; sourceTree = SOURCE_ROOT; };
@@ -526,6 +528,7 @@
 		6100DB1711544E8400F455E0 /* XIB */ = {
 			isa = PBXGroup;
 			children = (
+				617814E7118947A200C6A535 /* MapConfigViewController-iPad.xib */,
 				615A92901183E31C006CA772 /* MapConfigViewController-iPhone.xib */,
 				611E127C117BACC60044B62F /* GameConfigViewController-iPad.xib */,
 				61A118C911683C7600359010 /* MainMenuViewController-iPad.xib */,
@@ -976,6 +979,7 @@
 				611E127F117BACCD0044B62F /* GameConfigViewController-iPhone.xib in Resources */,
 				611E12FF117BBBDA0044B62F /* Entitlements-Development.plist in Resources */,
 				615A92911183E31C006CA772 /* MapConfigViewController-iPhone.xib in Resources */,
+				617814E8118947A200C6A535 /* MapConfigViewController-iPad.xib in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1149,6 +1153,7 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				CODE_SIGN_ENTITLEMENTS = "Entitlements-Development.plist";
+				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				COPY_PHASE_STRIP = YES;
 				GCC_PRECOMPILE_PREFIX_HEADER = YES;
@@ -1159,6 +1164,7 @@
 					"\"$(SRCROOT)\"",
 				);
 				PRODUCT_NAME = Hedgewars;
+				PROVISIONING_PROFILE = "";
 				"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
 				TARGETED_DEVICE_FAMILY = "1,2";
 			};
@@ -1412,8 +1418,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
-				CODE_SIGN_IDENTITY = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix";
 				FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.5.1;
 				FPC_MAIN_FILE = "$(PROJECT_DIR)/../../hedgewars/hwLibrary.pas";
@@ -1442,8 +1448,8 @@
 					"-Wl,-no_order_inits",
 				);
 				PREBINDING = NO;
-				PROVISIONING_PROFILE = "BD0C39CA-87BA-4276-A9A3-B3ABC838763E";
-				"PROVISIONING_PROFILE[sdk=iphoneos*]" = "BD0C39CA-87BA-4276-A9A3-B3ABC838763E";
+				PROVISIONING_PROFILE = "";
+				"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
 				SDKROOT = iphoneos3.2;
 				TARGETED_DEVICE_FAMILY = "1,2";
 			};
--- a/project_files/HedgewarsMobile/Info.plist	Thu Apr 29 02:43:28 2010 +0000
+++ b/project_files/HedgewarsMobile/Info.plist	Thu Apr 29 17:19:06 2010 +0000
@@ -6,8 +6,6 @@
 	<string>English</string>
 	<key>CFBundleDisplayName</key>
 	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleDocumentTypes</key>
-	<array/>
 	<key>CFBundleExecutable</key>
 	<string>${EXECUTABLE_NAME}</string>
 	<key>CFBundleIconFiles</key>
@@ -16,7 +14,7 @@
 		<string>Icon-iPad.png</string>
 	</array>
 	<key>CFBundleIdentifier</key>
-	<string>org.hedgewars.${PRODUCT_NAME:identifier}</string>
+	<string>org.hedgewars.mobile</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>