move stuff around and update iphone project
authorkoda
Thu, 17 Jun 2010 20:30:39 +0200
changeset 3514 59dbd31e9953
parent 3513 f589230fa21b
child 3515 3e8635f43972
move stuff around and update iphone project
cocoaTouch/DetailViewController.h
cocoaTouch/DetailViewController.m
cocoaTouch/FlagsViewController.h
cocoaTouch/FlagsViewController.m
cocoaTouch/FortsViewController.h
cocoaTouch/FortsViewController.m
cocoaTouch/GameConfigViewController.h
cocoaTouch/GameConfigViewController.m
cocoaTouch/GameSetup.h
cocoaTouch/GameSetup.m
cocoaTouch/GeneralSettingsViewController.h
cocoaTouch/GeneralSettingsViewController.m
cocoaTouch/GravesViewController.h
cocoaTouch/GravesViewController.m
cocoaTouch/HogHatViewController.h
cocoaTouch/HogHatViewController.m
cocoaTouch/LevelViewController.h
cocoaTouch/LevelViewController.m
cocoaTouch/MainMenuViewController.h
cocoaTouch/MainMenuViewController.m
cocoaTouch/MapConfigViewController.h
cocoaTouch/MapConfigViewController.m
cocoaTouch/MasterViewController.h
cocoaTouch/MasterViewController.m
cocoaTouch/OverlayViewController.h
cocoaTouch/OverlayViewController.m
cocoaTouch/PopoverMenuViewController.h
cocoaTouch/PopoverMenuViewController.m
cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h
cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m
cocoaTouch/SchemeSettingsViewController.h
cocoaTouch/SchemeSettingsViewController.m
cocoaTouch/SchemeWeaponConfigViewController.h
cocoaTouch/SchemeWeaponConfigViewController.m
cocoaTouch/SingleSchemeViewController.h
cocoaTouch/SingleSchemeViewController.m
cocoaTouch/SingleTeamViewController.h
cocoaTouch/SingleTeamViewController.m
cocoaTouch/SplitViewRootController.h
cocoaTouch/SplitViewRootController.m
cocoaTouch/TeamConfigViewController.h
cocoaTouch/TeamConfigViewController.m
cocoaTouch/TeamSettingsViewController.h
cocoaTouch/TeamSettingsViewController.m
cocoaTouch/VoicesViewController.h
cocoaTouch/VoicesViewController.m
cocoaTouch/WeaponSettingsViewController.h
cocoaTouch/WeaponSettingsViewController.m
cocoaTouch/otherSrc/CGPointUtils.c
cocoaTouch/otherSrc/CGPointUtils.h
cocoaTouch/otherSrc/CommodityFunctions.h
cocoaTouch/otherSrc/CommodityFunctions.m
cocoaTouch/otherSrc/HogButtonView.h
cocoaTouch/otherSrc/HogButtonView.m
cocoaTouch/otherSrc/PascalImports.h
cocoaTouch/otherSrc/SquareButtonView.h
cocoaTouch/otherSrc/SquareButtonView.m
cocoaTouch/otherSrc/UIImageExtra.h
cocoaTouch/otherSrc/UIImageExtra.m
cocoaTouch/resources/Default-Landscape.png
cocoaTouch/resources/Default.png
cocoaTouch/resources/Icon-iPad.png
cocoaTouch/resources/Icon.png
cocoaTouch/resources/arrowDown.png
cocoaTouch/resources/arrowLeft.png
cocoaTouch/resources/arrowRight.png
cocoaTouch/resources/arrowUp.png
cocoaTouch/resources/backgroundBottom.png
cocoaTouch/resources/backgroundCenter.png
cocoaTouch/resources/backgroundLeft.png
cocoaTouch/resources/backgroundRight.png
cocoaTouch/resources/backgroundTop.png
cocoaTouch/resources/borderBottom.png
cocoaTouch/resources/borderTop.png
cocoaTouch/resources/joyPush.png
cocoaTouch/resources/menuCorner.png
cocoaTouch/resources/networkButton.png
cocoaTouch/resources/playButton.png
cocoaTouch/resources/settingsButton.png
cocoaTouch/resources/storeButton.png
cocoaTouch/resources/title.png
cocoaTouch/xib/GameConfigViewController-iPad.xib
cocoaTouch/xib/GameConfigViewController-iPhone.xib
cocoaTouch/xib/MainMenuViewController-iPad.xib
cocoaTouch/xib/MainMenuViewController-iPhone.xib
cocoaTouch/xib/MapConfigViewController-iPad.xib
cocoaTouch/xib/MapConfigViewController-iPhone.xib
cocoaTouch/xib/OverlayViewController-iPad.xib
cocoaTouch/xib/OverlayViewController.xib
hedgewars/options.inc
misc/libopenalbridge/CMakeLists.txt
misc/libopenalbridge/commands.c
misc/libopenalbridge/commands.h
misc/libopenalbridge/globals.h
misc/libopenalbridge/loaders.c
misc/libopenalbridge/loaders.h
misc/libopenalbridge/openalbridge.c
misc/libopenalbridge/openalbridge.def
misc/libopenalbridge/openalbridge.h
misc/libopenalbridge/openalbridge_t.h
misc/libopenalbridge/wrappers.c
misc/libopenalbridge/wrappers.h
misc/openalbridge/CMakeLists.txt
misc/openalbridge/commands.c
misc/openalbridge/commands.h
misc/openalbridge/globals.h
misc/openalbridge/loaders.c
misc/openalbridge/loaders.h
misc/openalbridge/openalbridge.c
misc/openalbridge/openalbridge.def
misc/openalbridge/openalbridge.h
misc/openalbridge/openalbridge_t.h
misc/openalbridge/wrappers.c
misc/openalbridge/wrappers.h
project_files/HedgewarsMobile/Classes/DetailViewController.h
project_files/HedgewarsMobile/Classes/DetailViewController.m
project_files/HedgewarsMobile/Classes/FlagsViewController.h
project_files/HedgewarsMobile/Classes/FlagsViewController.m
project_files/HedgewarsMobile/Classes/FortsViewController.h
project_files/HedgewarsMobile/Classes/FortsViewController.m
project_files/HedgewarsMobile/Classes/GameConfigViewController.h
project_files/HedgewarsMobile/Classes/GameConfigViewController.m
project_files/HedgewarsMobile/Classes/GameSetup.h
project_files/HedgewarsMobile/Classes/GameSetup.m
project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.h
project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m
project_files/HedgewarsMobile/Classes/GravesViewController.h
project_files/HedgewarsMobile/Classes/GravesViewController.m
project_files/HedgewarsMobile/Classes/HogHatViewController.h
project_files/HedgewarsMobile/Classes/HogHatViewController.m
project_files/HedgewarsMobile/Classes/LevelViewController.h
project_files/HedgewarsMobile/Classes/LevelViewController.m
project_files/HedgewarsMobile/Classes/MainMenuViewController.h
project_files/HedgewarsMobile/Classes/MainMenuViewController.m
project_files/HedgewarsMobile/Classes/MapConfigViewController.h
project_files/HedgewarsMobile/Classes/MapConfigViewController.m
project_files/HedgewarsMobile/Classes/MasterViewController.h
project_files/HedgewarsMobile/Classes/MasterViewController.m
project_files/HedgewarsMobile/Classes/OverlayViewController.h
project_files/HedgewarsMobile/Classes/OverlayViewController.m
project_files/HedgewarsMobile/Classes/PopoverMenuViewController.h
project_files/HedgewarsMobile/Classes/PopoverMenuViewController.m
project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.h
project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m
project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.h
project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m
project_files/HedgewarsMobile/Classes/SingleSchemeViewController.h
project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m
project_files/HedgewarsMobile/Classes/SingleTeamViewController.h
project_files/HedgewarsMobile/Classes/SingleTeamViewController.m
project_files/HedgewarsMobile/Classes/SplitViewRootController.h
project_files/HedgewarsMobile/Classes/SplitViewRootController.m
project_files/HedgewarsMobile/Classes/TeamConfigViewController.h
project_files/HedgewarsMobile/Classes/TeamConfigViewController.m
project_files/HedgewarsMobile/Classes/TeamSettingsViewController.h
project_files/HedgewarsMobile/Classes/TeamSettingsViewController.m
project_files/HedgewarsMobile/Classes/VoicesViewController.h
project_files/HedgewarsMobile/Classes/VoicesViewController.m
project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.h
project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m
project_files/HedgewarsMobile/Classes/otherSrc/CGPointUtils.c
project_files/HedgewarsMobile/Classes/otherSrc/CGPointUtils.h
project_files/HedgewarsMobile/Classes/otherSrc/CommodityFunctions.h
project_files/HedgewarsMobile/Classes/otherSrc/CommodityFunctions.m
project_files/HedgewarsMobile/Classes/otherSrc/HogButtonView.h
project_files/HedgewarsMobile/Classes/otherSrc/HogButtonView.m
project_files/HedgewarsMobile/Classes/otherSrc/PascalImports.h
project_files/HedgewarsMobile/Classes/otherSrc/SDL_uikitappdelegate.h
project_files/HedgewarsMobile/Classes/otherSrc/SDL_uikitappdelegate.m
project_files/HedgewarsMobile/Classes/otherSrc/SquareButtonView.h
project_files/HedgewarsMobile/Classes/otherSrc/SquareButtonView.m
project_files/HedgewarsMobile/Classes/otherSrc/UIImageExtra.h
project_files/HedgewarsMobile/Classes/otherSrc/UIImageExtra.m
project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj
project_files/HedgewarsMobile/Resources/Default-Landscape.png
project_files/HedgewarsMobile/Resources/Default.png
project_files/HedgewarsMobile/Resources/GameConfigViewController-iPad.xib
project_files/HedgewarsMobile/Resources/GameConfigViewController-iPhone.xib
project_files/HedgewarsMobile/Resources/Icon-iPad.png
project_files/HedgewarsMobile/Resources/Icon.png
project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib
project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib
project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib
project_files/HedgewarsMobile/Resources/MapConfigViewController-iPhone.xib
project_files/HedgewarsMobile/Resources/OverlayViewController-iPad.xib
project_files/HedgewarsMobile/Resources/OverlayViewController.xib
project_files/HedgewarsMobile/Resources/arrowDown.png
project_files/HedgewarsMobile/Resources/arrowLeft.png
project_files/HedgewarsMobile/Resources/arrowRight.png
project_files/HedgewarsMobile/Resources/arrowUp.png
project_files/HedgewarsMobile/Resources/backgroundBottom.png
project_files/HedgewarsMobile/Resources/backgroundCenter.png
project_files/HedgewarsMobile/Resources/backgroundLeft.png
project_files/HedgewarsMobile/Resources/backgroundRight.png
project_files/HedgewarsMobile/Resources/backgroundTop.png
project_files/HedgewarsMobile/Resources/borderBottom.png
project_files/HedgewarsMobile/Resources/borderTop.png
project_files/HedgewarsMobile/Resources/joyPush.png
project_files/HedgewarsMobile/Resources/menuCorner.png
project_files/HedgewarsMobile/Resources/networkButton.png
project_files/HedgewarsMobile/Resources/playButton.png
project_files/HedgewarsMobile/Resources/settingsButton.png
project_files/HedgewarsMobile/Resources/storeButton.png
project_files/HedgewarsMobile/Resources/title.png
project_files/HedgewarsMobile/libfreetype_arm.a
project_files/HedgewarsMobile/libfreetype_x86.a
project_files/HedgewarsMobile/libpng_arm.a
project_files/HedgewarsMobile/libpng_x86.a
project_files/HedgewarsMobile/libvorbis_arm.a
--- a/cocoaTouch/DetailViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-//
-//  DetailViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 27/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class GeneralSettingsViewController;
-@class TeamSettingsViewController;
-@class WeaponSettingsViewController;
-@class SchemeSettingsViewController;
-
-@interface DetailViewController : UITableViewController
-#if __IPHONE_3_2
-<UISplitViewControllerDelegate, UIPopoverControllerDelegate>
-#endif
-{
-    NSArray *controllerNames;
-    
-    GeneralSettingsViewController *generalSettingsViewController;
-    TeamSettingsViewController *teamSettingsViewController;
-    WeaponSettingsViewController *weaponSettingsViewController;
-    SchemeSettingsViewController *schemeSettingsViewController;
-    UIPopoverController *popoverController;
-}
-
-// used in iphone version
--(IBAction) dismissSplitView;
-
-@property (nonatomic, retain) NSArray *controllerNames;
-@property (nonatomic,retain) UIPopoverController *popoverController;
-
-@end
--- a/cocoaTouch/DetailViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-    //
-//  DetailViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 27/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "DetailViewController.h"
-#import "SDL_uikitappdelegate.h"
-#import "GeneralSettingsViewController.h"
-#import "TeamSettingsViewController.h"
-#import "WeaponSettingsViewController.h"
-#import "SchemeSettingsViewController.h"
-#import "CommodityFunctions.h"
-
-@implementation DetailViewController
-@synthesize controllerNames,popoverController;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
--(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
-    self.view.frame = CGRectMake(0, 0, 1024, 1024);
-}
-
--(void) viewDidLoad {
-    self.title = NSLocalizedString(@"Settings",@"");
-
-    // allocate controllers and store them into the array
-    NSArray *array= [[NSArray alloc] initWithObjects:NSLocalizedString(@"General",@""), 
-                                                     NSLocalizedString(@"Teams",@""),
-                                                     NSLocalizedString(@"Weapons",@""),
-                                                     NSLocalizedString(@"Schemes",@""),
-                                                     nil];
-    self.controllerNames = array;
-    [array release];
-    
-    // on ipad make the general setting the first view, on iphone add the "Done" button on top left
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
-        
-        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(112, 112, 480, 320)];
-        label.text = @"Press the buttons on the left";
-        label.font = [UIFont systemFontOfSize:20];
-        label.textAlignment = UITextAlignmentCenter;
-        [self.view addSubview:label];
-        [label release];
-        
-        //[self.navigationController pushViewController:nextController animated:NO];
-    } else {
-        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
-                                                                                              target:self
-                                                                                              action:@selector(dismissSplitView)];
-    }
-
-    [super viewDidLoad];
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    // don't display 
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-        return 0;
-    else
-        return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [controllerNames count];
-}
-
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
-                                       reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    NSInteger row = [indexPath row];
-    
-    cell.textLabel.text = [controllerNames objectAtIndex:row];
-    cell.imageView.image = [UIImage imageNamed:@"Icon.png"];
-    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
-    
-    return cell;
-}
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    NSInteger row = [indexPath row];
-    UIViewController *nextController = nil;
-    
-    switch (row) {
-        case 0:
-            if (nil == generalSettingsViewController)
-                generalSettingsViewController = [[GeneralSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-            nextController = generalSettingsViewController;
-            break;
-        case 1:
-            if (nil == teamSettingsViewController)
-                teamSettingsViewController = [[TeamSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-            nextController = teamSettingsViewController;
-            break;
-        case 2:
-            if (nil == weaponSettingsViewController)
-                weaponSettingsViewController = [[WeaponSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-            nextController = weaponSettingsViewController;
-            break;
-        case 3:
-            if (nil == schemeSettingsViewController)
-                schemeSettingsViewController = [[SchemeSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-            nextController = schemeSettingsViewController;
-            break;
-    }
-    
-    nextController.title = [controllerNames objectAtIndex:row];
-    [self.navigationController pushViewController:nextController animated:YES];
-}
-
--(IBAction) dismissSplitView {
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissModalView" object:nil];
-}
-
-#if __IPHONE_3_2
-#pragma mark -
-#pragma mark splitview support
--(void) splitViewController:(UISplitViewController *)svc popoverController:(UIPopoverController *)pc willPresentViewController:(UIViewController *)aViewController {
-    if (popoverController != nil) {
-        [popoverController dismissPopoverAnimated:YES];
-    }
-}
-
-// Called when the master view controller is about to be hidden
--(void) splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController 
-            withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverController*)pc {
-
-  /*  barButtonItem.title = @"Master View";
-    UIToolbar *toolbar = self.parentViewController.navigationController.toolbar;
-    NSMutableArray *items = [[toolbar items] mutableCopy];
-    [items insertObject:barButtonItem atIndex:0];
-    [toolbar setItems:items animated:YES];
-
-    [items release];
-
-    self.popoverController = pc;*/
-    barButtonItem.title = aViewController.title;
-    self.navigationItem.rightBarButtonItem = barButtonItem;
-}
-
-// Called when the master view controller is about to appear
--(void) splitViewController: (UISplitViewController*)svc  willShowViewController:(UIViewController *)aViewController 
-            invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
-    /*UIToolbar *toolbar = self.parentViewController.navigationController.toolbar;
-
-    NSMutableArray *items = [[toolbar items] mutableCopy];
-    [items removeObjectAtIndex:0];
-
-    [toolbar setItems:items animated:YES];
-
-    [items release];
-
-    self.popoverController = nil;*/
-        self.navigationItem.rightBarButtonItem = nil;
-
-}
-#endif
-
--(void) didReceiveMemoryWarning {
-    // Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-    // Release any cached data, images, etc that aren't in use.
-    if (generalSettingsViewController.view.superview == nil)
-        generalSettingsViewController = nil;
-    if (teamSettingsViewController.view.superview == nil)
-        teamSettingsViewController = nil;
-    if (weaponSettingsViewController.view.superview == nil)
-        weaponSettingsViewController = nil;
-    if (schemeSettingsViewController.view.superview == nil)
-        schemeSettingsViewController = nil;
-    MSG_MEMCLEAN();
-}
-
--(void) viewDidUnload {
-    self.controllerNames = nil;
-    generalSettingsViewController = nil;
-    teamSettingsViewController = nil;
-    weaponSettingsViewController = nil;
-    schemeSettingsViewController = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [controllerNames release];
-    [generalSettingsViewController release];
-    [teamSettingsViewController release];
-    [weaponSettingsViewController release];
-    [schemeSettingsViewController release];
-    [super dealloc];
-}
-@end
--- a/cocoaTouch/FlagsViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-//
-//  FlagsViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 08/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface FlagsViewController : UITableViewController {
-    NSDictionary *teamDictionary;
-
-    NSArray *flagArray;    
-    NSIndexPath *lastIndexPath;
-}
-
-@property (nonatomic,retain) NSDictionary * teamDictionary;
-@property (nonatomic,retain) NSArray *flagArray;
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
-
-@end
--- a/cocoaTouch/FlagsViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-//
-//  FlagsViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 08/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "FlagsViewController.h"
-#import "CommodityFunctions.h"
-
-@implementation FlagsViewController
-@synthesize teamDictionary, flagArray, lastIndexPath;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-
-    self.flagArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FLAGS_DIRECTORY() error:NULL];
-}
-
--(void) viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    [self.tableView reloadData];
-    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [flagArray count];
-}
-
-// Customize the appearance of table view cells.
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    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;
-    } else {
-        cell.accessoryType = UITableViewCellAccessoryNone;
-    }
-    
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    
-    if (newRow != oldRow) {
-        // if the two selected rows differ update data on the hog dictionary and reload table content
-        [self.teamDictionary setValue:[[flagArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"flag"];
-
-        // tell our boss to write this new stuff on disk
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-
-        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
-        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
-        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
-        oldCell.accessoryType = UITableViewCellAccessoryNone;
-        self.lastIndexPath = indexPath;
-        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    }
-    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
-    [self.navigationController popViewControllerAnimated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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 {
-    self.teamDictionary = nil;
-    self.lastIndexPath = nil;
-    self.flagArray = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [teamDictionary release];
-    [lastIndexPath release];
-    [flagArray release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/FortsViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-//
-//  FortsViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 08/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface FortsViewController : UITableViewController {
-    NSDictionary *teamDictionary;
-
-    NSArray *fortArray;
-    NSIndexPath *lastIndexPath;
-}
-
-@property (nonatomic,retain) NSDictionary * teamDictionary;
-@property (nonatomic,retain) NSArray *fortArray;
-//@property (nonatomic,retain) NSArray *fortSprites;
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
-@end
--- a/cocoaTouch/FortsViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-//
-//  FortsViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 08/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "FortsViewController.h"
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-
-@implementation FortsViewController
-@synthesize teamDictionary, fortArray, lastIndexPath;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-
-    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++) {
-        if (i % 2) {
-            NSString *currentName = [directoryContents objectAtIndex:i];
-            NSString *correctName = [currentName substringToIndex:([currentName length] - 5)];
-            [filteredContents addObject:correctName];
-        } 
-    }
-    self.fortArray = filteredContents;
-    [filteredContents release];
-    
-    /*
-    // this creates a scaled down version of the image
-    NSMutableArray *spriteArray = [[NSMutableArray alloc] initWithCapacity:[fortArray count]];
-    for (NSString *fortName in fortArray) {
-        NSString *fortFile = [[NSString alloc] initWithFormat:@"%@/%@L.png", fortsDirectory, fortName];
-        UIImage *fortSprite = [[UIImage alloc] initWithContentsOfFile:fortFile];
-        [fortFile release];
-        [spriteArray addObject:[fortSprite scaleToSize:CGSizeMake(196,196)]];
-        [fortSprite release];
-    }
-    self.fortSprites = spriteArray;
-    [spriteArray release];
-    */
-    
-    // statically set row height instead of using delegate method for performance reasons
-    self.tableView.rowHeight = 200;
-}
-
-
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    [self.tableView reloadData];
-    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(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 {
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
-                                       reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    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;
-        self.lastIndexPath = indexPath;
-    } else {
-        cell.accessoryType = UITableViewCellAccessoryNone;
-    }
-    
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    
-    if (newRow != oldRow) {
-        // if the two selected rows differ update data on the hog dictionary and reload table content
-        [self.teamDictionary setValue:[fortArray objectAtIndex:newRow] forKey:@"fort"];
-
-        // tell our boss to write this new stuff on disk
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        
-        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
-        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
-        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
-        oldCell.accessoryType = UITableViewCellAccessoryNone;
-        self.lastIndexPath = indexPath;
-        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    }
-    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
-    [self.navigationController popViewControllerAnimated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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 {
-    self.teamDictionary = nil;
-    self.lastIndexPath = nil;
-    self.fortArray = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
-
-- (void)dealloc {
-    [teamDictionary release];
-    [lastIndexPath release];
-    [fortArray release];
-//    [fortSprites release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/GameConfigViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-//
-//  GameConfigViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 18/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class TeamConfigViewController;
-@class MapConfigViewController;
-@class SchemeWeaponConfigViewController;
-
-@interface GameConfigViewController : UIViewController {    
-    UIViewController *activeController;
-    MapConfigViewController *mapConfigViewController;
-    TeamConfigViewController *teamConfigViewController;
-    SchemeWeaponConfigViewController *schemeWeaponConfigViewController;
-}
-
--(IBAction) buttonPressed:(id) sender;
--(IBAction) segmentPressed:(id) sender;
--(void) startGame;
-
-@end
--- a/cocoaTouch/GameConfigViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-    //
-//  GameConfigViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 18/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "GameConfigViewController.h"
-#import "SDL_uikitappdelegate.h"
-#import "CommodityFunctions.h"
-#import "MapConfigViewController.h"
-#import "TeamConfigViewController.h"
-#import "SchemeWeaponConfigViewController.h"
-
-@implementation GameConfigViewController
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return rotationManager(interfaceOrientation);
-}
-
--(IBAction) buttonPressed:(id) sender {
-    // works even if it's not actually a button
-    UIButton *theButton = (UIButton *)sender;
-    switch (theButton.tag) {
-        case 0:
-            [[self parentViewController] dismissModalViewControllerAnimated:YES];
-            break;
-        case 1:
-            [self performSelector:@selector(startGame)
-                       withObject:nil
-                       afterDelay:0.25];
-            break;
-        default:
-            break;
-    }
-}
-
--(IBAction) segmentPressed:(id) sender {
-    UISegmentedControl *theSegment = (UISegmentedControl *)sender;
-
-    switch (theSegment.selectedSegmentIndex) {
-        case 0:
-            // this init here is just aestetic as this controller was already set up in viewDidLoad
-            if (mapConfigViewController == nil) {
-                mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
-            }
-            activeController = mapConfigViewController;
-            break;
-        case 1:
-            if (teamConfigViewController == nil) {
-                teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                // this message is compulsory otherwise the table won't be loaded at all
-            }
-            activeController = teamConfigViewController;
-            break;
-        case 2:
-            if (schemeWeaponConfigViewController == nil) {
-                schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
-            }
-            activeController = schemeWeaponConfigViewController;
-            break;
-    }
-    
-    // this message is compulsory otherwise the table won't be loaded at all
-    [activeController viewWillAppear:NO];      
-    [self.view addSubview:activeController.view];
-}
-
--(void) startGame {
-    // don't start playing if the preview is in progress
-    if ([mapConfigViewController busy]) {
-        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Wait for the Preview",@"")
-                                                        message:NSLocalizedString(@"Before playing the preview needs to be generated",@"")
-                                                       delegate:nil
-                                              cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
-                                              otherButtonTitles:nil];
-        [alert show];
-        [alert release];
-        return;
-    }
-    
-    // play only if there is more than one team
-    if ([teamConfigViewController.listOfSelectedTeams count] < 2) {
-        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too few teams playing",@"")
-                                                        message:NSLocalizedString(@"You need to select at least two teams to play a game",@"")
-                                                       delegate:nil
-                                              cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
-                                              otherButtonTitles:nil];
-        [alert show];
-        [alert release];
-        return;
-    }
-    
-    // play if there's room for enough hogs in the selected map
-    int hogs = 0;
-    for (NSDictionary *teamData in teamConfigViewController.listOfSelectedTeams)
-        hogs += [[teamData objectForKey:@"number"] intValue];
-
-    if (hogs > mapConfigViewController.maxHogs) {
-        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many hogs",@"")
-                                                        message:NSLocalizedString(@"The map you selected is too small for that many hogs",@"")
-                                                       delegate:nil
-                                              cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
-                                              otherButtonTitles:nil];
-        [alert show];
-        [alert release];
-        return;
-    }
-    
-    // create the configuration file that is going to be sent to engine
-    NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:mapConfigViewController.seedCommand,@"seed_command",
-                                                                      mapConfigViewController.templateFilterCommand,@"templatefilter_command",
-                                                                      mapConfigViewController.mapGenCommand,@"mapgen_command",
-                                                                      mapConfigViewController.mazeSizeCommand,@"mazesize_command",
-                                                                      mapConfigViewController.themeCommand,@"theme_command",
-                                                                      teamConfigViewController.listOfSelectedTeams,@"teams_list",
-                                                                      schemeWeaponConfigViewController.selectedScheme,@"scheme",
-                                                                      schemeWeaponConfigViewController.selectedWeapon,@"weapon",
-                                                                      nil];
-    [dict writeToFile:GAMECONFIG_FILE() atomically:YES];
-    [dict release];
-
-    // finally launch game and remove this controller
-    [[self parentViewController] dismissModalViewControllerAnimated:YES];
-    [[SDLUIKitDelegate sharedAppDelegate] startSDLgame];
-}
-
--(void) viewDidLoad {
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
-        if (mapConfigViewController == nil)
-            mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil];
-        if (teamConfigViewController == nil)
-            teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStylePlain];
-        teamConfigViewController.view.frame = CGRectMake(0, 224, 300, 500);
-        teamConfigViewController.view.backgroundColor = [UIColor clearColor];
-        [mapConfigViewController.view addSubview:teamConfigViewController.view];
-        if (schemeWeaponConfigViewController == nil)
-            schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
-        schemeWeaponConfigViewController.view.frame = CGRectMake(362, 224, 300, 500);
-        schemeWeaponConfigViewController.view.backgroundColor = [UIColor clearColor];
-        [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view];
-    } else
-        mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
-    activeController = mapConfigViewController;
-    
-    [self.view addSubview:mapConfigViewController.view];
-    
-    [super viewDidLoad];
-}
-
--(void) viewWillAppear:(BOOL)animated {
-    [mapConfigViewController viewWillAppear:animated];
-    [teamConfigViewController viewWillAppear:animated];
-    [schemeWeaponConfigViewController viewWillAppear:animated];
-    // ADD other controllers here
-     
-    [super viewWillAppear:animated];
-}
-
--(void) viewDidAppear:(BOOL)animated {
-    [mapConfigViewController viewDidAppear:animated];
-    [teamConfigViewController viewDidAppear:animated];
-    [schemeWeaponConfigViewController viewDidAppear:animated];
-    [super viewDidAppear:animated];
-}
-
--(void) didReceiveMemoryWarning {
-    // Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-    // Release any cached data, images, etc that aren't in use.
-    if (mapConfigViewController.view.superview == nil) 
-        mapConfigViewController = nil;
-    if (teamConfigViewController.view.superview == nil)
-        teamConfigViewController = nil;
-    if (schemeWeaponConfigViewController.view.superview == nil)
-        schemeWeaponConfigViewController = nil;
-    activeController = nil;
-    MSG_MEMCLEAN();
-}
-
--(void) viewDidUnload {
-    activeController = nil;
-    mapConfigViewController = nil;
-    teamConfigViewController = nil;
-    schemeWeaponConfigViewController = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [activeController release];
-    [mapConfigViewController release];
-    [teamConfigViewController release];
-    [schemeWeaponConfigViewController release];
-    [super dealloc];
-}
-
-@end
--- a/cocoaTouch/GameSetup.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-//
-//  gameSetup.h
-//  hwengine
-//
-//  Created by Vittorio on 10/01/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import "SDL_net.h"
-
-@interface GameSetup : NSObject {
-	NSDictionary *systemSettings;
-    NSDictionary *gameConfig;
-    
-	NSInteger ipcPort;
-	TCPsocket sd, csd; // Socket descriptor, Client socket descriptor
-}
-
-@property (nonatomic, retain) NSDictionary *systemSettings;
-@property (nonatomic, retain) NSDictionary *gameConfig;
-
--(void) engineProtocol;
--(void) startThread:(NSString *)selector;
--(int)  sendToEngine:(NSString *)string;
--(void) provideTeamData:(NSString *)teamName forHogs:(NSInteger) numberOfPlayingHogs withHealth:(NSInteger) initialHealth ofColor:(NSNumber *)teamColor;
--(void) provideAmmoData:(NSString *)ammostoreName forPlayingTeams:(NSInteger) numberOfTeams;
--(NSInteger) provideScheme:(NSString *)schemeName;
-
--(const char **)getSettings;
-
-@end
--- a/cocoaTouch/GameSetup.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,450 +0,0 @@
-//
-//  gameSetup.m
-//  hwengine
-//
-//  Created by Vittorio on 10/01/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#include <sys/types.h>
-#include <sys/sysctl.h>
-
-#import "GameSetup.h"
-#import "SDL_uikitappdelegate.h"
-#import "SDL_net.h"
-#import "PascalImports.h"
-#import "CommodityFunctions.h"
-
-#define BUFFER_SIZE 256
-#define debug(format, ...) CFShow([NSString stringWithFormat:format, ## __VA_ARGS__]);
-
-@implementation GameSetup
-
-@synthesize systemSettings, gameConfig;
-
--(id) init {
-	if (self = [super init]) {
-        ipcPort = randomPort();
-        
-        // should check they exist and throw and exection if not
-        NSDictionary *dictSett = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()];
-        self.systemSettings = dictSett;
-        [dictSett release];
-        
-        NSDictionary *dictGame = [[NSDictionary alloc] initWithContentsOfFile:GAMECONFIG_FILE()];
-        self.gameConfig = dictGame;
-        [dictGame release];
-    } 
-    return self;
-}
-
--(NSString *)description {
-    return [NSString stringWithFormat:@"ipcport: %d\nsockets: %d,%d\n teams: %@\n systemSettings: %@",ipcPort,sd,csd,gameConfig,systemSettings];
-}
-
--(void) dealloc {
-    [gameConfig release];
-    [systemSettings release];
-	[super dealloc];
-}
-
-#pragma mark -
-#pragma mark Provider functions
-// unpacks team data from the selected team.plist to a sequence of engine commands
--(void) provideTeamData:(NSString *)teamName forHogs:(NSInteger) numberOfPlayingHogs withHealth:(NSInteger) initialHealth ofColor:(NSNumber *)teamColor {
-    /*
-     addteam <32charsMD5hash> <color> <team name>
-     addhh <level> <health> <hedgehog name>
-     <level> is 0 for human, 1-5 for bots (5 is the most stupid)
-    */
-    
-    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@", TEAMS_DIRECTORY(), teamName];
-    NSDictionary *teamData = [[NSDictionary alloc] initWithContentsOfFile:teamFile];
-    [teamFile release];
-    
-    NSString *teamHashColorAndName = [[NSString alloc] initWithFormat:@"eaddteam %@ %@ %@", 
-                                      [teamData objectForKey:@"hash"], [teamColor stringValue], [teamData objectForKey:@"teamname"]];
-    [self sendToEngine: teamHashColorAndName];
-    [teamHashColorAndName release];
-    
-    NSString *grave = [[NSString alloc] initWithFormat:@"egrave %@", [teamData objectForKey:@"grave"]];
-    [self sendToEngine: grave];
-    [grave release];
-    
-    NSString *fort = [[NSString alloc] initWithFormat:@"efort %@", [teamData objectForKey:@"fort"]];
-    [self sendToEngine: fort];
-    [fort release];
-    
-    NSString *voicepack = [[NSString alloc] initWithFormat:@"evoicepack %@", [teamData objectForKey:@"voicepack"]];
-    [self sendToEngine: voicepack];
-    [voicepack release];
-    
-    NSString *flag = [[NSString alloc] initWithFormat:@"eflag %@", [teamData objectForKey:@"flag"]];
-    [self sendToEngine: flag];
-    [flag release];
-    
-    NSArray *hogs = [teamData objectForKey:@"hedgehogs"];
-    for (int i = 0; i < numberOfPlayingHogs; i++) {
-        NSDictionary *hog = [hogs objectAtIndex:i];
-        
-        NSString *hogLevelHealthAndName = [[NSString alloc] initWithFormat:@"eaddhh %@ %d %@", 
-                                           [hog objectForKey:@"level"], initialHealth, [hog objectForKey:@"hogname"]];
-        [self sendToEngine: hogLevelHealthAndName];
-        [hogLevelHealthAndName release];
-        
-        NSString *hogHat = [[NSString alloc] initWithFormat:@"ehat %@", [hog objectForKey:@"hat"]];
-        [self sendToEngine: hogHat];
-        [hogHat release];
-    }
-    
-    [teamData release];
-}
-
-// unpacks ammostore data from the selected ammo.plist to a sequence of engine commands
--(void) provideAmmoData:(NSString *)ammostoreName forPlayingTeams:(NSInteger) numberOfTeams {
-    
-    //NSDictionary *ammoData = [[NSDictionary alloc] initWithContentsOfFile:ammoDataFile];
-    NSDictionary *ammoData = [[NSDictionary alloc] initWithObjectsAndKeys:
-                              @"9391929422199121032235111001201000000211190911",@"ammostore_initialqt",
-                              @"0405040541600655546554464776576666666155501000",@"ammostore_probability",
-                              @"0000000000000205500000040007004000000000200000",@"ammostore_delay",
-                              @"1311110312111111123114111111111111111211101111",@"ammostore_crate", nil];
-    
-    
-    NSString *ammloadt = [[NSString alloc] initWithFormat:@"eammloadt %@", [ammoData objectForKey:@"ammostore_initialqt"]];
-    [self sendToEngine: ammloadt];
-    [ammloadt release];
-    
-    NSString *ammprob = [[NSString alloc] initWithFormat:@"eammprob %@", [ammoData objectForKey:@"ammostore_probability"]];
-    [self sendToEngine: ammprob];
-    [ammprob release];
-    
-    NSString *ammdelay = [[NSString alloc] initWithFormat:@"eammdelay %@", [ammoData objectForKey:@"ammostore_delay"]];
-    [self sendToEngine: ammdelay];
-    [ammdelay release];
-    
-    NSString *ammreinf = [[NSString alloc] initWithFormat:@"eammreinf %@", [ammoData objectForKey:@"ammostore_crate"]];
-    [self sendToEngine: ammreinf];
-    [ammreinf release];
-    
-    // sent twice so it applies to both teams
-    NSString *ammstore = [[NSString alloc] initWithString:@"eammstore"];
-    for (int i = 0; i < numberOfTeams; i++)
-        [self sendToEngine: ammstore];
-    [ammstore release];
-    
-    [ammoData release];
-}
-
-// unpacks scheme data from the selected scheme.plist to a sequence of engine commands
--(NSInteger) provideScheme:(NSString *)schemeName {
-    NSString *schemePath = [[NSString alloc] initWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),schemeName];
-    NSArray *scheme = [[NSArray alloc] initWithContentsOfFile:schemePath];
-    [schemePath release];
-    int result = 0;
-    int i = 0;
-
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x01;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x10;    
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x04;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x08;    
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x20;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x40;    
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x80;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x100;    
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x200;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x400;    
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x800;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x2000;    
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x4000;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x8000;    
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x10000;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x20000;
-    if ([[scheme objectAtIndex:i++] boolValue])
-        result |= 0x80000;    
-
-    NSString *flags = [[NSString alloc] initWithFormat:@"e$gmflags %d",result];
-    [self sendToEngine:flags];
-    [flags release];
-    
-    NSString *dmgMod = [[NSString alloc] initWithFormat:@"e$damagepct %d",[[scheme objectAtIndex:i++] intValue]];
-    [self sendToEngine:dmgMod];
-    [dmgMod release];
-    
-    NSString *turnTime = [[NSString alloc] initWithFormat:@"e$turntime %d",[[scheme objectAtIndex:i++] intValue] * 1000];
-    [self sendToEngine:turnTime];
-    [turnTime release];
-    
-    result = [[scheme objectAtIndex:i++] intValue]; // initial health
-    
-    NSString *sdTime = [[NSString alloc] initWithFormat:@"e$sd_turns %d",[[scheme objectAtIndex:i++] intValue]];
-    [self sendToEngine:sdTime];
-    [sdTime release];
-    
-    NSString *crateDrops = [[NSString alloc] initWithFormat:@"e$casefreq %d",[[scheme objectAtIndex:i++] intValue]];
-    [self sendToEngine:crateDrops];
-    [crateDrops release];
-    
-    NSString *minesTime = [[NSString alloc] initWithFormat:@"e$minestime %d",[[scheme objectAtIndex:i++] intValue] * 1000];
-    [self sendToEngine:minesTime];
-    [minesTime release];
-    
-    NSString *minesNumber = [[NSString alloc] initWithFormat:@"e$landadds %d",[[scheme objectAtIndex:i++] intValue]];
-    [self sendToEngine:minesNumber];
-    [minesNumber release];
-    
-    NSString *dudMines = [[NSString alloc] initWithFormat:@"e$minedudpct %d",[[scheme objectAtIndex:i++] intValue]];
-    [self sendToEngine:dudMines];
-    [dudMines release];
-    
-    NSString *explosives = [[NSString alloc] initWithFormat:@"e$explosives %d",[[scheme objectAtIndex:i++] intValue]];
-    [self sendToEngine:explosives];
-    [explosives release];
-    
-    [scheme release];
-    return result;
-}
-
-#pragma mark -
-#pragma mark Thread/Network relevant code
-// select one of GameSetup method and execute it in a seprate thread
--(void) startThread: (NSString *) selector {
-	SEL usage = NSSelectorFromString(selector);
-	[NSThread detachNewThreadSelector:usage toTarget:self withObject:nil];
-}
-
-// wrapper that computes the length of the message and then sends the command string
--(int) sendToEngine: (NSString *)string {
-	uint8_t length = [string length];
-	
-	SDLNet_TCP_Send(csd, &length , 1);
-	return SDLNet_TCP_Send(csd, [string UTF8String], length);
-}
-
-// method that handles net setup with engine and keeps connection alive
--(void) engineProtocol {
-	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-	IPaddress ip;
-	int eProto;
-	BOOL clientQuit, serverQuit;
-	char buffer[BUFFER_SIZE], string[BUFFER_SIZE];
-	uint8_t msgSize;
-	uint16_t gameTicks;
-
-    serverQuit = NO;
-
-	if (SDLNet_Init() < 0) {
-		NSLog(@"SDLNet_Init: %s", SDLNet_GetError());
-        serverQuit = YES;
-	}
-	
-	// Resolving the host using NULL make network interface to listen
-	if (SDLNet_ResolveHost(&ip, NULL, ipcPort) < 0) {
-		NSLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError());
-        serverQuit = YES;
-	}
-	
-	// Open a connection with the IP provided (listen on the host's port) 
-	if (!(sd = SDLNet_TCP_Open(&ip))) {
-		NSLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), ipcPort);
-        serverQuit = YES;
-	}
-	
-	NSLog(@"engineProtocol - Waiting for a client on port %d", ipcPort);
-	while (!serverQuit) {
-		// This check the sd if there is a pending connection.
-        // If there is one, accept that, and open a new socket for communicating
-		csd = SDLNet_TCP_Accept(sd);
-		if (NULL != csd) {
-			// Now we can communicate with the client using csd socket
-			// sd will remain opened waiting other connections
-			NSLog(@"engineProtocol - Client found");
-			
-			//first byte of the command alwayas contain the size of the command
-			SDLNet_TCP_Recv(csd, &msgSize, sizeof(uint8_t));
-			
-			SDLNet_TCP_Recv(csd, buffer, msgSize);
-			gameTicks = SDLNet_Read16 (&buffer[msgSize - 2]);
-			//NSLog(@"engineProtocol - %d: received [%s]", gameTicks, buffer);
-			
-			if ('C' == buffer[0]) {
-				NSLog(@"engineProtocol - sending game config");
-                
-				// local game
-				[self sendToEngine:@"TL"];
-				
-				// seed info
-				[self sendToEngine:[self.gameConfig objectForKey:@"seed_command"]];
-				
-                // scheme (returns initial health)
-                NSInteger health = [self provideScheme:[self.gameConfig objectForKey:@"scheme"]];
-
-				// dimension of the map
-				[self sendToEngine:[self.gameConfig objectForKey:@"templatefilter_command"]];
-				[self sendToEngine:[self.gameConfig objectForKey:@"mapgen_command"]];
-				[self sendToEngine:[self.gameConfig objectForKey:@"mazesize_command"]];
-
-				// theme info
-				[self sendToEngine:[self.gameConfig objectForKey:@"theme_command"]];
-				
-                NSArray *teamsConfig = [self.gameConfig objectForKey:@"teams_list"];
-                for (NSDictionary *teamData in teamsConfig) {
-                    [self provideTeamData:[teamData objectForKey:@"team"] 
-                                  forHogs:[[teamData objectForKey:@"number"] intValue]
-                               withHealth:health
-                                  ofColor:[teamData objectForKey:@"color"]];
-                }
-                
-                [self provideAmmoData:nil forPlayingTeams:[teamsConfig count]];
-                
-                clientQuit = NO;
-			} else {
-				NSLog(@"engineProtocolThread - wrong message or client closed connection");
-				clientQuit = YES;
-			}
-			
-			while (!clientQuit){
-				msgSize = 0;
-				memset(buffer, 0, BUFFER_SIZE);
-				memset(string, 0, BUFFER_SIZE);
-				if (SDLNet_TCP_Recv(csd, &msgSize, sizeof(uint8_t)) <= 0)
-					clientQuit = YES;
-				if (SDLNet_TCP_Recv(csd, buffer, msgSize) <=0)
-					clientQuit = YES;
-				
-				gameTicks = SDLNet_Read16(&buffer[msgSize - 2]);
-				//NSLog(@"engineProtocolThread - %d: received [%s]", gameTicks, buffer);
-				
-				switch (buffer[0]) {
-					case '?':
-						NSLog(@"Ping? Pong!");
-						[self sendToEngine:@"!"];
-						break;
-					case 'E':
-						NSLog(@"ERROR - last console line: [%s]", buffer);
-						clientQuit = YES;
-						break;
-					case 'e':
-						sscanf(buffer, "%*s %d", &eProto);
-						short int netProto = 0;
-						char *versionStr;
-						
-                        HW_versionInfo(&netProto, &versionStr);
-						if (netProto == eProto) {
-							NSLog(@"Setting protocol version %d (%s)", eProto, versionStr);
-						} else {
-							NSLog(@"ERROR - wrong protocol number: [%s] - expecting %d", buffer, eProto);
-							clientQuit = YES;
-						}
-                        
-						break;
-					case 'i':
-						switch (buffer[1]) {
-							case 'r':
-								NSLog(@"Winning team: %s", &buffer[2]);
-								break;
-							case 'k':
-								NSLog(@"Best Hedgehog: %s", &buffer[2]);
-								break;
-						}
-						break;
-					default:
-						// empty packet or just statistics
-						break;
-					// missing case for exiting right away
-				}
-			}
-			NSLog(@"Engine exited, closing server");
-			// wait a little to let the client close cleanly
-			[NSThread sleepForTimeInterval:2];
-			// Close the client socket
-			SDLNet_TCP_Close(csd);
-			serverQuit = YES;
-		}
-	}
-	
-	SDLNet_TCP_Close(sd);
-	SDLNet_Quit();
-
-    [[NSFileManager defaultManager] removeItemAtPath:GAMECONFIG_FILE() error:NULL];
-    
-	[pool release];
-    //Invoking this method should be avoided as it does not give your thread a chance to clean up any resources it allocated during its execution.
-    //[NSThread exit];
-}
-
-#pragma mark -
-#pragma mark Setting methods
-// returns an array of c-strings that are read by engine at startup
--(const char **)getSettings {
-	NSString *ipcString = [[NSString alloc] initWithFormat:@"%d", ipcPort];
-	NSString *localeString = [[NSString alloc] initWithFormat:@"%@.txt", [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]];
-    CGRect screenBounds = [[UIScreen mainScreen] bounds];
-    NSString *wSize = [[NSString alloc] initWithFormat:@"%d", (int) screenBounds.size.width];
-    NSString *hSize = [[NSString alloc] initWithFormat:@"%d", (int) screenBounds.size.height];
-	const char **gameArgs = (const char**) malloc(sizeof(char *) * 9);
-
-    /*
-    size_t size;
-    // Set 'oldp' parameter to NULL to get the size of the data returned so we can allocate appropriate amount of space
-    sysctlbyname("hw.machine", NULL, &size, NULL, 0); 
-    char *name = malloc(size);
-    // Get the platform name
-    sysctlbyname("hw.machine", name, &size, NULL, 0);
-    NSString *machine = [[NSString alloc] initWithUTF8String:name];
-    free(name);
-    
-   	const char **gameArgs = (const char**) malloc(sizeof(char*) * 9);
-
-    // if the machine is less than iphone 3gs or less than ipod touch 3g use reduced graphics (land array)
-    if ([machine hasPrefix:@"iPhone1"] || ([machine hasPrefix:@"iPod"] && ([machine hasSuffix:@"1,1"] || [machine hasSuffix:@"2,1"])))
-        gameArgs[8] = "1";
-    else
-        gameArgs[8] = "0";
-    [machine release];
-    */
-    
-    // prevents using an empty nickname
-    NSString *username;
-    NSString *originalUsername = [self.systemSettings objectForKey:@"username"];
-    if ([originalUsername length] == 0)
-        username = [[NSString alloc] initWithFormat:@"MobileUser-%@",ipcString];
-    else
-        username = [[NSString alloc] initWithString:originalUsername];
-    
-	gameArgs[0] = [username UTF8String];                                                        //UserNick
-	gameArgs[1] = [ipcString UTF8String];                                                       //ipcPort
-	gameArgs[2] = [[[self.systemSettings objectForKey:@"sound"] stringValue] UTF8String];       //isSoundEnabled
-	gameArgs[3] = [[[self.systemSettings objectForKey:@"music"] stringValue] UTF8String];       //isMusicEnabled
-	gameArgs[4] = [localeString UTF8String];                                                    //cLocaleFName
-	gameArgs[5] = [[[self.systemSettings objectForKey:@"alternate"] stringValue] UTF8String];	//cAltDamage
-	gameArgs[6] = [wSize UTF8String];                                                           //cScreenHeight
-    gameArgs[7] = [hSize UTF8String];                                                           //cScreenWidth
-    gameArgs[8] = NULL;                                                                         //recordFileName
-    
-    [wSize release];
-    [hSize release];
-	[localeString release];
-	[ipcString release];
-    [username release];
-	return gameArgs;
-}
-
-
-@end
--- a/cocoaTouch/GeneralSettingsViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-//
-//  SettingsViewController.h
-//  hwengine
-//
-//  Created by Vittorio on 08/01/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface GeneralSettingsViewController : UITableViewController <UITextFieldDelegate> {
-    NSMutableDictionary *settingsDictionary;
-	UITextField *textFieldBeingEdited;
-	UISwitch *musicSwitch;
-	UISwitch *soundSwitch;
-	UISwitch *altDamageSwitch;
-    BOOL isWriteNeeded;
-}
-
-@property (nonatomic, retain) NSMutableDictionary *settingsDictionary;
-@property (nonatomic, retain) UITextField *textFieldBeingEdited;;
-@property (nonatomic, retain) UISwitch *musicSwitch;
-@property (nonatomic, retain) UISwitch *soundSwitch;
-@property (nonatomic, retain) UISwitch *altDamageSwitch;
-
-#define kNetworkFields 0
-#define kAudioFields 1
-#define kOtherFields 2
-
-@end
--- a/cocoaTouch/GeneralSettingsViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,398 +0,0 @@
-//
-//  SettingsViewController.m
-//  hwengine
-//
-//  Created by Vittorio on 08/01/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "GeneralSettingsViewController.h"
-#import "CommodityFunctions.h"
-
-@implementation GeneralSettingsViewController
-@synthesize settingsDictionary, textFieldBeingEdited, musicSwitch, soundSwitch, altDamageSwitch;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark textfield methods
-// return to previous table
--(void) cancel:(id) sender {
-    if (textFieldBeingEdited != nil)
-        [self.textFieldBeingEdited resignFirstResponder];
-}
-
-// set the new value
--(BOOL) save:(id) sender {
-    if (textFieldBeingEdited != nil) {
-        if (textFieldBeingEdited.tag == 0) {
-            [self.settingsDictionary setObject:textFieldBeingEdited.text forKey:@"username"];
-        } else {
-            [self.settingsDictionary setObject:textFieldBeingEdited.text forKey:@"password"];
-        }
-        
-        isWriteNeeded = YES;
-        [self.textFieldBeingEdited resignFirstResponder];
-        return YES;
-    }
-    return NO;
-}
-
-// the textfield is being modified, update the navigation controller
--(void) textFieldDidBeginEditing:(UITextField *)aTextField{   
-    self.textFieldBeingEdited = aTextField;
-    UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel",@"from the settings table")
-                                                                     style:UIBarButtonItemStylePlain
-                                                                    target:self
-                                                                    action:@selector(cancel:)];
-    self.navigationItem.leftBarButtonItem = cancelButton;
-    [cancelButton release];
-    
-    UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save",@"from the settings table")
-                                                                     style:UIBarButtonItemStyleDone
-                                                                    target:self
-                                                                    action:@selector(save:)];
-    self.navigationItem.rightBarButtonItem = saveButton;
-    [saveButton release];
-}
-
-// the textfield has been modified, check for empty strings and restore original navigation bar
--(void) textFieldDidEndEditing:(UITextField *)aTextField{
-    self.textFieldBeingEdited = nil;
-    self.navigationItem.rightBarButtonItem = self.navigationItem.backBarButtonItem;
-    self.navigationItem.leftBarButtonItem = nil;
-}
-
-// limit the size of the field to 64 characters like in original frontend
--(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
-    int limit = 64;
-    return !([textField.text length] > limit && [string length] > range.length);
-}
-
-
-#pragma mark -
-#pragma mark View Lifecycle
--(void) viewDidLoad {
-	[super viewDidLoad];
-    self.musicSwitch = [[UISwitch alloc] init];
-	self.soundSwitch = [[UISwitch alloc] init];
-	self.altDamageSwitch = [[UISwitch alloc] init];
-	[self.soundSwitch addTarget:self action:@selector(alsoTurnOffMusic:) forControlEvents:UIControlEventValueChanged];
-	[self.musicSwitch addTarget:self action:@selector(dontTurnOnMusic:) forControlEvents:UIControlEventValueChanged];
-	[self.altDamageSwitch addTarget:self action:@selector(justUpdateDictionary:) forControlEvents:UIControlEventValueChanged];
-    
-    NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()];
-    self.settingsDictionary = dictionary;
-    [dictionary release];
-}
-
--(void) viewWillAppear:(BOOL)animated {
-    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
-    isWriteNeeded = NO;
-    
-    musicSwitch.on = [[settingsDictionary objectForKey:@"music"] boolValue];
-    soundSwitch.on = [[settingsDictionary objectForKey:@"sound"] boolValue];
-    altDamageSwitch.on = [[settingsDictionary objectForKey:@"alternate"] boolValue];
-    
-    [super viewWillAppear:animated];
-}
-
--(void) viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-    
-    if (isWriteNeeded) {
-       	NSLog(@"writing preferences to file");
-        [self.settingsDictionary writeToFile:SETTINGS_FILE() atomically:YES];
-        isWriteNeeded = NO;
-    }
-}
-
-#pragma mark -
-// if the sound system is off, turn off also the background music 
--(void) alsoTurnOffMusic:(id) sender {
-    [self.settingsDictionary setObject:[NSNumber numberWithBool:soundSwitch.on] forKey:@"sound"];
-	if (YES == self.musicSwitch.on) {
-		[musicSwitch setOn:NO animated:YES];
-        [self.settingsDictionary setObject:[NSNumber numberWithBool:musicSwitch.on] forKey:@"music"];
-	}
-    isWriteNeeded = YES;
-}
-
-// if the sound system is off, don't enable background music 
--(void) dontTurnOnMusic:(id) sender {
-	if (NO == self.soundSwitch.on) {
-		[musicSwitch setOn:NO animated:YES];
-	} else {
-        [self.settingsDictionary setObject:[NSNumber numberWithBool:musicSwitch.on] forKey:@"music"];
-        isWriteNeeded = YES;
-    }
-}
-
--(void) justUpdateDictionary:(id) sender {
-    UISwitch *theSwitch = (UISwitch *)sender;
-    [self.settingsDictionary setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"alternate"];
-    isWriteNeeded = YES;
-}
-
-/*
-#pragma mark -
-#pragma mark UIActionSheet Methods
--(IBAction) deleteData: (id)sender {
-	UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
-								 delegate:self
-							cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
-						   destructiveButtonTitle:NSLocalizedString(@"As sure as I can be!", @"")
-							otherButtonTitles:nil];
-	[actionSheet showInView:self.view];
-	[actionSheet release];
-}
-
--(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
-	if ([actionSheet cancelButtonIndex] != buttonIndex) {
-		// get the documents dirctory
-		NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
-		NSString *documentsDirectory = [paths objectAtIndex:0];
-		
-		// get the content of the directory
-		NSFileManager *fm = [NSFileManager defaultManager];
-		NSArray *dirContent = [fm directoryContentsAtPath:documentsDirectory];
-		NSError *error;
-		
-		// delete data
-		for (NSString *fileName in dirContent) {
-			[fm removeItemAtPath:[documentsDirectory stringByAppendingPathComponent:fileName] error:&error];
-		}
-		
-		// force resetting
-		UIAlertView *anAlert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Hit Home Button to Exit", @"")
-								  message:NSLocalizedString(@"\nEverything is gone!\nNow you need to restart the game...", @"")
-								 delegate:self
-							cancelButtonTitle:nil
-							otherButtonTitles:nil];
-		[anAlert show];
-		[anAlert release];
-	}
-}
-*/
-
-#pragma mark -
-#pragma mark TableView Methods
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-	return 3;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-	switch (section) {
-		case kNetworkFields:
-			return 2;
-			break;
-		case kAudioFields:
-			return 2;
-			break;
-		case kOtherFields:
-			return 1;
-			break;
-		default:
-			break;
-	}
-	return 0;
-}
-
--(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-	static NSString *cellIdentifier = @"systemSettingsCell";
-	NSInteger row = [indexPath row];
-    NSInteger section = [indexPath section];
-    
-	UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:cellIdentifier];
-    if (nil == cell) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier] autorelease];
-        if (section == kNetworkFields) {
-            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(-15, 10, 100, 25)];
-            label.textAlignment = UITextAlignmentRight;
-            label.backgroundColor = [UIColor clearColor];
-            label.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
-            if (row == 0) 
-                label.text = NSLocalizedString(@"Nickname","from the settings table");
-            else 
-                label.text = NSLocalizedString(@"Password","from the settings table");
-            [cell.contentView addSubview:label];
-            [label release];
-            
-            UITextField *aTextField = [[UITextField alloc] initWithFrame:
-                                       CGRectMake(110, 12, (cell.frame.size.width + cell.frame.size.width/3) - 90, 25)];
-            aTextField.clearsOnBeginEditing = NO;
-            aTextField.returnKeyType = UIReturnKeyDone;
-            aTextField.adjustsFontSizeToFitWidth = YES;
-            aTextField.delegate = self;
-            aTextField.tag = row;
-            aTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
-            [aTextField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
-            [cell.contentView addSubview:aTextField];
-            [aTextField release];
-        }
-    }
-    
-    cell.accessoryType = UITableViewCellAccessoryNone;
-    cell.selectionStyle = UITableViewCellSelectionStyleNone;
-    cell.imageView.image = nil;
-    
-    UITextField *aTextField;
-    switch (section) {
-        case kNetworkFields:
-            for (UIView *oneView in cell.contentView.subviews) 
-                if ([oneView isMemberOfClass:[UITextField class]]) 
-                    aTextField = (UITextField *)oneView;
-
-            switch (row) {
-				case 0:                    
-                    aTextField.placeholder = NSLocalizedString(@"Insert your username (if you have one)",@"");
-                    aTextField.text = [self.settingsDictionary objectForKey:@"username"];
-					break;
-				case 1:                    
-                    aTextField.placeholder = NSLocalizedString(@"Insert your password",@"");
-                    aTextField.text = [self.settingsDictionary objectForKey:@"password"];
-                    aTextField.secureTextEntry = YES;
-					break;
-				default:
-					break;
-			}
-			break;
-            
-		case kAudioFields:
-			switch (row) {
-				case 0:
-					cell.textLabel.text = NSLocalizedString(@"Sound", @"");
-					cell.accessoryView = soundSwitch;
-					break;
-				case 1:
-					cell.textLabel.text = NSLocalizedString(@"Music", @"");
-					cell.accessoryView = musicSwitch;
-					break;
-				default:
-					break;
-			}
-			break;
-            
-		case kOtherFields:
-            cell.selectionStyle = UITableViewCellSelectionStyleNone;
-			cell.textLabel.text = NSLocalizedString(@"Alternate Damage", @"");
-			cell.accessoryView = altDamageSwitch;
-			break;
-		default:
-			break;
-	}
-	return cell;
-}
-
--(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
-    NSString *sectionTitle = nil;
-    switch (section) {
-		case kNetworkFields:
-			sectionTitle = NSLocalizedString(@"Network Configuration", @"");
-			break;
-		case kAudioFields:
-			sectionTitle = NSLocalizedString(@"Audio Preferences", @"");
-			break;
-		case kOtherFields:
-			sectionTitle = NSLocalizedString(@"Other Settings", @"");
-			break;
-		default:
-			NSLog(@"Nope");
-			break;
-	}
-    return sectionTitle;
-}
-
-/*
--(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
-	UIView *containerView =	[[[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)] autorelease];
-	UILabel *headerLabel = [[[UILabel alloc] initWithFrame:CGRectMake(10, 20, 300, 40)] autorelease];
-	headerLabel.textColor = [UIColor lightGrayColor];
-	headerLabel.shadowColor = [UIColor blackColor];
-	headerLabel.shadowOffset = CGSizeMake(0, 1);
-	headerLabel.font = [UIFont boldSystemFontOfSize:20];
-	headerLabel.backgroundColor = [UIColor clearColor];
-
-	switch (section) {
-		case kNetworkFields:
-			headerLabel.text = NSLocalizedString(@"Network Configuration", @"");
-			break;
-		case kAudioFields:
-			headerLabel.text = NSLocalizedString(@"Audio Preferences", @"");
-			break;
-		case kOtherFields:
-			headerLabel.text = NSLocalizedString(@"Other Settings", @"");
-			break;
-		default:
-			NSLog(@"Warning: unset case value in titleForHeaderInSection!");
-			headerLabel.text = @"!";
-			break;
-	}
-	
-	[containerView addSubview:headerLabel];
-	return containerView;
-}
-
--(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-	if (kAudioFields == [indexPath section] && 2 == [indexPath row])
-		return volumeCell.frame.size.height;
-	else
-		return table.rowHeight;
-}
-
--(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
-	return 57.0;
-}
-*/
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    UITableViewCell *cell;
-    if (kNetworkFields == [indexPath section]) {
-        cell = [aTableView cellForRowAtIndexPath:indexPath];
-        for (UIView *oneView in cell.contentView.subviews) {
-            if ([oneView isMemberOfClass:[UITextField class]]) {
-                textFieldBeingEdited = (UITextField *)oneView;
-                [textFieldBeingEdited becomeFirstResponder];
-            }
-        }
-        [aTableView deselectRowAtIndexPath:indexPath animated:NO];
-    }
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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 {
-    self.settingsDictionary = nil;
-	self.textFieldBeingEdited = nil;
-	self.musicSwitch = nil;
-	self.soundSwitch = nil;
-	self.altDamageSwitch = nil;
-	[super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [settingsDictionary release];
-	[textFieldBeingEdited release];
-	[musicSwitch release];
-	[soundSwitch release];
-	[altDamageSwitch release];
-	[super dealloc];
-}
-
-
-@end
--- a/cocoaTouch/GravesViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-//
-//  GravesViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface GravesViewController : UITableViewController {
-    NSMutableDictionary *teamDictionary;
-    
-    NSArray *graveArray;
-    NSIndexPath *lastIndexPath;
-}
-
-@property (nonatomic,retain) NSMutableDictionary *teamDictionary;
-@property (nonatomic,retain) NSArray *graveArray;
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
-
-@end
--- a/cocoaTouch/GravesViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-//
-//  GravesViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "GravesViewController.h"
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-
-@implementation GravesViewController
-@synthesize teamDictionary, graveArray, lastIndexPath;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-
-    // load all the grave names and store them into graveArray
-    self.graveArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:GRAVES_DIRECTORY() error:NULL];
-}
-
--(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];
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [self.graveArray count];
-}
-
-// Customize the appearance of table view cells.
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil)
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    
-    NSString *grave = [self.graveArray objectAtIndex:[indexPath row]];
-    cell.textLabel.text = [grave stringByDeletingPathExtension];
-    
-    if ([grave isEqualToString:[self.teamDictionary objectForKey:@"grave"]]) {
-        cell.accessoryType = UITableViewCellAccessoryCheckmark;
-        self.lastIndexPath = indexPath;
-    } 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];
-    
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    
-    if (newRow != oldRow) {
-        [teamDictionary setObject:[[graveArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"grave"];
-        
-        // tell our boss to write this new stuff on disk
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        
-        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
-        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
-        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
-        oldCell.accessoryType = UITableViewCellAccessoryNone;
-        self.lastIndexPath = indexPath;
-        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    }
-    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
-    [self.navigationController popViewControllerAnimated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
-- (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 {
-    self.lastIndexPath = nil;
-    self.teamDictionary = nil;
-    self.graveArray = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
-- (void)dealloc {
-    [graveArray release];
-    [teamDictionary release];
-    [lastIndexPath release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/HogHatViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-//
-//  HogHatViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface HogHatViewController : UITableViewController {
-    NSDictionary *teamDictionary;
-    NSInteger selectedHog;
-    
-    NSArray *hatArray;
-    UIImage *normalHogSprite;
-    NSIndexPath *lastIndexPath;
-}
-
-@property (nonatomic,retain) NSDictionary *teamDictionary;
-@property (nonatomic) NSInteger selectedHog;
-@property (nonatomic,retain) NSArray *hatArray;
-@property (nonatomic,retain) UIImage *normalHogSprite;
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
-
-@end
--- a/cocoaTouch/HogHatViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,149 +0,0 @@
-//
-//  HogHatViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "HogHatViewController.h"
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-
-@implementation HogHatViewController
-@synthesize teamDictionary, hatArray, normalHogSprite, lastIndexPath, selectedHog;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
-- (void)viewDidLoad {
-    [super viewDidLoad];
-
-    // load all the hat file names and store them into hatArray
-    NSString *hatsDirectory = HATS_DIRECTORY();
-    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 *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
-    [normalHogFile release];
-    self.normalHogSprite = hogSprite;
-    [hogSprite release];
-}
-
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    self.title = [[[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog] objectForKey:@"hogname"];
-
-    // this updates the hog name and its hat
-    [self.tableView reloadData];
-    // this moves the tableview to the top
-    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [self.hatArray count];
-}
-
-// Customize the appearance of table view cells.
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    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 *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;
-    } else {
-        cell.accessoryType = UITableViewCellAccessoryNone;
-    }
-
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
-- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    
-    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
-        NSDictionary *oldHog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog];
-        
-        NSMutableDictionary *newHog = [[NSMutableDictionary alloc] initWithDictionary: oldHog];
-        [newHog setObject:[[hatArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"hat"];
-        [[teamDictionary objectForKey:@"hedgehogs"] replaceObjectAtIndex:selectedHog withObject:newHog];
-        [newHog release];
-        
-        // tell our boss to write this new stuff on disk
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        
-        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
-        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
-        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
-        oldCell.accessoryType = UITableViewCellAccessoryNone;
-        self.lastIndexPath = indexPath;
-        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    } 
-    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
-    [self.navigationController popViewControllerAnimated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
-- (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 {
-    self.lastIndexPath = nil;
-    self.normalHogSprite = nil;
-    self.teamDictionary = nil;
-    self.hatArray = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
-- (void)dealloc {
-    [hatArray release];
-    [teamDictionary release];
-    [normalHogSprite release];
-    [lastIndexPath release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/LevelViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-//
-//  LevelViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface LevelViewController : UITableViewController {
-    NSDictionary *teamDictionary;
-    
-    NSArray *levelArray;
-    NSArray *levelSprites;
-    NSIndexPath *lastIndexPath;
-}
-
-@property (nonatomic,retain) NSDictionary *teamDictionary;
-@property (nonatomic,retain) NSArray *levelArray;
-@property (nonatomic,retain) NSArray *levelSprites;
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
-
-@end
--- a/cocoaTouch/LevelViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-//
-//  LevelViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "LevelViewController.h"
-#import "CommodityFunctions.h"
-
-
-@implementation LevelViewController
-@synthesize teamDictionary, levelArray, levelSprites, lastIndexPath;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
-- (void)viewDidLoad {
-    [super viewDidLoad];
-
-    NSArray *array = [[NSArray alloc] initWithObjects:
-                      NSLocalizedString(@"Human",@""),
-                      NSLocalizedString(@"Brutal",@""),
-                      NSLocalizedString(@"Aggressive",@""),
-                      NSLocalizedString(@"Bully",@""),
-                      NSLocalizedString(@"Average",@""),
-                      NSLocalizedString(@"Weaky",@""),
-                      nil];
-    self.levelArray = array;
-    [array 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];
-}
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [self.levelArray count];
-}
-
-// Customize the appearance of table view cells.
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier = @"Cell";
-    
-    NSInteger row = [indexPath row];
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    cell.textLabel.text = [levelArray objectAtIndex:row];
-    NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0];
-    if ([[hog objectForKey:@"level"] intValue] == row) {
-        cell.accessoryType = UITableViewCellAccessoryCheckmark;
-        self.lastIndexPath = indexPath;
-    } else {
-        cell.accessoryType = UITableViewCellAccessoryNone;
-    }
-    
-    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;
-}
-
-
-/*
-// 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 {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    
-    if (newRow != oldRow) {
-        NSMutableArray *hogs = [teamDictionary objectForKey:@"hedgehogs"];
-        
-        for (NSMutableDictionary *hog in hogs) {
-            [hog setObject:[NSNumber numberWithInt:newRow] forKey:@"level"];
-        }
-        
-        // tell our boss to write this new stuff on disk
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        [self.tableView reloadData];
-        
-        self.lastIndexPath = indexPath;
-        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    }
-    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
-    [self.navigationController popViewControllerAnimated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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 {
-    self.lastIndexPath = nil;
-    self.teamDictionary = nil;
-    self.levelArray = nil;
-    self.levelSprites = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [levelArray release];
-    [levelSprites release];
-    [teamDictionary release];
-    [lastIndexPath release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/MainMenuViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-//
-//  MainMenuViewController.h
-//  hwengine
-//
-//  Created by Vittorio on 08/01/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class SplitViewRootController;
-@class GameConfigViewController;
-
-@interface MainMenuViewController : UIViewController {
-    UILabel *versionLabel;
-    SplitViewRootController *settingsViewController;
-    GameConfigViewController *gameConfigViewController;
-}
-
-@property (nonatomic,retain) IBOutlet UILabel *versionLabel;
-
--(IBAction) switchViews:(id)sender;
-@end
--- a/cocoaTouch/MainMenuViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-//
-//  MainMenuViewController.m
-//  hwengine
-//
-//  Created by Vittorio on 08/01/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "MainMenuViewController.h"
-#import "SDL_uikitappdelegate.h"
-#import "PascalImports.h"
-#import "GameConfigViewController.h"
-#import "SplitViewRootController.h"
-#import "CommodityFunctions.h"
-
-@implementation MainMenuViewController
-@synthesize versionLabel;
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-- (void)didReceiveMemoryWarning {
-	// Releases the view if it doesn't have a superview.
-	[super didReceiveMemoryWarning];
-    if (settingsViewController.view.superview == nil) 
-        settingsViewController = nil;
-    if (gameConfigViewController.view.superview == nil) 
-        gameConfigViewController = nil;
-    MSG_MEMCLEAN();
-}
-
--(void) viewDidLoad {
-    char *ver;
-    HW_versionInfo(NULL, &ver);
-    NSString *versionNumber = [[NSString alloc] initWithCString:ver];
-    self.versionLabel.text = versionNumber;
-    [versionNumber release];
-
-    // listen to request to remove the modalviewcontroller
-    [[NSNotificationCenter defaultCenter] addObserver:self
-                                             selector:@selector(dismissModalViewController)
-                                                 name: @"dismissModalView" 
-                                               object:nil];
-    
-    // initialize some files the first time we load the game
-	if (!([[NSFileManager defaultManager] fileExistsAtPath:SETTINGS_FILE()])) 
-        [NSThread detachNewThreadSelector:@selector(checkFirstRun) toTarget:self withObject:nil];
-    
-	[super viewDidLoad];
-}
-
-// this is called to verify whether it's the first time the app is launched
-// if it is it blocks user interaction with an alertView until files are created
--(void) checkFirstRun {
-	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    NSLog(@"First time run, creating settings files at %@", SETTINGS_FILE());
-    
-    // show a popup with an indicator to make the user wait
-    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Please wait",@"")
-                                                    message:nil
-                                                   delegate:nil
-                                          cancelButtonTitle:nil
-                                          otherButtonTitles:nil];
-    [alert show];
-    
-    UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] 
-                                          initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
-    indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50);
-    [indicator startAnimating];
-    [alert addSubview:indicator];
-    [indicator release];
-    
-    // create a team
-    createTeamNamed(@"Pirates");
-    createTeamNamed(@"Ninjas");
-    
-    createSchemeNamed(@"Default");
-    
-    // create settings.plist
-    NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
-
-    [saveDict setObject:@"" forKey:@"username"];
-    [saveDict setObject:@"" forKey:@"password"];
-    [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"music"];
-    [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"sound"];
-    [saveDict setObject:[NSNumber numberWithBool:NO] forKey:@"alternate"];
-
-    [saveDict writeToFile:SETTINGS_FILE() atomically:YES];
-    [saveDict release];    
-    
-    // ok let the user take control
-    [alert dismissWithClickedButtonIndex:0 animated:YES];
-    [alert release];
-
-	[pool release];
-	[NSThread exit];
-}
-
-#pragma mark -
--(IBAction) switchViews:(id) sender {
-    UIButton *button = (UIButton *)sender;
-    UIAlertView *alert;
-    NSString *debugStr, *configNibName;
-
-    switch (button.tag) {
-        case 0:
-            // bug in UIModalTransitionStylePartialCurl, displays the controller awkwardly if it is not allocated every time
-            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-                configNibName = @"GameConfigViewController-iPad";
-            else
-                configNibName = @"GameConfigViewController-iPhone";
-            
-            gameConfigViewController = [[GameConfigViewController alloc] initWithNibName:configNibName bundle:nil];        
-#ifdef __IPHONE_3_2
-            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-                gameConfigViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
-#endif
-            [self presentModalViewController:gameConfigViewController animated:YES];
-            break;
-        case 2:
-            if (nil == settingsViewController) {
-                settingsViewController = [[SplitViewRootController alloc] initWithNibName:nil bundle:nil];
-                settingsViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
-            }
-            
-            [self presentModalViewController:settingsViewController animated:YES];
-            break;
-        case 3:
-            debugStr = [[NSString alloc] initWithContentsOfFile:DEBUG_FILE()];
-            UITextView *scroll = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)];
-            scroll.text = debugStr;
-            [debugStr release];
-            scroll.editable = NO;
-            
-            UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
-            [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside];
-            btn.backgroundColor = [UIColor blackColor];
-            btn.frame = CGRectMake(self.view.frame.size.height-70, 0, 70, 70);
-            [scroll addSubview:btn];
-            [self.view addSubview:scroll];
-            [scroll release];
-            break;
-        default:
-            alert = [[UIAlertView alloc] initWithTitle:@"Not Yet Implemented"
-                                               message:@"Sorry, this feature is not yet implemented"
-                                              delegate:nil
-                                     cancelButtonTitle:@"Well, don't worry"
-                                     otherButtonTitles:nil];
-            [alert show];
-            [alert release];
-            break;
-    }
-}
-
-// allows child controllers to return to the main controller
--(void) dismissModalViewController {
-    [self dismissModalViewControllerAnimated:YES];
-}
-
-
--(void) viewDidUnload {
-    self.versionLabel = nil;
-    gameConfigViewController = nil;
-    settingsViewController = nil;
-	[super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [versionLabel release];
-    [settingsViewController release];
-    [gameConfigViewController release];
-	[super dealloc];
-}
-
-@end
--- a/cocoaTouch/MapConfigViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-//
-//  MapConfigViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 22/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-#import "SDL_net.h"
-
-@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
-    TCPsocket sd, csd;
-    NSInteger oldValue;  //slider
-    NSInteger oldPage;   //segmented control
-    BOOL busy;
-    
-    // objects read (mostly) by parent view
-    NSInteger maxHogs;
-    NSString *seedCommand;
-    NSString *templateFilterCommand;
-    NSString *mapGenCommand;
-    NSString *mazeSizeCommand;
-    NSString *themeCommand;
-   
-    // various widgets in the view
-    UIButton *previewButton;
-    UITableView *tableView;
-    UILabel *maxLabel;
-    UILabel *sizeLabel;
-    UISegmentedControl *segmentedControl;
-    UISlider *slider;
-    
-    // internal objects
-    NSIndexPath *lastIndexPath;
-    NSArray *themeArray;
-    NSArray *mapArray;
-}
-
-@property (nonatomic) NSInteger maxHogs;
-@property (nonatomic) BOOL busy;
-@property (nonatomic,retain) NSString *seedCommand;
-@property (nonatomic,retain) NSString *templateFilterCommand;
-@property (nonatomic,retain) NSString *mapGenCommand;
-@property (nonatomic,retain) NSString *mazeSizeCommand;
-@property (nonatomic,retain) NSString *themeCommand;
-
-@property (nonatomic,retain) IBOutlet UIButton *previewButton;
-@property (nonatomic,retain) IBOutlet UITableView *tableView;
-@property (nonatomic,retain) IBOutlet UILabel *maxLabel;
-@property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
-@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
-@property (nonatomic,retain) IBOutlet UISlider *slider;
-
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
-@property (nonatomic,retain) NSArray *themeArray;
-@property (nonatomic,retain) NSArray *mapArray;
-
--(IBAction) updatePreview;
--(IBAction) sliderChanged:(id) sender;
--(IBAction) sliderEndedChanging:(id) sender;
--(IBAction) segmentedControlChanged:(id) sender;
--(void) turnOnWidgets;
--(void) turnOffWidgets;
--(void) setLabelText:(NSString *)str;
--(void) setButtonImage:(UIImage *)img;
-
--(const uint8_t *)engineProtocol:(NSInteger) port;
-
-@end
--- a/cocoaTouch/MapConfigViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,565 +0,0 @@
-//
-//  MapConfigViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 22/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "MapConfigViewController.h"
-#import "PascalImports.h"
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-#import "SDL_net.h"
-#import <pthread.h>
-
-#define INDICATOR_TAG 7654
-
-@implementation MapConfigViewController
-@synthesize previewButton, maxHogs, seedCommand, templateFilterCommand, mapGenCommand, mazeSizeCommand, themeCommand,
-            tableView, maxLabel, sizeLabel, segmentedControl, slider, lastIndexPath, themeArray, mapArray, busy;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return rotationManager(interfaceOrientation);
-}
-
-#pragma mark -
-#pragma mark Preview Handling
--(int) sendToEngine: (NSString *)string {
-	unsigned char length = [string length];
-	
-	SDLNet_TCP_Send(csd, &length , 1);
-	return SDLNet_TCP_Send(csd, [string UTF8String], length);
-}
-
--(const uint8_t *)engineProtocol:(NSInteger) port {
-	IPaddress ip;
-	BOOL serverQuit = NO;
-    static uint8_t map[128*32];
-    
-	if (SDLNet_Init() < 0) {
-		NSLog(@"SDLNet_Init: %s", SDLNet_GetError());
-        serverQuit = YES;
-	}
-	
-	// Resolving the host using NULL make network interface to listen
-	if (SDLNet_ResolveHost(&ip, NULL, port) < 0) {
-		NSLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError());
-        serverQuit = YES;
-	}
-	
-	// Open a connection with the IP provided (listen on the host's port)
-	if (!(sd = SDLNet_TCP_Open(&ip))) {
-		NSLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), port);
-        serverQuit = YES;
-	}
-	
-    // launch the preview here so that we're sure the tcp channel is open
-    pthread_t thread_id;
-    pthread_create(&thread_id, NULL, (void *)GenLandPreview, (void *)port);
-    pthread_detach(thread_id);
-    
-	DLog(@"Waiting for a client on port %d", port);
-	while (!serverQuit) {
-		/* This check the sd if there is a pending connection.
-		 * If there is one, accept that, and open a new socket for communicating */
-		csd = SDLNet_TCP_Accept(sd);
-		if (NULL != csd) {			
-			DLog(@"Client found");
-            
-            [self sendToEngine:self.seedCommand];
-            [self sendToEngine:self.templateFilterCommand];
-            [self sendToEngine:self.mapGenCommand];
-            [self sendToEngine:self.mazeSizeCommand];
-            [self sendToEngine:@"!"];
-                
-            memset(map, 0, 128*32);
-            SDLNet_TCP_Recv(csd, map, 128*32);
-            SDLNet_TCP_Recv(csd, &maxHogs, sizeof(uint8_t));
-
-			SDLNet_TCP_Close(csd);
-			serverQuit = YES;
-		}
-	}
-	
-	SDLNet_TCP_Close(sd);
-	SDLNet_Quit();
-    return map;
-}
-
--(void) drawingThread {
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-    
-    // select the port for IPC and launch the preview generation through engineProtocol:
-    int port = randomPort();
-    const uint8_t *map = [self engineProtocol:port];
-    uint8_t mapExp[128*32*8];
-
-    // draw the buffer (1 pixel per component, 0= transparent 1= color)
-    int k = 0;
-    for (int i = 0; i < 32*128; i++) {
-        unsigned char byte = map[i];
-        for (int j = 0; j < 8; j++) {
-            // select the color based on the leftmost bit
-            if ((byte & 0x80) != 0)
-                mapExp[k] = 100;
-            else
-                mapExp[k] = 255;
-            // shift to next bit
-            byte <<= 1;
-            k++;
-        }
-    }
-    CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceGray();
-    CGContextRef bitmapImage = CGBitmapContextCreate(mapExp, 256, 128, 8, 256, colorspace, kCGImageAlphaNone);
-    CGColorSpaceRelease(colorspace);
-    
-    CGImageRef previewCGImage = CGBitmapContextCreateImage(bitmapImage);
-    UIImage *previewImage = [[UIImage alloc] initWithCGImage:previewCGImage];
-    CGImageRelease(previewCGImage);
-
-    // set the preview image (autoreleased) in the button and the maxhog label on the main thread to prevent a leak
-    [self performSelectorOnMainThread:@selector(setButtonImage:) withObject:[[previewImage retain] makeRoundCornersOfSize:CGSizeMake(12, 12)] waitUntilDone:NO];
-    [self performSelectorOnMainThread:@selector(setLabelText:) withObject:[NSString stringWithFormat:@"%d", maxHogs] waitUntilDone:NO];
-    
-    // restore functionality of button and remove the spinning wheel on the main thread to prevent a leak
-    [self performSelectorOnMainThread:@selector(turnOnWidgets) withObject:nil waitUntilDone:NO];
-    
-    [pool release];
-    //Invoking this method should be avoided as it does not give your thread a chance to clean up any resources it allocated during its execution.
-    //[NSThread exit];
-
-    /*
-    // http://developer.apple.com/mac/library/qa/qa2001/qa1037.html
-    UIGraphicsBeginImageContext(CGSizeMake(256,128));      
-    CGContextRef context = UIGraphicsGetCurrentContext();       
-    UIGraphicsPushContext(context);  
-
-    CGContextSetRGBFillColor(context, 0.5, 0.5, 0.7, 1.0);
-    CGContextFillRect(context,CGRectMake(xc,yc,1,1));
-    
-    UIGraphicsPopContext();
-    UIImage *previewImage = UIGraphicsGetImageFromCurrentImageContext();
-    UIGraphicsEndImageContext();
-    */
-}
-
--(IBAction) updatePreview {
-    // don't generate a new preview while it's already generating one
-    if (busy)
-        return;
-    
-    // generate a seed
-    CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
-    NSString *seed = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid);
-    CFRelease(uuid);
-    NSString *seedCmd = [[NSString alloc] initWithFormat:@"eseed {%@}", seed];
-    [seed release];
-    self.seedCommand = seedCmd;
-    [seedCmd release];
-    
-    NSIndexPath *theIndex;
-    if (segmentedControl.selectedSegmentIndex != 1) {
-        // prevent other events and add an activity while the preview is beign generated
-        [self turnOffWidgets];
-        
-        // remove the current preview
-        [self.previewButton setImage:nil forState:UIControlStateNormal];
-        
-        // add a very nice spinning wheel
-        UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] 
-                                              initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
-        indicator.center = CGPointMake(previewButton.bounds.size.width / 2, previewButton.bounds.size.height / 2);
-        indicator.tag = INDICATOR_TAG;
-        [indicator startAnimating];
-        [self.previewButton addSubview:indicator];
-        [indicator release];
-        
-        // let's draw in a separate thread so the gui can work; at the end it restore other widgets
-        [NSThread detachNewThreadSelector:@selector(drawingThread) toTarget:self withObject:nil];
-    
-        theIndex = [NSIndexPath indexPathForRow:(random()%[self.themeArray count]) inSection:0];
-    } else {
-        theIndex = [NSIndexPath indexPathForRow:(random()%[self.mapArray count]) inSection:0];
-    }
-    [self.tableView reloadData];
-    [self tableView:self.tableView didSelectRowAtIndexPath:theIndex];
-    [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionNone animated:YES];
-}
-
--(void) updatePreviewWithMap:(NSInteger) index {
-    // change the preview button
-    NSString *fileImage = [[NSString alloc] initWithFormat:@"%@/%@/preview.png", MAPS_DIRECTORY(),[self.mapArray objectAtIndex:index]];
-    UIImage *image = [[UIImage alloc] initWithContentsOfFile:fileImage];
-    [fileImage release];
-    [self.previewButton setImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal];
-
-    // update label
-    maxHogs = 18;
-    NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg", MAPS_DIRECTORY(),[self.mapArray objectAtIndex:index]];
-    NSString *contents = [[NSString alloc] initWithContentsOfFile:fileCfg encoding:NSUTF8StringEncoding error:NULL];
-    [fileCfg release];
-    NSArray *split = [contents componentsSeparatedByString:@"\n"];
-
-    // if the number is not set we keep 18 standard; 
-    // sometimes it's not set but there are trailing characters, we get around them with the second equation
-    if ([split count] > 1 && [[split objectAtIndex:1] intValue] > 0)
-        maxHogs = [[split objectAtIndex:1] intValue];
-    [contents release];
-    NSString *max = [[NSString alloc] initWithFormat:@"%d",maxHogs];
-    self.maxLabel.text = max;
-    [max release];
-}
-
--(void) turnOffWidgets {
-    busy = YES;
-    self.previewButton.alpha = 0.5f;
-    self.previewButton.enabled = NO;
-    self.maxLabel.text = @"...";
-    self.segmentedControl.enabled = NO;
-    self.slider.enabled = NO;
-}
-
--(void) turnOnWidgets {
-    self.previewButton.alpha = 1.0f;
-    self.previewButton.enabled = YES;
-    self.segmentedControl.enabled = YES;
-    self.slider.enabled = YES;
-    busy = NO;
-    
-    UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)[self.previewButton viewWithTag:INDICATOR_TAG];
-    if (indicator) {
-        [indicator stopAnimating];
-        [indicator removeFromSuperview];
-    }
-}
- 
--(void) setLabelText:(NSString *)str {
-    self.maxLabel.text = str;
-}
-
--(void) setButtonImage:(UIImage *)img {
-    [self.previewButton setBackgroundImage:img forState:UIControlStateNormal];
-}
-
--(void) restoreBackgroundImage {
-    // white rounded rectangle as background image for previewButton
-    UIGraphicsBeginImageContext(CGSizeMake(256,128));      
-    CGContextRef context = UIGraphicsGetCurrentContext();       
-    UIGraphicsPushContext(context);  
-
-    CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0);
-    CGContextFillRect(context,CGRectMake(0,0,256,128));
-    
-    UIGraphicsPopContext();
-    UIImage *bkgImg = UIGraphicsGetImageFromCurrentImageContext();
-    UIGraphicsEndImageContext();
-    [self.previewButton setBackgroundImage:[[bkgImg retain] makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal];
-}
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger) tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger) section {
-    if (self.segmentedControl.selectedSegmentIndex != 1)
-        return [themeArray count];
-    else
-        return [mapArray count];
-}
-
--(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier = @"Cell";
-    NSInteger row = [indexPath row];
-    
-    UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) 
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    
-    if (self.segmentedControl.selectedSegmentIndex != 1) {
-        // the % prevents a strange bug that occurs sporadically
-        NSString *themeName = [self.themeArray objectAtIndex:row % [self.themeArray count]];
-        cell.textLabel.text = themeName;
-        UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/icon.png",THEMES_DIRECTORY(),themeName]];
-        cell.imageView.image = image;
-        [image release];
-    } else {
-        cell.textLabel.text = [self.mapArray objectAtIndex:row];
-        cell.imageView.image = nil;
-    }
-    
-    if (row == [self.lastIndexPath row]) 
-        cell.accessoryType = UITableViewCellAccessoryCheckmark;
-    else
-        cell.accessoryType = UITableViewCellAccessoryNone;
-
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    
-    if (newRow != oldRow) {
-        if (self.segmentedControl.selectedSegmentIndex != 1) {
-            NSString *theme = [self.themeArray objectAtIndex:newRow];
-            self.themeCommand =  [NSString stringWithFormat:@"etheme %@", theme];
-        } else
-            [self updatePreviewWithMap:newRow];
-
-        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; 
-        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
-        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:self.lastIndexPath];
-        oldCell.accessoryType = UITableViewCellAccessoryNone;
-
-        self.lastIndexPath = indexPath;
-        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    }
-    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
-}
-
-#pragma mark -
-#pragma mark slider & segmentedControl
-// this updates the label and the command keys when the slider is moved, depending of the selection in segmentedControl
-// no methods are called by this routine and you can pass nil to it
--(IBAction) sliderChanged:(id) sender {
-    NSString *labelText;
-    NSString *templateCommand;
-    NSString *mazeCommand;
-    
-    switch ((int)(self.slider.value*100)) {
-        case 0:
-            if (self.segmentedControl.selectedSegmentIndex == 0) {
-                labelText = NSLocalizedString(@"Wacky",@"");
-            } else {
-                labelText = NSLocalizedString(@"Large Floating Islands",@"");
-            }
-            templateCommand = @"e$template_filter 5";
-            mazeCommand = @"e$maze_size 5";
-            break;
-        case 1:
-            if (self.segmentedControl.selectedSegmentIndex == 0) {
-                labelText = NSLocalizedString(@"Cavern",@"");
-            } else {
-                labelText = NSLocalizedString(@"Medium Floating Islands",@"");
-            }
-            templateCommand = @"e$template_filter 4";
-            mazeCommand = @"e$maze_size 4";
-            break;
-        case 2:
-            if (self.segmentedControl.selectedSegmentIndex == 0) {
-                labelText = NSLocalizedString(@"Small",@"");
-            } else {
-                labelText = NSLocalizedString(@"Small Floating Islands",@"");
-            }
-            templateCommand = @"e$template_filter 1";
-            mazeCommand = @"e$maze_size 3";
-            break;
-        case 3:
-            if (self.segmentedControl.selectedSegmentIndex == 0) {
-                labelText = NSLocalizedString(@"Medium",@"");
-            } else {
-                labelText = NSLocalizedString(@"Large Tunnels",@"");
-            }
-            templateCommand = @"e$template_filter 2";
-            mazeCommand = @"e$maze_size 2";
-            break;
-        case 4:
-            if (self.segmentedControl.selectedSegmentIndex == 0) {
-                labelText = NSLocalizedString(@"Large",@"");
-            } else {
-                labelText = NSLocalizedString(@"Medium Tunnels",@"");
-            }
-            templateCommand = @"e$template_filter 3";
-            mazeCommand = @"e$maze_size 1";
-            break;
-        case 5:
-            if (self.segmentedControl.selectedSegmentIndex == 0) {
-                labelText = NSLocalizedString(@"All",@"");
-            } else {
-                labelText = NSLocalizedString(@"Small Tunnels",@"");
-            }
-            templateCommand = @"e$template_filter 0";
-            mazeCommand = @"e$maze_size 0";
-            break;
-        default:
-            labelText = nil;
-            templateCommand = nil;
-            mazeCommand = nil;
-            break;
-    }
-    
-    self.sizeLabel.text = labelText;
-    self.templateFilterCommand = templateCommand;
-    self.mazeSizeCommand = mazeCommand;
-}
-
-// update preview (if not busy and if its value really changed) as soon as the user lifts its finger up
--(IBAction) sliderEndedChanging:(id) sender {
-    int num = (int) (self.slider.value * 100);
-    if (oldValue != num) {
-        [self updatePreview];
-        oldValue = num;
-    }
-}
-
-// perform actions based on the activated section, then call updatePreview to visually update the selection 
-// updatePreview will call didSelectRowAtIndexPath which will call the right update routine)
-// and if necessary update the table with a slide animation
--(IBAction) segmentedControlChanged:(id) sender {
-    NSString *mapgen;
-    NSInteger newPage = self.segmentedControl.selectedSegmentIndex;
-    
-    switch (newPage) {
-        case 0: // Random
-            mapgen = @"e$mapgen 0";
-            [self sliderChanged:nil];
-            self.slider.enabled = YES;
-            break;
-            
-        case 1: // Map
-            mapgen = @"e$mapgen 0";
-            self.slider.enabled = NO;
-            self.sizeLabel.text = @".";
-            [self restoreBackgroundImage];
-            break;
-            
-        case 2: // Maze
-            mapgen = @"e$mapgen 1";
-            [self sliderChanged:nil];
-            self.slider.enabled = YES;
-            break;
-        
-        default:
-            mapgen = nil;
-            break;
-    }
-    self.mapGenCommand = mapgen;
-    [self updatePreview];
-    
-    // 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;
-}
-
-// update data when table is not visible and then show it
--(void) moveTable {
-    [self.tableView reloadData];
-    
-    [UIView beginAnimations:@"moving in table" context:NULL];
-    self.tableView.frame = CGRectMake(295, 0, 185, 276);
-    [UIView commitAnimations];
-}
-
-#pragma mark -
-#pragma mark view management
--(void) viewDidLoad {
-    [super viewDidLoad];
-    
-    srandom(time(NULL));
-    
-    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
-    self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
-
-    // themes.cfg contains all the user-selectable themes
-    NSString *string = [[NSString alloc] initWithContentsOfFile:[THEMES_DIRECTORY() stringByAppendingString:@"/themes.cfg"]
-                                                       encoding:NSUTF8StringEncoding 
-                                                          error:NULL];
-    NSMutableArray *array = [[NSMutableArray alloc] initWithArray:[string componentsSeparatedByString:@"\n"]];
-    [string release];
-    // remove a trailing "" element
-    [array removeLastObject];
-    self.themeArray = array;
-    [array release];
-    self.mapArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL];
-
-    self.tableView.rowHeight = 42;
-    busy = NO;
-    
-    // draw a white background
-    [self restoreBackgroundImage];
-    
-    // initialize some "default" values
-    self.sizeLabel.text = NSLocalizedString(@"All",@"");
-    self.slider.value = 0.05f;
-    self.segmentedControl.selectedSegmentIndex = 0;
-
-    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;
-}
-
--(void) viewDidAppear:(BOOL) animated {
-    [super viewDidAppear:animated];
-    [self updatePreview];
-}
-
-#pragma mark -
-#pragma mark memory
--(void) didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-}
-
--(void) viewDidUnload {
-    self.previewButton = nil;
-    self.seedCommand = nil;
-    self.templateFilterCommand = nil;
-    self.mapGenCommand = nil;
-    self.mazeSizeCommand = nil;
-    self.themeCommand = nil;
-    
-    self.previewButton = nil;
-    self.tableView = nil;
-    self.maxLabel = nil;
-    self.sizeLabel = nil;
-    self.segmentedControl = nil;
-    self.slider = nil;
-    
-    self.lastIndexPath = nil;
-    self.themeArray = nil;
-    self.mapArray = nil;
-    
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [seedCommand release];
-    [templateFilterCommand release];
-    [mapGenCommand release];
-    [mazeSizeCommand release];
-    [themeCommand release];
-    
-    [previewButton release];
-    [tableView release];
-    [maxLabel release];
-    [sizeLabel release];
-    [segmentedControl release];
-    [slider release];
-    
-    [lastIndexPath release];
-    [themeArray release];
-    [mapArray release];
-    
-    [super dealloc];
-}
-
-
-@end
--- a/cocoaTouch/MasterViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-//
-//  MasterViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 27/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@class DetailViewController;
-@class GeneralSettingsViewController;
-@class TeamSettingsViewController;
-@class WeaponSettingsViewController;
-@class SchemeSettingsViewController;
-
-@interface MasterViewController : UITableViewController {
-    DetailViewController *detailViewController;
-    NSArray *controllerNames;
-    NSIndexPath *lastIndexPath;
-    GeneralSettingsViewController *generalSettingsViewController;
-    TeamSettingsViewController *teamSettingsViewController;
-    WeaponSettingsViewController *weaponSettingsViewController;
-    SchemeSettingsViewController *schemeSettingsViewController;
-}
-
-@property (nonatomic, retain) DetailViewController *detailViewController;
-@property (nonatomic, retain) NSArray *controllerNames;
-@property (nonatomic, retain) NSIndexPath *lastIndexPath;
-
--(IBAction) dismissSplitView;
-
-@end
--- a/cocoaTouch/MasterViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-//
-//  MasterViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 27/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "MasterViewController.h"
-#import "DetailViewController.h"
-#import "GeneralSettingsViewController.h"
-#import "TeamSettingsViewController.h"
-#import "WeaponSettingsViewController.h"
-#import "SchemeSettingsViewController.h"
-#import "CommodityFunctions.h"
-
-@implementation MasterViewController
-@synthesize detailViewController, controllerNames, lastIndexPath;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-    
-    // the list of selectable controllers
-    controllerNames = [[NSArray alloc] initWithObjects:NSLocalizedString(@"General",@""),
-                                                       NSLocalizedString(@"Teams",@""),
-                                                       NSLocalizedString(@"Weapons",@""),
-                                                       NSLocalizedString(@"Schemes",@""),
-                                                       nil];
-    // the "Done" button on top left
-    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
-                                                                                          target:self
-                                                                                          action:@selector(dismissSplitView)];
-}
-
-#pragma mark -
-#pragma mark Table view data source
-
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [controllerNames count];
-}
-
-// Customize the appearance of table view cells.
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-        cell.textLabel.text = [controllerNames objectAtIndex:[indexPath row]];
-    }
-    
-    return cell;
-}
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    UIViewController *nextController = nil;
-    
-    if (newRow != oldRow) {
-        [self.tableView deselectRowAtIndexPath:lastIndexPath animated:YES];
-        [detailViewController.navigationController popToRootViewControllerAnimated:NO];
-        
-        switch (newRow) {
-            case 0:
-                if (nil == generalSettingsViewController)
-                    generalSettingsViewController = [[GeneralSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                nextController = generalSettingsViewController;
-                break;
-            case 1:
-                if (nil == teamSettingsViewController)
-                    teamSettingsViewController = [[TeamSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                nextController = teamSettingsViewController;
-                break;
-            case 2:
-                if (nil == weaponSettingsViewController)
-                    weaponSettingsViewController = [[WeaponSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                nextController = weaponSettingsViewController;
-                break;
-            case 3:
-                if (nil == schemeSettingsViewController)
-                    schemeSettingsViewController = [[SchemeSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                nextController = schemeSettingsViewController;
-                break;
-        }
-        
-        nextController.navigationItem.hidesBackButton = YES;
-        nextController.title = [controllerNames objectAtIndex:newRow];
-        [detailViewController.navigationController pushViewController:nextController animated:NO];
-        self.lastIndexPath = indexPath;
-        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    }
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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.    
-    if (generalSettingsViewController.view.superview == nil)
-        generalSettingsViewController = nil;
-    if (teamSettingsViewController.view.superview == nil)
-        teamSettingsViewController = nil;
-    if (weaponSettingsViewController.view.superview == nil)
-        weaponSettingsViewController = nil;
-    if (schemeSettingsViewController.view.superview == nil)
-        schemeSettingsViewController = nil;
-    MSG_MEMCLEAN();
-}
-
--(void) viewDidUnload {
-    self.detailViewController = nil;
-    self.controllerNames = nil;
-    self.lastIndexPath = nil;
-    generalSettingsViewController = nil;
-    teamSettingsViewController = nil;
-    weaponSettingsViewController = nil;
-    schemeSettingsViewController = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [controllerNames release];
-    [detailViewController release];
-    [lastIndexPath release];
-    [generalSettingsViewController release];
-    [teamSettingsViewController release];
-    [weaponSettingsViewController release];
-    [schemeSettingsViewController release];
-    [super dealloc];
-}
-
--(IBAction) dismissSplitView {
-    [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissModalView" object:nil];
-}
-
-@end
-
--- a/cocoaTouch/OverlayViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-//
-//  overlayViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 16/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class PopoverMenuViewController;
-
-@interface OverlayViewController : UIViewController {
-    NSTimer *dimTimer;
-#if __IPHONE_3_2
-    UIPopoverController *popoverController;
-#else
-    id popoverController;
-#endif
-    PopoverMenuViewController *popupMenu;
-    BOOL isPopoverVisible;
-    
-    UITextField *writeChatTextField;
-    
-    CGFloat initialDistanceForPinching;
-    CGPoint gestureStartPoint;
-}
-
-@property (nonatomic,retain) id popoverController;
-@property (nonatomic,retain) PopoverMenuViewController *popupMenu;
-@property (nonatomic,retain) UITextField *writeChatTextField;
-
--(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
--(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
--(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
--(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
-
--(IBAction) buttonReleased:(id) sender;
--(IBAction) buttonPressed:(id) sender;
-
--(void) showPopover;
--(void) dismissPopover;
--(void) dimOverlay;
--(void) activateOverlay;
--(void) chatAppear;
--(void) chatDisappear;
-
-@end
--- a/cocoaTouch/OverlayViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,428 +0,0 @@
-//
-//  overlayViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 16/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "OverlayViewController.h"
-#import "SDL_uikitappdelegate.h"
-#import "PascalImports.h"
-#import "CGPointUtils.h"
-#import "SDL_mouse.h"
-#import "SDL_config_iphoneos.h"
-#import "PopoverMenuViewController.h"
-#import "CommodityFunctions.h"
-
-#define HIDING_TIME_DEFAULT [NSDate dateWithTimeIntervalSinceNow:2.7]
-#define HIDING_TIME_NEVER   [NSDate dateWithTimeIntervalSinceNow:10000]
-
-
-@implementation OverlayViewController
-@synthesize popoverController, popupMenu, writeChatTextField;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
--(void) didReceiveMemoryWarning {
-	// Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-	// Release any cached data, images, etc that aren't in use.
-    if (popupMenu.view.superview == nil) 
-        popupMenu = nil;
-}
-
--(void) didRotate:(NSNotification *)notification {	
-    UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
-    CGRect rect = [[UIScreen mainScreen] bounds];
-    CGRect usefulRect = CGRectMake(0, 0, rect.size.width, rect.size.height);
-    UIView *sdlView = [[[UIApplication sharedApplication] keyWindow] viewWithTag:12345];
-    
-    [UIView beginAnimations:@"rotation" context:NULL];
-    [UIView setAnimationDuration:0.8f];
-    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
-	switch (orientation) {
-        case UIDeviceOrientationLandscapeLeft:
-            sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(0));
-            self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90));
-            [self chatDisappear];
-            HW_setLandscape(YES);
-            break;
-        case UIDeviceOrientationLandscapeRight:
-            sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(180));
-            self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90));
-            [self chatDisappear];
-            HW_setLandscape(YES);
-            break;
-        case UIDeviceOrientationPortrait:
-            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
-                sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(270));
-                self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(0));
-                [self chatAppear];
-                HW_setLandscape(NO);
-            }
-            break;
-        case UIDeviceOrientationPortraitUpsideDown:
-            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
-                sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(90));
-                self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(180));
-                [self chatAppear];
-                HW_setLandscape(NO);
-            }
-            break;
-        default:
-            DLog(@"Unknown rotation status");
-            break;
-    }
-    self.view.frame = usefulRect;
-    //sdlView.frame = usefulRect;
-    [UIView commitAnimations];
-}
-
--(void) chatAppear {
-    if (writeChatTextField == nil) {
-        writeChatTextField = [[UITextField alloc] initWithFrame:CGRectMake(0, 100, 768, [UIFont systemFontSize]+8)];
-        writeChatTextField.textColor = [UIColor whiteColor];
-        writeChatTextField.backgroundColor = [UIColor blueColor];
-        writeChatTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
-        writeChatTextField.autocorrectionType = UITextAutocorrectionTypeNo;
-        writeChatTextField.enablesReturnKeyAutomatically = NO;
-        writeChatTextField.keyboardAppearance = UIKeyboardAppearanceDefault;
-        writeChatTextField.keyboardType = UIKeyboardTypeDefault;
-        writeChatTextField.returnKeyType = UIReturnKeyDefault;
-        writeChatTextField.secureTextEntry = NO;	
-        [self.view addSubview:writeChatTextField];
-    }
-    writeChatTextField.alpha = 1;
-    [self activateOverlay];
-    [dimTimer setFireDate:HIDING_TIME_NEVER];
-}
-
--(void) chatDisappear {
-    writeChatTextField.alpha = 0;
-    [writeChatTextField resignFirstResponder];
-    [dimTimer setFireDate:HIDING_TIME_DEFAULT];
-}
-
--(void) viewDidLoad {
-    isPopoverVisible = NO;
-    self.view.alpha = 0;
-    self.view.center = CGPointMake(self.view.frame.size.height/2.0, self.view.frame.size.width/2.0);
-    
-    
-    dimTimer = [[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:6]
-                                        interval:1000
-                                          target:self
-                                        selector:@selector(dimOverlay)
-                                        userInfo:nil
-                                         repeats:YES];
-    
-    // add timer too runloop, otherwise it doesn't work
-    [[NSRunLoop currentRunLoop] addTimer:dimTimer forMode:NSDefaultRunLoopMode];
-    
-    // listen for dismissal of the popover (see below)
-    [[NSNotificationCenter defaultCenter] addObserver:self
-                                             selector:@selector(dismissPopover)
-                                                 name:@"dismissPopover"
-                                               object:nil];
-    
-    [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];	
-    [[NSNotificationCenter defaultCenter] addObserver:self
-                                             selector:@selector(didRotate:)
-                                                 name:@"UIDeviceOrientationDidChangeNotification"
-                                               object:nil];
-
-    //self.view.transform = CGAffineTransformRotate(self.view.transform, (M_PI/2.0)); 
-	[UIView beginAnimations:@"showing overlay" context:NULL];
-	[UIView setAnimationDuration:1];
-	self.view.alpha = 1;
-	[UIView commitAnimations];
-}
-
--(void) viewDidUnload {
-    self.writeChatTextField = nil;
-    self.popoverController = nil;
-    self.popupMenu = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-	[dimTimer invalidate];
-    [writeChatTextField release];
-    [popupMenu release];
-    [popoverController release];
-    // dimTimer is autoreleased
-    [super dealloc];
-}
-
-// dim the overlay when there's no more input for a certain amount of time
--(IBAction) buttonReleased:(id) sender {
-	HW_allKeysUp();
-    [dimTimer setFireDate:HIDING_TIME_DEFAULT];
-}
-
-// nice transition for dimming, should be called only by the timer himself
--(void) dimOverlay {
-    [UIView beginAnimations:@"overlay dim" context:NULL];
-   	[UIView setAnimationDuration:0.6];
-    self.view.alpha = 0.2;
-	[UIView commitAnimations];
-}
-
-// set the overlay visible and put off the timer for enough time
--(void) activateOverlay {
-    self.view.alpha = 1;
-    [dimTimer setFireDate:HIDING_TIME_NEVER];
-}
-
-// issue certain action based on the tag of the button 
--(IBAction) buttonPressed:(id) sender {
-    [self activateOverlay];
-    if (isPopoverVisible) {
-        [self dismissPopover];
-    }
-    UIButton *theButton = (UIButton *)sender;
-    
-    switch (theButton.tag) {
-        case 0:
-            HW_walkLeft();
-            break;
-        case 1:
-            HW_walkRight();
-            break;
-        case 2:
-            HW_aimUp();
-            break;
-        case 3:
-            HW_aimDown();
-            break;
-        case 4:
-            HW_shoot();
-            break;
-        case 5:
-            HW_jump();
-            break;
-        case 6:
-            HW_backjump();
-            break;
-        case 7:
-            HW_tab();
-            break;
-        case 10:
-            [self showPopover];
-            break;
-        default:
-            NSLog(@"Nope");
-            break;
-    }
-}
-
-// present a further check before closing game
--(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
-	if ([actionSheet cancelButtonIndex] != buttonIndex)
-	    HW_terminate(NO);
-	else
-        HW_pause();		
-}
-
-// show up a popover containing a popupMenuViewController; we hook it with setPopoverContentSize
-// on iphone instead just use the tableViewController directly (and implement manually all animations)
--(IBAction) showPopover{
-    isPopoverVisible = YES;
-    CGRect anchorForPopover;
-    Class popoverControllerClass = NSClassFromString(@"UIPopoverController");
-    if (popoverControllerClass) {
-#if __IPHONE_3_2
-        if (popupMenu == nil) 
-            popupMenu = [[PopoverMenuViewController alloc] initWithStyle:UITableViewStylePlain];
-        popoverController = [[popoverControllerClass alloc] initWithContentViewController:popupMenu];
-        [popoverController setPopoverContentSize:CGSizeMake(220, 170) animated:YES];
-        [popoverController setPassthroughViews:[NSArray arrayWithObject:self.view]];
-
-        if (UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation]))
-            anchorForPopover = CGRectMake(960, 0, 220, 32);
-        else
-            anchorForPopover = CGRectMake(736, 0, 220, 32);
-        
-        [popoverController presentPopoverFromRect:anchorForPopover
-                                           inView:self.view
-                         permittedArrowDirections:UIPopoverArrowDirectionUp
-                                         animated:YES];
-#endif
-    } else {
-        if (popupMenu == nil) 
-            popupMenu = [[PopoverMenuViewController alloc] initWithStyle:UITableViewStyleGrouped];
-        popupMenu.view.backgroundColor = [UIColor clearColor];
-        popupMenu.view.frame = CGRectMake(480, 0, 200, 170);
-        [self.view addSubview:popupMenu.view];
-
-        [UIView beginAnimations:@"showing popover" context:NULL];
-        [UIView setAnimationDuration:0.35];
-        popupMenu.view.frame = CGRectMake(280, 0, 200, 170);
-        [UIView commitAnimations];
-    }
-    popupMenu.tableView.scrollEnabled = NO;
-}
-
-// on ipad just dismiss it, on iphone transtion to the right
--(void) dismissPopover {
-    if (YES == isPopoverVisible) {
-        isPopoverVisible = NO;
-        
-        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
-#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
-            [popoverController dismissPopoverAnimated:YES];
-#endif
-        } else {
-            [UIView beginAnimations:@"hiding popover" context:NULL];
-            [UIView setAnimationDuration:0.35];
-            popupMenu.view.frame = CGRectMake(480, 0, 200, 170);
-            [UIView commitAnimations];
-        
-            [popupMenu.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.35];
-            [popupMenu performSelector:@selector(release) withObject:nil afterDelay:0.35];
-        }
-        [self buttonReleased:nil];
-    }
-}
-
--(void) textFieldDoneEditing:(id) sender{
-    [sender resignFirstResponder];
-}
-
-#pragma mark -
-#pragma mark Custom touch event handling
-
-#define kMinimumPinchDelta      50
-
-
--(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
-	NSArray *twoTouches;
-	UITouch *touch = [touches anyObject];
-    
-    if (isPopoverVisible) {
-        [self dismissPopover];
-    }
-    if (writeChatTextField) {
-        [self.writeChatTextField resignFirstResponder];
-        [dimTimer setFireDate:HIDING_TIME_DEFAULT];
-    }
-    
-    gestureStartPoint = [touch locationInView:self.view];
-        
-	switch ([touches count]) {
-		case 1:
-			initialDistanceForPinching = 0;
-			switch ([touch tapCount]) {
-				case 1:
-					NSLog(@"X:%d Y:%d", (int)gestureStartPoint.x, (int)gestureStartPoint.y );
-					//SDL_WarpMouseInWindow([SDLUIKitDelegate sharedAppDelegate].window, 
-					//		      (int)gestureStartPoint.y, width - (int)gestureStartPoint.x);
-					//HW_click();
-					break;
-				case 2:
-					HW_ammoMenu();
-					break;
-				default:
-					break;
-			}
-			break;
-		case 2:
-			if (2 == [touch tapCount]) {
-				HW_zoomReset();
-			}
-			
-			// pinching
-            gestureStartPoint.x = 0;
-            gestureStartPoint.y = 0;
-			twoTouches = [touches allObjects];
-			UITouch *first = [twoTouches objectAtIndex:0];
-			UITouch *second = [twoTouches objectAtIndex:1];
-			initialDistanceForPinching = distanceBetweenPoints([first locationInView:self.view], [second locationInView:self.view]);
-			break;
-		default:
-			break;
-	}
-
-}
-
--(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
-	initialDistanceForPinching = 0;
-	HW_allKeysUp();
-}
-
--(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
-	// this can happen if the user puts more than 5 touches on the screen at once, or perhaps in other circumstances
-	[self touchesEnded:touches withEvent:event];
-}
-
--(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
-    CGFloat minimumGestureLength;
-    int logCoeff;
-    
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
-        minimumGestureLength = 5.0f;
-        logCoeff = 19;
-    } else {
-        minimumGestureLength = 3.0f;
-        logCoeff = 3;
-    }
-    
-	NSArray *twoTouches;
-	CGPoint currentPosition;
-	UITouch *touch = [touches anyObject];
-
-	switch ([touches count]) {
-		case 1:
-			currentPosition = [touch locationInView:self.view];
-			// panning
-			CGFloat deltaX = fabsf(gestureStartPoint.x - currentPosition.x);
-			CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y);
-			
-            if (deltaX >= minimumGestureLength) {
-                NSLog(@"Horizontal swipe detected, deltaX: %f deltaY: %f",deltaX, deltaY);
-                if (currentPosition.x > gestureStartPoint.x) {
-                    HW_cursorLeft(logCoeff*log(deltaX));
-                } else {
-                    HW_cursorRight(logCoeff*log(deltaX));
-                }
-
-            } 
-            if (deltaY >= minimumGestureLength) {
-                NSLog(@"Horizontal swipe detected, deltaX: %f deltaY: %f",deltaX, deltaY);
-                if (currentPosition.y < gestureStartPoint.y) {
-                    HW_cursorDown(logCoeff*log(deltaY));
-                } else {
-                    HW_cursorUp(logCoeff*log(deltaY));
-                }            
-            }
-
-			break;
-		case 2:
-			twoTouches = [touches allObjects];
-			UITouch *first = [twoTouches objectAtIndex:0];
-			UITouch *second = [twoTouches objectAtIndex:1];
-			CGFloat currentDistanceOfPinching = distanceBetweenPoints([first locationInView:self.view], [second locationInView:self.view]);
-			
-			if (0 == initialDistanceForPinching) 
-				initialDistanceForPinching = currentDistanceOfPinching;
-
-			if (currentDistanceOfPinching < initialDistanceForPinching + kMinimumPinchDelta)
-				HW_zoomOut();
-			else if (currentDistanceOfPinching > initialDistanceForPinching + kMinimumPinchDelta)
-				HW_zoomIn();
-
-			currentDistanceOfPinching = initialDistanceForPinching;
-			break;
-		default:
-			break;
-	}
-}
-
-
-@end
--- a/cocoaTouch/PopoverMenuViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-//
-//  popupMenuViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 25/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface PopoverMenuViewController : UITableViewController <UIActionSheetDelegate> {
-    NSArray *menuList;
-    BOOL isPaused;
-}
-@property (nonatomic,retain) NSArray *menuList;
-
-@end
--- a/cocoaTouch/PopoverMenuViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-    //
-//  popupMenuViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 25/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "SDL_uikitappdelegate.h"
-#import "PopoverMenuViewController.h"
-#import "PascalImports.h"
-#import "CommodityFunctions.h"
-#import "SDL_sysvideo.h"
-
-@implementation PopoverMenuViewController
-@synthesize menuList;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
--(void) didReceiveMemoryWarning {
-    // Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];
-}
-
--(void) viewDidLoad {
-    isPaused = NO;
-
-    menuList = [[NSArray alloc] initWithObjects:
-                NSLocalizedString(@"Pause Game", @""),
-                NSLocalizedString(@"Chat", @""),
-                NSLocalizedString(@"End Game", @""),
-                nil];
-    [super viewDidLoad];
-}
-
--(void) viewDidUnload {
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [menuList release];
-    [super dealloc];
-}
-
-#pragma mark -
-#pragma mark tableView methods
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-	return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-	return 3;
-}
-
--(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-	static NSString *cellIdentifier = @"CellIdentifier";
-	
-	UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:cellIdentifier];
-    if (nil == cell) {
-		cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
-                                       reuseIdentifier:cellIdentifier] autorelease];
-	}
-    cell.textLabel.text = [menuList objectAtIndex:[indexPath row]];
-	
-	return cell;
-}
-
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    UIActionSheet *actionSheet;
-    
-    switch ([indexPath row]) {
-		case 0:
-            HW_pause();
-            isPaused = !isPaused;
-            break;
-        case 1:
-			HW_chat();
-            /*
-            SDL_VideoDevice *_this = SDL_GetVideoDevice();
-            SDL_VideoDisplay *display = &_this->displays[0];
-            SDL_Window *window = display->windows;
-            SDL_iPhoneKeyboardShow(window);
-            */
-            break;
-        case 2:
-            // expand the view (and table) so that the actionsheet can be selected on the iPhone
-            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
-                [self.tableView deselectRowAtIndexPath:indexPath animated:NO];
-                [UIView beginAnimations:@"table width more" context:NULL];
-                [UIView setAnimationDuration:0.2];
-                self.view.frame = CGRectMake(0, 0, 480, 320);
-                [UIView commitAnimations];
-            }
-			actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
-                                                      delegate:self
-                                             cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
-                                        destructiveButtonTitle:NSLocalizedString(@"Of course!", @"")
-                                             otherButtonTitles:nil];
-            [actionSheet showInView:self.view];
-            [actionSheet release];
-            
-            if (!isPaused) 
-                HW_pause();
-            break;
-        default:
-			NSLog(@"Warning: unset case value in section!");
-			break;
-    }
-    
-    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
-}
-
-#pragma mark -
-#pragma mark actionSheet methods
--(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){
-        [UIView beginAnimations:@"table width less" context:NULL];
-        [UIView setAnimationDuration:0.2];
-        self.view.frame = CGRectMake(280, 0, 200, 170);
-        [UIView commitAnimations];
-    }
-    
-	if ([actionSheet cancelButtonIndex] != buttonIndex) {
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissPopover" object:nil];
-        HW_terminate(NO);
-    }
-	else
-        if (!isPaused) 
-            HW_pause();		
-}
-
-@end
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-    SDL - Simple DirectMedia Layer
-    Copyright (C) 1997-2010 Sam Lantinga
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-    Sam Lantinga
-    slouken@libsdl.org
-*/
-
-#import <UIKit/UIKit.h>
-#import "SDL_uikitopenglview.h"
-
-@class MainMenuViewController;
-@class OverlayViewController;
-
-@interface SDLUIKitDelegate:NSObject<UIApplicationDelegate> {
-    SDL_Window *window; 	 
-    UIWindow *uiwindow;
-    MainMenuViewController *mainViewController;
-    BOOL isInGame;
-}
-
-@property (readwrite, assign) SDL_Window *window; 	 
-@property (readwrite, retain) UIWindow *uiwindow;
-
-+(SDLUIKitDelegate *)sharedAppDelegate;
--(void) startSDLgame;
--(void) displayOverlayLater;
-
-@end
-
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
- SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2009 Sam Lantinga
- 
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- 
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- Lesser General Public License for more details.
- 
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- 
- Sam Lantinga, mods for Hedgewars by Vittorio Giovara
- slouken@libsdl.org, vittorio.giovara@gmail.com
-*/
-
-#import "SDL_uikitappdelegate.h"
-#import "SDL_uikitopenglview.h"
-#import "SDL_uikitwindow.h"
-#import "SDL_events_c.h"
-#import "../SDL_sysvideo.h"
-#import "jumphack.h"
-#import "SDL_video.h"
-#import "GameSetup.h"
-#import "PascalImports.h"
-#import "MainMenuViewController.h"
-#import "OverlayViewController.h"
-#import "CommodityFunctions.h"
-
-#ifdef main
-#undef main
-#endif
-
-#define VALGRIND "/opt/valgrind/bin/valgrind"
-
-int main (int argc, char *argv[]) {
-#ifdef VALGRIND_REXEC
-    // Using the valgrind build config, rexec ourself in valgrind
-    // from http://landonf.bikemonkey.org/code/iphone/iPhone_Simulator_Valgrind.20081224.html
-    if (argc < 2 || (argc >= 2 && strcmp(argv[1], "-valgrind") != 0))
-        execl(VALGRIND, VALGRIND, "--leak-check=full", argv[0], "-valgrind", NULL);
-#endif
-
-	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-	int retVal = UIApplicationMain(argc, argv, nil, @"SDLUIKitDelegate");
-	[pool release];
-	return retVal;
-}
-
-@implementation SDLUIKitDelegate
-@synthesize uiwindow, window;
-
-// convenience method
-+(SDLUIKitDelegate *)sharedAppDelegate {
-	// the delegate is set in UIApplicationMain(), which is guaranteed to be called before this method
-	return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate];
-}
-
--(id) init {
-	if (self = [super init]){
-        mainViewController = nil;
-        isInGame = NO;
-        self.uiwindow = nil; 	 
-        self.window = NULL;
-    }
-    return self;
-}
-
--(void) dealloc {
-    SDL_DestroyWindow(self.window);
-     [uiwindow release];
-    [mainViewController release];
-	[super dealloc];
-}
-
-// main routine for calling the actual game engine
--(IBAction) startSDLgame {
-    [UIView beginAnimations:@"removing main controller" context:NULL];
-	[UIView setAnimationDuration:1];
-	mainViewController.view.alpha = 0;
-	[UIView commitAnimations];
-
-    // pull out useful configuration info from various files
-	GameSetup *setup = [[GameSetup alloc] init];
-	[setup startThread:@"engineProtocol"];
-	const char **gameArgs = [setup getSettings];
-	[setup release];
-
-    // since the sdlwindow is not yet created, we add the overlayController with a delay
-    [self performSelector:@selector(displayOverlayLater) withObject:nil afterDelay:1];
-    
-    // this is the pascal fuction that starts the game (wrapped around isInGame)
-    isInGame = YES;
-	Game(gameArgs);
-    isInGame = NO;
-    
-    free(gameArgs);
-    
-    [UIView beginAnimations:@"inserting main controller" context:NULL];
-	[UIView setAnimationDuration:1];
-	mainViewController.view.alpha = 1;
-	[UIView commitAnimations];
-}
-
--(void) displayOverlayLater {
-    // overlay with controls, become visible after 4 seconds, with a transparency effect
-    OverlayViewController *overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
-    
-    [[[UIApplication sharedApplication] keyWindow] addSubview:overlayController.view];
-    [overlayController release];
-}
-
-// override the direct execution of SDL_main to allow us to implement the frontend (or even using a nib)
--(void) applicationDidFinishLaunching:(UIApplication *)application {
-    [application setStatusBarHidden:YES];
-    [application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];  
-    
-    uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
-	uiwindow.backgroundColor = [UIColor blackColor];
-    // needed to keep the app running after a game (gets released in sdl_uikitwindow)
-	[uiwindow retain];
-    
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-        mainViewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPad" bundle:nil];
-    else
-        mainViewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPhone" bundle:nil];
-
-	[uiwindow addSubview:mainViewController.view];
-	[uiwindow makeKeyAndVisible];
-
-	// Set working directory to resource path
-	[[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];
-}
-
--(void) applicationWillTerminate:(UIApplication *)application {
-	SDL_SendQuit();
-    if (isInGame) {
-        HW_terminate(YES);
-        // hack to prevent automatic termination. See SDL_uikitevents.m for details
-        longjmp(*(jump_env()), 1);
-    }
-}
-
--(void) applicationWillResignActive:(UIApplication *)application {
-	//NSLog(@"%@", NSStringFromSelector(_cmd));
-    if (isInGame) {
-        HW_pause();
-        
-        /*
-        // Send every window on every screen a MINIMIZED event.
-        SDL_VideoDevice *_this = SDL_GetVideoDevice();
-        if (!_this)
-            return;
-
-        int i;
-        for (i = 0; i < _this->num_displays; i++) {
-            const SDL_VideoDisplay *display = &_this->displays[i];
-            SDL_Window *window;
-            for (window = display->windows; window != nil; window = window->next)
-                SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
-        }
-        */
-    }
-}
-
--(void) applicationDidBecomeActive:(UIApplication *)application {
-	//NSLog(@"%@", NSStringFromSelector(_cmd));
-    if (isInGame) {
-        HW_pause();
-
-        /*
-        // Send every window on every screen a RESTORED event.
-        SDL_VideoDevice *_this = SDL_GetVideoDevice();
-        if (!_this)
-            return;
-
-        int i;
-        for (i = 0; i < _this->num_displays; i++) {
-            const SDL_VideoDisplay *display = &_this->displays[i];
-            SDL_Window *window;
-            for (window = display->windows; window != nil; window = window->next)
-                SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
-        }
-        */
-    }
-}
-
-@end
--- a/cocoaTouch/SchemeSettingsViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-//
-//  SchemeSettingsViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 19/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-@class SingleSchemeViewController;
-
-@interface SchemeSettingsViewController : UITableViewController {
-    NSMutableArray *listOfSchemes;
-    SingleSchemeViewController *childController;
-}
-
-@property (nonatomic, retain) NSMutableArray *listOfSchemes;
-
-@end
--- a/cocoaTouch/SchemeSettingsViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-//
-//  SchemeSettingsViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 19/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "SchemeSettingsViewController.h"
-#import "CommodityFunctions.h"
-#import "SingleSchemeViewController.h"
-
-@implementation SchemeSettingsViewController
-@synthesize listOfSchemes;
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-    
-    UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"from the scheme panel")
-                                                                   style:UIBarButtonItemStyleBordered
-                                                                  target:self
-                                                                  action:@selector(toggleEdit:)];
-    self.navigationItem.rightBarButtonItem = editButton;
-    [editButton release];
-    
-}
-
--(void) viewWillAppear:(BOOL) animated {
-    [super viewWillAppear:animated];
-    
-    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCHEMES_DIRECTORY() error:NULL];
-    NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES];
-    self.listOfSchemes = array;
-    [array release];
-    
-    [self.tableView reloadData];
-}
-
-// modifies the navigation bar to add the "Add" and "Done" buttons
--(void) toggleEdit:(id) sender {
-    BOOL isEditing = self.tableView.editing;
-    [self.tableView setEditing:!isEditing animated:YES];
-    
-    if (isEditing) {
-        [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Edit",@"from the scheme panel")];
-        [self.navigationItem.rightBarButtonItem setStyle: UIBarButtonItemStyleBordered];
-        self.navigationItem.leftBarButtonItem = self.navigationItem.backBarButtonItem;
-    } else {
-        [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Done",@"from the scheme panel")];
-        [self.navigationItem.rightBarButtonItem setStyle:UIBarButtonItemStyleDone];
-        UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Add",@"from the scheme panel")
-                                                                      style:UIBarButtonItemStyleBordered
-                                                                     target:self
-                                                                     action:@selector(addScheme:)];
-        self.navigationItem.leftBarButtonItem = addButton;
-        [addButton release];
-    }
-}
-
--(void) addScheme:(id) sender {
-    NSString *fileName = [[NSString alloc] initWithFormat:@"Scheme %u.plist", [self.listOfSchemes count]];
-    
-    createSchemeNamed([fileName stringByDeletingPathExtension]);
-    
-    [self.listOfSchemes addObject:fileName];
-    [fileName release];
-    
-    // order the array alphabetically, so schemes will keep their position
-    [self.listOfSchemes sortUsingSelector:@selector(compare:)];
-    
-    [self.tableView reloadData];
-}
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [self.listOfSchemes count];
-}
-
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    NSUInteger row = [indexPath row]; 
-    NSString *rowString = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension]; 
-    cell.textLabel.text = rowString; 
-    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
-    
-    return cell;
-}
-
-// delete the row and the file
--(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-    NSUInteger row = [indexPath row];
-    
-    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),[self.listOfSchemes objectAtIndex:row]];
-    [[NSFileManager defaultManager] removeItemAtPath:schemeFile error:NULL];
-    [schemeFile release];
-    
-    [self.listOfSchemes removeObjectAtIndex:row];
-    [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
-}
-
-#pragma mark -
-#pragma mark Table view delegate
-
--(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    if (childController == nil) {
-        childController = [[SingleSchemeViewController alloc] initWithStyle:UITableViewStyleGrouped];
-    }
-    
-    NSInteger row = [indexPath row];
-    NSString *selectedSchemeFile = [self.listOfSchemes objectAtIndex:row];
-    
-    // this must be set so childController can load the correct plist
-    childController.title = [selectedSchemeFile stringByDeletingPathExtension];
-    [childController.tableView setContentOffset:CGPointMake(0,0) animated:NO];
-
-    [self.navigationController pushViewController:childController animated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(void)didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-    if (childController.view.superview == nil )
-        childController = nil;
-}
-
--(void) viewDidUnload {
-    self.listOfSchemes = nil;
-    childController = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
-
--(void) dealloc {
-    [self.listOfSchemes release];
-    [childController release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/SchemeWeaponConfigViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-//
-//  SchemeWeaponConfigViewController.h
-//  Hedgewars
-//
-//  Created by Vittorio on 13/06/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface SchemeWeaponConfigViewController : UITableViewController {
-    NSArray *listOfSchemes;
-    NSArray *listOfWeapons;
-    
-    NSIndexPath *lastIndexPath;
-    NSString *selectedScheme;
-    NSString *selectedWeapon;
-}
-
-@property (nonatomic, retain) NSArray *listOfSchemes;
-@property (nonatomic, retain) NSArray *listOfWeapons;
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
-@property (nonatomic,retain) NSString *selectedScheme;
-@property (nonatomic,retain) NSString *selectedWeapon;
-
-@end
--- a/cocoaTouch/SchemeWeaponConfigViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-//
-//  SchemeWeaponConfigViewController.m
-//  Hedgewars
-//
-//  Created by Vittorio on 13/06/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "SchemeWeaponConfigViewController.h"
-#import "CommodityFunctions.h"
-
-@implementation SchemeWeaponConfigViewController
-@synthesize listOfSchemes, listOfWeapons, lastIndexPath, selectedScheme, selectedWeapon;
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return rotationManager(interfaceOrientation);
-}
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-
-    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
-    self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
-
-    self.selectedScheme = @"Default.plist";
-    self.selectedWeapon = @"Default.plist";
-}
-
--(void) viewWillAppear:(BOOL) animated {
-    [super viewWillAppear:animated];
-
-    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCHEMES_DIRECTORY() error:NULL];
-    self.listOfSchemes = contentsOfDir;
-    
-    [self.tableView reloadData];
-}
-
-/*
-- (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 {
-    return 2;
-}
-
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    if (section == 0) 
-        return [self.listOfSchemes count];
-    else
-        return [self.listOfWeapons count];
-}
-
-
-// Customize the appearance of table view cells.
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier = @"Cell";
-    NSInteger row = [indexPath row];
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    cell.accessoryType = UITableViewCellAccessoryNone;
-    if ([indexPath section] == 0) {
-        cell.textLabel.text = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension];
-        if ([[self.listOfSchemes objectAtIndex:row] isEqualToString:self.selectedScheme]) {
-            cell.accessoryType = UITableViewCellAccessoryCheckmark;
-            self.lastIndexPath = indexPath;
-        }
-    } else {
-        cell.textLabel.text = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension];
-        if ([[self.listOfWeapons objectAtIndex:row] isEqualToString:self.selectedWeapon]) {
-            cell.accessoryType = UITableViewCellAccessoryCheckmark;
-            self.lastIndexPath = indexPath;
-        }
-    }
-
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    
-    if (newRow != oldRow) {
-        //TODO: this code works only for a single section table
-        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
-        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
-        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
-        oldCell.accessoryType = UITableViewCellAccessoryNone;
-        self.lastIndexPath = indexPath;
-        self.selectedScheme = [self.listOfSchemes objectAtIndex:newRow];
-        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    }
-    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
-}
-
--(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger) section {
-    if (section == 0) {
-        return NSLocalizedString(@"Schemes",@"");
-    } else {
-        return NSLocalizedString(@"Weapons",@"");;
-    }
-}
-
-#pragma mark -
-#pragma mark Memory management
--(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 {
-    self.listOfSchemes = nil;
-    self.listOfWeapons = nil;
-    self.lastIndexPath = nil;
-    self.selectedScheme = nil;
-    self.selectedWeapon = nil;
-    MSG_DIDUNLOAD();
-}
-
-
--(void) dealloc {
-    [listOfSchemes release];
-    [listOfWeapons release];
-    [lastIndexPath release];
-    [selectedScheme release];
-    [selectedWeapon release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/SingleSchemeViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-//
-//  SingleSchemeViewController.h
-//  Hedgewars
-//
-//  Created by Vittorio on 23/05/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface SingleSchemeViewController : UITableViewController <UITextFieldDelegate> {
-    UITextField *textFieldBeingEdited;
-    NSMutableArray *schemeArray;
-    
-    NSArray *basicSettingList;
-    NSArray *gameModifierArray;
-}
-
-@property (nonatomic, retain) UITextField *textFieldBeingEdited;
-@property (nonatomic, retain) NSMutableArray *schemeArray;
-@property (nonatomic, retain) NSArray *basicSettingList;
-@property (nonatomic, retain) NSArray *gameModifierArray;
-
-@end
--- a/cocoaTouch/SingleSchemeViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,321 +0,0 @@
-//
-//  SingleSchemeViewController.m
-//  Hedgewars
-//
-//  Created by Vittorio on 23/05/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "SingleSchemeViewController.h"
-#import <QuartzCore/QuartzCore.h>
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-
-@implementation SingleSchemeViewController
-@synthesize textFieldBeingEdited, schemeArray, basicSettingList, gameModifierArray;
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-
-    NSArray *mods = [[NSArray alloc] initWithObjects:
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Fort Mode",@""),@"title",
-                      NSLocalizedString(@"Defend your fort and destroy the opponents (two team colours max)",@""),@"description",
-                      @"Forts",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Divide Team",@""),@"title",
-                      NSLocalizedString(@"Teams will start on opposite sides of the terrain (two team colours max)",@""),@"description",
-                      @"TeamsDivide",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Solid Land",@""),@"title",
-                      NSLocalizedString(@"Land can not be destroyed",@""),@"description",
-                      @"Solid",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Add Border",@""),@"title",
-                      NSLocalizedString(@"Add an indestructable border around the terrain",@""),@"description",
-                      @"Border",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Low Gravity",@""),@"title",
-                      NSLocalizedString(@"Lower gravity",@""),@"description",
-                      @"LowGravity",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Laser Sight",@""),@"title",
-                      NSLocalizedString(@"Assisted aiming with laser sight",@""),@"description",
-                      @"LaserSight",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Invulnerable",@""),@"title",
-                      NSLocalizedString(@"All hogs have a personal forcefield",@""),@"description",
-                      @"Invulnerable",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Add Mines",@""),@"title",
-                      NSLocalizedString(@"Enable random mines",@""),@"description",
-                      @"Mines",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Vampirism Mode",@""),@"title",
-                      NSLocalizedString(@"Gain 80% of the damage you do back in health",@""),@"description",
-                      @"Vampiric",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Karma Mode",@""),@"title",
-                      NSLocalizedString(@"Share your opponents pain, share their damage",@""),@"description",
-                      @"Karma",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Artillery Mode",@""),@"title",
-                      NSLocalizedString(@"Your hogs are unable to move, test your aim",@""),@"description",
-                      @"Artillery",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Random Order",@""),@"title",
-                      NSLocalizedString(@"Order of play is random instead of in room order",@""),@"description",
-                      @"RandomOrder",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"King Mode",@""),@"title",
-                      NSLocalizedString(@"Play with a King. If he dies, your side loses",@""),@"description",
-                      @"King",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys: NSLocalizedString(@"Place Hedgehogs",@""),@"title",
-                      NSLocalizedString(@"Take turns placing your hedgehogs pre-game",@""),@"description",
-                      @"PlaceHog",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Clan Shares Ammo",@""),@"title",
-                      NSLocalizedString(@"Ammo is shared between all clan teams",@""),@"description",
-                      @"SharedAmmo",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Disable Girders",@""),@"title",
-                      NSLocalizedString(@"Disable girders when generating random maps",@""),@"description",
-                      @"DisableGirders",@"image",nil],
-                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Disable Land Objects",@""),@"title",
-                      NSLocalizedString(@"Disable land objects when generating maps",@""),@"description",
-                      @"DisableLandObjects",@"image",nil],
-                     nil];
-    self.gameModifierArray = mods;
-    [mods release];
-    
-    NSArray *basicSettings = [[NSArray alloc] initWithObjects:
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Damage Modifier",@""),@"title",@"Damage",@"image",nil],
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Turn Time",@""),@"title",@"Time",@"image",nil],
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Initial Health",@""),@"title",@"Health",@"image",nil],
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Sudden Death Timeout",@""),@"title",@"SuddenDeath",@"image",nil],
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Crate Drops",@""),@"title",@"Box",@"image",nil],
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Mines Time",@""),@"title",@"Time",@"image",nil],
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Mines Number",@""),@"title",@"Mine",@"image",nil],
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Dud Mines Probability",@""),@"title",@"Dud",@"image",nil],
-                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Explosives",@""),@"title",@"Damage",@"image",nil],
-                              nil];
-    self.basicSettingList = basicSettings;
-    [basicSettings release];
-}
-
-// load from file
--(void) viewWillAppear:(BOOL) animated {
-    [super viewWillAppear:animated];
-    
-    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.title];
-	NSMutableArray *scheme = [[NSMutableArray alloc] initWithContentsOfFile:schemeFile];
-    self.schemeArray = scheme;
-    [scheme release];
-	[schemeFile release];
-    
-    [self.tableView reloadData];
-}
-
-// save to file
--(void) viewWillDisappear:(BOOL) animated {
-    [super viewWillDisappear:animated];
-    
-    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.title];
-    [self.schemeArray writeToFile:schemeFile atomically:YES];
-    [schemeFile release];
-}
-
-#pragma mark -
-#pragma mark textfield methods
--(void) cancel:(id) sender {
-    if (textFieldBeingEdited != nil)
-        [self.textFieldBeingEdited resignFirstResponder];
-}
-
-// set the new value
--(BOOL) save:(id) sender {    
-    if (textFieldBeingEdited != nil) {
-        [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.title] error:NULL];
-        self.title = self.textFieldBeingEdited.text;
-        [self.schemeArray writeToFile:[NSString stringWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.title] atomically:YES];
-        [self.textFieldBeingEdited resignFirstResponder];
-        return YES;
-    }
-    return NO;
-}
-
-// the textfield is being modified, update the navigation controller
--(void) textFieldDidBeginEditing:(UITextField *)aTextField{   
-    self.textFieldBeingEdited = aTextField;
-
-    UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel",@"from schemes table")
-                                                                     style:UIBarButtonItemStylePlain
-                                                                    target:self
-                                                                    action:@selector(cancel:)];
-    self.navigationItem.leftBarButtonItem = cancelButton;
-    [cancelButton release];
-    
-    UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save",@"from schemes table")
-                                                                     style:UIBarButtonItemStyleDone
-                                                                    target:self
-                                                                    action:@selector(save:)];
-    self.navigationItem.rightBarButtonItem = saveButton;
-    [saveButton release];
-}
-
-// the textfield has been modified, check for empty strings and restore original navigation bar
--(void) textFieldDidEndEditing:(UITextField *)aTextField{
-    if ([textFieldBeingEdited.text length] == 0) 
-        textFieldBeingEdited.text = [NSString stringWithFormat:@"New Scheme"];
-
-    self.textFieldBeingEdited = nil;
-    self.navigationItem.rightBarButtonItem = self.navigationItem.backBarButtonItem;
-    self.navigationItem.leftBarButtonItem = nil;
-}
-
-// limit the size of the field to 64 characters like in original frontend
--(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
-    int limit = 64;
-    return !([textField.text length] > limit && [string length] > range.length);
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 3;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    switch (section) {
-        case 0:
-            return 1;
-            break;
-        case 1:
-            return [self.basicSettingList count];
-            break;
-        case 2:
-            return [self.gameModifierArray count];
-        default:
-            break;
-    }
-    return 0;
-}
-
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier0 = @"Cell0";
-    static NSString *CellIdentifier1 = @"Cell1";
-    static NSString *CellIdentifier2 = @"Cell2";
-    
-    UITableViewCell *cell = nil;
-    NSInteger row = [indexPath row];
-    
-    switch ([indexPath section]) {
-        case 0:
-            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier0];
-            if (cell == nil) {
-                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
-                                               reuseIdentifier:CellIdentifier0] autorelease];
-                // create a uitextfield for each row, expand it to take the maximum size
-                UITextField *aTextField = [[UITextField alloc] 
-                                           initWithFrame:CGRectMake(5, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
-                aTextField.clearsOnBeginEditing = NO;
-                aTextField.returnKeyType = UIReturnKeyDone;
-                aTextField.adjustsFontSizeToFitWidth = YES;
-                aTextField.delegate = self;
-                aTextField.tag = [indexPath row];
-                aTextField.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
-                aTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
-                [aTextField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
-                [cell.contentView addSubview:aTextField];
-                [aTextField 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
-                    UITextField *textFieldFound = (UITextField *)oneView;
-                    textFieldFound.text = self.title;
-                }
-            }
-            cell.detailTextLabel.text = nil;
-            cell.imageView.image = nil;
-            break;
-        case 1:
-            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
-            if (cell == nil) {
-                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
-                                               reuseIdentifier:CellIdentifier1] autorelease];
-            }
-            
-            UIImage *img = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/icon%@.png",BTN_DIRECTORY(),[[self.basicSettingList objectAtIndex:row] objectForKey:@"image"]]];
-            cell.imageView.image = [img scaleToSize:CGSizeMake(40, 40)];
-            [img release];
-            cell.textLabel.text = [[self.basicSettingList objectAtIndex:row] objectForKey:@"title"];
-            cell.detailTextLabel.text = nil;
-            break;
-        case 2:
-            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier2];
-            if (cell == nil) {
-                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
-                                               reuseIdentifier:CellIdentifier2] autorelease];
-                UISwitch *onOff = [[UISwitch alloc] init];
-                onOff.tag = row;
-                [onOff addTarget:self action:@selector(toggleSwitch:) forControlEvents:UIControlEventValueChanged];
-                cell.accessoryView = onOff;
-                [onOff release];
-            }
-            
-            UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/btn%@.png",BTN_DIRECTORY(),[[self.gameModifierArray objectAtIndex:row] objectForKey:@"image"]]];
-            cell.imageView.image = image;
-            [image release];
-            [cell.imageView.layer setCornerRadius:7.0f];
-            [cell.imageView.layer setMasksToBounds:YES];
-            cell.textLabel.text = [[self.gameModifierArray objectAtIndex:row] objectForKey:@"title"];
-            cell.detailTextLabel.text = [[self.gameModifierArray objectAtIndex:row] objectForKey:@"description"];
-            [(UISwitch *)cell.accessoryView setOn:[[self.schemeArray objectAtIndex:row] boolValue] animated:NO];
-        }
-    
-    return cell;
-}
-
--(void) toggleSwitch:(id) sender {
-    UISwitch *theSwitch = (UISwitch *)sender;
-    [self.schemeArray replaceObjectAtIndex:theSwitch.tag withObject:[NSNumber numberWithBool:theSwitch.on]];
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    if ([indexPath section] == 0) {
-        UITableViewCell *cell = [aTableView cellForRowAtIndexPath:indexPath];
-        for (UIView *oneView in cell.contentView.subviews) {
-            if ([oneView isMemberOfClass:[UITextField class]]) {
-                textFieldBeingEdited = (UITextField *)oneView;
-                [textFieldBeingEdited becomeFirstResponder];
-            }
-        }
-    }
-    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(void) didReceiveMemoryWarning {
-    [super didReceiveMemoryWarning];
-}
-
--(void) viewDidUnload {
-    self.textFieldBeingEdited = nil;
-    self.schemeArray = nil;
-    self.basicSettingList = nil;
-    self.gameModifierArray = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [textFieldBeingEdited release];
-    [schemeArray release];
-    [basicSettingList release];
-    [gameModifierArray release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/SingleTeamViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-//
-//  SingleTeamViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class HogHatViewController;
-@class GravesViewController;
-@class VoicesViewController;
-@class FortsViewController;
-@class FlagsViewController;
-@class LevelViewController;
-@interface SingleTeamViewController : UITableViewController <UITextFieldDelegate> {
-    NSMutableDictionary *teamDictionary;
-    
-    UITextField *textFieldBeingEdited;
-    NSString *teamName;
-    UIImage *normalHogSprite;
-    
-    NSArray *secondaryItems;
-    BOOL isWriteNeeded;
-    
-    HogHatViewController *hogHatViewController;
-    GravesViewController *gravesViewController;
-    VoicesViewController *voicesViewController;
-    FortsViewController *fortsViewController;
-    FlagsViewController *flagsViewController;
-    LevelViewController *levelViewController;
-}
-
-@property (nonatomic,retain) NSMutableDictionary *teamDictionary;
-@property (nonatomic,retain) UITextField *textFieldBeingEdited;
-@property (nonatomic,retain) NSString *teamName;
-@property (nonatomic,retain) UIImage *normalHogSprite;
-@property (nonatomic,retain) NSArray *secondaryItems;
-
--(void) writeFile;
--(void) setWriteNeeded;
-
-@end
--- a/cocoaTouch/SingleTeamViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,453 +0,0 @@
-//
-//  SingleTeamViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "SingleTeamViewController.h"
-#import "HogHatViewController.h"
-#import "GravesViewController.h"
-#import "VoicesViewController.h"
-#import "FortsViewController.h"
-#import "FlagsViewController.h"
-#import "LevelViewController.h"
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-
-#define TEAMNAME_TAG 1234
-
-@implementation SingleTeamViewController
-@synthesize teamDictionary, normalHogSprite, secondaryItems, textFieldBeingEdited, teamName;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark textfield methods
--(void) cancel:(id) sender {
-    if (textFieldBeingEdited != nil)
-        [self.textFieldBeingEdited resignFirstResponder];
-}
-
-// set the new value
--(BOOL) save:(id) sender {
-    NSInteger index = textFieldBeingEdited.tag;
-    
-    if (textFieldBeingEdited != nil) {
-        if (TEAMNAME_TAG == index) {
-            [self.teamDictionary setObject:textFieldBeingEdited.text forKey:@"teamname"];
-        } else {
-            //replace the old value with the new one            
-            NSMutableDictionary *hog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:index];
-            [hog setObject:textFieldBeingEdited.text forKey:@"hogname"];
-        }
-        
-        isWriteNeeded = YES;
-        [self.textFieldBeingEdited resignFirstResponder];
-        return YES;
-    }
-    return NO;
-}
-
-// the textfield is being modified, update the navigation controller
--(void) textFieldDidBeginEditing:(UITextField *)aTextField{   
-    self.textFieldBeingEdited = aTextField;
-
-    UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel",@"from the hog name table")
-                                                                     style:UIBarButtonItemStylePlain
-                                                                    target:self
-                                                                    action:@selector(cancel:)];
-    self.navigationItem.leftBarButtonItem = cancelButton;
-    [cancelButton release];
-    
-    UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save",@"from the hog name table")
-                                                                     style:UIBarButtonItemStyleDone
-                                                                    target:self
-                                                                    action:@selector(save:)];
-    self.navigationItem.rightBarButtonItem = saveButton;
-    [saveButton release];
-}
-
-// the textfield has been modified, check for empty strings and restore original navigation bar
--(void) textFieldDidEndEditing:(UITextField *)aTextField{
-    if ([textFieldBeingEdited.text length] == 0) 
-        textFieldBeingEdited.text = [NSString stringWithFormat:@"hedgehog %d",textFieldBeingEdited.tag];
-
-    self.textFieldBeingEdited = nil;
-    self.navigationItem.rightBarButtonItem = self.navigationItem.backBarButtonItem;
-    self.navigationItem.leftBarButtonItem = nil;
-}
-
-// limit the size of the field to 64 characters like in original frontend
--(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
-    int limit = 64;
-    return !([textField.text length] > limit && [string length] > range.length);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-    
-    // labels for the entries
-    NSArray *array = [[NSArray alloc] initWithObjects:
-                      NSLocalizedString(@"Grave",@""),
-                      NSLocalizedString(@"Voice",@""),
-                      NSLocalizedString(@"Fort",@""),
-                      NSLocalizedString(@"Flag",@""),
-                      NSLocalizedString(@"Level",@""),nil];
-    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;
-}
-
--(void) viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    
-    // load data about the team and write if there has been a change
-    if (isWriteNeeded) 
-        [self writeFile];
-    
-    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),self.title];
-	NSMutableDictionary *teamDict = [[NSMutableDictionary alloc] initWithContentsOfFile:teamFile];
-    self.teamDictionary = teamDict;
-    [teamDict release];
-	[teamFile release];
-    
-    self.teamName = self.title;
-    
-    [self.tableView reloadData];
-}
-
-// write on file if there has been a change
--(void) viewWillDisappear:(BOOL)animated {
-	[super viewWillDisappear:animated];
-
-    // end the editing of the current field
-    if (textFieldBeingEdited != nil) {
-        [self save:nil];
-    }
-    
-    if (isWriteNeeded) 
-        [self writeFile];        
-}
-
-#pragma mark -
-// needed by other classes to warn about a user change
--(void) setWriteNeeded {
-    isWriteNeeded = YES;
-}
-
--(void) writeFile {
-    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),self.title];
-
-    NSString *newTeamName = [self.teamDictionary objectForKey:@"teamname"];
-    if (![newTeamName isEqualToString:self.teamName]) {
-        //delete old
-        [[NSFileManager defaultManager] removeItemAtPath:teamFile error:NULL];
-        [teamFile release];
-        self.title = newTeamName;
-        self.teamName = newTeamName;
-        teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),newTeamName];
-    }
-    
-    [self.teamDictionary writeToFile:teamFile atomically:YES];
-    NSLog(@"writing: %@",teamDictionary);
-    isWriteNeeded = NO;
-	[teamFile release];
-}
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 3;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    NSInteger rows = 0;
-    switch (section) {
-        case 0: // team name
-            rows = 1;
-            break;
-        case 1: // team members
-            rows = MAX_HOGS;
-            break;
-        case 2: // team details
-            rows = [self.secondaryItems count];
-            break;
-        default:
-            break;
-    }
-    return rows;
-}
-
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier0 = @"Cell0";
-    static NSString *CellIdentifier1 = @"Cell1";
-    static NSString *CellIdentifier2 = @"Cell2";
-    
-    NSArray *hogArray;
-    UITableViewCell *cell = nil;
-    NSInteger row = [indexPath row];
-    UIImage *accessoryImage;
-    
-    switch ([indexPath section]) {
-        case 0:
-            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier0];
-            if (cell == nil) {
-                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
-                                               reuseIdentifier:CellIdentifier0] autorelease];
-                // create a uitextfield for each row, expand it to take the maximum size
-                UITextField *aTextField = [[UITextField alloc] 
-                                           initWithFrame:CGRectMake(5, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
-                aTextField.clearsOnBeginEditing = NO;
-                aTextField.returnKeyType = UIReturnKeyDone;
-                aTextField.adjustsFontSizeToFitWidth = YES;
-                aTextField.delegate = self;
-                aTextField.tag = [indexPath row];
-                aTextField.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
-                aTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
-                [aTextField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
-                [cell.contentView addSubview:aTextField];
-                [aTextField release];
-            }
-            
-            cell.imageView.image = nil;
-            cell.accessoryType = UITableViewCellAccessoryNone;
-            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
-                    UITextField *textFieldFound = (UITextField *)oneView;
-                    textFieldFound.text = [self.teamDictionary objectForKey:@"teamname"];
-                    textFieldFound.tag = TEAMNAME_TAG;
-                }
-            }            
-            break;
-        case 1:
-            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
-            if (cell == nil) {
-                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
-                                               reuseIdentifier:CellIdentifier1] autorelease];
-                
-                // create a uitextfield for each row, expand it to take the maximum size
-                UITextField *aTextField = [[UITextField alloc] 
-                                           initWithFrame:CGRectMake(42, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
-                aTextField.clearsOnBeginEditing = NO;
-                aTextField.returnKeyType = UIReturnKeyDone;
-                aTextField.adjustsFontSizeToFitWidth = YES;
-                aTextField.delegate = self;
-                aTextField.tag = [indexPath row];
-                aTextField.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
-                aTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
-                [aTextField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
-                [cell.contentView addSubview:aTextField];
-                [aTextField release];
-            }
-            
-            hogArray = [self.teamDictionary objectForKey:@"hedgehogs"];
-            
-            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
-                    UITextField *textFieldFound = (UITextField *)oneView;
-                    textFieldFound.text = [[hogArray objectAtIndex:row] objectForKey:@"hogname"];
-                }
-            }
-            
-            cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
-            break;
-        case 2:
-            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier2];
-            if (cell == nil) {
-                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
-                                               reuseIdentifier:CellIdentifier2] autorelease];
-            }
-            
-            cell.textLabel.text = [self.secondaryItems objectAtIndex:row];
-            cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
-            switch (row) {
-                case 0: // grave
-                    accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.png",
-                                                                              GRAVES_DIRECTORY(),[teamDictionary objectForKey:@"grave"]]
-                                                                    andCutAt:CGRectMake(0,0,32,32)];
-                    cell.imageView.image = accessoryImage;
-                    [accessoryImage release];
-                    break;
-                case 2: // fort
-                    accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@L.png",
-                                                                              FORTS_DIRECTORY(),[teamDictionary objectForKey:@"fort"]]];
-                    cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(42, 42)];
-                    [accessoryImage release];
-                    break;
-                    
-                case 3: // flags
-                    accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.png",
-                                                                              FLAGS_DIRECTORY(),[teamDictionary objectForKey:@"flag"]]];
-                    cell.imageView.image = accessoryImage;
-                    [accessoryImage release];
-                    break;
-                case 4: // level
-                    accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%d.png",
-                                                                              BOTLEVELS_DIRECTORY(),[[[[teamDictionary objectForKey:@"hedgehogs"]
-                                                                                                      objectAtIndex:0] objectForKey:@"level"]
-                                                                                                     intValue]]];
-                    cell.imageView.image = accessoryImage;
-                    [accessoryImage release];
-                    break;
-                default:
-                    cell.imageView.image = nil;
-                    break;
-            }
-            break;
-    }
-    
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    NSInteger row = [indexPath row];
-    NSInteger section = [indexPath section];
-    UITableViewController *nextController = nil;
-    UITableViewCell *cell;
-    
-    if (2 == section) {
-        switch (row) {
-            case 0: // grave
-                if (nil == gravesViewController)
-                    gravesViewController = [[GravesViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
-                nextController = gravesViewController;
-                break;
-            case 1: // voice
-                if (nil == voicesViewController)
-                    voicesViewController = [[VoicesViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
-                nextController = voicesViewController;                    
-                break;
-            case 2: // fort
-                if (nil == fortsViewController)
-                    fortsViewController = [[FortsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
-                nextController = fortsViewController;
-                break;
-            case 3: // flag
-                if (nil == flagsViewController) 
-                    flagsViewController = [[FlagsViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
-                nextController = flagsViewController;
-                break;
-            case 4: // level
-                if (nil == levelViewController)
-                    levelViewController = [[LevelViewController alloc] initWithStyle:UITableViewStyleGrouped];
-                
-                nextController = levelViewController;
-                break;
-        }
-        
-        nextController.title = [secondaryItems objectAtIndex:row];
-        [nextController setTeamDictionary:teamDictionary];
-        [self.navigationController pushViewController:nextController animated:YES];
-    } else {
-        cell = [aTableView cellForRowAtIndexPath:indexPath];
-        for (UIView *oneView in cell.contentView.subviews) {
-            if ([oneView isMemberOfClass:[UITextField class]]) {
-                textFieldBeingEdited = (UITextField *)oneView;
-                [textFieldBeingEdited becomeFirstResponder];
-            }
-        }
-        [aTableView deselectRowAtIndexPath:indexPath animated:NO];
-    }
-
-}
-
-// action to perform when you want to change a hog hat
--(void) tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
-    if (nil == hogHatViewController) {
-        hogHatViewController = [[HogHatViewController alloc] initWithStyle:UITableViewStyleGrouped];
-    }
-    
-    // cache the dictionary file of the team, so that other controllers can modify it
-    hogHatViewController.teamDictionary = self.teamDictionary;
-    hogHatViewController.selectedHog = [indexPath row];
-    
-    [self.navigationController pushViewController:hogHatViewController animated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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.
-    if (hogHatViewController.view.superview == nil)
-        hogHatViewController = nil;
-    if (gravesViewController.view.superview == nil)
-        gravesViewController = nil;
-    if (voicesViewController.view.superview == nil)
-        voicesViewController = nil;
-    if (fortsViewController.view.superview == nil)
-        fortsViewController = nil;
-    if (flagsViewController.view.superview == nil)
-        flagsViewController = nil;
-    if (levelViewController.view.superview == nil)
-        levelViewController = nil;
-}
-
--(void) viewDidUnload {
-    self.teamDictionary = nil;
-    self.textFieldBeingEdited = nil;
-    self.teamName = nil;
-    self.normalHogSprite = nil;
-    self.secondaryItems = nil;
-    hogHatViewController = nil;
-    flagsViewController = nil;
-    fortsViewController = nil;
-    gravesViewController = nil;
-    levelViewController = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [teamDictionary release];
-    [textFieldBeingEdited release];
-    [teamName release];
-    [normalHogSprite release];
-    [secondaryItems release];
-    [hogHatViewController release];
-    [fortsViewController release];
-    [gravesViewController release];
-    [flagsViewController release];
-    [levelViewController release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/SplitViewRootController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-//
-//  SplitViewRootController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 27/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-@class DetailViewController;
-@interface SplitViewRootController: UIViewController {
-    DetailViewController *detailViewController;
-}
-
-@end
--- a/cocoaTouch/SplitViewRootController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-    //
-//  SplitViewRootController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 27/03/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "SplitViewRootController.h"
-#import "MasterViewController.h"
-#import "DetailViewController.h"
-#import "CommodityFunctions.h"
-
-@implementation SplitViewRootController
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return rotationManager(interfaceOrientation);
-}
-
--(void) didReceiveMemoryWarning {
-    // Releases the view if it doesn't have a superview.
-    [super didReceiveMemoryWarning];    
-    // Release any cached data, images, etc that aren't in use.
-    if (detailViewController.view.superview == nil)
-        detailViewController = nil;
-    MSG_MEMCLEAN();
-}
-
-// 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 {
-    detailViewController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
-    UINavigationController *detailedNavController = [[UINavigationController alloc] initWithRootViewController:detailViewController];
-    [detailViewController release];
-
-    CGRect rect = [[UIScreen mainScreen] bounds];
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-        self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
-        
-    Class splitViewControllerClass = NSClassFromString(@"UISplitViewController");
-    if (splitViewControllerClass) {
-#if __IPHONE_3_2
-        UISplitViewController *splitViewRootController = [[UISplitViewController alloc] init];
-        //splitViewRootController.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;        
-        splitViewRootController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
-        
-        MasterViewController *masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
-        UINavigationController *mainNavController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
-        [masterViewController release];
-
-        splitViewRootController.delegate = detailViewController;
-        masterViewController.detailViewController = detailViewController;        
-        splitViewRootController.viewControllers = [NSArray arrayWithObjects: mainNavController, detailedNavController, nil];
-        [mainNavController release];
-        [detailedNavController release];
-        
-        // add view to main controller
-        [self.view addSubview:splitViewRootController.view];
-#endif
-    } else {
-        [self.view addSubview:detailedNavController.view];
-    }
-
-    [super viewDidLoad];
-}
-         
--(void) viewDidUnload {
-    detailViewController = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [detailViewController release];
-    [super dealloc];
-}
--(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
-    [detailViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
-}
-
-#pragma mark -
-#pragma mark additional methods as we're using a UINavigationController programmatically
-// see http://davidebenini.it/2009/01/03/viewwillappear-not-being-called-inside-a-uinavigationcontroller/
--(void) viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    [detailViewController.navigationController viewWillAppear:animated];
-}
-
--(void) viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-    [detailViewController.navigationController viewWillDisappear:animated];
-}
-
--(void) viewDidAppear:(BOOL)animated {
-    [super viewDidLoad];
-    [detailViewController.navigationController viewDidAppear:animated];
-}
-
--(void) viewDidDisappear:(BOOL)animated {
-    [super viewDidUnload];
-    [detailViewController.navigationController viewDidDisappear:animated];
-}
-
-
-@end
--- a/cocoaTouch/TeamConfigViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-//
-//  TeamConfigViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 20/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface TeamConfigViewController : UITableViewController {
-    NSMutableArray *listOfTeams;
-    NSMutableArray *listOfSelectedTeams;
-}
-
-@property (nonatomic, retain) NSMutableArray *listOfTeams;
-@property (nonatomic, retain) NSMutableArray *listOfSelectedTeams;
-
-@end
--- a/cocoaTouch/TeamConfigViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,174 +0,0 @@
-//
-//  TeamConfigViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 20/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "TeamConfigViewController.h"
-#import "CommodityFunctions.h"
-#import "HogButtonView.h"
-#import "SquareButtonView.h"
-
-@implementation TeamConfigViewController
-@synthesize listOfTeams, listOfSelectedTeams;
-
-#define NUMBERBUTTON_TAG 123456
-#define SQUAREBUTTON_TAG 654321
-#define LABEL_TAG        456123
-
-#pragma mark -
-#pragma mark View lifecycle
--(void) viewDidLoad {
-    [super viewDidLoad];
-    
-    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
-    self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
-}
-
--(void) viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-
-    // 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++) {
-        NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
-                                                                  [contentsOfDir objectAtIndex:i],@"team",
-                                                                  [NSNumber numberWithInt:4],@"number",
-                                                                  [NSNumber numberWithInt:colors[i%6]],@"color",nil];
-        [array addObject:dict];
-        [dict release];
-    }
-    self.listOfTeams = array;
-    [array release];
-    
-    NSMutableArray *emptyArray = [[NSMutableArray alloc] initWithObjects:nil];
-    self.listOfSelectedTeams = emptyArray;
-    [emptyArray release];
-
-    [self.tableView reloadData];
-}
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-    return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 2;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    if (section == 0)
-        return [listOfSelectedTeams count] ;
-    else
-        return [listOfTeams count];
-}
-
--(NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section {
-    if (section == 0)
-        return NSLocalizedString(@"Playing Teams",@"");
-    else
-        return NSLocalizedString(@"Available Teams",@"");
-}
-
-// Customize the appearance of table view cells.
--(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 = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier0];
-        if (cell == nil) {
-            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease];
-
-            UIButton *numberButton = [[HogButtonView alloc] initWithFrame:CGRectMake(12, 5, 88, 32)];
-            numberButton.tag = NUMBERBUTTON_TAG;
-            [cell addSubview:numberButton];
-            [numberButton release];
-            
-            SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(12+88+7, 5, 36, 36)];
-            squareButton.tag = SQUAREBUTTON_TAG;
-            [cell addSubview:squareButton];
-            [squareButton release];
-            
-            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(12+88+7+36+7, 10, 250, 25)];
-            label.textAlignment = UITextAlignmentLeft;
-            label.backgroundColor = [UIColor clearColor];
-            label.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
-            label.tag = LABEL_TAG;
-            [cell.contentView addSubview:label];
-            [label release];
-        }
-        
-        NSMutableDictionary *selectedRow = [listOfSelectedTeams objectAtIndex:[indexPath row]];
-        
-        UILabel *cellLabel = (UILabel *)[cell viewWithTag:LABEL_TAG];
-        cellLabel.text = [[selectedRow objectForKey:@"team"] stringByDeletingPathExtension];
-        
-        HogButtonView *numberButton = (HogButtonView *)[cell viewWithTag:NUMBERBUTTON_TAG];
-        [numberButton drawManyHogs:[[selectedRow objectForKey:@"number"] intValue]];
-        numberButton.ownerDictionary = selectedRow;
-        
-        SquareButtonView *squareButton = (SquareButtonView *)[cell viewWithTag:SQUAREBUTTON_TAG];
-        [squareButton selectColor:[[selectedRow objectForKey:@"color"] intValue]];
-        squareButton.ownerDictionary = selectedRow;
-    } else {
-        cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1];
-        if (cell == nil) 
-            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease];
-        
-        cell.textLabel.text = [[[listOfTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension];
-    }
-
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    NSInteger row = [indexPath row];
-    NSInteger section = [indexPath section];
-
-    if (section == 0) {
-        [self.listOfTeams addObject:[self.listOfSelectedTeams objectAtIndex:row]];
-        [self.listOfSelectedTeams removeObjectAtIndex:row];
-    } else {
-        [self.listOfSelectedTeams addObject:[self.listOfTeams objectAtIndex:row]];
-        [self.listOfTeams removeObjectAtIndex:row];      
-    }
-    [aTableView reloadData];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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 {
-    self.listOfTeams = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
-
--(void) dealloc {
-    [self.listOfTeams release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/TeamSettingsViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-//
-//  TeamSettingsViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-@class SingleTeamViewController;
-
-@interface TeamSettingsViewController : UITableViewController {
-    NSMutableArray *listOfTeams;
-    SingleTeamViewController *childController;
-}
-
-@property (nonatomic, retain) NSMutableArray *listOfTeams;
-
-@end
--- a/cocoaTouch/TeamSettingsViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-//
-//  TeamSettingsViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "TeamSettingsViewController.h"
-#import "SingleTeamViewController.h"
-#import "CommodityFunctions.h"
-
-@implementation TeamSettingsViewController
-@synthesize listOfTeams;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
-// add an edit button
--(void) viewDidLoad {
-    [super viewDidLoad];
-
-    UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"from the team panel")
-                                                                   style:UIBarButtonItemStyleBordered
-                                                                  target:self
-                                                                  action:@selector(toggleEdit:)];
-    self.navigationItem.rightBarButtonItem = editButton;
-    [editButton release];
-}
-
-// load the list of teams in the teams directory
--(void) viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    
-    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL];
-    NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES];
-    self.listOfTeams = array;
-    [array release];
-    
-    [self.tableView reloadData];
-}
-
-// modifies the navigation bar to add the "Add" and "Done" buttons
--(void) toggleEdit:(id) sender {
-    BOOL isEditing = self.tableView.editing;
-    [self.tableView setEditing:!isEditing animated:YES];
-    
-    if (isEditing) {
-        [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Edit",@"from the team panel")];
-        [self.navigationItem.rightBarButtonItem setStyle: UIBarButtonItemStyleBordered];
-        self.navigationItem.leftBarButtonItem = self.navigationItem.backBarButtonItem;
-    } else {
-        [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Done",@"from the team panel")];
-        [self.navigationItem.rightBarButtonItem setStyle:UIBarButtonItemStyleDone];
-        UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Add",@"from the team panel")
-                                                                      style:UIBarButtonItemStyleBordered
-                                                                     target:self
-                                                                     action:@selector(addTeam:)];
-        self.navigationItem.leftBarButtonItem = addButton;
-        [addButton release];
-    }
-}
-
-// add a team file with default values and updates the table
--(void) addTeam:(id) sender {
-    NSString *fileName = [[NSString alloc] initWithFormat:@"Default Team %u.plist", [self.listOfTeams count]];
-    
-    createTeamNamed([fileName stringByDeletingPathExtension]);
-    
-    [self.listOfTeams addObject:fileName];
-    [fileName release];
-    
-    // order the array alphabetically, so teams will keep their position
-    [self.listOfTeams sortUsingSelector:@selector(compare:)];
-    
-    [self.tableView reloadData];
-}
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [self.listOfTeams count];
-}
-
-// Customize the appearance of table view cells.
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    NSUInteger row = [indexPath row]; 
-    NSString *rowString = [[self.listOfTeams objectAtIndex:row] stringByDeletingPathExtension]; 
-    cell.textLabel.text = rowString; 
-    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
-    
-    return cell;
-}
-
-// delete the row and the file
--(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-    NSUInteger row = [indexPath row];
-    
-    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@",TEAMS_DIRECTORY(),[self.listOfTeams objectAtIndex:row]];
-    [[NSFileManager defaultManager] removeItemAtPath:teamFile error:NULL];
-    [teamFile release];
-    
-    [self.listOfTeams removeObjectAtIndex:row];
-    [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    if (childController == nil) {
-        childController = [[SingleTeamViewController alloc] initWithStyle:UITableViewStyleGrouped];
-    }
-    
-    NSInteger row = [indexPath row];
-    NSString *selectedTeamFile = [listOfTeams objectAtIndex:row];
-    
-    // this must be set so childController can load the correct plist
-    childController.title = [selectedTeamFile stringByDeletingPathExtension];
-    [childController.tableView setContentOffset:CGPointMake(0,0) animated:NO];
-
-    [self.navigationController pushViewController:childController animated:YES];
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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.
-    if (childController.view.superview == nil )
-        childController = nil;
-}
-
--(void) viewDidUnload {
-    self.listOfTeams = nil;
-    childController = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [self.listOfTeams release];
-    [childController release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/VoicesViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-//
-//  VoicesViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface VoicesViewController : UITableViewController {
-    NSMutableDictionary *teamDictionary;
-    
-    NSArray *voiceArray;
-    NSIndexPath *lastIndexPath;
-
-    int voiceBeingPlayed;
-}
-
-@property (nonatomic,retain) NSMutableDictionary *teamDictionary;
-@property (nonatomic,retain) NSArray *voiceArray;
-@property (nonatomic,retain) NSIndexPath *lastIndexPath;
-
-@end
--- a/cocoaTouch/VoicesViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-//
-//  VoicesViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 02/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "VoicesViewController.h"
-#import "CommodityFunctions.h"
-#import "openalbridge.h"
-
-
-@implementation VoicesViewController
-@synthesize teamDictionary, voiceArray, lastIndexPath;
-
-
--(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
-	return rotationManager(interfaceOrientation);
-}
-
-
-#pragma mark -
-#pragma mark View lifecycle
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    srandom(time(NULL));
-
-    openal_init(20);
-}
-
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-    
-    // this moves the tableview to the top
-    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
-    voiceBeingPlayed = -1;
-
-    // load all the voices names and store them into voiceArray
-    NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:VOICES_DIRECTORY() error:NULL];
-    self.voiceArray = array;
-}
-
-/*
-- (void)viewDidAppear:(BOOL)animated {
-    [super viewDidAppear:animated];
-}
-*/
-
-- (void)viewWillDisappear:(BOOL)animated {
-    [super viewWillDisappear:animated];
-    if(voiceBeingPlayed >= 0) {
-        openal_stopsound(voiceBeingPlayed);
-        voiceBeingPlayed = -1;
-    }
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
--(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
-    return 1;
-}
-
--(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return [self.voiceArray count];
-}
-
-// Customize the appearance of table view cells.
--(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    NSString *voice = [[voiceArray objectAtIndex:[indexPath row]] stringByDeletingPathExtension];
-    cell.textLabel.text = voice;
-    
-    if ([voice isEqualToString:[teamDictionary objectForKey:@"voicepack"]]) {
-        cell.accessoryType = UITableViewCellAccessoryCheckmark;
-        self.lastIndexPath = indexPath;
-    } else {
-        cell.accessoryType = UITableViewCellAccessoryNone;
-    }
-
-    return cell;
-}
-
-
-#pragma mark -
-#pragma mark Table view delegate
--(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    int newRow = [indexPath row];
-    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
-    
-    if (newRow != oldRow) {
-        [teamDictionary setObject:[voiceArray objectAtIndex:newRow] forKey:@"voicepack"];
-        
-        // tell our boss to write this new stuff on disk
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
-        [self.tableView reloadData];
-        
-        self.lastIndexPath = indexPath;
-        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
-    } 
-    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
-    
-    if (voiceBeingPlayed >= 0) {
-        openal_stopsound(voiceBeingPlayed);
-        voiceBeingPlayed = -1;
-    }
-    
-    // the keyword static prevents re-initialization of the variable
-    NSString *voiceDir = [[NSString alloc] initWithFormat:@"%@/%@/",VOICES_DIRECTORY(),[voiceArray objectAtIndex:newRow]];
-    NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:voiceDir error:NULL];
-    
-    int index = random() % [array count];
-    
-    voiceBeingPlayed = openal_loadfile([[voiceDir stringByAppendingString:[array objectAtIndex:index]] UTF8String]);
-    [voiceDir release];
-    openal_playsound(voiceBeingPlayed);    
-}
-
-
-#pragma mark -
-#pragma mark Memory management
--(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 {
-    openal_close();
-    voiceBeingPlayed = -1;
-    self.lastIndexPath = nil;
-    self.teamDictionary = nil;
-    self.voiceArray = nil;
-    [super viewDidUnload];
-    MSG_DIDUNLOAD();
-}
-
--(void) dealloc {
-    [voiceArray release];
-    [teamDictionary release];
-    [lastIndexPath release];
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/WeaponSettingsViewController.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-//
-//  WeaponSettingsViewController.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 19/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface WeaponSettingsViewController : UITableViewController {
-
-}
-
-@end
--- a/cocoaTouch/WeaponSettingsViewController.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-//
-//  WeaponSettingsViewController.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 19/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "WeaponSettingsViewController.h"
-
-
-@implementation WeaponSettingsViewController
-
-
-#pragma mark -
-#pragma mark Initialization
-
-/*
-- (id)initWithStyle:(UITableViewStyle)style {
-    // Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
-    if ((self = [super initWithStyle:style])) {
-    }
-    return self;
-}
-*/
-
-
-#pragma mark -
-#pragma mark View lifecycle
-
-/*
-- (void)viewDidLoad {
-    [super viewDidLoad];
-
-    // Uncomment the following line to preserve selection between presentations.
-    self.clearsSelectionOnViewWillAppear = NO;
- 
-    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
-    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
-}
-*/
-
-/*
-- (void)viewWillAppear:(BOOL)animated {
-    [super viewWillAppear:animated];
-}
-*/
-/*
-- (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 {
-    // Override to allow orientations other than the default portrait orientation.
-    return YES;
-}
-
-
-#pragma mark -
-#pragma mark Table view data source
-
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    // Return the number of sections.
-    return 1;
-}
-
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    // Return the number of rows in the section.
-    return 1;
-}
-
-
-// Customize the appearance of table view cells.
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    static NSString *CellIdentifier = @"Cell";
-    
-    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
-    if (cell == nil) {
-        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
-    }
-    
-    // Configure the cell...
-    
-    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 *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    // Navigation logic may go here. Create and push another view controller.
-	/*
-	 <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
-     // ...
-     // Pass the selected object to the new view controller.
-	 [self.navigationController pushViewController:detailViewController animated:YES];
-	 [detailViewController release];
-	 */
-}
-
-
-#pragma mark -
-#pragma mark Memory management
-
-- (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 {
-    // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
-    // For example: self.myOutlet = nil;
-}
-
-
-- (void)dealloc {
-    [super dealloc];
-}
-
-
-@end
-
--- a/cocoaTouch/otherSrc/CGPointUtils.c	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
- *  CGPointUtils.c
- *  PinchMe
- *
- *  Created by Jeff LaMarche on 8/2/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
- */
-
-#include "CGPointUtils.h"
-#include <math.h>
-
-
-CGFloat distanceBetweenPoints (CGPoint first, CGPoint second) {
-	CGFloat deltaX = second.x - first.x;
-	CGFloat deltaY = second.y - first.y;
-	return sqrt(deltaX*deltaX + deltaY*deltaY );
-}
-
-CGFloat angleBetweenPoints(CGPoint first, CGPoint second) {
-	CGFloat height = second.y - first.y;
-	CGFloat width = first.x - second.x;
-	CGFloat rads = atan(height/width);
-	return radiansToDegrees(rads);
-}
-
-CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End) {
-	CGFloat a = line1End.x - line1Start.x;
-	CGFloat b = line1End.y - line1Start.y;
-	CGFloat c = line2End.x - line2Start.x;
-	CGFloat d = line2End.y - line2Start.y;
-	CGFloat rads = acos(((a*c) + (b*d)) / ((sqrt(a*a + b*b)) * (sqrt(c*c + d*d))));
-	return radiansToDegrees(rads);
-}
--- a/cocoaTouch/otherSrc/CGPointUtils.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-/*
- *  CGPointUtils.h
- *  PinchMe
- *
- *  Created by Jeff LaMarche on 8/2/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
- *
- */
-
-#import <CoreGraphics/CoreGraphics.h>
-
-#define degreesToRadian(x) (M_PI * x / 180.0)
-#define radiansToDegrees(x) (180.0 * x / M_PI)
-
-CGFloat distanceBetweenPoints (CGPoint first, CGPoint second);
-CGFloat angleBetweenPoints(CGPoint first, CGPoint second);
-CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End);
--- a/cocoaTouch/otherSrc/CommodityFunctions.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-//
-//  CommodityFunctions.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 08/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-#define MAX_HOGS 8
-
-
-#define SETTINGS_FILE()         [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
-                                 objectAtIndex:0] stringByAppendingString:@"/settings.plist"]
-#define GAMECONFIG_FILE()       [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
-                                 objectAtIndex:0] stringByAppendingString:@"/gameconfig.plist"]
-#define DEBUG_FILE()            [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
-                                 objectAtIndex:0] stringByAppendingString:@"/debug.txt"]
-
-#define TEAMS_DIRECTORY()       [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
-                                 objectAtIndex:0] stringByAppendingString:@"/Teams/"]
-#define SCHEMES_DIRECTORY()     [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
-                                 objectAtIndex:0] stringByAppendingString:@"/Schemes/"]
-
-#define GRAPHICS_DIRECTORY()    [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"]
-#define HATS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"]
-#define GRAVES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"]
-#define BOTLEVELS_DIRECTORY()   [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"]
-#define BTN_DIRECTORY()         [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn"]
-#define FLAGS_DIRECTORY()       [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"]
-#define FORTS_DIRECTORY()       [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"]
-#define THEMES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Themes/"]
-#define MAPS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Maps/"]
-#define VOICES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"]
-
-#define MSG_MEMCLEAN()          DLog(@"has cleaned up some memory"); print_free_memory()
-#define MSG_DIDUNLOAD()         DLog(@"did unload");
-
-void createTeamNamed (NSString *nameWithoutExt);
-void createSchemeNamed (NSString *nameWithoutExt);
-BOOL rotationManager (UIInterfaceOrientation interfaceOrientation);
-NSInteger randomPort ();
-void popError (const char *title, const char *message);
-void print_free_memory ();
-
--- a/cocoaTouch/otherSrc/CommodityFunctions.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-//
-//  CommodityFunctions.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 08/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "CommodityFunctions.h"
-#import <mach/mach.h>
-#import <mach/mach_host.h>
-
-void createTeamNamed (NSString *nameWithoutExt) {
-    NSString *teamsDirectory = TEAMS_DIRECTORY();
-    
-    if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) {
-        [[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory 
-                                  withIntermediateDirectories:NO 
-                                                   attributes:nil 
-                                                        error:NULL];
-    }
-    
-    NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: MAX_HOGS];
-    
-    for (int i = 0; i < MAX_HOGS; i++) {
-        NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i];
-        NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithInt:0],@"level",
-                             hogName,@"hogname", @"NoHat",@"hat", nil];
-        [hogName release];
-        [hedgehogs addObject:hog];
-        [hog release];
-    }
-    
-    NSDictionary *theTeam = [[NSDictionary alloc] initWithObjectsAndKeys:@"0",@"hash", nameWithoutExt,@"teamname",
-                             @"Statue",@"grave", @"Plane",@"fort", @"Default",@"voicepack",
-                             @"hedgewars",@"flag", hedgehogs,@"hedgehogs", nil];
-    [hedgehogs release];
-    
-    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", teamsDirectory, nameWithoutExt];
-
-    [theTeam writeToFile:teamFile atomically:YES];
-    [teamFile release];
-    [theTeam release];
-}
-
-void createSchemeNamed (NSString *nameWithoutExt) {
-    NSString *schemesDirectory = SCHEMES_DIRECTORY();
-    
-    if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) {
-        [[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory 
-                                  withIntermediateDirectories:NO 
-                                                   attributes:nil 
-                                                        error:NULL];
-    }
-    
-    NSArray *theScheme = [[NSArray alloc] initWithObjects:
-                          [NSNumber numberWithBool:NO],    //fortmode
-                          [NSNumber numberWithBool:NO],    //divideteam
-                          [NSNumber numberWithBool:NO],    //solidland
-                          [NSNumber numberWithBool:NO],    //addborder
-                          [NSNumber numberWithBool:NO],    //lowgravity
-                          [NSNumber numberWithBool:NO],    //lasersight
-                          [NSNumber numberWithBool:NO],    //invulnerable
-                          [NSNumber numberWithBool:NO],    //addmines
-                          [NSNumber numberWithBool:NO],    //vampirism
-                          [NSNumber numberWithBool:NO],    //karma
-                          [NSNumber numberWithBool:NO],    //artillery
-                          [NSNumber numberWithBool:YES],   //randomorder
-                          [NSNumber numberWithBool:NO],    //king
-                          [NSNumber numberWithBool:NO],    //placehedgehogs
-                          [NSNumber numberWithBool:NO],    //clansharesammo
-                          [NSNumber numberWithBool:NO],    //disablegirders
-                          [NSNumber numberWithBool:NO],    //disablelandobjects
-                          [NSNumber numberWithInt:100],    //damagemodifier
-                          [NSNumber numberWithInt:45],     //turntime
-                          [NSNumber numberWithInt:100],    //initialhealth
-                          [NSNumber numberWithInt:15],     //suddendeathtimeout
-                          [NSNumber numberWithInt:5],      //cratedrops
-                          [NSNumber numberWithInt:3],      //minestime
-                          [NSNumber numberWithInt:4],      //mines
-                          [NSNumber numberWithInt:0],      //dudmines
-                          [NSNumber numberWithInt:2],      //explosives
-                          nil];
-    
-    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt];
-
-    [theScheme writeToFile:schemeFile atomically:YES];
-    [schemeFile release];
-    [theScheme release];
-}
-
-BOOL rotationManager (UIInterfaceOrientation interfaceOrientation) {
-    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-        return YES;
-    else
-        return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
-               (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);  
-}
-
-NSInteger randomPort () {
-    srandom(time(NULL));
-    return (random() % 64511) + 1024;
-}
-
-void popError (const char *title, const char *message) {
-    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:title]
-                                                    message:[NSString stringWithUTF8String:message]
-                                                   delegate:nil
-                                          cancelButtonTitle:@"Ok"
-                                          otherButtonTitles:nil];
-    [alert show];
-    [alert release];
-}
-
-// by http://landonf.bikemonkey.org/code/iphone/Determining_Available_Memory.20081203.html
-void print_free_memory () {
-    mach_port_t host_port;
-    mach_msg_type_number_t host_size;
-    vm_size_t pagesize;
-    
-    host_port = mach_host_self();
-    host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t);
-    host_page_size(host_port, &pagesize);        
- 
-    vm_statistics_data_t vm_stat;
-              
-    if (host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size) != KERN_SUCCESS)
-        DLog(@"Failed to fetch vm statistics");
- 
-    /* Stats in bytes */ 
-    natural_t mem_used = (vm_stat.active_count +
-                          vm_stat.inactive_count +
-                          vm_stat.wire_count) * pagesize;
-    natural_t mem_free = vm_stat.free_count * pagesize;
-    natural_t mem_total = mem_used + mem_free;
-    DLog(@"used: %u free: %u total: %u", mem_used, mem_free, mem_total);
-}
--- a/cocoaTouch/otherSrc/HogButtonView.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-//
-//  HogButtonView.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 20/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface HogButtonView : UIButton {
-    NSInteger numberOfHogs;
-    UIImage *singleHog;
-    NSMutableDictionary *ownerDictionary;
-}
-
-@property (nonatomic,retain) UIImage *singleHog;
-@property (nonatomic) NSInteger numberOfHogs;
-@property (nonatomic,retain) NSMutableDictionary *ownerDictionary;
-
--(void) drawManyHogs:(NSInteger) hogs;
--(void) addOne;
-
-@end
--- a/cocoaTouch/otherSrc/HogButtonView.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-//
-//  HogButtonView.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 20/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "HogButtonView.h"
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-
-@implementation HogButtonView
-@synthesize singleHog, numberOfHogs, ownerDictionary;
-
--(id) initWithFrame:(CGRect)frame {
-    if ((self = [super initWithFrame:frame])) {
-        self.backgroundColor = [UIColor clearColor];
-        
-        NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
-        UIImage *normalHogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
-        [normalHogFile release];
-        
-        self.singleHog = normalHogSprite;
-        [normalHogSprite release];
-        [self addTarget:self action:@selector(addOne) forControlEvents:UIControlEventTouchUpInside];
-    }
-    return self;
-}
-
--(void) addOne {
-    self.highlighted = NO;
-    NSInteger number = self.numberOfHogs;
-    number++;
-    [self drawManyHogs:number];
-}
-
--(void) drawManyHogs:(NSInteger) hogs {
-    if (numberOfHogs != hogs) {
-        if (hogs <= MAX_HOGS && hogs >= 1)
-            numberOfHogs = hogs;
-        else {
-            if (hogs > MAX_HOGS)
-                numberOfHogs = 1;
-            else
-                numberOfHogs = MAX_HOGS;
-        }
-        [ownerDictionary setObject:[NSNumber numberWithInt:numberOfHogs] forKey:@"number"];
-        
-        UIImage *teamHogs = [[[UIImage alloc] init] autorelease];
-        for (int i = 0; i < numberOfHogs; i++) {
-            teamHogs = [singleHog mergeWith:teamHogs
-                                    atPoint:CGPointMake(8, 0) 
-                                     atSize:CGSizeMake(88, 32)];
-        }
-        [self setImage:teamHogs forState:UIControlStateNormal];
-    }
-}
-
--(void) dealloc {
-    [ownerDictionary release];
-    [singleHog release];
-    [super dealloc];
-}
-
-
-@end
--- a/cocoaTouch/otherSrc/PascalImports.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- *  PascalImports.h
-//  fpciphonedel
-//
-//  Created by Vittorio on 07/01/10.
-//  Copyright __MyCompanyName__ 2010. All rights reserved.
- *
- */
-
-#ifndef PASCALIMPORTS
-#define PASCALIMPORTS
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-	
-	/* add C declarations below for all exported Pascal functions/procedure
-	 * that you want to use
-	 */
-
-	void Game(const char *args[]);
-    void GenLandPreview();
-
-
-	void HW_versionInfo(short int*, char**);
-
-	void HW_click(void);
-	void HW_zoomIn(void);
-	void HW_zoomOut(void);
-	void HW_zoomReset(void);
-	void HW_ammoMenu(void);
-	
-	void HW_allKeysUp(void);
-	
-	void HW_walkLeft(void);
-	void HW_walkRight(void);
-	void HW_aimUp(void);
-	void HW_aimDown(void);
-	void HW_shoot(void);
-	void HW_jump(void);
-	void HW_backjump(void);
-	
-	void HW_chat(void);
-	void HW_tab(void);
-	void HW_pause(void);
-    
-	void HW_cursorUp(int);
-	void HW_cursorDown(int);
-	void HW_cursorLeft(int);
-	void HW_cursorRight(int);
-    
-    void HW_terminate(BOOL);
-	
-    void HW_setLandscape(BOOL);
-#ifdef __cplusplus
-}
-#endif
-
-#endif
--- a/cocoaTouch/otherSrc/SquareButtonView.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-//
-//  HogButtonView.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 20/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-
-@interface SquareButtonView : UIButton {
-    NSInteger colorIndex;
-    NSUInteger selectedColor;
-    NSArray *colorArray;
-    NSMutableDictionary *ownerDictionary;
-}
-
-@property (nonatomic,retain) NSArray *colorArray;
-@property (nonatomic) NSUInteger selectedColor;
-@property (nonatomic,retain) NSMutableDictionary *ownerDictionary;
-
--(void) nextColor;
--(void) selectColor:(NSUInteger) color;
-
-@end
--- a/cocoaTouch/otherSrc/SquareButtonView.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-//
-//  HogButtonView.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 20/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "SquareButtonView.h"
-#import <QuartzCore/QuartzCore.h>
-#import "CommodityFunctions.h"
-#import "UIImageExtra.h"
-
-@implementation SquareButtonView
-@synthesize colorArray, selectedColor, ownerDictionary;
-
--(id) initWithFrame:(CGRect)frame {
-    if ((self = [super initWithFrame:frame])) {
-        colorIndex = -1;
-        selectedColor = 0;
-
-        // list of allowed colors
-        NSArray *colors = [[NSArray alloc] initWithObjects: [NSNumber numberWithUnsignedInt:4421353],    // bluette
-                                                            [NSNumber numberWithUnsignedInt:4100897],    // greeeen
-                                                            [NSNumber numberWithUnsignedInt:10632635],   // violett
-                                                            [NSNumber numberWithUnsignedInt:16749353],   // oranngy
-                                                            [NSNumber numberWithUnsignedInt:14483456],   // reddish
-                                                            [NSNumber numberWithUnsignedInt:7566195],    // graaaay
-                                                            nil];
-        self.colorArray = colors;
-        [colors release];
-
-        // set the color to the first available one
-        [self nextColor];
-        
-        // this makes the button round and nice
-        [self.layer setCornerRadius:7.0f];
-        [self.layer setMasksToBounds:YES];        
-        
-        // this changes the color at button press
-        [self addTarget:self action:@selector(nextColor) forControlEvents:UIControlEventTouchUpInside];
-
-        self.backgroundColor = [UIColor blackColor];
-    }
-    return self;
-}
-
--(void) nextColor {
-    colorIndex++;
-    if (colorIndex >= [colorArray count])
-        colorIndex = 0;
-
-    NSUInteger color = [[self.colorArray objectAtIndex:colorIndex] unsignedIntValue];
-    [self selectColor:color];
-    
-    [ownerDictionary setObject:[NSNumber numberWithInt:color] forKey:@"color"];
-}
-
--(void) selectColor:(NSUInteger) color {
-    if (color != selectedColor) {
-        selectedColor = color;
-        
-        UIGraphicsBeginImageContext(self.frame.size);	
-        CGContextRef context = UIGraphicsGetCurrentContext();
-        CGContextSetRGBFillColor(context, ((color & 0x00FF0000) >> 16)/255.0f,
-                                          ((color & 0x0000FF00) >> 8)/255.0f,
-                                           (color & 0x000000FF)/255.0f,
-                                            1.0f);
-        CGContextFillRect(context, CGRectMake(1.1, 1.1, self.frame.size.width-2.2, self.frame.size.height-2.2));
-        
-        UIImageView *resultingImage = [[UIImageView alloc] initWithImage: UIGraphicsGetImageFromCurrentImageContext()];
-        UIGraphicsEndImageContext();
-        
-        [self setImage:resultingImage.image forState:UIControlStateNormal];
-        [resultingImage release];
-        
-    }
-    /*  
-    self.backgroundColor = [UIColor colorWithRed:((color & 0x00FF0000) >> 16)/255.0f 
-                                           green:((color & 0x0000FF00) >> 8)/255.0f 
-                                            blue: (color & 0x000000FF)/255.0f 
-                                           alpha:1.0f];
-    */
-}
-
--(void) dealloc {
-    [ownerDictionary release];
-    [colorArray release];
-    [super dealloc];
-}
-
-
-@end
--- a/cocoaTouch/otherSrc/UIImageExtra.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-//
-//  UIImageExtra.h
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 08/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-
-
-@interface UIImage (extra)
- 
--(UIImage *)scaleToSize:(CGSize) size;
--(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint;
--(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize;
--(id) initWithContentsOfFile:(NSString *)path andCutAt:(CGRect) rect;
--(UIImage *)convertToGrayScale;
--(UIImage *)maskImageWith:(UIImage *)maskImage;
--(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh;
-
-@end
--- a/cocoaTouch/otherSrc/UIImageExtra.m	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-//
-//  UIImageExtra.m
-//  HedgewarsMobile
-//
-//  Created by Vittorio on 08/04/10.
-//  Copyright 2010 __MyCompanyName__. All rights reserved.
-//
-
-#import "UIImageExtra.h"
-
-
-@implementation UIImage (extra)
- 
--(UIImage *)scaleToSize:(CGSize) size {
-  // Create a bitmap graphics context
-  // This will also set it as the current context
-  UIGraphicsBeginImageContext(size);
- 
-  // Draw the scaled image in the current context
-  [self drawInRect:CGRectMake(0, 0, size.width, size.height)];
- 
-  // Create a new image from current context
-  UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext();
- 
-  // Pop the current context from the stack
-  UIGraphicsEndImageContext();
- 
-  // Return our new scaled image (autoreleased)
-  return scaledImage;
-}
-
--(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint {
-    // create a contex of size of the background image
-    return [self mergeWith:secondImage atPoint:secondImagePoint atSize:self.size];
-}
-
--(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize {
-    UIGraphicsBeginImageContext(resultingSize);
-    
-    // drav the background image
-    [self drawAtPoint:CGPointMake(0,0)];
-    
-    // draw the image on top of the first image
-    [secondImage drawAtPoint:secondImagePoint];
-    
-    // create an image from the current contex (not thread safe)
-    UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
-    
-    // free drawing contex
-    UIGraphicsEndImageContext();
-    
-    // return the resulting autoreleased image
-    return resultImage;
-}
-
--(id) initWithContentsOfFile:(NSString *)path andCutAt:(CGRect) rect {
-    // load image from path
-    UIImage *image = [[UIImage alloc] initWithContentsOfFile: path];
-    
-    if (nil != image) {
-        // get its CGImage representation with a give size
-        CGImageRef cgImgage = CGImageCreateWithImageInRect([image CGImage], rect);
-    
-        // clean memory
-        [image release];
-    
-        // create a UIImage from the CGImage (memory must be allocated already)
-        UIImage *sprite = [self initWithCGImage:cgImgage];
-    
-        // clean memory
-        CGImageRelease(cgImgage);
-
-        // return resulting image
-        return sprite;
-    } else {
-        NSLog(@"initWithContentsOfFile: andCutAt: FAILED");
-        return nil;
-    }
-}
-
--(UIImage *)convertToGrayScale {
-  // Create image rectangle with current image width/height
-  CGRect imageRect = CGRectMake(0, 0, self.size.width, self.size.height);
- 
-  // Grayscale color space
-  CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
- 
-  // Create bitmap content with current image size and grayscale colorspace
-  CGContextRef context = CGBitmapContextCreate(nil, self.size.width, self.size.height, 8, 0, colorSpace, kCGImageAlphaNone);
- 
-  // Draw image into current context, with specified rectangle
-  // using previously defined context (with grayscale colorspace)
-  CGContextDrawImage(context, imageRect, [self CGImage]);
- 
-  // Create bitmap image info from pixel data in current context
-  CGImageRef imageRef = CGBitmapContextCreateImage(context);
- 
-  // Create a new UIImage object  
-  UIImage *newImage = [UIImage imageWithCGImage:imageRef];
- 
-  // Release colorspace, context and bitmap information
-  CGColorSpaceRelease(colorSpace);
-  CGContextRelease(context);
-  CFRelease(imageRef);
- 
-  // Return the new grayscale image
-  return newImage;
-}
-
-// by http://iphonedevelopertips.com/cocoa/how-to-mask-an-image.html turned into a category by koda
--(UIImage*) maskImageWith:(UIImage *)maskImage {
-    CGImageRef maskRef = maskImage.CGImage;
-    
-    CGImageRef mask = CGImageMaskCreate(CGImageGetWidth(maskRef),
-                                        CGImageGetHeight(maskRef),
-                                        CGImageGetBitsPerComponent(maskRef),
-                                        CGImageGetBitsPerPixel(maskRef),
-                                        CGImageGetBytesPerRow(maskRef),
-                                        CGImageGetDataProvider(maskRef), NULL, false);
-    
-    CGImageRef masked = CGImageCreateWithMask([self CGImage], mask);
-    
-    CGImageRelease(mask);
-    
-    UIImage* retImage = [UIImage imageWithCGImage:masked];
-    
-    CGImageRelease(masked);
-    
-    return retImage;
-}
-
-// by http://blog.sallarp.com/iphone-uiimage-round-corners/ turned into a category by koda
-void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth, float ovalHeight)
-{
-    float fw, fh;
-    if (ovalWidth == 0 || ovalHeight == 0) {
-        CGContextAddRect(context, rect);
-        return;
-    }
-    CGContextSaveGState(context);
-    CGContextTranslateCTM (context, CGRectGetMinX(rect), CGRectGetMinY(rect));
-    CGContextScaleCTM (context, ovalWidth, ovalHeight);
-    fw = CGRectGetWidth (rect) / ovalWidth;
-    fh = CGRectGetHeight (rect) / ovalHeight;
-    CGContextMoveToPoint(context, fw, fh/2);
-    CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);
-    CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1);
-    CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1);
-    CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1);
-    CGContextClosePath(context);
-    CGContextRestoreGState(context);
-}
-
--(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh {
-	UIImage * newImage = nil;
-
-    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
-    
-    NSInteger cornerWidth = sizewh.width;
-    NSInteger cornerHeight = sizewh.height;
-    int w = self.size.width;
-    int h = self.size.height;
-    
-    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
-    CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst);
-    
-    CGContextBeginPath(context);
-    CGRect rect = CGRectMake(0, 0, w, h);
-    addRoundedRectToPath(context, rect, cornerWidth, cornerHeight);
-    CGContextClosePath(context);
-    CGContextClip(context);
-    
-    CGContextDrawImage(context, CGRectMake(0, 0, w, h), self.CGImage);
-    
-    CGImageRef imageMasked = CGBitmapContextCreateImage(context);
-    CGContextRelease(context);
-    CGColorSpaceRelease(colorSpace);
-    [self release];
-    
-    newImage = [[UIImage imageWithCGImage:imageMasked] retain];
-    CGImageRelease(imageMasked);
-    
-    [pool release];
-    
-    return newImage;
-}
-
-
-@end
Binary file cocoaTouch/resources/Default-Landscape.png has changed
Binary file cocoaTouch/resources/Default.png has changed
Binary file cocoaTouch/resources/Icon-iPad.png has changed
Binary file cocoaTouch/resources/Icon.png has changed
Binary file cocoaTouch/resources/arrowDown.png has changed
Binary file cocoaTouch/resources/arrowLeft.png has changed
Binary file cocoaTouch/resources/arrowRight.png has changed
Binary file cocoaTouch/resources/arrowUp.png has changed
Binary file cocoaTouch/resources/backgroundBottom.png has changed
Binary file cocoaTouch/resources/backgroundCenter.png has changed
Binary file cocoaTouch/resources/backgroundLeft.png has changed
Binary file cocoaTouch/resources/backgroundRight.png has changed
Binary file cocoaTouch/resources/backgroundTop.png has changed
Binary file cocoaTouch/resources/borderBottom.png has changed
Binary file cocoaTouch/resources/borderTop.png has changed
Binary file cocoaTouch/resources/joyPush.png has changed
Binary file cocoaTouch/resources/menuCorner.png has changed
Binary file cocoaTouch/resources/networkButton.png has changed
Binary file cocoaTouch/resources/playButton.png has changed
Binary file cocoaTouch/resources/settingsButton.png has changed
Binary file cocoaTouch/resources/storeButton.png has changed
Binary file cocoaTouch/resources/title.png has changed
--- a/cocoaTouch/xib/GameConfigViewController-iPad.xib	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,489 +0,0 @@
-<?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>
-		</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="841351856">
-				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
-				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-			</object>
-			<object class="IBProxyObject" id="606714003">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-			</object>
-			<object class="IBUIView" id="766721923">
-				<nil key="NSNextResponder"/>
-				<int key="NSvFlags">292</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIToolbar" id="836721772">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">266</int>
-						<string key="NSFrame">{{0, 724}, {1024, 44}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<object class="NSMutableArray" key="IBUIItems">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBUIBarButtonItem" id="80281356">
-								<string key="IBUITitle">Back</string>
-								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-								<int key="IBUIStyle">1</int>
-								<reference key="IBUIToolbar" ref="836721772"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="716161941">
-								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-								<reference key="IBUIToolbar" ref="836721772"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<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="836721772"/>
-							</object>
-						</object>
-					</object>
-				</object>
-				<string key="NSFrameSize">{1024, 768}</string>
-				<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>
-				</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="841351856"/>
-						<reference key="destination" ref="766721923"/>
-					</object>
-					<int key="connectionID">3</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="80281356"/>
-						<reference key="destination" ref="841351856"/>
-					</object>
-					<int key="connectionID">17</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="919181414"/>
-						<reference key="destination" ref="841351856"/>
-					</object>
-					<int key="connectionID">23</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="841351856"/>
-						<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="606714003"/>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">2</int>
-						<reference key="object" ref="766721923"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="836721772"/>
-						</object>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">15</int>
-						<reference key="object" ref="836721772"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<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="80281356"/>
-						<reference key="parent" ref="836721772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">18</int>
-						<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>
-			<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>15.IBPluginDependency</string>
-					<string>16.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>
-					<string>GameConfigViewController</string>
-					<string>UIResponder</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>{{285, -28}, {1024, 768}}</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">29</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">GameConfigViewController</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>buttonPressed:</string>
-							<string>segmentPressed:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../cocoaTouch/GameConfigViewController.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="786211723">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarButtonItem</string>
-					<string key="superclassName">UIBarItem</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarItem</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarItem.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">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">UIToolbar</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIToolbar.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="3100" 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/cocoaTouch/xib/GameConfigViewController-iPhone.xib	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,640 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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="20"/>
-		</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="841351856">
-				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBProxyObject" id="606714003">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBUIView" id="766721923">
-				<reference key="NSNextResponder"/>
-				<int key="NSvFlags">292</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIToolbar" id="836721772">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">266</int>
-						<object class="NSMutableArray" key="NSSubviews">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBUISegmentedControl" id="563596142">
-								<reference key="NSNextResponder" ref="836721772"/>
-								<int key="NSvFlags">292</int>
-								<string key="NSFrame">{{97, 8}, {245, 30}}</string>
-								<reference key="NSSuperview" ref="836721772"/>
-								<bool key="IBUIOpaque">NO</bool>
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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>Map</string>
-									<string>Teams</string>
-									<string>Details</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>
-						<string key="NSFrame">{{0, 276}, {480, 44}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<object class="NSMutableArray" key="IBUIItems">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<object class="IBUIBarButtonItem" id="80281356">
-								<string key="IBUITitle">Back</string>
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<int key="IBUIStyle">1</int>
-								<reference key="IBUIToolbar" ref="836721772"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="716161941">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="836721772"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="530186890">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUICustomView" ref="563596142"/>
-								<reference key="IBUIToolbar" ref="836721772"/>
-							</object>
-							<object class="IBUIBarButtonItem" id="188600069">
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<reference key="IBUIToolbar" ref="836721772"/>
-								<int key="IBUISystemItemIdentifier">5</int>
-							</object>
-							<object class="IBUIBarButtonItem" id="919181414">
-								<int key="IBUITag">1</int>
-								<string key="IBUITitle">Start Game</string>
-								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-								<float key="IBUIWidth">90</float>
-								<int key="IBUIStyle">2</int>
-								<reference key="IBUIToolbar" ref="836721772"/>
-							</object>
-						</object>
-					</object>
-				</object>
-				<string key="NSFrameSize">{480, 320}</string>
-				<reference key="NSSuperview"/>
-				<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>
-				</object>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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="841351856"/>
-						<reference key="destination" ref="766721923"/>
-					</object>
-					<int key="connectionID">3</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="80281356"/>
-						<reference key="destination" ref="841351856"/>
-					</object>
-					<int key="connectionID">17</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="919181414"/>
-						<reference key="destination" ref="841351856"/>
-					</object>
-					<int key="connectionID">23</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">segmentPressed:</string>
-						<reference key="source" ref="563596142"/>
-						<reference key="destination" ref="841351856"/>
-						<int key="IBEventType">13</int>
-					</object>
-					<int key="connectionID">29</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="841351856"/>
-						<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="606714003"/>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">2</int>
-						<reference key="object" ref="766721923"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="836721772"/>
-						</object>
-						<reference key="parent" ref="0"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">15</int>
-						<reference key="object" ref="836721772"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="80281356"/>
-							<reference ref="919181414"/>
-							<reference ref="188600069"/>
-							<reference ref="530186890"/>
-							<reference ref="716161941"/>
-						</object>
-						<reference key="parent" ref="766721923"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">16</int>
-						<reference key="object" ref="80281356"/>
-						<reference key="parent" ref="836721772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">18</int>
-						<reference key="object" ref="919181414"/>
-						<reference key="parent" ref="836721772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">19</int>
-						<reference key="object" ref="188600069"/>
-						<reference key="parent" ref="836721772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">21</int>
-						<reference key="object" ref="530186890"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="563596142"/>
-						</object>
-						<reference key="parent" ref="836721772"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">20</int>
-						<reference key="object" ref="563596142"/>
-						<reference key="parent" ref="530186890"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">22</int>
-						<reference key="object" ref="716161941"/>
-						<reference key="parent" ref="836721772"/>
-					</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>15.IBPluginDependency</string>
-					<string>16.IBPluginDependency</string>
-					<string>18.IBPluginDependency</string>
-					<string>19.IBPluginDependency</string>
-					<string>2.IBEditorWindowLastContentRect</string>
-					<string>2.IBPluginDependency</string>
-					<string>20.IBPluginDependency</string>
-					<string>22.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>GameConfigViewController</string>
-					<string>UIResponder</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>{{639, 516}, {480, 320}}</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">29</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">GameConfigViewController</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>buttonPressed:</string>
-							<string>segmentPressed:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<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>availableTeamsTableView</string>
-							<string>mapButton</string>
-							<string>randomButton</string>
-							<string>schemesButton</string>
-							<string>startButton</string>
-							<string>weaponsButton</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>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../cocoaTouch/GameConfigViewController.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="786211723">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarButtonItem</string>
-					<string key="superclassName">UIBarItem</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
-					<string key="className">UIBarItem</string>
-					<string key="superclassName">NSObject</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIBarItem.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">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">
-						<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">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">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIToolbar.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">IBCocoaTouchFramework</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="3100" key="NS.object.0"/>
-		</object>
-		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj</string>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<string key="IBCocoaTouchPluginVersion">87</string>
-	</data>
-</archive>
--- a/cocoaTouch/xib/MainMenuViewController-iPad.xib	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,689 +0,0 @@
-<?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>
-		</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">
-				<nil key="NSNextResponder"/>
-				<int key="NSvFlags">292</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIImageView" id="976741091">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">274</int>
-						<string key="NSFrameSize">{1024, 768}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<object class="NSCustomResource" key="IBUIImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">Background.png</string>
-						</object>
-					</object>
-					<object class="IBUIImageView" id="90394251">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{147, 20}, {745, 146}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<int key="IBUIContentMode">4</int>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<object class="NSCustomResource" key="IBUIImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">HedgewarsTitle.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="867308721">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{147, 200}, {258, 215}}</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="917635782">
-							<string key="NSName">Helvetica-Bold</string>
-							<double key="NSSize">15</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUIHighlightedTitleColor" id="918890028">
-							<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="112471976">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MC41AA</bytes>
-						</object>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">Multiplayer.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="607338789">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{634, 493}, {258, 215}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<int key="IBUITag">1</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="917635782"/>
-						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">NetworkPlay.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="95106947">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{175, 600}, {18, 19}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<int key="IBUITag">3</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="917635782"/>
-						<int key="IBUIButtonType">3</int>
-						<bool key="IBUIShowsTouchWhenHighlighted">YES</bool>
-						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
-					</object>
-					<object class="IBUILabel" id="177360137">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{762, 183}, {87, 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"/>
-						<object class="NSFont" key="IBUIFont">
-							<string key="NSName">Helvetica-Oblique</string>
-							<double key="NSSize">17</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUITextColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MSAxIDEAA</bytes>
-							<object class="NSColorSpace" key="NSCustomColorSpace">
-								<int key="NSID">1</int>
-							</object>
-						</object>
-						<nil key="IBUIHighlightedColor"/>
-						<int key="IBUIBaselineAdjustment">1</int>
-						<float key="IBUIMinimumFontSize">10</float>
-					</object>
-					<object class="IBUIButton" id="898948205">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{267, 579}, {72, 62}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<int key="IBUITag">2</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="917635782"/>
-						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">settingsButton.png</string>
-						</object>
-					</object>
-				</object>
-				<string key="NSFrameSize">{1024, 768}</string>
-				<object class="NSColor" key="IBUIBackgroundColor">
-					<int key="NSColorSpace">1</int>
-					<bytes key="NSRGB">MCAwIDAAA</bytes>
-				</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">switchViews:</string>
-						<reference key="source" ref="95106947"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">47</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">switchViews:</string>
-						<reference key="source" ref="867308721"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">48</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">switchViews:</string>
-						<reference key="source" ref="607338789"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">49</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">versionLabel</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="177360137"/>
-					</object>
-					<int key="connectionID">51</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">switchViews:</string>
-						<reference key="source" ref="898948205"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">54</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="90394251"/>
-							<reference ref="607338789"/>
-							<reference ref="867308721"/>
-							<reference ref="177360137"/>
-							<reference ref="95106947"/>
-							<reference ref="898948205"/>
-							<reference ref="976741091"/>
-						</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">38</int>
-						<reference key="object" ref="90394251"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">39</int>
-						<reference key="object" ref="867308721"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">local</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">40</int>
-						<reference key="object" ref="607338789"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">multi</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">45</int>
-						<reference key="object" ref="95106947"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">50</int>
-						<reference key="object" ref="177360137"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">52</int>
-						<reference key="object" ref="898948205"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">37</int>
-						<reference key="object" ref="976741091"/>
-						<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>37.IBPluginDependency</string>
-					<string>38.IBPluginDependency</string>
-					<string>39.IBPluginDependency</string>
-					<string>40.IBPluginDependency</string>
-					<string>45.IBPluginDependency</string>
-					<string>50.IBPluginDependency</string>
-					<string>52.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>MainMenuViewController</string>
-					<string>UIResponder</string>
-					<string>{{224, 119}, {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">86</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">MainMenuViewController</string>
-					<string key="superclassName">UIViewController</string>
-					<object class="NSMutableDictionary" key="actions">
-						<string key="NS.key.0">switchViews:</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>settingsSplitViewController</string>
-							<string>versionLabel</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>UISplitViewController</string>
-							<string>UILabel</string>
-						</object>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../cocoaTouch/MainMenuViewController.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="864669175">
-						<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">UIImageView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIImageView.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="864669175"/>
-				</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">UISplitViewController</string>
-					<string key="superclassName">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="53873462">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.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>
-					<reference key="sourceIdentifier" ref="53873462"/>
-				</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>
-		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSArray" key="dict.sortedKeys">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>Background.png</string>
-				<string>HedgewarsTitle.png</string>
-				<string>Multiplayer.png</string>
-				<string>NetworkPlay.png</string>
-				<string>settingsButton.png</string>
-			</object>
-			<object class="NSMutableArray" key="dict.values">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>{1024, 768}</string>
-				<string>{720, 140}</string>
-				<string>{264, 219}</string>
-				<string>{314, 260}</string>
-				<string>{57, 51}</string>
-			</object>
-		</object>
-		<string key="IBCocoaTouchPluginVersion">87</string>
-	</data>
-</archive>
--- a/cocoaTouch/xib/MainMenuViewController-iPhone.xib	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,785 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBProxyObject" id="975951072">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBUIView" id="191373211">
-				<reference key="NSNextResponder"/>
-				<int key="NSvFlags">293</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIImageView" id="249993817">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">274</int>
-						<string key="NSFrame">{{0, 21}, {480, 278}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MCAwAA</bytes>
-						</object>
-						<int key="IBUIContentMode">4</int>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<object class="NSCustomResource" key="IBUIImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">backgroundCenter.png</string>
-						</object>
-					</object>
-					<object class="IBUIImageView" id="171108356">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">293</int>
-						<string key="NSFrame">{{121, 25}, {240, 52}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUIContentMode">4</int>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<object class="NSCustomResource" key="IBUIImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">title.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="124270424">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">289</int>
-						<string key="NSFrame">{{240, 102}, {220, 52}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
-						</object>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<object class="NSFont" key="IBUIFont" id="917635782">
-							<string key="NSName">Helvetica-Bold</string>
-							<double key="NSSize">15</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUIHighlightedTitleColor" id="918890028">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MQA</bytes>
-						</object>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<object class="NSColor" key="IBUINormalTitleShadowColor" id="112471976">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MC41AA</bytes>
-						</object>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">playButton.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="745970938">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">265</int>
-						<string key="NSFrame">{{240, 177}, {220, 52}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
-						</object>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">3</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="917635782"/>
-						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">networkButton.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="836337039">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">260</int>
-						<string key="NSFrame">{{12, 144}, {220, 52}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<object class="NSColor" key="IBUIBackgroundColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
-						</object>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">3</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="917635782"/>
-						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
-						<object class="NSColor" key="IBUINormalTitleColor" id="111038951">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="111038951"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">storeButton.png</string>
-						</object>
-					</object>
-					<object class="IBUILabel" id="533529472">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{60, 102}, {145, 21}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<string key="IBUIText"/>
-						<object class="NSFont" key="IBUIFont">
-							<string key="NSName">Helvetica-Oblique</string>
-							<double key="NSSize">17</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUITextColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MSAxIDEAA</bytes>
-						</object>
-						<nil key="IBUIHighlightedColor"/>
-						<int key="IBUIBaselineAdjustment">1</int>
-						<float key="IBUIMinimumFontSize">10</float>
-						<int key="IBUITextAlignment">1</int>
-					</object>
-					<object class="IBUIButton" id="753723574">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">269</int>
-						<string key="NSFrame">{{209, 237}, {59, 52}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">2</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="917635782"/>
-						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">settingsButton.png</string>
-						</object>
-					</object>
-					<object class="IBUIImageView" id="821240857">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">290</int>
-						<string key="NSFrameSize">{480, 17}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUIContentMode">4</int>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<object class="NSCustomResource" key="IBUIImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">borderTop.png</string>
-						</object>
-					</object>
-					<object class="IBUIImageView" id="936485487">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">266</int>
-						<string key="NSFrame">{{0, 297}, {480, 23}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUIContentMode">4</int>
-						<bool key="IBUIUserInteractionEnabled">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<object class="NSCustomResource" key="IBUIImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">borderBottom.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="818907840">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{20, 270}, {18, 19}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<int key="IBUITag">3</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="917635782"/>
-						<int key="IBUIButtonType">3</int>
-						<bool key="IBUIShowsTouchWhenHighlighted">YES</bool>
-						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
-					</object>
-				</object>
-				<string key="NSFrameSize">{480, 320}</string>
-				<reference key="NSSuperview"/>
-				<object class="NSColor" key="IBUIBackgroundColor">
-					<int key="NSColorSpace">1</int>
-					<bytes key="NSRGB">MCAwIDAAA</bytes>
-				</object>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">switchViews:</string>
-						<reference key="source" ref="753723574"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">30</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">versionLabel</string>
-						<reference key="source" ref="372490531"/>
-						<reference key="destination" ref="533529472"/>
-					</object>
-					<int key="connectionID">37</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">switchViews:</string>
-						<reference key="source" ref="836337039"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">38</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">switchViews:</string>
-						<reference key="source" ref="745970938"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">39</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">switchViews:</string>
-						<reference key="source" ref="124270424"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">40</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">switchViews:</string>
-						<reference key="source" ref="818907840"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">42</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="249993817"/>
-							<reference ref="533529472"/>
-							<reference ref="821240857"/>
-							<reference ref="171108356"/>
-							<reference ref="936485487"/>
-							<reference ref="753723574"/>
-							<reference ref="124270424"/>
-							<reference ref="745970938"/>
-							<reference ref="836337039"/>
-							<reference ref="818907840"/>
-						</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">35</int>
-						<reference key="object" ref="821240857"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">22</int>
-						<reference key="object" ref="249993817"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">23</int>
-						<reference key="object" ref="171108356"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">24</int>
-						<reference key="object" ref="124270424"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">25</int>
-						<reference key="object" ref="745970938"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">26</int>
-						<reference key="object" ref="836337039"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">27</int>
-						<reference key="object" ref="533529472"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">28</int>
-						<reference key="object" ref="753723574"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">36</int>
-						<reference key="object" ref="936485487"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">41</int>
-						<reference key="object" ref="818907840"/>
-						<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>22.IBPluginDependency</string>
-					<string>23.IBPluginDependency</string>
-					<string>24.IBPluginDependency</string>
-					<string>25.IBPluginDependency</string>
-					<string>26.IBPluginDependency</string>
-					<string>27.IBPluginDependency</string>
-					<string>28.IBPluginDependency</string>
-					<string>35.IBPluginDependency</string>
-					<string>36.IBPluginDependency</string>
-					<string>41.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>MainMenuViewController</string>
-					<string>UIResponder</string>
-					<string>{{432, 461}, {480, 320}}</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>
-					<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">42</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">MainMenuViewController</string>
-					<string key="superclassName">UIViewController</string>
-					<object class="NSMutableDictionary" key="actions">
-						<string key="NS.key.0">switchViews:</string>
-						<string key="NS.object.0">id</string>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<string key="NS.key.0">versionLabel</string>
-						<string key="NS.object.0">UILabel</string>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../cocoaTouch/MainMenuViewController.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="238583711">
-						<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">UIImageView</string>
-					<string key="superclassName">UIView</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UIImageView.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="238583711"/>
-				</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">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">IBCocoaTouchFramework</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/HedgewarsMobile.xcodeproj</string>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSArray" key="dict.sortedKeys">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>backgroundCenter.png</string>
-				<string>borderBottom.png</string>
-				<string>borderTop.png</string>
-				<string>networkButton.png</string>
-				<string>playButton.png</string>
-				<string>settingsButton.png</string>
-				<string>storeButton.png</string>
-				<string>title.png</string>
-			</object>
-			<object class="NSMutableArray" key="dict.values">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>{480, 278}</string>
-				<string>{480, 21}</string>
-				<string>{480, 21}</string>
-				<string>{217, 51}</string>
-				<string>{216, 51}</string>
-				<string>{57, 51}</string>
-				<string>{216, 51}</string>
-				<string>{262, 84}</string>
-			</object>
-		</object>
-		<string key="IBCocoaTouchPluginVersion">87</string>
-	</data>
-</archive>
--- a/cocoaTouch/xib/MapConfigViewController-iPad.xib	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,787 +0,0 @@
-<?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">289</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">{{570, 117}, {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">289</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>
-						<double key="IBUIImageEdgeInsets.top">4</double>
-						<double key="IBUIImageEdgeInsets.bottom">4</double>
-						<double key="IBUIImageEdgeInsets.left">4</double>
-						<double key="IBUIImageEdgeInsets.right">4</double>
-						<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">{{623, 20}, {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">{{572, 66}, {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">265</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="326163764"/>
-							<reference ref="938256702"/>
-							<reference ref="743202682"/>
-							<reference ref="634417433"/>
-						</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, 115}, {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">49</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/cocoaTouch/xib/MapConfigViewController-iPhone.xib	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,750 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBProxyObject" id="975951072">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">{{28, 166}, {240, 30}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">{{121, 209}, {149, 23}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">{{20, 20}, {256, 128}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<object class="NSFont" key="IBUIFont">
-							<string key="NSName">Helvetica-Bold</string>
-							<double key="NSSize">15</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<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">
-							<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">{{54, 234}, {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">IBCocoaTouchFramework</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">{{123, 239}, {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">IBCocoaTouchFramework</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">{{295, 0}, {185, 276}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<reference key="IBUIBackgroundColor" ref="437070330"/>
-						<bool key="IBUIClipsSubviews">YES</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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>
-				<string key="NSFrameSize">{480, 276}</string>
-				<reference key="NSSuperview"/>
-				<reference key="IBUIBackgroundColor" ref="437070330"/>
-				<object class="IBUISimulatedToolbarMetrics" key="IBUISimulatedBottomBarMetrics"/>
-				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
-					<int key="interfaceOrientation">3</int>
-				</object>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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="326163764"/>
-							<reference ref="634417433"/>
-							<reference ref="88728219"/>
-							<reference ref="938256702"/>
-							<reference ref="743202682"/>
-							<reference ref="565214171"/>
-						</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">9</int>
-						<reference key="object" ref="326163764"/>
-						<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>
-			</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>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>{{744, 568}, {480, 320}}</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">32</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">IBCocoaTouchFramework</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/cocoaTouch/xib/OverlayViewController-iPad.xib	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,945 +0,0 @@
-<?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">292</int>
-				<object class="NSMutableArray" key="NSSubviews">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIButton" id="584263820">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{0, 675}, {39, 53}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<object class="NSFont" key="IBUIFont" id="969592940">
-							<string key="NSName">Helvetica-Bold</string>
-							<double key="NSSize">15</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUIHighlightedTitleColor" id="708011311">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MQA</bytes>
-						</object>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<object class="NSColor" key="IBUINormalTitleShadowColor" id="280149554">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MC41AA</bytes>
-						</object>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">arrowLeft.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="123494776">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{90, 675}, {39, 54}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">1</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">arrowRight.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="590902961">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{964, 690}, {64, 48}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">6</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage" id="639745463">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">joyPush.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="132251648">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{919, 665}, {64, 50}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">5</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<reference key="IBUINormalImage" ref="639745463"/>
-					</object>
-					<object class="IBUIButton" id="752933969">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{908, 723}, {61, 45}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">4</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<reference key="IBUINormalImage" ref="639745463"/>
-					</object>
-					<object class="IBUIButton" id="261686746">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{37, 638}, {53, 39}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">2</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">arrowUp.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="81315603">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{37, 729}, {53, 39}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">3</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">arrowDown.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="873773099">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{956, -5}, {72, 64}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<int key="IBUITag">10</int>
-						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">menuCorner.png</string>
-						</object>
-					</object>
-				</object>
-				<string key="NSFrameSize">{1024, 768}</string>
-				<reference key="NSSuperview"/>
-				<object class="NSColor" key="IBUIBackgroundColor">
-					<int key="NSColorSpace">3</int>
-					<bytes key="NSWhite">MSAwAA</bytes>
-				</object>
-				<bool key="IBUIOpaque">NO</bool>
-				<bool key="IBUIMultipleTouchEnabled">YES</bool>
-				<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">buttonPressed:</string>
-						<reference key="source" ref="584263820"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">8</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="584263820"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">9</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="584263820"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">10</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="584263820"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">11</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="123494776"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">13</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="123494776"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">14</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="123494776"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">15</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="123494776"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">16</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="261686746"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">18</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="261686746"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">19</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="261686746"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">20</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="261686746"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">21</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="81315603"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">23</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="81315603"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">24</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="81315603"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">25</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="81315603"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">26</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="590902961"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">44</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="590902961"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">45</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="590902961"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">46</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="590902961"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">47</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="752933969"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">49</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="752933969"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">50</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="752933969"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">51</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="752933969"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">52</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="132251648"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">54</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="132251648"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">55</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="132251648"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">56</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="132251648"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">57</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="873773099"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">60</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="584263820"/>
-							<reference ref="123494776"/>
-							<reference ref="261686746"/>
-							<reference ref="81315603"/>
-							<reference ref="873773099"/>
-							<reference ref="590902961"/>
-							<reference ref="132251648"/>
-							<reference ref="752933969"/>
-						</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">4</int>
-						<reference key="object" ref="584263820"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">left</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">12</int>
-						<reference key="object" ref="123494776"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">right</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">17</int>
-						<reference key="object" ref="261686746"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">up</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">22</int>
-						<reference key="object" ref="81315603"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">down</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">43</int>
-						<reference key="object" ref="590902961"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">push2</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">48</int>
-						<reference key="object" ref="752933969"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">push1</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">53</int>
-						<reference key="object" ref="132251648"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">push3</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">58</int>
-						<reference key="object" ref="873773099"/>
-						<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>12.IBPluginDependency</string>
-					<string>17.IBPluginDependency</string>
-					<string>22.IBPluginDependency</string>
-					<string>4.IBPluginDependency</string>
-					<string>43.IBPluginDependency</string>
-					<string>48.IBPluginDependency</string>
-					<string>53.IBPluginDependency</string>
-					<string>58.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>OverlayViewController</string>
-					<string>UIResponder</string>
-					<string>{{0, 273}, {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>
-					<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">60</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">OverlayViewController</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>buttonPressed:</string>
-							<string>buttonReleased:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<string key="NS.key.0">popoverController</string>
-						<string key="NS.object.0">id</string>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../cocoaTouch/OverlayViewController.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="998852275">
-						<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">UIResponder</string>
-					<string key="superclassName">NSObject</string>
-					<reference key="sourceIdentifier" ref="998852275"/>
-				</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">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="3100" key="NS.object.0"/>
-		</object>
-		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj</string>
-		<int key="IBDocument.defaultPropertyAccessControl">3</int>
-		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSArray" key="dict.sortedKeys">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>arrowDown.png</string>
-				<string>arrowLeft.png</string>
-				<string>arrowRight.png</string>
-				<string>arrowUp.png</string>
-				<string>joyPush.png</string>
-				<string>menuCorner.png</string>
-			</object>
-			<object class="NSMutableArray" key="dict.values">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-			</object>
-		</object>
-		<string key="IBCocoaTouchPluginVersion">87</string>
-	</data>
-</archive>
--- a/cocoaTouch/xib/OverlayViewController.xib	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,947 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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">IBCocoaTouchFramework</string>
-			</object>
-			<object class="IBProxyObject" id="975951072">
-				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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="IBUIButton" id="584263820">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{0, 237}, {39, 53}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<object class="NSFont" key="IBUIFont" id="969592940">
-							<string key="NSName">Helvetica-Bold</string>
-							<double key="NSSize">15</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<object class="NSColor" key="IBUIHighlightedTitleColor" id="708011311">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MQA</bytes>
-						</object>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<object class="NSColor" key="IBUINormalTitleShadowColor" id="280149554">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MC41AA</bytes>
-						</object>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">arrowLeft.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="123494776">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{75, 237}, {39, 54}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">1</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">arrowRight.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="590902961">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">265</int>
-						<string key="NSFrame">{{416, 227}, {64, 64}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">5</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage" id="639745463">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">joyPush.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="132251648">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">265</int>
-						<string key="NSFrame">{{368, 207}, {64, 64}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">6</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<reference key="IBUINormalImage" ref="639745463"/>
-					</object>
-					<object class="IBUIButton" id="752933969">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">265</int>
-						<string key="NSFrame">{{344, 256}, {64, 64}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">4</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<reference key="IBUINormalImage" ref="639745463"/>
-					</object>
-					<object class="IBUIButton" id="261686746">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{29, 207}, {53, 39}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">2</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">arrowUp.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="81315603">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{29, 281}, {53, 39}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUITag">3</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">arrowDown.png</string>
-						</object>
-					</object>
-					<object class="IBUIButton" id="309477778">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">289</int>
-						<string key="NSFrame">{{412, -6}, {72, 64}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<int key="IBUITag">10</int>
-						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<reference key="IBUIFont" ref="969592940"/>
-						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage">
-							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">menuCorner.png</string>
-						</object>
-					</object>
-				</object>
-				<string key="NSFrameSize">{480, 320}</string>
-				<reference key="NSSuperview"/>
-				<object class="NSColor" key="IBUIBackgroundColor">
-					<int key="NSColorSpace">3</int>
-					<bytes key="NSWhite">MSAwAA</bytes>
-				</object>
-				<bool key="IBUIOpaque">NO</bool>
-				<bool key="IBUIClipsSubviews">YES</bool>
-				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-				<bool key="IBUIMultipleTouchEnabled">YES</bool>
-				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
-					<int key="interfaceOrientation">3</int>
-				</object>
-				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">buttonPressed:</string>
-						<reference key="source" ref="584263820"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">8</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="584263820"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">9</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="584263820"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">10</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="584263820"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">11</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="123494776"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">13</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="123494776"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">14</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="123494776"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">15</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="123494776"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">16</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="261686746"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">18</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="261686746"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">19</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="261686746"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">20</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="261686746"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">21</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="81315603"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">23</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="81315603"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">24</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="81315603"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">25</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="81315603"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">26</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="590902961"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">44</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="590902961"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">45</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="590902961"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">46</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="590902961"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">47</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="752933969"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">49</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="752933969"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">50</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="752933969"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">51</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="752933969"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">52</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="132251648"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">9</int>
-					</object>
-					<int key="connectionID">54</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="132251648"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">55</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="132251648"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">1</int>
-					</object>
-					<int key="connectionID">56</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonReleased:</string>
-						<reference key="source" ref="132251648"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">8</int>
-					</object>
-					<int key="connectionID">57</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="309477778"/>
-						<reference key="destination" ref="372490531"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">60</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="584263820"/>
-							<reference ref="123494776"/>
-							<reference ref="261686746"/>
-							<reference ref="81315603"/>
-							<reference ref="590902961"/>
-							<reference ref="132251648"/>
-							<reference ref="752933969"/>
-							<reference ref="309477778"/>
-						</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">4</int>
-						<reference key="object" ref="584263820"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">left</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">12</int>
-						<reference key="object" ref="123494776"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">right</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">17</int>
-						<reference key="object" ref="261686746"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">up</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">22</int>
-						<reference key="object" ref="81315603"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">down</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">43</int>
-						<reference key="object" ref="590902961"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">push2</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">48</int>
-						<reference key="object" ref="752933969"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">push1</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">53</int>
-						<reference key="object" ref="132251648"/>
-						<reference key="parent" ref="191373211"/>
-						<string key="objectName">push3</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">58</int>
-						<reference key="object" ref="309477778"/>
-						<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>12.IBPluginDependency</string>
-					<string>17.IBPluginDependency</string>
-					<string>22.IBPluginDependency</string>
-					<string>4.IBPluginDependency</string>
-					<string>43.IBPluginDependency</string>
-					<string>48.IBPluginDependency</string>
-					<string>53.IBPluginDependency</string>
-					<string>58.IBPluginDependency</string>
-				</object>
-				<object class="NSMutableArray" key="dict.values">
-					<bool key="EncodedWithXMLCoder">YES</bool>
-					<string>OverlayViewController</string>
-					<string>UIResponder</string>
-					<string>{{222, 756}, {480, 320}}</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>
-					<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">62</int>
-		</object>
-		<object class="IBClassDescriber" key="IBDocument.Classes">
-			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<object class="IBPartialClassDescription">
-					<string key="className">OverlayViewController</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>buttonPressed:</string>
-							<string>buttonReleased:</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>id</string>
-						</object>
-					</object>
-					<object class="NSMutableDictionary" key="outlets">
-						<string key="NS.key.0">popoverController</string>
-						<string key="NS.object.0">id</string>
-					</object>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier">
-						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../cocoaTouch/OverlayViewController.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="917531033">
-						<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">UIResponder</string>
-					<string key="superclassName">NSObject</string>
-					<reference key="sourceIdentifier" ref="917531033"/>
-				</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">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">IBCocoaTouchFramework</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="3100" 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>
-		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
-			<bool key="EncodedWithXMLCoder">YES</bool>
-			<object class="NSArray" key="dict.sortedKeys">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>arrowDown.png</string>
-				<string>arrowLeft.png</string>
-				<string>arrowRight.png</string>
-				<string>arrowUp.png</string>
-				<string>joyPush.png</string>
-				<string>menuCorner.png</string>
-			</object>
-			<object class="NSMutableArray" key="dict.values">
-				<bool key="EncodedWithXMLCoder">YES</bool>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-				<string>{64, 64}</string>
-			</object>
-		</object>
-		<string key="IBCocoaTouchPluginVersion">87</string>
-	</data>
-</archive>
--- a/hedgewars/options.inc	Thu Jun 17 19:57:51 2010 +0200
+++ b/hedgewars/options.inc	Thu Jun 17 20:30:39 2010 +0200
@@ -32,7 +32,8 @@
   {$DEFINE SDL_MIXER_NEWER}
   {$DEFINE SDL_IMAGE_NEWER}
   {$DEFINE HWLIBRARY}
-  {$DEFINE GLunit:=gles11} 
+  {$DEFINE GLunit:=gles11}
+  {$DEFINE DOWNSCALE}
 {$ENDIF}
 
 {$IFNDEF DARWIN}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/CMakeLists.txt	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,41 @@
+find_package(OpenAL REQUIRED)
+find_package(OggVorbis REQUIRED)
+include_directories(${OPENAL_INCLUDE_DIR})
+include_directories(${OGGVORBIS_INCLUDE_DIRS})
+
+#set destination directory for library
+set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})
+
+#list of source files for libraries
+set(openal_src
+	openalbridge.c loaders.c wrappers.c errlib.c
+)
+
+#build a static library for human systems
+set (build_type STATIC)
+
+#visualstudio and windows in general don't like static linking, so we're building the library in shared mode
+if(WIN32)
+#workaround for visualstudio (wants headers in the source list)
+	set(openal_src
+		openalbridge.h openalbridge_t.h loaders.h wrappers.h globals.h oggvorbis.h errlib.h ${openal_src}
+	)
+#deps for the shared library
+	link_libraries(${VORBISFILE_LIBRARY})
+	link_libraries(${VORBIS_LIBRARY})
+	link_libraries(${OGG_LIBRARY})
+	link_libraries(${OPENAL_LIBRARY})
+#build a shared library
+	set (build_type SHARED)
+endif()
+
+#compiles and links actual library
+add_library (openalbridge ${build_type} ${openal_src})
+
+if(WIN32)
+if(MSVC)
+	SET_TARGET_PROPERTIES(openalbridge PROPERTIES LINK_FLAGS /DEF:openalbridge.def)
+endif(MSVC)
+#install it in the executable directory
+	install(TARGETS openalbridge DESTINATION bin)
+endif(WIN32)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/commands.c	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,224 @@
+/*
+ *  commands.c
+ *  Hedgewars
+ *
+ *  Created by Vittorio on 13/06/10.
+ *  Copyright 2010 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#include "commands.h"
+#include "wrappers.h"
+
+ALfloat old_gain;
+extern ALuint *Sources;
+extern ALuint cache_size, cache_index, sources_number;
+extern ALboolean instances_number;
+extern al_sound_t *the_sounds;
+
+void openal_pausesound (uint32_t index) {
+    if (openal_ready() == AL_TRUE && index < cache_size)
+        alSourcePause(Sources[the_sounds[index].source_index]);
+}
+
+
+void openal_stopsound (uint32_t index) {
+    if (openal_ready() == AL_TRUE && index < cache_size)
+        alSourceStop(Sources[the_sounds[index].source_index]);
+}
+
+
+void openal_playsound (unsigned int index) {
+    ALboolean needsSource = AL_TRUE;
+    ALfloat SourcePosition[] = { 0.0, 0.0, 0.0 };
+    ALfloat SourceVelocity[] = { 0.0, 0.0, 0.0 };
+    ALint state;
+    int i, j;
+    
+    if (openal_ready() == AL_TRUE && index < cache_size) {
+        // check if sound has already a source
+        if (the_sounds[index].source_index != -1) {
+            // it has a source, check it's not playing
+            alGetSourcei(Sources[the_sounds[index].source_index], AL_SOURCE_STATE, &state);
+            if (state != AL_PLAYING && state != AL_PAUSED) { 	 
+                // it is not being played, so we can use it safely
+	            needsSource = AL_FALSE; 		 
+            }
+            // else it is being played, so we have to allocate a new source for this buffer
+        }
+        
+        if (needsSource) {
+#ifdef DEBUG
+            fprintf(stderr,"(Bridge Debug) - looking for a source for sound %d\n", index);
+#endif
+            for (i = 0; i < sources_number; i++) {
+                // let's iterate on Sources until we find a source that is not playing
+                alGetSourcei(Sources[i], AL_SOURCE_STATE, &state); 	 
+                if (state != AL_PLAYING && state != AL_PAUSED) {
+                    // let's iterate on the_sounds until we find the sound using that source
+                    for (j = 0; j < cache_size; j++) {
+                        if (the_sounds[j].source_index == i) {
+                            the_sounds[j].source_index = -1;
+                            break;
+                        }
+                    }
+                    // here we know that no-one is using that source so we can use it
+                    break;
+                }
+            }
+            
+            if (i == sources_number) {
+                // this means all sources are busy
+            }
+            
+            // set source properties that it will use when it's in playback
+            alSourcei (Sources[i], AL_BUFFER,   the_sounds[index].buffer);
+            alSourcef (Sources[i], AL_PITCH,    1.0f);
+            alSourcef (Sources[i], AL_GAIN,     1.0f);
+            alSourcefv(Sources[i], AL_POSITION, SourcePosition);
+            alSourcefv(Sources[i], AL_VELOCITY, SourceVelocity);
+            alSourcei (Sources[i], AL_LOOPING,  0);
+            
+            if (AL_NO_ERROR != alGetError()) {
+                fprintf(stderr,"(Bridge ERROR) - failed to set Source properties\n");
+                return;
+            }
+            the_sounds[index].source_index = i;
+        }
+        
+        alSourcePlay(Sources[the_sounds[index].source_index]);
+        
+        if (AL_NO_ERROR != alGetError()) {
+            fprintf(stderr,"(Bridge Warning) - failed to play sound %d\n", index);
+            return;
+        }
+        
+        the_sounds[index].stats++;
+    }
+}
+
+void openal_toggleloop (uint32_t index) {
+    ALint loop;
+
+    if (openal_ready() == AL_TRUE && index < cache_size) {
+        alGetSourcei (Sources[the_sounds[index].source_index], AL_LOOPING, &loop);
+        alSourcei (Sources[the_sounds[index].source_index], AL_LOOPING, !((uint8_t) loop) & 0x00000001);
+    }
+}
+
+
+void openal_setvolume (uint32_t index, float gain) {
+    if (openal_ready() == AL_TRUE && index < cache_size)
+        alSourcef (Sources[the_sounds[index].source_index], AL_GAIN, gain);
+}
+
+
+void openal_setglobalvolume (float gain) {
+    if (openal_ready() == AL_TRUE)
+        alListenerf (AL_GAIN, gain);
+}
+
+void openal_togglemute () {
+    ALfloat gain;
+
+    if (openal_ready() == AL_TRUE) {
+        alGetListenerf (AL_GAIN, &gain);
+        if (gain > 0) {
+            old_gain = gain;
+            gain = 0;
+        } else
+            gain = old_gain;
+
+        alListenerf (AL_GAIN, gain);
+    }
+}
+
+// Fade in or out by calling a helper thread
+void openal_fade (uint32_t index, uint16_t quantity, al_fade_t direction) {
+#ifndef _WIN32
+    pthread_t thread;
+#else
+    HANDLE Thread;
+#endif
+    fade_t *fade;
+
+    if (openal_ready() == AL_TRUE && index < cache_size) {
+        fade = (fade_t*) Malloc(sizeof(fade_t));
+        fade->index = index;
+        fade->quantity = quantity;
+        fade->type = direction;
+
+#ifndef _WIN32
+        pthread_create(&thread, NULL, (void *)helper_fade, (void *)fade);
+        pthread_detach(thread);
+#else
+        Thread = (HANDLE) _beginthread((void *)helper_fade, 0, (void *)fade);
+#endif
+    }
+}
+
+void openal_setposition (uint32_t index, float x, float y, float z) {
+    if (openal_ready() == AL_TRUE && index < cache_size)
+        alSource3f(Sources[the_sounds[index].source_index], AL_POSITION, x, y, z);;
+}
+
+void helper_fade(void *tmp) {
+    ALfloat gain;
+    ALfloat target_gain;
+    fade_t *fade;
+    uint32_t index;
+    uint16_t quantity;
+    al_fade_t type;
+
+    fade = tmp;
+    index = fade->index;
+    quantity = fade->quantity;
+    type = fade->type;
+    free (fade);
+
+    if (type == AL_FADE_IN) {
+#ifdef DEBUG
+        fprintf(stderr,"(Bridge Info) - Fade-in in progress [index %d quantity %d]", index, quantity);
+#endif
+
+        // save the volume desired after the fade
+        alGetSourcef(Sources[the_sounds[index].source_index], AL_GAIN, &target_gain);
+        if (target_gain > 1.0f || target_gain <= 0.0f)
+            target_gain = 1.0f;
+
+        for (gain = 0.0f ; gain <= target_gain; gain += (float) quantity/10000) {
+#ifdef TRACE
+            fprintf(stderr,"(Bridge Debug) - Fade-in set gain to %f\n", gain);
+#endif
+            alSourcef(Sources[the_sounds[index].source_index], AL_GAIN, gain);
+            usleep(10000);
+        }
+    } else {
+        alGetSourcef(Sources[the_sounds[index].source_index], AL_GAIN, &target_gain);
+
+        for (gain = target_gain; gain >= 0.00f; gain -= (float) quantity/10000) {
+#ifdef TRACE
+            fprintf(stderr,"(Bridge Debug) - Fade-out set gain to %f\n", gain);
+#endif
+            alSourcef(Sources[the_sounds[index].source_index], AL_GAIN, gain);
+            usleep(10000);
+        }
+
+        if (AL_NO_ERROR != alGetError())
+            fprintf(stderr,"(Bridge Warning) - Failed to set fade-out effect\n");
+
+        // stop that sound and reset its volume
+        alSourceStop (Sources[the_sounds[index].source_index]);
+        alSourcef (Sources[the_sounds[index].source_index], AL_GAIN, target_gain);
+    }
+
+    if (AL_NO_ERROR != alGetError())
+        fprintf(stderr,"(Bridge Warning) - Failed to set fade effect\n");
+
+#ifndef _WIN32
+    pthread_exit(NULL);
+#else
+    _endthread();
+#endif
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/commands.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,55 @@
+/*
+ *  commands.h
+ *  Hedgewars
+ *
+ *  Created by Vittorio on 13/06/10.
+ *  Copyright 2010 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#ifndef _OALB_COMMANDS_H
+#define _OALB_COMMANDS_H
+
+#include "openalbridge_t.h"
+#include "openalbridge.h"
+
+
+#define openal_fadein(x,y)          openal_fade(x,y,AL_FADE_IN)
+#define openal_fadeout(x,y)         openal_fade(x,y,AL_FADE_OUT)
+#define openal_playsound_loop(x,y)  openal_playsound(x)  \
+                                        if (y != 0)  \
+                                        openal_toggleloop(x);
+#ifdef __CPLUSPLUS
+extern "C" {
+#endif
+    
+    // play, pause, stop a single sound source
+    void openal_pausesound        (unsigned int index);
+    void openal_stopsound         (unsigned int index);
+    
+    // play a sound and set whether it should loop or not (0/1)
+    void openal_playsound         (unsigned int index);
+    
+    void openal_freesound         (unsigned int index);
+    
+    // set or unset the looping property for a sound source
+    void openal_toggleloop        (unsigned int index);
+    
+    // set position and volume of a sound source
+    void openal_setposition       (unsigned int index, float x, float y, float z);
+    void openal_setvolume         (unsigned int index, float gain);
+    
+    // set volume for all sounds (gain interval is [0-1])
+    void openal_setglobalvolume   (float gain);
+    
+    // mute or unmute all sounds
+    void openal_togglemute        (void);
+    
+    // fade effect,
+    void openal_fade              (unsigned int index, unsigned short int quantity, al_fade_t direction);
+    
+#ifdef __CPLUSPLUS
+}
+#endif
+
+#endif /*_OALB_COMMANDS_H*/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/globals.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,94 @@
+/*
+ * OpenAL Bridge - a simple portable library for OpenAL interface
+ * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#ifndef _OALB_GLOBALS_H
+#define _OALB_GLOBALS_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "al.h"
+
+#ifndef _WIN32
+#include <pthread.h>
+#include <syslog.h>
+#else
+#include <process.h>
+#endif
+
+
+// 1.0 02/03/10 - Defines cross-platform sleep, usleep, etc. [Wu Yongwei]
+#ifndef _SLEEP_H
+#define _SLEEP_H
+#ifdef _WIN32
+# if defined(_NEED_SLEEP_ONLY) && (defined(_MSC_VER) || defined(__MINGW32__))
+#  include <stdlib.h>
+#  define sleep(t) _sleep((t) * 1000)
+# else
+#  define WIN32_LEAN_AND_MEAN
+#  include <windows.h>
+#  define sleep(t)  Sleep((t) * 1000)
+# endif
+# ifndef _NEED_SLEEP_ONLY
+#  define msleep(t) Sleep(t)
+#  define usleep(t) Sleep((t) / 1000)
+# endif
+#else
+# include <unistd.h>
+# ifndef _NEED_SLEEP_ONLY
+#  define msleep(t) usleep((t) * 1000)
+# endif
+#endif
+#endif // _SLEEP_H
+
+
+// check compiler requirements
+#if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
+#warning __BIG_ENDIAN__ or __LITTLE_ENDIAN__ not found, going to set __LITTLE_ENDIAN__ as default
+#define __LITTLE_ENDIAN__ 1
+#endif
+
+/* use byteswap macros from the host system, hopefully optimized ones ;-)
+ * or define our own version, simple, stupid, straight-forward... */
+#ifdef HAVE_BYTESWAP_H
+#include <byteswap.h>
+#else
+#define bswap_16(x)	(((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8))
+#define bswap_32(x)	(((x & 0xFF000000) >> 24) | (((x) & 0x00FF0000) >> 8)  | \
+                     ((x & 0x0000FF00) << 8)  | (((x) & 0x000000FF) << 24) )
+#endif /* HAVE_BYTESWAP_H */
+
+/* swap numbers accordingly to architecture automatically */
+#ifdef __LITTLE_ENDIAN__
+#define ENDIAN_LITTLE_32(x) x
+#define ENDIAN_BIG_32(x)    bswap_32(x)
+#define ENDIAN_LITTLE_16(x) x
+#define ENDIAN_BIG_16(x)    bswap_16(x)
+#elif __BIG_ENDIAN__
+#define ENDIAN_LITTLE_32(x) bswap_32(x)
+#define ENDIAN_BIG_32(x)    x
+#define ENDIAN_LITTLE_16(x) bswap_16(x)
+#define ENDIAN_BIG_16(x)    x
+#endif
+
+/* file format defines */
+#define OGG_FILE_FORMAT         0x4F676753
+#define WAV_FILE_FORMAT         0x52494646
+#define WAV_HEADER_SUBCHUNK2ID  0x64617461
+
+
+#endif /*_OALB_GLOBALS_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/loaders.c	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,238 @@
+/*
+* OpenAL Bridge - a simple portable library for OpenAL interface
+* Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation; version 2 of the License
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+#include "loaders.h"
+#include "wrappers.h"
+#include "vorbis/vorbisfile.h"
+#include "openalbridge_t.h"
+
+
+int load_wavpcm (const char *filename, ALenum *format, char **data, ALsizei *bitsize, ALsizei *freq) {
+    WAV_header_t WAVHeader;
+    FILE *wavfile;
+    int32_t t;
+    uint32_t n = 0;
+    uint8_t sub0, sub1, sub2, sub3;
+
+    wavfile = Fopen(filename, "rb");
+
+    fread(&WAVHeader.ChunkID, sizeof(uint32_t), 1, wavfile);                /*RIFF*/
+    fread(&WAVHeader.ChunkSize, sizeof(uint32_t), 1, wavfile);
+    fread(&WAVHeader.Format, sizeof(uint32_t), 1, wavfile);                 /*WAVE*/
+
+#ifdef DEBUG
+    fprintf(stderr, "ChunkID: %X\n", ENDIAN_BIG_32(WAVHeader.ChunkID));
+    fprintf(stderr, "ChunkSize: %d\n", ENDIAN_LITTLE_32(WAVHeader.ChunkSize));
+    fprintf(stderr, "Format: %X\n", ENDIAN_BIG_32(WAVHeader.Format));
+#endif
+
+    fread(&WAVHeader.Subchunk1ID, sizeof(uint32_t), 1, wavfile);            /*fmt */
+    fread(&WAVHeader.Subchunk1Size, sizeof(uint32_t), 1, wavfile);
+    fread(&WAVHeader.AudioFormat, sizeof(uint16_t), 1, wavfile);
+    fread(&WAVHeader.NumChannels, sizeof(uint16_t), 1, wavfile);
+    fread(&WAVHeader.SampleRate, sizeof(uint32_t), 1, wavfile);
+    fread(&WAVHeader.ByteRate, sizeof(uint32_t), 1, wavfile);
+    fread(&WAVHeader.BlockAlign, sizeof(uint16_t), 1, wavfile);
+    fread(&WAVHeader.BitsPerSample, sizeof(uint16_t), 1, wavfile);
+
+#ifdef DEBUG
+    fprintf(stderr, "Subchunk1ID: %X\n", ENDIAN_BIG_32(WAVHeader.Subchunk1ID));
+    fprintf(stderr, "Subchunk1Size: %d\n", ENDIAN_LITTLE_32(WAVHeader.Subchunk1Size));
+    fprintf(stderr, "AudioFormat: %d\n", ENDIAN_LITTLE_16(WAVHeader.AudioFormat));
+    fprintf(stderr, "NumChannels: %d\n", ENDIAN_LITTLE_16(WAVHeader.NumChannels));
+    fprintf(stderr, "SampleRate: %d\n", ENDIAN_LITTLE_32(WAVHeader.SampleRate));
+    fprintf(stderr, "ByteRate: %d\n", ENDIAN_LITTLE_32(WAVHeader.ByteRate));
+    fprintf(stderr, "BlockAlign: %d\n", ENDIAN_LITTLE_16(WAVHeader.BlockAlign));
+    fprintf(stderr, "BitsPerSample: %d\n", ENDIAN_LITTLE_16(WAVHeader.BitsPerSample));
+#endif
+
+    /*remove useless header chunks by looking for the WAV_HEADER_SUBCHUNK2ID integer */
+    do {
+        t = fread(&sub0, sizeof(uint8_t), 1, wavfile);
+        if(sub0 == 0x64) {
+            t = fread(&sub1, sizeof(uint8_t), 1, wavfile);
+            if(sub1 == 0x61) {
+                t = fread(&sub2, sizeof(uint8_t), 1, wavfile);
+                if(sub2 == 0x74) {
+                    t = fread(&sub3, sizeof(uint8_t), 1, wavfile);
+                    if(sub3 == 0x61) {
+                        WAVHeader.Subchunk2ID = WAV_HEADER_SUBCHUNK2ID;
+                        break;
+                    }
+                }
+            }
+        }
+
+        if (t <= 0) {
+            // eof
+            fprintf(stderr,"(Bridge Error) - wrong WAV header\n");
+            return -1;
+        }
+    } while (1);
+
+    fread(&WAVHeader.Subchunk2Size, sizeof(uint32_t), 1, wavfile);
+
+#ifdef DEBUG
+    fprintf(stderr, "Subchunk2ID: %X\n", ENDIAN_LITTLE_32(WAVHeader.Subchunk2ID));
+    fprintf(stderr, "Subchunk2Size: %d\n", ENDIAN_LITTLE_32(WAVHeader.Subchunk2Size));
+#endif
+
+    *data = (char*) Malloc (sizeof(char) * ENDIAN_LITTLE_32(WAVHeader.Subchunk2Size));
+
+    /*read the actual sound data*/
+    do {
+        n += fread(&((*data)[n]), sizeof(uint8_t), 4, wavfile);
+    } while (n < ENDIAN_LITTLE_32(WAVHeader.Subchunk2Size));
+
+    fclose(wavfile);
+
+#ifdef DEBUG
+    fprintf(stderr,"(Bridge Info) - WAV data loaded\n");
+#endif
+
+    /*set parameters for OpenAL*/
+    /*Valid formats are AL_FORMAT_MONO8, AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16*/
+    if (ENDIAN_LITTLE_16(WAVHeader.NumChannels) == 1) {
+        if (ENDIAN_LITTLE_16(WAVHeader.BitsPerSample) == 8)
+            *format = AL_FORMAT_MONO8;
+        else {
+            if (ENDIAN_LITTLE_16(WAVHeader.BitsPerSample) == 16)
+                *format = AL_FORMAT_MONO16;
+            else {
+                fprintf(stderr,"(Bridge Error) - wrong WAV header [bitsample value]\n");
+                return -2;
+            }
+        }
+    } else {
+        if (ENDIAN_LITTLE_16(WAVHeader.NumChannels) == 2) {
+            if (ENDIAN_LITTLE_16(WAVHeader.BitsPerSample) == 8)
+                *format = AL_FORMAT_STEREO8;
+            else {
+                if (ENDIAN_LITTLE_16(WAVHeader.BitsPerSample) == 16)
+                    *format = AL_FORMAT_STEREO16;
+                else {
+                    fprintf(stderr,"(Bridge Error) - wrong WAV header [bitsample value]\n");
+                    return -2;
+                }
+            }
+        } else {
+            fprintf(stderr,"(Bridge Error) - wrong WAV header [format value]\n");
+            return -2;
+        }
+    }
+
+    *bitsize = ENDIAN_LITTLE_32(WAVHeader.Subchunk2Size);
+    *freq    = ENDIAN_LITTLE_32(WAVHeader.SampleRate);
+    return 0;
+}
+
+
+int load_oggvorbis (const char *filename, ALenum *format, char **data, ALsizei *bitsize, ALsizei *freq) {
+    /*implementation inspired from http://www.devmaster.net/forums/showthread.php?t=1153 */
+
+    /*ogg handle*/
+    FILE *oggFile;
+    /*stream handle*/
+    OggVorbis_File oggStream;
+    /*some formatting data*/
+    vorbis_info *vorbisInfo;
+    /*length of the decoded data*/
+    int64_t pcm_length;
+    /*other vars*/
+    int section, result, size, endianness;
+#ifdef DEBUG
+    int i;
+    /*other less useful data*/
+    vorbis_comment *vorbisComment;
+#endif
+
+    oggFile = Fopen(filename, "rb");
+    result = ov_open_callbacks(oggFile, &oggStream, NULL, 0, OV_CALLBACKS_DEFAULT);
+    if (result < 0) {
+        fprintf(stderr,"(Bridge Error) - ov_open_callbacks() failed with %X\n", result);
+        ov_clear(&oggStream);
+        return -1;
+    }
+
+    /*load OGG header and determine the decoded data size*/
+    vorbisInfo = ov_info(&oggStream, -1);
+    pcm_length = ov_pcm_total(&oggStream, -1) << vorbisInfo->channels;
+
+#ifdef DEBUG
+    vorbisComment = ov_comment(&oggStream, -1);
+    fprintf(stderr, "Version: %d\n", vorbisInfo->version);
+    fprintf(stderr, "Channels: %d\n", vorbisInfo->channels);
+    fprintf(stderr, "Rate (Hz): %ld\n", vorbisInfo->rate);
+    fprintf(stderr, "Bitrate Upper: %ld\n", vorbisInfo->bitrate_upper);
+    fprintf(stderr, "Bitrate Nominal: %ld\n", vorbisInfo->bitrate_nominal);
+    fprintf(stderr, "Bitrate Lower: %ld\n", vorbisInfo->bitrate_lower);
+    fprintf(stderr, "Bitrate Windows: %ld\n", vorbisInfo->bitrate_window);
+    fprintf(stderr, "Vendor: %s\n", vorbisComment->vendor);
+    fprintf(stderr, "PCM data size: %lld\n", pcm_length);
+    fprintf(stderr, "# comment: %d\n", vorbisComment->comments);
+    for (i = 0; i < vorbisComment->comments; i++)
+        fprintf(stderr, "\tComment %d: %s\n", i, vorbisComment->user_comments[i]);
+#endif
+
+    /*allocates enough room for the decoded data*/
+    *data = (char*) Malloc (sizeof(char) * pcm_length);
+
+    /*there *should* not be ogg at 8 bits*/
+    if (vorbisInfo->channels == 1)
+        *format = AL_FORMAT_MONO16;
+    else {
+        if (vorbisInfo->channels == 2)
+            *format = AL_FORMAT_STEREO16;
+        else {
+            fprintf(stderr,"(Bridge Error) - wrong OGG header [channel %d]\n", vorbisInfo->channels);
+            ov_clear(&oggStream);
+            return -2;
+        }
+    }
+
+    size = 0;
+#ifdef __LITTLE_ENDIAN__
+    endianness = 0;
+#elif __BIG_ENDIAN__
+    endianness = 1;
+#endif
+    while (size < pcm_length) {
+        /*ov_read decodes the ogg stream and storse the pcm in data*/
+        result = ov_read (&oggStream, *data + size, pcm_length - size, endianness, 2, 1, &section);
+        if (result > 0) {
+            size += result;
+        } else {
+            if (result == 0)
+                break;
+            else {
+                fprintf(stderr,"(Bridge Error) - End of file from OGG stream\n");
+                ov_clear(&oggStream);
+                return -3;
+            }
+        }
+    }
+
+    /*set the last fields*/
+    *bitsize = size;
+    *freq = vorbisInfo->rate;
+
+    /*cleaning time (ov_clear also closes file handler)*/
+    ov_clear(&oggStream);
+
+    return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/loaders.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,27 @@
+/*
+ * OpenAL Bridge - a simple portable library for OpenAL interface
+ * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include "globals.h"
+
+#ifndef _OALB_LOADERS_H
+#define _OALB_LOADERS_H
+
+int load_wavpcm     (const char *filename, ALenum *format, char **data, ALsizei *bitsize, ALsizei *freq);
+int load_oggvorbis  (const char *filename, ALenum *format, char **data, ALsizei *bitsize, ALsizei *freq);
+
+#endif /*_OALB_LOADERS_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/openalbridge.c	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,265 @@
+/*
+* OpenAL Bridge - a simple portable library for OpenAL interface
+* Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation; version 2 of the License
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+#include "openalbridge.h"
+#include "globals.h"
+#include "al.h"
+#include "alc.h"
+#include "wrappers.h"
+#include "loaders.h"
+#include "string.h"
+
+// Sources are points emitting sound, their number is limited, but a single source can play many buffers
+// Buffers hold sound data and are unlimited
+ALuint *Sources;
+ALuint cache_size, cache_index, sources_number;
+ALboolean instances_number;
+al_sound_t *the_sounds;
+ALint cache_pointer;
+
+// Initialize an OpenAL contex and allocate memory space for data and buffers
+// It can be called twice to increase the cache size
+int openal_init (int memorysize) {
+    ALCcontext *context;
+    ALCdevice *device;
+    int i;
+        
+    // reuse old context and resize the existing 
+    if (openal_ready() == AL_TRUE) {
+        cache_size += memorysize;
+        fprintf(stderr,"(Bridge Info) - already initialized, resizing cache to %d\n", cache_size);
+        the_sounds = (al_sound_t *)Realloc (the_sounds, sizeof(al_sound_t) * cache_size);
+        for (i = cache_size - memorysize; i < cache_size; i++) {
+            the_sounds[i].filename = NULL;
+            the_sounds[i].buffer = -1;
+            the_sounds[i].source_index = -1;
+            the_sounds[i].stats = 0;
+        }
+        instances_number++;
+        return AL_TRUE;
+    }
+    
+    cache_pointer = 0;
+    instances_number++;
+    
+    // set the memory dimentsion and the increment width when reallocating
+    if (memorysize <= 0)
+        cache_size = 50;
+    else
+        cache_size = memorysize;
+
+    // open hardware device if present
+    device = alcOpenDevice(NULL);
+    sources_number = 16;
+    if (device == NULL) {
+        fprintf(stderr,"(Bridge Warning) - failed to open sound device, using software renderer\n");
+        device = alcOpenDevice("Generic Software");
+        sources_number = 32;
+        if (device == NULL) {
+            fprintf(stderr,"(Bridge ERROR) - failed to start software renderer, sound will be disabled\n");
+            return -1;
+        }
+    }
+
+    fprintf(stderr,"(Bridge Info) - output device: %s\n", alcGetString(device, ALC_DEVICE_SPECIFIER));
+
+    context = alcCreateContext(device, NULL);
+    alcMakeContextCurrent(context);
+    alcProcessContext(context);
+
+    if (AL_NO_ERROR != alGetError()) {
+        fprintf(stderr,"(Bridge ERROR) - Failed to create a new contex\n");
+        alcMakeContextCurrent(NULL);
+        alcDestroyContext(context);
+        alcCloseDevice(device);
+        return -2;
+    }
+
+    Sources = (ALuint *)Malloc (sizeof(ALuint) * sources_number);
+    alGenSources(sources_number, Sources);
+    
+    // set the listener gain, position (on xyz axes), velocity (one value for each axe) and orientation
+    // Position, Velocity and Orientation of the listener
+    ALfloat ListenerPos[] = {0.0, 0.0, 0.0};
+    ALfloat ListenerVel[] = {0.0, 0.0, 0.0};
+    ALfloat ListenerOri[] = {0.0, 0.0, -1.0, 0.0, 1.0, 0.0};
+
+    alListenerf (AL_GAIN,        1.0f       );
+    alListenerfv(AL_POSITION,    ListenerPos);
+    alListenerfv(AL_VELOCITY,    ListenerVel);
+    alListenerfv(AL_ORIENTATION, ListenerOri);
+
+    if (AL_NO_ERROR != alGetError()) {
+        fprintf(stderr,"(Bridge ERROR) - Failed to set Listener properties\n");
+        return -3;
+    }
+
+    the_sounds = (al_sound_t *)Malloc (sizeof(al_sound_t) * cache_size);
+    for (i = 0; i < cache_size; i++) {
+        the_sounds[i].filename = NULL;
+        the_sounds[i].buffer = -1;
+        the_sounds[i].source_index = -1;
+        the_sounds[i].stats = 0;
+    }
+
+    alGetError();
+    return AL_TRUE;
+}
+
+
+// Stop all sounds, deallocate all memory and close OpenAL context
+void openal_close (void) {
+    ALCcontext *context;
+    ALCdevice  *device;
+    int i;
+    
+    if (instances_number == 0) {
+        fprintf(stderr,"(Bridge Warning) - OpenAL not initialized\n");
+        return;
+    }
+
+    instances_number--;
+    if (instances_number > 0) {
+        return;
+    }
+    
+    //TODO: free other stuff also
+    for (i = 0; i < cache_size; i++)
+        alDeleteBuffers (1, &the_sounds[i].buffer);
+    free(the_sounds);
+
+    alSourceStopv	(sources_number, Sources);
+    alDeleteSources (sources_number, Sources);
+
+    free(Sources);
+
+    context = alcGetCurrentContext();
+    device  = alcGetContextsDevice(context);
+
+    alcMakeContextCurrent(NULL);
+    alcDestroyContext(context);
+    alcCloseDevice(device);
+
+    fprintf(stderr,"(Bridge Info) - closed\n");
+
+    return;
+}
+
+
+ALboolean openal_ready (void) {
+    if (instances_number >= 1) 
+        return AL_TRUE;
+    else
+        return AL_FALSE;
+}
+
+
+// Open a file, load into memory and allocate the Source buffer for playing
+int openal_loadfile (const char *filename){
+    ALenum format, error;
+    ALsizei bitsize, freq;
+    uint32_t fileformat;
+    al_sound_t soundData;
+    int len, i;
+    char *data;
+    FILE *fp;
+    
+    if (openal_ready() == AL_FALSE) {
+        fprintf(stderr,"(Bridge Warning) - not initialized\n");
+        return -1;
+    }
+    
+    // if this sound is already loaded return the index from the_sounds
+    len = strlen(filename);
+    for (i = 0; i < cache_size; i++) {
+        if (the_sounds[i].filename != NULL && strncmp(the_sounds[i].filename, filename, len) == 0) {
+#ifdef DEBUG
+            fprintf(stderr,"(Bridge Debug) - sound %d is already loaded\n", i);
+#endif
+            return i;
+        }
+    }
+
+    if (cache_pointer >= cache_size) {
+        fprintf(stderr,"(Bridge ERROR) - Cache size limit reached; consider allocating more space\n", filename);
+        return -2;
+    }
+    
+    // detect the file format, as written in the first 4 bytes of the header
+    fp = Fopen (filename, "rb");
+
+    if (fp == NULL) {
+        fprintf(stderr,"(Bridge ERROR) - File %s not loaded\n", filename);
+        return -3;
+    }
+
+    error = fread (&fileformat, sizeof(uint32_t), 1, fp);
+    fclose (fp);
+
+    if (error < 0) {
+        fprintf(stderr,"(Bridge ERROR) - File %s is too short\n", filename);
+        return -4;
+    }
+
+    switch (ENDIAN_BIG_32(fileformat)) {
+        case OGG_FILE_FORMAT:
+            error = load_oggvorbis (filename, &format, &data, &bitsize, &freq);
+            break;
+        case WAV_FILE_FORMAT:
+            error = load_wavpcm (filename, &format, &data, &bitsize, &freq);
+            break;
+        default:
+            fprintf(stderr,"(Bridge ERROR) - File format (%08X) not supported\n", ENDIAN_BIG_32(fileformat));
+            return -5;
+            break;
+    }
+
+    if (error != 0) {
+        fprintf(stderr,"(Bridge ERROR) - error loading file %s\n", filename);
+        free(data);
+        return -6;
+    }
+
+    alGenBuffers(1, &soundData.buffer);
+    soundData.filename = filename;
+    soundData.source_index = -1;
+    soundData.stats = 0;
+    
+    if (AL_NO_ERROR != alGetError()) {
+        fprintf(stderr,"(Bridge ERROR) - Failed to allocate memory for buffers\n");
+        return -5;
+    }
+    
+    // copy pcm data in one buffer and free it
+    alBufferData(soundData.buffer, format, data, bitsize, freq);
+    free(data);
+
+    if (AL_NO_ERROR != alGetError()) {
+        fprintf(stderr,"(Bridge ERROR) - Failed to write data to buffers\n");
+        return -8;
+    }
+    
+    // clear any AL errors beforehand
+    alGetError();
+
+    fprintf(stderr,"(Bridge Info) - successfully loaded %s\n", filename);
+
+    // returns the index of the source you just loaded, increments it and exits
+    the_sounds[cache_pointer] = soundData;
+    return cache_pointer++;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/openalbridge.def	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,20 @@
+LIBRARY "openalbridge"
+EXPORTS
+	openal_init
+	openal_close
+	openal_ready
+	openal_loadfile
+	openal_playsound	
+	openal_pausesound
+	openal_stopsound
+	openal_playsound_loop
+	openal_stopsound_free
+	openal_freesound
+	openal_toggleloop
+	openal_setvolume
+	openal_setglobalvolume
+	openal_togglemute
+	openal_fade
+	openal_fadein
+	openal_fadeout
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/openalbridge.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,48 @@
+/*
+ * OpenAL Bridge - a simple portable library for OpenAL interface
+ * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#ifndef _OALB_INTERFACE_H
+#define _OALB_INTERFACE_H
+
+#include "openalbridge_t.h"
+#include "commands.h"
+
+#ifdef __CPLUSPLUS
+extern "C" {
+#endif
+
+    // init audio context and allocate memory
+    int openal_init               (int memorysize);
+
+    // close audio subsytem and free memory
+    void openal_close             (void);
+
+    // check if openal_init has been called
+    char openal_ready             (void);
+
+    // load an audio file into memory and map it to abuffer
+    int  openal_loadfile          (const char *filename);
+
+
+    /******* other functions continue in commands.h *******/
+    
+#ifdef __CPLUSPLUS
+}
+#endif
+
+#endif /*_OALB_INTERFACE_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/openalbridge_t.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,74 @@
+/*
+ * OpenAL Bridge - a simple portable library for OpenAL interface
+ * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include <stdint.h>
+#include "al.h"
+
+#ifndef _OALB_INTERFACE_TYPES_H
+#define _OALB_INTERFACE_TYPES_H
+
+enum al_fade_enum {AL_FADE_IN, AL_FADE_OUT};
+typedef enum al_fade_enum al_fade_t;
+
+
+// data type to handle which source source is playing what
+#pragma pack(1)
+typedef struct _al_sound_t {
+    const char *filename;       // name of the sound file
+    ALuint buffer;              // actual sound content
+    uint32_t source_index;      // index of the associated source
+    uint32_t stats;             // number of times the sound has been played
+} al_sound_t;
+#pragma pack()
+
+
+// data type for passing data between threads
+#pragma pack(1)
+typedef struct _fade_t {
+    uint32_t index;
+    uint16_t quantity;
+    al_fade_t type;
+} fade_t;
+#pragma pack()
+
+
+// data type for WAV header
+#pragma pack(1)
+typedef struct _WAV_header_t {
+    uint32_t ChunkID;
+    uint32_t ChunkSize;
+    uint32_t Format;
+    uint32_t Subchunk1ID;
+    uint32_t Subchunk1Size;
+    uint16_t AudioFormat;
+    uint16_t NumChannels;
+    uint32_t SampleRate;
+    uint32_t ByteRate;
+    uint16_t BlockAlign;
+    uint16_t BitsPerSample;
+    uint32_t Subchunk2ID;
+    uint32_t Subchunk2Size;
+} WAV_header_t;
+#pragma pack()
+
+
+#ifdef __CPLUSPLUS
+}
+#endif
+
+#endif /*_OALB_INTERFACE_TYPES_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/wrappers.c	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* OpenAL Bridge - a simple portable library for OpenAL interface
+* Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation; version 2 of the License
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with this program; if not, write to the Free Software
+* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+*/
+
+#include "wrappers.h"
+#include "openalbridge_t.h"
+
+
+void *Malloc (size_t nbytes) {
+    void *aptr;
+
+    if ((aptr = malloc(nbytes)) == NULL) {
+        fprintf(stderr,"(Bridge FATAL) - not enough memory\n");
+        abort();
+    }
+
+    return aptr;
+}
+
+
+void *Realloc (void *aptr, size_t nbytes) {
+    aptr = realloc(aptr, nbytes);
+
+    if (aptr == NULL) {
+        fprintf(stderr,"(Bridge FATAL) - not enough memory\n");
+        abort();
+    }
+
+    return aptr;
+}
+
+
+FILE *Fopen (const char *fname, char *mode)	{
+    FILE *fp;
+
+    fp = fopen(fname,mode);
+    if (fp == NULL)
+        fprintf(stderr,"(Bridge Error) - can't open file %s in mode '%s'\n", fname, mode);
+
+    return fp;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/libopenalbridge/wrappers.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,30 @@
+/*
+ * OpenAL Bridge - a simple portable library for OpenAL interface
+ * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#ifndef _OALB_WRAPPERS_H
+#define _OALB_WRAPPERS_H
+
+#include "globals.h"
+#include "openalbridge_t.h"
+
+void *Malloc (size_t nbytes);
+void *Realloc (void *aptr, size_t nbytes);
+FILE *Fopen (const char *fname, char *mode);
+void helper_fade (void *tmp);
+
+#endif /*_OALB_WRAPPERS_H*/
--- a/misc/openalbridge/CMakeLists.txt	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-find_package(OpenAL REQUIRED)
-find_package(OggVorbis REQUIRED)
-include_directories(${OPENAL_INCLUDE_DIR})
-include_directories(${OGGVORBIS_INCLUDE_DIRS})
-
-#set destination directory for library
-set(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})
-
-#list of source files for libraries
-set(openal_src
-	openalbridge.c loaders.c wrappers.c errlib.c
-)
-
-#build a static library for human systems
-set (build_type STATIC)
-
-#visualstudio and windows in general don't like static linking, so we're building the library in shared mode
-if(WIN32)
-#workaround for visualstudio (wants headers in the source list)
-	set(openal_src
-		openalbridge.h openalbridge_t.h loaders.h wrappers.h globals.h oggvorbis.h errlib.h ${openal_src}
-	)
-#deps for the shared library
-	link_libraries(${VORBISFILE_LIBRARY})
-	link_libraries(${VORBIS_LIBRARY})
-	link_libraries(${OGG_LIBRARY})
-	link_libraries(${OPENAL_LIBRARY})
-#build a shared library
-	set (build_type SHARED)
-endif()
-
-#compiles and links actual library
-add_library (openalbridge ${build_type} ${openal_src})
-
-if(WIN32)
-if(MSVC)
-	SET_TARGET_PROPERTIES(openalbridge PROPERTIES LINK_FLAGS /DEF:openalbridge.def)
-endif(MSVC)
-#install it in the executable directory
-	install(TARGETS openalbridge DESTINATION bin)
-endif(WIN32)
--- a/misc/openalbridge/commands.c	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +0,0 @@
-/*
- *  commands.c
- *  Hedgewars
- *
- *  Created by Vittorio on 13/06/10.
- *  Copyright 2010 __MyCompanyName__. All rights reserved.
- *
- */
-
-#include "commands.h"
-#include "wrappers.h"
-
-ALfloat old_gain;
-extern ALuint *Sources;
-extern ALuint cache_size, cache_index, sources_number;
-extern ALboolean instances_number;
-extern al_sound_t *the_sounds;
-
-void openal_pausesound (uint32_t index) {
-    if (openal_ready() == AL_TRUE && index < cache_size)
-        alSourcePause(Sources[the_sounds[index].source_index]);
-}
-
-
-void openal_stopsound (uint32_t index) {
-    if (openal_ready() == AL_TRUE && index < cache_size)
-        alSourceStop(Sources[the_sounds[index].source_index]);
-}
-
-
-void openal_playsound (unsigned int index) {
-    ALboolean needsSource = AL_TRUE;
-    ALfloat SourcePosition[] = { 0.0, 0.0, 0.0 };
-    ALfloat SourceVelocity[] = { 0.0, 0.0, 0.0 };
-    ALint state;
-    int i, j;
-    
-    if (openal_ready() == AL_TRUE && index < cache_size) {
-        // check if sound has already a source
-        if (the_sounds[index].source_index != -1) {
-            // it has a source, check it's not playing
-            alGetSourcei(Sources[the_sounds[index].source_index], AL_SOURCE_STATE, &state);
-            if (state != AL_PLAYING && state != AL_PAUSED) { 	 
-                // it is not being played, so we can use it safely
-	            needsSource = AL_FALSE; 		 
-            }
-            // else it is being played, so we have to allocate a new source for this buffer
-        }
-        
-        if (needsSource) {
-#ifdef DEBUG
-            fprintf(stderr,"(Bridge Debug) - looking for a source for sound %d\n", index);
-#endif
-            for (i = 0; i < sources_number; i++) {
-                // let's iterate on Sources until we find a source that is not playing
-                alGetSourcei(Sources[i], AL_SOURCE_STATE, &state); 	 
-                if (state != AL_PLAYING && state != AL_PAUSED) {
-                    // let's iterate on the_sounds until we find the sound using that source
-                    for (j = 0; j < cache_size; j++) {
-                        if (the_sounds[j].source_index == i) {
-                            the_sounds[j].source_index = -1;
-                            break;
-                        }
-                    }
-                    // here we know that no-one is using that source so we can use it
-                    break;
-                }
-            }
-            
-            if (i == sources_number) {
-                // this means all sources are busy
-            }
-            
-            // set source properties that it will use when it's in playback
-            alSourcei (Sources[i], AL_BUFFER,   the_sounds[index].buffer);
-            alSourcef (Sources[i], AL_PITCH,    1.0f);
-            alSourcef (Sources[i], AL_GAIN,     1.0f);
-            alSourcefv(Sources[i], AL_POSITION, SourcePosition);
-            alSourcefv(Sources[i], AL_VELOCITY, SourceVelocity);
-            alSourcei (Sources[i], AL_LOOPING,  0);
-            
-            if (AL_NO_ERROR != alGetError()) {
-                fprintf(stderr,"(Bridge ERROR) - failed to set Source properties\n");
-                return;
-            }
-            the_sounds[index].source_index = i;
-        }
-        
-        alSourcePlay(Sources[the_sounds[index].source_index]);
-        
-        if (AL_NO_ERROR != alGetError()) {
-            fprintf(stderr,"(Bridge Warning) - failed to play sound %d\n", index);
-            return;
-        }
-        
-        the_sounds[index].stats++;
-    }
-}
-
-void openal_toggleloop (uint32_t index) {
-    ALint loop;
-
-    if (openal_ready() == AL_TRUE && index < cache_size) {
-        alGetSourcei (Sources[the_sounds[index].source_index], AL_LOOPING, &loop);
-        alSourcei (Sources[the_sounds[index].source_index], AL_LOOPING, !((uint8_t) loop) & 0x00000001);
-    }
-}
-
-
-void openal_setvolume (uint32_t index, float gain) {
-    if (openal_ready() == AL_TRUE && index < cache_size)
-        alSourcef (Sources[the_sounds[index].source_index], AL_GAIN, gain);
-}
-
-
-void openal_setglobalvolume (float gain) {
-    if (openal_ready() == AL_TRUE)
-        alListenerf (AL_GAIN, gain);
-}
-
-void openal_togglemute () {
-    ALfloat gain;
-
-    if (openal_ready() == AL_TRUE) {
-        alGetListenerf (AL_GAIN, &gain);
-        if (gain > 0) {
-            old_gain = gain;
-            gain = 0;
-        } else
-            gain = old_gain;
-
-        alListenerf (AL_GAIN, gain);
-    }
-}
-
-// Fade in or out by calling a helper thread
-void openal_fade (uint32_t index, uint16_t quantity, al_fade_t direction) {
-#ifndef _WIN32
-    pthread_t thread;
-#else
-    HANDLE Thread;
-#endif
-    fade_t *fade;
-
-    if (openal_ready() == AL_TRUE && index < cache_size) {
-        fade = (fade_t*) Malloc(sizeof(fade_t));
-        fade->index = index;
-        fade->quantity = quantity;
-        fade->type = direction;
-
-#ifndef _WIN32
-        pthread_create(&thread, NULL, (void *)helper_fade, (void *)fade);
-        pthread_detach(thread);
-#else
-        Thread = (HANDLE) _beginthread((void *)helper_fade, 0, (void *)fade);
-#endif
-    }
-}
-
-void openal_setposition (uint32_t index, float x, float y, float z) {
-    if (openal_ready() == AL_TRUE && index < cache_size)
-        alSource3f(Sources[the_sounds[index].source_index], AL_POSITION, x, y, z);;
-}
-
-void helper_fade(void *tmp) {
-    ALfloat gain;
-    ALfloat target_gain;
-    fade_t *fade;
-    uint32_t index;
-    uint16_t quantity;
-    al_fade_t type;
-
-    fade = tmp;
-    index = fade->index;
-    quantity = fade->quantity;
-    type = fade->type;
-    free (fade);
-
-    if (type == AL_FADE_IN) {
-#ifdef DEBUG
-        fprintf(stderr,"(Bridge Info) - Fade-in in progress [index %d quantity %d]", index, quantity);
-#endif
-
-        // save the volume desired after the fade
-        alGetSourcef(Sources[the_sounds[index].source_index], AL_GAIN, &target_gain);
-        if (target_gain > 1.0f || target_gain <= 0.0f)
-            target_gain = 1.0f;
-
-        for (gain = 0.0f ; gain <= target_gain; gain += (float) quantity/10000) {
-#ifdef TRACE
-            fprintf(stderr,"(Bridge Debug) - Fade-in set gain to %f\n", gain);
-#endif
-            alSourcef(Sources[the_sounds[index].source_index], AL_GAIN, gain);
-            usleep(10000);
-        }
-    } else {
-        alGetSourcef(Sources[the_sounds[index].source_index], AL_GAIN, &target_gain);
-
-        for (gain = target_gain; gain >= 0.00f; gain -= (float) quantity/10000) {
-#ifdef TRACE
-            fprintf(stderr,"(Bridge Debug) - Fade-out set gain to %f\n", gain);
-#endif
-            alSourcef(Sources[the_sounds[index].source_index], AL_GAIN, gain);
-            usleep(10000);
-        }
-
-        if (AL_NO_ERROR != alGetError())
-            fprintf(stderr,"(Bridge Warning) - Failed to set fade-out effect\n");
-
-        // stop that sound and reset its volume
-        alSourceStop (Sources[the_sounds[index].source_index]);
-        alSourcef (Sources[the_sounds[index].source_index], AL_GAIN, target_gain);
-    }
-
-    if (AL_NO_ERROR != alGetError())
-        fprintf(stderr,"(Bridge Warning) - Failed to set fade effect\n");
-
-#ifndef _WIN32
-    pthread_exit(NULL);
-#else
-    _endthread();
-#endif
-}
-
--- a/misc/openalbridge/commands.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
- *  commands.h
- *  Hedgewars
- *
- *  Created by Vittorio on 13/06/10.
- *  Copyright 2010 __MyCompanyName__. All rights reserved.
- *
- */
-
-#ifndef _OALB_COMMANDS_H
-#define _OALB_COMMANDS_H
-
-#include "openalbridge_t.h"
-#include "openalbridge.h"
-
-
-#define openal_fadein(x,y)          openal_fade(x,y,AL_FADE_IN)
-#define openal_fadeout(x,y)         openal_fade(x,y,AL_FADE_OUT)
-#define openal_playsound_loop(x,y)  openal_playsound(x)  \
-                                        if (y != 0)  \
-                                        openal_toggleloop(x);
-#ifdef __CPLUSPLUS
-extern "C" {
-#endif
-    
-    // play, pause, stop a single sound source
-    void openal_pausesound        (unsigned int index);
-    void openal_stopsound         (unsigned int index);
-    
-    // play a sound and set whether it should loop or not (0/1)
-    void openal_playsound         (unsigned int index);
-    
-    void openal_freesound         (unsigned int index);
-    
-    // set or unset the looping property for a sound source
-    void openal_toggleloop        (unsigned int index);
-    
-    // set position and volume of a sound source
-    void openal_setposition       (unsigned int index, float x, float y, float z);
-    void openal_setvolume         (unsigned int index, float gain);
-    
-    // set volume for all sounds (gain interval is [0-1])
-    void openal_setglobalvolume   (float gain);
-    
-    // mute or unmute all sounds
-    void openal_togglemute        (void);
-    
-    // fade effect,
-    void openal_fade              (unsigned int index, unsigned short int quantity, al_fade_t direction);
-    
-#ifdef __CPLUSPLUS
-}
-#endif
-
-#endif /*_OALB_COMMANDS_H*/
\ No newline at end of file
--- a/misc/openalbridge/globals.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
- * OpenAL Bridge - a simple portable library for OpenAL interface
- * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-#ifndef _OALB_GLOBALS_H
-#define _OALB_GLOBALS_H
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "al.h"
-
-#ifndef _WIN32
-#include <pthread.h>
-#include <syslog.h>
-#else
-#include <process.h>
-#endif
-
-
-// 1.0 02/03/10 - Defines cross-platform sleep, usleep, etc. [Wu Yongwei]
-#ifndef _SLEEP_H
-#define _SLEEP_H
-#ifdef _WIN32
-# if defined(_NEED_SLEEP_ONLY) && (defined(_MSC_VER) || defined(__MINGW32__))
-#  include <stdlib.h>
-#  define sleep(t) _sleep((t) * 1000)
-# else
-#  define WIN32_LEAN_AND_MEAN
-#  include <windows.h>
-#  define sleep(t)  Sleep((t) * 1000)
-# endif
-# ifndef _NEED_SLEEP_ONLY
-#  define msleep(t) Sleep(t)
-#  define usleep(t) Sleep((t) / 1000)
-# endif
-#else
-# include <unistd.h>
-# ifndef _NEED_SLEEP_ONLY
-#  define msleep(t) usleep((t) * 1000)
-# endif
-#endif
-#endif // _SLEEP_H
-
-
-// check compiler requirements
-#if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
-#warning __BIG_ENDIAN__ or __LITTLE_ENDIAN__ not found, going to set __LITTLE_ENDIAN__ as default
-#define __LITTLE_ENDIAN__ 1
-#endif
-
-/* use byteswap macros from the host system, hopefully optimized ones ;-)
- * or define our own version, simple, stupid, straight-forward... */
-#ifdef HAVE_BYTESWAP_H
-#include <byteswap.h>
-#else
-#define bswap_16(x)	(((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8))
-#define bswap_32(x)	(((x & 0xFF000000) >> 24) | (((x) & 0x00FF0000) >> 8)  | \
-                     ((x & 0x0000FF00) << 8)  | (((x) & 0x000000FF) << 24) )
-#endif /* HAVE_BYTESWAP_H */
-
-/* swap numbers accordingly to architecture automatically */
-#ifdef __LITTLE_ENDIAN__
-#define ENDIAN_LITTLE_32(x) x
-#define ENDIAN_BIG_32(x)    bswap_32(x)
-#define ENDIAN_LITTLE_16(x) x
-#define ENDIAN_BIG_16(x)    bswap_16(x)
-#elif __BIG_ENDIAN__
-#define ENDIAN_LITTLE_32(x) bswap_32(x)
-#define ENDIAN_BIG_32(x)    x
-#define ENDIAN_LITTLE_16(x) bswap_16(x)
-#define ENDIAN_BIG_16(x)    x
-#endif
-
-/* file format defines */
-#define OGG_FILE_FORMAT         0x4F676753
-#define WAV_FILE_FORMAT         0x52494646
-#define WAV_HEADER_SUBCHUNK2ID  0x64617461
-
-
-#endif /*_OALB_GLOBALS_H*/
--- a/misc/openalbridge/loaders.c	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
-* OpenAL Bridge - a simple portable library for OpenAL interface
-* Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation; version 2 of the License
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-*/
-
-#include "loaders.h"
-#include "wrappers.h"
-#include "vorbis/vorbisfile.h"
-#include "openalbridge_t.h"
-
-
-int load_wavpcm (const char *filename, ALenum *format, char **data, ALsizei *bitsize, ALsizei *freq) {
-    WAV_header_t WAVHeader;
-    FILE *wavfile;
-    int32_t t;
-    uint32_t n = 0;
-    uint8_t sub0, sub1, sub2, sub3;
-
-    wavfile = Fopen(filename, "rb");
-
-    fread(&WAVHeader.ChunkID, sizeof(uint32_t), 1, wavfile);                /*RIFF*/
-    fread(&WAVHeader.ChunkSize, sizeof(uint32_t), 1, wavfile);
-    fread(&WAVHeader.Format, sizeof(uint32_t), 1, wavfile);                 /*WAVE*/
-
-#ifdef DEBUG
-    fprintf(stderr, "ChunkID: %X\n", ENDIAN_BIG_32(WAVHeader.ChunkID));
-    fprintf(stderr, "ChunkSize: %d\n", ENDIAN_LITTLE_32(WAVHeader.ChunkSize));
-    fprintf(stderr, "Format: %X\n", ENDIAN_BIG_32(WAVHeader.Format));
-#endif
-
-    fread(&WAVHeader.Subchunk1ID, sizeof(uint32_t), 1, wavfile);            /*fmt */
-    fread(&WAVHeader.Subchunk1Size, sizeof(uint32_t), 1, wavfile);
-    fread(&WAVHeader.AudioFormat, sizeof(uint16_t), 1, wavfile);
-    fread(&WAVHeader.NumChannels, sizeof(uint16_t), 1, wavfile);
-    fread(&WAVHeader.SampleRate, sizeof(uint32_t), 1, wavfile);
-    fread(&WAVHeader.ByteRate, sizeof(uint32_t), 1, wavfile);
-    fread(&WAVHeader.BlockAlign, sizeof(uint16_t), 1, wavfile);
-    fread(&WAVHeader.BitsPerSample, sizeof(uint16_t), 1, wavfile);
-
-#ifdef DEBUG
-    fprintf(stderr, "Subchunk1ID: %X\n", ENDIAN_BIG_32(WAVHeader.Subchunk1ID));
-    fprintf(stderr, "Subchunk1Size: %d\n", ENDIAN_LITTLE_32(WAVHeader.Subchunk1Size));
-    fprintf(stderr, "AudioFormat: %d\n", ENDIAN_LITTLE_16(WAVHeader.AudioFormat));
-    fprintf(stderr, "NumChannels: %d\n", ENDIAN_LITTLE_16(WAVHeader.NumChannels));
-    fprintf(stderr, "SampleRate: %d\n", ENDIAN_LITTLE_32(WAVHeader.SampleRate));
-    fprintf(stderr, "ByteRate: %d\n", ENDIAN_LITTLE_32(WAVHeader.ByteRate));
-    fprintf(stderr, "BlockAlign: %d\n", ENDIAN_LITTLE_16(WAVHeader.BlockAlign));
-    fprintf(stderr, "BitsPerSample: %d\n", ENDIAN_LITTLE_16(WAVHeader.BitsPerSample));
-#endif
-
-    /*remove useless header chunks by looking for the WAV_HEADER_SUBCHUNK2ID integer */
-    do {
-        t = fread(&sub0, sizeof(uint8_t), 1, wavfile);
-        if(sub0 == 0x64) {
-            t = fread(&sub1, sizeof(uint8_t), 1, wavfile);
-            if(sub1 == 0x61) {
-                t = fread(&sub2, sizeof(uint8_t), 1, wavfile);
-                if(sub2 == 0x74) {
-                    t = fread(&sub3, sizeof(uint8_t), 1, wavfile);
-                    if(sub3 == 0x61) {
-                        WAVHeader.Subchunk2ID = WAV_HEADER_SUBCHUNK2ID;
-                        break;
-                    }
-                }
-            }
-        }
-
-        if (t <= 0) {
-            // eof
-            fprintf(stderr,"(Bridge Error) - wrong WAV header\n");
-            return -1;
-        }
-    } while (1);
-
-    fread(&WAVHeader.Subchunk2Size, sizeof(uint32_t), 1, wavfile);
-
-#ifdef DEBUG
-    fprintf(stderr, "Subchunk2ID: %X\n", ENDIAN_LITTLE_32(WAVHeader.Subchunk2ID));
-    fprintf(stderr, "Subchunk2Size: %d\n", ENDIAN_LITTLE_32(WAVHeader.Subchunk2Size));
-#endif
-
-    *data = (char*) Malloc (sizeof(char) * ENDIAN_LITTLE_32(WAVHeader.Subchunk2Size));
-
-    /*read the actual sound data*/
-    do {
-        n += fread(&((*data)[n]), sizeof(uint8_t), 4, wavfile);
-    } while (n < ENDIAN_LITTLE_32(WAVHeader.Subchunk2Size));
-
-    fclose(wavfile);
-
-#ifdef DEBUG
-    fprintf(stderr,"(Bridge Info) - WAV data loaded\n");
-#endif
-
-    /*set parameters for OpenAL*/
-    /*Valid formats are AL_FORMAT_MONO8, AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16*/
-    if (ENDIAN_LITTLE_16(WAVHeader.NumChannels) == 1) {
-        if (ENDIAN_LITTLE_16(WAVHeader.BitsPerSample) == 8)
-            *format = AL_FORMAT_MONO8;
-        else {
-            if (ENDIAN_LITTLE_16(WAVHeader.BitsPerSample) == 16)
-                *format = AL_FORMAT_MONO16;
-            else {
-                fprintf(stderr,"(Bridge Error) - wrong WAV header [bitsample value]\n");
-                return -2;
-            }
-        }
-    } else {
-        if (ENDIAN_LITTLE_16(WAVHeader.NumChannels) == 2) {
-            if (ENDIAN_LITTLE_16(WAVHeader.BitsPerSample) == 8)
-                *format = AL_FORMAT_STEREO8;
-            else {
-                if (ENDIAN_LITTLE_16(WAVHeader.BitsPerSample) == 16)
-                    *format = AL_FORMAT_STEREO16;
-                else {
-                    fprintf(stderr,"(Bridge Error) - wrong WAV header [bitsample value]\n");
-                    return -2;
-                }
-            }
-        } else {
-            fprintf(stderr,"(Bridge Error) - wrong WAV header [format value]\n");
-            return -2;
-        }
-    }
-
-    *bitsize = ENDIAN_LITTLE_32(WAVHeader.Subchunk2Size);
-    *freq    = ENDIAN_LITTLE_32(WAVHeader.SampleRate);
-    return 0;
-}
-
-
-int load_oggvorbis (const char *filename, ALenum *format, char **data, ALsizei *bitsize, ALsizei *freq) {
-    /*implementation inspired from http://www.devmaster.net/forums/showthread.php?t=1153 */
-
-    /*ogg handle*/
-    FILE *oggFile;
-    /*stream handle*/
-    OggVorbis_File oggStream;
-    /*some formatting data*/
-    vorbis_info *vorbisInfo;
-    /*length of the decoded data*/
-    int64_t pcm_length;
-    /*other vars*/
-    int section, result, size, endianness;
-#ifdef DEBUG
-    int i;
-    /*other less useful data*/
-    vorbis_comment *vorbisComment;
-#endif
-
-    oggFile = Fopen(filename, "rb");
-    result = ov_open_callbacks(oggFile, &oggStream, NULL, 0, OV_CALLBACKS_DEFAULT);
-    if (result < 0) {
-        fprintf(stderr,"(Bridge Error) - ov_open_callbacks() failed with %X\n", result);
-        ov_clear(&oggStream);
-        return -1;
-    }
-
-    /*load OGG header and determine the decoded data size*/
-    vorbisInfo = ov_info(&oggStream, -1);
-    pcm_length = ov_pcm_total(&oggStream, -1) << vorbisInfo->channels;
-
-#ifdef DEBUG
-    vorbisComment = ov_comment(&oggStream, -1);
-    fprintf(stderr, "Version: %d\n", vorbisInfo->version);
-    fprintf(stderr, "Channels: %d\n", vorbisInfo->channels);
-    fprintf(stderr, "Rate (Hz): %ld\n", vorbisInfo->rate);
-    fprintf(stderr, "Bitrate Upper: %ld\n", vorbisInfo->bitrate_upper);
-    fprintf(stderr, "Bitrate Nominal: %ld\n", vorbisInfo->bitrate_nominal);
-    fprintf(stderr, "Bitrate Lower: %ld\n", vorbisInfo->bitrate_lower);
-    fprintf(stderr, "Bitrate Windows: %ld\n", vorbisInfo->bitrate_window);
-    fprintf(stderr, "Vendor: %s\n", vorbisComment->vendor);
-    fprintf(stderr, "PCM data size: %lld\n", pcm_length);
-    fprintf(stderr, "# comment: %d\n", vorbisComment->comments);
-    for (i = 0; i < vorbisComment->comments; i++)
-        fprintf(stderr, "\tComment %d: %s\n", i, vorbisComment->user_comments[i]);
-#endif
-
-    /*allocates enough room for the decoded data*/
-    *data = (char*) Malloc (sizeof(char) * pcm_length);
-
-    /*there *should* not be ogg at 8 bits*/
-    if (vorbisInfo->channels == 1)
-        *format = AL_FORMAT_MONO16;
-    else {
-        if (vorbisInfo->channels == 2)
-            *format = AL_FORMAT_STEREO16;
-        else {
-            fprintf(stderr,"(Bridge Error) - wrong OGG header [channel %d]\n", vorbisInfo->channels);
-            ov_clear(&oggStream);
-            return -2;
-        }
-    }
-
-    size = 0;
-#ifdef __LITTLE_ENDIAN__
-    endianness = 0;
-#elif __BIG_ENDIAN__
-    endianness = 1;
-#endif
-    while (size < pcm_length) {
-        /*ov_read decodes the ogg stream and storse the pcm in data*/
-        result = ov_read (&oggStream, *data + size, pcm_length - size, endianness, 2, 1, &section);
-        if (result > 0) {
-            size += result;
-        } else {
-            if (result == 0)
-                break;
-            else {
-                fprintf(stderr,"(Bridge Error) - End of file from OGG stream\n");
-                ov_clear(&oggStream);
-                return -3;
-            }
-        }
-    }
-
-    /*set the last fields*/
-    *bitsize = size;
-    *freq = vorbisInfo->rate;
-
-    /*cleaning time (ov_clear also closes file handler)*/
-    ov_clear(&oggStream);
-
-    return 0;
-}
--- a/misc/openalbridge/loaders.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
- * OpenAL Bridge - a simple portable library for OpenAL interface
- * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-#include "globals.h"
-
-#ifndef _OALB_LOADERS_H
-#define _OALB_LOADERS_H
-
-int load_wavpcm     (const char *filename, ALenum *format, char **data, ALsizei *bitsize, ALsizei *freq);
-int load_oggvorbis  (const char *filename, ALenum *format, char **data, ALsizei *bitsize, ALsizei *freq);
-
-#endif /*_OALB_LOADERS_H*/
--- a/misc/openalbridge/openalbridge.c	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +0,0 @@
-/*
-* OpenAL Bridge - a simple portable library for OpenAL interface
-* Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation; version 2 of the License
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-*/
-
-#include "openalbridge.h"
-#include "globals.h"
-#include "al.h"
-#include "alc.h"
-#include "wrappers.h"
-#include "loaders.h"
-#include "string.h"
-
-// Sources are points emitting sound, their number is limited, but a single source can play many buffers
-// Buffers hold sound data and are unlimited
-ALuint *Sources;
-ALuint cache_size, cache_index, sources_number;
-ALboolean instances_number;
-al_sound_t *the_sounds;
-ALint cache_pointer;
-
-// Initialize an OpenAL contex and allocate memory space for data and buffers
-// It can be called twice to increase the cache size
-int openal_init (int memorysize) {
-    ALCcontext *context;
-    ALCdevice *device;
-    int i;
-        
-    // reuse old context and resize the existing 
-    if (openal_ready() == AL_TRUE) {
-        cache_size += memorysize;
-        fprintf(stderr,"(Bridge Info) - already initialized, resizing cache to %d\n", cache_size);
-        the_sounds = (al_sound_t *)Realloc (the_sounds, sizeof(al_sound_t) * cache_size);
-        for (i = cache_size - memorysize; i < cache_size; i++) {
-            the_sounds[i].filename = NULL;
-            the_sounds[i].buffer = -1;
-            the_sounds[i].source_index = -1;
-            the_sounds[i].stats = 0;
-        }
-        instances_number++;
-        return AL_TRUE;
-    }
-    
-    cache_pointer = 0;
-    instances_number++;
-    
-    // set the memory dimentsion and the increment width when reallocating
-    if (memorysize <= 0)
-        cache_size = 50;
-    else
-        cache_size = memorysize;
-
-    // open hardware device if present
-    device = alcOpenDevice(NULL);
-    sources_number = 16;
-    if (device == NULL) {
-        fprintf(stderr,"(Bridge Warning) - failed to open sound device, using software renderer\n");
-        device = alcOpenDevice("Generic Software");
-        sources_number = 32;
-        if (device == NULL) {
-            fprintf(stderr,"(Bridge ERROR) - failed to start software renderer, sound will be disabled\n");
-            return -1;
-        }
-    }
-
-    fprintf(stderr,"(Bridge Info) - output device: %s\n", alcGetString(device, ALC_DEVICE_SPECIFIER));
-
-    context = alcCreateContext(device, NULL);
-    alcMakeContextCurrent(context);
-    alcProcessContext(context);
-
-    if (AL_NO_ERROR != alGetError()) {
-        fprintf(stderr,"(Bridge ERROR) - Failed to create a new contex\n");
-        alcMakeContextCurrent(NULL);
-        alcDestroyContext(context);
-        alcCloseDevice(device);
-        return -2;
-    }
-
-    Sources = (ALuint *)Malloc (sizeof(ALuint) * sources_number);
-    alGenSources(sources_number, Sources);
-    
-    // set the listener gain, position (on xyz axes), velocity (one value for each axe) and orientation
-    // Position, Velocity and Orientation of the listener
-    ALfloat ListenerPos[] = {0.0, 0.0, 0.0};
-    ALfloat ListenerVel[] = {0.0, 0.0, 0.0};
-    ALfloat ListenerOri[] = {0.0, 0.0, -1.0, 0.0, 1.0, 0.0};
-
-    alListenerf (AL_GAIN,        1.0f       );
-    alListenerfv(AL_POSITION,    ListenerPos);
-    alListenerfv(AL_VELOCITY,    ListenerVel);
-    alListenerfv(AL_ORIENTATION, ListenerOri);
-
-    if (AL_NO_ERROR != alGetError()) {
-        fprintf(stderr,"(Bridge ERROR) - Failed to set Listener properties\n");
-        return -3;
-    }
-
-    the_sounds = (al_sound_t *)Malloc (sizeof(al_sound_t) * cache_size);
-    for (i = 0; i < cache_size; i++) {
-        the_sounds[i].filename = NULL;
-        the_sounds[i].buffer = -1;
-        the_sounds[i].source_index = -1;
-        the_sounds[i].stats = 0;
-    }
-
-    alGetError();
-    return AL_TRUE;
-}
-
-
-// Stop all sounds, deallocate all memory and close OpenAL context
-void openal_close (void) {
-    ALCcontext *context;
-    ALCdevice  *device;
-    int i;
-    
-    if (instances_number == 0) {
-        fprintf(stderr,"(Bridge Warning) - OpenAL not initialized\n");
-        return;
-    }
-
-    instances_number--;
-    if (instances_number > 0) {
-        return;
-    }
-    
-    //TODO: free other stuff also
-    for (i = 0; i < cache_size; i++)
-        alDeleteBuffers (1, &the_sounds[i].buffer);
-    free(the_sounds);
-
-    alSourceStopv	(sources_number, Sources);
-    alDeleteSources (sources_number, Sources);
-
-    free(Sources);
-
-    context = alcGetCurrentContext();
-    device  = alcGetContextsDevice(context);
-
-    alcMakeContextCurrent(NULL);
-    alcDestroyContext(context);
-    alcCloseDevice(device);
-
-    fprintf(stderr,"(Bridge Info) - closed\n");
-
-    return;
-}
-
-
-ALboolean openal_ready (void) {
-    if (instances_number >= 1) 
-        return AL_TRUE;
-    else
-        return AL_FALSE;
-}
-
-
-// Open a file, load into memory and allocate the Source buffer for playing
-int openal_loadfile (const char *filename){
-    ALenum format, error;
-    ALsizei bitsize, freq;
-    uint32_t fileformat;
-    al_sound_t soundData;
-    int len, i;
-    char *data;
-    FILE *fp;
-    
-    if (openal_ready() == AL_FALSE) {
-        fprintf(stderr,"(Bridge Warning) - not initialized\n");
-        return -1;
-    }
-    
-    // if this sound is already loaded return the index from the_sounds
-    len = strlen(filename);
-    for (i = 0; i < cache_size; i++) {
-        if (the_sounds[i].filename != NULL && strncmp(the_sounds[i].filename, filename, len) == 0) {
-#ifdef DEBUG
-            fprintf(stderr,"(Bridge Debug) - sound %d is already loaded\n", i);
-#endif
-            return i;
-        }
-    }
-
-    if (cache_pointer >= cache_size) {
-        fprintf(stderr,"(Bridge ERROR) - Cache size limit reached; consider allocating more space\n", filename);
-        return -2;
-    }
-    
-    // detect the file format, as written in the first 4 bytes of the header
-    fp = Fopen (filename, "rb");
-
-    if (fp == NULL) {
-        fprintf(stderr,"(Bridge ERROR) - File %s not loaded\n", filename);
-        return -3;
-    }
-
-    error = fread (&fileformat, sizeof(uint32_t), 1, fp);
-    fclose (fp);
-
-    if (error < 0) {
-        fprintf(stderr,"(Bridge ERROR) - File %s is too short\n", filename);
-        return -4;
-    }
-
-    switch (ENDIAN_BIG_32(fileformat)) {
-        case OGG_FILE_FORMAT:
-            error = load_oggvorbis (filename, &format, &data, &bitsize, &freq);
-            break;
-        case WAV_FILE_FORMAT:
-            error = load_wavpcm (filename, &format, &data, &bitsize, &freq);
-            break;
-        default:
-            fprintf(stderr,"(Bridge ERROR) - File format (%08X) not supported\n", ENDIAN_BIG_32(fileformat));
-            return -5;
-            break;
-    }
-
-    if (error != 0) {
-        fprintf(stderr,"(Bridge ERROR) - error loading file %s\n", filename);
-        free(data);
-        return -6;
-    }
-
-    alGenBuffers(1, &soundData.buffer);
-    soundData.filename = filename;
-    soundData.source_index = -1;
-    soundData.stats = 0;
-    
-    if (AL_NO_ERROR != alGetError()) {
-        fprintf(stderr,"(Bridge ERROR) - Failed to allocate memory for buffers\n");
-        return -5;
-    }
-    
-    // copy pcm data in one buffer and free it
-    alBufferData(soundData.buffer, format, data, bitsize, freq);
-    free(data);
-
-    if (AL_NO_ERROR != alGetError()) {
-        fprintf(stderr,"(Bridge ERROR) - Failed to write data to buffers\n");
-        return -8;
-    }
-    
-    // clear any AL errors beforehand
-    alGetError();
-
-    fprintf(stderr,"(Bridge Info) - successfully loaded %s\n", filename);
-
-    // returns the index of the source you just loaded, increments it and exits
-    the_sounds[cache_pointer] = soundData;
-    return cache_pointer++;
-}
--- a/misc/openalbridge/openalbridge.def	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-LIBRARY "openalbridge"
-EXPORTS
-	openal_init
-	openal_close
-	openal_ready
-	openal_loadfile
-	openal_playsound	
-	openal_pausesound
-	openal_stopsound
-	openal_playsound_loop
-	openal_stopsound_free
-	openal_freesound
-	openal_toggleloop
-	openal_setvolume
-	openal_setglobalvolume
-	openal_togglemute
-	openal_fade
-	openal_fadein
-	openal_fadeout
-
--- a/misc/openalbridge/openalbridge.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * OpenAL Bridge - a simple portable library for OpenAL interface
- * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-#ifndef _OALB_INTERFACE_H
-#define _OALB_INTERFACE_H
-
-#include "openalbridge_t.h"
-#include "commands.h"
-
-#ifdef __CPLUSPLUS
-extern "C" {
-#endif
-
-    // init audio context and allocate memory
-    int openal_init               (int memorysize);
-
-    // close audio subsytem and free memory
-    void openal_close             (void);
-
-    // check if openal_init has been called
-    char openal_ready             (void);
-
-    // load an audio file into memory and map it to abuffer
-    int  openal_loadfile          (const char *filename);
-
-
-    /******* other functions continue in commands.h *******/
-    
-#ifdef __CPLUSPLUS
-}
-#endif
-
-#endif /*_OALB_INTERFACE_H*/
--- a/misc/openalbridge/openalbridge_t.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
- * OpenAL Bridge - a simple portable library for OpenAL interface
- * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-#include <stdint.h>
-#include "al.h"
-
-#ifndef _OALB_INTERFACE_TYPES_H
-#define _OALB_INTERFACE_TYPES_H
-
-enum al_fade_enum {AL_FADE_IN, AL_FADE_OUT};
-typedef enum al_fade_enum al_fade_t;
-
-
-// data type to handle which source source is playing what
-#pragma pack(1)
-typedef struct _al_sound_t {
-    const char *filename;       // name of the sound file
-    ALuint buffer;              // actual sound content
-    uint32_t source_index;      // index of the associated source
-    uint32_t stats;             // number of times the sound has been played
-} al_sound_t;
-#pragma pack()
-
-
-// data type for passing data between threads
-#pragma pack(1)
-typedef struct _fade_t {
-    uint32_t index;
-    uint16_t quantity;
-    al_fade_t type;
-} fade_t;
-#pragma pack()
-
-
-// data type for WAV header
-#pragma pack(1)
-typedef struct _WAV_header_t {
-    uint32_t ChunkID;
-    uint32_t ChunkSize;
-    uint32_t Format;
-    uint32_t Subchunk1ID;
-    uint32_t Subchunk1Size;
-    uint16_t AudioFormat;
-    uint16_t NumChannels;
-    uint32_t SampleRate;
-    uint32_t ByteRate;
-    uint16_t BlockAlign;
-    uint16_t BitsPerSample;
-    uint32_t Subchunk2ID;
-    uint32_t Subchunk2Size;
-} WAV_header_t;
-#pragma pack()
-
-
-#ifdef __CPLUSPLUS
-}
-#endif
-
-#endif /*_OALB_INTERFACE_TYPES_H*/
--- a/misc/openalbridge/wrappers.c	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* OpenAL Bridge - a simple portable library for OpenAL interface
-* Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation; version 2 of the License
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-*/
-
-#include "wrappers.h"
-#include "openalbridge_t.h"
-
-
-void *Malloc (size_t nbytes) {
-    void *aptr;
-
-    if ((aptr = malloc(nbytes)) == NULL) {
-        fprintf(stderr,"(Bridge FATAL) - not enough memory\n");
-        abort();
-    }
-
-    return aptr;
-}
-
-
-void *Realloc (void *aptr, size_t nbytes) {
-    aptr = realloc(aptr, nbytes);
-
-    if (aptr == NULL) {
-        fprintf(stderr,"(Bridge FATAL) - not enough memory\n");
-        abort();
-    }
-
-    return aptr;
-}
-
-
-FILE *Fopen (const char *fname, char *mode)	{
-    FILE *fp;
-
-    fp = fopen(fname,mode);
-    if (fp == NULL)
-        fprintf(stderr,"(Bridge Error) - can't open file %s in mode '%s'\n", fname, mode);
-
-    return fp;
-}
-
-
--- a/misc/openalbridge/wrappers.h	Thu Jun 17 19:57:51 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
- * OpenAL Bridge - a simple portable library for OpenAL interface
- * Copyright (c) 2009 Vittorio Giovara <vittorio.giovara@gmail.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; version 2 of the License
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
- */
-
-#ifndef _OALB_WRAPPERS_H
-#define _OALB_WRAPPERS_H
-
-#include "globals.h"
-#include "openalbridge_t.h"
-
-void *Malloc (size_t nbytes);
-void *Realloc (void *aptr, size_t nbytes);
-FILE *Fopen (const char *fname, char *mode);
-void helper_fade (void *tmp);
-
-#endif /*_OALB_WRAPPERS_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/DetailViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,36 @@
+//
+//  DetailViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 27/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class GeneralSettingsViewController;
+@class TeamSettingsViewController;
+@class WeaponSettingsViewController;
+@class SchemeSettingsViewController;
+
+@interface DetailViewController : UITableViewController
+#if __IPHONE_3_2
+<UISplitViewControllerDelegate, UIPopoverControllerDelegate>
+#endif
+{
+    NSArray *controllerNames;
+    
+    GeneralSettingsViewController *generalSettingsViewController;
+    TeamSettingsViewController *teamSettingsViewController;
+    WeaponSettingsViewController *weaponSettingsViewController;
+    SchemeSettingsViewController *schemeSettingsViewController;
+    UIPopoverController *popoverController;
+}
+
+// used in iphone version
+-(IBAction) dismissSplitView;
+
+@property (nonatomic, retain) NSArray *controllerNames;
+@property (nonatomic,retain) UIPopoverController *popoverController;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/DetailViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,208 @@
+    //
+//  DetailViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 27/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "DetailViewController.h"
+#import "SDL_uikitappdelegate.h"
+#import "GeneralSettingsViewController.h"
+#import "TeamSettingsViewController.h"
+#import "WeaponSettingsViewController.h"
+#import "SchemeSettingsViewController.h"
+#import "CommodityFunctions.h"
+
+@implementation DetailViewController
+@synthesize controllerNames,popoverController;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+-(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
+    self.view.frame = CGRectMake(0, 0, 1024, 1024);
+}
+
+-(void) viewDidLoad {
+    self.title = NSLocalizedString(@"Settings",@"");
+
+    // allocate controllers and store them into the array
+    NSArray *array= [[NSArray alloc] initWithObjects:NSLocalizedString(@"General",@""), 
+                                                     NSLocalizedString(@"Teams",@""),
+                                                     NSLocalizedString(@"Weapons",@""),
+                                                     NSLocalizedString(@"Schemes",@""),
+                                                     nil];
+    self.controllerNames = array;
+    [array release];
+    
+    // on ipad make the general setting the first view, on iphone add the "Done" button on top left
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+        
+        UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(112, 112, 480, 320)];
+        label.text = @"Press the buttons on the left";
+        label.font = [UIFont systemFontOfSize:20];
+        label.textAlignment = UITextAlignmentCenter;
+        [self.view addSubview:label];
+        [label release];
+        
+        //[self.navigationController pushViewController:nextController animated:NO];
+    } else {
+        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
+                                                                                              target:self
+                                                                                              action:@selector(dismissSplitView)];
+    }
+
+    [super viewDidLoad];
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    // don't display 
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+        return 0;
+    else
+        return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [controllerNames count];
+}
+
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
+                                       reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    NSInteger row = [indexPath row];
+    
+    cell.textLabel.text = [controllerNames objectAtIndex:row];
+    cell.imageView.image = [UIImage imageNamed:@"Icon.png"];
+    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+    
+    return cell;
+}
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    NSInteger row = [indexPath row];
+    UIViewController *nextController = nil;
+    
+    switch (row) {
+        case 0:
+            if (nil == generalSettingsViewController)
+                generalSettingsViewController = [[GeneralSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+            nextController = generalSettingsViewController;
+            break;
+        case 1:
+            if (nil == teamSettingsViewController)
+                teamSettingsViewController = [[TeamSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+            nextController = teamSettingsViewController;
+            break;
+        case 2:
+            if (nil == weaponSettingsViewController)
+                weaponSettingsViewController = [[WeaponSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+            nextController = weaponSettingsViewController;
+            break;
+        case 3:
+            if (nil == schemeSettingsViewController)
+                schemeSettingsViewController = [[SchemeSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+            nextController = schemeSettingsViewController;
+            break;
+    }
+    
+    nextController.title = [controllerNames objectAtIndex:row];
+    [self.navigationController pushViewController:nextController animated:YES];
+}
+
+-(IBAction) dismissSplitView {
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissModalView" object:nil];
+}
+
+#if __IPHONE_3_2
+#pragma mark -
+#pragma mark splitview support
+-(void) splitViewController:(UISplitViewController *)svc popoverController:(UIPopoverController *)pc willPresentViewController:(UIViewController *)aViewController {
+    if (popoverController != nil) {
+        [popoverController dismissPopoverAnimated:YES];
+    }
+}
+
+// Called when the master view controller is about to be hidden
+-(void) splitViewController: (UISplitViewController*)svc willHideViewController:(UIViewController *)aViewController 
+            withBarButtonItem:(UIBarButtonItem*)barButtonItem forPopoverController: (UIPopoverController*)pc {
+
+  /*  barButtonItem.title = @"Master View";
+    UIToolbar *toolbar = self.parentViewController.navigationController.toolbar;
+    NSMutableArray *items = [[toolbar items] mutableCopy];
+    [items insertObject:barButtonItem atIndex:0];
+    [toolbar setItems:items animated:YES];
+
+    [items release];
+
+    self.popoverController = pc;*/
+    barButtonItem.title = aViewController.title;
+    self.navigationItem.rightBarButtonItem = barButtonItem;
+}
+
+// Called when the master view controller is about to appear
+-(void) splitViewController: (UISplitViewController*)svc  willShowViewController:(UIViewController *)aViewController 
+            invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem {
+    /*UIToolbar *toolbar = self.parentViewController.navigationController.toolbar;
+
+    NSMutableArray *items = [[toolbar items] mutableCopy];
+    [items removeObjectAtIndex:0];
+
+    [toolbar setItems:items animated:YES];
+
+    [items release];
+
+    self.popoverController = nil;*/
+        self.navigationItem.rightBarButtonItem = nil;
+
+}
+#endif
+
+-(void) didReceiveMemoryWarning {
+    // Releases the view if it doesn't have a superview.
+    [super didReceiveMemoryWarning];
+    // Release any cached data, images, etc that aren't in use.
+    if (generalSettingsViewController.view.superview == nil)
+        generalSettingsViewController = nil;
+    if (teamSettingsViewController.view.superview == nil)
+        teamSettingsViewController = nil;
+    if (weaponSettingsViewController.view.superview == nil)
+        weaponSettingsViewController = nil;
+    if (schemeSettingsViewController.view.superview == nil)
+        schemeSettingsViewController = nil;
+    MSG_MEMCLEAN();
+}
+
+-(void) viewDidUnload {
+    self.controllerNames = nil;
+    generalSettingsViewController = nil;
+    teamSettingsViewController = nil;
+    weaponSettingsViewController = nil;
+    schemeSettingsViewController = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [controllerNames release];
+    [generalSettingsViewController release];
+    [teamSettingsViewController release];
+    [weaponSettingsViewController release];
+    [schemeSettingsViewController release];
+    [super dealloc];
+}
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/FlagsViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,23 @@
+//
+//  FlagsViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 08/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface FlagsViewController : UITableViewController {
+    NSDictionary *teamDictionary;
+
+    NSArray *flagArray;    
+    NSIndexPath *lastIndexPath;
+}
+
+@property (nonatomic,retain) NSDictionary * teamDictionary;
+@property (nonatomic,retain) NSArray *flagArray;
+@property (nonatomic,retain) NSIndexPath *lastIndexPath;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/FlagsViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,126 @@
+//
+//  FlagsViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 08/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "FlagsViewController.h"
+#import "CommodityFunctions.h"
+
+@implementation FlagsViewController
+@synthesize teamDictionary, flagArray, lastIndexPath;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+
+    self.flagArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:FLAGS_DIRECTORY() error:NULL];
+}
+
+-(void) viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self.tableView reloadData];
+    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [flagArray count];
+}
+
+// Customize the appearance of table view cells.
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    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;
+    } else {
+        cell.accessoryType = UITableViewCellAccessoryNone;
+    }
+    
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    
+    if (newRow != oldRow) {
+        // if the two selected rows differ update data on the hog dictionary and reload table content
+        [self.teamDictionary setValue:[[flagArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"flag"];
+
+        // tell our boss to write this new stuff on disk
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
+
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
+        self.lastIndexPath = indexPath;
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    }
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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 {
+    self.teamDictionary = nil;
+    self.lastIndexPath = nil;
+    self.flagArray = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [teamDictionary release];
+    [lastIndexPath release];
+    [flagArray release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/FortsViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,23 @@
+//
+//  FortsViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 08/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface FortsViewController : UITableViewController {
+    NSDictionary *teamDictionary;
+
+    NSArray *fortArray;
+    NSIndexPath *lastIndexPath;
+}
+
+@property (nonatomic,retain) NSDictionary * teamDictionary;
+@property (nonatomic,retain) NSArray *fortArray;
+//@property (nonatomic,retain) NSArray *fortSprites;
+@property (nonatomic,retain) NSIndexPath *lastIndexPath;
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/FortsViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,161 @@
+//
+//  FortsViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 08/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "FortsViewController.h"
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+
+@implementation FortsViewController
+@synthesize teamDictionary, fortArray, lastIndexPath;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+
+    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++) {
+        if (i % 2) {
+            NSString *currentName = [directoryContents objectAtIndex:i];
+            NSString *correctName = [currentName substringToIndex:([currentName length] - 5)];
+            [filteredContents addObject:correctName];
+        } 
+    }
+    self.fortArray = filteredContents;
+    [filteredContents release];
+    
+    /*
+    // this creates a scaled down version of the image
+    NSMutableArray *spriteArray = [[NSMutableArray alloc] initWithCapacity:[fortArray count]];
+    for (NSString *fortName in fortArray) {
+        NSString *fortFile = [[NSString alloc] initWithFormat:@"%@/%@L.png", fortsDirectory, fortName];
+        UIImage *fortSprite = [[UIImage alloc] initWithContentsOfFile:fortFile];
+        [fortFile release];
+        [spriteArray addObject:[fortSprite scaleToSize:CGSizeMake(196,196)]];
+        [fortSprite release];
+    }
+    self.fortSprites = spriteArray;
+    [spriteArray release];
+    */
+    
+    // statically set row height instead of using delegate method for performance reasons
+    self.tableView.rowHeight = 200;
+}
+
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [self.tableView reloadData];
+    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(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 {
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
+                                       reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    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;
+        self.lastIndexPath = indexPath;
+    } else {
+        cell.accessoryType = UITableViewCellAccessoryNone;
+    }
+    
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    
+    if (newRow != oldRow) {
+        // if the two selected rows differ update data on the hog dictionary and reload table content
+        [self.teamDictionary setValue:[fortArray objectAtIndex:newRow] forKey:@"fort"];
+
+        // tell our boss to write this new stuff on disk
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
+        
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
+        self.lastIndexPath = indexPath;
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    }
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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 {
+    self.teamDictionary = nil;
+    self.lastIndexPath = nil;
+    self.fortArray = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+
+- (void)dealloc {
+    [teamDictionary release];
+    [lastIndexPath release];
+    [fortArray release];
+//    [fortSprites release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,26 @@
+//
+//  GameConfigViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 18/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class TeamConfigViewController;
+@class MapConfigViewController;
+@class SchemeWeaponConfigViewController;
+
+@interface GameConfigViewController : UIViewController {    
+    UIViewController *activeController;
+    MapConfigViewController *mapConfigViewController;
+    TeamConfigViewController *teamConfigViewController;
+    SchemeWeaponConfigViewController *schemeWeaponConfigViewController;
+}
+
+-(IBAction) buttonPressed:(id) sender;
+-(IBAction) segmentPressed:(id) sender;
+-(void) startGame;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/GameConfigViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,200 @@
+    //
+//  GameConfigViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 18/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "GameConfigViewController.h"
+#import "SDL_uikitappdelegate.h"
+#import "CommodityFunctions.h"
+#import "MapConfigViewController.h"
+#import "TeamConfigViewController.h"
+#import "SchemeWeaponConfigViewController.h"
+
+@implementation GameConfigViewController
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+    return rotationManager(interfaceOrientation);
+}
+
+-(IBAction) buttonPressed:(id) sender {
+    // works even if it's not actually a button
+    UIButton *theButton = (UIButton *)sender;
+    switch (theButton.tag) {
+        case 0:
+            [[self parentViewController] dismissModalViewControllerAnimated:YES];
+            break;
+        case 1:
+            [self performSelector:@selector(startGame)
+                       withObject:nil
+                       afterDelay:0.25];
+            break;
+        default:
+            break;
+    }
+}
+
+-(IBAction) segmentPressed:(id) sender {
+    UISegmentedControl *theSegment = (UISegmentedControl *)sender;
+
+    switch (theSegment.selectedSegmentIndex) {
+        case 0:
+            // this init here is just aestetic as this controller was already set up in viewDidLoad
+            if (mapConfigViewController == nil) {
+                mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
+            }
+            activeController = mapConfigViewController;
+            break;
+        case 1:
+            if (teamConfigViewController == nil) {
+                teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                // this message is compulsory otherwise the table won't be loaded at all
+            }
+            activeController = teamConfigViewController;
+            break;
+        case 2:
+            if (schemeWeaponConfigViewController == nil) {
+                schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
+            }
+            activeController = schemeWeaponConfigViewController;
+            break;
+    }
+    
+    // this message is compulsory otherwise the table won't be loaded at all
+    [activeController viewWillAppear:NO];      
+    [self.view addSubview:activeController.view];
+}
+
+-(void) startGame {
+    // don't start playing if the preview is in progress
+    if ([mapConfigViewController busy]) {
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Wait for the Preview",@"")
+                                                        message:NSLocalizedString(@"Before playing the preview needs to be generated",@"")
+                                                       delegate:nil
+                                              cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
+                                              otherButtonTitles:nil];
+        [alert show];
+        [alert release];
+        return;
+    }
+    
+    // play only if there is more than one team
+    if ([teamConfigViewController.listOfSelectedTeams count] < 2) {
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too few teams playing",@"")
+                                                        message:NSLocalizedString(@"You need to select at least two teams to play a game",@"")
+                                                       delegate:nil
+                                              cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
+                                              otherButtonTitles:nil];
+        [alert show];
+        [alert release];
+        return;
+    }
+    
+    // play if there's room for enough hogs in the selected map
+    int hogs = 0;
+    for (NSDictionary *teamData in teamConfigViewController.listOfSelectedTeams)
+        hogs += [[teamData objectForKey:@"number"] intValue];
+
+    if (hogs > mapConfigViewController.maxHogs) {
+        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Too many hogs",@"")
+                                                        message:NSLocalizedString(@"The map you selected is too small for that many hogs",@"")
+                                                       delegate:nil
+                                              cancelButtonTitle:NSLocalizedString(@"Ok, got it",@"")
+                                              otherButtonTitles:nil];
+        [alert show];
+        [alert release];
+        return;
+    }
+    
+    // create the configuration file that is going to be sent to engine
+    NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:mapConfigViewController.seedCommand,@"seed_command",
+                                                                      mapConfigViewController.templateFilterCommand,@"templatefilter_command",
+                                                                      mapConfigViewController.mapGenCommand,@"mapgen_command",
+                                                                      mapConfigViewController.mazeSizeCommand,@"mazesize_command",
+                                                                      mapConfigViewController.themeCommand,@"theme_command",
+                                                                      teamConfigViewController.listOfSelectedTeams,@"teams_list",
+                                                                      schemeWeaponConfigViewController.selectedScheme,@"scheme",
+                                                                      schemeWeaponConfigViewController.selectedWeapon,@"weapon",
+                                                                      nil];
+    [dict writeToFile:GAMECONFIG_FILE() atomically:YES];
+    [dict release];
+
+    // finally launch game and remove this controller
+    [[self parentViewController] dismissModalViewControllerAnimated:YES];
+    [[SDLUIKitDelegate sharedAppDelegate] startSDLgame];
+}
+
+-(void) viewDidLoad {
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+        if (mapConfigViewController == nil)
+            mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPad" bundle:nil];
+        if (teamConfigViewController == nil)
+            teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStylePlain];
+        teamConfigViewController.view.frame = CGRectMake(0, 224, 300, 500);
+        teamConfigViewController.view.backgroundColor = [UIColor clearColor];
+        [mapConfigViewController.view addSubview:teamConfigViewController.view];
+        if (schemeWeaponConfigViewController == nil)
+            schemeWeaponConfigViewController = [[SchemeWeaponConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
+        schemeWeaponConfigViewController.view.frame = CGRectMake(362, 224, 300, 500);
+        schemeWeaponConfigViewController.view.backgroundColor = [UIColor clearColor];
+        [mapConfigViewController.view addSubview:schemeWeaponConfigViewController.view];
+    } else
+        mapConfigViewController = [[MapConfigViewController alloc] initWithNibName:@"MapConfigViewController-iPhone" bundle:nil];
+    activeController = mapConfigViewController;
+    
+    [self.view addSubview:mapConfigViewController.view];
+    
+    [super viewDidLoad];
+}
+
+-(void) viewWillAppear:(BOOL)animated {
+    [mapConfigViewController viewWillAppear:animated];
+    [teamConfigViewController viewWillAppear:animated];
+    [schemeWeaponConfigViewController viewWillAppear:animated];
+    // ADD other controllers here
+     
+    [super viewWillAppear:animated];
+}
+
+-(void) viewDidAppear:(BOOL)animated {
+    [mapConfigViewController viewDidAppear:animated];
+    [teamConfigViewController viewDidAppear:animated];
+    [schemeWeaponConfigViewController viewDidAppear:animated];
+    [super viewDidAppear:animated];
+}
+
+-(void) didReceiveMemoryWarning {
+    // Releases the view if it doesn't have a superview.
+    [super didReceiveMemoryWarning];
+    // Release any cached data, images, etc that aren't in use.
+    if (mapConfigViewController.view.superview == nil) 
+        mapConfigViewController = nil;
+    if (teamConfigViewController.view.superview == nil)
+        teamConfigViewController = nil;
+    if (schemeWeaponConfigViewController.view.superview == nil)
+        schemeWeaponConfigViewController = nil;
+    activeController = nil;
+    MSG_MEMCLEAN();
+}
+
+-(void) viewDidUnload {
+    activeController = nil;
+    mapConfigViewController = nil;
+    teamConfigViewController = nil;
+    schemeWeaponConfigViewController = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [activeController release];
+    [mapConfigViewController release];
+    [teamConfigViewController release];
+    [schemeWeaponConfigViewController release];
+    [super dealloc];
+}
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/GameSetup.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,32 @@
+//
+//  gameSetup.h
+//  hwengine
+//
+//  Created by Vittorio on 10/01/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "SDL_net.h"
+
+@interface GameSetup : NSObject {
+	NSDictionary *systemSettings;
+    NSDictionary *gameConfig;
+    
+	NSInteger ipcPort;
+	TCPsocket sd, csd; // Socket descriptor, Client socket descriptor
+}
+
+@property (nonatomic, retain) NSDictionary *systemSettings;
+@property (nonatomic, retain) NSDictionary *gameConfig;
+
+-(void) engineProtocol;
+-(void) startThread:(NSString *)selector;
+-(int)  sendToEngine:(NSString *)string;
+-(void) provideTeamData:(NSString *)teamName forHogs:(NSInteger) numberOfPlayingHogs withHealth:(NSInteger) initialHealth ofColor:(NSNumber *)teamColor;
+-(void) provideAmmoData:(NSString *)ammostoreName forPlayingTeams:(NSInteger) numberOfTeams;
+-(NSInteger) provideScheme:(NSString *)schemeName;
+
+-(const char **)getSettings;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/GameSetup.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,450 @@
+//
+//  gameSetup.m
+//  hwengine
+//
+//  Created by Vittorio on 10/01/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#include <sys/types.h>
+#include <sys/sysctl.h>
+
+#import "GameSetup.h"
+#import "SDL_uikitappdelegate.h"
+#import "SDL_net.h"
+#import "PascalImports.h"
+#import "CommodityFunctions.h"
+
+#define BUFFER_SIZE 256
+#define debug(format, ...) CFShow([NSString stringWithFormat:format, ## __VA_ARGS__]);
+
+@implementation GameSetup
+
+@synthesize systemSettings, gameConfig;
+
+-(id) init {
+	if (self = [super init]) {
+        ipcPort = randomPort();
+        
+        // should check they exist and throw and exection if not
+        NSDictionary *dictSett = [[NSDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()];
+        self.systemSettings = dictSett;
+        [dictSett release];
+        
+        NSDictionary *dictGame = [[NSDictionary alloc] initWithContentsOfFile:GAMECONFIG_FILE()];
+        self.gameConfig = dictGame;
+        [dictGame release];
+    } 
+    return self;
+}
+
+-(NSString *)description {
+    return [NSString stringWithFormat:@"ipcport: %d\nsockets: %d,%d\n teams: %@\n systemSettings: %@",ipcPort,sd,csd,gameConfig,systemSettings];
+}
+
+-(void) dealloc {
+    [gameConfig release];
+    [systemSettings release];
+	[super dealloc];
+}
+
+#pragma mark -
+#pragma mark Provider functions
+// unpacks team data from the selected team.plist to a sequence of engine commands
+-(void) provideTeamData:(NSString *)teamName forHogs:(NSInteger) numberOfPlayingHogs withHealth:(NSInteger) initialHealth ofColor:(NSNumber *)teamColor {
+    /*
+     addteam <32charsMD5hash> <color> <team name>
+     addhh <level> <health> <hedgehog name>
+     <level> is 0 for human, 1-5 for bots (5 is the most stupid)
+    */
+    
+    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@", TEAMS_DIRECTORY(), teamName];
+    NSDictionary *teamData = [[NSDictionary alloc] initWithContentsOfFile:teamFile];
+    [teamFile release];
+    
+    NSString *teamHashColorAndName = [[NSString alloc] initWithFormat:@"eaddteam %@ %@ %@", 
+                                      [teamData objectForKey:@"hash"], [teamColor stringValue], [teamData objectForKey:@"teamname"]];
+    [self sendToEngine: teamHashColorAndName];
+    [teamHashColorAndName release];
+    
+    NSString *grave = [[NSString alloc] initWithFormat:@"egrave %@", [teamData objectForKey:@"grave"]];
+    [self sendToEngine: grave];
+    [grave release];
+    
+    NSString *fort = [[NSString alloc] initWithFormat:@"efort %@", [teamData objectForKey:@"fort"]];
+    [self sendToEngine: fort];
+    [fort release];
+    
+    NSString *voicepack = [[NSString alloc] initWithFormat:@"evoicepack %@", [teamData objectForKey:@"voicepack"]];
+    [self sendToEngine: voicepack];
+    [voicepack release];
+    
+    NSString *flag = [[NSString alloc] initWithFormat:@"eflag %@", [teamData objectForKey:@"flag"]];
+    [self sendToEngine: flag];
+    [flag release];
+    
+    NSArray *hogs = [teamData objectForKey:@"hedgehogs"];
+    for (int i = 0; i < numberOfPlayingHogs; i++) {
+        NSDictionary *hog = [hogs objectAtIndex:i];
+        
+        NSString *hogLevelHealthAndName = [[NSString alloc] initWithFormat:@"eaddhh %@ %d %@", 
+                                           [hog objectForKey:@"level"], initialHealth, [hog objectForKey:@"hogname"]];
+        [self sendToEngine: hogLevelHealthAndName];
+        [hogLevelHealthAndName release];
+        
+        NSString *hogHat = [[NSString alloc] initWithFormat:@"ehat %@", [hog objectForKey:@"hat"]];
+        [self sendToEngine: hogHat];
+        [hogHat release];
+    }
+    
+    [teamData release];
+}
+
+// unpacks ammostore data from the selected ammo.plist to a sequence of engine commands
+-(void) provideAmmoData:(NSString *)ammostoreName forPlayingTeams:(NSInteger) numberOfTeams {
+    
+    //NSDictionary *ammoData = [[NSDictionary alloc] initWithContentsOfFile:ammoDataFile];
+    NSDictionary *ammoData = [[NSDictionary alloc] initWithObjectsAndKeys:
+                              @"9391929422199121032235111001201000000211190911",@"ammostore_initialqt",
+                              @"0405040541600655546554464776576666666155501000",@"ammostore_probability",
+                              @"0000000000000205500000040007004000000000200000",@"ammostore_delay",
+                              @"1311110312111111123114111111111111111211101111",@"ammostore_crate", nil];
+    
+    
+    NSString *ammloadt = [[NSString alloc] initWithFormat:@"eammloadt %@", [ammoData objectForKey:@"ammostore_initialqt"]];
+    [self sendToEngine: ammloadt];
+    [ammloadt release];
+    
+    NSString *ammprob = [[NSString alloc] initWithFormat:@"eammprob %@", [ammoData objectForKey:@"ammostore_probability"]];
+    [self sendToEngine: ammprob];
+    [ammprob release];
+    
+    NSString *ammdelay = [[NSString alloc] initWithFormat:@"eammdelay %@", [ammoData objectForKey:@"ammostore_delay"]];
+    [self sendToEngine: ammdelay];
+    [ammdelay release];
+    
+    NSString *ammreinf = [[NSString alloc] initWithFormat:@"eammreinf %@", [ammoData objectForKey:@"ammostore_crate"]];
+    [self sendToEngine: ammreinf];
+    [ammreinf release];
+    
+    // sent twice so it applies to both teams
+    NSString *ammstore = [[NSString alloc] initWithString:@"eammstore"];
+    for (int i = 0; i < numberOfTeams; i++)
+        [self sendToEngine: ammstore];
+    [ammstore release];
+    
+    [ammoData release];
+}
+
+// unpacks scheme data from the selected scheme.plist to a sequence of engine commands
+-(NSInteger) provideScheme:(NSString *)schemeName {
+    NSString *schemePath = [[NSString alloc] initWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),schemeName];
+    NSArray *scheme = [[NSArray alloc] initWithContentsOfFile:schemePath];
+    [schemePath release];
+    int result = 0;
+    int i = 0;
+
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x01;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x10;    
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x04;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x08;    
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x20;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x40;    
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x80;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x100;    
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x200;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x400;    
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x800;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x2000;    
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x4000;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x8000;    
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x10000;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x20000;
+    if ([[scheme objectAtIndex:i++] boolValue])
+        result |= 0x80000;    
+
+    NSString *flags = [[NSString alloc] initWithFormat:@"e$gmflags %d",result];
+    [self sendToEngine:flags];
+    [flags release];
+    
+    NSString *dmgMod = [[NSString alloc] initWithFormat:@"e$damagepct %d",[[scheme objectAtIndex:i++] intValue]];
+    [self sendToEngine:dmgMod];
+    [dmgMod release];
+    
+    NSString *turnTime = [[NSString alloc] initWithFormat:@"e$turntime %d",[[scheme objectAtIndex:i++] intValue] * 1000];
+    [self sendToEngine:turnTime];
+    [turnTime release];
+    
+    result = [[scheme objectAtIndex:i++] intValue]; // initial health
+    
+    NSString *sdTime = [[NSString alloc] initWithFormat:@"e$sd_turns %d",[[scheme objectAtIndex:i++] intValue]];
+    [self sendToEngine:sdTime];
+    [sdTime release];
+    
+    NSString *crateDrops = [[NSString alloc] initWithFormat:@"e$casefreq %d",[[scheme objectAtIndex:i++] intValue]];
+    [self sendToEngine:crateDrops];
+    [crateDrops release];
+    
+    NSString *minesTime = [[NSString alloc] initWithFormat:@"e$minestime %d",[[scheme objectAtIndex:i++] intValue] * 1000];
+    [self sendToEngine:minesTime];
+    [minesTime release];
+    
+    NSString *minesNumber = [[NSString alloc] initWithFormat:@"e$landadds %d",[[scheme objectAtIndex:i++] intValue]];
+    [self sendToEngine:minesNumber];
+    [minesNumber release];
+    
+    NSString *dudMines = [[NSString alloc] initWithFormat:@"e$minedudpct %d",[[scheme objectAtIndex:i++] intValue]];
+    [self sendToEngine:dudMines];
+    [dudMines release];
+    
+    NSString *explosives = [[NSString alloc] initWithFormat:@"e$explosives %d",[[scheme objectAtIndex:i++] intValue]];
+    [self sendToEngine:explosives];
+    [explosives release];
+    
+    [scheme release];
+    return result;
+}
+
+#pragma mark -
+#pragma mark Thread/Network relevant code
+// select one of GameSetup method and execute it in a seprate thread
+-(void) startThread: (NSString *) selector {
+	SEL usage = NSSelectorFromString(selector);
+	[NSThread detachNewThreadSelector:usage toTarget:self withObject:nil];
+}
+
+// wrapper that computes the length of the message and then sends the command string
+-(int) sendToEngine: (NSString *)string {
+	uint8_t length = [string length];
+	
+	SDLNet_TCP_Send(csd, &length , 1);
+	return SDLNet_TCP_Send(csd, [string UTF8String], length);
+}
+
+// method that handles net setup with engine and keeps connection alive
+-(void) engineProtocol {
+	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+	IPaddress ip;
+	int eProto;
+	BOOL clientQuit, serverQuit;
+	char buffer[BUFFER_SIZE], string[BUFFER_SIZE];
+	uint8_t msgSize;
+	uint16_t gameTicks;
+
+    serverQuit = NO;
+
+	if (SDLNet_Init() < 0) {
+		NSLog(@"SDLNet_Init: %s", SDLNet_GetError());
+        serverQuit = YES;
+	}
+	
+	// Resolving the host using NULL make network interface to listen
+	if (SDLNet_ResolveHost(&ip, NULL, ipcPort) < 0) {
+		NSLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError());
+        serverQuit = YES;
+	}
+	
+	// Open a connection with the IP provided (listen on the host's port) 
+	if (!(sd = SDLNet_TCP_Open(&ip))) {
+		NSLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), ipcPort);
+        serverQuit = YES;
+	}
+	
+	NSLog(@"engineProtocol - Waiting for a client on port %d", ipcPort);
+	while (!serverQuit) {
+		// This check the sd if there is a pending connection.
+        // If there is one, accept that, and open a new socket for communicating
+		csd = SDLNet_TCP_Accept(sd);
+		if (NULL != csd) {
+			// Now we can communicate with the client using csd socket
+			// sd will remain opened waiting other connections
+			NSLog(@"engineProtocol - Client found");
+			
+			//first byte of the command alwayas contain the size of the command
+			SDLNet_TCP_Recv(csd, &msgSize, sizeof(uint8_t));
+			
+			SDLNet_TCP_Recv(csd, buffer, msgSize);
+			gameTicks = SDLNet_Read16 (&buffer[msgSize - 2]);
+			//NSLog(@"engineProtocol - %d: received [%s]", gameTicks, buffer);
+			
+			if ('C' == buffer[0]) {
+				NSLog(@"engineProtocol - sending game config");
+                
+				// local game
+				[self sendToEngine:@"TL"];
+				
+				// seed info
+				[self sendToEngine:[self.gameConfig objectForKey:@"seed_command"]];
+				
+                // scheme (returns initial health)
+                NSInteger health = [self provideScheme:[self.gameConfig objectForKey:@"scheme"]];
+
+				// dimension of the map
+				[self sendToEngine:[self.gameConfig objectForKey:@"templatefilter_command"]];
+				[self sendToEngine:[self.gameConfig objectForKey:@"mapgen_command"]];
+				[self sendToEngine:[self.gameConfig objectForKey:@"mazesize_command"]];
+
+				// theme info
+				[self sendToEngine:[self.gameConfig objectForKey:@"theme_command"]];
+				
+                NSArray *teamsConfig = [self.gameConfig objectForKey:@"teams_list"];
+                for (NSDictionary *teamData in teamsConfig) {
+                    [self provideTeamData:[teamData objectForKey:@"team"] 
+                                  forHogs:[[teamData objectForKey:@"number"] intValue]
+                               withHealth:health
+                                  ofColor:[teamData objectForKey:@"color"]];
+                }
+                
+                [self provideAmmoData:nil forPlayingTeams:[teamsConfig count]];
+                
+                clientQuit = NO;
+			} else {
+				NSLog(@"engineProtocolThread - wrong message or client closed connection");
+				clientQuit = YES;
+			}
+			
+			while (!clientQuit){
+				msgSize = 0;
+				memset(buffer, 0, BUFFER_SIZE);
+				memset(string, 0, BUFFER_SIZE);
+				if (SDLNet_TCP_Recv(csd, &msgSize, sizeof(uint8_t)) <= 0)
+					clientQuit = YES;
+				if (SDLNet_TCP_Recv(csd, buffer, msgSize) <=0)
+					clientQuit = YES;
+				
+				gameTicks = SDLNet_Read16(&buffer[msgSize - 2]);
+				//NSLog(@"engineProtocolThread - %d: received [%s]", gameTicks, buffer);
+				
+				switch (buffer[0]) {
+					case '?':
+						NSLog(@"Ping? Pong!");
+						[self sendToEngine:@"!"];
+						break;
+					case 'E':
+						NSLog(@"ERROR - last console line: [%s]", buffer);
+						clientQuit = YES;
+						break;
+					case 'e':
+						sscanf(buffer, "%*s %d", &eProto);
+						short int netProto = 0;
+						char *versionStr;
+						
+                        HW_versionInfo(&netProto, &versionStr);
+						if (netProto == eProto) {
+							NSLog(@"Setting protocol version %d (%s)", eProto, versionStr);
+						} else {
+							NSLog(@"ERROR - wrong protocol number: [%s] - expecting %d", buffer, eProto);
+							clientQuit = YES;
+						}
+                        
+						break;
+					case 'i':
+						switch (buffer[1]) {
+							case 'r':
+								NSLog(@"Winning team: %s", &buffer[2]);
+								break;
+							case 'k':
+								NSLog(@"Best Hedgehog: %s", &buffer[2]);
+								break;
+						}
+						break;
+					default:
+						// empty packet or just statistics
+						break;
+					// missing case for exiting right away
+				}
+			}
+			NSLog(@"Engine exited, closing server");
+			// wait a little to let the client close cleanly
+			[NSThread sleepForTimeInterval:2];
+			// Close the client socket
+			SDLNet_TCP_Close(csd);
+			serverQuit = YES;
+		}
+	}
+	
+	SDLNet_TCP_Close(sd);
+	SDLNet_Quit();
+
+    [[NSFileManager defaultManager] removeItemAtPath:GAMECONFIG_FILE() error:NULL];
+    
+	[pool release];
+    //Invoking this method should be avoided as it does not give your thread a chance to clean up any resources it allocated during its execution.
+    //[NSThread exit];
+}
+
+#pragma mark -
+#pragma mark Setting methods
+// returns an array of c-strings that are read by engine at startup
+-(const char **)getSettings {
+	NSString *ipcString = [[NSString alloc] initWithFormat:@"%d", ipcPort];
+	NSString *localeString = [[NSString alloc] initWithFormat:@"%@.txt", [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode]];
+    CGRect screenBounds = [[UIScreen mainScreen] bounds];
+    NSString *wSize = [[NSString alloc] initWithFormat:@"%d", (int) screenBounds.size.width];
+    NSString *hSize = [[NSString alloc] initWithFormat:@"%d", (int) screenBounds.size.height];
+	const char **gameArgs = (const char**) malloc(sizeof(char *) * 9);
+
+    /*
+    size_t size;
+    // Set 'oldp' parameter to NULL to get the size of the data returned so we can allocate appropriate amount of space
+    sysctlbyname("hw.machine", NULL, &size, NULL, 0); 
+    char *name = malloc(size);
+    // Get the platform name
+    sysctlbyname("hw.machine", name, &size, NULL, 0);
+    NSString *machine = [[NSString alloc] initWithUTF8String:name];
+    free(name);
+    
+   	const char **gameArgs = (const char**) malloc(sizeof(char*) * 9);
+
+    // if the machine is less than iphone 3gs or less than ipod touch 3g use reduced graphics (land array)
+    if ([machine hasPrefix:@"iPhone1"] || ([machine hasPrefix:@"iPod"] && ([machine hasSuffix:@"1,1"] || [machine hasSuffix:@"2,1"])))
+        gameArgs[8] = "1";
+    else
+        gameArgs[8] = "0";
+    [machine release];
+    */
+    
+    // prevents using an empty nickname
+    NSString *username;
+    NSString *originalUsername = [self.systemSettings objectForKey:@"username"];
+    if ([originalUsername length] == 0)
+        username = [[NSString alloc] initWithFormat:@"MobileUser-%@",ipcString];
+    else
+        username = [[NSString alloc] initWithString:originalUsername];
+    
+	gameArgs[0] = [username UTF8String];                                                        //UserNick
+	gameArgs[1] = [ipcString UTF8String];                                                       //ipcPort
+	gameArgs[2] = [[[self.systemSettings objectForKey:@"sound"] stringValue] UTF8String];       //isSoundEnabled
+	gameArgs[3] = [[[self.systemSettings objectForKey:@"music"] stringValue] UTF8String];       //isMusicEnabled
+	gameArgs[4] = [localeString UTF8String];                                                    //cLocaleFName
+	gameArgs[5] = [[[self.systemSettings objectForKey:@"alternate"] stringValue] UTF8String];	//cAltDamage
+	gameArgs[6] = [wSize UTF8String];                                                           //cScreenHeight
+    gameArgs[7] = [hSize UTF8String];                                                           //cScreenWidth
+    gameArgs[8] = NULL;                                                                         //recordFileName
+    
+    [wSize release];
+    [hSize release];
+	[localeString release];
+	[ipcString release];
+    [username release];
+	return gameArgs;
+}
+
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,31 @@
+//
+//  SettingsViewController.h
+//  hwengine
+//
+//  Created by Vittorio on 08/01/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface GeneralSettingsViewController : UITableViewController <UITextFieldDelegate> {
+    NSMutableDictionary *settingsDictionary;
+	UITextField *textFieldBeingEdited;
+	UISwitch *musicSwitch;
+	UISwitch *soundSwitch;
+	UISwitch *altDamageSwitch;
+    BOOL isWriteNeeded;
+}
+
+@property (nonatomic, retain) NSMutableDictionary *settingsDictionary;
+@property (nonatomic, retain) UITextField *textFieldBeingEdited;;
+@property (nonatomic, retain) UISwitch *musicSwitch;
+@property (nonatomic, retain) UISwitch *soundSwitch;
+@property (nonatomic, retain) UISwitch *altDamageSwitch;
+
+#define kNetworkFields 0
+#define kAudioFields 1
+#define kOtherFields 2
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/GeneralSettingsViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,398 @@
+//
+//  SettingsViewController.m
+//  hwengine
+//
+//  Created by Vittorio on 08/01/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "GeneralSettingsViewController.h"
+#import "CommodityFunctions.h"
+
+@implementation GeneralSettingsViewController
+@synthesize settingsDictionary, textFieldBeingEdited, musicSwitch, soundSwitch, altDamageSwitch;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark textfield methods
+// return to previous table
+-(void) cancel:(id) sender {
+    if (textFieldBeingEdited != nil)
+        [self.textFieldBeingEdited resignFirstResponder];
+}
+
+// set the new value
+-(BOOL) save:(id) sender {
+    if (textFieldBeingEdited != nil) {
+        if (textFieldBeingEdited.tag == 0) {
+            [self.settingsDictionary setObject:textFieldBeingEdited.text forKey:@"username"];
+        } else {
+            [self.settingsDictionary setObject:textFieldBeingEdited.text forKey:@"password"];
+        }
+        
+        isWriteNeeded = YES;
+        [self.textFieldBeingEdited resignFirstResponder];
+        return YES;
+    }
+    return NO;
+}
+
+// the textfield is being modified, update the navigation controller
+-(void) textFieldDidBeginEditing:(UITextField *)aTextField{   
+    self.textFieldBeingEdited = aTextField;
+    UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel",@"from the settings table")
+                                                                     style:UIBarButtonItemStylePlain
+                                                                    target:self
+                                                                    action:@selector(cancel:)];
+    self.navigationItem.leftBarButtonItem = cancelButton;
+    [cancelButton release];
+    
+    UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save",@"from the settings table")
+                                                                     style:UIBarButtonItemStyleDone
+                                                                    target:self
+                                                                    action:@selector(save:)];
+    self.navigationItem.rightBarButtonItem = saveButton;
+    [saveButton release];
+}
+
+// the textfield has been modified, check for empty strings and restore original navigation bar
+-(void) textFieldDidEndEditing:(UITextField *)aTextField{
+    self.textFieldBeingEdited = nil;
+    self.navigationItem.rightBarButtonItem = self.navigationItem.backBarButtonItem;
+    self.navigationItem.leftBarButtonItem = nil;
+}
+
+// limit the size of the field to 64 characters like in original frontend
+-(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    int limit = 64;
+    return !([textField.text length] > limit && [string length] > range.length);
+}
+
+
+#pragma mark -
+#pragma mark View Lifecycle
+-(void) viewDidLoad {
+	[super viewDidLoad];
+    self.musicSwitch = [[UISwitch alloc] init];
+	self.soundSwitch = [[UISwitch alloc] init];
+	self.altDamageSwitch = [[UISwitch alloc] init];
+	[self.soundSwitch addTarget:self action:@selector(alsoTurnOffMusic:) forControlEvents:UIControlEventValueChanged];
+	[self.musicSwitch addTarget:self action:@selector(dontTurnOnMusic:) forControlEvents:UIControlEventValueChanged];
+	[self.altDamageSwitch addTarget:self action:@selector(justUpdateDictionary:) forControlEvents:UIControlEventValueChanged];
+    
+    NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:SETTINGS_FILE()];
+    self.settingsDictionary = dictionary;
+    [dictionary release];
+}
+
+-(void) viewWillAppear:(BOOL)animated {
+    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
+    isWriteNeeded = NO;
+    
+    musicSwitch.on = [[settingsDictionary objectForKey:@"music"] boolValue];
+    soundSwitch.on = [[settingsDictionary objectForKey:@"sound"] boolValue];
+    altDamageSwitch.on = [[settingsDictionary objectForKey:@"alternate"] boolValue];
+    
+    [super viewWillAppear:animated];
+}
+
+-(void) viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    
+    if (isWriteNeeded) {
+       	NSLog(@"writing preferences to file");
+        [self.settingsDictionary writeToFile:SETTINGS_FILE() atomically:YES];
+        isWriteNeeded = NO;
+    }
+}
+
+#pragma mark -
+// if the sound system is off, turn off also the background music 
+-(void) alsoTurnOffMusic:(id) sender {
+    [self.settingsDictionary setObject:[NSNumber numberWithBool:soundSwitch.on] forKey:@"sound"];
+	if (YES == self.musicSwitch.on) {
+		[musicSwitch setOn:NO animated:YES];
+        [self.settingsDictionary setObject:[NSNumber numberWithBool:musicSwitch.on] forKey:@"music"];
+	}
+    isWriteNeeded = YES;
+}
+
+// if the sound system is off, don't enable background music 
+-(void) dontTurnOnMusic:(id) sender {
+	if (NO == self.soundSwitch.on) {
+		[musicSwitch setOn:NO animated:YES];
+	} else {
+        [self.settingsDictionary setObject:[NSNumber numberWithBool:musicSwitch.on] forKey:@"music"];
+        isWriteNeeded = YES;
+    }
+}
+
+-(void) justUpdateDictionary:(id) sender {
+    UISwitch *theSwitch = (UISwitch *)sender;
+    [self.settingsDictionary setObject:[NSNumber numberWithBool:theSwitch.on] forKey:@"alternate"];
+    isWriteNeeded = YES;
+}
+
+/*
+#pragma mark -
+#pragma mark UIActionSheet Methods
+-(IBAction) deleteData: (id)sender {
+	UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
+								 delegate:self
+							cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
+						   destructiveButtonTitle:NSLocalizedString(@"As sure as I can be!", @"")
+							otherButtonTitles:nil];
+	[actionSheet showInView:self.view];
+	[actionSheet release];
+}
+
+-(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
+	if ([actionSheet cancelButtonIndex] != buttonIndex) {
+		// get the documents dirctory
+		NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+		NSString *documentsDirectory = [paths objectAtIndex:0];
+		
+		// get the content of the directory
+		NSFileManager *fm = [NSFileManager defaultManager];
+		NSArray *dirContent = [fm directoryContentsAtPath:documentsDirectory];
+		NSError *error;
+		
+		// delete data
+		for (NSString *fileName in dirContent) {
+			[fm removeItemAtPath:[documentsDirectory stringByAppendingPathComponent:fileName] error:&error];
+		}
+		
+		// force resetting
+		UIAlertView *anAlert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Hit Home Button to Exit", @"")
+								  message:NSLocalizedString(@"\nEverything is gone!\nNow you need to restart the game...", @"")
+								 delegate:self
+							cancelButtonTitle:nil
+							otherButtonTitles:nil];
+		[anAlert show];
+		[anAlert release];
+	}
+}
+*/
+
+#pragma mark -
+#pragma mark TableView Methods
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+	return 3;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+	switch (section) {
+		case kNetworkFields:
+			return 2;
+			break;
+		case kAudioFields:
+			return 2;
+			break;
+		case kOtherFields:
+			return 1;
+			break;
+		default:
+			break;
+	}
+	return 0;
+}
+
+-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+	static NSString *cellIdentifier = @"systemSettingsCell";
+	NSInteger row = [indexPath row];
+    NSInteger section = [indexPath section];
+    
+	UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:cellIdentifier];
+    if (nil == cell) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier] autorelease];
+        if (section == kNetworkFields) {
+            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(-15, 10, 100, 25)];
+            label.textAlignment = UITextAlignmentRight;
+            label.backgroundColor = [UIColor clearColor];
+            label.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
+            if (row == 0) 
+                label.text = NSLocalizedString(@"Nickname","from the settings table");
+            else 
+                label.text = NSLocalizedString(@"Password","from the settings table");
+            [cell.contentView addSubview:label];
+            [label release];
+            
+            UITextField *aTextField = [[UITextField alloc] initWithFrame:
+                                       CGRectMake(110, 12, (cell.frame.size.width + cell.frame.size.width/3) - 90, 25)];
+            aTextField.clearsOnBeginEditing = NO;
+            aTextField.returnKeyType = UIReturnKeyDone;
+            aTextField.adjustsFontSizeToFitWidth = YES;
+            aTextField.delegate = self;
+            aTextField.tag = row;
+            aTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
+            [aTextField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
+            [cell.contentView addSubview:aTextField];
+            [aTextField release];
+        }
+    }
+    
+    cell.accessoryType = UITableViewCellAccessoryNone;
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    cell.imageView.image = nil;
+    
+    UITextField *aTextField;
+    switch (section) {
+        case kNetworkFields:
+            for (UIView *oneView in cell.contentView.subviews) 
+                if ([oneView isMemberOfClass:[UITextField class]]) 
+                    aTextField = (UITextField *)oneView;
+
+            switch (row) {
+				case 0:                    
+                    aTextField.placeholder = NSLocalizedString(@"Insert your username (if you have one)",@"");
+                    aTextField.text = [self.settingsDictionary objectForKey:@"username"];
+					break;
+				case 1:                    
+                    aTextField.placeholder = NSLocalizedString(@"Insert your password",@"");
+                    aTextField.text = [self.settingsDictionary objectForKey:@"password"];
+                    aTextField.secureTextEntry = YES;
+					break;
+				default:
+					break;
+			}
+			break;
+            
+		case kAudioFields:
+			switch (row) {
+				case 0:
+					cell.textLabel.text = NSLocalizedString(@"Sound", @"");
+					cell.accessoryView = soundSwitch;
+					break;
+				case 1:
+					cell.textLabel.text = NSLocalizedString(@"Music", @"");
+					cell.accessoryView = musicSwitch;
+					break;
+				default:
+					break;
+			}
+			break;
+            
+		case kOtherFields:
+            cell.selectionStyle = UITableViewCellSelectionStyleNone;
+			cell.textLabel.text = NSLocalizedString(@"Alternate Damage", @"");
+			cell.accessoryView = altDamageSwitch;
+			break;
+		default:
+			break;
+	}
+	return cell;
+}
+
+-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
+    NSString *sectionTitle = nil;
+    switch (section) {
+		case kNetworkFields:
+			sectionTitle = NSLocalizedString(@"Network Configuration", @"");
+			break;
+		case kAudioFields:
+			sectionTitle = NSLocalizedString(@"Audio Preferences", @"");
+			break;
+		case kOtherFields:
+			sectionTitle = NSLocalizedString(@"Other Settings", @"");
+			break;
+		default:
+			NSLog(@"Nope");
+			break;
+	}
+    return sectionTitle;
+}
+
+/*
+-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
+	UIView *containerView =	[[[UIView alloc] initWithFrame:CGRectMake(0, 0, 300, 50)] autorelease];
+	UILabel *headerLabel = [[[UILabel alloc] initWithFrame:CGRectMake(10, 20, 300, 40)] autorelease];
+	headerLabel.textColor = [UIColor lightGrayColor];
+	headerLabel.shadowColor = [UIColor blackColor];
+	headerLabel.shadowOffset = CGSizeMake(0, 1);
+	headerLabel.font = [UIFont boldSystemFontOfSize:20];
+	headerLabel.backgroundColor = [UIColor clearColor];
+
+	switch (section) {
+		case kNetworkFields:
+			headerLabel.text = NSLocalizedString(@"Network Configuration", @"");
+			break;
+		case kAudioFields:
+			headerLabel.text = NSLocalizedString(@"Audio Preferences", @"");
+			break;
+		case kOtherFields:
+			headerLabel.text = NSLocalizedString(@"Other Settings", @"");
+			break;
+		default:
+			NSLog(@"Warning: unset case value in titleForHeaderInSection!");
+			headerLabel.text = @"!";
+			break;
+	}
+	
+	[containerView addSubview:headerLabel];
+	return containerView;
+}
+
+-(CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+	if (kAudioFields == [indexPath section] && 2 == [indexPath row])
+		return volumeCell.frame.size.height;
+	else
+		return table.rowHeight;
+}
+
+-(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+	return 57.0;
+}
+*/
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    UITableViewCell *cell;
+    if (kNetworkFields == [indexPath section]) {
+        cell = [aTableView cellForRowAtIndexPath:indexPath];
+        for (UIView *oneView in cell.contentView.subviews) {
+            if ([oneView isMemberOfClass:[UITextField class]]) {
+                textFieldBeingEdited = (UITextField *)oneView;
+                [textFieldBeingEdited becomeFirstResponder];
+            }
+        }
+        [aTableView deselectRowAtIndexPath:indexPath animated:NO];
+    }
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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 {
+    self.settingsDictionary = nil;
+	self.textFieldBeingEdited = nil;
+	self.musicSwitch = nil;
+	self.soundSwitch = nil;
+	self.altDamageSwitch = nil;
+	[super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [settingsDictionary release];
+	[textFieldBeingEdited release];
+	[musicSwitch release];
+	[soundSwitch release];
+	[altDamageSwitch release];
+	[super dealloc];
+}
+
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/GravesViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,23 @@
+//
+//  GravesViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface GravesViewController : UITableViewController {
+    NSMutableDictionary *teamDictionary;
+    
+    NSArray *graveArray;
+    NSIndexPath *lastIndexPath;
+}
+
+@property (nonatomic,retain) NSMutableDictionary *teamDictionary;
+@property (nonatomic,retain) NSArray *graveArray;
+@property (nonatomic,retain) NSIndexPath *lastIndexPath;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/GravesViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,127 @@
+//
+//  GravesViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "GravesViewController.h"
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+
+@implementation GravesViewController
+@synthesize teamDictionary, graveArray, lastIndexPath;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+
+    // load all the grave names and store them into graveArray
+    self.graveArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:GRAVES_DIRECTORY() error:NULL];
+}
+
+-(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];
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self.graveArray count];
+}
+
+// Customize the appearance of table view cells.
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil)
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    
+    NSString *grave = [self.graveArray objectAtIndex:[indexPath row]];
+    cell.textLabel.text = [grave stringByDeletingPathExtension];
+    
+    if ([grave isEqualToString:[self.teamDictionary objectForKey:@"grave"]]) {
+        cell.accessoryType = UITableViewCellAccessoryCheckmark;
+        self.lastIndexPath = indexPath;
+    } 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];
+    
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    
+    if (newRow != oldRow) {
+        [teamDictionary setObject:[[graveArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"grave"];
+        
+        // tell our boss to write this new stuff on disk
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
+        
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
+        self.lastIndexPath = indexPath;
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    }
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+- (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 {
+    self.lastIndexPath = nil;
+    self.teamDictionary = nil;
+    self.graveArray = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+- (void)dealloc {
+    [graveArray release];
+    [teamDictionary release];
+    [lastIndexPath release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/HogHatViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,27 @@
+//
+//  HogHatViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface HogHatViewController : UITableViewController {
+    NSDictionary *teamDictionary;
+    NSInteger selectedHog;
+    
+    NSArray *hatArray;
+    UIImage *normalHogSprite;
+    NSIndexPath *lastIndexPath;
+}
+
+@property (nonatomic,retain) NSDictionary *teamDictionary;
+@property (nonatomic) NSInteger selectedHog;
+@property (nonatomic,retain) NSArray *hatArray;
+@property (nonatomic,retain) UIImage *normalHogSprite;
+@property (nonatomic,retain) NSIndexPath *lastIndexPath;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/HogHatViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,149 @@
+//
+//  HogHatViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "HogHatViewController.h"
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+
+@implementation HogHatViewController
+@synthesize teamDictionary, hatArray, normalHogSprite, lastIndexPath, selectedHog;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+    // load all the hat file names and store them into hatArray
+    NSString *hatsDirectory = HATS_DIRECTORY();
+    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 *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
+    [normalHogFile release];
+    self.normalHogSprite = hogSprite;
+    [hogSprite release];
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    self.title = [[[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog] objectForKey:@"hogname"];
+
+    // this updates the hog name and its hat
+    [self.tableView reloadData];
+    // this moves the tableview to the top
+    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self.hatArray count];
+}
+
+// Customize the appearance of table view cells.
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    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 *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;
+    } else {
+        cell.accessoryType = UITableViewCellAccessoryNone;
+    }
+
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+- (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    
+    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
+        NSDictionary *oldHog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:selectedHog];
+        
+        NSMutableDictionary *newHog = [[NSMutableDictionary alloc] initWithDictionary: oldHog];
+        [newHog setObject:[[hatArray objectAtIndex:newRow] stringByDeletingPathExtension] forKey:@"hat"];
+        [[teamDictionary objectForKey:@"hedgehogs"] replaceObjectAtIndex:selectedHog withObject:newHog];
+        [newHog release];
+        
+        // tell our boss to write this new stuff on disk
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
+        
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
+        self.lastIndexPath = indexPath;
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    } 
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+- (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 {
+    self.lastIndexPath = nil;
+    self.normalHogSprite = nil;
+    self.teamDictionary = nil;
+    self.hatArray = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+- (void)dealloc {
+    [hatArray release];
+    [teamDictionary release];
+    [normalHogSprite release];
+    [lastIndexPath release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/LevelViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,25 @@
+//
+//  LevelViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface LevelViewController : UITableViewController {
+    NSDictionary *teamDictionary;
+    
+    NSArray *levelArray;
+    NSArray *levelSprites;
+    NSIndexPath *lastIndexPath;
+}
+
+@property (nonatomic,retain) NSDictionary *teamDictionary;
+@property (nonatomic,retain) NSArray *levelArray;
+@property (nonatomic,retain) NSArray *levelSprites;
+@property (nonatomic,retain) NSIndexPath *lastIndexPath;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/LevelViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,177 @@
+//
+//  LevelViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "LevelViewController.h"
+#import "CommodityFunctions.h"
+
+
+@implementation LevelViewController
+@synthesize teamDictionary, levelArray, levelSprites, lastIndexPath;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+    NSArray *array = [[NSArray alloc] initWithObjects:
+                      NSLocalizedString(@"Human",@""),
+                      NSLocalizedString(@"Brutal",@""),
+                      NSLocalizedString(@"Aggressive",@""),
+                      NSLocalizedString(@"Bully",@""),
+                      NSLocalizedString(@"Average",@""),
+                      NSLocalizedString(@"Weaky",@""),
+                      nil];
+    self.levelArray = array;
+    [array 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];
+}
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self.levelArray count];
+}
+
+// Customize the appearance of table view cells.
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier = @"Cell";
+    
+    NSInteger row = [indexPath row];
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    cell.textLabel.text = [levelArray objectAtIndex:row];
+    NSDictionary *hog = [[self.teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:0];
+    if ([[hog objectForKey:@"level"] intValue] == row) {
+        cell.accessoryType = UITableViewCellAccessoryCheckmark;
+        self.lastIndexPath = indexPath;
+    } else {
+        cell.accessoryType = UITableViewCellAccessoryNone;
+    }
+    
+    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;
+}
+
+
+/*
+// 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 {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    
+    if (newRow != oldRow) {
+        NSMutableArray *hogs = [teamDictionary objectForKey:@"hedgehogs"];
+        
+        for (NSMutableDictionary *hog in hogs) {
+            [hog setObject:[NSNumber numberWithInt:newRow] forKey:@"level"];
+        }
+        
+        // tell our boss to write this new stuff on disk
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
+        [self.tableView reloadData];
+        
+        self.lastIndexPath = indexPath;
+        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    }
+    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
+    [self.navigationController popViewControllerAnimated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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 {
+    self.lastIndexPath = nil;
+    self.teamDictionary = nil;
+    self.levelArray = nil;
+    self.levelSprites = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [levelArray release];
+    [levelSprites release];
+    [teamDictionary release];
+    [lastIndexPath release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,23 @@
+//
+//  MainMenuViewController.h
+//  hwengine
+//
+//  Created by Vittorio on 08/01/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class SplitViewRootController;
+@class GameConfigViewController;
+
+@interface MainMenuViewController : UIViewController {
+    UILabel *versionLabel;
+    SplitViewRootController *settingsViewController;
+    GameConfigViewController *gameConfigViewController;
+}
+
+@property (nonatomic,retain) IBOutlet UILabel *versionLabel;
+
+-(IBAction) switchViews:(id)sender;
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/MainMenuViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,177 @@
+//
+//  MainMenuViewController.m
+//  hwengine
+//
+//  Created by Vittorio on 08/01/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "MainMenuViewController.h"
+#import "SDL_uikitappdelegate.h"
+#import "PascalImports.h"
+#import "GameConfigViewController.h"
+#import "SplitViewRootController.h"
+#import "CommodityFunctions.h"
+
+@implementation MainMenuViewController
+@synthesize versionLabel;
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+- (void)didReceiveMemoryWarning {
+	// Releases the view if it doesn't have a superview.
+	[super didReceiveMemoryWarning];
+    if (settingsViewController.view.superview == nil) 
+        settingsViewController = nil;
+    if (gameConfigViewController.view.superview == nil) 
+        gameConfigViewController = nil;
+    MSG_MEMCLEAN();
+}
+
+-(void) viewDidLoad {
+    char *ver;
+    HW_versionInfo(NULL, &ver);
+    NSString *versionNumber = [[NSString alloc] initWithCString:ver];
+    self.versionLabel.text = versionNumber;
+    [versionNumber release];
+
+    // listen to request to remove the modalviewcontroller
+    [[NSNotificationCenter defaultCenter] addObserver:self
+                                             selector:@selector(dismissModalViewController)
+                                                 name: @"dismissModalView" 
+                                               object:nil];
+    
+    // initialize some files the first time we load the game
+	if (!([[NSFileManager defaultManager] fileExistsAtPath:SETTINGS_FILE()])) 
+        [NSThread detachNewThreadSelector:@selector(checkFirstRun) toTarget:self withObject:nil];
+    
+	[super viewDidLoad];
+}
+
+// this is called to verify whether it's the first time the app is launched
+// if it is it blocks user interaction with an alertView until files are created
+-(void) checkFirstRun {
+	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    NSLog(@"First time run, creating settings files at %@", SETTINGS_FILE());
+    
+    // show a popup with an indicator to make the user wait
+    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Please wait",@"")
+                                                    message:nil
+                                                   delegate:nil
+                                          cancelButtonTitle:nil
+                                          otherButtonTitles:nil];
+    [alert show];
+    
+    UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] 
+                                          initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
+    indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 50);
+    [indicator startAnimating];
+    [alert addSubview:indicator];
+    [indicator release];
+    
+    // create a team
+    createTeamNamed(@"Pirates");
+    createTeamNamed(@"Ninjas");
+    
+    createSchemeNamed(@"Default");
+    
+    // create settings.plist
+    NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
+
+    [saveDict setObject:@"" forKey:@"username"];
+    [saveDict setObject:@"" forKey:@"password"];
+    [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"music"];
+    [saveDict setObject:[NSNumber numberWithBool:YES] forKey:@"sound"];
+    [saveDict setObject:[NSNumber numberWithBool:NO] forKey:@"alternate"];
+
+    [saveDict writeToFile:SETTINGS_FILE() atomically:YES];
+    [saveDict release];    
+    
+    // ok let the user take control
+    [alert dismissWithClickedButtonIndex:0 animated:YES];
+    [alert release];
+
+	[pool release];
+	[NSThread exit];
+}
+
+#pragma mark -
+-(IBAction) switchViews:(id) sender {
+    UIButton *button = (UIButton *)sender;
+    UIAlertView *alert;
+    NSString *debugStr, *configNibName;
+
+    switch (button.tag) {
+        case 0:
+            // bug in UIModalTransitionStylePartialCurl, displays the controller awkwardly if it is not allocated every time
+            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+                configNibName = @"GameConfigViewController-iPad";
+            else
+                configNibName = @"GameConfigViewController-iPhone";
+            
+            gameConfigViewController = [[GameConfigViewController alloc] initWithNibName:configNibName bundle:nil];        
+#ifdef __IPHONE_3_2
+            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+                gameConfigViewController.modalTransitionStyle = UIModalTransitionStylePartialCurl;
+#endif
+            [self presentModalViewController:gameConfigViewController animated:YES];
+            break;
+        case 2:
+            if (nil == settingsViewController) {
+                settingsViewController = [[SplitViewRootController alloc] initWithNibName:nil bundle:nil];
+                settingsViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
+            }
+            
+            [self presentModalViewController:settingsViewController animated:YES];
+            break;
+        case 3:
+            debugStr = [[NSString alloc] initWithContentsOfFile:DEBUG_FILE()];
+            UITextView *scroll = [[UITextView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)];
+            scroll.text = debugStr;
+            [debugStr release];
+            scroll.editable = NO;
+            
+            UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
+            [btn addTarget:scroll action:@selector(removeFromSuperview) forControlEvents:UIControlEventTouchUpInside];
+            btn.backgroundColor = [UIColor blackColor];
+            btn.frame = CGRectMake(self.view.frame.size.height-70, 0, 70, 70);
+            [scroll addSubview:btn];
+            [self.view addSubview:scroll];
+            [scroll release];
+            break;
+        default:
+            alert = [[UIAlertView alloc] initWithTitle:@"Not Yet Implemented"
+                                               message:@"Sorry, this feature is not yet implemented"
+                                              delegate:nil
+                                     cancelButtonTitle:@"Well, don't worry"
+                                     otherButtonTitles:nil];
+            [alert show];
+            [alert release];
+            break;
+    }
+}
+
+// allows child controllers to return to the main controller
+-(void) dismissModalViewController {
+    [self dismissModalViewControllerAnimated:YES];
+}
+
+
+-(void) viewDidUnload {
+    self.versionLabel = nil;
+    gameConfigViewController = nil;
+    settingsViewController = nil;
+	[super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [versionLabel release];
+    [settingsViewController release];
+    [gameConfigViewController release];
+	[super dealloc];
+}
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,70 @@
+//
+//  MapConfigViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 22/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "SDL_net.h"
+
+@interface MapConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
+    TCPsocket sd, csd;
+    NSInteger oldValue;  //slider
+    NSInteger oldPage;   //segmented control
+    BOOL busy;
+    
+    // objects read (mostly) by parent view
+    NSInteger maxHogs;
+    NSString *seedCommand;
+    NSString *templateFilterCommand;
+    NSString *mapGenCommand;
+    NSString *mazeSizeCommand;
+    NSString *themeCommand;
+   
+    // various widgets in the view
+    UIButton *previewButton;
+    UITableView *tableView;
+    UILabel *maxLabel;
+    UILabel *sizeLabel;
+    UISegmentedControl *segmentedControl;
+    UISlider *slider;
+    
+    // internal objects
+    NSIndexPath *lastIndexPath;
+    NSArray *themeArray;
+    NSArray *mapArray;
+}
+
+@property (nonatomic) NSInteger maxHogs;
+@property (nonatomic) BOOL busy;
+@property (nonatomic,retain) NSString *seedCommand;
+@property (nonatomic,retain) NSString *templateFilterCommand;
+@property (nonatomic,retain) NSString *mapGenCommand;
+@property (nonatomic,retain) NSString *mazeSizeCommand;
+@property (nonatomic,retain) NSString *themeCommand;
+
+@property (nonatomic,retain) IBOutlet UIButton *previewButton;
+@property (nonatomic,retain) IBOutlet UITableView *tableView;
+@property (nonatomic,retain) IBOutlet UILabel *maxLabel;
+@property (nonatomic,retain) IBOutlet UILabel *sizeLabel;
+@property (nonatomic,retain) IBOutlet UISegmentedControl *segmentedControl;
+@property (nonatomic,retain) IBOutlet UISlider *slider;
+
+@property (nonatomic,retain) NSIndexPath *lastIndexPath;
+@property (nonatomic,retain) NSArray *themeArray;
+@property (nonatomic,retain) NSArray *mapArray;
+
+-(IBAction) updatePreview;
+-(IBAction) sliderChanged:(id) sender;
+-(IBAction) sliderEndedChanging:(id) sender;
+-(IBAction) segmentedControlChanged:(id) sender;
+-(void) turnOnWidgets;
+-(void) turnOffWidgets;
+-(void) setLabelText:(NSString *)str;
+-(void) setButtonImage:(UIImage *)img;
+
+-(const uint8_t *)engineProtocol:(NSInteger) port;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,565 @@
+//
+//  MapConfigViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 22/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "MapConfigViewController.h"
+#import "PascalImports.h"
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+#import "SDL_net.h"
+#import <pthread.h>
+
+#define INDICATOR_TAG 7654
+
+@implementation MapConfigViewController
+@synthesize previewButton, maxHogs, seedCommand, templateFilterCommand, mapGenCommand, mazeSizeCommand, themeCommand,
+            tableView, maxLabel, sizeLabel, segmentedControl, slider, lastIndexPath, themeArray, mapArray, busy;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+    return rotationManager(interfaceOrientation);
+}
+
+#pragma mark -
+#pragma mark Preview Handling
+-(int) sendToEngine: (NSString *)string {
+	unsigned char length = [string length];
+	
+	SDLNet_TCP_Send(csd, &length , 1);
+	return SDLNet_TCP_Send(csd, [string UTF8String], length);
+}
+
+-(const uint8_t *)engineProtocol:(NSInteger) port {
+	IPaddress ip;
+	BOOL serverQuit = NO;
+    static uint8_t map[128*32];
+    
+	if (SDLNet_Init() < 0) {
+		NSLog(@"SDLNet_Init: %s", SDLNet_GetError());
+        serverQuit = YES;
+	}
+	
+	// Resolving the host using NULL make network interface to listen
+	if (SDLNet_ResolveHost(&ip, NULL, port) < 0) {
+		NSLog(@"SDLNet_ResolveHost: %s\n", SDLNet_GetError());
+        serverQuit = YES;
+	}
+	
+	// Open a connection with the IP provided (listen on the host's port)
+	if (!(sd = SDLNet_TCP_Open(&ip))) {
+		NSLog(@"SDLNet_TCP_Open: %s %\n", SDLNet_GetError(), port);
+        serverQuit = YES;
+	}
+	
+    // launch the preview here so that we're sure the tcp channel is open
+    pthread_t thread_id;
+    pthread_create(&thread_id, NULL, (void *)GenLandPreview, (void *)port);
+    pthread_detach(thread_id);
+    
+	DLog(@"Waiting for a client on port %d", port);
+	while (!serverQuit) {
+		/* This check the sd if there is a pending connection.
+		 * If there is one, accept that, and open a new socket for communicating */
+		csd = SDLNet_TCP_Accept(sd);
+		if (NULL != csd) {			
+			DLog(@"Client found");
+            
+            [self sendToEngine:self.seedCommand];
+            [self sendToEngine:self.templateFilterCommand];
+            [self sendToEngine:self.mapGenCommand];
+            [self sendToEngine:self.mazeSizeCommand];
+            [self sendToEngine:@"!"];
+                
+            memset(map, 0, 128*32);
+            SDLNet_TCP_Recv(csd, map, 128*32);
+            SDLNet_TCP_Recv(csd, &maxHogs, sizeof(uint8_t));
+
+			SDLNet_TCP_Close(csd);
+			serverQuit = YES;
+		}
+	}
+	
+	SDLNet_TCP_Close(sd);
+	SDLNet_Quit();
+    return map;
+}
+
+-(void) drawingThread {
+    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    
+    // select the port for IPC and launch the preview generation through engineProtocol:
+    int port = randomPort();
+    const uint8_t *map = [self engineProtocol:port];
+    uint8_t mapExp[128*32*8];
+
+    // draw the buffer (1 pixel per component, 0= transparent 1= color)
+    int k = 0;
+    for (int i = 0; i < 32*128; i++) {
+        unsigned char byte = map[i];
+        for (int j = 0; j < 8; j++) {
+            // select the color based on the leftmost bit
+            if ((byte & 0x80) != 0)
+                mapExp[k] = 100;
+            else
+                mapExp[k] = 255;
+            // shift to next bit
+            byte <<= 1;
+            k++;
+        }
+    }
+    CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceGray();
+    CGContextRef bitmapImage = CGBitmapContextCreate(mapExp, 256, 128, 8, 256, colorspace, kCGImageAlphaNone);
+    CGColorSpaceRelease(colorspace);
+    
+    CGImageRef previewCGImage = CGBitmapContextCreateImage(bitmapImage);
+    UIImage *previewImage = [[UIImage alloc] initWithCGImage:previewCGImage];
+    CGImageRelease(previewCGImage);
+
+    // set the preview image (autoreleased) in the button and the maxhog label on the main thread to prevent a leak
+    [self performSelectorOnMainThread:@selector(setButtonImage:) withObject:[[previewImage retain] makeRoundCornersOfSize:CGSizeMake(12, 12)] waitUntilDone:NO];
+    [self performSelectorOnMainThread:@selector(setLabelText:) withObject:[NSString stringWithFormat:@"%d", maxHogs] waitUntilDone:NO];
+    
+    // restore functionality of button and remove the spinning wheel on the main thread to prevent a leak
+    [self performSelectorOnMainThread:@selector(turnOnWidgets) withObject:nil waitUntilDone:NO];
+    
+    [pool release];
+    //Invoking this method should be avoided as it does not give your thread a chance to clean up any resources it allocated during its execution.
+    //[NSThread exit];
+
+    /*
+    // http://developer.apple.com/mac/library/qa/qa2001/qa1037.html
+    UIGraphicsBeginImageContext(CGSizeMake(256,128));      
+    CGContextRef context = UIGraphicsGetCurrentContext();       
+    UIGraphicsPushContext(context);  
+
+    CGContextSetRGBFillColor(context, 0.5, 0.5, 0.7, 1.0);
+    CGContextFillRect(context,CGRectMake(xc,yc,1,1));
+    
+    UIGraphicsPopContext();
+    UIImage *previewImage = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    */
+}
+
+-(IBAction) updatePreview {
+    // don't generate a new preview while it's already generating one
+    if (busy)
+        return;
+    
+    // generate a seed
+    CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
+    NSString *seed = (NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid);
+    CFRelease(uuid);
+    NSString *seedCmd = [[NSString alloc] initWithFormat:@"eseed {%@}", seed];
+    [seed release];
+    self.seedCommand = seedCmd;
+    [seedCmd release];
+    
+    NSIndexPath *theIndex;
+    if (segmentedControl.selectedSegmentIndex != 1) {
+        // prevent other events and add an activity while the preview is beign generated
+        [self turnOffWidgets];
+        
+        // remove the current preview
+        [self.previewButton setImage:nil forState:UIControlStateNormal];
+        
+        // add a very nice spinning wheel
+        UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] 
+                                              initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
+        indicator.center = CGPointMake(previewButton.bounds.size.width / 2, previewButton.bounds.size.height / 2);
+        indicator.tag = INDICATOR_TAG;
+        [indicator startAnimating];
+        [self.previewButton addSubview:indicator];
+        [indicator release];
+        
+        // let's draw in a separate thread so the gui can work; at the end it restore other widgets
+        [NSThread detachNewThreadSelector:@selector(drawingThread) toTarget:self withObject:nil];
+    
+        theIndex = [NSIndexPath indexPathForRow:(random()%[self.themeArray count]) inSection:0];
+    } else {
+        theIndex = [NSIndexPath indexPathForRow:(random()%[self.mapArray count]) inSection:0];
+    }
+    [self.tableView reloadData];
+    [self tableView:self.tableView didSelectRowAtIndexPath:theIndex];
+    [self.tableView scrollToRowAtIndexPath:theIndex atScrollPosition:UITableViewScrollPositionNone animated:YES];
+}
+
+-(void) updatePreviewWithMap:(NSInteger) index {
+    // change the preview button
+    NSString *fileImage = [[NSString alloc] initWithFormat:@"%@/%@/preview.png", MAPS_DIRECTORY(),[self.mapArray objectAtIndex:index]];
+    UIImage *image = [[UIImage alloc] initWithContentsOfFile:fileImage];
+    [fileImage release];
+    [self.previewButton setImage:[image makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal];
+
+    // update label
+    maxHogs = 18;
+    NSString *fileCfg = [[NSString alloc] initWithFormat:@"%@/%@/map.cfg", MAPS_DIRECTORY(),[self.mapArray objectAtIndex:index]];
+    NSString *contents = [[NSString alloc] initWithContentsOfFile:fileCfg encoding:NSUTF8StringEncoding error:NULL];
+    [fileCfg release];
+    NSArray *split = [contents componentsSeparatedByString:@"\n"];
+
+    // if the number is not set we keep 18 standard; 
+    // sometimes it's not set but there are trailing characters, we get around them with the second equation
+    if ([split count] > 1 && [[split objectAtIndex:1] intValue] > 0)
+        maxHogs = [[split objectAtIndex:1] intValue];
+    [contents release];
+    NSString *max = [[NSString alloc] initWithFormat:@"%d",maxHogs];
+    self.maxLabel.text = max;
+    [max release];
+}
+
+-(void) turnOffWidgets {
+    busy = YES;
+    self.previewButton.alpha = 0.5f;
+    self.previewButton.enabled = NO;
+    self.maxLabel.text = @"...";
+    self.segmentedControl.enabled = NO;
+    self.slider.enabled = NO;
+}
+
+-(void) turnOnWidgets {
+    self.previewButton.alpha = 1.0f;
+    self.previewButton.enabled = YES;
+    self.segmentedControl.enabled = YES;
+    self.slider.enabled = YES;
+    busy = NO;
+    
+    UIActivityIndicatorView *indicator = (UIActivityIndicatorView *)[self.previewButton viewWithTag:INDICATOR_TAG];
+    if (indicator) {
+        [indicator stopAnimating];
+        [indicator removeFromSuperview];
+    }
+}
+ 
+-(void) setLabelText:(NSString *)str {
+    self.maxLabel.text = str;
+}
+
+-(void) setButtonImage:(UIImage *)img {
+    [self.previewButton setBackgroundImage:img forState:UIControlStateNormal];
+}
+
+-(void) restoreBackgroundImage {
+    // white rounded rectangle as background image for previewButton
+    UIGraphicsBeginImageContext(CGSizeMake(256,128));      
+    CGContextRef context = UIGraphicsGetCurrentContext();       
+    UIGraphicsPushContext(context);  
+
+    CGContextSetRGBFillColor(context, 1.0, 1.0, 1.0, 1.0);
+    CGContextFillRect(context,CGRectMake(0,0,256,128));
+    
+    UIGraphicsPopContext();
+    UIImage *bkgImg = UIGraphicsGetImageFromCurrentImageContext();
+    UIGraphicsEndImageContext();
+    [self.previewButton setBackgroundImage:[[bkgImg retain] makeRoundCornersOfSize:CGSizeMake(12, 12)] forState:UIControlStateNormal];
+}
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger) section {
+    if (self.segmentedControl.selectedSegmentIndex != 1)
+        return [themeArray count];
+    else
+        return [mapArray count];
+}
+
+-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier = @"Cell";
+    NSInteger row = [indexPath row];
+    
+    UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) 
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    
+    if (self.segmentedControl.selectedSegmentIndex != 1) {
+        // the % prevents a strange bug that occurs sporadically
+        NSString *themeName = [self.themeArray objectAtIndex:row % [self.themeArray count]];
+        cell.textLabel.text = themeName;
+        UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@/icon.png",THEMES_DIRECTORY(),themeName]];
+        cell.imageView.image = image;
+        [image release];
+    } else {
+        cell.textLabel.text = [self.mapArray objectAtIndex:row];
+        cell.imageView.image = nil;
+    }
+    
+    if (row == [self.lastIndexPath row]) 
+        cell.accessoryType = UITableViewCellAccessoryCheckmark;
+    else
+        cell.accessoryType = UITableViewCellAccessoryNone;
+
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    
+    if (newRow != oldRow) {
+        if (self.segmentedControl.selectedSegmentIndex != 1) {
+            NSString *theme = [self.themeArray objectAtIndex:newRow];
+            self.themeCommand =  [NSString stringWithFormat:@"etheme %@", theme];
+        } else
+            [self updatePreviewWithMap:newRow];
+
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath]; 
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:self.lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
+
+        self.lastIndexPath = indexPath;
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    }
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
+}
+
+#pragma mark -
+#pragma mark slider & segmentedControl
+// this updates the label and the command keys when the slider is moved, depending of the selection in segmentedControl
+// no methods are called by this routine and you can pass nil to it
+-(IBAction) sliderChanged:(id) sender {
+    NSString *labelText;
+    NSString *templateCommand;
+    NSString *mazeCommand;
+    
+    switch ((int)(self.slider.value*100)) {
+        case 0:
+            if (self.segmentedControl.selectedSegmentIndex == 0) {
+                labelText = NSLocalizedString(@"Wacky",@"");
+            } else {
+                labelText = NSLocalizedString(@"Large Floating Islands",@"");
+            }
+            templateCommand = @"e$template_filter 5";
+            mazeCommand = @"e$maze_size 5";
+            break;
+        case 1:
+            if (self.segmentedControl.selectedSegmentIndex == 0) {
+                labelText = NSLocalizedString(@"Cavern",@"");
+            } else {
+                labelText = NSLocalizedString(@"Medium Floating Islands",@"");
+            }
+            templateCommand = @"e$template_filter 4";
+            mazeCommand = @"e$maze_size 4";
+            break;
+        case 2:
+            if (self.segmentedControl.selectedSegmentIndex == 0) {
+                labelText = NSLocalizedString(@"Small",@"");
+            } else {
+                labelText = NSLocalizedString(@"Small Floating Islands",@"");
+            }
+            templateCommand = @"e$template_filter 1";
+            mazeCommand = @"e$maze_size 3";
+            break;
+        case 3:
+            if (self.segmentedControl.selectedSegmentIndex == 0) {
+                labelText = NSLocalizedString(@"Medium",@"");
+            } else {
+                labelText = NSLocalizedString(@"Large Tunnels",@"");
+            }
+            templateCommand = @"e$template_filter 2";
+            mazeCommand = @"e$maze_size 2";
+            break;
+        case 4:
+            if (self.segmentedControl.selectedSegmentIndex == 0) {
+                labelText = NSLocalizedString(@"Large",@"");
+            } else {
+                labelText = NSLocalizedString(@"Medium Tunnels",@"");
+            }
+            templateCommand = @"e$template_filter 3";
+            mazeCommand = @"e$maze_size 1";
+            break;
+        case 5:
+            if (self.segmentedControl.selectedSegmentIndex == 0) {
+                labelText = NSLocalizedString(@"All",@"");
+            } else {
+                labelText = NSLocalizedString(@"Small Tunnels",@"");
+            }
+            templateCommand = @"e$template_filter 0";
+            mazeCommand = @"e$maze_size 0";
+            break;
+        default:
+            labelText = nil;
+            templateCommand = nil;
+            mazeCommand = nil;
+            break;
+    }
+    
+    self.sizeLabel.text = labelText;
+    self.templateFilterCommand = templateCommand;
+    self.mazeSizeCommand = mazeCommand;
+}
+
+// update preview (if not busy and if its value really changed) as soon as the user lifts its finger up
+-(IBAction) sliderEndedChanging:(id) sender {
+    int num = (int) (self.slider.value * 100);
+    if (oldValue != num) {
+        [self updatePreview];
+        oldValue = num;
+    }
+}
+
+// perform actions based on the activated section, then call updatePreview to visually update the selection 
+// updatePreview will call didSelectRowAtIndexPath which will call the right update routine)
+// and if necessary update the table with a slide animation
+-(IBAction) segmentedControlChanged:(id) sender {
+    NSString *mapgen;
+    NSInteger newPage = self.segmentedControl.selectedSegmentIndex;
+    
+    switch (newPage) {
+        case 0: // Random
+            mapgen = @"e$mapgen 0";
+            [self sliderChanged:nil];
+            self.slider.enabled = YES;
+            break;
+            
+        case 1: // Map
+            mapgen = @"e$mapgen 0";
+            self.slider.enabled = NO;
+            self.sizeLabel.text = @".";
+            [self restoreBackgroundImage];
+            break;
+            
+        case 2: // Maze
+            mapgen = @"e$mapgen 1";
+            [self sliderChanged:nil];
+            self.slider.enabled = YES;
+            break;
+        
+        default:
+            mapgen = nil;
+            break;
+    }
+    self.mapGenCommand = mapgen;
+    [self updatePreview];
+    
+    // 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;
+}
+
+// update data when table is not visible and then show it
+-(void) moveTable {
+    [self.tableView reloadData];
+    
+    [UIView beginAnimations:@"moving in table" context:NULL];
+    self.tableView.frame = CGRectMake(295, 0, 185, 276);
+    [UIView commitAnimations];
+}
+
+#pragma mark -
+#pragma mark view management
+-(void) viewDidLoad {
+    [super viewDidLoad];
+    
+    srandom(time(NULL));
+    
+    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
+    self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
+
+    // themes.cfg contains all the user-selectable themes
+    NSString *string = [[NSString alloc] initWithContentsOfFile:[THEMES_DIRECTORY() stringByAppendingString:@"/themes.cfg"]
+                                                       encoding:NSUTF8StringEncoding 
+                                                          error:NULL];
+    NSMutableArray *array = [[NSMutableArray alloc] initWithArray:[string componentsSeparatedByString:@"\n"]];
+    [string release];
+    // remove a trailing "" element
+    [array removeLastObject];
+    self.themeArray = array;
+    [array release];
+    self.mapArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:MAPS_DIRECTORY() error:NULL];
+
+    self.tableView.rowHeight = 42;
+    busy = NO;
+    
+    // draw a white background
+    [self restoreBackgroundImage];
+    
+    // initialize some "default" values
+    self.sizeLabel.text = NSLocalizedString(@"All",@"");
+    self.slider.value = 0.05f;
+    self.segmentedControl.selectedSegmentIndex = 0;
+
+    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;
+}
+
+-(void) viewDidAppear:(BOOL) animated {
+    [super viewDidAppear:animated];
+    [self updatePreview];
+}
+
+#pragma mark -
+#pragma mark memory
+-(void) didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+}
+
+-(void) viewDidUnload {
+    self.previewButton = nil;
+    self.seedCommand = nil;
+    self.templateFilterCommand = nil;
+    self.mapGenCommand = nil;
+    self.mazeSizeCommand = nil;
+    self.themeCommand = nil;
+    
+    self.previewButton = nil;
+    self.tableView = nil;
+    self.maxLabel = nil;
+    self.sizeLabel = nil;
+    self.segmentedControl = nil;
+    self.slider = nil;
+    
+    self.lastIndexPath = nil;
+    self.themeArray = nil;
+    self.mapArray = nil;
+    
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [seedCommand release];
+    [templateFilterCommand release];
+    [mapGenCommand release];
+    [mazeSizeCommand release];
+    [themeCommand release];
+    
+    [previewButton release];
+    [tableView release];
+    [maxLabel release];
+    [sizeLabel release];
+    [segmentedControl release];
+    [slider release];
+    
+    [lastIndexPath release];
+    [themeArray release];
+    [mapArray release];
+    
+    [super dealloc];
+}
+
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/MasterViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,34 @@
+//
+//  MasterViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 27/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@class DetailViewController;
+@class GeneralSettingsViewController;
+@class TeamSettingsViewController;
+@class WeaponSettingsViewController;
+@class SchemeSettingsViewController;
+
+@interface MasterViewController : UITableViewController {
+    DetailViewController *detailViewController;
+    NSArray *controllerNames;
+    NSIndexPath *lastIndexPath;
+    GeneralSettingsViewController *generalSettingsViewController;
+    TeamSettingsViewController *teamSettingsViewController;
+    WeaponSettingsViewController *weaponSettingsViewController;
+    SchemeSettingsViewController *schemeSettingsViewController;
+}
+
+@property (nonatomic, retain) DetailViewController *detailViewController;
+@property (nonatomic, retain) NSArray *controllerNames;
+@property (nonatomic, retain) NSIndexPath *lastIndexPath;
+
+-(IBAction) dismissSplitView;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/MasterViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,155 @@
+//
+//  MasterViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 27/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "MasterViewController.h"
+#import "DetailViewController.h"
+#import "GeneralSettingsViewController.h"
+#import "TeamSettingsViewController.h"
+#import "WeaponSettingsViewController.h"
+#import "SchemeSettingsViewController.h"
+#import "CommodityFunctions.h"
+
+@implementation MasterViewController
+@synthesize detailViewController, controllerNames, lastIndexPath;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+    
+    // the list of selectable controllers
+    controllerNames = [[NSArray alloc] initWithObjects:NSLocalizedString(@"General",@""),
+                                                       NSLocalizedString(@"Teams",@""),
+                                                       NSLocalizedString(@"Weapons",@""),
+                                                       NSLocalizedString(@"Schemes",@""),
+                                                       nil];
+    // the "Done" button on top left
+    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
+                                                                                          target:self
+                                                                                          action:@selector(dismissSplitView)];
+}
+
+#pragma mark -
+#pragma mark Table view data source
+
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [controllerNames count];
+}
+
+// Customize the appearance of table view cells.
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+        cell.textLabel.text = [controllerNames objectAtIndex:[indexPath row]];
+    }
+    
+    return cell;
+}
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    UIViewController *nextController = nil;
+    
+    if (newRow != oldRow) {
+        [self.tableView deselectRowAtIndexPath:lastIndexPath animated:YES];
+        [detailViewController.navigationController popToRootViewControllerAnimated:NO];
+        
+        switch (newRow) {
+            case 0:
+                if (nil == generalSettingsViewController)
+                    generalSettingsViewController = [[GeneralSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                nextController = generalSettingsViewController;
+                break;
+            case 1:
+                if (nil == teamSettingsViewController)
+                    teamSettingsViewController = [[TeamSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                nextController = teamSettingsViewController;
+                break;
+            case 2:
+                if (nil == weaponSettingsViewController)
+                    weaponSettingsViewController = [[WeaponSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                nextController = weaponSettingsViewController;
+                break;
+            case 3:
+                if (nil == schemeSettingsViewController)
+                    schemeSettingsViewController = [[SchemeSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                nextController = schemeSettingsViewController;
+                break;
+        }
+        
+        nextController.navigationItem.hidesBackButton = YES;
+        nextController.title = [controllerNames objectAtIndex:newRow];
+        [detailViewController.navigationController pushViewController:nextController animated:NO];
+        self.lastIndexPath = indexPath;
+        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    }
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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.    
+    if (generalSettingsViewController.view.superview == nil)
+        generalSettingsViewController = nil;
+    if (teamSettingsViewController.view.superview == nil)
+        teamSettingsViewController = nil;
+    if (weaponSettingsViewController.view.superview == nil)
+        weaponSettingsViewController = nil;
+    if (schemeSettingsViewController.view.superview == nil)
+        schemeSettingsViewController = nil;
+    MSG_MEMCLEAN();
+}
+
+-(void) viewDidUnload {
+    self.detailViewController = nil;
+    self.controllerNames = nil;
+    self.lastIndexPath = nil;
+    generalSettingsViewController = nil;
+    teamSettingsViewController = nil;
+    weaponSettingsViewController = nil;
+    schemeSettingsViewController = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [controllerNames release];
+    [detailViewController release];
+    [lastIndexPath release];
+    [generalSettingsViewController release];
+    [teamSettingsViewController release];
+    [weaponSettingsViewController release];
+    [schemeSettingsViewController release];
+    [super dealloc];
+}
+
+-(IBAction) dismissSplitView {
+    [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissModalView" object:nil];
+}
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,48 @@
+//
+//  overlayViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 16/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class PopoverMenuViewController;
+
+@interface OverlayViewController : UIViewController {
+    NSTimer *dimTimer;
+#if __IPHONE_3_2
+    UIPopoverController *popoverController;
+#else
+    id popoverController;
+#endif
+    PopoverMenuViewController *popupMenu;
+    BOOL isPopoverVisible;
+    
+    UITextField *writeChatTextField;
+    
+    CGFloat initialDistanceForPinching;
+    CGPoint gestureStartPoint;
+}
+
+@property (nonatomic,retain) id popoverController;
+@property (nonatomic,retain) PopoverMenuViewController *popupMenu;
+@property (nonatomic,retain) UITextField *writeChatTextField;
+
+-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
+-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
+-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
+-(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event;
+
+-(IBAction) buttonReleased:(id) sender;
+-(IBAction) buttonPressed:(id) sender;
+
+-(void) showPopover;
+-(void) dismissPopover;
+-(void) dimOverlay;
+-(void) activateOverlay;
+-(void) chatAppear;
+-(void) chatDisappear;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,428 @@
+//
+//  overlayViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 16/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "OverlayViewController.h"
+#import "SDL_uikitappdelegate.h"
+#import "PascalImports.h"
+#import "CGPointUtils.h"
+#import "SDL_mouse.h"
+#import "SDL_config_iphoneos.h"
+#import "PopoverMenuViewController.h"
+#import "CommodityFunctions.h"
+
+#define HIDING_TIME_DEFAULT [NSDate dateWithTimeIntervalSinceNow:2.7]
+#define HIDING_TIME_NEVER   [NSDate dateWithTimeIntervalSinceNow:10000]
+
+
+@implementation OverlayViewController
+@synthesize popoverController, popupMenu, writeChatTextField;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+-(void) didReceiveMemoryWarning {
+	// Releases the view if it doesn't have a superview.
+    [super didReceiveMemoryWarning];
+	// Release any cached data, images, etc that aren't in use.
+    if (popupMenu.view.superview == nil) 
+        popupMenu = nil;
+}
+
+-(void) didRotate:(NSNotification *)notification {	
+    UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
+    CGRect rect = [[UIScreen mainScreen] bounds];
+    CGRect usefulRect = CGRectMake(0, 0, rect.size.width, rect.size.height);
+    UIView *sdlView = [[[UIApplication sharedApplication] keyWindow] viewWithTag:12345];
+    
+    [UIView beginAnimations:@"rotation" context:NULL];
+    [UIView setAnimationDuration:0.8f];
+    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
+	switch (orientation) {
+        case UIDeviceOrientationLandscapeLeft:
+            sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(0));
+            self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(90));
+            [self chatDisappear];
+            HW_setLandscape(YES);
+            break;
+        case UIDeviceOrientationLandscapeRight:
+            sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(180));
+            self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(-90));
+            [self chatDisappear];
+            HW_setLandscape(YES);
+            break;
+        case UIDeviceOrientationPortrait:
+            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+                sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(270));
+                self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(0));
+                [self chatAppear];
+                HW_setLandscape(NO);
+            }
+            break;
+        case UIDeviceOrientationPortraitUpsideDown:
+            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+                sdlView.transform = CGAffineTransformMakeRotation(degreesToRadian(90));
+                self.view.transform = CGAffineTransformMakeRotation(degreesToRadian(180));
+                [self chatAppear];
+                HW_setLandscape(NO);
+            }
+            break;
+        default:
+            DLog(@"Unknown rotation status");
+            break;
+    }
+    self.view.frame = usefulRect;
+    //sdlView.frame = usefulRect;
+    [UIView commitAnimations];
+}
+
+-(void) chatAppear {
+    if (writeChatTextField == nil) {
+        writeChatTextField = [[UITextField alloc] initWithFrame:CGRectMake(0, 100, 768, [UIFont systemFontSize]+8)];
+        writeChatTextField.textColor = [UIColor whiteColor];
+        writeChatTextField.backgroundColor = [UIColor blueColor];
+        writeChatTextField.autocapitalizationType = UITextAutocapitalizationTypeNone;
+        writeChatTextField.autocorrectionType = UITextAutocorrectionTypeNo;
+        writeChatTextField.enablesReturnKeyAutomatically = NO;
+        writeChatTextField.keyboardAppearance = UIKeyboardAppearanceDefault;
+        writeChatTextField.keyboardType = UIKeyboardTypeDefault;
+        writeChatTextField.returnKeyType = UIReturnKeyDefault;
+        writeChatTextField.secureTextEntry = NO;	
+        [self.view addSubview:writeChatTextField];
+    }
+    writeChatTextField.alpha = 1;
+    [self activateOverlay];
+    [dimTimer setFireDate:HIDING_TIME_NEVER];
+}
+
+-(void) chatDisappear {
+    writeChatTextField.alpha = 0;
+    [writeChatTextField resignFirstResponder];
+    [dimTimer setFireDate:HIDING_TIME_DEFAULT];
+}
+
+-(void) viewDidLoad {
+    isPopoverVisible = NO;
+    self.view.alpha = 0;
+    self.view.center = CGPointMake(self.view.frame.size.height/2.0, self.view.frame.size.width/2.0);
+    
+    
+    dimTimer = [[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:6]
+                                        interval:1000
+                                          target:self
+                                        selector:@selector(dimOverlay)
+                                        userInfo:nil
+                                         repeats:YES];
+    
+    // add timer too runloop, otherwise it doesn't work
+    [[NSRunLoop currentRunLoop] addTimer:dimTimer forMode:NSDefaultRunLoopMode];
+    
+    // listen for dismissal of the popover (see below)
+    [[NSNotificationCenter defaultCenter] addObserver:self
+                                             selector:@selector(dismissPopover)
+                                                 name:@"dismissPopover"
+                                               object:nil];
+    
+    [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];	
+    [[NSNotificationCenter defaultCenter] addObserver:self
+                                             selector:@selector(didRotate:)
+                                                 name:@"UIDeviceOrientationDidChangeNotification"
+                                               object:nil];
+
+    //self.view.transform = CGAffineTransformRotate(self.view.transform, (M_PI/2.0)); 
+	[UIView beginAnimations:@"showing overlay" context:NULL];
+	[UIView setAnimationDuration:1];
+	self.view.alpha = 1;
+	[UIView commitAnimations];
+}
+
+-(void) viewDidUnload {
+    self.writeChatTextField = nil;
+    self.popoverController = nil;
+    self.popupMenu = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+	[dimTimer invalidate];
+    [writeChatTextField release];
+    [popupMenu release];
+    [popoverController release];
+    // dimTimer is autoreleased
+    [super dealloc];
+}
+
+// dim the overlay when there's no more input for a certain amount of time
+-(IBAction) buttonReleased:(id) sender {
+	HW_allKeysUp();
+    [dimTimer setFireDate:HIDING_TIME_DEFAULT];
+}
+
+// nice transition for dimming, should be called only by the timer himself
+-(void) dimOverlay {
+    [UIView beginAnimations:@"overlay dim" context:NULL];
+   	[UIView setAnimationDuration:0.6];
+    self.view.alpha = 0.2;
+	[UIView commitAnimations];
+}
+
+// set the overlay visible and put off the timer for enough time
+-(void) activateOverlay {
+    self.view.alpha = 1;
+    [dimTimer setFireDate:HIDING_TIME_NEVER];
+}
+
+// issue certain action based on the tag of the button 
+-(IBAction) buttonPressed:(id) sender {
+    [self activateOverlay];
+    if (isPopoverVisible) {
+        [self dismissPopover];
+    }
+    UIButton *theButton = (UIButton *)sender;
+    
+    switch (theButton.tag) {
+        case 0:
+            HW_walkLeft();
+            break;
+        case 1:
+            HW_walkRight();
+            break;
+        case 2:
+            HW_aimUp();
+            break;
+        case 3:
+            HW_aimDown();
+            break;
+        case 4:
+            HW_shoot();
+            break;
+        case 5:
+            HW_jump();
+            break;
+        case 6:
+            HW_backjump();
+            break;
+        case 7:
+            HW_tab();
+            break;
+        case 10:
+            [self showPopover];
+            break;
+        default:
+            NSLog(@"Nope");
+            break;
+    }
+}
+
+// present a further check before closing game
+-(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
+	if ([actionSheet cancelButtonIndex] != buttonIndex)
+	    HW_terminate(NO);
+	else
+        HW_pause();		
+}
+
+// show up a popover containing a popupMenuViewController; we hook it with setPopoverContentSize
+// on iphone instead just use the tableViewController directly (and implement manually all animations)
+-(IBAction) showPopover{
+    isPopoverVisible = YES;
+    CGRect anchorForPopover;
+    Class popoverControllerClass = NSClassFromString(@"UIPopoverController");
+    if (popoverControllerClass) {
+#if __IPHONE_3_2
+        if (popupMenu == nil) 
+            popupMenu = [[PopoverMenuViewController alloc] initWithStyle:UITableViewStylePlain];
+        popoverController = [[popoverControllerClass alloc] initWithContentViewController:popupMenu];
+        [popoverController setPopoverContentSize:CGSizeMake(220, 170) animated:YES];
+        [popoverController setPassthroughViews:[NSArray arrayWithObject:self.view]];
+
+        if (UIDeviceOrientationIsLandscape([[UIDevice currentDevice] orientation]))
+            anchorForPopover = CGRectMake(960, 0, 220, 32);
+        else
+            anchorForPopover = CGRectMake(736, 0, 220, 32);
+        
+        [popoverController presentPopoverFromRect:anchorForPopover
+                                           inView:self.view
+                         permittedArrowDirections:UIPopoverArrowDirectionUp
+                                         animated:YES];
+#endif
+    } else {
+        if (popupMenu == nil) 
+            popupMenu = [[PopoverMenuViewController alloc] initWithStyle:UITableViewStyleGrouped];
+        popupMenu.view.backgroundColor = [UIColor clearColor];
+        popupMenu.view.frame = CGRectMake(480, 0, 200, 170);
+        [self.view addSubview:popupMenu.view];
+
+        [UIView beginAnimations:@"showing popover" context:NULL];
+        [UIView setAnimationDuration:0.35];
+        popupMenu.view.frame = CGRectMake(280, 0, 200, 170);
+        [UIView commitAnimations];
+    }
+    popupMenu.tableView.scrollEnabled = NO;
+}
+
+// on ipad just dismiss it, on iphone transtion to the right
+-(void) dismissPopover {
+    if (YES == isPopoverVisible) {
+        isPopoverVisible = NO;
+        
+        if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_3_2
+            [popoverController dismissPopoverAnimated:YES];
+#endif
+        } else {
+            [UIView beginAnimations:@"hiding popover" context:NULL];
+            [UIView setAnimationDuration:0.35];
+            popupMenu.view.frame = CGRectMake(480, 0, 200, 170);
+            [UIView commitAnimations];
+        
+            [popupMenu.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:0.35];
+            [popupMenu performSelector:@selector(release) withObject:nil afterDelay:0.35];
+        }
+        [self buttonReleased:nil];
+    }
+}
+
+-(void) textFieldDoneEditing:(id) sender{
+    [sender resignFirstResponder];
+}
+
+#pragma mark -
+#pragma mark Custom touch event handling
+
+#define kMinimumPinchDelta      50
+
+
+-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+	NSArray *twoTouches;
+	UITouch *touch = [touches anyObject];
+    
+    if (isPopoverVisible) {
+        [self dismissPopover];
+    }
+    if (writeChatTextField) {
+        [self.writeChatTextField resignFirstResponder];
+        [dimTimer setFireDate:HIDING_TIME_DEFAULT];
+    }
+    
+    gestureStartPoint = [touch locationInView:self.view];
+        
+	switch ([touches count]) {
+		case 1:
+			initialDistanceForPinching = 0;
+			switch ([touch tapCount]) {
+				case 1:
+					NSLog(@"X:%d Y:%d", (int)gestureStartPoint.x, (int)gestureStartPoint.y );
+					//SDL_WarpMouseInWindow([SDLUIKitDelegate sharedAppDelegate].window, 
+					//		      (int)gestureStartPoint.y, width - (int)gestureStartPoint.x);
+					//HW_click();
+					break;
+				case 2:
+					HW_ammoMenu();
+					break;
+				default:
+					break;
+			}
+			break;
+		case 2:
+			if (2 == [touch tapCount]) {
+				HW_zoomReset();
+			}
+			
+			// pinching
+            gestureStartPoint.x = 0;
+            gestureStartPoint.y = 0;
+			twoTouches = [touches allObjects];
+			UITouch *first = [twoTouches objectAtIndex:0];
+			UITouch *second = [twoTouches objectAtIndex:1];
+			initialDistanceForPinching = distanceBetweenPoints([first locationInView:self.view], [second locationInView:self.view]);
+			break;
+		default:
+			break;
+	}
+
+}
+
+-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
+	initialDistanceForPinching = 0;
+	HW_allKeysUp();
+}
+
+-(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
+	// this can happen if the user puts more than 5 touches on the screen at once, or perhaps in other circumstances
+	[self touchesEnded:touches withEvent:event];
+}
+
+-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
+    CGFloat minimumGestureLength;
+    int logCoeff;
+    
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
+        minimumGestureLength = 5.0f;
+        logCoeff = 19;
+    } else {
+        minimumGestureLength = 3.0f;
+        logCoeff = 3;
+    }
+    
+	NSArray *twoTouches;
+	CGPoint currentPosition;
+	UITouch *touch = [touches anyObject];
+
+	switch ([touches count]) {
+		case 1:
+			currentPosition = [touch locationInView:self.view];
+			// panning
+			CGFloat deltaX = fabsf(gestureStartPoint.x - currentPosition.x);
+			CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y);
+			
+            if (deltaX >= minimumGestureLength) {
+                NSLog(@"Horizontal swipe detected, deltaX: %f deltaY: %f",deltaX, deltaY);
+                if (currentPosition.x > gestureStartPoint.x) {
+                    HW_cursorLeft(logCoeff*log(deltaX));
+                } else {
+                    HW_cursorRight(logCoeff*log(deltaX));
+                }
+
+            } 
+            if (deltaY >= minimumGestureLength) {
+                NSLog(@"Horizontal swipe detected, deltaX: %f deltaY: %f",deltaX, deltaY);
+                if (currentPosition.y < gestureStartPoint.y) {
+                    HW_cursorDown(logCoeff*log(deltaY));
+                } else {
+                    HW_cursorUp(logCoeff*log(deltaY));
+                }            
+            }
+
+			break;
+		case 2:
+			twoTouches = [touches allObjects];
+			UITouch *first = [twoTouches objectAtIndex:0];
+			UITouch *second = [twoTouches objectAtIndex:1];
+			CGFloat currentDistanceOfPinching = distanceBetweenPoints([first locationInView:self.view], [second locationInView:self.view]);
+			
+			if (0 == initialDistanceForPinching) 
+				initialDistanceForPinching = currentDistanceOfPinching;
+
+			if (currentDistanceOfPinching < initialDistanceForPinching + kMinimumPinchDelta)
+				HW_zoomOut();
+			else if (currentDistanceOfPinching > initialDistanceForPinching + kMinimumPinchDelta)
+				HW_zoomIn();
+
+			currentDistanceOfPinching = initialDistanceForPinching;
+			break;
+		default:
+			break;
+	}
+}
+
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/PopoverMenuViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,18 @@
+//
+//  popupMenuViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 25/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface PopoverMenuViewController : UITableViewController <UIActionSheetDelegate> {
+    NSArray *menuList;
+    BOOL isPaused;
+}
+@property (nonatomic,retain) NSArray *menuList;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/PopoverMenuViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,137 @@
+    //
+//  popupMenuViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 25/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "SDL_uikitappdelegate.h"
+#import "PopoverMenuViewController.h"
+#import "PascalImports.h"
+#import "CommodityFunctions.h"
+#import "SDL_sysvideo.h"
+
+@implementation PopoverMenuViewController
+@synthesize menuList;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+-(void) didReceiveMemoryWarning {
+    // Releases the view if it doesn't have a superview.
+    [super didReceiveMemoryWarning];
+}
+
+-(void) viewDidLoad {
+    isPaused = NO;
+
+    menuList = [[NSArray alloc] initWithObjects:
+                NSLocalizedString(@"Pause Game", @""),
+                NSLocalizedString(@"Chat", @""),
+                NSLocalizedString(@"End Game", @""),
+                nil];
+    [super viewDidLoad];
+}
+
+-(void) viewDidUnload {
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [menuList release];
+    [super dealloc];
+}
+
+#pragma mark -
+#pragma mark tableView methods
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+	return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+	return 3;
+}
+
+-(UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+	static NSString *cellIdentifier = @"CellIdentifier";
+	
+	UITableViewCell *cell = [aTableView dequeueReusableCellWithIdentifier:cellIdentifier];
+    if (nil == cell) {
+		cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
+                                       reuseIdentifier:cellIdentifier] autorelease];
+	}
+    cell.textLabel.text = [menuList objectAtIndex:[indexPath row]];
+	
+	return cell;
+}
+
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    UIActionSheet *actionSheet;
+    
+    switch ([indexPath row]) {
+		case 0:
+            HW_pause();
+            isPaused = !isPaused;
+            break;
+        case 1:
+			HW_chat();
+            /*
+            SDL_VideoDevice *_this = SDL_GetVideoDevice();
+            SDL_VideoDisplay *display = &_this->displays[0];
+            SDL_Window *window = display->windows;
+            SDL_iPhoneKeyboardShow(window);
+            */
+            break;
+        case 2:
+            // expand the view (and table) so that the actionsheet can be selected on the iPhone
+            if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
+                [self.tableView deselectRowAtIndexPath:indexPath animated:NO];
+                [UIView beginAnimations:@"table width more" context:NULL];
+                [UIView setAnimationDuration:0.2];
+                self.view.frame = CGRectMake(0, 0, 480, 320);
+                [UIView commitAnimations];
+            }
+			actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
+                                                      delegate:self
+                                             cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
+                                        destructiveButtonTitle:NSLocalizedString(@"Of course!", @"")
+                                             otherButtonTitles:nil];
+            [actionSheet showInView:self.view];
+            [actionSheet release];
+            
+            if (!isPaused) 
+                HW_pause();
+            break;
+        default:
+			NSLog(@"Warning: unset case value in section!");
+			break;
+    }
+    
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
+}
+
+#pragma mark -
+#pragma mark actionSheet methods
+-(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){
+        [UIView beginAnimations:@"table width less" context:NULL];
+        [UIView setAnimationDuration:0.2];
+        self.view.frame = CGRectMake(280, 0, 200, 170);
+        [UIView commitAnimations];
+    }
+    
+	if ([actionSheet cancelButtonIndex] != buttonIndex) {
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissPopover" object:nil];
+        HW_terminate(NO);
+    }
+	else
+        if (!isPaused) 
+            HW_pause();		
+}
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,19 @@
+//
+//  SchemeSettingsViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 19/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+@class SingleSchemeViewController;
+
+@interface SchemeSettingsViewController : UITableViewController {
+    NSMutableArray *listOfSchemes;
+    SingleSchemeViewController *childController;
+}
+
+@property (nonatomic, retain) NSMutableArray *listOfSchemes;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SchemeSettingsViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,162 @@
+//
+//  SchemeSettingsViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 19/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "SchemeSettingsViewController.h"
+#import "CommodityFunctions.h"
+#import "SingleSchemeViewController.h"
+
+@implementation SchemeSettingsViewController
+@synthesize listOfSchemes;
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+    return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+    
+    UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"from the scheme panel")
+                                                                   style:UIBarButtonItemStyleBordered
+                                                                  target:self
+                                                                  action:@selector(toggleEdit:)];
+    self.navigationItem.rightBarButtonItem = editButton;
+    [editButton release];
+    
+}
+
+-(void) viewWillAppear:(BOOL) animated {
+    [super viewWillAppear:animated];
+    
+    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCHEMES_DIRECTORY() error:NULL];
+    NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES];
+    self.listOfSchemes = array;
+    [array release];
+    
+    [self.tableView reloadData];
+}
+
+// modifies the navigation bar to add the "Add" and "Done" buttons
+-(void) toggleEdit:(id) sender {
+    BOOL isEditing = self.tableView.editing;
+    [self.tableView setEditing:!isEditing animated:YES];
+    
+    if (isEditing) {
+        [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Edit",@"from the scheme panel")];
+        [self.navigationItem.rightBarButtonItem setStyle: UIBarButtonItemStyleBordered];
+        self.navigationItem.leftBarButtonItem = self.navigationItem.backBarButtonItem;
+    } else {
+        [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Done",@"from the scheme panel")];
+        [self.navigationItem.rightBarButtonItem setStyle:UIBarButtonItemStyleDone];
+        UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Add",@"from the scheme panel")
+                                                                      style:UIBarButtonItemStyleBordered
+                                                                     target:self
+                                                                     action:@selector(addScheme:)];
+        self.navigationItem.leftBarButtonItem = addButton;
+        [addButton release];
+    }
+}
+
+-(void) addScheme:(id) sender {
+    NSString *fileName = [[NSString alloc] initWithFormat:@"Scheme %u.plist", [self.listOfSchemes count]];
+    
+    createSchemeNamed([fileName stringByDeletingPathExtension]);
+    
+    [self.listOfSchemes addObject:fileName];
+    [fileName release];
+    
+    // order the array alphabetically, so schemes will keep their position
+    [self.listOfSchemes sortUsingSelector:@selector(compare:)];
+    
+    [self.tableView reloadData];
+}
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self.listOfSchemes count];
+}
+
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    NSUInteger row = [indexPath row]; 
+    NSString *rowString = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension]; 
+    cell.textLabel.text = rowString; 
+    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+    
+    return cell;
+}
+
+// delete the row and the file
+-(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+    NSUInteger row = [indexPath row];
+    
+    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@",SCHEMES_DIRECTORY(),[self.listOfSchemes objectAtIndex:row]];
+    [[NSFileManager defaultManager] removeItemAtPath:schemeFile error:NULL];
+    [schemeFile release];
+    
+    [self.listOfSchemes removeObjectAtIndex:row];
+    [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
+}
+
+#pragma mark -
+#pragma mark Table view delegate
+
+-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (childController == nil) {
+        childController = [[SingleSchemeViewController alloc] initWithStyle:UITableViewStyleGrouped];
+    }
+    
+    NSInteger row = [indexPath row];
+    NSString *selectedSchemeFile = [self.listOfSchemes objectAtIndex:row];
+    
+    // this must be set so childController can load the correct plist
+    childController.title = [selectedSchemeFile stringByDeletingPathExtension];
+    [childController.tableView setContentOffset:CGPointMake(0,0) animated:NO];
+
+    [self.navigationController pushViewController:childController animated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    if (childController.view.superview == nil )
+        childController = nil;
+}
+
+-(void) viewDidUnload {
+    self.listOfSchemes = nil;
+    childController = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+
+-(void) dealloc {
+    [self.listOfSchemes release];
+    [childController release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,27 @@
+//
+//  SchemeWeaponConfigViewController.h
+//  Hedgewars
+//
+//  Created by Vittorio on 13/06/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface SchemeWeaponConfigViewController : UITableViewController {
+    NSArray *listOfSchemes;
+    NSArray *listOfWeapons;
+    
+    NSIndexPath *lastIndexPath;
+    NSString *selectedScheme;
+    NSString *selectedWeapon;
+}
+
+@property (nonatomic, retain) NSArray *listOfSchemes;
+@property (nonatomic, retain) NSArray *listOfWeapons;
+@property (nonatomic,retain) NSIndexPath *lastIndexPath;
+@property (nonatomic,retain) NSString *selectedScheme;
+@property (nonatomic,retain) NSString *selectedWeapon;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SchemeWeaponConfigViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,157 @@
+//
+//  SchemeWeaponConfigViewController.m
+//  Hedgewars
+//
+//  Created by Vittorio on 13/06/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "SchemeWeaponConfigViewController.h"
+#import "CommodityFunctions.h"
+
+@implementation SchemeWeaponConfigViewController
+@synthesize listOfSchemes, listOfWeapons, lastIndexPath, selectedScheme, selectedWeapon;
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+    return rotationManager(interfaceOrientation);
+}
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+
+    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
+    self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
+
+    self.selectedScheme = @"Default.plist";
+    self.selectedWeapon = @"Default.plist";
+}
+
+-(void) viewWillAppear:(BOOL) animated {
+    [super viewWillAppear:animated];
+
+    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:SCHEMES_DIRECTORY() error:NULL];
+    self.listOfSchemes = contentsOfDir;
+    
+    [self.tableView reloadData];
+}
+
+/*
+- (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 {
+    return 2;
+}
+
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    if (section == 0) 
+        return [self.listOfSchemes count];
+    else
+        return [self.listOfWeapons count];
+}
+
+
+// Customize the appearance of table view cells.
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier = @"Cell";
+    NSInteger row = [indexPath row];
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    cell.accessoryType = UITableViewCellAccessoryNone;
+    if ([indexPath section] == 0) {
+        cell.textLabel.text = [[self.listOfSchemes objectAtIndex:row] stringByDeletingPathExtension];
+        if ([[self.listOfSchemes objectAtIndex:row] isEqualToString:self.selectedScheme]) {
+            cell.accessoryType = UITableViewCellAccessoryCheckmark;
+            self.lastIndexPath = indexPath;
+        }
+    } else {
+        cell.textLabel.text = [[self.listOfWeapons objectAtIndex:row] stringByDeletingPathExtension];
+        if ([[self.listOfWeapons objectAtIndex:row] isEqualToString:self.selectedWeapon]) {
+            cell.accessoryType = UITableViewCellAccessoryCheckmark;
+            self.lastIndexPath = indexPath;
+        }
+    }
+
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    
+    if (newRow != oldRow) {
+        //TODO: this code works only for a single section table
+        UITableViewCell *newCell = [aTableView cellForRowAtIndexPath:indexPath];
+        newCell.accessoryType = UITableViewCellAccessoryCheckmark;
+        UITableViewCell *oldCell = [aTableView cellForRowAtIndexPath:lastIndexPath];
+        oldCell.accessoryType = UITableViewCellAccessoryNone;
+        self.lastIndexPath = indexPath;
+        self.selectedScheme = [self.listOfSchemes objectAtIndex:newRow];
+        [aTableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    }
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
+}
+
+-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger) section {
+    if (section == 0) {
+        return NSLocalizedString(@"Schemes",@"");
+    } else {
+        return NSLocalizedString(@"Weapons",@"");;
+    }
+}
+
+#pragma mark -
+#pragma mark Memory management
+-(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 {
+    self.listOfSchemes = nil;
+    self.listOfWeapons = nil;
+    self.lastIndexPath = nil;
+    self.selectedScheme = nil;
+    self.selectedWeapon = nil;
+    MSG_DIDUNLOAD();
+}
+
+
+-(void) dealloc {
+    [listOfSchemes release];
+    [listOfWeapons release];
+    [lastIndexPath release];
+    [selectedScheme release];
+    [selectedWeapon release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,25 @@
+//
+//  SingleSchemeViewController.h
+//  Hedgewars
+//
+//  Created by Vittorio on 23/05/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface SingleSchemeViewController : UITableViewController <UITextFieldDelegate> {
+    UITextField *textFieldBeingEdited;
+    NSMutableArray *schemeArray;
+    
+    NSArray *basicSettingList;
+    NSArray *gameModifierArray;
+}
+
+@property (nonatomic, retain) UITextField *textFieldBeingEdited;
+@property (nonatomic, retain) NSMutableArray *schemeArray;
+@property (nonatomic, retain) NSArray *basicSettingList;
+@property (nonatomic, retain) NSArray *gameModifierArray;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SingleSchemeViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,321 @@
+//
+//  SingleSchemeViewController.m
+//  Hedgewars
+//
+//  Created by Vittorio on 23/05/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "SingleSchemeViewController.h"
+#import <QuartzCore/QuartzCore.h>
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+
+@implementation SingleSchemeViewController
+@synthesize textFieldBeingEdited, schemeArray, basicSettingList, gameModifierArray;
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+
+    NSArray *mods = [[NSArray alloc] initWithObjects:
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Fort Mode",@""),@"title",
+                      NSLocalizedString(@"Defend your fort and destroy the opponents (two team colours max)",@""),@"description",
+                      @"Forts",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Divide Team",@""),@"title",
+                      NSLocalizedString(@"Teams will start on opposite sides of the terrain (two team colours max)",@""),@"description",
+                      @"TeamsDivide",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Solid Land",@""),@"title",
+                      NSLocalizedString(@"Land can not be destroyed",@""),@"description",
+                      @"Solid",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Add Border",@""),@"title",
+                      NSLocalizedString(@"Add an indestructable border around the terrain",@""),@"description",
+                      @"Border",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Low Gravity",@""),@"title",
+                      NSLocalizedString(@"Lower gravity",@""),@"description",
+                      @"LowGravity",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Laser Sight",@""),@"title",
+                      NSLocalizedString(@"Assisted aiming with laser sight",@""),@"description",
+                      @"LaserSight",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Invulnerable",@""),@"title",
+                      NSLocalizedString(@"All hogs have a personal forcefield",@""),@"description",
+                      @"Invulnerable",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Add Mines",@""),@"title",
+                      NSLocalizedString(@"Enable random mines",@""),@"description",
+                      @"Mines",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Vampirism Mode",@""),@"title",
+                      NSLocalizedString(@"Gain 80% of the damage you do back in health",@""),@"description",
+                      @"Vampiric",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Karma Mode",@""),@"title",
+                      NSLocalizedString(@"Share your opponents pain, share their damage",@""),@"description",
+                      @"Karma",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Artillery Mode",@""),@"title",
+                      NSLocalizedString(@"Your hogs are unable to move, test your aim",@""),@"description",
+                      @"Artillery",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Random Order",@""),@"title",
+                      NSLocalizedString(@"Order of play is random instead of in room order",@""),@"description",
+                      @"RandomOrder",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"King Mode",@""),@"title",
+                      NSLocalizedString(@"Play with a King. If he dies, your side loses",@""),@"description",
+                      @"King",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys: NSLocalizedString(@"Place Hedgehogs",@""),@"title",
+                      NSLocalizedString(@"Take turns placing your hedgehogs pre-game",@""),@"description",
+                      @"PlaceHog",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Clan Shares Ammo",@""),@"title",
+                      NSLocalizedString(@"Ammo is shared between all clan teams",@""),@"description",
+                      @"SharedAmmo",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Disable Girders",@""),@"title",
+                      NSLocalizedString(@"Disable girders when generating random maps",@""),@"description",
+                      @"DisableGirders",@"image",nil],
+                     [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Disable Land Objects",@""),@"title",
+                      NSLocalizedString(@"Disable land objects when generating maps",@""),@"description",
+                      @"DisableLandObjects",@"image",nil],
+                     nil];
+    self.gameModifierArray = mods;
+    [mods release];
+    
+    NSArray *basicSettings = [[NSArray alloc] initWithObjects:
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Damage Modifier",@""),@"title",@"Damage",@"image",nil],
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Turn Time",@""),@"title",@"Time",@"image",nil],
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Initial Health",@""),@"title",@"Health",@"image",nil],
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Sudden Death Timeout",@""),@"title",@"SuddenDeath",@"image",nil],
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Crate Drops",@""),@"title",@"Box",@"image",nil],
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Mines Time",@""),@"title",@"Time",@"image",nil],
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Mines Number",@""),@"title",@"Mine",@"image",nil],
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Dud Mines Probability",@""),@"title",@"Dud",@"image",nil],
+                              [NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Explosives",@""),@"title",@"Damage",@"image",nil],
+                              nil];
+    self.basicSettingList = basicSettings;
+    [basicSettings release];
+}
+
+// load from file
+-(void) viewWillAppear:(BOOL) animated {
+    [super viewWillAppear:animated];
+    
+    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.title];
+	NSMutableArray *scheme = [[NSMutableArray alloc] initWithContentsOfFile:schemeFile];
+    self.schemeArray = scheme;
+    [scheme release];
+	[schemeFile release];
+    
+    [self.tableView reloadData];
+}
+
+// save to file
+-(void) viewWillDisappear:(BOOL) animated {
+    [super viewWillDisappear:animated];
+    
+    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.title];
+    [self.schemeArray writeToFile:schemeFile atomically:YES];
+    [schemeFile release];
+}
+
+#pragma mark -
+#pragma mark textfield methods
+-(void) cancel:(id) sender {
+    if (textFieldBeingEdited != nil)
+        [self.textFieldBeingEdited resignFirstResponder];
+}
+
+// set the new value
+-(BOOL) save:(id) sender {    
+    if (textFieldBeingEdited != nil) {
+        [[NSFileManager defaultManager] removeItemAtPath:[NSString stringWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.title] error:NULL];
+        self.title = self.textFieldBeingEdited.text;
+        [self.schemeArray writeToFile:[NSString stringWithFormat:@"%@/%@.plist",SCHEMES_DIRECTORY(),self.title] atomically:YES];
+        [self.textFieldBeingEdited resignFirstResponder];
+        return YES;
+    }
+    return NO;
+}
+
+// the textfield is being modified, update the navigation controller
+-(void) textFieldDidBeginEditing:(UITextField *)aTextField{   
+    self.textFieldBeingEdited = aTextField;
+
+    UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel",@"from schemes table")
+                                                                     style:UIBarButtonItemStylePlain
+                                                                    target:self
+                                                                    action:@selector(cancel:)];
+    self.navigationItem.leftBarButtonItem = cancelButton;
+    [cancelButton release];
+    
+    UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save",@"from schemes table")
+                                                                     style:UIBarButtonItemStyleDone
+                                                                    target:self
+                                                                    action:@selector(save:)];
+    self.navigationItem.rightBarButtonItem = saveButton;
+    [saveButton release];
+}
+
+// the textfield has been modified, check for empty strings and restore original navigation bar
+-(void) textFieldDidEndEditing:(UITextField *)aTextField{
+    if ([textFieldBeingEdited.text length] == 0) 
+        textFieldBeingEdited.text = [NSString stringWithFormat:@"New Scheme"];
+
+    self.textFieldBeingEdited = nil;
+    self.navigationItem.rightBarButtonItem = self.navigationItem.backBarButtonItem;
+    self.navigationItem.leftBarButtonItem = nil;
+}
+
+// limit the size of the field to 64 characters like in original frontend
+-(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    int limit = 64;
+    return !([textField.text length] > limit && [string length] > range.length);
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 3;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    switch (section) {
+        case 0:
+            return 1;
+            break;
+        case 1:
+            return [self.basicSettingList count];
+            break;
+        case 2:
+            return [self.gameModifierArray count];
+        default:
+            break;
+    }
+    return 0;
+}
+
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier0 = @"Cell0";
+    static NSString *CellIdentifier1 = @"Cell1";
+    static NSString *CellIdentifier2 = @"Cell2";
+    
+    UITableViewCell *cell = nil;
+    NSInteger row = [indexPath row];
+    
+    switch ([indexPath section]) {
+        case 0:
+            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier0];
+            if (cell == nil) {
+                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
+                                               reuseIdentifier:CellIdentifier0] autorelease];
+                // create a uitextfield for each row, expand it to take the maximum size
+                UITextField *aTextField = [[UITextField alloc] 
+                                           initWithFrame:CGRectMake(5, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
+                aTextField.clearsOnBeginEditing = NO;
+                aTextField.returnKeyType = UIReturnKeyDone;
+                aTextField.adjustsFontSizeToFitWidth = YES;
+                aTextField.delegate = self;
+                aTextField.tag = [indexPath row];
+                aTextField.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
+                aTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
+                [aTextField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
+                [cell.contentView addSubview:aTextField];
+                [aTextField 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
+                    UITextField *textFieldFound = (UITextField *)oneView;
+                    textFieldFound.text = self.title;
+                }
+            }
+            cell.detailTextLabel.text = nil;
+            cell.imageView.image = nil;
+            break;
+        case 1:
+            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
+            if (cell == nil) {
+                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
+                                               reuseIdentifier:CellIdentifier1] autorelease];
+            }
+            
+            UIImage *img = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/icon%@.png",BTN_DIRECTORY(),[[self.basicSettingList objectAtIndex:row] objectForKey:@"image"]]];
+            cell.imageView.image = [img scaleToSize:CGSizeMake(40, 40)];
+            [img release];
+            cell.textLabel.text = [[self.basicSettingList objectAtIndex:row] objectForKey:@"title"];
+            cell.detailTextLabel.text = nil;
+            break;
+        case 2:
+            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier2];
+            if (cell == nil) {
+                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle
+                                               reuseIdentifier:CellIdentifier2] autorelease];
+                UISwitch *onOff = [[UISwitch alloc] init];
+                onOff.tag = row;
+                [onOff addTarget:self action:@selector(toggleSwitch:) forControlEvents:UIControlEventValueChanged];
+                cell.accessoryView = onOff;
+                [onOff release];
+            }
+            
+            UIImage *image = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/btn%@.png",BTN_DIRECTORY(),[[self.gameModifierArray objectAtIndex:row] objectForKey:@"image"]]];
+            cell.imageView.image = image;
+            [image release];
+            [cell.imageView.layer setCornerRadius:7.0f];
+            [cell.imageView.layer setMasksToBounds:YES];
+            cell.textLabel.text = [[self.gameModifierArray objectAtIndex:row] objectForKey:@"title"];
+            cell.detailTextLabel.text = [[self.gameModifierArray objectAtIndex:row] objectForKey:@"description"];
+            [(UISwitch *)cell.accessoryView setOn:[[self.schemeArray objectAtIndex:row] boolValue] animated:NO];
+        }
+    
+    return cell;
+}
+
+-(void) toggleSwitch:(id) sender {
+    UISwitch *theSwitch = (UISwitch *)sender;
+    [self.schemeArray replaceObjectAtIndex:theSwitch.tag withObject:[NSNumber numberWithBool:theSwitch.on]];
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    if ([indexPath section] == 0) {
+        UITableViewCell *cell = [aTableView cellForRowAtIndexPath:indexPath];
+        for (UIView *oneView in cell.contentView.subviews) {
+            if ([oneView isMemberOfClass:[UITextField class]]) {
+                textFieldBeingEdited = (UITextField *)oneView;
+                [textFieldBeingEdited becomeFirstResponder];
+            }
+        }
+    }
+    [aTableView deselectRowAtIndexPath:indexPath animated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(void) didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+}
+
+-(void) viewDidUnload {
+    self.textFieldBeingEdited = nil;
+    self.schemeArray = nil;
+    self.basicSettingList = nil;
+    self.gameModifierArray = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [textFieldBeingEdited release];
+    [schemeArray release];
+    [basicSettingList release];
+    [gameModifierArray release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,44 @@
+//
+//  SingleTeamViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class HogHatViewController;
+@class GravesViewController;
+@class VoicesViewController;
+@class FortsViewController;
+@class FlagsViewController;
+@class LevelViewController;
+@interface SingleTeamViewController : UITableViewController <UITextFieldDelegate> {
+    NSMutableDictionary *teamDictionary;
+    
+    UITextField *textFieldBeingEdited;
+    NSString *teamName;
+    UIImage *normalHogSprite;
+    
+    NSArray *secondaryItems;
+    BOOL isWriteNeeded;
+    
+    HogHatViewController *hogHatViewController;
+    GravesViewController *gravesViewController;
+    VoicesViewController *voicesViewController;
+    FortsViewController *fortsViewController;
+    FlagsViewController *flagsViewController;
+    LevelViewController *levelViewController;
+}
+
+@property (nonatomic,retain) NSMutableDictionary *teamDictionary;
+@property (nonatomic,retain) UITextField *textFieldBeingEdited;
+@property (nonatomic,retain) NSString *teamName;
+@property (nonatomic,retain) UIImage *normalHogSprite;
+@property (nonatomic,retain) NSArray *secondaryItems;
+
+-(void) writeFile;
+-(void) setWriteNeeded;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SingleTeamViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,453 @@
+//
+//  SingleTeamViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "SingleTeamViewController.h"
+#import "HogHatViewController.h"
+#import "GravesViewController.h"
+#import "VoicesViewController.h"
+#import "FortsViewController.h"
+#import "FlagsViewController.h"
+#import "LevelViewController.h"
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+
+#define TEAMNAME_TAG 1234
+
+@implementation SingleTeamViewController
+@synthesize teamDictionary, normalHogSprite, secondaryItems, textFieldBeingEdited, teamName;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark textfield methods
+-(void) cancel:(id) sender {
+    if (textFieldBeingEdited != nil)
+        [self.textFieldBeingEdited resignFirstResponder];
+}
+
+// set the new value
+-(BOOL) save:(id) sender {
+    NSInteger index = textFieldBeingEdited.tag;
+    
+    if (textFieldBeingEdited != nil) {
+        if (TEAMNAME_TAG == index) {
+            [self.teamDictionary setObject:textFieldBeingEdited.text forKey:@"teamname"];
+        } else {
+            //replace the old value with the new one            
+            NSMutableDictionary *hog = [[teamDictionary objectForKey:@"hedgehogs"] objectAtIndex:index];
+            [hog setObject:textFieldBeingEdited.text forKey:@"hogname"];
+        }
+        
+        isWriteNeeded = YES;
+        [self.textFieldBeingEdited resignFirstResponder];
+        return YES;
+    }
+    return NO;
+}
+
+// the textfield is being modified, update the navigation controller
+-(void) textFieldDidBeginEditing:(UITextField *)aTextField{   
+    self.textFieldBeingEdited = aTextField;
+
+    UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel",@"from the hog name table")
+                                                                     style:UIBarButtonItemStylePlain
+                                                                    target:self
+                                                                    action:@selector(cancel:)];
+    self.navigationItem.leftBarButtonItem = cancelButton;
+    [cancelButton release];
+    
+    UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Save",@"from the hog name table")
+                                                                     style:UIBarButtonItemStyleDone
+                                                                    target:self
+                                                                    action:@selector(save:)];
+    self.navigationItem.rightBarButtonItem = saveButton;
+    [saveButton release];
+}
+
+// the textfield has been modified, check for empty strings and restore original navigation bar
+-(void) textFieldDidEndEditing:(UITextField *)aTextField{
+    if ([textFieldBeingEdited.text length] == 0) 
+        textFieldBeingEdited.text = [NSString stringWithFormat:@"hedgehog %d",textFieldBeingEdited.tag];
+
+    self.textFieldBeingEdited = nil;
+    self.navigationItem.rightBarButtonItem = self.navigationItem.backBarButtonItem;
+    self.navigationItem.leftBarButtonItem = nil;
+}
+
+// limit the size of the field to 64 characters like in original frontend
+-(BOOL) textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    int limit = 64;
+    return !([textField.text length] > limit && [string length] > range.length);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+    
+    // labels for the entries
+    NSArray *array = [[NSArray alloc] initWithObjects:
+                      NSLocalizedString(@"Grave",@""),
+                      NSLocalizedString(@"Voice",@""),
+                      NSLocalizedString(@"Fort",@""),
+                      NSLocalizedString(@"Flag",@""),
+                      NSLocalizedString(@"Level",@""),nil];
+    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;
+}
+
+-(void) viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+    // load data about the team and write if there has been a change
+    if (isWriteNeeded) 
+        [self writeFile];
+    
+    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),self.title];
+	NSMutableDictionary *teamDict = [[NSMutableDictionary alloc] initWithContentsOfFile:teamFile];
+    self.teamDictionary = teamDict;
+    [teamDict release];
+	[teamFile release];
+    
+    self.teamName = self.title;
+    
+    [self.tableView reloadData];
+}
+
+// write on file if there has been a change
+-(void) viewWillDisappear:(BOOL)animated {
+	[super viewWillDisappear:animated];
+
+    // end the editing of the current field
+    if (textFieldBeingEdited != nil) {
+        [self save:nil];
+    }
+    
+    if (isWriteNeeded) 
+        [self writeFile];        
+}
+
+#pragma mark -
+// needed by other classes to warn about a user change
+-(void) setWriteNeeded {
+    isWriteNeeded = YES;
+}
+
+-(void) writeFile {
+    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),self.title];
+
+    NSString *newTeamName = [self.teamDictionary objectForKey:@"teamname"];
+    if (![newTeamName isEqualToString:self.teamName]) {
+        //delete old
+        [[NSFileManager defaultManager] removeItemAtPath:teamFile error:NULL];
+        [teamFile release];
+        self.title = newTeamName;
+        self.teamName = newTeamName;
+        teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist",TEAMS_DIRECTORY(),newTeamName];
+    }
+    
+    [self.teamDictionary writeToFile:teamFile atomically:YES];
+    NSLog(@"writing: %@",teamDictionary);
+    isWriteNeeded = NO;
+	[teamFile release];
+}
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 3;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    NSInteger rows = 0;
+    switch (section) {
+        case 0: // team name
+            rows = 1;
+            break;
+        case 1: // team members
+            rows = MAX_HOGS;
+            break;
+        case 2: // team details
+            rows = [self.secondaryItems count];
+            break;
+        default:
+            break;
+    }
+    return rows;
+}
+
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier0 = @"Cell0";
+    static NSString *CellIdentifier1 = @"Cell1";
+    static NSString *CellIdentifier2 = @"Cell2";
+    
+    NSArray *hogArray;
+    UITableViewCell *cell = nil;
+    NSInteger row = [indexPath row];
+    UIImage *accessoryImage;
+    
+    switch ([indexPath section]) {
+        case 0:
+            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier0];
+            if (cell == nil) {
+                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
+                                               reuseIdentifier:CellIdentifier0] autorelease];
+                // create a uitextfield for each row, expand it to take the maximum size
+                UITextField *aTextField = [[UITextField alloc] 
+                                           initWithFrame:CGRectMake(5, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
+                aTextField.clearsOnBeginEditing = NO;
+                aTextField.returnKeyType = UIReturnKeyDone;
+                aTextField.adjustsFontSizeToFitWidth = YES;
+                aTextField.delegate = self;
+                aTextField.tag = [indexPath row];
+                aTextField.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
+                aTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
+                [aTextField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
+                [cell.contentView addSubview:aTextField];
+                [aTextField release];
+            }
+            
+            cell.imageView.image = nil;
+            cell.accessoryType = UITableViewCellAccessoryNone;
+            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
+                    UITextField *textFieldFound = (UITextField *)oneView;
+                    textFieldFound.text = [self.teamDictionary objectForKey:@"teamname"];
+                    textFieldFound.tag = TEAMNAME_TAG;
+                }
+            }            
+            break;
+        case 1:
+            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
+            if (cell == nil) {
+                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
+                                               reuseIdentifier:CellIdentifier1] autorelease];
+                
+                // create a uitextfield for each row, expand it to take the maximum size
+                UITextField *aTextField = [[UITextField alloc] 
+                                           initWithFrame:CGRectMake(42, 12, (cell.frame.size.width + cell.frame.size.width/3) - 42, 25)];
+                aTextField.clearsOnBeginEditing = NO;
+                aTextField.returnKeyType = UIReturnKeyDone;
+                aTextField.adjustsFontSizeToFitWidth = YES;
+                aTextField.delegate = self;
+                aTextField.tag = [indexPath row];
+                aTextField.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
+                aTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
+                [aTextField addTarget:self action:@selector(save:) forControlEvents:UIControlEventEditingDidEndOnExit];
+                [cell.contentView addSubview:aTextField];
+                [aTextField release];
+            }
+            
+            hogArray = [self.teamDictionary objectForKey:@"hedgehogs"];
+            
+            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
+                    UITextField *textFieldFound = (UITextField *)oneView;
+                    textFieldFound.text = [[hogArray objectAtIndex:row] objectForKey:@"hogname"];
+                }
+            }
+            
+            cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
+            break;
+        case 2:
+            cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier2];
+            if (cell == nil) {
+                cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault 
+                                               reuseIdentifier:CellIdentifier2] autorelease];
+            }
+            
+            cell.textLabel.text = [self.secondaryItems objectAtIndex:row];
+            cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+            switch (row) {
+                case 0: // grave
+                    accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.png",
+                                                                              GRAVES_DIRECTORY(),[teamDictionary objectForKey:@"grave"]]
+                                                                    andCutAt:CGRectMake(0,0,32,32)];
+                    cell.imageView.image = accessoryImage;
+                    [accessoryImage release];
+                    break;
+                case 2: // fort
+                    accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@L.png",
+                                                                              FORTS_DIRECTORY(),[teamDictionary objectForKey:@"fort"]]];
+                    cell.imageView.image = [accessoryImage scaleToSize:CGSizeMake(42, 42)];
+                    [accessoryImage release];
+                    break;
+                    
+                case 3: // flags
+                    accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%@.png",
+                                                                              FLAGS_DIRECTORY(),[teamDictionary objectForKey:@"flag"]]];
+                    cell.imageView.image = accessoryImage;
+                    [accessoryImage release];
+                    break;
+                case 4: // level
+                    accessoryImage = [[UIImage alloc] initWithContentsOfFile:[NSString stringWithFormat:@"%@/%d.png",
+                                                                              BOTLEVELS_DIRECTORY(),[[[[teamDictionary objectForKey:@"hedgehogs"]
+                                                                                                      objectAtIndex:0] objectForKey:@"level"]
+                                                                                                     intValue]]];
+                    cell.imageView.image = accessoryImage;
+                    [accessoryImage release];
+                    break;
+                default:
+                    cell.imageView.image = nil;
+                    break;
+            }
+            break;
+    }
+    
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    NSInteger row = [indexPath row];
+    NSInteger section = [indexPath section];
+    UITableViewController *nextController = nil;
+    UITableViewCell *cell;
+    
+    if (2 == section) {
+        switch (row) {
+            case 0: // grave
+                if (nil == gravesViewController)
+                    gravesViewController = [[GravesViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                
+                nextController = gravesViewController;
+                break;
+            case 1: // voice
+                if (nil == voicesViewController)
+                    voicesViewController = [[VoicesViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                
+                nextController = voicesViewController;                    
+                break;
+            case 2: // fort
+                if (nil == fortsViewController)
+                    fortsViewController = [[FortsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                
+                nextController = fortsViewController;
+                break;
+            case 3: // flag
+                if (nil == flagsViewController) 
+                    flagsViewController = [[FlagsViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                
+                nextController = flagsViewController;
+                break;
+            case 4: // level
+                if (nil == levelViewController)
+                    levelViewController = [[LevelViewController alloc] initWithStyle:UITableViewStyleGrouped];
+                
+                nextController = levelViewController;
+                break;
+        }
+        
+        nextController.title = [secondaryItems objectAtIndex:row];
+        [nextController setTeamDictionary:teamDictionary];
+        [self.navigationController pushViewController:nextController animated:YES];
+    } else {
+        cell = [aTableView cellForRowAtIndexPath:indexPath];
+        for (UIView *oneView in cell.contentView.subviews) {
+            if ([oneView isMemberOfClass:[UITextField class]]) {
+                textFieldBeingEdited = (UITextField *)oneView;
+                [textFieldBeingEdited becomeFirstResponder];
+            }
+        }
+        [aTableView deselectRowAtIndexPath:indexPath animated:NO];
+    }
+
+}
+
+// action to perform when you want to change a hog hat
+-(void) tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
+    if (nil == hogHatViewController) {
+        hogHatViewController = [[HogHatViewController alloc] initWithStyle:UITableViewStyleGrouped];
+    }
+    
+    // cache the dictionary file of the team, so that other controllers can modify it
+    hogHatViewController.teamDictionary = self.teamDictionary;
+    hogHatViewController.selectedHog = [indexPath row];
+    
+    [self.navigationController pushViewController:hogHatViewController animated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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.
+    if (hogHatViewController.view.superview == nil)
+        hogHatViewController = nil;
+    if (gravesViewController.view.superview == nil)
+        gravesViewController = nil;
+    if (voicesViewController.view.superview == nil)
+        voicesViewController = nil;
+    if (fortsViewController.view.superview == nil)
+        fortsViewController = nil;
+    if (flagsViewController.view.superview == nil)
+        flagsViewController = nil;
+    if (levelViewController.view.superview == nil)
+        levelViewController = nil;
+}
+
+-(void) viewDidUnload {
+    self.teamDictionary = nil;
+    self.textFieldBeingEdited = nil;
+    self.teamName = nil;
+    self.normalHogSprite = nil;
+    self.secondaryItems = nil;
+    hogHatViewController = nil;
+    flagsViewController = nil;
+    fortsViewController = nil;
+    gravesViewController = nil;
+    levelViewController = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [teamDictionary release];
+    [textFieldBeingEdited release];
+    [teamName release];
+    [normalHogSprite release];
+    [secondaryItems release];
+    [hogHatViewController release];
+    [fortsViewController release];
+    [gravesViewController release];
+    [flagsViewController release];
+    [levelViewController release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,16 @@
+//
+//  SplitViewRootController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 27/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@class DetailViewController;
+@interface SplitViewRootController: UIViewController {
+    DetailViewController *detailViewController;
+}
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/SplitViewRootController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,106 @@
+    //
+//  SplitViewRootController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 27/03/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "SplitViewRootController.h"
+#import "MasterViewController.h"
+#import "DetailViewController.h"
+#import "CommodityFunctions.h"
+
+@implementation SplitViewRootController
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+    return rotationManager(interfaceOrientation);
+}
+
+-(void) didReceiveMemoryWarning {
+    // Releases the view if it doesn't have a superview.
+    [super didReceiveMemoryWarning];    
+    // Release any cached data, images, etc that aren't in use.
+    if (detailViewController.view.superview == nil)
+        detailViewController = nil;
+    MSG_MEMCLEAN();
+}
+
+// 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 {
+    detailViewController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
+    UINavigationController *detailedNavController = [[UINavigationController alloc] initWithRootViewController:detailViewController];
+    [detailViewController release];
+
+    CGRect rect = [[UIScreen mainScreen] bounds];
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+        self.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
+        
+    Class splitViewControllerClass = NSClassFromString(@"UISplitViewController");
+    if (splitViewControllerClass) {
+#if __IPHONE_3_2
+        UISplitViewController *splitViewRootController = [[UISplitViewController alloc] init];
+        //splitViewRootController.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;        
+        splitViewRootController.view.frame = CGRectMake(0, 0, rect.size.height, rect.size.width);
+        
+        MasterViewController *masterViewController = [[MasterViewController alloc] initWithStyle:UITableViewStylePlain];
+        UINavigationController *mainNavController = [[UINavigationController alloc] initWithRootViewController:masterViewController];
+        [masterViewController release];
+
+        splitViewRootController.delegate = detailViewController;
+        masterViewController.detailViewController = detailViewController;        
+        splitViewRootController.viewControllers = [NSArray arrayWithObjects: mainNavController, detailedNavController, nil];
+        [mainNavController release];
+        [detailedNavController release];
+        
+        // add view to main controller
+        [self.view addSubview:splitViewRootController.view];
+#endif
+    } else {
+        [self.view addSubview:detailedNavController.view];
+    }
+
+    [super viewDidLoad];
+}
+         
+-(void) viewDidUnload {
+    detailViewController = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [detailViewController release];
+    [super dealloc];
+}
+-(void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
+    [detailViewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
+}
+
+#pragma mark -
+#pragma mark additional methods as we're using a UINavigationController programmatically
+// see http://davidebenini.it/2009/01/03/viewwillappear-not-being-called-inside-a-uinavigationcontroller/
+-(void) viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [detailViewController.navigationController viewWillAppear:animated];
+}
+
+-(void) viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    [detailViewController.navigationController viewWillDisappear:animated];
+}
+
+-(void) viewDidAppear:(BOOL)animated {
+    [super viewDidLoad];
+    [detailViewController.navigationController viewDidAppear:animated];
+}
+
+-(void) viewDidDisappear:(BOOL)animated {
+    [super viewDidUnload];
+    [detailViewController.navigationController viewDidDisappear:animated];
+}
+
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,20 @@
+//
+//  TeamConfigViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 20/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface TeamConfigViewController : UITableViewController {
+    NSMutableArray *listOfTeams;
+    NSMutableArray *listOfSelectedTeams;
+}
+
+@property (nonatomic, retain) NSMutableArray *listOfTeams;
+@property (nonatomic, retain) NSMutableArray *listOfSelectedTeams;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/TeamConfigViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,174 @@
+//
+//  TeamConfigViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 20/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "TeamConfigViewController.h"
+#import "CommodityFunctions.h"
+#import "HogButtonView.h"
+#import "SquareButtonView.h"
+
+@implementation TeamConfigViewController
+@synthesize listOfTeams, listOfSelectedTeams;
+
+#define NUMBERBUTTON_TAG 123456
+#define SQUAREBUTTON_TAG 654321
+#define LABEL_TAG        456123
+
+#pragma mark -
+#pragma mark View lifecycle
+-(void) viewDidLoad {
+    [super viewDidLoad];
+    
+    CGSize screenSize = [[UIScreen mainScreen] bounds].size;
+    self.view.frame = CGRectMake(0, 0, screenSize.height, screenSize.width - 44);
+}
+
+-(void) viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+
+    // 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++) {
+        NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithObjectsAndKeys:
+                                                                  [contentsOfDir objectAtIndex:i],@"team",
+                                                                  [NSNumber numberWithInt:4],@"number",
+                                                                  [NSNumber numberWithInt:colors[i%6]],@"color",nil];
+        [array addObject:dict];
+        [dict release];
+    }
+    self.listOfTeams = array;
+    [array release];
+    
+    NSMutableArray *emptyArray = [[NSMutableArray alloc] initWithObjects:nil];
+    self.listOfSelectedTeams = emptyArray;
+    [emptyArray release];
+
+    [self.tableView reloadData];
+}
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+    return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 2;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    if (section == 0)
+        return [listOfSelectedTeams count] ;
+    else
+        return [listOfTeams count];
+}
+
+-(NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section {
+    if (section == 0)
+        return NSLocalizedString(@"Playing Teams",@"");
+    else
+        return NSLocalizedString(@"Available Teams",@"");
+}
+
+// Customize the appearance of table view cells.
+-(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 = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier0];
+        if (cell == nil) {
+            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier0] autorelease];
+
+            UIButton *numberButton = [[HogButtonView alloc] initWithFrame:CGRectMake(12, 5, 88, 32)];
+            numberButton.tag = NUMBERBUTTON_TAG;
+            [cell addSubview:numberButton];
+            [numberButton release];
+            
+            SquareButtonView *squareButton = [[SquareButtonView alloc] initWithFrame:CGRectMake(12+88+7, 5, 36, 36)];
+            squareButton.tag = SQUAREBUTTON_TAG;
+            [cell addSubview:squareButton];
+            [squareButton release];
+            
+            UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(12+88+7+36+7, 10, 250, 25)];
+            label.textAlignment = UITextAlignmentLeft;
+            label.backgroundColor = [UIColor clearColor];
+            label.font = [UIFont boldSystemFontOfSize:[UIFont systemFontSize] + 2];
+            label.tag = LABEL_TAG;
+            [cell.contentView addSubview:label];
+            [label release];
+        }
+        
+        NSMutableDictionary *selectedRow = [listOfSelectedTeams objectAtIndex:[indexPath row]];
+        
+        UILabel *cellLabel = (UILabel *)[cell viewWithTag:LABEL_TAG];
+        cellLabel.text = [[selectedRow objectForKey:@"team"] stringByDeletingPathExtension];
+        
+        HogButtonView *numberButton = (HogButtonView *)[cell viewWithTag:NUMBERBUTTON_TAG];
+        [numberButton drawManyHogs:[[selectedRow objectForKey:@"number"] intValue]];
+        numberButton.ownerDictionary = selectedRow;
+        
+        SquareButtonView *squareButton = (SquareButtonView *)[cell viewWithTag:SQUAREBUTTON_TAG];
+        [squareButton selectColor:[[selectedRow objectForKey:@"color"] intValue]];
+        squareButton.ownerDictionary = selectedRow;
+    } else {
+        cell = [aTableView dequeueReusableCellWithIdentifier:CellIdentifier1];
+        if (cell == nil) 
+            cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1] autorelease];
+        
+        cell.textLabel.text = [[[listOfTeams objectAtIndex:[indexPath row]] objectForKey:@"team"] stringByDeletingPathExtension];
+    }
+
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    NSInteger row = [indexPath row];
+    NSInteger section = [indexPath section];
+
+    if (section == 0) {
+        [self.listOfTeams addObject:[self.listOfSelectedTeams objectAtIndex:row]];
+        [self.listOfSelectedTeams removeObjectAtIndex:row];
+    } else {
+        [self.listOfSelectedTeams addObject:[self.listOfTeams objectAtIndex:row]];
+        [self.listOfTeams removeObjectAtIndex:row];      
+    }
+    [aTableView reloadData];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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 {
+    self.listOfTeams = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+
+-(void) dealloc {
+    [self.listOfTeams release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/TeamSettingsViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,19 @@
+//
+//  TeamSettingsViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+@class SingleTeamViewController;
+
+@interface TeamSettingsViewController : UITableViewController {
+    NSMutableArray *listOfTeams;
+    SingleTeamViewController *childController;
+}
+
+@property (nonatomic, retain) NSMutableArray *listOfTeams;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/TeamSettingsViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,167 @@
+//
+//  TeamSettingsViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "TeamSettingsViewController.h"
+#import "SingleTeamViewController.h"
+#import "CommodityFunctions.h"
+
+@implementation TeamSettingsViewController
+@synthesize listOfTeams;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+// add an edit button
+-(void) viewDidLoad {
+    [super viewDidLoad];
+
+    UIBarButtonItem *editButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Edit",@"from the team panel")
+                                                                   style:UIBarButtonItemStyleBordered
+                                                                  target:self
+                                                                  action:@selector(toggleEdit:)];
+    self.navigationItem.rightBarButtonItem = editButton;
+    [editButton release];
+}
+
+// load the list of teams in the teams directory
+-(void) viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+    NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL];
+    NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES];
+    self.listOfTeams = array;
+    [array release];
+    
+    [self.tableView reloadData];
+}
+
+// modifies the navigation bar to add the "Add" and "Done" buttons
+-(void) toggleEdit:(id) sender {
+    BOOL isEditing = self.tableView.editing;
+    [self.tableView setEditing:!isEditing animated:YES];
+    
+    if (isEditing) {
+        [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Edit",@"from the team panel")];
+        [self.navigationItem.rightBarButtonItem setStyle: UIBarButtonItemStyleBordered];
+        self.navigationItem.leftBarButtonItem = self.navigationItem.backBarButtonItem;
+    } else {
+        [self.navigationItem.rightBarButtonItem setTitle:NSLocalizedString(@"Done",@"from the team panel")];
+        [self.navigationItem.rightBarButtonItem setStyle:UIBarButtonItemStyleDone];
+        UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Add",@"from the team panel")
+                                                                      style:UIBarButtonItemStyleBordered
+                                                                     target:self
+                                                                     action:@selector(addTeam:)];
+        self.navigationItem.leftBarButtonItem = addButton;
+        [addButton release];
+    }
+}
+
+// add a team file with default values and updates the table
+-(void) addTeam:(id) sender {
+    NSString *fileName = [[NSString alloc] initWithFormat:@"Default Team %u.plist", [self.listOfTeams count]];
+    
+    createTeamNamed([fileName stringByDeletingPathExtension]);
+    
+    [self.listOfTeams addObject:fileName];
+    [fileName release];
+    
+    // order the array alphabetically, so teams will keep their position
+    [self.listOfTeams sortUsingSelector:@selector(compare:)];
+    
+    [self.tableView reloadData];
+}
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self.listOfTeams count];
+}
+
+// Customize the appearance of table view cells.
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    NSUInteger row = [indexPath row]; 
+    NSString *rowString = [[self.listOfTeams objectAtIndex:row] stringByDeletingPathExtension]; 
+    cell.textLabel.text = rowString; 
+    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+    
+    return cell;
+}
+
+// delete the row and the file
+-(void) tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
+    NSUInteger row = [indexPath row];
+    
+    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@",TEAMS_DIRECTORY(),[self.listOfTeams objectAtIndex:row]];
+    [[NSFileManager defaultManager] removeItemAtPath:teamFile error:NULL];
+    [teamFile release];
+    
+    [self.listOfTeams removeObjectAtIndex:row];
+    [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (childController == nil) {
+        childController = [[SingleTeamViewController alloc] initWithStyle:UITableViewStyleGrouped];
+    }
+    
+    NSInteger row = [indexPath row];
+    NSString *selectedTeamFile = [listOfTeams objectAtIndex:row];
+    
+    // this must be set so childController can load the correct plist
+    childController.title = [selectedTeamFile stringByDeletingPathExtension];
+    [childController.tableView setContentOffset:CGPointMake(0,0) animated:NO];
+
+    [self.navigationController pushViewController:childController animated:YES];
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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.
+    if (childController.view.superview == nil )
+        childController = nil;
+}
+
+-(void) viewDidUnload {
+    self.listOfTeams = nil;
+    childController = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [self.listOfTeams release];
+    [childController release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/VoicesViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,25 @@
+//
+//  VoicesViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface VoicesViewController : UITableViewController {
+    NSMutableDictionary *teamDictionary;
+    
+    NSArray *voiceArray;
+    NSIndexPath *lastIndexPath;
+
+    int voiceBeingPlayed;
+}
+
+@property (nonatomic,retain) NSMutableDictionary *teamDictionary;
+@property (nonatomic,retain) NSArray *voiceArray;
+@property (nonatomic,retain) NSIndexPath *lastIndexPath;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/VoicesViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,155 @@
+//
+//  VoicesViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 02/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "VoicesViewController.h"
+#import "CommodityFunctions.h"
+#import "openalbridge.h"
+
+
+@implementation VoicesViewController
+@synthesize teamDictionary, voiceArray, lastIndexPath;
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation {
+	return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark View lifecycle
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    srandom(time(NULL));
+
+    openal_init(20);
+}
+
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    
+    // this moves the tableview to the top
+    [self.tableView setContentOffset:CGPointMake(0,0) animated:NO];
+    voiceBeingPlayed = -1;
+
+    // load all the voices names and store them into voiceArray
+    NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:VOICES_DIRECTORY() error:NULL];
+    self.voiceArray = array;
+}
+
+/*
+- (void)viewDidAppear:(BOOL)animated {
+    [super viewDidAppear:animated];
+}
+*/
+
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    if(voiceBeingPlayed >= 0) {
+        openal_stopsound(voiceBeingPlayed);
+        voiceBeingPlayed = -1;
+    }
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [self.voiceArray count];
+}
+
+// Customize the appearance of table view cells.
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    NSString *voice = [[voiceArray objectAtIndex:[indexPath row]] stringByDeletingPathExtension];
+    cell.textLabel.text = voice;
+    
+    if ([voice isEqualToString:[teamDictionary objectForKey:@"voicepack"]]) {
+        cell.accessoryType = UITableViewCellAccessoryCheckmark;
+        self.lastIndexPath = indexPath;
+    } else {
+        cell.accessoryType = UITableViewCellAccessoryNone;
+    }
+
+    return cell;
+}
+
+
+#pragma mark -
+#pragma mark Table view delegate
+-(void) tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    int newRow = [indexPath row];
+    int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;
+    
+    if (newRow != oldRow) {
+        [teamDictionary setObject:[voiceArray objectAtIndex:newRow] forKey:@"voicepack"];
+        
+        // tell our boss to write this new stuff on disk
+        [[NSNotificationCenter defaultCenter] postNotificationName:@"setWriteNeedTeams" object:nil];
+        [self.tableView reloadData];
+        
+        self.lastIndexPath = indexPath;
+        [self.tableView selectRowAtIndexPath:indexPath animated:YES scrollPosition:UITableViewScrollPositionNone];
+    } 
+    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+    if (voiceBeingPlayed >= 0) {
+        openal_stopsound(voiceBeingPlayed);
+        voiceBeingPlayed = -1;
+    }
+    
+    // the keyword static prevents re-initialization of the variable
+    NSString *voiceDir = [[NSString alloc] initWithFormat:@"%@/%@/",VOICES_DIRECTORY(),[voiceArray objectAtIndex:newRow]];
+    NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:voiceDir error:NULL];
+    
+    int index = random() % [array count];
+    
+    voiceBeingPlayed = openal_loadfile([[voiceDir stringByAppendingString:[array objectAtIndex:index]] UTF8String]);
+    [voiceDir release];
+    openal_playsound(voiceBeingPlayed);    
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+-(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 {
+    openal_close();
+    voiceBeingPlayed = -1;
+    self.lastIndexPath = nil;
+    self.teamDictionary = nil;
+    self.voiceArray = nil;
+    [super viewDidUnload];
+    MSG_DIDUNLOAD();
+}
+
+-(void) dealloc {
+    [voiceArray release];
+    [teamDictionary release];
+    [lastIndexPath release];
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,16 @@
+//
+//  WeaponSettingsViewController.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 19/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface WeaponSettingsViewController : UITableViewController {
+
+}
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/WeaponSettingsViewController.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,179 @@
+//
+//  WeaponSettingsViewController.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 19/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "WeaponSettingsViewController.h"
+
+
+@implementation WeaponSettingsViewController
+
+
+#pragma mark -
+#pragma mark Initialization
+
+/*
+- (id)initWithStyle:(UITableViewStyle)style {
+    // Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
+    if ((self = [super initWithStyle:style])) {
+    }
+    return self;
+}
+*/
+
+
+#pragma mark -
+#pragma mark View lifecycle
+
+/*
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+    // Uncomment the following line to preserve selection between presentations.
+    self.clearsSelectionOnViewWillAppear = NO;
+ 
+    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
+    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
+}
+*/
+
+/*
+- (void)viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+}
+*/
+/*
+- (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 {
+    // Override to allow orientations other than the default portrait orientation.
+    return YES;
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    // Return the number of sections.
+    return 1;
+}
+
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    // Return the number of rows in the section.
+    return 1;
+}
+
+
+// Customize the appearance of table view cells.
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    static NSString *CellIdentifier = @"Cell";
+    
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
+    if (cell == nil) {
+        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
+    }
+    
+    // Configure the cell...
+    
+    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 *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    // Navigation logic may go here. Create and push another view controller.
+	/*
+	 <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil];
+     // ...
+     // Pass the selected object to the new view controller.
+	 [self.navigationController pushViewController:detailViewController animated:YES];
+	 [detailViewController release];
+	 */
+}
+
+
+#pragma mark -
+#pragma mark Memory management
+
+- (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 {
+    // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
+    // For example: self.myOutlet = nil;
+}
+
+
+- (void)dealloc {
+    [super dealloc];
+}
+
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/CGPointUtils.c	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,34 @@
+/*
+ *  CGPointUtils.c
+ *  PinchMe
+ *
+ *  Created by Jeff LaMarche on 8/2/08.
+ *  Copyright 2008 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#include "CGPointUtils.h"
+#include <math.h>
+
+
+CGFloat distanceBetweenPoints (CGPoint first, CGPoint second) {
+	CGFloat deltaX = second.x - first.x;
+	CGFloat deltaY = second.y - first.y;
+	return sqrt(deltaX*deltaX + deltaY*deltaY );
+}
+
+CGFloat angleBetweenPoints(CGPoint first, CGPoint second) {
+	CGFloat height = second.y - first.y;
+	CGFloat width = first.x - second.x;
+	CGFloat rads = atan(height/width);
+	return radiansToDegrees(rads);
+}
+
+CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint line2End) {
+	CGFloat a = line1End.x - line1Start.x;
+	CGFloat b = line1End.y - line1Start.y;
+	CGFloat c = line2End.x - line2Start.x;
+	CGFloat d = line2End.y - line2Start.y;
+	CGFloat rads = acos(((a*c) + (b*d)) / ((sqrt(a*a + b*b)) * (sqrt(c*c + d*d))));
+	return radiansToDegrees(rads);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/CGPointUtils.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,17 @@
+/*
+ *  CGPointUtils.h
+ *  PinchMe
+ *
+ *  Created by Jeff LaMarche on 8/2/08.
+ *  Copyright 2008 __MyCompanyName__. All rights reserved.
+ *
+ */
+
+#import <CoreGraphics/CoreGraphics.h>
+
+#define degreesToRadian(x) (M_PI * x / 180.0)
+#define radiansToDegrees(x) (180.0 * x / M_PI)
+
+CGFloat distanceBetweenPoints (CGPoint first, CGPoint second);
+CGFloat angleBetweenPoints(CGPoint first, CGPoint second);
+CGFloat angleBetweenLines(CGPoint line1Start, CGPoint line1End, CGPoint line2Start, CGPoint lin2End);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/CommodityFunctions.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,46 @@
+//
+//  CommodityFunctions.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 08/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+#define MAX_HOGS 8
+
+
+#define SETTINGS_FILE()         [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
+                                 objectAtIndex:0] stringByAppendingString:@"/settings.plist"]
+#define GAMECONFIG_FILE()       [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
+                                 objectAtIndex:0] stringByAppendingString:@"/gameconfig.plist"]
+#define DEBUG_FILE()            [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
+                                 objectAtIndex:0] stringByAppendingString:@"/debug.txt"]
+
+#define TEAMS_DIRECTORY()       [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
+                                 objectAtIndex:0] stringByAppendingString:@"/Teams/"]
+#define SCHEMES_DIRECTORY()     [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
+                                 objectAtIndex:0] stringByAppendingString:@"/Schemes/"]
+
+#define GRAPHICS_DIRECTORY()    [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"]
+#define HATS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"]
+#define GRAVES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"]
+#define BOTLEVELS_DIRECTORY()   [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"]
+#define BTN_DIRECTORY()         [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn"]
+#define FLAGS_DIRECTORY()       [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"]
+#define FORTS_DIRECTORY()       [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"]
+#define THEMES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Themes/"]
+#define MAPS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Maps/"]
+#define VOICES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"]
+
+#define MSG_MEMCLEAN()          DLog(@"has cleaned up some memory"); print_free_memory()
+#define MSG_DIDUNLOAD()         DLog(@"did unload");
+
+void createTeamNamed (NSString *nameWithoutExt);
+void createSchemeNamed (NSString *nameWithoutExt);
+BOOL rotationManager (UIInterfaceOrientation interfaceOrientation);
+NSInteger randomPort ();
+void popError (const char *title, const char *message);
+void print_free_memory ();
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/CommodityFunctions.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,137 @@
+//
+//  CommodityFunctions.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 08/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "CommodityFunctions.h"
+#import <mach/mach.h>
+#import <mach/mach_host.h>
+
+void createTeamNamed (NSString *nameWithoutExt) {
+    NSString *teamsDirectory = TEAMS_DIRECTORY();
+    
+    if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) {
+        [[NSFileManager defaultManager] createDirectoryAtPath:teamsDirectory 
+                                  withIntermediateDirectories:NO 
+                                                   attributes:nil 
+                                                        error:NULL];
+    }
+    
+    NSMutableArray *hedgehogs = [[NSMutableArray alloc] initWithCapacity: MAX_HOGS];
+    
+    for (int i = 0; i < MAX_HOGS; i++) {
+        NSString *hogName = [[NSString alloc] initWithFormat:@"hedgehog %d",i];
+        NSDictionary *hog = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithInt:0],@"level",
+                             hogName,@"hogname", @"NoHat",@"hat", nil];
+        [hogName release];
+        [hedgehogs addObject:hog];
+        [hog release];
+    }
+    
+    NSDictionary *theTeam = [[NSDictionary alloc] initWithObjectsAndKeys:@"0",@"hash", nameWithoutExt,@"teamname",
+                             @"Statue",@"grave", @"Plane",@"fort", @"Default",@"voicepack",
+                             @"hedgewars",@"flag", hedgehogs,@"hedgehogs", nil];
+    [hedgehogs release];
+    
+    NSString *teamFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", teamsDirectory, nameWithoutExt];
+
+    [theTeam writeToFile:teamFile atomically:YES];
+    [teamFile release];
+    [theTeam release];
+}
+
+void createSchemeNamed (NSString *nameWithoutExt) {
+    NSString *schemesDirectory = SCHEMES_DIRECTORY();
+    
+    if (![[NSFileManager defaultManager] fileExistsAtPath: schemesDirectory]) {
+        [[NSFileManager defaultManager] createDirectoryAtPath:schemesDirectory 
+                                  withIntermediateDirectories:NO 
+                                                   attributes:nil 
+                                                        error:NULL];
+    }
+    
+    NSArray *theScheme = [[NSArray alloc] initWithObjects:
+                          [NSNumber numberWithBool:NO],    //fortmode
+                          [NSNumber numberWithBool:NO],    //divideteam
+                          [NSNumber numberWithBool:NO],    //solidland
+                          [NSNumber numberWithBool:NO],    //addborder
+                          [NSNumber numberWithBool:NO],    //lowgravity
+                          [NSNumber numberWithBool:NO],    //lasersight
+                          [NSNumber numberWithBool:NO],    //invulnerable
+                          [NSNumber numberWithBool:NO],    //addmines
+                          [NSNumber numberWithBool:NO],    //vampirism
+                          [NSNumber numberWithBool:NO],    //karma
+                          [NSNumber numberWithBool:NO],    //artillery
+                          [NSNumber numberWithBool:YES],   //randomorder
+                          [NSNumber numberWithBool:NO],    //king
+                          [NSNumber numberWithBool:NO],    //placehedgehogs
+                          [NSNumber numberWithBool:NO],    //clansharesammo
+                          [NSNumber numberWithBool:NO],    //disablegirders
+                          [NSNumber numberWithBool:NO],    //disablelandobjects
+                          [NSNumber numberWithInt:100],    //damagemodifier
+                          [NSNumber numberWithInt:45],     //turntime
+                          [NSNumber numberWithInt:100],    //initialhealth
+                          [NSNumber numberWithInt:15],     //suddendeathtimeout
+                          [NSNumber numberWithInt:5],      //cratedrops
+                          [NSNumber numberWithInt:3],      //minestime
+                          [NSNumber numberWithInt:4],      //mines
+                          [NSNumber numberWithInt:0],      //dudmines
+                          [NSNumber numberWithInt:2],      //explosives
+                          nil];
+    
+    NSString *schemeFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", schemesDirectory, nameWithoutExt];
+
+    [theScheme writeToFile:schemeFile atomically:YES];
+    [schemeFile release];
+    [theScheme release];
+}
+
+BOOL rotationManager (UIInterfaceOrientation interfaceOrientation) {
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+        return YES;
+    else
+        return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
+               (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);  
+}
+
+NSInteger randomPort () {
+    srandom(time(NULL));
+    return (random() % 64511) + 1024;
+}
+
+void popError (const char *title, const char *message) {
+    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[NSString stringWithUTF8String:title]
+                                                    message:[NSString stringWithUTF8String:message]
+                                                   delegate:nil
+                                          cancelButtonTitle:@"Ok"
+                                          otherButtonTitles:nil];
+    [alert show];
+    [alert release];
+}
+
+// by http://landonf.bikemonkey.org/code/iphone/Determining_Available_Memory.20081203.html
+void print_free_memory () {
+    mach_port_t host_port;
+    mach_msg_type_number_t host_size;
+    vm_size_t pagesize;
+    
+    host_port = mach_host_self();
+    host_size = sizeof(vm_statistics_data_t) / sizeof(integer_t);
+    host_page_size(host_port, &pagesize);        
+ 
+    vm_statistics_data_t vm_stat;
+              
+    if (host_statistics(host_port, HOST_VM_INFO, (host_info_t)&vm_stat, &host_size) != KERN_SUCCESS)
+        DLog(@"Failed to fetch vm statistics");
+ 
+    /* Stats in bytes */ 
+    natural_t mem_used = (vm_stat.active_count +
+                          vm_stat.inactive_count +
+                          vm_stat.wire_count) * pagesize;
+    natural_t mem_free = vm_stat.free_count * pagesize;
+    natural_t mem_total = mem_used + mem_free;
+    DLog(@"used: %u free: %u total: %u", mem_used, mem_free, mem_total);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/HogButtonView.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,25 @@
+//
+//  HogButtonView.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 20/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface HogButtonView : UIButton {
+    NSInteger numberOfHogs;
+    UIImage *singleHog;
+    NSMutableDictionary *ownerDictionary;
+}
+
+@property (nonatomic,retain) UIImage *singleHog;
+@property (nonatomic) NSInteger numberOfHogs;
+@property (nonatomic,retain) NSMutableDictionary *ownerDictionary;
+
+-(void) drawManyHogs:(NSInteger) hogs;
+-(void) addOne;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/HogButtonView.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,67 @@
+//
+//  HogButtonView.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 20/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "HogButtonView.h"
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+
+@implementation HogButtonView
+@synthesize singleHog, numberOfHogs, ownerDictionary;
+
+-(id) initWithFrame:(CGRect)frame {
+    if ((self = [super initWithFrame:frame])) {
+        self.backgroundColor = [UIColor clearColor];
+        
+        NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
+        UIImage *normalHogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
+        [normalHogFile release];
+        
+        self.singleHog = normalHogSprite;
+        [normalHogSprite release];
+        [self addTarget:self action:@selector(addOne) forControlEvents:UIControlEventTouchUpInside];
+    }
+    return self;
+}
+
+-(void) addOne {
+    self.highlighted = NO;
+    NSInteger number = self.numberOfHogs;
+    number++;
+    [self drawManyHogs:number];
+}
+
+-(void) drawManyHogs:(NSInteger) hogs {
+    if (numberOfHogs != hogs) {
+        if (hogs <= MAX_HOGS && hogs >= 1)
+            numberOfHogs = hogs;
+        else {
+            if (hogs > MAX_HOGS)
+                numberOfHogs = 1;
+            else
+                numberOfHogs = MAX_HOGS;
+        }
+        [ownerDictionary setObject:[NSNumber numberWithInt:numberOfHogs] forKey:@"number"];
+        
+        UIImage *teamHogs = [[[UIImage alloc] init] autorelease];
+        for (int i = 0; i < numberOfHogs; i++) {
+            teamHogs = [singleHog mergeWith:teamHogs
+                                    atPoint:CGPointMake(8, 0) 
+                                     atSize:CGSizeMake(88, 32)];
+        }
+        [self setImage:teamHogs forState:UIControlStateNormal];
+    }
+}
+
+-(void) dealloc {
+    [ownerDictionary release];
+    [singleHog release];
+    [super dealloc];
+}
+
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/PascalImports.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,59 @@
+/*
+ *  PascalImports.h
+//  fpciphonedel
+//
+//  Created by Vittorio on 07/01/10.
+//  Copyright __MyCompanyName__ 2010. All rights reserved.
+ *
+ */
+
+#ifndef PASCALIMPORTS
+#define PASCALIMPORTS
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+	
+	/* add C declarations below for all exported Pascal functions/procedure
+	 * that you want to use
+	 */
+
+	void Game(const char *args[]);
+    void GenLandPreview();
+
+
+	void HW_versionInfo(short int*, char**);
+
+	void HW_click(void);
+	void HW_zoomIn(void);
+	void HW_zoomOut(void);
+	void HW_zoomReset(void);
+	void HW_ammoMenu(void);
+	
+	void HW_allKeysUp(void);
+	
+	void HW_walkLeft(void);
+	void HW_walkRight(void);
+	void HW_aimUp(void);
+	void HW_aimDown(void);
+	void HW_shoot(void);
+	void HW_jump(void);
+	void HW_backjump(void);
+	
+	void HW_chat(void);
+	void HW_tab(void);
+	void HW_pause(void);
+    
+	void HW_cursorUp(int);
+	void HW_cursorDown(int);
+	void HW_cursorLeft(int);
+	void HW_cursorRight(int);
+    
+    void HW_terminate(BOOL);
+	
+    void HW_setLandscape(BOOL);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/SDL_uikitappdelegate.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,44 @@
+/*
+    SDL - Simple DirectMedia Layer
+    Copyright (C) 1997-2010 Sam Lantinga
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+    Sam Lantinga
+    slouken@libsdl.org
+*/
+
+#import <UIKit/UIKit.h>
+#import "SDL_uikitopenglview.h"
+
+@class MainMenuViewController;
+@class OverlayViewController;
+
+@interface SDLUIKitDelegate:NSObject<UIApplicationDelegate> {
+    SDL_Window *window; 	 
+    UIWindow *uiwindow;
+    MainMenuViewController *mainViewController;
+    BOOL isInGame;
+}
+
+@property (readwrite, assign) SDL_Window *window; 	 
+@property (readwrite, retain) UIWindow *uiwindow;
+
++(SDLUIKitDelegate *)sharedAppDelegate;
+-(void) startSDLgame;
+-(void) displayOverlayLater;
+
+@end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/SDL_uikitappdelegate.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,194 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2009 Sam Lantinga
+ 
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+ 
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ Lesser General Public License for more details.
+ 
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ Sam Lantinga, mods for Hedgewars by Vittorio Giovara
+ slouken@libsdl.org, vittorio.giovara@gmail.com
+*/
+
+#import "SDL_uikitappdelegate.h"
+#import "SDL_uikitopenglview.h"
+#import "SDL_uikitwindow.h"
+#import "SDL_events_c.h"
+#import "../SDL_sysvideo.h"
+#import "jumphack.h"
+#import "SDL_video.h"
+#import "GameSetup.h"
+#import "PascalImports.h"
+#import "MainMenuViewController.h"
+#import "OverlayViewController.h"
+#import "CommodityFunctions.h"
+
+#ifdef main
+#undef main
+#endif
+
+#define VALGRIND "/opt/valgrind/bin/valgrind"
+
+int main (int argc, char *argv[]) {
+#ifdef VALGRIND_REXEC
+    // Using the valgrind build config, rexec ourself in valgrind
+    // from http://landonf.bikemonkey.org/code/iphone/iPhone_Simulator_Valgrind.20081224.html
+    if (argc < 2 || (argc >= 2 && strcmp(argv[1], "-valgrind") != 0))
+        execl(VALGRIND, VALGRIND, "--leak-check=full", argv[0], "-valgrind", NULL);
+#endif
+
+	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+	int retVal = UIApplicationMain(argc, argv, nil, @"SDLUIKitDelegate");
+	[pool release];
+	return retVal;
+}
+
+@implementation SDLUIKitDelegate
+@synthesize uiwindow, window;
+
+// convenience method
++(SDLUIKitDelegate *)sharedAppDelegate {
+	// the delegate is set in UIApplicationMain(), which is guaranteed to be called before this method
+	return (SDLUIKitDelegate *)[[UIApplication sharedApplication] delegate];
+}
+
+-(id) init {
+	if (self = [super init]){
+        mainViewController = nil;
+        isInGame = NO;
+        self.uiwindow = nil; 	 
+        self.window = NULL;
+    }
+    return self;
+}
+
+-(void) dealloc {
+    SDL_DestroyWindow(self.window);
+     [uiwindow release];
+    [mainViewController release];
+	[super dealloc];
+}
+
+// main routine for calling the actual game engine
+-(IBAction) startSDLgame {
+    [UIView beginAnimations:@"removing main controller" context:NULL];
+	[UIView setAnimationDuration:1];
+	mainViewController.view.alpha = 0;
+	[UIView commitAnimations];
+
+    // pull out useful configuration info from various files
+	GameSetup *setup = [[GameSetup alloc] init];
+	[setup startThread:@"engineProtocol"];
+	const char **gameArgs = [setup getSettings];
+	[setup release];
+
+    // since the sdlwindow is not yet created, we add the overlayController with a delay
+    [self performSelector:@selector(displayOverlayLater) withObject:nil afterDelay:1];
+    
+    // this is the pascal fuction that starts the game (wrapped around isInGame)
+    isInGame = YES;
+	Game(gameArgs);
+    isInGame = NO;
+    
+    free(gameArgs);
+    
+    [UIView beginAnimations:@"inserting main controller" context:NULL];
+	[UIView setAnimationDuration:1];
+	mainViewController.view.alpha = 1;
+	[UIView commitAnimations];
+}
+
+-(void) displayOverlayLater {
+    // overlay with controls, become visible after 4 seconds, with a transparency effect
+    OverlayViewController *overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
+    
+    [[[UIApplication sharedApplication] keyWindow] addSubview:overlayController.view];
+    [overlayController release];
+}
+
+// override the direct execution of SDL_main to allow us to implement the frontend (or even using a nib)
+-(void) applicationDidFinishLaunching:(UIApplication *)application {
+    [application setStatusBarHidden:YES];
+    [application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];  
+    
+    uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+	uiwindow.backgroundColor = [UIColor blackColor];
+    // needed to keep the app running after a game (gets released in sdl_uikitwindow)
+	[uiwindow retain];
+    
+    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
+        mainViewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPad" bundle:nil];
+    else
+        mainViewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPhone" bundle:nil];
+
+	[uiwindow addSubview:mainViewController.view];
+	[uiwindow makeKeyAndVisible];
+
+	// Set working directory to resource path
+	[[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] resourcePath]];
+}
+
+-(void) applicationWillTerminate:(UIApplication *)application {
+	SDL_SendQuit();
+    if (isInGame) {
+        HW_terminate(YES);
+        // hack to prevent automatic termination. See SDL_uikitevents.m for details
+        longjmp(*(jump_env()), 1);
+    }
+}
+
+-(void) applicationWillResignActive:(UIApplication *)application {
+	//NSLog(@"%@", NSStringFromSelector(_cmd));
+    if (isInGame) {
+        HW_pause();
+        
+        /*
+        // Send every window on every screen a MINIMIZED event.
+        SDL_VideoDevice *_this = SDL_GetVideoDevice();
+        if (!_this)
+            return;
+
+        int i;
+        for (i = 0; i < _this->num_displays; i++) {
+            const SDL_VideoDisplay *display = &_this->displays[i];
+            SDL_Window *window;
+            for (window = display->windows; window != nil; window = window->next)
+                SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
+        }
+        */
+    }
+}
+
+-(void) applicationDidBecomeActive:(UIApplication *)application {
+	//NSLog(@"%@", NSStringFromSelector(_cmd));
+    if (isInGame) {
+        HW_pause();
+
+        /*
+        // Send every window on every screen a RESTORED event.
+        SDL_VideoDevice *_this = SDL_GetVideoDevice();
+        if (!_this)
+            return;
+
+        int i;
+        for (i = 0; i < _this->num_displays; i++) {
+            const SDL_VideoDisplay *display = &_this->displays[i];
+            SDL_Window *window;
+            for (window = display->windows; window != nil; window = window->next)
+                SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
+        }
+        */
+    }
+}
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/SquareButtonView.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,26 @@
+//
+//  HogButtonView.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 20/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+
+@interface SquareButtonView : UIButton {
+    NSInteger colorIndex;
+    NSUInteger selectedColor;
+    NSArray *colorArray;
+    NSMutableDictionary *ownerDictionary;
+}
+
+@property (nonatomic,retain) NSArray *colorArray;
+@property (nonatomic) NSUInteger selectedColor;
+@property (nonatomic,retain) NSMutableDictionary *ownerDictionary;
+
+-(void) nextColor;
+-(void) selectColor:(NSUInteger) color;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/SquareButtonView.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,93 @@
+//
+//  HogButtonView.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 20/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "SquareButtonView.h"
+#import <QuartzCore/QuartzCore.h>
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+
+@implementation SquareButtonView
+@synthesize colorArray, selectedColor, ownerDictionary;
+
+-(id) initWithFrame:(CGRect)frame {
+    if ((self = [super initWithFrame:frame])) {
+        colorIndex = -1;
+        selectedColor = 0;
+
+        // list of allowed colors
+        NSArray *colors = [[NSArray alloc] initWithObjects: [NSNumber numberWithUnsignedInt:4421353],    // bluette
+                                                            [NSNumber numberWithUnsignedInt:4100897],    // greeeen
+                                                            [NSNumber numberWithUnsignedInt:10632635],   // violett
+                                                            [NSNumber numberWithUnsignedInt:16749353],   // oranngy
+                                                            [NSNumber numberWithUnsignedInt:14483456],   // reddish
+                                                            [NSNumber numberWithUnsignedInt:7566195],    // graaaay
+                                                            nil];
+        self.colorArray = colors;
+        [colors release];
+
+        // set the color to the first available one
+        [self nextColor];
+        
+        // this makes the button round and nice
+        [self.layer setCornerRadius:7.0f];
+        [self.layer setMasksToBounds:YES];        
+        
+        // this changes the color at button press
+        [self addTarget:self action:@selector(nextColor) forControlEvents:UIControlEventTouchUpInside];
+
+        self.backgroundColor = [UIColor blackColor];
+    }
+    return self;
+}
+
+-(void) nextColor {
+    colorIndex++;
+    if (colorIndex >= [colorArray count])
+        colorIndex = 0;
+
+    NSUInteger color = [[self.colorArray objectAtIndex:colorIndex] unsignedIntValue];
+    [self selectColor:color];
+    
+    [ownerDictionary setObject:[NSNumber numberWithInt:color] forKey:@"color"];
+}
+
+-(void) selectColor:(NSUInteger) color {
+    if (color != selectedColor) {
+        selectedColor = color;
+        
+        UIGraphicsBeginImageContext(self.frame.size);	
+        CGContextRef context = UIGraphicsGetCurrentContext();
+        CGContextSetRGBFillColor(context, ((color & 0x00FF0000) >> 16)/255.0f,
+                                          ((color & 0x0000FF00) >> 8)/255.0f,
+                                           (color & 0x000000FF)/255.0f,
+                                            1.0f);
+        CGContextFillRect(context, CGRectMake(1.1, 1.1, self.frame.size.width-2.2, self.frame.size.height-2.2));
+        
+        UIImageView *resultingImage = [[UIImageView alloc] initWithImage: UIGraphicsGetImageFromCurrentImageContext()];
+        UIGraphicsEndImageContext();
+        
+        [self setImage:resultingImage.image forState:UIControlStateNormal];
+        [resultingImage release];
+        
+    }
+    /*  
+    self.backgroundColor = [UIColor colorWithRed:((color & 0x00FF0000) >> 16)/255.0f 
+                                           green:((color & 0x0000FF00) >> 8)/255.0f 
+                                            blue: (color & 0x000000FF)/255.0f 
+                                           alpha:1.0f];
+    */
+}
+
+-(void) dealloc {
+    [ownerDictionary release];
+    [colorArray release];
+    [super dealloc];
+}
+
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/UIImageExtra.h	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,22 @@
+//
+//  UIImageExtra.h
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 08/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+@interface UIImage (extra)
+ 
+-(UIImage *)scaleToSize:(CGSize) size;
+-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint;
+-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize;
+-(id) initWithContentsOfFile:(NSString *)path andCutAt:(CGRect) rect;
+-(UIImage *)convertToGrayScale;
+-(UIImage *)maskImageWith:(UIImage *)maskImage;
+-(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Classes/otherSrc/UIImageExtra.m	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,189 @@
+//
+//  UIImageExtra.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 08/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "UIImageExtra.h"
+
+
+@implementation UIImage (extra)
+ 
+-(UIImage *)scaleToSize:(CGSize) size {
+  // Create a bitmap graphics context
+  // This will also set it as the current context
+  UIGraphicsBeginImageContext(size);
+ 
+  // Draw the scaled image in the current context
+  [self drawInRect:CGRectMake(0, 0, size.width, size.height)];
+ 
+  // Create a new image from current context
+  UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext();
+ 
+  // Pop the current context from the stack
+  UIGraphicsEndImageContext();
+ 
+  // Return our new scaled image (autoreleased)
+  return scaledImage;
+}
+
+-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint {
+    // create a contex of size of the background image
+    return [self mergeWith:secondImage atPoint:secondImagePoint atSize:self.size];
+}
+
+-(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint atSize:(CGSize) resultingSize {
+    UIGraphicsBeginImageContext(resultingSize);
+    
+    // drav the background image
+    [self drawAtPoint:CGPointMake(0,0)];
+    
+    // draw the image on top of the first image
+    [secondImage drawAtPoint:secondImagePoint];
+    
+    // create an image from the current contex (not thread safe)
+    UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
+    
+    // free drawing contex
+    UIGraphicsEndImageContext();
+    
+    // return the resulting autoreleased image
+    return resultImage;
+}
+
+-(id) initWithContentsOfFile:(NSString *)path andCutAt:(CGRect) rect {
+    // load image from path
+    UIImage *image = [[UIImage alloc] initWithContentsOfFile: path];
+    
+    if (nil != image) {
+        // get its CGImage representation with a give size
+        CGImageRef cgImgage = CGImageCreateWithImageInRect([image CGImage], rect);
+    
+        // clean memory
+        [image release];
+    
+        // create a UIImage from the CGImage (memory must be allocated already)
+        UIImage *sprite = [self initWithCGImage:cgImgage];
+    
+        // clean memory
+        CGImageRelease(cgImgage);
+
+        // return resulting image
+        return sprite;
+    } else {
+        NSLog(@"initWithContentsOfFile: andCutAt: FAILED");
+        return nil;
+    }
+}
+
+-(UIImage *)convertToGrayScale {
+  // Create image rectangle with current image width/height
+  CGRect imageRect = CGRectMake(0, 0, self.size.width, self.size.height);
+ 
+  // Grayscale color space
+  CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray();
+ 
+  // Create bitmap content with current image size and grayscale colorspace
+  CGContextRef context = CGBitmapContextCreate(nil, self.size.width, self.size.height, 8, 0, colorSpace, kCGImageAlphaNone);
+ 
+  // Draw image into current context, with specified rectangle
+  // using previously defined context (with grayscale colorspace)
+  CGContextDrawImage(context, imageRect, [self CGImage]);
+ 
+  // Create bitmap image info from pixel data in current context
+  CGImageRef imageRef = CGBitmapContextCreateImage(context);
+ 
+  // Create a new UIImage object  
+  UIImage *newImage = [UIImage imageWithCGImage:imageRef];
+ 
+  // Release colorspace, context and bitmap information
+  CGColorSpaceRelease(colorSpace);
+  CGContextRelease(context);
+  CFRelease(imageRef);
+ 
+  // Return the new grayscale image
+  return newImage;
+}
+
+// by http://iphonedevelopertips.com/cocoa/how-to-mask-an-image.html turned into a category by koda
+-(UIImage*) maskImageWith:(UIImage *)maskImage {
+    CGImageRef maskRef = maskImage.CGImage;
+    
+    CGImageRef mask = CGImageMaskCreate(CGImageGetWidth(maskRef),
+                                        CGImageGetHeight(maskRef),
+                                        CGImageGetBitsPerComponent(maskRef),
+                                        CGImageGetBitsPerPixel(maskRef),
+                                        CGImageGetBytesPerRow(maskRef),
+                                        CGImageGetDataProvider(maskRef), NULL, false);
+    
+    CGImageRef masked = CGImageCreateWithMask([self CGImage], mask);
+    
+    CGImageRelease(mask);
+    
+    UIImage* retImage = [UIImage imageWithCGImage:masked];
+    
+    CGImageRelease(masked);
+    
+    return retImage;
+}
+
+// by http://blog.sallarp.com/iphone-uiimage-round-corners/ turned into a category by koda
+void addRoundedRectToPath(CGContextRef context, CGRect rect, float ovalWidth, float ovalHeight)
+{
+    float fw, fh;
+    if (ovalWidth == 0 || ovalHeight == 0) {
+        CGContextAddRect(context, rect);
+        return;
+    }
+    CGContextSaveGState(context);
+    CGContextTranslateCTM (context, CGRectGetMinX(rect), CGRectGetMinY(rect));
+    CGContextScaleCTM (context, ovalWidth, ovalHeight);
+    fw = CGRectGetWidth (rect) / ovalWidth;
+    fh = CGRectGetHeight (rect) / ovalHeight;
+    CGContextMoveToPoint(context, fw, fh/2);
+    CGContextAddArcToPoint(context, fw, fh, fw/2, fh, 1);
+    CGContextAddArcToPoint(context, 0, fh, 0, fh/2, 1);
+    CGContextAddArcToPoint(context, 0, 0, fw/2, 0, 1);
+    CGContextAddArcToPoint(context, fw, 0, fw, fh/2, 1);
+    CGContextClosePath(context);
+    CGContextRestoreGState(context);
+}
+
+-(UIImage *)makeRoundCornersOfSize:(CGSize) sizewh {
+	UIImage * newImage = nil;
+
+    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+    
+    NSInteger cornerWidth = sizewh.width;
+    NSInteger cornerHeight = sizewh.height;
+    int w = self.size.width;
+    int h = self.size.height;
+    
+    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+    CGContextRef context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst);
+    
+    CGContextBeginPath(context);
+    CGRect rect = CGRectMake(0, 0, w, h);
+    addRoundedRectToPath(context, rect, cornerWidth, cornerHeight);
+    CGContextClosePath(context);
+    CGContextClip(context);
+    
+    CGContextDrawImage(context, CGRectMake(0, 0, w, h), self.CGImage);
+    
+    CGImageRef imageMasked = CGBitmapContextCreateImage(context);
+    CGContextRelease(context);
+    CGColorSpaceRelease(colorSpace);
+    [self release];
+    
+    newImage = [[UIImage imageWithCGImage:imageMasked] retain];
+    CGImageRelease(imageMasked);
+    
+    [pool release];
+    
+    return newImage;
+}
+
+
+@end
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Thu Jun 17 19:57:51 2010 +0200
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Thu Jun 17 20:30:39 2010 +0200
@@ -25,26 +25,80 @@
 		1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		28FD15000DC6FC520079059D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD14FF0DC6FC520079059D /* OpenGLES.framework */; };
 		28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28FD15070DC6FC5B0079059D /* QuartzCore.framework */; };
-		611B0AA1116B626E00112153 /* GeneralSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611B0AA0116B626E00112153 /* GeneralSettingsViewController.m */; };
-		611E127D117BACC60044B62F /* GameConfigViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 611E127C117BACC60044B62F /* GameConfigViewController-iPad.xib */; };
-		611E127F117BACCD0044B62F /* GameConfigViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 611E127E117BACCD0044B62F /* GameConfigViewController-iPhone.xib */; };
 		611E12FF117BBBDA0044B62F /* Entitlements-Development.plist in Resources */ = {isa = PBXBuildFile; fileRef = 611E12FE117BBBDA0044B62F /* Entitlements-Development.plist */; };
-		611E1316117BBE5A0044B62F /* WeaponSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611E1315117BBE5A0044B62F /* WeaponSettingsViewController.m */; };
-		611E1319117BBE700044B62F /* SchemeSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611E1318117BBE700044B62F /* SchemeSettingsViewController.m */; };
 		611F4D4B11B27A9900F9759A /* uScript.pas in Sources */ = {isa = PBXBuildFile; fileRef = 611F4D4A11B27A9900F9759A /* uScript.pas */; };
 		6122CD01116BECCA002648E9 /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 6122CD00116BECCA002648E9 /* Default-Landscape.png */; };
 		61272334117DF764005B90CF /* libSDL_image.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61272333117DF752005B90CF /* libSDL_image.a */; };
 		61272339117DF778005B90CF /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61272338117DF778005B90CF /* MobileCoreServices.framework */; };
-		61272424117E17CF005B90CF /* TeamConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61272423117E17CF005B90CF /* TeamConfigViewController.m */; };
-		612724D3117E28AF005B90CF /* HogButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 612724D2117E28AF005B90CF /* HogButtonView.m */; };
 		61370653117B1D50004EE44A /* Entitlements-Distribution.plist in Resources */ = {isa = PBXBuildFile; fileRef = 61370652117B1D50004EE44A /* Entitlements-Distribution.plist */; };
-		61370676117B32EF004EE44A /* GameConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61370674117B32EF004EE44A /* GameConfigViewController.m */; };
 		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 */; };
-		615FBA5511A93C9800B139F9 /* SingleSchemeViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 615FBA5311A93C9800B139F9 /* SingleSchemeViewController.h */; };
-		615FBA5811A93D6700B139F9 /* SingleSchemeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 615FBA5411A93C9800B139F9 /* SingleSchemeViewController.m */; };
-		617814E8118947A200C6A535 /* MapConfigViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 617814E7118947A200C6A535 /* MapConfigViewController-iPad.xib */; };
+		6165920C11CA9BA200D6E256 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591DF11CA9BA200D6E256 /* DetailViewController.m */; };
+		6165920D11CA9BA200D6E256 /* FlagsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E111CA9BA200D6E256 /* FlagsViewController.m */; };
+		6165920E11CA9BA200D6E256 /* FortsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E311CA9BA200D6E256 /* FortsViewController.m */; };
+		6165920F11CA9BA200D6E256 /* GameConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E511CA9BA200D6E256 /* GameConfigViewController.m */; };
+		6165921011CA9BA200D6E256 /* GameSetup.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E711CA9BA200D6E256 /* GameSetup.m */; };
+		6165921111CA9BA200D6E256 /* GeneralSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591E911CA9BA200D6E256 /* GeneralSettingsViewController.m */; };
+		6165921211CA9BA200D6E256 /* GravesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591EB11CA9BA200D6E256 /* GravesViewController.m */; };
+		6165921311CA9BA200D6E256 /* HogHatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591ED11CA9BA200D6E256 /* HogHatViewController.m */; };
+		6165921411CA9BA200D6E256 /* LevelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591EF11CA9BA200D6E256 /* LevelViewController.m */; };
+		6165921511CA9BA200D6E256 /* MainMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591F111CA9BA200D6E256 /* MainMenuViewController.m */; };
+		6165921611CA9BA200D6E256 /* MapConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591F311CA9BA200D6E256 /* MapConfigViewController.m */; };
+		6165921711CA9BA200D6E256 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591F511CA9BA200D6E256 /* MasterViewController.m */; };
+		6165921811CA9BA200D6E256 /* OverlayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591F711CA9BA200D6E256 /* OverlayViewController.m */; };
+		6165921911CA9BA200D6E256 /* PopoverMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591F911CA9BA200D6E256 /* PopoverMenuViewController.m */; };
+		6165921A11CA9BA200D6E256 /* SchemeSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591FB11CA9BA200D6E256 /* SchemeSettingsViewController.m */; };
+		6165921B11CA9BA200D6E256 /* SchemeWeaponConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591FD11CA9BA200D6E256 /* SchemeWeaponConfigViewController.m */; };
+		6165921C11CA9BA200D6E256 /* SingleSchemeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616591FF11CA9BA200D6E256 /* SingleSchemeViewController.m */; };
+		6165921D11CA9BA200D6E256 /* SingleTeamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165920111CA9BA200D6E256 /* SingleTeamViewController.m */; };
+		6165921E11CA9BA200D6E256 /* SplitViewRootController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165920311CA9BA200D6E256 /* SplitViewRootController.m */; };
+		6165921F11CA9BA200D6E256 /* TeamConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165920511CA9BA200D6E256 /* TeamConfigViewController.m */; };
+		6165922011CA9BA200D6E256 /* TeamSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165920711CA9BA200D6E256 /* TeamSettingsViewController.m */; };
+		6165922111CA9BA200D6E256 /* VoicesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165920911CA9BA200D6E256 /* VoicesViewController.m */; };
+		6165922211CA9BA200D6E256 /* WeaponSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165920B11CA9BA200D6E256 /* WeaponSettingsViewController.m */; };
+		6165922E11CA9BD500D6E256 /* CGPointUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = 6165922311CA9BD500D6E256 /* CGPointUtils.c */; };
+		6165922F11CA9BD500D6E256 /* CommodityFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922611CA9BD500D6E256 /* CommodityFunctions.m */; };
+		6165923011CA9BD500D6E256 /* HogButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922811CA9BD500D6E256 /* HogButtonView.m */; };
+		6165923111CA9BD500D6E256 /* SquareButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922B11CA9BD500D6E256 /* SquareButtonView.m */; };
+		6165923211CA9BD500D6E256 /* UIImageExtra.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165922D11CA9BD500D6E256 /* UIImageExtra.m */; };
+		6165923D11CA9C4600D6E256 /* commands.c in Sources */ = {isa = PBXBuildFile; fileRef = 6165923311CA9C4600D6E256 /* commands.c */; };
+		6165923E11CA9C4600D6E256 /* commands.h in Headers */ = {isa = PBXBuildFile; fileRef = 6165923411CA9C4600D6E256 /* commands.h */; };
+		6165923F11CA9C4600D6E256 /* globals.h in Headers */ = {isa = PBXBuildFile; fileRef = 6165923511CA9C4600D6E256 /* globals.h */; };
+		6165924011CA9C4600D6E256 /* loaders.c in Sources */ = {isa = PBXBuildFile; fileRef = 6165923611CA9C4600D6E256 /* loaders.c */; };
+		6165924111CA9C4600D6E256 /* loaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 6165923711CA9C4600D6E256 /* loaders.h */; };
+		6165924211CA9C4600D6E256 /* openalbridge_t.h in Headers */ = {isa = PBXBuildFile; fileRef = 6165923811CA9C4600D6E256 /* openalbridge_t.h */; };
+		6165924311CA9C4600D6E256 /* openalbridge.c in Sources */ = {isa = PBXBuildFile; fileRef = 6165923911CA9C4600D6E256 /* openalbridge.c */; };
+		6165924411CA9C4600D6E256 /* openalbridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 6165923A11CA9C4600D6E256 /* openalbridge.h */; };
+		6165924511CA9C4600D6E256 /* wrappers.c in Sources */ = {isa = PBXBuildFile; fileRef = 6165923B11CA9C4600D6E256 /* wrappers.c */; };
+		6165924611CA9C4600D6E256 /* wrappers.h in Headers */ = {isa = PBXBuildFile; fileRef = 6165923C11CA9C4600D6E256 /* wrappers.h */; };
+		6165925111CA9CB400D6E256 /* GameConfigViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924911CA9CB400D6E256 /* GameConfigViewController-iPad.xib */; };
+		6165925211CA9CB400D6E256 /* GameConfigViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924A11CA9CB400D6E256 /* GameConfigViewController-iPhone.xib */; };
+		6165925311CA9CB400D6E256 /* MainMenuViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */; };
+		6165925411CA9CB400D6E256 /* MainMenuViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */; };
+		6165925511CA9CB400D6E256 /* MapConfigViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924D11CA9CB400D6E256 /* MapConfigViewController-iPad.xib */; };
+		6165925611CA9CB400D6E256 /* MapConfigViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924E11CA9CB400D6E256 /* MapConfigViewController-iPhone.xib */; };
+		6165925711CA9CB400D6E256 /* OverlayViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165924F11CA9CB400D6E256 /* OverlayViewController-iPad.xib */; };
+		6165925811CA9CB400D6E256 /* OverlayViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6165925011CA9CB400D6E256 /* OverlayViewController.xib */; };
+		6165925E11CA9CD300D6E256 /* arrowDown.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165925911CA9CD300D6E256 /* arrowDown.png */; };
+		6165925F11CA9CD300D6E256 /* arrowLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165925A11CA9CD300D6E256 /* arrowLeft.png */; };
+		6165926011CA9CD300D6E256 /* arrowRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165925B11CA9CD300D6E256 /* arrowRight.png */; };
+		6165926111CA9CD300D6E256 /* arrowUp.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165925C11CA9CD300D6E256 /* arrowUp.png */; };
+		6165926211CA9CD300D6E256 /* joyPush.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165925D11CA9CD300D6E256 /* joyPush.png */; };
+		6165927411CA9D0E00D6E256 /* backgroundBottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165926D11CA9D0E00D6E256 /* backgroundBottom.png */; };
+		6165927511CA9D0E00D6E256 /* backgroundCenter.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165926E11CA9D0E00D6E256 /* backgroundCenter.png */; };
+		6165927611CA9D0E00D6E256 /* backgroundLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165926F11CA9D0E00D6E256 /* backgroundLeft.png */; };
+		6165927711CA9D0E00D6E256 /* backgroundRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165927011CA9D0E00D6E256 /* backgroundRight.png */; };
+		6165927811CA9D0E00D6E256 /* backgroundTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165927111CA9D0E00D6E256 /* backgroundTop.png */; };
+		6165927911CA9D0E00D6E256 /* borderBottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165927211CA9D0E00D6E256 /* borderBottom.png */; };
+		6165927A11CA9D0E00D6E256 /* borderTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165927311CA9D0E00D6E256 /* borderTop.png */; };
+		6165927F11CA9D3200D6E256 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165927B11CA9D3200D6E256 /* Default.png */; };
+		6165928011CA9D3200D6E256 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165927C11CA9D3200D6E256 /* Icon.png */; };
+		6165928111CA9D3200D6E256 /* menuCorner.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165927D11CA9D3200D6E256 /* menuCorner.png */; };
+		6165928211CA9D3200D6E256 /* title.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165927E11CA9D3200D6E256 /* title.png */; };
+		6165928711CA9D4800D6E256 /* networkButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165928311CA9D4800D6E256 /* networkButton.png */; };
+		6165928811CA9D4800D6E256 /* playButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165928411CA9D4800D6E256 /* playButton.png */; };
+		6165928911CA9D4800D6E256 /* settingsButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165928511CA9D4800D6E256 /* settingsButton.png */; };
+		6165928A11CA9D4800D6E256 /* storeButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 6165928611CA9D4800D6E256 /* storeButton.png */; };
+		6165929E11CA9E2F00D6E256 /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */; };
 		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 */; };
@@ -78,10 +132,6 @@
 		6179883A114AA34C00BA94A9 /* uTeams.pas in Sources */ = {isa = PBXBuildFile; fileRef = 6179880C114AA34C00BA94A9 /* uTeams.pas */; };
 		6179883C114AA34C00BA94A9 /* uVisualGears.pas in Sources */ = {isa = PBXBuildFile; fileRef = 6179880E114AA34C00BA94A9 /* uVisualGears.pas */; };
 		6179883D114AA34C00BA94A9 /* uWorld.pas in Sources */ = {isa = PBXBuildFile; fileRef = 6179880F114AA34C00BA94A9 /* uWorld.pas */; };
-		6179885C114AA48A00BA94A9 /* CGPointUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = 61798856114AA48A00BA94A9 /* CGPointUtils.c */; };
-		61798869114AA4AA00BA94A9 /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 61798864114AA4AA00BA94A9 /* SDL_uikitappdelegate.m */; };
-		6179887D114AA4D000BA94A9 /* MainMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6179886F114AA4D000BA94A9 /* MainMenuViewController.m */; };
-		61798889114AA4E600BA94A9 /* GameSetup.m in Sources */ = {isa = PBXBuildFile; fileRef = 61798888114AA4E600BA94A9 /* GameSetup.m */; };
 		617988DB114AAA4200BA94A9 /* libSDLiPhoneOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 617988DA114AAA3900BA94A9 /* libSDLiPhoneOS.a */; };
 		6179891B114AAF2100BA94A9 /* libfreetype_arm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798916114AAF2100BA94A9 /* libfreetype_arm.a */; };
 		6179891C114AAF2100BA94A9 /* libfreetype_x86.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798917114AAF2100BA94A9 /* libfreetype_x86.a */; };
@@ -90,62 +140,15 @@
 		61798996114AB3FF00BA94A9 /* libSDL_mixer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798993114AB3FA00BA94A9 /* libSDL_mixer.a */; };
 		617989BE114AB47A00BA94A9 /* libSDL_net.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 617989BB114AB47500BA94A9 /* libSDL_net.a */; };
 		61798A14114AB65C00BA94A9 /* libSDL_ttf.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798A13114AB65600BA94A9 /* libSDL_ttf.a */; };
-		61798A2C114ADD2600BA94A9 /* backgroundBottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A1E114ADD2600BA94A9 /* backgroundBottom.png */; };
-		61798A2D114ADD2600BA94A9 /* backgroundCenter.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A1F114ADD2600BA94A9 /* backgroundCenter.png */; };
-		61798A2E114ADD2600BA94A9 /* backgroundLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A20114ADD2600BA94A9 /* backgroundLeft.png */; };
-		61798A2F114ADD2600BA94A9 /* backgroundRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A21114ADD2600BA94A9 /* backgroundRight.png */; };
-		61798A30114ADD2600BA94A9 /* backgroundTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A22114ADD2600BA94A9 /* backgroundTop.png */; };
-		61798A31114ADD2600BA94A9 /* borderBottom.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A23114ADD2600BA94A9 /* borderBottom.png */; };
-		61798A32114ADD2600BA94A9 /* borderTop.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A24114ADD2600BA94A9 /* borderTop.png */; };
-		61798A33114ADD2600BA94A9 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A25114ADD2600BA94A9 /* Default.png */; };
-		61798A34114ADD2600BA94A9 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A26114ADD2600BA94A9 /* Icon.png */; };
-		61798A35114ADD2600BA94A9 /* networkButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A27114ADD2600BA94A9 /* networkButton.png */; };
-		61798A36114ADD2600BA94A9 /* playButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A28114ADD2600BA94A9 /* playButton.png */; };
-		61798A37114ADD2600BA94A9 /* settingsButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A29114ADD2600BA94A9 /* settingsButton.png */; };
-		61798A38114ADD2600BA94A9 /* storeButton.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A2A114ADD2600BA94A9 /* storeButton.png */; };
-		61798A39114ADD2600BA94A9 /* title.png in Resources */ = {isa = PBXBuildFile; fileRef = 61798A2B114ADD2600BA94A9 /* title.png */; };
 		61799289114AE08700BA94A9 /* Data in Resources */ = {isa = PBXBuildFile; fileRef = 61798A5E114AE08600BA94A9 /* Data */; };
-		6179934F114BD5AB00BA94A9 /* menuCorner.png in Resources */ = {isa = PBXBuildFile; fileRef = 6179934E114BD5AB00BA94A9 /* menuCorner.png */; };
-		6179936B11501D3D00BA94A9 /* arrowDown.png in Resources */ = {isa = PBXBuildFile; fileRef = 6179936711501D3D00BA94A9 /* arrowDown.png */; };
-		6179936C11501D3D00BA94A9 /* arrowLeft.png in Resources */ = {isa = PBXBuildFile; fileRef = 6179936811501D3D00BA94A9 /* arrowLeft.png */; };
-		6179936D11501D3D00BA94A9 /* arrowRight.png in Resources */ = {isa = PBXBuildFile; fileRef = 6179936911501D3D00BA94A9 /* arrowRight.png */; };
-		6179936E11501D3D00BA94A9 /* arrowUp.png in Resources */ = {isa = PBXBuildFile; fileRef = 6179936A11501D3D00BA94A9 /* arrowUp.png */; };
-		617995321150403800BA94A9 /* joyPush.png in Resources */ = {isa = PBXBuildFile; fileRef = 617995311150403800BA94A9 /* joyPush.png */; };
-		6184DEA311795DBD00AF6EFA /* UIImageExtra.m in Sources */ = {isa = PBXBuildFile; fileRef = 6184DEA211795DBD00AF6EFA /* UIImageExtra.m */; };
-		618BE5931175126900F22556 /* LevelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 618BE5921175126900F22556 /* LevelViewController.m */; };
-		618BE60311751F4F00F22556 /* GravesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 618BE60211751F4F00F22556 /* GravesViewController.m */; };
-		618BE6A3117527CD00F22556 /* VoicesViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 618BE6A2117527CD00F22556 /* VoicesViewController.m */; };
-		619C51BF116E40FC0049FD84 /* CommodityFunctions.m in Sources */ = {isa = PBXBuildFile; fileRef = 619C51BE116E40FC0049FD84 /* CommodityFunctions.m */; };
-		619C5232116E4E810049FD84 /* FlagsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 619C5231116E4E810049FD84 /* FlagsViewController.m */; };
-		619C533E116E70050049FD84 /* FortsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 619C533D116E70050049FD84 /* FortsViewController.m */; };
 		61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61A117FE1168322700359010 /* CoreGraphics.framework */; };
-		61A118CA11683C7600359010 /* MainMenuViewController-iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61A118C911683C7600359010 /* MainMenuViewController-iPad.xib */; };
-		61A118CC11683C7A00359010 /* MainMenuViewController-iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 61A118CB11683C7A00359010 /* MainMenuViewController-iPhone.xib */; };
 		61A118D211683CD100359010 /* Background.png in Resources */ = {isa = PBXBuildFile; fileRef = 611FD9C81155A1F200C2203D /* Background.png */; };
 		61A118D311683CD100359010 /* HedgewarsTitle.png in Resources */ = {isa = PBXBuildFile; fileRef = 611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */; };
 		61A118D411683CD100359010 /* Multiplayer.png in Resources */ = {isa = PBXBuildFile; fileRef = 611FD9D11155A41000C2203D /* Multiplayer.png */; };
 		61A118D511683CD100359010 /* NetworkPlay.png in Resources */ = {isa = PBXBuildFile; fileRef = 611FD9CF1155A40700C2203D /* NetworkPlay.png */; };
-		61A11A4E1168D13600359010 /* PopoverMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A11A4D1168D13600359010 /* PopoverMenuViewController.m */; };
-		61A11AC91168DA9400359010 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A11AC81168DA9400359010 /* MasterViewController.m */; };
-		61A11ACF1168DB1B00359010 /* TeamSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A11ACE1168DB1B00359010 /* TeamSettingsViewController.m */; };
-		61A11AD61168DB3700359010 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A11AD51168DB3700359010 /* DetailViewController.m */; };
-		61A11AE11168DC6E00359010 /* SingleTeamViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A11AE01168DC6E00359010 /* SingleTeamViewController.m */; };
-		61A11AE41168DC9400359010 /* HogHatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A11AE31168DC9400359010 /* HogHatViewController.m */; };
-		61AA7ACA117FCC8200FDDD4D /* openalbridge_t.h in Headers */ = {isa = PBXBuildFile; fileRef = 61AA7AC9117FCC8200FDDD4D /* openalbridge_t.h */; };
-		61AE62C711A067FE008DC32E /* SplitViewRootController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61A11AC01168D8B600359010 /* SplitViewRootController.m */; };
-		61B22E0F1180FBF400B2FCE0 /* MapConfigViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61B22E0D1180FBF400B2FCE0 /* MapConfigViewController.m */; };
-		61C325451179A336001E70B1 /* globals.h in Headers */ = {isa = PBXBuildFile; fileRef = 61C3253B1179A336001E70B1 /* globals.h */; };
-		61C325461179A336001E70B1 /* loaders.c in Sources */ = {isa = PBXBuildFile; fileRef = 61C3253C1179A336001E70B1 /* loaders.c */; };
-		61C325471179A336001E70B1 /* loaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 61C3253D1179A336001E70B1 /* loaders.h */; };
-		61C325481179A336001E70B1 /* openalbridge.c in Sources */ = {isa = PBXBuildFile; fileRef = 61C3253E1179A336001E70B1 /* openalbridge.c */; };
-		61C325491179A336001E70B1 /* openalbridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 61C325401179A336001E70B1 /* openalbridge.h */; };
-		61C3254A1179A336001E70B1 /* wrappers.c in Sources */ = {isa = PBXBuildFile; fileRef = 61C325411179A336001E70B1 /* wrappers.c */; };
-		61C3254B1179A336001E70B1 /* wrappers.h in Headers */ = {isa = PBXBuildFile; fileRef = 61C325421179A336001E70B1 /* wrappers.h */; };
 		61C3255B1179A384001E70B1 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61C3255A1179A384001E70B1 /* OpenAL.framework */; };
 		61C325901179A732001E70B1 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61C3255A1179A384001E70B1 /* OpenAL.framework */; };
 		61C325A31179A7AD001E70B1 /* libopenalbridge.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61C3251D1179A300001E70B1 /* libopenalbridge.a */; };
-		61CE250D115E749A0098C467 /* OverlayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 61CE250C115E749A0098C467 /* OverlayViewController.m */; };
-		61CF4971117E702F00BF05B7 /* SquareButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 61CF4970117E702F00BF05B7 /* SquareButtonView.m */; };
 		922F64900F10F53100DC6EC0 /* libfpc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 928301170F10CAFC00CC5A3C /* libfpc.a */; };
 /* End PBXBuildFile section */
 
@@ -221,36 +224,114 @@
 		28FD14FF0DC6FC520079059D /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
 		28FD15070DC6FC5B0079059D /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Hedgewars_Prefix.pch; sourceTree = "<group>"; };
-		611B0A9F116B626E00112153 /* GeneralSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GeneralSettingsViewController.h; path = ../../cocoaTouch/GeneralSettingsViewController.h; sourceTree = SOURCE_ROOT; };
-		611B0AA0116B626E00112153 /* GeneralSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GeneralSettingsViewController.m; path = ../../cocoaTouch/GeneralSettingsViewController.m; sourceTree = SOURCE_ROOT; };
-		611E127C117BACC60044B62F /* GameConfigViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "GameConfigViewController-iPad.xib"; path = "../../cocoaTouch/xib/GameConfigViewController-iPad.xib"; sourceTree = SOURCE_ROOT; };
-		611E127E117BACCD0044B62F /* GameConfigViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "GameConfigViewController-iPhone.xib"; path = "../../cocoaTouch/xib/GameConfigViewController-iPhone.xib"; sourceTree = SOURCE_ROOT; };
 		611E12FE117BBBDA0044B62F /* Entitlements-Development.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Entitlements-Development.plist"; sourceTree = "<group>"; };
-		611E1314117BBE5A0044B62F /* WeaponSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WeaponSettingsViewController.h; path = ../../cocoaTouch/WeaponSettingsViewController.h; sourceTree = SOURCE_ROOT; };
-		611E1315117BBE5A0044B62F /* WeaponSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WeaponSettingsViewController.m; path = ../../cocoaTouch/WeaponSettingsViewController.m; sourceTree = SOURCE_ROOT; };
-		611E1317117BBE700044B62F /* SchemeSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SchemeSettingsViewController.h; path = ../../cocoaTouch/SchemeSettingsViewController.h; sourceTree = SOURCE_ROOT; };
-		611E1318117BBE700044B62F /* SchemeSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SchemeSettingsViewController.m; path = ../../cocoaTouch/SchemeSettingsViewController.m; sourceTree = SOURCE_ROOT; };
 		611F4D4A11B27A9900F9759A /* uScript.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uScript.pas; path = ../../hedgewars/uScript.pas; sourceTree = SOURCE_ROOT; };
 		611FD9C81155A1F200C2203D /* Background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Background.png; path = ../../QTfrontend/res/Background.png; sourceTree = SOURCE_ROOT; };
 		611FD9CB1155A28C00C2203D /* HedgewarsTitle.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = HedgewarsTitle.png; path = ../../QTfrontend/res/HedgewarsTitle.png; sourceTree = SOURCE_ROOT; };
 		611FD9CF1155A40700C2203D /* NetworkPlay.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = NetworkPlay.png; path = ../../QTfrontend/res/NetworkPlay.png; sourceTree = SOURCE_ROOT; };
 		611FD9D11155A41000C2203D /* Multiplayer.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Multiplayer.png; path = ../../QTfrontend/res/Multiplayer.png; sourceTree = SOURCE_ROOT; };
-		6122CD00116BECCA002648E9 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape.png"; path = "../../cocoaTouch/resources/Default-Landscape.png"; sourceTree = SOURCE_ROOT; };
+		6122CD00116BECCA002648E9 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape.png"; path = "Resources/Default-Landscape.png"; sourceTree = "<group>"; };
 		6127232E117DF752005B90CF /* SDL_image.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_image.xcodeproj; path = "../../../Library/SDL-1.3/SDL_image/Xcode_iPhone/SDL_image.xcodeproj"; sourceTree = SOURCE_ROOT; };
 		61272338117DF778005B90CF /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
-		61272422117E17CF005B90CF /* TeamConfigViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TeamConfigViewController.h; path = ../../cocoaTouch/TeamConfigViewController.h; sourceTree = SOURCE_ROOT; };
-		61272423117E17CF005B90CF /* TeamConfigViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TeamConfigViewController.m; path = ../../cocoaTouch/TeamConfigViewController.m; sourceTree = SOURCE_ROOT; };
-		612724D1117E28AF005B90CF /* HogButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HogButtonView.h; path = ../../cocoaTouch/otherSrc/HogButtonView.h; sourceTree = SOURCE_ROOT; };
-		612724D2117E28AF005B90CF /* HogButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HogButtonView.m; path = ../../cocoaTouch/otherSrc/HogButtonView.m; sourceTree = SOURCE_ROOT; };
 		61370652117B1D50004EE44A /* Entitlements-Distribution.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Entitlements-Distribution.plist"; sourceTree = "<group>"; };
-		61370673117B32EF004EE44A /* GameConfigViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameConfigViewController.h; path = ../../cocoaTouch/GameConfigViewController.h; sourceTree = SOURCE_ROOT; };
-		61370674117B32EF004EE44A /* GameConfigViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GameConfigViewController.m; path = ../../cocoaTouch/GameConfigViewController.m; sourceTree = SOURCE_ROOT; };
-		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; };
-		615FBA5311A93C9800B139F9 /* SingleSchemeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SingleSchemeViewController.h; path = ../../cocoaTouch/SingleSchemeViewController.h; sourceTree = SOURCE_ROOT; };
-		615FBA5411A93C9800B139F9 /* SingleSchemeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SingleSchemeViewController.m; path = ../../cocoaTouch/SingleSchemeViewController.m; 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; };
+		6151347D116C2803001F16D1 /* Icon-iPad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-iPad.png"; path = "Resources/Icon-iPad.png"; sourceTree = "<group>"; };
+		616591DE11CA9BA200D6E256 /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = "<group>"; };
+		616591DF11CA9BA200D6E256 /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = "<group>"; };
+		616591E011CA9BA200D6E256 /* FlagsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FlagsViewController.h; sourceTree = "<group>"; };
+		616591E111CA9BA200D6E256 /* FlagsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlagsViewController.m; sourceTree = "<group>"; };
+		616591E211CA9BA200D6E256 /* FortsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FortsViewController.h; sourceTree = "<group>"; };
+		616591E311CA9BA200D6E256 /* FortsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FortsViewController.m; sourceTree = "<group>"; };
+		616591E411CA9BA200D6E256 /* GameConfigViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameConfigViewController.h; sourceTree = "<group>"; };
+		616591E511CA9BA200D6E256 /* GameConfigViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameConfigViewController.m; sourceTree = "<group>"; };
+		616591E611CA9BA200D6E256 /* GameSetup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GameSetup.h; sourceTree = "<group>"; };
+		616591E711CA9BA200D6E256 /* GameSetup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GameSetup.m; sourceTree = "<group>"; };
+		616591E811CA9BA200D6E256 /* GeneralSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneralSettingsViewController.h; sourceTree = "<group>"; };
+		616591E911CA9BA200D6E256 /* GeneralSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneralSettingsViewController.m; sourceTree = "<group>"; };
+		616591EA11CA9BA200D6E256 /* GravesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GravesViewController.h; sourceTree = "<group>"; };
+		616591EB11CA9BA200D6E256 /* GravesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GravesViewController.m; sourceTree = "<group>"; };
+		616591EC11CA9BA200D6E256 /* HogHatViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HogHatViewController.h; sourceTree = "<group>"; };
+		616591ED11CA9BA200D6E256 /* HogHatViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HogHatViewController.m; sourceTree = "<group>"; };
+		616591EE11CA9BA200D6E256 /* LevelViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LevelViewController.h; sourceTree = "<group>"; };
+		616591EF11CA9BA200D6E256 /* LevelViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LevelViewController.m; sourceTree = "<group>"; };
+		616591F011CA9BA200D6E256 /* MainMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainMenuViewController.h; sourceTree = "<group>"; };
+		616591F111CA9BA200D6E256 /* MainMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainMenuViewController.m; sourceTree = "<group>"; };
+		616591F211CA9BA200D6E256 /* MapConfigViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapConfigViewController.h; sourceTree = "<group>"; };
+		616591F311CA9BA200D6E256 /* MapConfigViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapConfigViewController.m; sourceTree = "<group>"; };
+		616591F411CA9BA200D6E256 /* MasterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = "<group>"; };
+		616591F511CA9BA200D6E256 /* MasterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = "<group>"; };
+		616591F611CA9BA200D6E256 /* OverlayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OverlayViewController.h; sourceTree = "<group>"; };
+		616591F711CA9BA200D6E256 /* OverlayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OverlayViewController.m; sourceTree = "<group>"; };
+		616591F811CA9BA200D6E256 /* PopoverMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopoverMenuViewController.h; sourceTree = "<group>"; };
+		616591F911CA9BA200D6E256 /* PopoverMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PopoverMenuViewController.m; sourceTree = "<group>"; };
+		616591FA11CA9BA200D6E256 /* SchemeSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchemeSettingsViewController.h; sourceTree = "<group>"; };
+		616591FB11CA9BA200D6E256 /* SchemeSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SchemeSettingsViewController.m; sourceTree = "<group>"; };
+		616591FC11CA9BA200D6E256 /* SchemeWeaponConfigViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SchemeWeaponConfigViewController.h; sourceTree = "<group>"; };
+		616591FD11CA9BA200D6E256 /* SchemeWeaponConfigViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SchemeWeaponConfigViewController.m; sourceTree = "<group>"; };
+		616591FE11CA9BA200D6E256 /* SingleSchemeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleSchemeViewController.h; sourceTree = "<group>"; };
+		616591FF11CA9BA200D6E256 /* SingleSchemeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SingleSchemeViewController.m; sourceTree = "<group>"; };
+		6165920011CA9BA200D6E256 /* SingleTeamViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleTeamViewController.h; sourceTree = "<group>"; };
+		6165920111CA9BA200D6E256 /* SingleTeamViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SingleTeamViewController.m; sourceTree = "<group>"; };
+		6165920211CA9BA200D6E256 /* SplitViewRootController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SplitViewRootController.h; sourceTree = "<group>"; };
+		6165920311CA9BA200D6E256 /* SplitViewRootController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SplitViewRootController.m; sourceTree = "<group>"; };
+		6165920411CA9BA200D6E256 /* TeamConfigViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TeamConfigViewController.h; sourceTree = "<group>"; };
+		6165920511CA9BA200D6E256 /* TeamConfigViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TeamConfigViewController.m; sourceTree = "<group>"; };
+		6165920611CA9BA200D6E256 /* TeamSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TeamSettingsViewController.h; sourceTree = "<group>"; };
+		6165920711CA9BA200D6E256 /* TeamSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TeamSettingsViewController.m; sourceTree = "<group>"; };
+		6165920811CA9BA200D6E256 /* VoicesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VoicesViewController.h; sourceTree = "<group>"; };
+		6165920911CA9BA200D6E256 /* VoicesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VoicesViewController.m; sourceTree = "<group>"; };
+		6165920A11CA9BA200D6E256 /* WeaponSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeaponSettingsViewController.h; sourceTree = "<group>"; };
+		6165920B11CA9BA200D6E256 /* WeaponSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WeaponSettingsViewController.m; sourceTree = "<group>"; };
+		6165922311CA9BD500D6E256 /* CGPointUtils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = CGPointUtils.c; path = Classes/otherSrc/CGPointUtils.c; sourceTree = "<group>"; };
+		6165922411CA9BD500D6E256 /* CGPointUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGPointUtils.h; path = Classes/otherSrc/CGPointUtils.h; sourceTree = "<group>"; };
+		6165922511CA9BD500D6E256 /* CommodityFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommodityFunctions.h; path = Classes/otherSrc/CommodityFunctions.h; sourceTree = "<group>"; };
+		6165922611CA9BD500D6E256 /* CommodityFunctions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CommodityFunctions.m; path = Classes/otherSrc/CommodityFunctions.m; sourceTree = "<group>"; };
+		6165922711CA9BD500D6E256 /* HogButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HogButtonView.h; path = Classes/otherSrc/HogButtonView.h; sourceTree = "<group>"; };
+		6165922811CA9BD500D6E256 /* HogButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HogButtonView.m; path = Classes/otherSrc/HogButtonView.m; sourceTree = "<group>"; };
+		6165922911CA9BD500D6E256 /* PascalImports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PascalImports.h; path = Classes/otherSrc/PascalImports.h; sourceTree = "<group>"; };
+		6165922A11CA9BD500D6E256 /* SquareButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SquareButtonView.h; path = Classes/otherSrc/SquareButtonView.h; sourceTree = "<group>"; };
+		6165922B11CA9BD500D6E256 /* SquareButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SquareButtonView.m; path = Classes/otherSrc/SquareButtonView.m; sourceTree = "<group>"; };
+		6165922C11CA9BD500D6E256 /* UIImageExtra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIImageExtra.h; path = Classes/otherSrc/UIImageExtra.h; sourceTree = "<group>"; };
+		6165922D11CA9BD500D6E256 /* UIImageExtra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIImageExtra.m; path = Classes/otherSrc/UIImageExtra.m; sourceTree = "<group>"; };
+		6165923311CA9C4600D6E256 /* commands.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = commands.c; path = ../../misc/libopenalbridge/commands.c; sourceTree = SOURCE_ROOT; };
+		6165923411CA9C4600D6E256 /* commands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = commands.h; path = ../../misc/libopenalbridge/commands.h; sourceTree = SOURCE_ROOT; };
+		6165923511CA9C4600D6E256 /* globals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = globals.h; path = ../../misc/libopenalbridge/globals.h; sourceTree = SOURCE_ROOT; };
+		6165923611CA9C4600D6E256 /* loaders.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loaders.c; path = ../../misc/libopenalbridge/loaders.c; sourceTree = SOURCE_ROOT; };
+		6165923711CA9C4600D6E256 /* loaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = loaders.h; path = ../../misc/libopenalbridge/loaders.h; sourceTree = SOURCE_ROOT; };
+		6165923811CA9C4600D6E256 /* openalbridge_t.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = openalbridge_t.h; path = ../../misc/libopenalbridge/openalbridge_t.h; sourceTree = SOURCE_ROOT; };
+		6165923911CA9C4600D6E256 /* openalbridge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = openalbridge.c; path = ../../misc/libopenalbridge/openalbridge.c; sourceTree = SOURCE_ROOT; };
+		6165923A11CA9C4600D6E256 /* openalbridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = openalbridge.h; path = ../../misc/libopenalbridge/openalbridge.h; sourceTree = SOURCE_ROOT; };
+		6165923B11CA9C4600D6E256 /* wrappers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wrappers.c; path = ../../misc/libopenalbridge/wrappers.c; sourceTree = SOURCE_ROOT; };
+		6165923C11CA9C4600D6E256 /* wrappers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wrappers.h; path = ../../misc/libopenalbridge/wrappers.h; sourceTree = SOURCE_ROOT; };
+		6165924911CA9CB400D6E256 /* GameConfigViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "GameConfigViewController-iPad.xib"; path = "Resources/GameConfigViewController-iPad.xib"; sourceTree = SOURCE_ROOT; };
+		6165924A11CA9CB400D6E256 /* GameConfigViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "GameConfigViewController-iPhone.xib"; path = "Resources/GameConfigViewController-iPhone.xib"; sourceTree = SOURCE_ROOT; };
+		6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainMenuViewController-iPad.xib"; path = "Resources/MainMenuViewController-iPad.xib"; sourceTree = SOURCE_ROOT; };
+		6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainMenuViewController-iPhone.xib"; path = "Resources/MainMenuViewController-iPhone.xib"; sourceTree = SOURCE_ROOT; };
+		6165924D11CA9CB400D6E256 /* MapConfigViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MapConfigViewController-iPad.xib"; path = "Resources/MapConfigViewController-iPad.xib"; sourceTree = SOURCE_ROOT; };
+		6165924E11CA9CB400D6E256 /* MapConfigViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MapConfigViewController-iPhone.xib"; path = "Resources/MapConfigViewController-iPhone.xib"; sourceTree = SOURCE_ROOT; };
+		6165924F11CA9CB400D6E256 /* OverlayViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "OverlayViewController-iPad.xib"; path = "Resources/OverlayViewController-iPad.xib"; sourceTree = SOURCE_ROOT; };
+		6165925011CA9CB400D6E256 /* OverlayViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = OverlayViewController.xib; path = Resources/OverlayViewController.xib; sourceTree = SOURCE_ROOT; };
+		6165925911CA9CD300D6E256 /* arrowDown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowDown.png; path = Resources/arrowDown.png; sourceTree = "<group>"; };
+		6165925A11CA9CD300D6E256 /* arrowLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowLeft.png; path = Resources/arrowLeft.png; sourceTree = "<group>"; };
+		6165925B11CA9CD300D6E256 /* arrowRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowRight.png; path = Resources/arrowRight.png; sourceTree = "<group>"; };
+		6165925C11CA9CD300D6E256 /* arrowUp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowUp.png; path = Resources/arrowUp.png; sourceTree = "<group>"; };
+		6165925D11CA9CD300D6E256 /* joyPush.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyPush.png; path = Resources/joyPush.png; sourceTree = "<group>"; };
+		6165926D11CA9D0E00D6E256 /* backgroundBottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundBottom.png; path = Resources/backgroundBottom.png; sourceTree = "<group>"; };
+		6165926E11CA9D0E00D6E256 /* backgroundCenter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundCenter.png; path = Resources/backgroundCenter.png; sourceTree = "<group>"; };
+		6165926F11CA9D0E00D6E256 /* backgroundLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundLeft.png; path = Resources/backgroundLeft.png; sourceTree = "<group>"; };
+		6165927011CA9D0E00D6E256 /* backgroundRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundRight.png; path = Resources/backgroundRight.png; sourceTree = "<group>"; };
+		6165927111CA9D0E00D6E256 /* backgroundTop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundTop.png; path = Resources/backgroundTop.png; sourceTree = "<group>"; };
+		6165927211CA9D0E00D6E256 /* borderBottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = borderBottom.png; path = Resources/borderBottom.png; sourceTree = "<group>"; };
+		6165927311CA9D0E00D6E256 /* borderTop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = borderTop.png; path = Resources/borderTop.png; sourceTree = "<group>"; };
+		6165927B11CA9D3200D6E256 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/Default.png; sourceTree = "<group>"; };
+		6165927C11CA9D3200D6E256 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = Resources/Icon.png; sourceTree = "<group>"; };
+		6165927D11CA9D3200D6E256 /* menuCorner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menuCorner.png; path = Resources/menuCorner.png; sourceTree = "<group>"; };
+		6165927E11CA9D3200D6E256 /* title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title.png; path = Resources/title.png; sourceTree = "<group>"; };
+		6165928311CA9D4800D6E256 /* networkButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = networkButton.png; path = Resources/networkButton.png; sourceTree = "<group>"; };
+		6165928411CA9D4800D6E256 /* playButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = playButton.png; path = Resources/playButton.png; sourceTree = "<group>"; };
+		6165928511CA9D4800D6E256 /* settingsButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = settingsButton.png; path = Resources/settingsButton.png; sourceTree = "<group>"; };
+		6165928611CA9D4800D6E256 /* storeButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = storeButton.png; path = Resources/storeButton.png; sourceTree = "<group>"; };
+		6165929C11CA9E2F00D6E256 /* SDL_uikitappdelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_uikitappdelegate.h; path = Classes/otherSrc/SDL_uikitappdelegate.h; sourceTree = "<group>"; };
+		6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_uikitappdelegate.m; path = Classes/otherSrc/SDL_uikitappdelegate.m; sourceTree = "<group>"; };
 		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; };
@@ -290,15 +371,6 @@
 		6179880E114AA34C00BA94A9 /* uVisualGears.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uVisualGears.pas; path = ../../hedgewars/uVisualGears.pas; sourceTree = SOURCE_ROOT; };
 		6179880F114AA34C00BA94A9 /* uWorld.pas */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = uWorld.pas; path = ../../hedgewars/uWorld.pas; sourceTree = SOURCE_ROOT; };
 		61798852114AA44900BA94A9 /* config.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = config.inc; path = ../../hedgewars/config.inc; sourceTree = SOURCE_ROOT; };
-		61798856114AA48A00BA94A9 /* CGPointUtils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = CGPointUtils.c; path = ../../cocoaTouch/otherSrc/CGPointUtils.c; sourceTree = SOURCE_ROOT; };
-		61798857114AA48A00BA94A9 /* CGPointUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CGPointUtils.h; path = ../../cocoaTouch/otherSrc/CGPointUtils.h; sourceTree = SOURCE_ROOT; };
-		6179885A114AA48A00BA94A9 /* PascalImports.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PascalImports.h; path = ../../cocoaTouch/otherSrc/PascalImports.h; sourceTree = SOURCE_ROOT; };
-		61798863114AA4AA00BA94A9 /* SDL_uikitappdelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_uikitappdelegate.h; path = ../../cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h; sourceTree = SOURCE_ROOT; };
-		61798864114AA4AA00BA94A9 /* SDL_uikitappdelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SDL_uikitappdelegate.m; path = ../../cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m; sourceTree = SOURCE_ROOT; };
-		6179886E114AA4D000BA94A9 /* MainMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuViewController.h; path = ../../cocoaTouch/MainMenuViewController.h; sourceTree = SOURCE_ROOT; };
-		6179886F114AA4D000BA94A9 /* MainMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MainMenuViewController.m; path = ../../cocoaTouch/MainMenuViewController.m; sourceTree = SOURCE_ROOT; };
-		61798887114AA4E600BA94A9 /* GameSetup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameSetup.h; path = ../../cocoaTouch/GameSetup.h; sourceTree = SOURCE_ROOT; };
-		61798888114AA4E600BA94A9 /* GameSetup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GameSetup.m; path = ../../cocoaTouch/GameSetup.m; sourceTree = SOURCE_ROOT; };
 		617988D3114AAA3900BA94A9 /* SDLiPhoneOS.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDLiPhoneOS.xcodeproj; path = "../../../Library/SDL-1.3/SDL/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj"; sourceTree = SOURCE_ROOT; };
 		61798916114AAF2100BA94A9 /* libfreetype_arm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfreetype_arm.a; sourceTree = "<group>"; };
 		61798917114AAF2100BA94A9 /* libfreetype_x86.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libfreetype_x86.a; sourceTree = "<group>"; };
@@ -307,75 +379,11 @@
 		6179898B114AB3FA00BA94A9 /* SDL_mixer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_mixer.xcodeproj; path = "../../../Library/SDL-1.3/SDL_mixer/Xcode-iPhoneOS/SDL_mixer.xcodeproj"; sourceTree = SOURCE_ROOT; };
 		617989B3114AB47500BA94A9 /* SDL_net.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_net.xcodeproj; path = "../../../Library/SDL-1.3/SDL_net/Xcode-iPhoneOS/SDL_net.xcodeproj"; sourceTree = SOURCE_ROOT; };
 		61798A0B114AB65600BA94A9 /* SDL_ttf.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_ttf.xcodeproj; path = "../../../Library/SDL-1.3/SDL_ttf/Xcode-iPhoneOS/SDL_ttf.xcodeproj"; sourceTree = SOURCE_ROOT; };
-		61798A1E114ADD2600BA94A9 /* backgroundBottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundBottom.png; path = ../../cocoaTouch/resources/backgroundBottom.png; sourceTree = SOURCE_ROOT; };
-		61798A1F114ADD2600BA94A9 /* backgroundCenter.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundCenter.png; path = ../../cocoaTouch/resources/backgroundCenter.png; sourceTree = SOURCE_ROOT; };
-		61798A20114ADD2600BA94A9 /* backgroundLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundLeft.png; path = ../../cocoaTouch/resources/backgroundLeft.png; sourceTree = SOURCE_ROOT; };
-		61798A21114ADD2600BA94A9 /* backgroundRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundRight.png; path = ../../cocoaTouch/resources/backgroundRight.png; sourceTree = SOURCE_ROOT; };
-		61798A22114ADD2600BA94A9 /* backgroundTop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundTop.png; path = ../../cocoaTouch/resources/backgroundTop.png; sourceTree = SOURCE_ROOT; };
-		61798A23114ADD2600BA94A9 /* borderBottom.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = borderBottom.png; path = ../../cocoaTouch/resources/borderBottom.png; sourceTree = SOURCE_ROOT; };
-		61798A24114ADD2600BA94A9 /* borderTop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = borderTop.png; path = ../../cocoaTouch/resources/borderTop.png; sourceTree = SOURCE_ROOT; };
-		61798A25114ADD2600BA94A9 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ../../cocoaTouch/resources/Default.png; sourceTree = SOURCE_ROOT; };
-		61798A26114ADD2600BA94A9 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = ../../cocoaTouch/resources/Icon.png; sourceTree = SOURCE_ROOT; };
-		61798A27114ADD2600BA94A9 /* networkButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = networkButton.png; path = ../../cocoaTouch/resources/networkButton.png; sourceTree = SOURCE_ROOT; };
-		61798A28114ADD2600BA94A9 /* playButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = playButton.png; path = ../../cocoaTouch/resources/playButton.png; sourceTree = SOURCE_ROOT; };
-		61798A29114ADD2600BA94A9 /* settingsButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = settingsButton.png; path = ../../cocoaTouch/resources/settingsButton.png; sourceTree = SOURCE_ROOT; };
-		61798A2A114ADD2600BA94A9 /* storeButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = storeButton.png; path = ../../cocoaTouch/resources/storeButton.png; sourceTree = SOURCE_ROOT; };
-		61798A2B114ADD2600BA94A9 /* title.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = title.png; path = ../../cocoaTouch/resources/title.png; sourceTree = SOURCE_ROOT; };
 		61798A5E114AE08600BA94A9 /* Data */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Data; sourceTree = "<group>"; };
-		6179934E114BD5AB00BA94A9 /* menuCorner.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menuCorner.png; path = ../../cocoaTouch/resources/menuCorner.png; sourceTree = SOURCE_ROOT; };
-		6179936711501D3D00BA94A9 /* arrowDown.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowDown.png; path = ../../cocoaTouch/resources/arrowDown.png; sourceTree = SOURCE_ROOT; };
-		6179936811501D3D00BA94A9 /* arrowLeft.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowLeft.png; path = ../../cocoaTouch/resources/arrowLeft.png; sourceTree = SOURCE_ROOT; };
-		6179936911501D3D00BA94A9 /* arrowRight.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowRight.png; path = ../../cocoaTouch/resources/arrowRight.png; sourceTree = SOURCE_ROOT; };
-		6179936A11501D3D00BA94A9 /* arrowUp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = arrowUp.png; path = ../../cocoaTouch/resources/arrowUp.png; sourceTree = SOURCE_ROOT; };
-		617995311150403800BA94A9 /* joyPush.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyPush.png; path = ../../cocoaTouch/resources/joyPush.png; sourceTree = SOURCE_ROOT; };
-		6184DEA111795DBD00AF6EFA /* UIImageExtra.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UIImageExtra.h; path = ../../cocoaTouch/otherSrc/UIImageExtra.h; sourceTree = SOURCE_ROOT; };
-		6184DEA211795DBD00AF6EFA /* UIImageExtra.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = UIImageExtra.m; path = ../../cocoaTouch/otherSrc/UIImageExtra.m; sourceTree = SOURCE_ROOT; };
 		618736B8118CA28600123B23 /* GearDrawing.inc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.pascal; name = GearDrawing.inc; path = ../../hedgewars/GearDrawing.inc; sourceTree = SOURCE_ROOT; };
-		618BE5911175126900F22556 /* LevelViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LevelViewController.h; path = ../../cocoaTouch/LevelViewController.h; sourceTree = SOURCE_ROOT; };
-		618BE5921175126900F22556 /* LevelViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LevelViewController.m; path = ../../cocoaTouch/LevelViewController.m; sourceTree = SOURCE_ROOT; };
-		618BE60111751F4F00F22556 /* GravesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GravesViewController.h; path = ../../cocoaTouch/GravesViewController.h; sourceTree = SOURCE_ROOT; };
-		618BE60211751F4F00F22556 /* GravesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = GravesViewController.m; path = ../../cocoaTouch/GravesViewController.m; sourceTree = SOURCE_ROOT; };
-		618BE6A1117527CD00F22556 /* VoicesViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VoicesViewController.h; path = ../../cocoaTouch/VoicesViewController.h; sourceTree = SOURCE_ROOT; };
-		618BE6A2117527CD00F22556 /* VoicesViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VoicesViewController.m; path = ../../cocoaTouch/VoicesViewController.m; sourceTree = SOURCE_ROOT; };
-		619C51BD116E40FC0049FD84 /* CommodityFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommodityFunctions.h; path = ../../cocoaTouch/otherSrc/CommodityFunctions.h; sourceTree = SOURCE_ROOT; };
-		619C51BE116E40FC0049FD84 /* CommodityFunctions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CommodityFunctions.m; path = ../../cocoaTouch/otherSrc/CommodityFunctions.m; sourceTree = SOURCE_ROOT; };
-		619C5230116E4E800049FD84 /* FlagsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FlagsViewController.h; path = ../../cocoaTouch/FlagsViewController.h; sourceTree = SOURCE_ROOT; };
-		619C5231116E4E810049FD84 /* FlagsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FlagsViewController.m; path = ../../cocoaTouch/FlagsViewController.m; sourceTree = SOURCE_ROOT; };
-		619C533C116E70050049FD84 /* FortsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FortsViewController.h; path = ../../cocoaTouch/FortsViewController.h; sourceTree = SOURCE_ROOT; };
-		619C533D116E70050049FD84 /* FortsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FortsViewController.m; path = ../../cocoaTouch/FortsViewController.m; sourceTree = SOURCE_ROOT; };
 		61A117FE1168322700359010 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		61A118C911683C7600359010 /* MainMenuViewController-iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainMenuViewController-iPad.xib"; path = "../../cocoaTouch/xib/MainMenuViewController-iPad.xib"; sourceTree = SOURCE_ROOT; };
-		61A118CB11683C7A00359010 /* MainMenuViewController-iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = "MainMenuViewController-iPhone.xib"; path = "../../cocoaTouch/xib/MainMenuViewController-iPhone.xib"; sourceTree = SOURCE_ROOT; };
-		61A11A4C1168D13600359010 /* PopoverMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PopoverMenuViewController.h; path = ../../cocoaTouch/PopoverMenuViewController.h; sourceTree = SOURCE_ROOT; };
-		61A11A4D1168D13600359010 /* PopoverMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PopoverMenuViewController.m; path = ../../cocoaTouch/PopoverMenuViewController.m; sourceTree = SOURCE_ROOT; };
-		61A11ABF1168D8B600359010 /* SplitViewRootController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitViewRootController.h; path = ../../cocoaTouch/SplitViewRootController.h; sourceTree = SOURCE_ROOT; };
-		61A11AC01168D8B600359010 /* SplitViewRootController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SplitViewRootController.m; path = ../../cocoaTouch/SplitViewRootController.m; sourceTree = SOURCE_ROOT; };
-		61A11AC71168DA9400359010 /* MasterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MasterViewController.h; path = ../../cocoaTouch/MasterViewController.h; sourceTree = SOURCE_ROOT; };
-		61A11AC81168DA9400359010 /* MasterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MasterViewController.m; path = ../../cocoaTouch/MasterViewController.m; sourceTree = SOURCE_ROOT; };
-		61A11ACD1168DB1B00359010 /* TeamSettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TeamSettingsViewController.h; path = ../../cocoaTouch/TeamSettingsViewController.h; sourceTree = SOURCE_ROOT; };
-		61A11ACE1168DB1B00359010 /* TeamSettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TeamSettingsViewController.m; path = ../../cocoaTouch/TeamSettingsViewController.m; sourceTree = SOURCE_ROOT; };
-		61A11AD41168DB3700359010 /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DetailViewController.h; path = ../../cocoaTouch/DetailViewController.h; sourceTree = SOURCE_ROOT; };
-		61A11AD51168DB3700359010 /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DetailViewController.m; path = ../../cocoaTouch/DetailViewController.m; sourceTree = SOURCE_ROOT; };
-		61A11ADF1168DC6E00359010 /* SingleTeamViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SingleTeamViewController.h; path = ../../cocoaTouch/SingleTeamViewController.h; sourceTree = SOURCE_ROOT; };
-		61A11AE01168DC6E00359010 /* SingleTeamViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SingleTeamViewController.m; path = ../../cocoaTouch/SingleTeamViewController.m; sourceTree = SOURCE_ROOT; };
-		61A11AE21168DC9400359010 /* HogHatViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HogHatViewController.h; path = ../../cocoaTouch/HogHatViewController.h; sourceTree = SOURCE_ROOT; };
-		61A11AE31168DC9400359010 /* HogHatViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HogHatViewController.m; path = ../../cocoaTouch/HogHatViewController.m; sourceTree = SOURCE_ROOT; };
-		61AA7AC9117FCC8200FDDD4D /* openalbridge_t.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = openalbridge_t.h; path = ../../misc/openalbridge/openalbridge_t.h; sourceTree = SOURCE_ROOT; };
-		61B22E0C1180FBF400B2FCE0 /* MapConfigViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MapConfigViewController.h; path = ../../cocoaTouch/MapConfigViewController.h; sourceTree = SOURCE_ROOT; };
-		61B22E0D1180FBF400B2FCE0 /* MapConfigViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MapConfigViewController.m; path = ../../cocoaTouch/MapConfigViewController.m; sourceTree = SOURCE_ROOT; };
 		61C3251D1179A300001E70B1 /* libopenalbridge.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libopenalbridge.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		61C3253B1179A336001E70B1 /* globals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = globals.h; path = ../../misc/openalbridge/globals.h; sourceTree = SOURCE_ROOT; };
-		61C3253C1179A336001E70B1 /* loaders.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loaders.c; path = ../../misc/openalbridge/loaders.c; sourceTree = SOURCE_ROOT; };
-		61C3253D1179A336001E70B1 /* loaders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = loaders.h; path = ../../misc/openalbridge/loaders.h; sourceTree = SOURCE_ROOT; };
-		61C3253E1179A336001E70B1 /* openalbridge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = openalbridge.c; path = ../../misc/openalbridge/openalbridge.c; sourceTree = SOURCE_ROOT; };
-		61C325401179A336001E70B1 /* openalbridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = openalbridge.h; path = ../../misc/openalbridge/openalbridge.h; sourceTree = SOURCE_ROOT; };
-		61C325411179A336001E70B1 /* wrappers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wrappers.c; path = ../../misc/openalbridge/wrappers.c; sourceTree = SOURCE_ROOT; };
-		61C325421179A336001E70B1 /* wrappers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wrappers.h; path = ../../misc/openalbridge/wrappers.h; sourceTree = SOURCE_ROOT; };
 		61C3255A1179A384001E70B1 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; };
-		61CE250B115E749A0098C467 /* OverlayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OverlayViewController.h; path = ../../cocoaTouch/OverlayViewController.h; sourceTree = SOURCE_ROOT; };
-		61CE250C115E749A0098C467 /* OverlayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OverlayViewController.m; path = ../../cocoaTouch/OverlayViewController.m; sourceTree = SOURCE_ROOT; };
-		61CF496F117E702F00BF05B7 /* SquareButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SquareButtonView.h; path = ../../cocoaTouch/otherSrc/SquareButtonView.h; sourceTree = SOURCE_ROOT; };
-		61CF4970117E702F00BF05B7 /* SquareButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SquareButtonView.m; path = ../../cocoaTouch/otherSrc/SquareButtonView.m; sourceTree = SOURCE_ROOT; };
 		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		928301170F10CAFC00CC5A3C /* libfpc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libfpc.a; sourceTree = BUILT_PRODUCTS_DIR; };
 /* End PBXFileReference section */
@@ -420,9 +428,52 @@
 		080E96DDFE201D6D7F000001 /* Classes */ = {
 			isa = PBXGroup;
 			children = (
-				61A118481168371400359010 /* Frontend */,
-				61798887114AA4E600BA94A9 /* GameSetup.h */,
-				61798888114AA4E600BA94A9 /* GameSetup.m */,
+				616591DE11CA9BA200D6E256 /* DetailViewController.h */,
+				616591DF11CA9BA200D6E256 /* DetailViewController.m */,
+				616591E011CA9BA200D6E256 /* FlagsViewController.h */,
+				616591E111CA9BA200D6E256 /* FlagsViewController.m */,
+				616591E211CA9BA200D6E256 /* FortsViewController.h */,
+				616591E311CA9BA200D6E256 /* FortsViewController.m */,
+				616591E411CA9BA200D6E256 /* GameConfigViewController.h */,
+				616591E511CA9BA200D6E256 /* GameConfigViewController.m */,
+				616591E611CA9BA200D6E256 /* GameSetup.h */,
+				616591E711CA9BA200D6E256 /* GameSetup.m */,
+				616591E811CA9BA200D6E256 /* GeneralSettingsViewController.h */,
+				616591E911CA9BA200D6E256 /* GeneralSettingsViewController.m */,
+				616591EA11CA9BA200D6E256 /* GravesViewController.h */,
+				616591EB11CA9BA200D6E256 /* GravesViewController.m */,
+				616591EC11CA9BA200D6E256 /* HogHatViewController.h */,
+				616591ED11CA9BA200D6E256 /* HogHatViewController.m */,
+				616591EE11CA9BA200D6E256 /* LevelViewController.h */,
+				616591EF11CA9BA200D6E256 /* LevelViewController.m */,
+				616591F011CA9BA200D6E256 /* MainMenuViewController.h */,
+				616591F111CA9BA200D6E256 /* MainMenuViewController.m */,
+				616591F211CA9BA200D6E256 /* MapConfigViewController.h */,
+				616591F311CA9BA200D6E256 /* MapConfigViewController.m */,
+				616591F411CA9BA200D6E256 /* MasterViewController.h */,
+				616591F511CA9BA200D6E256 /* MasterViewController.m */,
+				616591F611CA9BA200D6E256 /* OverlayViewController.h */,
+				616591F711CA9BA200D6E256 /* OverlayViewController.m */,
+				616591F811CA9BA200D6E256 /* PopoverMenuViewController.h */,
+				616591F911CA9BA200D6E256 /* PopoverMenuViewController.m */,
+				616591FA11CA9BA200D6E256 /* SchemeSettingsViewController.h */,
+				616591FB11CA9BA200D6E256 /* SchemeSettingsViewController.m */,
+				616591FC11CA9BA200D6E256 /* SchemeWeaponConfigViewController.h */,
+				616591FD11CA9BA200D6E256 /* SchemeWeaponConfigViewController.m */,
+				616591FE11CA9BA200D6E256 /* SingleSchemeViewController.h */,
+				616591FF11CA9BA200D6E256 /* SingleSchemeViewController.m */,
+				6165920011CA9BA200D6E256 /* SingleTeamViewController.h */,
+				6165920111CA9BA200D6E256 /* SingleTeamViewController.m */,
+				6165920211CA9BA200D6E256 /* SplitViewRootController.h */,
+				6165920311CA9BA200D6E256 /* SplitViewRootController.m */,
+				6165920411CA9BA200D6E256 /* TeamConfigViewController.h */,
+				6165920511CA9BA200D6E256 /* TeamConfigViewController.m */,
+				6165920611CA9BA200D6E256 /* TeamSettingsViewController.h */,
+				6165920711CA9BA200D6E256 /* TeamSettingsViewController.m */,
+				6165920811CA9BA200D6E256 /* VoicesViewController.h */,
+				6165920911CA9BA200D6E256 /* VoicesViewController.m */,
+				6165920A11CA9BA200D6E256 /* WeaponSettingsViewController.h */,
+				6165920B11CA9BA200D6E256 /* WeaponSettingsViewController.m */,
 			);
 			path = Classes;
 			sourceTree = "<group>";
@@ -455,20 +506,20 @@
 		29B97315FDCFA39411CA2CEA /* Other Sources */ = {
 			isa = PBXGroup;
 			children = (
-				61798863114AA4AA00BA94A9 /* SDL_uikitappdelegate.h */,
-				61798864114AA4AA00BA94A9 /* SDL_uikitappdelegate.m */,
-				61C325371179A325001E70B1 /* openalbridge */,
-				612724D1117E28AF005B90CF /* HogButtonView.h */,
-				612724D2117E28AF005B90CF /* HogButtonView.m */,
-				61CF496F117E702F00BF05B7 /* SquareButtonView.h */,
-				61CF4970117E702F00BF05B7 /* SquareButtonView.m */,
-				6184DEA111795DBD00AF6EFA /* UIImageExtra.h */,
-				6184DEA211795DBD00AF6EFA /* UIImageExtra.m */,
-				61798857114AA48A00BA94A9 /* CGPointUtils.h */,
-				61798856114AA48A00BA94A9 /* CGPointUtils.c */,
-				619C51BD116E40FC0049FD84 /* CommodityFunctions.h */,
-				619C51BE116E40FC0049FD84 /* CommodityFunctions.m */,
-				6179885A114AA48A00BA94A9 /* PascalImports.h */,
+				6165929C11CA9E2F00D6E256 /* SDL_uikitappdelegate.h */,
+				6165929D11CA9E2F00D6E256 /* SDL_uikitappdelegate.m */,
+				6165924811CA9C4B00D6E256 /* libopenalbridge */,
+				6165922311CA9BD500D6E256 /* CGPointUtils.c */,
+				6165922411CA9BD500D6E256 /* CGPointUtils.h */,
+				6165922511CA9BD500D6E256 /* CommodityFunctions.h */,
+				6165922611CA9BD500D6E256 /* CommodityFunctions.m */,
+				6165922711CA9BD500D6E256 /* HogButtonView.h */,
+				6165922811CA9BD500D6E256 /* HogButtonView.m */,
+				6165922911CA9BD500D6E256 /* PascalImports.h */,
+				6165922A11CA9BD500D6E256 /* SquareButtonView.h */,
+				6165922B11CA9BD500D6E256 /* SquareButtonView.m */,
+				6165922C11CA9BD500D6E256 /* UIImageExtra.h */,
+				6165922D11CA9BD500D6E256 /* UIImageExtra.m */,
 				32CA4F630368D1EE00C91783 /* Hedgewars_Prefix.pch */,
 			);
 			name = "Other Sources";
@@ -483,10 +534,10 @@
 				6179936F11501D4100BA94A9 /* back panels */,
 				6179936611501D1E00BA94A9 /* joystick */,
 				61798A5E114AE08600BA94A9 /* Data */,
-				6179934E114BD5AB00BA94A9 /* menuCorner.png */,
-				61798A25114ADD2600BA94A9 /* Default.png */,
-				61798A26114ADD2600BA94A9 /* Icon.png */,
-				61798A2B114ADD2600BA94A9 /* title.png */,
+				6165927B11CA9D3200D6E256 /* Default.png */,
+				6165927C11CA9D3200D6E256 /* Icon.png */,
+				6165927D11CA9D3200D6E256 /* menuCorner.png */,
+				6165927E11CA9D3200D6E256 /* title.png */,
 				8D1107310486CEB800E47090 /* Info.plist */,
 			);
 			name = Resources;
@@ -531,33 +582,19 @@
 		6100DB1711544E8400F455E0 /* XIB */ = {
 			isa = PBXGroup;
 			children = (
-				617814E7118947A200C6A535 /* MapConfigViewController-iPad.xib */,
-				615A92901183E31C006CA772 /* MapConfigViewController-iPhone.xib */,
-				611E127C117BACC60044B62F /* GameConfigViewController-iPad.xib */,
-				61A118C911683C7600359010 /* MainMenuViewController-iPad.xib */,
-				611E127E117BACCD0044B62F /* GameConfigViewController-iPhone.xib */,
-				615134B0116C2C5F001F16D1 /* OverlayViewController.xib */,
-				61A118CB11683C7A00359010 /* MainMenuViewController-iPhone.xib */,
+				6165924911CA9CB400D6E256 /* GameConfigViewController-iPad.xib */,
+				6165924A11CA9CB400D6E256 /* GameConfigViewController-iPhone.xib */,
+				6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */,
+				6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */,
+				6165924D11CA9CB400D6E256 /* MapConfigViewController-iPad.xib */,
+				6165924E11CA9CB400D6E256 /* MapConfigViewController-iPhone.xib */,
+				6165924F11CA9CB400D6E256 /* OverlayViewController-iPad.xib */,
+				6165925011CA9CB400D6E256 /* OverlayViewController.xib */,
 			);
 			name = XIB;
 			path = Classes;
 			sourceTree = "<group>";
 		};
-		611B0A94116B621600112153 /* first level */ = {
-			isa = PBXGroup;
-			children = (
-				611B0A9F116B626E00112153 /* GeneralSettingsViewController.h */,
-				611B0AA0116B626E00112153 /* GeneralSettingsViewController.m */,
-				61A11ACD1168DB1B00359010 /* TeamSettingsViewController.h */,
-				61A11ACE1168DB1B00359010 /* TeamSettingsViewController.m */,
-				611E1314117BBE5A0044B62F /* WeaponSettingsViewController.h */,
-				611E1315117BBE5A0044B62F /* WeaponSettingsViewController.m */,
-				611E1317117BBE700044B62F /* SchemeSettingsViewController.h */,
-				611E1318117BBE700044B62F /* SchemeSettingsViewController.m */,
-			);
-			name = "first level";
-			sourceTree = "<group>";
-		};
 		6127232F117DF752005B90CF /* Products */ = {
 			isa = PBXGroup;
 			children = (
@@ -566,17 +603,21 @@
 			name = Products;
 			sourceTree = "<group>";
 		};
-		61370672117B32A3004EE44A /* Game Config */ = {
+		6165924811CA9C4B00D6E256 /* libopenalbridge */ = {
 			isa = PBXGroup;
 			children = (
-				61370673117B32EF004EE44A /* GameConfigViewController.h */,
-				61370674117B32EF004EE44A /* GameConfigViewController.m */,
-				61B22E0C1180FBF400B2FCE0 /* MapConfigViewController.h */,
-				61B22E0D1180FBF400B2FCE0 /* MapConfigViewController.m */,
-				61272422117E17CF005B90CF /* TeamConfigViewController.h */,
-				61272423117E17CF005B90CF /* TeamConfigViewController.m */,
+				6165923311CA9C4600D6E256 /* commands.c */,
+				6165923411CA9C4600D6E256 /* commands.h */,
+				6165923511CA9C4600D6E256 /* globals.h */,
+				6165923611CA9C4600D6E256 /* loaders.c */,
+				6165923711CA9C4600D6E256 /* loaders.h */,
+				6165923811CA9C4600D6E256 /* openalbridge_t.h */,
+				6165923911CA9C4600D6E256 /* openalbridge.c */,
+				6165923A11CA9C4600D6E256 /* openalbridge.h */,
+				6165923B11CA9C4600D6E256 /* wrappers.c */,
+				6165923C11CA9C4600D6E256 /* wrappers.h */,
 			);
-			name = "Game Config";
+			name = libopenalbridge;
 			sourceTree = "<group>";
 		};
 		61798892114AA56300BA94A9 /* inc */ = {
@@ -628,11 +669,11 @@
 		6179936611501D1E00BA94A9 /* joystick */ = {
 			isa = PBXGroup;
 			children = (
-				617995311150403800BA94A9 /* joyPush.png */,
-				6179936711501D3D00BA94A9 /* arrowDown.png */,
-				6179936811501D3D00BA94A9 /* arrowLeft.png */,
-				6179936911501D3D00BA94A9 /* arrowRight.png */,
-				6179936A11501D3D00BA94A9 /* arrowUp.png */,
+				6165925911CA9CD300D6E256 /* arrowDown.png */,
+				6165925A11CA9CD300D6E256 /* arrowLeft.png */,
+				6165925B11CA9CD300D6E256 /* arrowRight.png */,
+				6165925C11CA9CD300D6E256 /* arrowUp.png */,
+				6165925D11CA9CD300D6E256 /* joyPush.png */,
 			);
 			name = joystick;
 			sourceTree = "<group>";
@@ -640,13 +681,13 @@
 		6179936F11501D4100BA94A9 /* back panels */ = {
 			isa = PBXGroup;
 			children = (
-				61798A1E114ADD2600BA94A9 /* backgroundBottom.png */,
-				61798A1F114ADD2600BA94A9 /* backgroundCenter.png */,
-				61798A20114ADD2600BA94A9 /* backgroundLeft.png */,
-				61798A21114ADD2600BA94A9 /* backgroundRight.png */,
-				61798A22114ADD2600BA94A9 /* backgroundTop.png */,
-				61798A23114ADD2600BA94A9 /* borderBottom.png */,
-				61798A24114ADD2600BA94A9 /* borderTop.png */,
+				6165926D11CA9D0E00D6E256 /* backgroundBottom.png */,
+				6165926E11CA9D0E00D6E256 /* backgroundCenter.png */,
+				6165926F11CA9D0E00D6E256 /* backgroundLeft.png */,
+				6165927011CA9D0E00D6E256 /* backgroundRight.png */,
+				6165927111CA9D0E00D6E256 /* backgroundTop.png */,
+				6165927211CA9D0E00D6E256 /* borderBottom.png */,
+				6165927311CA9D0E00D6E256 /* borderTop.png */,
 			);
 			name = "back panels";
 			sourceTree = "<group>";
@@ -654,90 +695,14 @@
 		6179937011501D5800BA94A9 /* buttons */ = {
 			isa = PBXGroup;
 			children = (
-				61798A27114ADD2600BA94A9 /* networkButton.png */,
-				61798A28114ADD2600BA94A9 /* playButton.png */,
-				61798A29114ADD2600BA94A9 /* settingsButton.png */,
-				61798A2A114ADD2600BA94A9 /* storeButton.png */,
+				6165928311CA9D4800D6E256 /* networkButton.png */,
+				6165928411CA9D4800D6E256 /* playButton.png */,
+				6165928511CA9D4800D6E256 /* settingsButton.png */,
+				6165928611CA9D4800D6E256 /* storeButton.png */,
 			);
 			name = buttons;
 			sourceTree = "<group>";
 		};
-		618BE596117512A300F22556 /* third level */ = {
-			isa = PBXGroup;
-			children = (
-				61A11AE21168DC9400359010 /* HogHatViewController.h */,
-				61A11AE31168DC9400359010 /* HogHatViewController.m */,
-				618BE60111751F4F00F22556 /* GravesViewController.h */,
-				618BE60211751F4F00F22556 /* GravesViewController.m */,
-				618BE6A1117527CD00F22556 /* VoicesViewController.h */,
-				618BE6A2117527CD00F22556 /* VoicesViewController.m */,
-				619C533C116E70050049FD84 /* FortsViewController.h */,
-				619C533D116E70050049FD84 /* FortsViewController.m */,
-				619C5230116E4E800049FD84 /* FlagsViewController.h */,
-				619C5231116E4E810049FD84 /* FlagsViewController.m */,
-				618BE5911175126900F22556 /* LevelViewController.h */,
-				618BE5921175126900F22556 /* LevelViewController.m */,
-			);
-			name = "third level";
-			sourceTree = "<group>";
-		};
-		61A118481168371400359010 /* Frontend */ = {
-			isa = PBXGroup;
-			children = (
-				61370672117B32A3004EE44A /* Game Config */,
-				61A11AC31168DA2B00359010 /* Settings */,
-				6179886E114AA4D000BA94A9 /* MainMenuViewController.h */,
-				6179886F114AA4D000BA94A9 /* MainMenuViewController.m */,
-				61CE250B115E749A0098C467 /* OverlayViewController.h */,
-				61CE250C115E749A0098C467 /* OverlayViewController.m */,
-				61A11A4C1168D13600359010 /* PopoverMenuViewController.h */,
-				61A11A4D1168D13600359010 /* PopoverMenuViewController.m */,
-			);
-			name = Frontend;
-			sourceTree = "<group>";
-		};
-		61A11AC31168DA2B00359010 /* Settings */ = {
-			isa = PBXGroup;
-			children = (
-				61A11ABF1168D8B600359010 /* SplitViewRootController.h */,
-				61A11AC01168D8B600359010 /* SplitViewRootController.m */,
-				61A11AC71168DA9400359010 /* MasterViewController.h */,
-				61A11AC81168DA9400359010 /* MasterViewController.m */,
-				61A11AD41168DB3700359010 /* DetailViewController.h */,
-				61A11AD51168DB3700359010 /* DetailViewController.m */,
-				611B0A94116B621600112153 /* first level */,
-				61A11AD01168DB1F00359010 /* second level */,
-				618BE596117512A300F22556 /* third level */,
-			);
-			name = Settings;
-			sourceTree = "<group>";
-		};
-		61A11AD01168DB1F00359010 /* second level */ = {
-			isa = PBXGroup;
-			children = (
-				61A11ADF1168DC6E00359010 /* SingleTeamViewController.h */,
-				61A11AE01168DC6E00359010 /* SingleTeamViewController.m */,
-				615FBA5311A93C9800B139F9 /* SingleSchemeViewController.h */,
-				615FBA5411A93C9800B139F9 /* SingleSchemeViewController.m */,
-			);
-			name = "second level";
-			sourceTree = "<group>";
-		};
-		61C325371179A325001E70B1 /* openalbridge */ = {
-			isa = PBXGroup;
-			children = (
-				61AA7AC9117FCC8200FDDD4D /* openalbridge_t.h */,
-				61C3253B1179A336001E70B1 /* globals.h */,
-				61C3253C1179A336001E70B1 /* loaders.c */,
-				61C3253D1179A336001E70B1 /* loaders.h */,
-				61C3253E1179A336001E70B1 /* openalbridge.c */,
-				61C325401179A336001E70B1 /* openalbridge.h */,
-				61C325411179A336001E70B1 /* wrappers.c */,
-				61C325421179A336001E70B1 /* wrappers.h */,
-			);
-			name = openalbridge;
-			sourceTree = "<group>";
-		};
 		9283015C0F10E48900CC5A3C /* Pascal Sources */ = {
 			isa = PBXGroup;
 			children = (
@@ -787,12 +752,12 @@
 			isa = PBXHeadersBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				61C325451179A336001E70B1 /* globals.h in Headers */,
-				61C325471179A336001E70B1 /* loaders.h in Headers */,
-				61C325491179A336001E70B1 /* openalbridge.h in Headers */,
-				61C3254B1179A336001E70B1 /* wrappers.h in Headers */,
-				61AA7ACA117FCC8200FDDD4D /* openalbridge_t.h in Headers */,
-				615FBA5511A93C9800B139F9 /* SingleSchemeViewController.h in Headers */,
+				6165923E11CA9C4600D6E256 /* commands.h in Headers */,
+				6165923F11CA9C4600D6E256 /* globals.h in Headers */,
+				6165924111CA9C4600D6E256 /* loaders.h in Headers */,
+				6165924211CA9C4600D6E256 /* openalbridge_t.h in Headers */,
+				6165924411CA9C4600D6E256 /* openalbridge.h in Headers */,
+				6165924611CA9C4600D6E256 /* wrappers.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -944,38 +909,39 @@
 				61A118D311683CD100359010 /* HedgewarsTitle.png in Resources */,
 				61A118D411683CD100359010 /* Multiplayer.png in Resources */,
 				61A118D511683CD100359010 /* NetworkPlay.png in Resources */,
-				61798A2C114ADD2600BA94A9 /* backgroundBottom.png in Resources */,
-				61798A2D114ADD2600BA94A9 /* backgroundCenter.png in Resources */,
-				61798A2E114ADD2600BA94A9 /* backgroundLeft.png in Resources */,
-				61798A2F114ADD2600BA94A9 /* backgroundRight.png in Resources */,
-				61798A30114ADD2600BA94A9 /* backgroundTop.png in Resources */,
-				61798A31114ADD2600BA94A9 /* borderBottom.png in Resources */,
-				61798A32114ADD2600BA94A9 /* borderTop.png in Resources */,
-				61798A33114ADD2600BA94A9 /* Default.png in Resources */,
-				61798A34114ADD2600BA94A9 /* Icon.png in Resources */,
-				61798A35114ADD2600BA94A9 /* networkButton.png in Resources */,
-				61798A36114ADD2600BA94A9 /* playButton.png in Resources */,
-				61798A37114ADD2600BA94A9 /* settingsButton.png in Resources */,
-				61798A38114ADD2600BA94A9 /* storeButton.png in Resources */,
-				61798A39114ADD2600BA94A9 /* title.png in Resources */,
 				61799289114AE08700BA94A9 /* Data in Resources */,
-				6179934F114BD5AB00BA94A9 /* menuCorner.png in Resources */,
-				6179936B11501D3D00BA94A9 /* arrowDown.png in Resources */,
-				6179936C11501D3D00BA94A9 /* arrowLeft.png in Resources */,
-				6179936D11501D3D00BA94A9 /* arrowRight.png in Resources */,
-				6179936E11501D3D00BA94A9 /* arrowUp.png in Resources */,
-				617995321150403800BA94A9 /* joyPush.png in Resources */,
-				61A118CA11683C7600359010 /* MainMenuViewController-iPad.xib in Resources */,
-				61A118CC11683C7A00359010 /* MainMenuViewController-iPhone.xib in Resources */,
 				6122CD01116BECCA002648E9 /* Default-Landscape.png in Resources */,
 				6151347E116C2803001F16D1 /* Icon-iPad.png in Resources */,
-				615134B1116C2C5F001F16D1 /* OverlayViewController.xib in Resources */,
 				61370653117B1D50004EE44A /* Entitlements-Distribution.plist in Resources */,
-				611E127D117BACC60044B62F /* GameConfigViewController-iPad.xib in Resources */,
-				611E127F117BACCD0044B62F /* GameConfigViewController-iPhone.xib in Resources */,
 				611E12FF117BBBDA0044B62F /* Entitlements-Development.plist in Resources */,
-				615A92911183E31C006CA772 /* MapConfigViewController-iPhone.xib in Resources */,
-				617814E8118947A200C6A535 /* MapConfigViewController-iPad.xib in Resources */,
+				6165925111CA9CB400D6E256 /* GameConfigViewController-iPad.xib in Resources */,
+				6165925211CA9CB400D6E256 /* GameConfigViewController-iPhone.xib in Resources */,
+				6165925311CA9CB400D6E256 /* MainMenuViewController-iPad.xib in Resources */,
+				6165925411CA9CB400D6E256 /* MainMenuViewController-iPhone.xib in Resources */,
+				6165925511CA9CB400D6E256 /* MapConfigViewController-iPad.xib in Resources */,
+				6165925611CA9CB400D6E256 /* MapConfigViewController-iPhone.xib in Resources */,
+				6165925711CA9CB400D6E256 /* OverlayViewController-iPad.xib in Resources */,
+				6165925811CA9CB400D6E256 /* OverlayViewController.xib in Resources */,
+				6165925E11CA9CD300D6E256 /* arrowDown.png in Resources */,
+				6165925F11CA9CD300D6E256 /* arrowLeft.png in Resources */,
+				6165926011CA9CD300D6E256 /* arrowRight.png in Resources */,
+				6165926111CA9CD300D6E256 /* arrowUp.png in Resources */,
+				6165926211CA9CD300D6E256 /* joyPush.png in Resources */,
+				6165927411CA9D0E00D6E256 /* backgroundBottom.png in Resources */,
+				6165927511CA9D0E00D6E256 /* backgroundCenter.png in Resources */,
+				6165927611CA9D0E00D6E256 /* backgroundLeft.png in Resources */,
+				6165927711CA9D0E00D6E256 /* backgroundRight.png in Resources */,
+				6165927811CA9D0E00D6E256 /* backgroundTop.png in Resources */,
+				6165927911CA9D0E00D6E256 /* borderBottom.png in Resources */,
+				6165927A11CA9D0E00D6E256 /* borderTop.png in Resources */,
+				6165927F11CA9D3200D6E256 /* Default.png in Resources */,
+				6165928011CA9D3200D6E256 /* Icon.png in Resources */,
+				6165928111CA9D3200D6E256 /* menuCorner.png in Resources */,
+				6165928211CA9D3200D6E256 /* title.png in Resources */,
+				6165928711CA9D4800D6E256 /* networkButton.png in Resources */,
+				6165928811CA9D4800D6E256 /* playButton.png in Resources */,
+				6165928911CA9D4800D6E256 /* settingsButton.png in Resources */,
+				6165928A11CA9D4800D6E256 /* storeButton.png in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -993,7 +959,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\nsvn export --force ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels/.svn*\n\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,KnockBall,Ruler,BasketBall}\n\n#the following ones must be removed when their support is implemented\n\n#delete some voices\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/{Classic,British,Mobster,Pirate,Robot,Russian,Singer,Surfer}\n\n#delete all names\nrm -rf ${PROJECT_DIR}/Data/Names/\n\n#delete all missions\nrm -rf ${PROJECT_DIR}/Data/Missions/\n\n#delete all reserved hats\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/";
+			shellScript = "#copy new stuff over old stuff\nrm -rf ${PROJECT_DIR}/Data\ncp -R ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\n\n#copy some files from QTfrontend/res\nmkdir ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/btn*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp ${PROJECT_DIR}/../../QTfrontend/res/icon*.png ${PROJECT_DIR}/Data/Graphics/Btn\ncp -R ${PROJECT_DIR}/../../QTfrontend/res/botlevels ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hedgehog/botlevels/.svn*\n\n#delete all CMakeLists.txt and image source files\nfind ${PROJECT_DIR}/Data -name CMakeLists.txt -delete\nfind ${PROJECT_DIR}/Data -name *.svg -delete\nfind ${PROJECT_DIR}/Data -name *.sifz -delete\nfind ${PROJECT_DIR}/Data -name *.xcf -delete\n\n#delete desktop frontend translation\nrm -rf ${PROJECT_DIR}/Data/Locale/hedgewars_*\n\n#delete dummy maps\nrm -rf ${PROJECT_DIR}/Data/Maps/{test*,KnockBall,Ruler,BasketBall}\n\n#the following ones must be removed when their support is implemented\n\n#delete some voices\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/{Classic,British,Mobster,Pirate,Robot,Russian,Singer,Surfer}\n\n#delete all names\nrm -rf ${PROJECT_DIR}/Data/Names/\n\n#delete all missions\nrm -rf ${PROJECT_DIR}/Data/Missions/\n\n#delete all reserved hats\nrm -rf ${PROJECT_DIR}/Data/Graphics/Hats/Reserved/";
 			showEnvVarsInLog = 0;
 		};
 		9283011B0F10CB2D00CC5A3C /* Build libfpc.a */ = {
@@ -1067,35 +1033,36 @@
 				6179883A114AA34C00BA94A9 /* uTeams.pas in Sources */,
 				6179883C114AA34C00BA94A9 /* uVisualGears.pas in Sources */,
 				6179883D114AA34C00BA94A9 /* uWorld.pas in Sources */,
-				6179885C114AA48A00BA94A9 /* CGPointUtils.c in Sources */,
-				61798869114AA4AA00BA94A9 /* SDL_uikitappdelegate.m in Sources */,
-				6179887D114AA4D000BA94A9 /* MainMenuViewController.m in Sources */,
-				61798889114AA4E600BA94A9 /* GameSetup.m in Sources */,
-				61CE250D115E749A0098C467 /* OverlayViewController.m in Sources */,
-				61A11A4E1168D13600359010 /* PopoverMenuViewController.m in Sources */,
-				61A11AC91168DA9400359010 /* MasterViewController.m in Sources */,
-				61A11ACF1168DB1B00359010 /* TeamSettingsViewController.m in Sources */,
-				61A11AD61168DB3700359010 /* DetailViewController.m in Sources */,
-				61A11AE11168DC6E00359010 /* SingleTeamViewController.m in Sources */,
-				61A11AE41168DC9400359010 /* HogHatViewController.m in Sources */,
-				611B0AA1116B626E00112153 /* GeneralSettingsViewController.m in Sources */,
-				619C51BF116E40FC0049FD84 /* CommodityFunctions.m in Sources */,
-				619C5232116E4E810049FD84 /* FlagsViewController.m in Sources */,
-				619C533E116E70050049FD84 /* FortsViewController.m in Sources */,
-				618BE5931175126900F22556 /* LevelViewController.m in Sources */,
-				618BE60311751F4F00F22556 /* GravesViewController.m in Sources */,
-				618BE6A3117527CD00F22556 /* VoicesViewController.m in Sources */,
-				6184DEA311795DBD00AF6EFA /* UIImageExtra.m in Sources */,
-				61370676117B32EF004EE44A /* GameConfigViewController.m in Sources */,
-				611E1316117BBE5A0044B62F /* WeaponSettingsViewController.m in Sources */,
-				611E1319117BBE700044B62F /* SchemeSettingsViewController.m in Sources */,
-				61272424117E17CF005B90CF /* TeamConfigViewController.m in Sources */,
-				612724D3117E28AF005B90CF /* HogButtonView.m in Sources */,
-				61CF4971117E702F00BF05B7 /* SquareButtonView.m in Sources */,
-				61B22E0F1180FBF400B2FCE0 /* MapConfigViewController.m in Sources */,
-				61AE62C711A067FE008DC32E /* SplitViewRootController.m in Sources */,
-				615FBA5811A93D6700B139F9 /* SingleSchemeViewController.m in Sources */,
 				611F4D4B11B27A9900F9759A /* uScript.pas in Sources */,
+				6165920C11CA9BA200D6E256 /* DetailViewController.m in Sources */,
+				6165920D11CA9BA200D6E256 /* FlagsViewController.m in Sources */,
+				6165920E11CA9BA200D6E256 /* FortsViewController.m in Sources */,
+				6165920F11CA9BA200D6E256 /* GameConfigViewController.m in Sources */,
+				6165921011CA9BA200D6E256 /* GameSetup.m in Sources */,
+				6165921111CA9BA200D6E256 /* GeneralSettingsViewController.m in Sources */,
+				6165921211CA9BA200D6E256 /* GravesViewController.m in Sources */,
+				6165921311CA9BA200D6E256 /* HogHatViewController.m in Sources */,
+				6165921411CA9BA200D6E256 /* LevelViewController.m in Sources */,
+				6165921511CA9BA200D6E256 /* MainMenuViewController.m in Sources */,
+				6165921611CA9BA200D6E256 /* MapConfigViewController.m in Sources */,
+				6165921711CA9BA200D6E256 /* MasterViewController.m in Sources */,
+				6165921811CA9BA200D6E256 /* OverlayViewController.m in Sources */,
+				6165921911CA9BA200D6E256 /* PopoverMenuViewController.m in Sources */,
+				6165921A11CA9BA200D6E256 /* SchemeSettingsViewController.m in Sources */,
+				6165921B11CA9BA200D6E256 /* SchemeWeaponConfigViewController.m in Sources */,
+				6165921C11CA9BA200D6E256 /* SingleSchemeViewController.m in Sources */,
+				6165921D11CA9BA200D6E256 /* SingleTeamViewController.m in Sources */,
+				6165921E11CA9BA200D6E256 /* SplitViewRootController.m in Sources */,
+				6165921F11CA9BA200D6E256 /* TeamConfigViewController.m in Sources */,
+				6165922011CA9BA200D6E256 /* TeamSettingsViewController.m in Sources */,
+				6165922111CA9BA200D6E256 /* VoicesViewController.m in Sources */,
+				6165922211CA9BA200D6E256 /* WeaponSettingsViewController.m in Sources */,
+				6165922E11CA9BD500D6E256 /* CGPointUtils.c in Sources */,
+				6165922F11CA9BD500D6E256 /* CommodityFunctions.m in Sources */,
+				6165923011CA9BD500D6E256 /* HogButtonView.m in Sources */,
+				6165923111CA9BD500D6E256 /* SquareButtonView.m in Sources */,
+				6165923211CA9BD500D6E256 /* UIImageExtra.m in Sources */,
+				6165929E11CA9E2F00D6E256 /* SDL_uikitappdelegate.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1103,9 +1070,10 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				61C325461179A336001E70B1 /* loaders.c in Sources */,
-				61C325481179A336001E70B1 /* openalbridge.c in Sources */,
-				61C3254A1179A336001E70B1 /* wrappers.c in Sources */,
+				6165923D11CA9C4600D6E256 /* commands.c in Sources */,
+				6165924011CA9C4600D6E256 /* loaders.c in Sources */,
+				6165924311CA9C4600D6E256 /* openalbridge.c in Sources */,
+				6165924511CA9C4600D6E256 /* wrappers.c in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1483,7 +1451,7 @@
 		C01FCF4F08A954540054247B /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
+				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				CODE_SIGN_IDENTITY = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
Binary file project_files/HedgewarsMobile/Resources/Default-Landscape.png has changed
Binary file project_files/HedgewarsMobile/Resources/Default.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/GameConfigViewController-iPad.xib	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,489 @@
+<?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>
+		</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="841351856">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBProxyObject" id="606714003">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+			</object>
+			<object class="IBUIView" id="766721923">
+				<nil key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUIToolbar" id="836721772">
+						<reference key="NSNextResponder" ref="766721923"/>
+						<int key="NSvFlags">266</int>
+						<string key="NSFrame">{{0, 724}, {1024, 44}}</string>
+						<reference key="NSSuperview" ref="766721923"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<object class="NSMutableArray" key="IBUIItems">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBUIBarButtonItem" id="80281356">
+								<string key="IBUITitle">Back</string>
+								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+								<int key="IBUIStyle">1</int>
+								<reference key="IBUIToolbar" ref="836721772"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="716161941">
+								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+								<reference key="IBUIToolbar" ref="836721772"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<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="836721772"/>
+							</object>
+						</object>
+					</object>
+				</object>
+				<string key="NSFrameSize">{1024, 768}</string>
+				<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>
+				</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="841351856"/>
+						<reference key="destination" ref="766721923"/>
+					</object>
+					<int key="connectionID">3</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="80281356"/>
+						<reference key="destination" ref="841351856"/>
+					</object>
+					<int key="connectionID">17</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="919181414"/>
+						<reference key="destination" ref="841351856"/>
+					</object>
+					<int key="connectionID">23</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="841351856"/>
+						<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="606714003"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">2</int>
+						<reference key="object" ref="766721923"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="836721772"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">15</int>
+						<reference key="object" ref="836721772"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<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="80281356"/>
+						<reference key="parent" ref="836721772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">18</int>
+						<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>
+			<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>15.IBPluginDependency</string>
+					<string>16.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>
+					<string>GameConfigViewController</string>
+					<string>UIResponder</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>{{285, -28}, {1024, 768}}</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">29</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">GameConfigViewController</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>buttonPressed:</string>
+							<string>segmentPressed:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">../../cocoaTouch/GameConfigViewController.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="786211723">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIBarButtonItem</string>
+					<string key="superclassName">UIBarItem</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIBarItem</string>
+					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIBarItem.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">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">UIToolbar</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIToolbar.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="3100" 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>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/GameConfigViewController-iPhone.xib	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,640 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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="20"/>
+		</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="841351856">
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="606714003">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUIView" id="766721923">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUIToolbar" id="836721772">
+						<reference key="NSNextResponder" ref="766721923"/>
+						<int key="NSvFlags">266</int>
+						<object class="NSMutableArray" key="NSSubviews">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBUISegmentedControl" id="563596142">
+								<reference key="NSNextResponder" ref="836721772"/>
+								<int key="NSvFlags">292</int>
+								<string key="NSFrame">{{97, 8}, {245, 30}}</string>
+								<reference key="NSSuperview" ref="836721772"/>
+								<bool key="IBUIOpaque">NO</bool>
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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>Map</string>
+									<string>Teams</string>
+									<string>Details</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>
+						<string key="NSFrame">{{0, 276}, {480, 44}}</string>
+						<reference key="NSSuperview" ref="766721923"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<object class="NSMutableArray" key="IBUIItems">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<object class="IBUIBarButtonItem" id="80281356">
+								<string key="IBUITitle">Back</string>
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<int key="IBUIStyle">1</int>
+								<reference key="IBUIToolbar" ref="836721772"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="716161941">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="836721772"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="530186890">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUICustomView" ref="563596142"/>
+								<reference key="IBUIToolbar" ref="836721772"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="188600069">
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<reference key="IBUIToolbar" ref="836721772"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="919181414">
+								<int key="IBUITag">1</int>
+								<string key="IBUITitle">Start Game</string>
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+								<float key="IBUIWidth">90</float>
+								<int key="IBUIStyle">2</int>
+								<reference key="IBUIToolbar" ref="836721772"/>
+							</object>
+						</object>
+					</object>
+				</object>
+				<string key="NSFrameSize">{480, 320}</string>
+				<reference key="NSSuperview"/>
+				<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>
+				</object>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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="841351856"/>
+						<reference key="destination" ref="766721923"/>
+					</object>
+					<int key="connectionID">3</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="80281356"/>
+						<reference key="destination" ref="841351856"/>
+					</object>
+					<int key="connectionID">17</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="919181414"/>
+						<reference key="destination" ref="841351856"/>
+					</object>
+					<int key="connectionID">23</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">segmentPressed:</string>
+						<reference key="source" ref="563596142"/>
+						<reference key="destination" ref="841351856"/>
+						<int key="IBEventType">13</int>
+					</object>
+					<int key="connectionID">29</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="841351856"/>
+						<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="606714003"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">2</int>
+						<reference key="object" ref="766721923"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="836721772"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">15</int>
+						<reference key="object" ref="836721772"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="80281356"/>
+							<reference ref="919181414"/>
+							<reference ref="188600069"/>
+							<reference ref="530186890"/>
+							<reference ref="716161941"/>
+						</object>
+						<reference key="parent" ref="766721923"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">16</int>
+						<reference key="object" ref="80281356"/>
+						<reference key="parent" ref="836721772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">18</int>
+						<reference key="object" ref="919181414"/>
+						<reference key="parent" ref="836721772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">19</int>
+						<reference key="object" ref="188600069"/>
+						<reference key="parent" ref="836721772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">21</int>
+						<reference key="object" ref="530186890"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="563596142"/>
+						</object>
+						<reference key="parent" ref="836721772"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">20</int>
+						<reference key="object" ref="563596142"/>
+						<reference key="parent" ref="530186890"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">22</int>
+						<reference key="object" ref="716161941"/>
+						<reference key="parent" ref="836721772"/>
+					</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>15.IBPluginDependency</string>
+					<string>16.IBPluginDependency</string>
+					<string>18.IBPluginDependency</string>
+					<string>19.IBPluginDependency</string>
+					<string>2.IBEditorWindowLastContentRect</string>
+					<string>2.IBPluginDependency</string>
+					<string>20.IBPluginDependency</string>
+					<string>22.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>GameConfigViewController</string>
+					<string>UIResponder</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>{{639, 516}, {480, 320}}</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">29</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">GameConfigViewController</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>buttonPressed:</string>
+							<string>segmentPressed:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<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>availableTeamsTableView</string>
+							<string>mapButton</string>
+							<string>randomButton</string>
+							<string>schemesButton</string>
+							<string>startButton</string>
+							<string>weaponsButton</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>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">../../cocoaTouch/GameConfigViewController.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="786211723">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIResponder.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIBarButtonItem</string>
+					<string key="superclassName">UIBarItem</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIBarButtonItem.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
+					<string key="className">UIBarItem</string>
+					<string key="superclassName">NSObject</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIBarItem.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">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">
+						<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">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">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIToolbar.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">IBCocoaTouchFramework</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="3100" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj</string>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<string key="IBCocoaTouchPluginVersion">87</string>
+	</data>
+</archive>
Binary file project_files/HedgewarsMobile/Resources/Icon-iPad.png has changed
Binary file project_files/HedgewarsMobile/Resources/Icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,689 @@
+<?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>
+		</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">
+				<nil key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUIImageView" id="976741091">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">274</int>
+						<string key="NSFrameSize">{1024, 768}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<object class="NSCustomResource" key="IBUIImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">Background.png</string>
+						</object>
+					</object>
+					<object class="IBUIImageView" id="90394251">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{147, 20}, {745, 146}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<int key="IBUIContentMode">4</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<object class="NSCustomResource" key="IBUIImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">HedgewarsTitle.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="867308721">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{147, 200}, {258, 215}}</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="917635782">
+							<string key="NSName">Helvetica-Bold</string>
+							<double key="NSSize">15</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<object class="NSColor" key="IBUIHighlightedTitleColor" id="918890028">
+							<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="112471976">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MC41AA</bytes>
+						</object>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">Multiplayer.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="607338789">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{634, 493}, {258, 215}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<int key="IBUITag">1</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="917635782"/>
+						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">NetworkPlay.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="95106947">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{175, 600}, {18, 19}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<int key="IBUITag">3</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="917635782"/>
+						<int key="IBUIButtonType">3</int>
+						<bool key="IBUIShowsTouchWhenHighlighted">YES</bool>
+						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
+					</object>
+					<object class="IBUILabel" id="177360137">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{762, 183}, {87, 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"/>
+						<object class="NSFont" key="IBUIFont">
+							<string key="NSName">Helvetica-Oblique</string>
+							<double key="NSSize">17</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<object class="NSColor" key="IBUITextColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MSAxIDEAA</bytes>
+							<object class="NSColorSpace" key="NSCustomColorSpace">
+								<int key="NSID">1</int>
+							</object>
+						</object>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">1</int>
+						<float key="IBUIMinimumFontSize">10</float>
+					</object>
+					<object class="IBUIButton" id="898948205">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{267, 579}, {72, 62}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<int key="IBUITag">2</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="917635782"/>
+						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">settingsButton.png</string>
+						</object>
+					</object>
+				</object>
+				<string key="NSFrameSize">{1024, 768}</string>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">1</int>
+					<bytes key="NSRGB">MCAwIDAAA</bytes>
+				</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">switchViews:</string>
+						<reference key="source" ref="95106947"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">47</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">switchViews:</string>
+						<reference key="source" ref="867308721"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">48</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">switchViews:</string>
+						<reference key="source" ref="607338789"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">49</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">versionLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="177360137"/>
+					</object>
+					<int key="connectionID">51</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">switchViews:</string>
+						<reference key="source" ref="898948205"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">54</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="90394251"/>
+							<reference ref="607338789"/>
+							<reference ref="867308721"/>
+							<reference ref="177360137"/>
+							<reference ref="95106947"/>
+							<reference ref="898948205"/>
+							<reference ref="976741091"/>
+						</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">38</int>
+						<reference key="object" ref="90394251"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">39</int>
+						<reference key="object" ref="867308721"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">local</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">40</int>
+						<reference key="object" ref="607338789"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">multi</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">45</int>
+						<reference key="object" ref="95106947"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">50</int>
+						<reference key="object" ref="177360137"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">52</int>
+						<reference key="object" ref="898948205"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">37</int>
+						<reference key="object" ref="976741091"/>
+						<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>37.IBPluginDependency</string>
+					<string>38.IBPluginDependency</string>
+					<string>39.IBPluginDependency</string>
+					<string>40.IBPluginDependency</string>
+					<string>45.IBPluginDependency</string>
+					<string>50.IBPluginDependency</string>
+					<string>52.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>MainMenuViewController</string>
+					<string>UIResponder</string>
+					<string>{{224, 119}, {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">86</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">MainMenuViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<string key="NS.key.0">switchViews:</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>settingsSplitViewController</string>
+							<string>versionLabel</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>UISplitViewController</string>
+							<string>UILabel</string>
+						</object>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">../../cocoaTouch/MainMenuViewController.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="864669175">
+						<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">UIImageView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIImageView.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="864669175"/>
+				</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">UISplitViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="53873462">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.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>
+					<reference key="sourceIdentifier" ref="53873462"/>
+				</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>
+		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>Background.png</string>
+				<string>HedgewarsTitle.png</string>
+				<string>Multiplayer.png</string>
+				<string>NetworkPlay.png</string>
+				<string>settingsButton.png</string>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>{1024, 768}</string>
+				<string>{720, 140}</string>
+				<string>{264, 219}</string>
+				<string>{314, 260}</string>
+				<string>{57, 51}</string>
+			</object>
+		</object>
+		<string key="IBCocoaTouchPluginVersion">87</string>
+	</data>
+</archive>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,785 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="975951072">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBUIView" id="191373211">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">293</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUIImageView" id="249993817">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">274</int>
+						<string key="NSFrame">{{0, 21}, {480, 278}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MCAwAA</bytes>
+						</object>
+						<int key="IBUIContentMode">4</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<object class="NSCustomResource" key="IBUIImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">backgroundCenter.png</string>
+						</object>
+					</object>
+					<object class="IBUIImageView" id="171108356">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">293</int>
+						<string key="NSFrame">{{121, 25}, {240, 52}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUIContentMode">4</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<object class="NSCustomResource" key="IBUIImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">title.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="124270424">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">289</int>
+						<string key="NSFrame">{{240, 102}, {220, 52}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
+						</object>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<object class="NSFont" key="IBUIFont" id="917635782">
+							<string key="NSName">Helvetica-Bold</string>
+							<double key="NSSize">15</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<object class="NSColor" key="IBUIHighlightedTitleColor" id="918890028">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleShadowColor" id="112471976">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MC41AA</bytes>
+						</object>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">playButton.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="745970938">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">265</int>
+						<string key="NSFrame">{{240, 177}, {220, 52}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
+						</object>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">3</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="917635782"/>
+						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">networkButton.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="836337039">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">260</int>
+						<string key="NSFrame">{{12, 144}, {220, 52}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<object class="NSColor" key="IBUIBackgroundColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
+						</object>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">3</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="917635782"/>
+						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
+						<object class="NSColor" key="IBUINormalTitleColor" id="111038951">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="111038951"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">storeButton.png</string>
+						</object>
+					</object>
+					<object class="IBUILabel" id="533529472">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{60, 102}, {145, 21}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<string key="IBUIText"/>
+						<object class="NSFont" key="IBUIFont">
+							<string key="NSName">Helvetica-Oblique</string>
+							<double key="NSSize">17</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<object class="NSColor" key="IBUITextColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MSAxIDEAA</bytes>
+						</object>
+						<nil key="IBUIHighlightedColor"/>
+						<int key="IBUIBaselineAdjustment">1</int>
+						<float key="IBUIMinimumFontSize">10</float>
+						<int key="IBUITextAlignment">1</int>
+					</object>
+					<object class="IBUIButton" id="753723574">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">269</int>
+						<string key="NSFrame">{{209, 237}, {59, 52}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">2</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="917635782"/>
+						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">settingsButton.png</string>
+						</object>
+					</object>
+					<object class="IBUIImageView" id="821240857">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">290</int>
+						<string key="NSFrameSize">{480, 17}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUIContentMode">4</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<object class="NSCustomResource" key="IBUIImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">borderTop.png</string>
+						</object>
+					</object>
+					<object class="IBUIImageView" id="936485487">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">266</int>
+						<string key="NSFrame">{{0, 297}, {480, 23}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUIContentMode">4</int>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<object class="NSCustomResource" key="IBUIImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">borderBottom.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="818907840">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 270}, {18, 19}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<int key="IBUITag">3</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="917635782"/>
+						<int key="IBUIButtonType">3</int>
+						<bool key="IBUIShowsTouchWhenHighlighted">YES</bool>
+						<reference key="IBUIHighlightedTitleColor" ref="918890028"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="112471976"/>
+					</object>
+				</object>
+				<string key="NSFrameSize">{480, 320}</string>
+				<reference key="NSSuperview"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">1</int>
+					<bytes key="NSRGB">MCAwIDAAA</bytes>
+				</object>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">switchViews:</string>
+						<reference key="source" ref="753723574"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">30</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">versionLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="533529472"/>
+					</object>
+					<int key="connectionID">37</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">switchViews:</string>
+						<reference key="source" ref="836337039"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">38</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">switchViews:</string>
+						<reference key="source" ref="745970938"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">39</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">switchViews:</string>
+						<reference key="source" ref="124270424"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">40</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">switchViews:</string>
+						<reference key="source" ref="818907840"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">42</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="249993817"/>
+							<reference ref="533529472"/>
+							<reference ref="821240857"/>
+							<reference ref="171108356"/>
+							<reference ref="936485487"/>
+							<reference ref="753723574"/>
+							<reference ref="124270424"/>
+							<reference ref="745970938"/>
+							<reference ref="836337039"/>
+							<reference ref="818907840"/>
+						</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">35</int>
+						<reference key="object" ref="821240857"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">22</int>
+						<reference key="object" ref="249993817"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">23</int>
+						<reference key="object" ref="171108356"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">24</int>
+						<reference key="object" ref="124270424"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">25</int>
+						<reference key="object" ref="745970938"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">26</int>
+						<reference key="object" ref="836337039"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">27</int>
+						<reference key="object" ref="533529472"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">28</int>
+						<reference key="object" ref="753723574"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">36</int>
+						<reference key="object" ref="936485487"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">41</int>
+						<reference key="object" ref="818907840"/>
+						<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>22.IBPluginDependency</string>
+					<string>23.IBPluginDependency</string>
+					<string>24.IBPluginDependency</string>
+					<string>25.IBPluginDependency</string>
+					<string>26.IBPluginDependency</string>
+					<string>27.IBPluginDependency</string>
+					<string>28.IBPluginDependency</string>
+					<string>35.IBPluginDependency</string>
+					<string>36.IBPluginDependency</string>
+					<string>41.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>MainMenuViewController</string>
+					<string>UIResponder</string>
+					<string>{{432, 461}, {480, 320}}</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>
+					<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">42</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">MainMenuViewController</string>
+					<string key="superclassName">UIViewController</string>
+					<object class="NSMutableDictionary" key="actions">
+						<string key="NS.key.0">switchViews:</string>
+						<string key="NS.object.0">id</string>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<string key="NS.key.0">versionLabel</string>
+						<string key="NS.object.0">UILabel</string>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">../../cocoaTouch/MainMenuViewController.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="238583711">
+						<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">UIImageView</string>
+					<string key="superclassName">UIView</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIImageView.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="238583711"/>
+				</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">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">IBCocoaTouchFramework</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/HedgewarsMobile.xcodeproj</string>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>backgroundCenter.png</string>
+				<string>borderBottom.png</string>
+				<string>borderTop.png</string>
+				<string>networkButton.png</string>
+				<string>playButton.png</string>
+				<string>settingsButton.png</string>
+				<string>storeButton.png</string>
+				<string>title.png</string>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>{480, 278}</string>
+				<string>{480, 21}</string>
+				<string>{480, 21}</string>
+				<string>{217, 51}</string>
+				<string>{216, 51}</string>
+				<string>{57, 51}</string>
+				<string>{216, 51}</string>
+				<string>{262, 84}</string>
+			</object>
+		</object>
+		<string key="IBCocoaTouchPluginVersion">87</string>
+	</data>
+</archive>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPad.xib	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,787 @@
+<?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">289</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">{{570, 117}, {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">289</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>
+						<double key="IBUIImageEdgeInsets.top">4</double>
+						<double key="IBUIImageEdgeInsets.bottom">4</double>
+						<double key="IBUIImageEdgeInsets.left">4</double>
+						<double key="IBUIImageEdgeInsets.right">4</double>
+						<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">{{623, 20}, {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">{{572, 66}, {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">265</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="326163764"/>
+							<reference ref="938256702"/>
+							<reference ref="743202682"/>
+							<reference ref="634417433"/>
+						</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, 115}, {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">49</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>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/MapConfigViewController-iPhone.xib	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,750 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="975951072">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">{{28, 166}, {240, 30}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">{{121, 209}, {149, 23}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">{{20, 20}, {256, 128}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<object class="NSFont" key="IBUIFont">
+							<string key="NSName">Helvetica-Bold</string>
+							<double key="NSSize">15</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<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">
+							<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">{{54, 234}, {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">IBCocoaTouchFramework</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">{{123, 239}, {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">IBCocoaTouchFramework</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">{{295, 0}, {185, 276}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="IBUIBackgroundColor" ref="437070330"/>
+						<bool key="IBUIClipsSubviews">YES</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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>
+				<string key="NSFrameSize">{480, 276}</string>
+				<reference key="NSSuperview"/>
+				<reference key="IBUIBackgroundColor" ref="437070330"/>
+				<object class="IBUISimulatedToolbarMetrics" key="IBUISimulatedBottomBarMetrics"/>
+				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+					<int key="interfaceOrientation">3</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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="326163764"/>
+							<reference ref="634417433"/>
+							<reference ref="88728219"/>
+							<reference ref="938256702"/>
+							<reference ref="743202682"/>
+							<reference ref="565214171"/>
+						</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">9</int>
+						<reference key="object" ref="326163764"/>
+						<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>
+			</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>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>{{744, 568}, {480, 320}}</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">32</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">IBCocoaTouchFramework</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>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/OverlayViewController-iPad.xib	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,945 @@
+<?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">292</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUIButton" id="584263820">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{0, 675}, {39, 53}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<object class="NSFont" key="IBUIFont" id="969592940">
+							<string key="NSName">Helvetica-Bold</string>
+							<double key="NSSize">15</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<object class="NSColor" key="IBUIHighlightedTitleColor" id="708011311">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleShadowColor" id="280149554">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MC41AA</bytes>
+						</object>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">arrowLeft.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="123494776">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{90, 675}, {39, 54}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">1</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">arrowRight.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="590902961">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{964, 690}, {64, 48}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">6</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage" id="639745463">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">joyPush.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="132251648">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{919, 665}, {64, 50}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">5</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<reference key="IBUINormalImage" ref="639745463"/>
+					</object>
+					<object class="IBUIButton" id="752933969">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{908, 723}, {61, 45}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">4</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<reference key="IBUINormalImage" ref="639745463"/>
+					</object>
+					<object class="IBUIButton" id="261686746">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{37, 638}, {53, 39}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">2</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">arrowUp.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="81315603">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{37, 729}, {53, 39}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">3</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">arrowDown.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="873773099">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{956, -5}, {72, 64}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<int key="IBUITag">10</int>
+						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">menuCorner.png</string>
+						</object>
+					</object>
+				</object>
+				<string key="NSFrameSize">{1024, 768}</string>
+				<reference key="NSSuperview"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MSAwAA</bytes>
+				</object>
+				<bool key="IBUIOpaque">NO</bool>
+				<bool key="IBUIMultipleTouchEnabled">YES</bool>
+				<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">buttonPressed:</string>
+						<reference key="source" ref="584263820"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">8</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="584263820"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">9</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="584263820"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">10</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="584263820"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">11</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="123494776"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">13</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="123494776"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">14</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="123494776"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">15</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="123494776"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">16</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="261686746"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">18</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="261686746"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">19</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="261686746"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">20</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="261686746"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">21</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="81315603"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">23</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="81315603"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">24</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="81315603"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">25</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="81315603"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">26</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="590902961"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">44</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="590902961"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">45</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="590902961"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">46</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="590902961"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">47</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="752933969"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">49</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="752933969"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">50</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="752933969"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">51</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="752933969"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">52</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="132251648"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">54</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="132251648"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">55</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="132251648"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">56</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="132251648"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">57</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="873773099"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">60</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="584263820"/>
+							<reference ref="123494776"/>
+							<reference ref="261686746"/>
+							<reference ref="81315603"/>
+							<reference ref="873773099"/>
+							<reference ref="590902961"/>
+							<reference ref="132251648"/>
+							<reference ref="752933969"/>
+						</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">4</int>
+						<reference key="object" ref="584263820"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">left</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">12</int>
+						<reference key="object" ref="123494776"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">right</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">17</int>
+						<reference key="object" ref="261686746"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">up</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">22</int>
+						<reference key="object" ref="81315603"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">down</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">43</int>
+						<reference key="object" ref="590902961"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">push2</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">48</int>
+						<reference key="object" ref="752933969"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">push1</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">53</int>
+						<reference key="object" ref="132251648"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">push3</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">58</int>
+						<reference key="object" ref="873773099"/>
+						<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>12.IBPluginDependency</string>
+					<string>17.IBPluginDependency</string>
+					<string>22.IBPluginDependency</string>
+					<string>4.IBPluginDependency</string>
+					<string>43.IBPluginDependency</string>
+					<string>48.IBPluginDependency</string>
+					<string>53.IBPluginDependency</string>
+					<string>58.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>OverlayViewController</string>
+					<string>UIResponder</string>
+					<string>{{0, 273}, {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>
+					<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">60</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">OverlayViewController</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>buttonPressed:</string>
+							<string>buttonReleased:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<string key="NS.key.0">popoverController</string>
+						<string key="NS.object.0">id</string>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">../../cocoaTouch/OverlayViewController.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="998852275">
+						<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">UIResponder</string>
+					<string key="superclassName">NSObject</string>
+					<reference key="sourceIdentifier" ref="998852275"/>
+				</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">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="3100" key="NS.object.0"/>
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj</string>
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>arrowDown.png</string>
+				<string>arrowLeft.png</string>
+				<string>arrowRight.png</string>
+				<string>arrowUp.png</string>
+				<string>joyPush.png</string>
+				<string>menuCorner.png</string>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+			</object>
+		</object>
+		<string key="IBCocoaTouchPluginVersion">87</string>
+	</data>
+</archive>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/project_files/HedgewarsMobile/Resources/OverlayViewController.xib	Thu Jun 17 20:30:39 2010 +0200
@@ -0,0 +1,947 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.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">IBCocoaTouchFramework</string>
+			</object>
+			<object class="IBProxyObject" id="975951072">
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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="IBUIButton" id="584263820">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{0, 237}, {39, 53}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<object class="NSFont" key="IBUIFont" id="969592940">
+							<string key="NSName">Helvetica-Bold</string>
+							<double key="NSSize">15</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<object class="NSColor" key="IBUIHighlightedTitleColor" id="708011311">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleShadowColor" id="280149554">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MC41AA</bytes>
+						</object>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">arrowLeft.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="123494776">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{75, 237}, {39, 54}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">1</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">arrowRight.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="590902961">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">265</int>
+						<string key="NSFrame">{{416, 227}, {64, 64}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">5</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage" id="639745463">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">joyPush.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="132251648">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">265</int>
+						<string key="NSFrame">{{368, 207}, {64, 64}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">6</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<reference key="IBUINormalImage" ref="639745463"/>
+					</object>
+					<object class="IBUIButton" id="752933969">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">265</int>
+						<string key="NSFrame">{{344, 256}, {64, 64}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">4</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<reference key="IBUINormalImage" ref="639745463"/>
+					</object>
+					<object class="IBUIButton" id="261686746">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{29, 207}, {53, 39}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">2</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">arrowUp.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="81315603">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">268</int>
+						<string key="NSFrame">{{29, 281}, {53, 39}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUITag">3</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">arrowDown.png</string>
+						</object>
+					</object>
+					<object class="IBUIButton" id="309477778">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">289</int>
+						<string key="NSFrame">{{412, -6}, {72, 64}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<int key="IBUITag">10</int>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<reference key="IBUIFont" ref="969592940"/>
+						<reference key="IBUIHighlightedTitleColor" ref="708011311"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
+						</object>
+						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">menuCorner.png</string>
+						</object>
+					</object>
+				</object>
+				<string key="NSFrameSize">{480, 320}</string>
+				<reference key="NSSuperview"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MSAwAA</bytes>
+				</object>
+				<bool key="IBUIOpaque">NO</bool>
+				<bool key="IBUIClipsSubviews">YES</bool>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<bool key="IBUIMultipleTouchEnabled">YES</bool>
+				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+					<int key="interfaceOrientation">3</int>
+				</object>
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</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">buttonPressed:</string>
+						<reference key="source" ref="584263820"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">8</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="584263820"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">9</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="584263820"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">10</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="584263820"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">11</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="123494776"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">13</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="123494776"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">14</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="123494776"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">15</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="123494776"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">16</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="261686746"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">18</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="261686746"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">19</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="261686746"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">20</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="261686746"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">21</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="81315603"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">23</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="81315603"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">24</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="81315603"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">25</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="81315603"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">26</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="590902961"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">44</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="590902961"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">45</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="590902961"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">46</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="590902961"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">47</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="752933969"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">49</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="752933969"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">50</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="752933969"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">51</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="752933969"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">52</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="132251648"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">9</int>
+					</object>
+					<int key="connectionID">54</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="132251648"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">55</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="132251648"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">1</int>
+					</object>
+					<int key="connectionID">56</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonReleased:</string>
+						<reference key="source" ref="132251648"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">8</int>
+					</object>
+					<int key="connectionID">57</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="309477778"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">60</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="584263820"/>
+							<reference ref="123494776"/>
+							<reference ref="261686746"/>
+							<reference ref="81315603"/>
+							<reference ref="590902961"/>
+							<reference ref="132251648"/>
+							<reference ref="752933969"/>
+							<reference ref="309477778"/>
+						</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">4</int>
+						<reference key="object" ref="584263820"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">left</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">12</int>
+						<reference key="object" ref="123494776"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">right</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">17</int>
+						<reference key="object" ref="261686746"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">up</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">22</int>
+						<reference key="object" ref="81315603"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">down</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">43</int>
+						<reference key="object" ref="590902961"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">push2</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">48</int>
+						<reference key="object" ref="752933969"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">push1</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">53</int>
+						<reference key="object" ref="132251648"/>
+						<reference key="parent" ref="191373211"/>
+						<string key="objectName">push3</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">58</int>
+						<reference key="object" ref="309477778"/>
+						<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>12.IBPluginDependency</string>
+					<string>17.IBPluginDependency</string>
+					<string>22.IBPluginDependency</string>
+					<string>4.IBPluginDependency</string>
+					<string>43.IBPluginDependency</string>
+					<string>48.IBPluginDependency</string>
+					<string>53.IBPluginDependency</string>
+					<string>58.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>OverlayViewController</string>
+					<string>UIResponder</string>
+					<string>{{222, 756}, {480, 320}}</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>
+					<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">62</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes">
+			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="IBPartialClassDescription">
+					<string key="className">OverlayViewController</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>buttonPressed:</string>
+							<string>buttonReleased:</string>
+						</object>
+						<object class="NSMutableArray" key="dict.values">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>id</string>
+							<string>id</string>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<string key="NS.key.0">popoverController</string>
+						<string key="NS.object.0">id</string>
+					</object>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBProjectSource</string>
+						<string key="minorKey">../../cocoaTouch/OverlayViewController.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="917531033">
+						<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">UIResponder</string>
+					<string key="superclassName">NSObject</string>
+					<reference key="sourceIdentifier" ref="917531033"/>
+				</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">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">IBCocoaTouchFramework</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="3100" 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>
+		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>arrowDown.png</string>
+				<string>arrowLeft.png</string>
+				<string>arrowRight.png</string>
+				<string>arrowUp.png</string>
+				<string>joyPush.png</string>
+				<string>menuCorner.png</string>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+				<string>{64, 64}</string>
+			</object>
+		</object>
+		<string key="IBCocoaTouchPluginVersion">87</string>
+	</data>
+</archive>
Binary file project_files/HedgewarsMobile/Resources/arrowDown.png has changed
Binary file project_files/HedgewarsMobile/Resources/arrowLeft.png has changed
Binary file project_files/HedgewarsMobile/Resources/arrowRight.png has changed
Binary file project_files/HedgewarsMobile/Resources/arrowUp.png has changed
Binary file project_files/HedgewarsMobile/Resources/backgroundBottom.png has changed
Binary file project_files/HedgewarsMobile/Resources/backgroundCenter.png has changed
Binary file project_files/HedgewarsMobile/Resources/backgroundLeft.png has changed
Binary file project_files/HedgewarsMobile/Resources/backgroundRight.png has changed
Binary file project_files/HedgewarsMobile/Resources/backgroundTop.png has changed
Binary file project_files/HedgewarsMobile/Resources/borderBottom.png has changed
Binary file project_files/HedgewarsMobile/Resources/borderTop.png has changed
Binary file project_files/HedgewarsMobile/Resources/joyPush.png has changed
Binary file project_files/HedgewarsMobile/Resources/menuCorner.png has changed
Binary file project_files/HedgewarsMobile/Resources/networkButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/playButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/settingsButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/storeButton.png has changed
Binary file project_files/HedgewarsMobile/Resources/title.png has changed
Binary file project_files/HedgewarsMobile/libfreetype_arm.a has changed
Binary file project_files/HedgewarsMobile/libfreetype_x86.a has changed
Binary file project_files/HedgewarsMobile/libpng_arm.a has changed
Binary file project_files/HedgewarsMobile/libpng_x86.a has changed
Binary file project_files/HedgewarsMobile/libvorbis_arm.a has changed