buttons for number of hogs in game config
authorkoda
Wed, 21 Apr 2010 01:57:23 +0000
changeset 3361 cfc6cd502f85
parent 3360 717b4e46e855
child 3362 8d3b4d19ce27
buttons for number of hogs in game config buttons for color of team in game config update and code cleanup fixed crashes at uitextfield
cocoaTouch/GameConfigViewController.h
cocoaTouch/GameConfigViewController.m
cocoaTouch/GeneralSettingsViewController.m
cocoaTouch/OverlayViewController.h
cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h
cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m
cocoaTouch/SingleTeamViewController.m
cocoaTouch/TeamConfigViewController.h
cocoaTouch/TeamConfigViewController.m
cocoaTouch/TeamSettingsViewController.m
cocoaTouch/VoicesViewController.m
cocoaTouch/otherSrc/HogButtonView.h
cocoaTouch/otherSrc/HogButtonView.m
cocoaTouch/otherSrc/IMG.c
cocoaTouch/otherSrc/IMG_png.c
cocoaTouch/otherSrc/SDL_image.h
cocoaTouch/otherSrc/SquareButtonView.h
cocoaTouch/otherSrc/SquareButtonView.m
cocoaTouch/otherSrc/UIImageExtra.h
cocoaTouch/otherSrc/UIImageExtra.m
cocoaTouch/xib/GameConfigViewController-iPad.xib
cocoaTouch/xib/GameConfigViewController-iPhone.xib
misc/openalbridge/openalbridge.c
project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj
--- a/cocoaTouch/GameConfigViewController.h	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/GameConfigViewController.h	Wed Apr 21 01:57:23 2010 +0000
@@ -8,24 +8,26 @@
 
 #import <UIKit/UIKit.h>
 
+@class TeamConfigViewController;
 
 @interface GameConfigViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
     UITableView *availableTeamsTableView;
-    UIButton *backButton;
     UIButton *mapButton;
     UIButton *randomButton;
     UIButton *weaponsButton;
     UIButton *schemesButton;
-    UIButton *startButton;
+    UIBarButtonItem *startButton;
+    
+    UIViewController *activeController;
+    TeamConfigViewController *teamConfigViewController;
 }
 
 @property (nonatomic,retain) IBOutlet UITableView *availableTeamsTableView;
-@property (nonatomic,retain) IBOutlet UIButton *backButton;
 @property (nonatomic,retain) IBOutlet UIButton *weaponsButton;
 @property (nonatomic,retain) IBOutlet UIButton *schemesButton;
 @property (nonatomic,retain) IBOutlet UIButton *mapButton;
 @property (nonatomic,retain) IBOutlet UIButton *randomButton;
-@property (nonatomic,retain) IBOutlet UIButton *startButton;
+@property (nonatomic,retain) IBOutlet UIBarButtonItem *startButton;
 
 -(IBAction) buttonPressed:(id) sender;
 
--- a/cocoaTouch/GameConfigViewController.m	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/GameConfigViewController.m	Wed Apr 21 01:57:23 2010 +0000
@@ -9,17 +9,18 @@
 #import "GameConfigViewController.h"
 #import "SDL_uikitappdelegate.h"
 #import "CommodityFunctions.h"
+#import "TeamConfigViewController.h"
 
 @implementation GameConfigViewController
-@synthesize availableTeamsTableView, backButton, weaponsButton, schemesButton, mapButton, randomButton, startButton;
+@synthesize availableTeamsTableView, weaponsButton, schemesButton, mapButton, randomButton, startButton;
 
 
 -(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:
@@ -39,8 +40,12 @@
 }
 
 // Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
-- (void)viewDidLoad {
-    self.view.frame = CGRectMake(0, 0, 1024, 1024);
+-(void) viewDidLoad {
+    teamConfigViewController = [[TeamConfigViewController alloc] initWithStyle:UITableViewStyleGrouped];
+    activeController = teamConfigViewController;
+    
+    [self.view insertSubview:teamConfigViewController.view atIndex:0];
+    
     [super viewDidLoad];
 }
 
@@ -52,8 +57,9 @@
 
 
 -(void) viewDidUnload {
+    activeController = nil;
+    teamConfigViewController = nil;
     self.availableTeamsTableView = nil;
-    self.backButton = nil;
     self.weaponsButton = nil;
     self.schemesButton = nil;
     self.mapButton = nil;
@@ -64,8 +70,9 @@
 
 
 -(void) dealloc {
+    [activeController release];
+    [teamConfigViewController release];
     [availableTeamsTableView release];
-    [backButton release];
     [weaponsButton release];
     [schemesButton release];
     [mapButton release];
@@ -74,5 +81,24 @@
     [super dealloc];
 }
 
+-(void) viewWillAppear:(BOOL)animated {
+    [super viewWillAppear:animated];
+    [activeController viewWillAppear:animated];
+}
+
+-(void) viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+    [activeController viewWillDisappear:animated];
+}
+
+-(void) viewDidAppear:(BOOL)animated {
+    [super viewDidLoad];
+    [activeController viewDidAppear:animated];
+}
+
+-(void) viewDidDisappear:(BOOL)animated {
+    [super viewDidUnload];
+    [activeController viewDidDisappear:animated];
+}
 
 @end
--- a/cocoaTouch/GeneralSettingsViewController.m	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/GeneralSettingsViewController.m	Wed Apr 21 01:57:23 2010 +0000
@@ -60,11 +60,6 @@
     [saveButton release];
 }
 
-// we save every time a textfield is edited, so we don't risk to update only the hogs or only the temname 
--(BOOL) textFieldShouldEndEditing:(UITextField *)aTextField {
-    return [self save:nil];
-}
-
 // the textfield has been modified, check for empty strings and restore original navigation bar
 -(void) textFieldDidEndEditing:(UITextField *)aTextField{
     self.textFieldBeingEdited = nil;
--- a/cocoaTouch/OverlayViewController.h	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/OverlayViewController.h	Wed Apr 21 01:57:23 2010 +0000
@@ -31,6 +31,7 @@
 -(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;
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.h	Wed Apr 21 01:57:23 2010 +0000
@@ -29,13 +29,13 @@
 @interface SDLUIKitDelegate:NSObject <UIApplicationDelegate> {
 	SDL_Window *window;
 	UIWindow *uiwindow;
+
 	MainMenuViewController *viewController;
     BOOL isInGame;
 }
 
 @property (readwrite, assign) SDL_Window *window;
 @property (readwrite, retain) UIWindow *uiwindow;
-@property (nonatomic, retain) MainMenuViewController *viewController;
 
 +(SDLUIKitDelegate *)sharedAppDelegate;
 -(void) startSDLgame;
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Wed Apr 21 01:57:23 2010 +0000
@@ -53,7 +53,7 @@
 }
 
 @implementation SDLUIKitDelegate
-@synthesize uiwindow, window, viewController;
+@synthesize uiwindow, window;
 
 // convenience method
 +(SDLUIKitDelegate *)sharedAppDelegate {
@@ -65,7 +65,7 @@
 	if (self = [super init]){
         self.uiwindow = nil;
         self.window = NULL;
-        self.viewController = nil;
+        viewController = nil;
         isInGame = NO;
         return self;
     } else 
@@ -73,6 +73,7 @@
 }
 
 -(void) dealloc {
+    SDL_DestroyWindow(self.window);
     [viewController release];
 	[uiwindow release];
 	[super dealloc];
@@ -111,16 +112,15 @@
     //[application setStatusBarHidden:YES withAnimation:NO];
     [application setStatusBarHidden:YES];
     [application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];  
-		
+    
 	self.uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
 	self.uiwindow.backgroundColor = [UIColor blackColor];
 	
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
-        self.viewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPad" bundle:nil];
+        viewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPad" bundle:nil];
     else
-        self.viewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPhone" bundle:nil];
+        viewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPhone" bundle:nil];
 	[uiwindow addSubview:viewController.view];
-    [viewController release];
 	
 	// Set working directory to resource path
 	[[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
--- a/cocoaTouch/SingleTeamViewController.m	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/SingleTeamViewController.m	Wed Apr 21 01:57:23 2010 +0000
@@ -74,11 +74,6 @@
     [saveButton release];
 }
 
-// we save every time a textfield is edited, so we don't risk to update only the hogs or only the temname 
--(BOOL) textFieldShouldEndEditing:(UITextField *)aTextField {
-    return [self save:nil];
-}
-
 // the textfield has been modified, check for empty strings and restore original navigation bar
 -(void) textFieldDidEndEditing:(UITextField *)aTextField{
     if ([textFieldBeingEdited.text length] == 0) 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cocoaTouch/TeamConfigViewController.h	Wed Apr 21 01:57:23 2010 +0000
@@ -0,0 +1,18 @@
+//
+//  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;
+}
+
+@property (nonatomic, retain) NSMutableArray *listOfTeams;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cocoaTouch/TeamConfigViewController.m	Wed Apr 21 01:57:23 2010 +0000
@@ -0,0 +1,177 @@
+//
+//  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;
+
+#define NUMBERBUTTON_TAG 123456
+#define SQUAREBUTTON_TAG 654321
+
+#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];
+
+    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];
+    NSLog(@"%@",listOfTeams);
+}
+
+/*
+- (void)viewDidAppear:(BOOL)animated {
+    [super viewDidAppear:animated];
+}
+*/
+/*
+- (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
+}
+*/
+/*
+- (void)viewDidDisappear:(BOOL)animated {
+    [super viewDidDisappear:animated];
+}
+*/
+
+
+-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+    return rotationManager(interfaceOrientation);
+}
+
+
+#pragma mark -
+#pragma mark Table view data source
+-(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return [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];
+        
+        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];
+    }
+    
+    cell.textLabel.text = [[listOfTeams objectAtIndex:[indexPath row]] stringByDeletingPathExtension];
+    
+    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 {
+    self.listOfTeams = nil;
+}
+
+
+-(void) dealloc {
+    [listOfTeams release];
+    [super dealloc];
+}
+
+
+@end
+
--- a/cocoaTouch/TeamSettingsViewController.m	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/TeamSettingsViewController.m	Wed Apr 21 01:57:23 2010 +0000
@@ -38,7 +38,7 @@
     [super viewWillAppear:animated];
     
     NSArray *contentsOfDir = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:TEAMS_DIRECTORY() error:NULL];
-    NSMutableArray *array = [[NSMutableArray alloc] initWithArray: contentsOfDir copyItems:YES];
+    NSMutableArray *array = [[NSMutableArray alloc] initWithArray:contentsOfDir copyItems:YES];
     self.listOfTeams = array;
     [array release];
     
--- a/cocoaTouch/VoicesViewController.m	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/VoicesViewController.m	Wed Apr 21 01:57:23 2010 +0000
@@ -26,7 +26,7 @@
     [super viewDidLoad];
     srandom(time(NULL));
 
-    openal_init("Hedgewars", 1, 3);
+    openal_init(1, 1);
     voiceBeingPlayed = -1;
 
     // load all the voices names and store them into voiceArray
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cocoaTouch/otherSrc/HogButtonView.h	Wed Apr 21 01:57:23 2010 +0000
@@ -0,0 +1,23 @@
+//
+//  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;
+}
+
+@property (nonatomic,retain) UIImage *singleHog;
+
+-(void) drawManyHogs;
+
+-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cocoaTouch/otherSrc/HogButtonView.m	Wed Apr 21 01:57:23 2010 +0000
@@ -0,0 +1,75 @@
+//
+//  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;
+
+-(id) initWithFrame:(CGRect)frame {
+    if ((self = [super initWithFrame:frame])) {
+        numberOfHogs = 4;
+        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 drawManyHogs];
+    }
+    return self;
+}
+
+-(void) drawManyHogs {
+    UIImage *teamHogs = [[UIImage alloc] init];
+    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) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+    UITouch *touch = [touches anyObject];
+    
+	switch ([touch tapCount]) {
+		case 1:
+            if (numberOfHogs < MAX_HOGS) {
+                numberOfHogs++;
+            } else {
+                numberOfHogs = 1;
+            }
+			break;
+		case 2:
+            if (numberOfHogs > 2) {
+                numberOfHogs--;
+                numberOfHogs--;
+            } else {
+                numberOfHogs = MAX_HOGS;
+            }
+            break;
+		default:
+			break;
+	}
+    NSLog(@"numberOfHogs: %d", numberOfHogs);
+    [self drawManyHogs];
+}
+
+-(void) dealloc {
+    [singleHog release];
+    [super dealloc];
+}
+
+
+@end
--- a/cocoaTouch/otherSrc/IMG.c	Mon Apr 19 15:30:11 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
-    SDL_image:  An example image loading library for use with SDL
-    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
-    slouken@libsdl.org
-*/
-
-/* A simple library to load images of various formats as SDL surfaces */
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#include "SDL_image.h"
-
-#define ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
-
-/* Table of image detection and loading functions */
-static struct {
-	char *type;
-	int (SDLCALL *is)(SDL_RWops *src);
-	SDL_Surface *(SDLCALL *load)(SDL_RWops *src);
-} supported[] = {
-	/* keep magicless formats first */
-	{ "PNG", IMG_isPNG, IMG_LoadPNG_RW }
-};
-
-
-extern int IMG_InitPNG();
-extern void IMG_QuitPNG();
-
-static int initialized = 0;
-
-int IMG_Init(int flags)
-{
-	int result = 0;
-
-	if (flags & IMG_INIT_PNG) {
-		if ((initialized & IMG_INIT_PNG) || IMG_InitPNG() == 0) {
-			result |= IMG_INIT_PNG;
-		}
-	}
-	initialized |= result;
-
-	return (result);
-}
-
-void IMG_Quit()
-{
-	if (initialized & IMG_INIT_PNG) {
-		IMG_QuitPNG();
-	}
-	initialized = 0;
-}
-
-/* Load an image from a file */
-SDL_Surface *IMG_Load(const char *file)
-{
-    SDL_RWops *src = SDL_RWFromFile(file, "rb");
-    char *ext = strrchr(file, '.');
-    if(ext) {
-        ext++;
-    }
-    if(!src) {
-        /* The error message has been set in SDL_RWFromFile */
-        return NULL;
-    }
-    return IMG_LoadTyped_RW(src, 1, ext);
-}
-
-/* Load an image from an SDL datasource (for compatibility) */
-SDL_Surface *IMG_Load_RW(SDL_RWops *src, int freesrc)
-{
-    return IMG_LoadTyped_RW(src, freesrc, NULL);
-}
-
-/* Portable case-insensitive string compare function */
-static int IMG_string_equals(const char *str1, const char *str2)
-{
-	while ( *str1 && *str2 ) {
-		if ( toupper((unsigned char)*str1) !=
-		     toupper((unsigned char)*str2) )
-			break;
-		++str1;
-		++str2;
-	}
-	return (!*str1 && !*str2);
-}
-
-/* Load an image from an SDL datasource, optionally specifying the type */
-SDL_Surface *IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, char *type)
-{
-	int i;
-	SDL_Surface *image;
-
-	/* Make sure there is something to do.. */
-	if ( src == NULL ) {
-		IMG_SetError("Passed a NULL data source");
-		return(NULL);
-	}
-
-	/* See whether or not this data source can handle seeking */
-	if ( SDL_RWseek(src, 0, RW_SEEK_CUR) < 0 ) {
-		IMG_SetError("Can't seek in this data source");
-		if(freesrc)
-			SDL_RWclose(src);
-		return(NULL);
-	}
-
-	/* Detect the type of image being loaded */
-	image = NULL;
-	for ( i=0; i < ARRAYSIZE(supported); ++i ) {
-		if(supported[i].is) {
-			if(!supported[i].is(src))
-				continue;
-		} else {
-			/* magicless format */
-			if(!type
-			   || !IMG_string_equals(type, supported[i].type))
-				continue;
-		}
-#ifdef DEBUG_IMGLIB
-		fprintf(stderr, "IMGLIB: Loading image as %s\n", supported[i].type);
-#endif
-		image = supported[i].load(src);
-		if(freesrc)
-			SDL_RWclose(src);
-		return image;
-	}
-
-	if ( freesrc ) {
-		SDL_RWclose(src);
-	}
-	IMG_SetError("Unsupported image format");
-	return NULL;
-}
-
--- a/cocoaTouch/otherSrc/IMG_png.c	Mon Apr 19 15:30:11 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,502 +0,0 @@
-/*
-    SDL_image:  An example image loading library for use with SDL
-    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
-    slouken@libsdl.org
-*/
-
-/* This is a PNG image file loading framework */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "SDL_image.h"
-
-
-/*=============================================================================
-        File: SDL_png.c
-     Purpose: A PNG loader and saver for the SDL library      
-    Revision: 
-  Created by: Philippe Lavoie          (2 November 1998)
-              lavoie@zeus.genie.uottawa.ca
- Modified by: 
-
- Copyright notice:
-          Copyright (C) 1998 Philippe Lavoie
- 
-          This library is free software; you can redistribute it and/or
-          modify it under the terms of the GNU Library General Public
-          License as published by the Free Software Foundation; either
-          version 2 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
-          Library General Public License for more details.
- 
-          You should have received a copy of the GNU Library General Public
-          License along with this library; if not, write to the Free
-          Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-    Comments: The load and save routine are basically the ones you can find
-             in the example.c file from the libpng distribution.
-
-  Changes:
-    5/17/99 - Modified to use the new SDL data sources - Sam Lantinga
-
-=============================================================================*/
-
-#include "SDL_endian.h"
-
-#ifdef macintosh
-#define MACOS
-#endif
-#include "png.h"
-
-
-static struct {
-	int loaded;
-	void *handle;
-	png_infop (*png_create_info_struct) (png_structp png_ptr);
-	png_structp (*png_create_read_struct) (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn);
-	void (*png_destroy_read_struct) (png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr);
-	png_uint_32 (*png_get_IHDR) (png_structp png_ptr, png_infop info_ptr, png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type, int *interlace_method, int *compression_method, int *filter_method);
-	png_voidp (*png_get_io_ptr) (png_structp png_ptr);
-	png_uint_32 (*png_get_tRNS) (png_structp png_ptr, png_infop info_ptr, png_bytep *trans, int *num_trans, png_color_16p *trans_values);
-	png_uint_32 (*png_get_valid) (png_structp png_ptr, png_infop info_ptr, png_uint_32 flag);
-	void (*png_read_image) (png_structp png_ptr, png_bytepp image);
-	void (*png_read_info) (png_structp png_ptr, png_infop info_ptr);
-	void (*png_read_update_info) (png_structp png_ptr, png_infop info_ptr);
-	void (*png_set_expand) (png_structp png_ptr);
-	void (*png_set_gray_to_rgb) (png_structp png_ptr);
-	void (*png_set_packing) (png_structp png_ptr);
-	void (*png_set_read_fn) (png_structp png_ptr, png_voidp io_ptr, png_rw_ptr read_data_fn);
-	void (*png_set_strip_16) (png_structp png_ptr);
-	int (*png_sig_cmp) (png_bytep sig, png_size_t start, png_size_t num_to_check);
-} lib;
-
-#ifdef LOAD_PNG_DYNAMIC
-int IMG_InitPNG()
-{
-	if ( lib.loaded == 0 ) {
-		lib.handle = SDL_LoadObject(LOAD_PNG_DYNAMIC);
-		if ( lib.handle == NULL ) {
-			return -1;
-		}
-		lib.png_create_info_struct =
-			(png_infop (*) (png_structp))
-			SDL_LoadFunction(lib.handle, "png_create_info_struct");
-		if ( lib.png_create_info_struct == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_create_read_struct =
-			(png_structp (*) (png_const_charp, png_voidp, png_error_ptr, png_error_ptr))
-			SDL_LoadFunction(lib.handle, "png_create_read_struct");
-		if ( lib.png_create_read_struct == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_destroy_read_struct =
-			(void (*) (png_structpp, png_infopp, png_infopp))
-			SDL_LoadFunction(lib.handle, "png_destroy_read_struct");
-		if ( lib.png_destroy_read_struct == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_get_IHDR =
-			(png_uint_32 (*) (png_structp, png_infop, png_uint_32 *, png_uint_32 *, int *, int *, int *, int *, int *))
-			SDL_LoadFunction(lib.handle, "png_get_IHDR");
-		if ( lib.png_get_IHDR == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_get_io_ptr =
-			(png_voidp (*) (png_structp))
-			SDL_LoadFunction(lib.handle, "png_get_io_ptr");
-		if ( lib.png_get_io_ptr == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_get_tRNS =
-			(png_uint_32 (*) (png_structp, png_infop, png_bytep *, int *, png_color_16p *))
-			SDL_LoadFunction(lib.handle, "png_get_tRNS");
-		if ( lib.png_get_tRNS == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_get_valid =
-			(png_uint_32 (*) (png_structp, png_infop, png_uint_32))
-			SDL_LoadFunction(lib.handle, "png_get_valid");
-		if ( lib.png_get_valid == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_read_image =
-			(void (*) (png_structp, png_bytepp))
-			SDL_LoadFunction(lib.handle, "png_read_image");
-		if ( lib.png_read_image == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_read_info =
-			(void (*) (png_structp, png_infop))
-			SDL_LoadFunction(lib.handle, "png_read_info");
-		if ( lib.png_read_info == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_read_update_info =
-			(void (*) (png_structp, png_infop))
-			SDL_LoadFunction(lib.handle, "png_read_update_info");
-		if ( lib.png_read_update_info == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_set_expand =
-			(void (*) (png_structp))
-			SDL_LoadFunction(lib.handle, "png_set_expand");
-		if ( lib.png_set_expand == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_set_gray_to_rgb =
-			(void (*) (png_structp))
-			SDL_LoadFunction(lib.handle, "png_set_gray_to_rgb");
-		if ( lib.png_set_gray_to_rgb == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_set_packing =
-			(void (*) (png_structp))
-			SDL_LoadFunction(lib.handle, "png_set_packing");
-		if ( lib.png_set_packing == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_set_read_fn =
-			(void (*) (png_structp, png_voidp, png_rw_ptr))
-			SDL_LoadFunction(lib.handle, "png_set_read_fn");
-		if ( lib.png_set_read_fn == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_set_strip_16 =
-			(void (*) (png_structp))
-			SDL_LoadFunction(lib.handle, "png_set_strip_16");
-		if ( lib.png_set_strip_16 == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-		lib.png_sig_cmp =
-			(int (*) (png_bytep, png_size_t, png_size_t))
-			SDL_LoadFunction(lib.handle, "png_sig_cmp");
-		if ( lib.png_sig_cmp == NULL ) {
-			SDL_UnloadObject(lib.handle);
-			return -1;
-		}
-	}
-	++lib.loaded;
-
-	return 0;
-}
-void IMG_QuitPNG()
-{
-	if ( lib.loaded == 0 ) {
-		return;
-	}
-	if ( lib.loaded == 1 ) {
-		SDL_UnloadObject(lib.handle);
-	}
-	--lib.loaded;
-}
-#else
-int IMG_InitPNG()
-{
-	if ( lib.loaded == 0 ) {
-		lib.png_create_info_struct = png_create_info_struct;
-		lib.png_create_read_struct = png_create_read_struct;
-		lib.png_destroy_read_struct = png_destroy_read_struct;
-		lib.png_get_IHDR = png_get_IHDR;
-		lib.png_get_io_ptr = png_get_io_ptr;
-		lib.png_get_tRNS = png_get_tRNS;
-		lib.png_get_valid = png_get_valid;
-		lib.png_read_image = png_read_image;
-		lib.png_read_info = png_read_info;
-		lib.png_read_update_info = png_read_update_info;
-		lib.png_set_expand = png_set_expand;
-		lib.png_set_gray_to_rgb = png_set_gray_to_rgb;
-		lib.png_set_packing = png_set_packing;
-		lib.png_set_read_fn = png_set_read_fn;
-		lib.png_set_strip_16 = png_set_strip_16;
-		lib.png_sig_cmp = png_sig_cmp;
-	}
-	++lib.loaded;
-
-	return 0;
-}
-void IMG_QuitPNG()
-{
-	if ( lib.loaded == 0 ) {
-		return;
-	}
-	if ( lib.loaded == 1 ) {
-	}
-	--lib.loaded;
-}
-#endif /* LOAD_PNG_DYNAMIC */
-
-/* See if an image is contained in a data source */
-int IMG_isPNG(SDL_RWops *src)
-{
-	int start;
-	int is_PNG;
-	Uint8 magic[4];
-
-	if ( !src )
-		return 0;
-	start = SDL_RWtell(src);
-	is_PNG = 0;
-	if ( SDL_RWread(src, magic, 1, sizeof(magic)) == sizeof(magic) ) {
-                if ( magic[0] == 0x89 &&
-                     magic[1] == 'P' &&
-                     magic[2] == 'N' &&
-                     magic[3] == 'G' ) {
-			is_PNG = 1;
-		}
-	}
-	SDL_RWseek(src, start, RW_SEEK_SET);
-	return(is_PNG);
-}
-
-/* Load a PNG type image from an SDL datasource */
-static void png_read_data(png_structp ctx, png_bytep area, png_size_t size)
-{
-	SDL_RWops *src;
-
-	src = (SDL_RWops *)lib.png_get_io_ptr(ctx);
-	SDL_RWread(src, area, size, 1);
-}
-SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
-{
-	int start;
-	const char *error;
-	SDL_Surface *volatile surface;
-	png_structp png_ptr;
-	png_infop info_ptr;
-	png_uint_32 width, height;
-	int bit_depth, color_type, interlace_type;
-	Uint32 Rmask;
-	Uint32 Gmask;
-	Uint32 Bmask;
-	Uint32 Amask;
-	SDL_Palette *palette;
-	png_bytep *volatile row_pointers;
-	int row, i;
-	volatile int ckey = -1;
-	png_color_16 *transv;
-
-	if ( !src ) {
-		/* The error message has been set in SDL_RWFromFile */
-		return NULL;
-	}
-	start = SDL_RWtell(src);
-
-	if ( !IMG_Init(IMG_INIT_PNG) ) {
-		return NULL;
-	}
-
-	/* Initialize the data we will clean up when we're done */
-	error = NULL;
-	png_ptr = NULL; info_ptr = NULL; row_pointers = NULL; surface = NULL;
-
-	/* Create the PNG loading context structure */
-	png_ptr = lib.png_create_read_struct(PNG_LIBPNG_VER_STRING,
-					  NULL,NULL,NULL);
-	if (png_ptr == NULL){
-		error = "Couldn't allocate memory for PNG file or incompatible PNG dll";
-		goto done;
-	}
-
-	 /* Allocate/initialize the memory for image information.  REQUIRED. */
-	info_ptr = lib.png_create_info_struct(png_ptr);
-	if (info_ptr == NULL) {
-		error = "Couldn't create image information for PNG file";
-		goto done;
-	}
-
-	/* Set error handling if you are using setjmp/longjmp method (this is
-	 * the normal method of doing things with libpng).  REQUIRED unless you
-	 * set up your own error handlers in png_create_read_struct() earlier.
-	 */
-	if ( setjmp(png_ptr->jmpbuf) ) {
-		error = "Error reading the PNG file.";
-		goto done;
-	}
-
-	/* Set up the input control */
-	lib.png_set_read_fn(png_ptr, src, png_read_data);
-
-	/* Read PNG header info */
-	lib.png_read_info(png_ptr, info_ptr);
-	lib.png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth,
-			&color_type, &interlace_type, NULL, NULL);
-
-	/* tell libpng to strip 16 bit/color files down to 8 bits/color */
-	lib.png_set_strip_16(png_ptr) ;
-
-	/* Extract multiple pixels with bit depths of 1, 2, and 4 from a single
-	 * byte into separate bytes (useful for paletted and grayscale images).
-	 */
-	lib.png_set_packing(png_ptr);
-
-	/* scale greyscale values to the range 0..255 */
-	if(color_type == PNG_COLOR_TYPE_GRAY)
-		lib.png_set_expand(png_ptr);
-
-	/* For images with a single "transparent colour", set colour key;
-	   if more than one index has transparency, or if partially transparent
-	   entries exist, use full alpha channel */
-	if (lib.png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS)) {
-	        int num_trans;
-		Uint8 *trans;
-		lib.png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans,
-			     &transv);
-		if(color_type == PNG_COLOR_TYPE_PALETTE) {
-		    /* Check if all tRNS entries are opaque except one */
-		    int t = -1;
-		    for(i = 0; i < num_trans; i++)
-			if(trans[i] == 0) {
-			    if(t >= 0)
-				break;
-			    t = i;
-			} else if(trans[i] != 255)
-			    break;
-		    if(i == num_trans) {
-			/* exactly one transparent index */
-			ckey = t;
-		    } else {
-			/* more than one transparent index, or translucency */
-			lib.png_set_expand(png_ptr);
-		    }
-		} else
-		    ckey = 0; /* actual value will be set later */
-	}
-
-	if ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA )
-		lib.png_set_gray_to_rgb(png_ptr);
-
-	lib.png_read_update_info(png_ptr, info_ptr);
-
-	lib.png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth,
-			&color_type, &interlace_type, NULL, NULL);
-
-	/* Allocate the SDL surface to hold the image */
-	Rmask = Gmask = Bmask = Amask = 0 ; 
-	if ( color_type != PNG_COLOR_TYPE_PALETTE ) {
-		if ( SDL_BYTEORDER == SDL_LIL_ENDIAN ) {
-			Rmask = 0x000000FF;
-			Gmask = 0x0000FF00;
-			Bmask = 0x00FF0000;
-			Amask = (info_ptr->channels == 4) ? 0xFF000000 : 0;
-		} else {
-		        int s = (info_ptr->channels == 4) ? 0 : 8;
-			Rmask = 0xFF000000 >> s;
-			Gmask = 0x00FF0000 >> s;
-			Bmask = 0x0000FF00 >> s;
-			Amask = 0x000000FF >> s;
-		}
-	}
-	surface = SDL_AllocSurface(SDL_SWSURFACE, width, height,
-			bit_depth*info_ptr->channels, Rmask,Gmask,Bmask,Amask);
-	if ( surface == NULL ) {
-		error = "Out of memory";
-		goto done;
-	}
-
-	if(ckey != -1) {
-	        if(color_type != PNG_COLOR_TYPE_PALETTE)
-			/* FIXME: Should these be truncated or shifted down? */
-		        ckey = SDL_MapRGB(surface->format,
-			                 (Uint8)transv->red,
-			                 (Uint8)transv->green,
-			                 (Uint8)transv->blue);
-	        SDL_SetColorKey(surface, SDL_SRCCOLORKEY, ckey);
-	}
-
-	/* Create the array of pointers to image data */
-	row_pointers = (png_bytep*) malloc(sizeof(png_bytep)*height);
-	if ( (row_pointers == NULL) ) {
-		error = "Out of memory";
-		goto done;
-	}
-	for (row = 0; row < (int)height; row++) {
-		row_pointers[row] = (png_bytep)
-				(Uint8 *)surface->pixels + row*surface->pitch;
-	}
-
-	/* Read the entire image in one go */
-	lib.png_read_image(png_ptr, row_pointers);
-
-	/* and we're done!  (png_read_end() can be omitted if no processing of
-	 * post-IDAT text/time/etc. is desired)
-	 * In some cases it can't read PNG's created by some popular programs (ACDSEE),
-	 * we do not want to process comments, so we omit png_read_end
-
-	lib.png_read_end(png_ptr, info_ptr);
-	*/
-
-	/* Load the palette, if any */
-	palette = surface->format->palette;
-	if ( palette ) {
-	    if(color_type == PNG_COLOR_TYPE_GRAY) {
-			palette->ncolors = 256;
-			for(i = 0; i < 256; i++) {
-				palette->colors[i].r = i;
-				palette->colors[i].g = i;
-				palette->colors[i].b = i;
-			}
-		} else if (info_ptr->num_palette > 0 ) {
-			palette->ncolors = info_ptr->num_palette; 
-			for( i=0; i<info_ptr->num_palette; ++i ) {
-				palette->colors[i].b = info_ptr->palette[i].blue;
-				palette->colors[i].g = info_ptr->palette[i].green;
-				palette->colors[i].r = info_ptr->palette[i].red;
-			}
-	    }
-	}
-
-done:	/* Clean up and return */
-	if ( png_ptr ) {
-		lib.png_destroy_read_struct(&png_ptr,
-		                        info_ptr ? &info_ptr : (png_infopp)0,
-								(png_infopp)0);
-	}
-	if ( row_pointers ) {
-		free(row_pointers);
-	}
-	if ( error ) {
-		SDL_RWseek(src, start, RW_SEEK_SET);
-		if ( surface ) {
-			SDL_FreeSurface(surface);
-			surface = NULL;
-		}
-		IMG_SetError(error);
-	}
-	return(surface); 
-}
--- a/cocoaTouch/otherSrc/SDL_image.h	Mon Apr 19 15:30:11 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-    SDL_image:  An example image loading library for use with SDL
-    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
-    slouken@libsdl.org
-*/
-
-/* A simple library to load images of various formats as SDL surfaces */
-
-#ifndef _SDL_IMAGE_H
-#define _SDL_IMAGE_H
-
-#include "SDL.h"
-#include "SDL_version.h"
-#include "begin_code.h"
-
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
-*/
-#define SDL_IMAGE_MAJOR_VERSION	1
-#define SDL_IMAGE_MINOR_VERSION	2
-#define SDL_IMAGE_PATCHLEVEL	10
-
-typedef enum {
-    IMG_INIT_JPG = 0x00000001,
-    IMG_INIT_PNG = 0x00000002,
-    IMG_INIT_TIF = 0x00000004
-} IMG_InitFlags;
-
-/* Loads dynamic libraries and prepares them for use.  Flags should be
-   one or more flags from IMG_InitFlags OR'd together.
-   It returns the flags successfully initialized, or 0 on failure.
- */
-extern DECLSPEC int SDLCALL IMG_Init(int flags);
-
-/* Unloads libraries loaded with IMG_Init */
-extern DECLSPEC void SDLCALL IMG_Quit(void);
-
-/* Load an image from an SDL data source.
-   The 'type' may be one of: "BMP", "GIF", "PNG", etc.
-
-   If the image format supports a transparent pixel, SDL will set the
-   colorkey for the surface.  You can enable RLE acceleration on the
-   surface afterwards by calling:
-	SDL_SetColorKey(image, SDL_RLEACCEL, image->format->colorkey);
- */
-extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadTyped_RW(SDL_RWops *src, int freesrc, char *type);
-/* Convenience functions */
-extern DECLSPEC SDL_Surface * SDLCALL IMG_Load(const char *file);
-extern DECLSPEC SDL_Surface * SDLCALL IMG_Load_RW(SDL_RWops *src, int freesrc);
-
-/* Functions to detect a file type, given a seekable source */
-extern DECLSPEC int SDLCALL IMG_isPNG(SDL_RWops *src);
-
-/* Individual loading functions */
-extern DECLSPEC SDL_Surface * SDLCALL IMG_LoadPNG_RW(SDL_RWops *src);
-
-/* We'll use SDL for reporting errors */
-#define IMG_SetError	SDL_SetError
-#define IMG_GetError	SDL_GetError
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* _SDL_IMAGE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cocoaTouch/otherSrc/SquareButtonView.h	Wed Apr 21 01:57:23 2010 +0000
@@ -0,0 +1,22 @@
+//
+//  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;
+}
+
+@property (nonatomic,retain) NSArray *colorArray;
+
+-(void) nextColor;
+
+@end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cocoaTouch/otherSrc/SquareButtonView.m	Wed Apr 21 01:57:23 2010 +0000
@@ -0,0 +1,75 @@
+//
+//  HogButtonView.m
+//  HedgewarsMobile
+//
+//  Created by Vittorio on 20/04/10.
+//  Copyright 2010 __MyCompanyName__. All rights reserved.
+//
+
+#import "SquareButtonView.h"
+#import "CommodityFunctions.h"
+#import "UIImageExtra.h"
+#import "QuartzCore/QuartzCore.h"
+
+@implementation SquareButtonView
+@synthesize colorArray;
+
+-(id) initWithFrame:(CGRect)frame {
+    if ((self = [super initWithFrame:frame])) {
+        colorIndex = -1;
+        
+        // list of allowed colors
+        NSArray *colors = [[NSArray alloc] initWithObjects:[NSNumber numberWithUnsignedInt:4421353], [NSNumber numberWithInt:4100897], 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];
+    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];
+    */
+    NSLog(@"index:%d, color:%d, %@",colorIndex, color, self.backgroundColor);
+}
+
+
+-(void) dealloc {
+    [colorArray release];
+    [super dealloc];
+}
+
+
+@end
--- a/cocoaTouch/otherSrc/UIImageExtra.h	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/otherSrc/UIImageExtra.h	Wed Apr 21 01:57:23 2010 +0000
@@ -13,6 +13,7 @@
  
 -(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;
 
 @end
--- a/cocoaTouch/otherSrc/UIImageExtra.m	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/otherSrc/UIImageExtra.m	Wed Apr 21 01:57:23 2010 +0000
@@ -31,7 +31,11 @@
 
 -(UIImage *)mergeWith:(UIImage *)secondImage atPoint:(CGPoint) secondImagePoint {
     // create a contex of size of the background image
-    UIGraphicsBeginImageContext(self.size);
+    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)];
--- a/cocoaTouch/xib/GameConfigViewController-iPad.xib	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/xib/GameConfigViewController-iPad.xib	Wed Apr 21 01:57:23 2010 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
 	<data>
-		<int key="IBDocument.SystemTarget">768</int>
+		<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>
@@ -42,59 +42,10 @@
 				<int key="NSvFlags">292</int>
 				<object class="NSMutableArray" key="NSSubviews">
 					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIButton" id="258665798">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{20, 711}, {72, 37}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<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="789855109">
-							<string key="NSName">Helvetica-Bold</string>
-							<double key="NSSize">15</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<int key="IBUIButtonType">1</int>
-						<string key="IBUINormalTitle">Back</string>
-						<object class="NSColor" key="IBUIHighlightedTitleColor" id="25907977">
-							<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="348514410">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MC41AA</bytes>
-						</object>
-					</object>
-					<object class="IBUIButton" id="604334118">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{932, 711}, {72, 37}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<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="789855109"/>
-						<int key="IBUIButtonType">1</int>
-						<string key="IBUINormalTitle">Start</string>
-						<reference key="IBUIHighlightedTitleColor" ref="25907977"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="348514410"/>
-					</object>
 					<object class="IBUIPickerView" id="737511154">
 						<reference key="NSNextResponder" ref="766721923"/>
 						<int key="NSvFlags">290</int>
-						<string key="NSFrame">{{158, 532}, {266, 216}}</string>
+						<string key="NSFrame">{{754, 303}, {266, 216}}</string>
 						<reference key="NSSuperview" ref="766721923"/>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<bool key="IBUIShowsSelectionIndicator">YES</bool>
@@ -102,7 +53,7 @@
 					<object class="IBUIPickerView" id="918241339">
 						<reference key="NSNextResponder" ref="766721923"/>
 						<int key="NSvFlags">290</int>
-						<string key="NSFrame">{{480, 532}, {266, 216}}</string>
+						<string key="NSFrame">{{754, 51}, {266, 216}}</string>
 						<reference key="NSSuperview" ref="766721923"/>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<bool key="IBUIShowsSelectionIndicator">YES</bool>
@@ -112,7 +63,10 @@
 						<int key="NSvFlags">274</int>
 						<string key="NSFrame">{{20, 111}, {242, 396}}</string>
 						<reference key="NSSuperview" ref="766721923"/>
-						<reference key="IBUIBackgroundColor" ref="25907977"/>
+						<object class="NSColor" key="IBUIBackgroundColor" id="25907977">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MQA</bytes>
+						</object>
 						<bool key="IBUIClipsSubviews">YES</bool>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<bool key="IBUIBouncesZoom">NO</bool>
@@ -133,16 +87,40 @@
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<bool key="IBUIBouncesZoom">NO</bool>
 					</object>
+					<object class="IBUIToolbar" id="141751576">
+						<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="164195326">
+								<string key="IBUITitle">Back</string>
+								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+								<int key="IBUIStyle">1</int>
+								<reference key="IBUIToolbar" ref="141751576"/>
+							</object>
+							<object class="IBUIBarButtonItem" id="438091291">
+								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+								<reference key="IBUIToolbar" ref="141751576"/>
+								<int key="IBUISystemItemIdentifier">5</int>
+							</object>
+							<object class="IBUIBarButtonItem" id="693480499">
+								<int key="IBUITag">1</int>
+								<string key="IBUITitle">Start Game</string>
+								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
+								<int key="IBUIStyle">2</int>
+								<reference key="IBUIToolbar" ref="141751576"/>
+							</object>
+						</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">MQA</bytes>
-					<object class="NSColorSpace" key="NSCustomColorSpace">
-						<int key="NSID">2</int>
-					</object>
-				</object>
+				<reference key="IBUIBackgroundColor" ref="25907977"/>
 				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
 					<int key="interfaceOrientation">3</int>
@@ -162,38 +140,20 @@
 					<int key="connectionID">3</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">backButton</string>
-						<reference key="source" ref="841351856"/>
-						<reference key="destination" ref="258665798"/>
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="164195326"/>
+						<reference key="destination" ref="841351856"/>
 					</object>
-					<int key="connectionID">5</int>
+					<int key="connectionID">19</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBCocoaTouchEventConnection" key="connection">
 						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="258665798"/>
-						<reference key="destination" ref="841351856"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">7</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="604334118"/>
+						<reference key="source" ref="693480499"/>
 						<reference key="destination" ref="841351856"/>
-						<int key="IBEventType">7</int>
 					</object>
-					<int key="connectionID">8</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">startButton</string>
-						<reference key="source" ref="841351856"/>
-						<reference key="destination" ref="604334118"/>
-					</object>
-					<int key="connectionID">9</int>
+					<int key="connectionID">22</int>
 				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
@@ -221,28 +181,15 @@
 						<reference key="object" ref="766721923"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="258665798"/>
-							<reference ref="604334118"/>
-							<reference ref="829449116"/>
-							<reference ref="737511154"/>
 							<reference ref="295385433"/>
 							<reference ref="918241339"/>
+							<reference ref="737511154"/>
+							<reference ref="141751576"/>
+							<reference ref="829449116"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">4</int>
-						<reference key="object" ref="258665798"/>
-						<reference key="parent" ref="766721923"/>
-						<string key="objectName">Back Button</string>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">6</int>
-						<reference key="object" ref="604334118"/>
-						<reference key="parent" ref="766721923"/>
-						<string key="objectName">Start Button</string>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">10</int>
 						<reference key="object" ref="737511154"/>
 						<reference key="parent" ref="766721923"/>
@@ -262,6 +209,32 @@
 						<reference key="object" ref="295385433"/>
 						<reference key="parent" ref="766721923"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">15</int>
+						<reference key="object" ref="141751576"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="164195326"/>
+							<reference ref="438091291"/>
+							<reference ref="693480499"/>
+						</object>
+						<reference key="parent" ref="766721923"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">16</int>
+						<reference key="object" ref="164195326"/>
+						<reference key="parent" ref="141751576"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">17</int>
+						<reference key="object" ref="438091291"/>
+						<reference key="parent" ref="141751576"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">18</int>
+						<reference key="object" ref="693480499"/>
+						<reference key="parent" ref="141751576"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
@@ -274,10 +247,12 @@
 					<string>12.IBPluginDependency</string>
 					<string>13.IBPluginDependency</string>
 					<string>14.IBPluginDependency</string>
+					<string>15.IBPluginDependency</string>
+					<string>16.IBPluginDependency</string>
+					<string>17.IBPluginDependency</string>
+					<string>18.IBPluginDependency</string>
 					<string>2.IBEditorWindowLastContentRect</string>
 					<string>2.IBPluginDependency</string>
-					<string>4.IBPluginDependency</string>
-					<string>6.IBPluginDependency</string>
 				</object>
 				<object class="NSMutableArray" key="dict.values">
 					<bool key="EncodedWithXMLCoder">YES</bool>
@@ -287,10 +262,12 @@
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-					<string>{{269, 237}, {1024, 768}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>{{269, 237}, {1024, 768}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -309,7 +286,7 @@
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">14</int>
+			<int key="maxID">22</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -326,7 +303,6 @@
 						<object class="NSArray" key="dict.sortedKeys">
 							<bool key="EncodedWithXMLCoder">YES</bool>
 							<string>availableTeamsTableView</string>
-							<string>backButton</string>
 							<string>mapButton</string>
 							<string>randomButton</string>
 							<string>schemesButton</string>
@@ -339,8 +315,7 @@
 							<string>UIButton</string>
 							<string>UIButton</string>
 							<string>UIButton</string>
-							<string>UIButton</string>
-							<string>UIButton</string>
+							<string>UIBarButtonItem</string>
 							<string>UIButton</string>
 						</object>
 					</object>
@@ -486,6 +461,22 @@
 					</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">
@@ -547,6 +538,14 @@
 					</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>
@@ -572,6 +571,20 @@
 					<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>
@@ -589,14 +602,14 @@
 		<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="768" key="NS.object.0"/>
+			<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>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj</string>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 		<string key="IBCocoaTouchPluginVersion">87</string>
 	</data>
--- a/cocoaTouch/xib/GameConfigViewController-iPhone.xib	Mon Apr 19 15:30:11 2010 +0000
+++ b/cocoaTouch/xib/GameConfigViewController-iPhone.xib	Wed Apr 21 01:57:23 2010 +0000
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
 	<data>
-		<int key="IBDocument.SystemTarget">768</int>
+		<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>
@@ -42,54 +42,90 @@
 				<int key="NSvFlags">292</int>
 				<object class="NSMutableArray" key="NSSubviews">
 					<bool key="EncodedWithXMLCoder">YES</bool>
-					<object class="IBUIButton" id="258665798">
+					<object class="IBUIToolbar" id="836721772">
 						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{20, 263}, {72, 37}}</string>
+						<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">{{85, 8}, {269, 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>Teams</string>
+									<string>Weapons</string>
+									<string>Schemes</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>
-						<int key="IBUIContentHorizontalAlignment">0</int>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<object class="NSFont" key="IBUIFont" id="789855109">
-							<string key="NSName">Helvetica-Bold</string>
-							<double key="NSSize">15</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<int key="IBUIButtonType">1</int>
-						<string key="IBUINormalTitle">Back</string>
-						<object class="NSColor" key="IBUIHighlightedTitleColor" id="25907977">
-							<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 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 class="NSColor" key="IBUINormalTitleShadowColor" id="348514410">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MC41AA</bytes>
-						</object>
-					</object>
-					<object class="IBUIButton" id="604334118">
-						<reference key="NSNextResponder" ref="766721923"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{388, 263}, {72, 37}}</string>
-						<reference key="NSSuperview" ref="766721923"/>
-						<bool key="IBUIOpaque">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="789855109"/>
-						<int key="IBUIButtonType">1</int>
-						<string key="IBUINormalTitle">Start</string>
-						<reference key="IBUIHighlightedTitleColor" ref="25907977"/>
-						<object class="NSColor" key="IBUINormalTitleColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
-						</object>
-						<reference key="IBUINormalTitleShadowColor" ref="348514410"/>
 					</object>
 				</object>
 				<string key="NSFrameSize">{480, 320}</string>
@@ -97,9 +133,6 @@
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">3</int>
 					<bytes key="NSWhite">MQA</bytes>
-					<object class="NSColorSpace" key="NSCustomColorSpace">
-						<int key="NSID">2</int>
-					</object>
 				</object>
 				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
@@ -120,38 +153,20 @@
 					<int key="connectionID">3</int>
 				</object>
 				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">backButton</string>
-						<reference key="source" ref="841351856"/>
-						<reference key="destination" ref="258665798"/>
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">buttonPressed:</string>
+						<reference key="source" ref="80281356"/>
+						<reference key="destination" ref="841351856"/>
 					</object>
-					<int key="connectionID">5</int>
+					<int key="connectionID">17</int>
 				</object>
 				<object class="IBConnectionRecord">
 					<object class="IBCocoaTouchEventConnection" key="connection">
 						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="258665798"/>
-						<reference key="destination" ref="841351856"/>
-						<int key="IBEventType">7</int>
-					</object>
-					<int key="connectionID">7</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchEventConnection" key="connection">
-						<string key="label">buttonPressed:</string>
-						<reference key="source" ref="604334118"/>
+						<reference key="source" ref="919181414"/>
 						<reference key="destination" ref="841351856"/>
-						<int key="IBEventType">7</int>
 					</object>
-					<int key="connectionID">8</int>
-				</object>
-				<object class="IBConnectionRecord">
-					<object class="IBCocoaTouchOutletConnection" key="connection">
-						<string key="label">startButton</string>
-						<reference key="source" ref="841351856"/>
-						<reference key="destination" ref="604334118"/>
-					</object>
-					<int key="connectionID">9</int>
+					<int key="connectionID">23</int>
 				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
@@ -179,22 +194,56 @@
 						<reference key="object" ref="766721923"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<reference ref="604334118"/>
-							<reference ref="258665798"/>
+							<reference ref="836721772"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">4</int>
-						<reference key="object" ref="258665798"/>
+						<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"/>
-						<string key="objectName">Back Button</string>
+					</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">6</int>
-						<reference key="object" ref="604334118"/>
-						<reference key="parent" ref="766721923"/>
-						<string key="objectName">Start Button</string>
+						<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>
@@ -204,16 +253,24 @@
 					<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>4.IBPluginDependency</string>
-					<string>6.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>{{641, 512}, {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>{{639, 516}, {480, 320}}</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -235,7 +292,7 @@
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">14</int>
+			<int key="maxID">24</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -412,6 +469,22 @@
 					</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">
@@ -457,6 +530,14 @@
 					</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">
@@ -465,6 +546,14 @@
 					</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>
@@ -490,6 +579,20 @@
 					<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>
@@ -507,14 +610,14 @@
 		<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="768" key="NS.object.0"/>
+			<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>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj</string>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 		<string key="IBCocoaTouchPluginVersion">87</string>
 	</data>
--- a/misc/openalbridge/openalbridge.c	Mon Apr 19 15:30:11 2010 +0000
+++ b/misc/openalbridge/openalbridge.c	Wed Apr 21 01:57:23 2010 +0000
@@ -40,7 +40,6 @@
         /*Initialize an OpenAL contex and allocate memory space for data and buffers*/
         ALCcontext *context;
         ALCdevice *device;
-        const ALCchar *default_device;
         
         prog = "OpenAL subsystem";
 
@@ -130,7 +129,7 @@
         
         err_msg("(%s) INFO - closed", prog);
         
-        return AL_TRUE;
+        return;
     }
     
     ALboolean openal_ready(void) {
--- a/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj	Mon Apr 19 15:30:11 2010 +0000
+++ b/project_files/HedgewarsMobile/HedgewarsMobile.xcodeproj/project.pbxproj	Wed Apr 21 01:57:23 2010 +0000
@@ -32,6 +32,10 @@
 		611E1316117BBE5A0044B62F /* WeaponSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611E1315117BBE5A0044B62F /* WeaponSettingsViewController.m */; };
 		611E1319117BBE700044B62F /* SchemeSettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 611E1318117BBE700044B62F /* SchemeSettingsViewController.m */; };
 		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 */; };
@@ -71,8 +75,6 @@
 		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 */; };
-		6179885D114AA48A00BA94A9 /* IMG_png.c in Sources */ = {isa = PBXBuildFile; fileRef = 61798858114AA48A00BA94A9 /* IMG_png.c */; };
-		6179885E114AA48A00BA94A9 /* IMG.c in Sources */ = {isa = PBXBuildFile; fileRef = 61798859114AA48A00BA94A9 /* IMG.c */; };
 		61798869114AA4AA00BA94A9 /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 61798864114AA4AA00BA94A9 /* SDL_uikitappdelegate.m */; };
 		6179886B114AA4AA00BA94A9 /* SDL_uikitwindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 61798868114AA4AA00BA94A9 /* SDL_uikitwindow.m */; };
 		6179887D114AA4D000BA94A9 /* MainMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6179886F114AA4D000BA94A9 /* MainMenuViewController.m */; };
@@ -80,8 +82,6 @@
 		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 */; };
-		6179891D114AAF2100BA94A9 /* libpng_arm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798918114AAF2100BA94A9 /* libpng_arm.a */; };
-		6179891E114AAF2100BA94A9 /* libpng_x86.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798919114AAF2100BA94A9 /* libpng_x86.a */; };
 		6179891F114AAF2100BA94A9 /* libvorbis_arm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6179891A114AAF2100BA94A9 /* libvorbis_arm.a */; };
 		61798935114AB25F00BA94A9 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798934114AB25F00BA94A9 /* AudioToolbox.framework */; };
 		61798996114AB3FF00BA94A9 /* libSDL_mixer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798993114AB3FA00BA94A9 /* libSDL_mixer.a */; };
@@ -142,6 +142,7 @@
 		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 */
 
@@ -159,6 +160,13 @@
 /* End PBXBuildRule section */
 
 /* Begin PBXContainerItemProxy section */
+		61272332117DF752005B90CF /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 6127232E117DF752005B90CF /* SDL_image.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = BE1FA74107AF4C45004B6283;
+			remoteInfo = "Static Library";
+		};
 		617988D9114AAA3900BA94A9 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 617988D3114AAA3900BA94A9 /* SDLiPhoneOS.xcodeproj */;
@@ -224,6 +232,12 @@
 		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; };
+		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; };
@@ -271,10 +285,7 @@
 		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; };
-		61798858114AA48A00BA94A9 /* IMG_png.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG_png.c; path = ../../cocoaTouch/otherSrc/IMG_png.c; sourceTree = SOURCE_ROOT; };
-		61798859114AA48A00BA94A9 /* IMG.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = IMG.c; path = ../../cocoaTouch/otherSrc/IMG.c; 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; };
-		6179885B114AA48A00BA94A9 /* SDL_image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_image.h; path = ../../cocoaTouch/otherSrc/SDL_image.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; };
 		61798867114AA4AA00BA94A9 /* SDL_uikitwindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_uikitwindow.h; path = ../../cocoaTouch/SDLOverrides/SDL_uikitwindow.h; sourceTree = SOURCE_ROOT; };
@@ -286,8 +297,6 @@
 		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>"; };
-		61798918114AAF2100BA94A9 /* libpng_arm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpng_arm.a; sourceTree = "<group>"; };
-		61798919114AAF2100BA94A9 /* libpng_x86.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libpng_x86.a; sourceTree = "<group>"; };
 		6179891A114AAF2100BA94A9 /* libvorbis_arm.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libvorbis_arm.a; sourceTree = "<group>"; };
 		61798934114AB25F00BA94A9 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		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; };
@@ -358,6 +367,8 @@
 		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 */
@@ -367,6 +378,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				61272334117DF764005B90CF /* libSDL_image.a in Frameworks */,
 				61C325901179A732001E70B1 /* OpenAL.framework in Frameworks */,
 				61A1188511683A8C00359010 /* CoreGraphics.framework in Frameworks */,
 				61798A14114AB65C00BA94A9 /* libSDL_ttf.a in Frameworks */,
@@ -381,10 +393,9 @@
 				28FD15080DC6FC5B0079059D /* QuartzCore.framework in Frameworks */,
 				6179891B114AAF2100BA94A9 /* libfreetype_arm.a in Frameworks */,
 				6179891C114AAF2100BA94A9 /* libfreetype_x86.a in Frameworks */,
-				6179891D114AAF2100BA94A9 /* libpng_arm.a in Frameworks */,
-				6179891E114AAF2100BA94A9 /* libpng_x86.a in Frameworks */,
 				6179891F114AAF2100BA94A9 /* libvorbis_arm.a in Frameworks */,
 				61798935114AB25F00BA94A9 /* AudioToolbox.framework in Frameworks */,
+				61272339117DF778005B90CF /* MobileCoreServices.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -439,15 +450,16 @@
 			isa = PBXGroup;
 			children = (
 				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 */,
-				6179885B114AA48A00BA94A9 /* SDL_image.h */,
-				61798859114AA48A00BA94A9 /* IMG.c */,
-				61798858114AA48A00BA94A9 /* IMG_png.c */,
 				6179885A114AA48A00BA94A9 /* PascalImports.h */,
 				32CA4F630368D1EE00C91783 /* HedgewarsMobile_Prefix.pch */,
 			);
@@ -475,6 +487,7 @@
 		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
 			isa = PBXGroup;
 			children = (
+				6127232E117DF752005B90CF /* SDL_image.xcodeproj */,
 				617988D3114AAA3900BA94A9 /* SDLiPhoneOS.xcodeproj */,
 				617989B3114AB47500BA94A9 /* SDL_net.xcodeproj */,
 				6179898B114AB3FA00BA94A9 /* SDL_mixer.xcodeproj */,
@@ -488,9 +501,8 @@
 				61C3255A1179A384001E70B1 /* OpenAL.framework */,
 				61798916114AAF2100BA94A9 /* libfreetype_arm.a */,
 				61798917114AAF2100BA94A9 /* libfreetype_x86.a */,
-				61798918114AAF2100BA94A9 /* libpng_arm.a */,
-				61798919114AAF2100BA94A9 /* libpng_x86.a */,
 				6179891A114AAF2100BA94A9 /* libvorbis_arm.a */,
+				61272338117DF778005B90CF /* MobileCoreServices.framework */,
 			);
 			name = Frameworks;
 			sourceTree = "<group>";
@@ -536,11 +548,21 @@
 			name = "first level";
 			sourceTree = "<group>";
 		};
+		6127232F117DF752005B90CF /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				61272333117DF752005B90CF /* libSDL_image.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
 		61370672117B32A3004EE44A /* Game Config */ = {
 			isa = PBXGroup;
 			children = (
 				61370673117B32EF004EE44A /* GameConfigViewController.h */,
 				61370674117B32EF004EE44A /* GameConfigViewController.m */,
+				61272422117E17CF005B90CF /* TeamConfigViewController.h */,
+				61272423117E17CF005B90CF /* TeamConfigViewController.m */,
 			);
 			name = "Game Config";
 			sourceTree = "<group>";
@@ -841,6 +863,10 @@
 			projectDirPath = "";
 			projectReferences = (
 				{
+					ProductGroup = 6127232F117DF752005B90CF /* Products */;
+					ProjectRef = 6127232E117DF752005B90CF /* SDL_image.xcodeproj */;
+				},
+				{
 					ProductGroup = 6179898C114AB3FA00BA94A9 /* Products */;
 					ProjectRef = 6179898B114AB3FA00BA94A9 /* SDL_mixer.xcodeproj */;
 				},
@@ -868,6 +894,13 @@
 /* End PBXProject section */
 
 /* Begin PBXReferenceProxy section */
+		61272333117DF752005B90CF /* libSDL_image.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libSDL_image.a;
+			remoteRef = 61272332117DF752005B90CF /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
 		617988DA114AAA3900BA94A9 /* libSDLiPhoneOS.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
@@ -954,7 +987,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\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#the following ones must be removed when their support is implemented\n\n#delete some voices\nrm -rf ${PROJECT_DIR}/Data/Sounds/voices/{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\nsvn export --force ${PROJECT_DIR}/../../share/hedgewars/Data ${PROJECT_DIR}/Data\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#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 */ = {
@@ -1030,8 +1063,6 @@
 				6179883C114AA34C00BA94A9 /* uVisualGears.pas in Sources */,
 				6179883D114AA34C00BA94A9 /* uWorld.pas in Sources */,
 				6179885C114AA48A00BA94A9 /* CGPointUtils.c in Sources */,
-				6179885D114AA48A00BA94A9 /* IMG_png.c in Sources */,
-				6179885E114AA48A00BA94A9 /* IMG.c in Sources */,
 				61798869114AA4AA00BA94A9 /* SDL_uikitappdelegate.m in Sources */,
 				6179886B114AA4AA00BA94A9 /* SDL_uikitwindow.m in Sources */,
 				6179887D114AA4D000BA94A9 /* MainMenuViewController.m in Sources */,
@@ -1055,6 +1086,9 @@
 				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 */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1334,12 +1368,12 @@
 				ARCHS = "$(ARCHS_UNIVERSAL_IPHONE_OS)";
 				CODE_SIGN_IDENTITY = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				DEBUG_INFORMATION_FORMAT = stabs;
 				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix -dLOWRES";
 				FPC_COMPILER_BINARY_DIR = /usr/local/lib/fpc/2.5.1;
 				FPC_MAIN_FILE = "$(PROJECT_DIR)/../../hedgewars/hwLibrary.pas";
 				FPC_RTL_UNITS_BASE = /usr/local/lib/fpc;
-				FPC_SPECIFIC_OPTIONS = "-dDEBUGFILE -O- -gl -gw2 -gs -godwarfsets -gt -ghttt -Xs-";
+				FPC_SPECIFIC_OPTIONS = "-dDEBUGFILE -O- -gl -gw2 -gs -gt -ghttt -Xs-";
 				FPC_UNITS_PATH = "-Fu\"$(PROJECT_DIR)\"";
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_DEBUGGING_SYMBOLS = full;