tiy new overlay graphics
authorkoda
Wed, 30 Jun 2010 22:42:55 +0200
changeset 3598 a8aa06bae895
parent 3597 978c30ef50fc
child 3599 715a43602da8
tiy new overlay graphics clean the sdlwindow created updated latest sdl fixes, corrected leaks and stuff
hedgewars/CCHandlers.inc
hedgewars/SDLh.pas
hedgewars/hwengine.pas
hedgewars/uKeys.pas
hedgewars/uLand.pas
hedgewars/uMisc.pas
project_files/HedgewarsMobile/Classes/CommodityFunctions.m
project_files/HedgewarsMobile/Classes/GameSetup.m
project_files/HedgewarsMobile/Classes/MapConfigViewController.m
project_files/HedgewarsMobile/Classes/OverlayViewController.m
project_files/HedgewarsMobile/Classes/PopoverMenuViewController.m
project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.h
project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m
project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj
project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib
project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib
project_files/HedgewarsMobile/Resources/OverlayViewController.xib
project_files/HedgewarsMobile/Resources/arrowDown.png
project_files/HedgewarsMobile/Resources/arrowLeft.png
project_files/HedgewarsMobile/Resources/arrowRight.png
project_files/HedgewarsMobile/Resources/arrowUp.png
project_files/HedgewarsMobile/Resources/joyButton_attack.png
project_files/HedgewarsMobile/Resources/joyButton_backjump.png
project_files/HedgewarsMobile/Resources/joyButton_forwardjump.png
project_files/HedgewarsMobile/Resources/joyPush.png
--- a/hedgewars/CCHandlers.inc	Wed Jun 30 22:20:52 2010 +0200
+++ b/hedgewars/CCHandlers.inc	Wed Jun 30 22:42:55 2010 +0200
@@ -682,9 +682,6 @@
 {$IFDEF DEBUGFILE}
     buf: array[byte] of char;
 {$ENDIF}
-{$IFDEF SDL13}
-    window: PSDL_Window;
-{$ENDIF}
 begin
     s:= s; // avoid compiler hint
     if Length(s) = 0 then cFullScreen:= not cFullScreen
@@ -734,10 +731,13 @@
     end;
     
 {$IFDEF SDL13}
-    window:= SDL_CreateWindow('Hedgewars', 0, 0, cScreenWidth, cScreenHeight,
-        SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN    
-        {$IFDEF IPHONEOS} or SDL_WINDOW_BORDERLESS{$ENDIF});     
-    SDL_CreateRenderer(window, -1, 0);
+    if SDLwindow = nil then
+    begin
+        SDLwindow:= SDL_CreateWindow('Hedgewars', 0, 0, cScreenWidth, cScreenHeight,
+                        SDL_WINDOW_OPENGL or SDL_WINDOW_SHOWN    
+                        {$IFDEF IPHONEOS} or SDL_WINDOW_BORDERLESS{$ENDIF});     
+        SDL_CreateRenderer(SDLwindow, -1, 0);
+    end;
     
     SDL_SetRenderDrawColor(0, 0, 0, 255);    
     SDL_RenderFill(nil);     
--- a/hedgewars/SDLh.pas	Wed Jun 30 22:20:52 2010 +0200
+++ b/hedgewars/SDLh.pas	Wed Jun 30 22:42:55 2010 +0200
@@ -705,6 +705,8 @@
 function  SDL_CreateWindow(title: PChar; x,y,w,h, flags: LongInt): PSDL_Window; cdecl; external SDLLibName;      
 function  SDL_CreateRenderer(window: PSDL_Window; index, flags: LongInt): LongInt; cdecl; external SDLLibName;   
 function  SDL_SetRenderDrawColor(r,g,b,a: byte): LongInt; cdecl; external SDLLibName;
+function  SDL_DestroyRenderer(window: PSDL_Window): LongInt; cdecl; external SDLLibName;
+function  SDL_DestroyWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName;
 
 function  SDL_RenderFill(rect: PSDL_Rect): LongInt;
 function  SDL_RenderFillRect(rect: PSDL_Rect): LongInt; cdecl; external SDLLibName;
--- a/hedgewars/hwengine.pas	Wed Jun 30 22:20:52 2010 +0200
+++ b/hedgewars/hwengine.pas	Wed Jun 30 22:42:55 2010 +0200
@@ -172,6 +172,10 @@
     SendKB();
     CloseIPC();
     TTF_Quit();
+{$IFDEF SDL13}
+    SDL_DestroyRenderer(SDLwindow);
+    SDL_DestroyWindow(SDLwindow);
+{$ENDIF}
     SDL_Quit();
     isTerminated:= false;
 end;
@@ -250,7 +254,7 @@
     cVSyncInUse:= true;
     cTimerInterval:= 8;
     PathPrefix:= 'Data';
-    cReducedQuality:= 0;                //FIXME
+    cReducedQuality:= rqBlurryLand;                //FIXME
     cShowFPS:= true;
     cInitVolume:= 100;
 
--- a/hedgewars/uKeys.pas	Wed Jun 30 22:20:52 2010 +0200
+++ b/hedgewars/uKeys.pas	Wed Jun 30 22:42:55 2010 +0200
@@ -412,8 +412,8 @@
 
 procedure FreezeEnterKey;
 begin
-tkbd[13]:= 1;
-tkbd[271]:= 1;
+    tkbd[13]:= 1;
+    tkbd[271]:= 1;
 end;
 
 var Controller: array [0..5] of PSDL_Joystick;
--- a/hedgewars/uLand.pas	Wed Jun 30 22:20:52 2010 +0200
+++ b/hedgewars/uLand.pas	Wed Jun 30 22:42:55 2010 +0200
@@ -643,10 +643,11 @@
 for y:= 0 to LAND_HEIGHT - 1 do
     begin
     for x:= 0 to LAND_WIDTH - 1 do
+    if Land[y, x] <> 0 then
         if (cReducedQuality and rqBlurryLand) = 0 then
-            if Land[y, x] <> 0 then LandPixels[y, x]:= p^[x] or AMask
+             LandPixels[y, x]:= p^[x] or AMask
         else
-            if Land[y, x] <> 0 then LandPixels[y div 2, x div 2]:= p^[x] or AMask;
+             LandPixels[y div 2, x div 2]:= p^[x] or AMask;
 
     p:= @(p^[Surface^.pitch div 4]);
     end;
--- a/hedgewars/uMisc.pas	Wed Jun 30 22:20:52 2010 +0200
+++ b/hedgewars/uMisc.pas	Wed Jun 30 22:42:55 2010 +0200
@@ -131,6 +131,9 @@
     ScreenFadeValue : LongInt;
     ScreenFadeSpeed : LongInt;
 
+{$IFDEF SDL13}
+    SDLwindow: PSDL_Window;
+{$ENDIF}
 
 procedure initModule;
 procedure freeModule;
@@ -777,6 +780,10 @@
     cAltDamage      := true;
 
     ScreenFade      := sfNone;
+    
+{$IFDEF SDL13}
+    SDLwindow       := nil;
+{$ENDIF}    
 {$IFDEF DEBUGFILE}
 {$I-}
 {$IFDEF IPHONEOS}
--- a/project_files/HedgewarsMobile/Classes/CommodityFunctions.m	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/CommodityFunctions.m	Wed Jun 30 22:42:55 2010 +0200
@@ -54,10 +54,11 @@
     }
     
     NSDictionary *theWeapon = [[NSDictionary alloc] initWithObjectsAndKeys:
-                               @"9391929422199121032235111001201000000211190911",@"ammostore_initialqt",
-                               @"0405040541600655546554464776576666666155501000",@"ammostore_probability",
+                               @"9391929422199121032235111001201000000211110111",@"ammostore_initialqt",
+// rope on itouch              @"0000099999000000000000000000000099900000099999",@"ammostore_initialqt",
+                               @"0405040541600655546554464776576666666155510111",@"ammostore_probability",
                                @"0000000000000205500000040007004000000000200000",@"ammostore_delay",
-                               @"1311110312111111123114111111111111111211101111",@"ammostore_crate", nil];
+                               @"1311110312111111123114111111111111111211111111",@"ammostore_crate", nil];
     
     NSString *weaponFile = [[NSString alloc] initWithFormat:@"%@/%@.plist", weaponsDirectory, nameWithoutExt];
     
--- a/project_files/HedgewarsMobile/Classes/GameSetup.m	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/GameSetup.m	Wed Jun 30 22:42:55 2010 +0200
@@ -273,7 +273,7 @@
         
         switch (buffer[0]) {
             case 'C':
-                DLog(@"sending game config");
+                DLog(@"sending game config\n%@",self.gameConfig);
                 
                 // local game
                 [self sendToEngine:@"TL"];
@@ -301,12 +301,8 @@
                 }
                 
                 [self provideAmmoData:[self.gameConfig objectForKey:@"weapon"] forPlayingTeams:[teamsConfig count]];
-                
-                clientQuit = NO;
                 break;
             case '?':
-                // without this sleep sometimes frontend replies before engine has processed any flag (resulting in an error)
-                [NSThread sleepForTimeInterval:0.7];
                 DLog(@"Ping? Pong!");
                 [self sendToEngine:@"!"];
                 break;
--- a/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/MapConfigViewController.m	Wed Jun 30 22:42:55 2010 +0200
@@ -116,6 +116,7 @@
     CGColorSpaceRelease(colorspace);
     
     CGImageRef previewCGImage = CGBitmapContextCreateImage(bitmapImage);
+    CGContextRelease(bitmapImage);
     UIImage *previewImage = [[UIImage alloc] initWithCGImage:previewCGImage];
     CGImageRelease(previewCGImage);
     previewCGImage = nil;
--- a/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/OverlayViewController.m	Wed Jun 30 22:42:55 2010 +0200
@@ -128,23 +128,22 @@
     // add timer too runloop, otherwise it doesn't work
     [[NSRunLoop currentRunLoop] addTimer:dimTimer forMode:NSDefaultRunLoopMode];
     
-    // listen for dismissal of the popover (see below)
-    [[NSNotificationCenter defaultCenter] addObserver:self
-                                             selector:@selector(dismissPopover)
-                                                 name:@"dismissPopover"
-                                               object:nil];
-    
     [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];   
     [[NSNotificationCenter defaultCenter] addObserver:self
                                              selector:@selector(didRotate:)
-                                                 name:@"UIDeviceOrientationDidChangeNotification"
+                                                 name:UIDeviceOrientationDidChangeNotification
                                                object:nil];
 
-    //self.view.transform = CGAffineTransformRotate(self.view.transform, (M_PI/2.0)); 
     [UIView beginAnimations:@"showing overlay" context:NULL];
     [UIView setAnimationDuration:1];
     self.view.alpha = 1;
     [UIView commitAnimations];
+
+    // set initial orientation
+    [self didRotate:[NSNotification notificationWithName:UIDeviceOrientationDidChangeNotification object:nil]];
+
+    // to put the slider vertical...
+    //slider.transform = CGAffineTransformMakeRotation(M_PI * 0.5);
 }
 
 -(void) viewDidUnload {
@@ -319,28 +318,29 @@
         [self.writeChatTextField resignFirstResponder];
         [dimTimer setFireDate:HIDING_TIME_DEFAULT];
     }
-            
-    switch ([touches count]) {
-        case 1:
-            DLog(@"X:%d Y:%d", HWX(currentPosition.x), HWY(currentPosition.y));
-            HW_setCursor(HWX(currentPosition.x), HWY(currentPosition.y));
-            break;
-        case 2:
-            if (2 == [touch tapCount] && currentPosition.y < screen.size.width - 100) {
-                HW_ammoMenu();
-                //HW_zoomReset();
-            }
-            
-            // pinching
-            twoTouches = [touches allObjects];
-            UITouch *first = [twoTouches objectAtIndex:0];
-            UITouch *second = [twoTouches objectAtIndex:1];
-            initialDistanceForPinching = distanceBetweenPoints([first locationInView:self.view], [second locationInView:self.view]);
-            break;
-        default:
-            break;
+    
+    if (currentPosition.y < screen.size.width - 120) {
+        switch ([touches count]) {
+            case 1:
+                DLog(@"X:%d Y:%d", HWX(currentPosition.x), HWY(currentPosition.y));
+                HW_setCursor(HWX(currentPosition.x), HWY(currentPosition.y));
+                break;
+            case 2:
+                if (2 == [touch tapCount]) {
+                    HW_ammoMenu();
+                    //HW_zoomReset();
+                }
+                
+                // pinching
+                twoTouches = [touches allObjects];
+                UITouch *first = [twoTouches objectAtIndex:0];
+                UITouch *second = [twoTouches objectAtIndex:1];
+                initialDistanceForPinching = distanceBetweenPoints([first locationInView:self.view], [second locationInView:self.view]);
+                break;
+            default:
+                break;
+        }
     }
-
 }
 
 -(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
--- a/project_files/HedgewarsMobile/Classes/PopoverMenuViewController.m	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/PopoverMenuViewController.m	Wed Jun 30 22:42:55 2010 +0200
@@ -129,10 +129,8 @@
         [UIView commitAnimations];
     }
     
-    if ([actionSheet cancelButtonIndex] != buttonIndex) {
-        [[NSNotificationCenter defaultCenter] postNotificationName:@"dismissPopover" object:nil];
+    if ([actionSheet cancelButtonIndex] != buttonIndex)
         HW_terminate(NO);
-    }
     else
         if (!isPaused) 
             HW_pause();     
--- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.h	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.h	Wed Jun 30 22:42:55 2010 +0200
@@ -27,15 +27,10 @@
 @class OverlayViewController;
 
 @interface SDLUIKitDelegate:NSObject<UIApplicationDelegate> {
-    SDL_Window *window;      
-    UIWindow *uiwindow;
     MainMenuViewController *mainViewController;
     BOOL isInGame;
 }
 
-@property (readwrite, assign) SDL_Window *window;    
-@property (readwrite, retain) UIWindow *uiwindow;
-
 +(SDLUIKitDelegate *)sharedAppDelegate;
 -(void) startSDLgame;
 -(void) displayOverlayLater;
--- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m	Wed Jun 30 22:42:55 2010 +0200
@@ -54,7 +54,6 @@
 }
 
 @implementation SDLUIKitDelegate
-@synthesize uiwindow, window;
 
 // convenience method
 +(SDLUIKitDelegate *)sharedAppDelegate {
@@ -66,15 +65,11 @@
     if (self = [super init]){
         mainViewController = nil;
         isInGame = NO;
-        self.uiwindow = nil;     
-        self.window = NULL;
     }
     return self;
 }
 
 -(void) dealloc {
-    SDL_DestroyWindow(self.window);
-     [uiwindow release];
     [mainViewController release];
     [super dealloc];
 }
@@ -93,14 +88,20 @@
     [setup release];
 
     // since the sdlwindow is not yet created, we add the overlayController with a delay
-    [self performSelector:@selector(displayOverlayLater) withObject:nil afterDelay:0.5];
+    [self performSelector:@selector(displayOverlayLater) withObject:nil afterDelay:0.3];
     
     // this is the pascal fuction that starts the game (wrapped around isInGame)
     isInGame = YES;
     Game(gameArgs);
     isInGame = NO;
+    free(gameArgs);
     
-    free(gameArgs);
+    UIWindow *aWin = [[[UIApplication sharedApplication] windows] objectAtIndex:0];
+    [aWin makeKeyAndVisible];
+    aWin =  [[[UIApplication sharedApplication] windows] lastObject];
+    [aWin removeFromSuperview];
+    
+    DLog(@"%@",[[UIApplication sharedApplication] windows]);
     
     [UIView beginAnimations:@"inserting main controller" context:NULL];
     [UIView setAnimationDuration:1];
@@ -109,9 +110,10 @@
 }
 
 -(void) displayOverlayLater {
-    // overlay with controls, become visible after 4 seconds, with a transparency effect
+    // overlay with controls, become visible later, with a transparency effect
     OverlayViewController *overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
-    
+
+    // keyWindow is the frontmost window
     [[[UIApplication sharedApplication] keyWindow] addSubview:overlayController.view];
     [overlayController release];
 }
@@ -121,10 +123,8 @@
     [application setStatusBarHidden:YES];
     [application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];  
     
-    uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
+    UIWindow *uiwindow = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
     uiwindow.backgroundColor = [UIColor blackColor];
-    // needed to keep the app running after a game (gets released in sdl_uikitwindow)
-    [uiwindow retain];
     
     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
         mainViewController = [[MainMenuViewController alloc] initWithNibName:@"MainMenuViewController-iPad" bundle:nil];
@@ -148,15 +148,16 @@
 }
 
 -(void) applicationDidReceiveMemoryWarning:(UIApplication *)application {
+    if (mainViewController.view.superview == nil)
+        mainViewController = nil;
+    MSG_MEMCLEAN();
     print_free_memory();
 }
 
 -(void) applicationWillResignActive:(UIApplication *)application {
-    //NSLog(@"%@", NSStringFromSelector(_cmd));
     if (isInGame) {
         HW_pause();
         
-        /*
         // Send every window on every screen a MINIMIZED event.
         SDL_VideoDevice *_this = SDL_GetVideoDevice();
         if (!_this)
@@ -169,7 +170,6 @@
             for (window = display->windows; window != nil; window = window->next)
                 SDL_SendWindowEvent(window, SDL_WINDOWEVENT_MINIMIZED, 0, 0);
         }
-        */
     }
 }
 
@@ -178,7 +178,6 @@
     if (isInGame) {
         HW_pause();
 
-        /*
         // Send every window on every screen a RESTORED event.
         SDL_VideoDevice *_this = SDL_GetVideoDevice();
         if (!_this)
@@ -191,7 +190,6 @@
             for (window = display->windows; window != nil; window = window->next)
                 SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESTORED, 0, 0);
         }
-        */
     }
 }
 
--- a/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Hedgewars.xcodeproj/project.pbxproj	Wed Jun 30 22:42:55 2010 +0200
@@ -30,6 +30,9 @@
 		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 */; };
+		6132878111D9517D006BA39D /* joyButton_backjump.png in Resources */ = {isa = PBXBuildFile; fileRef = 6132878011D9517D006BA39D /* joyButton_backjump.png */; };
+		6132878311D95185006BA39D /* joyButton_forwardjump.png in Resources */ = {isa = PBXBuildFile; fileRef = 6132878211D95185006BA39D /* joyButton_forwardjump.png */; };
+		6132878511D9518B006BA39D /* joyButton_attack.png in Resources */ = {isa = PBXBuildFile; fileRef = 6132878411D9518B006BA39D /* joyButton_attack.png */; };
 		61370653117B1D50004EE44A /* Entitlements-Distribution.plist in Resources */ = {isa = PBXBuildFile; fileRef = 61370652117B1D50004EE44A /* Entitlements-Distribution.plist */; };
 		6151347E116C2803001F16D1 /* Icon-iPad.png in Resources */ = {isa = PBXBuildFile; fileRef = 6151347D116C2803001F16D1 /* Icon-iPad.png */; };
 		61536CCF11CE836E00D87A7E /* libfreetype_x86.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 61798917114AAF2100BA94A9 /* libfreetype_x86.a */; };
@@ -200,6 +203,13 @@
 			remoteGlobalIDString = BE48FD6E07AFA17000BB41DA;
 			remoteInfo = "Static Library";
 		};
+		6184608B11DA8BF3000E1314 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 617988D3114AAA3900BA94A9 /* SDLiPhoneOS.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 006E982211955059001DE610;
+			remoteInfo = testsdl;
+		};
 		61C325201179A30E001E70B1 /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
@@ -232,6 +242,9 @@
 		6122CD00116BECCA002648E9 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-Landscape.png"; path = "Resources/Default-Landscape.png"; sourceTree = "<group>"; };
 		6127232E117DF752005B90CF /* SDL_image.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL_image.xcodeproj; path = "../../../Library/SDL-1.3/SDL_image/Xcode_iPhone/SDL_image.xcodeproj"; sourceTree = SOURCE_ROOT; };
 		61272338117DF778005B90CF /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
+		6132878011D9517D006BA39D /* joyButton_backjump.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_backjump.png; path = Resources/joyButton_backjump.png; sourceTree = "<group>"; };
+		6132878211D95185006BA39D /* joyButton_forwardjump.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_forwardjump.png; path = Resources/joyButton_forwardjump.png; sourceTree = "<group>"; };
+		6132878411D9518B006BA39D /* joyButton_attack.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = joyButton_attack.png; path = Resources/joyButton_attack.png; sourceTree = "<group>"; };
 		61370652117B1D50004EE44A /* Entitlements-Distribution.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Entitlements-Distribution.plist"; sourceTree = "<group>"; };
 		6151347D116C2803001F16D1 /* Icon-iPad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-iPad.png"; path = "Resources/Icon-iPad.png"; sourceTree = "<group>"; };
 		6163EE7C11CC2600001C0453 /* SingleWeaponViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleWeaponViewController.h; sourceTree = "<group>"; };
@@ -432,6 +445,8 @@
 				6163EE6C11CC253F001C0453 /* Overlay */,
 				616591F011CA9BA200D6E256 /* MainMenuViewController.h */,
 				616591F111CA9BA200D6E256 /* MainMenuViewController.m */,
+				6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */,
+				6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */,
 				616591E611CA9BA200D6E256 /* GameSetup.h */,
 				616591E711CA9BA200D6E256 /* GameSetup.m */,
 			);
@@ -489,7 +504,6 @@
 			isa = PBXGroup;
 			children = (
 				6100DAD4115446B000F455E0 /* Resources-iPad */,
-				6100DB1711544E8400F455E0 /* XIB */,
 				6179937011501D5800BA94A9 /* buttons */,
 				6179936F11501D4100BA94A9 /* back panels */,
 				6179936611501D1E00BA94A9 /* joystick */,
@@ -539,20 +553,6 @@
 			name = "Resources-iPad";
 			sourceTree = "<group>";
 		};
-		6100DB1711544E8400F455E0 /* XIB */ = {
-			isa = PBXGroup;
-			children = (
-				6165924A11CA9CB400D6E256 /* GameConfigViewController.xib */,
-				6165924B11CA9CB400D6E256 /* MainMenuViewController-iPad.xib */,
-				6165924C11CA9CB400D6E256 /* MainMenuViewController-iPhone.xib */,
-				6165924D11CA9CB400D6E256 /* MapConfigViewController-iPad.xib */,
-				6165924E11CA9CB400D6E256 /* MapConfigViewController-iPhone.xib */,
-				6165925011CA9CB400D6E256 /* OverlayViewController.xib */,
-			);
-			name = XIB;
-			path = Classes;
-			sourceTree = "<group>";
-		};
 		6127232F117DF752005B90CF /* Products */ = {
 			isa = PBXGroup;
 			children = (
@@ -582,12 +582,15 @@
 			children = (
 				616591E411CA9BA200D6E256 /* GameConfigViewController.h */,
 				616591E511CA9BA200D6E256 /* GameConfigViewController.m */,
+				6165924A11CA9CB400D6E256 /* GameConfigViewController.xib */,
 				6165920411CA9BA200D6E256 /* TeamConfigViewController.h */,
 				6165920511CA9BA200D6E256 /* TeamConfigViewController.m */,
 				616591FC11CA9BA200D6E256 /* SchemeWeaponConfigViewController.h */,
 				616591FD11CA9BA200D6E256 /* SchemeWeaponConfigViewController.m */,
 				616591F211CA9BA200D6E256 /* MapConfigViewController.h */,
 				616591F311CA9BA200D6E256 /* MapConfigViewController.m */,
+				6165924D11CA9CB400D6E256 /* MapConfigViewController-iPad.xib */,
+				6165924E11CA9CB400D6E256 /* MapConfigViewController-iPhone.xib */,
 			);
 			name = "Game Config";
 			sourceTree = "<group>";
@@ -646,6 +649,7 @@
 				616591F911CA9BA200D6E256 /* PopoverMenuViewController.m */,
 				616591F611CA9BA200D6E256 /* OverlayViewController.h */,
 				616591F711CA9BA200D6E256 /* OverlayViewController.m */,
+				6165925011CA9CB400D6E256 /* OverlayViewController.xib */,
 			);
 			name = Overlay;
 			sourceTree = "<group>";
@@ -685,6 +689,7 @@
 			isa = PBXGroup;
 			children = (
 				617988DA114AAA3900BA94A9 /* libSDLiPhoneOS.a */,
+				6184608C11DA8BF3000E1314 /* testsdl.app */,
 			);
 			name = Products;
 			sourceTree = "<group>";
@@ -721,6 +726,9 @@
 				6165925B11CA9CD300D6E256 /* arrowRight.png */,
 				6165925C11CA9CD300D6E256 /* arrowUp.png */,
 				6165925D11CA9CD300D6E256 /* joyPush.png */,
+				6132878011D9517D006BA39D /* joyButton_backjump.png */,
+				6132878211D95185006BA39D /* joyButton_forwardjump.png */,
+				6132878411D9518B006BA39D /* joyButton_attack.png */,
 			);
 			name = joystick;
 			sourceTree = "<group>";
@@ -945,6 +953,13 @@
 			remoteRef = 61798A12114AB65600BA94A9 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
+		6184608C11DA8BF3000E1314 /* testsdl.app */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.application;
+			path = testsdl.app;
+			remoteRef = 6184608B11DA8BF3000E1314 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
 /* End PBXReferenceProxy section */
 
 /* Begin PBXResourcesBuildPhase section */
@@ -987,6 +1002,9 @@
 				6165928811CA9D4800D6E256 /* playButton.png in Resources */,
 				6165928911CA9D4800D6E256 /* settingsButton.png in Resources */,
 				6165928A11CA9D4800D6E256 /* storeButton.png in Resources */,
+				6132878111D9517D006BA39D /* joyButton_backjump.png in Resources */,
+				6132878311D95185006BA39D /* joyButton_forwardjump.png in Resources */,
+				6132878511D9518B006BA39D /* joyButton_attack.png in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1191,7 +1209,7 @@
 				CODE_SIGN_ENTITLEMENTS = "Entitlements-Distribution.plist";
 				CODE_SIGN_IDENTITY = "iPhone Distribution";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
-				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix";
+				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix -Sc";
 				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;
@@ -1302,7 +1320,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix";
+				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix -Sc";
 				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;
@@ -1505,7 +1523,7 @@
 				CODE_SIGN_IDENTITY = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Vittorio Giovara (DC2BRETXAC)";
 				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix";
+				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix -Sc";
 				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;
@@ -1544,7 +1562,7 @@
 				ARCHS = "$(ARCHS_STANDARD_32_BIT)";
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix";
+				FPC_COMMON_OPTIONS = "-dIPHONEOS -Cs2000000 -vwi -B  -Sgix -Sc";
 				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;
--- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPad.xib	Wed Jun 30 22:42:55 2010 +0200
@@ -2,13 +2,13 @@
 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
 	<data>
 		<int key="IBDocument.SystemTarget">800</int>
-		<string key="IBDocument.SystemVersion">10D573</string>
-		<string key="IBDocument.InterfaceBuilderVersion">762</string>
+		<string key="IBDocument.SystemVersion">10F569</string>
+		<string key="IBDocument.InterfaceBuilderVersion">788</string>
 		<string key="IBDocument.AppKitVersion">1038.29</string>
-		<string key="IBDocument.HIToolboxVersion">460.00</string>
+		<string key="IBDocument.HIToolboxVersion">461.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">87</string>
+			<string key="NS.object.0">117</string>
 		</object>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -37,7 +37,7 @@
 				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 			</object>
 			<object class="IBUIView" id="191373211">
-				<nil key="NSNextResponder"/>
+				<reference key="NSNextResponder"/>
 				<int key="NSvFlags">292</int>
 				<object class="NSMutableArray" key="NSSubviews">
 					<bool key="EncodedWithXMLCoder">YES</bool>
@@ -46,6 +46,7 @@
 						<int key="NSvFlags">274</int>
 						<string key="NSFrameSize">{1024, 768}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIUserInteractionEnabled">NO</bool>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<object class="NSCustomResource" key="IBUIImage">
@@ -58,6 +59,7 @@
 						<int key="NSvFlags">292</int>
 						<string key="NSFrame">{{147, 20}, {745, 146}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<int key="IBUIContentMode">4</int>
 						<bool key="IBUIUserInteractionEnabled">NO</bool>
@@ -72,6 +74,7 @@
 						<int key="NSvFlags">292</int>
 						<string key="NSFrame">{{147, 200}, {258, 215}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 						<int key="IBUIContentHorizontalAlignment">0</int>
@@ -103,6 +106,7 @@
 						<int key="NSvFlags">292</int>
 						<string key="NSFrame">{{634, 493}, {258, 215}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<int key="IBUITag">1</int>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -125,6 +129,7 @@
 						<int key="NSvFlags">292</int>
 						<string key="NSFrame">{{175, 600}, {18, 19}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<int key="IBUITag">3</int>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -143,8 +148,9 @@
 					<object class="IBUILabel" id="177360137">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{762, 183}, {87, 21}}</string>
+						<string key="NSFrame">{{641, 180}, {243, 21}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClipsSubviews">YES</bool>
 						<int key="IBUIContentMode">7</int>
@@ -172,6 +178,7 @@
 						<int key="NSvFlags">292</int>
 						<string key="NSFrame">{{267, 579}, {72, 62}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<int key="IBUITag">2</int>
 						<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -191,10 +198,15 @@
 					</object>
 				</object>
 				<string key="NSFrameSize">{1024, 768}</string>
+				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">1</int>
 					<bytes key="NSRGB">MCAwIDAAA</bytes>
 				</object>
+				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+					<int key="interfaceOrientation">3</int>
+				</object>
 				<string key="targetRuntimeIdentifier">IBIPadFramework</string>
 			</object>
 		</object>
@@ -271,10 +283,10 @@
 							<reference ref="90394251"/>
 							<reference ref="607338789"/>
 							<reference ref="867308721"/>
-							<reference ref="177360137"/>
 							<reference ref="95106947"/>
 							<reference ref="898948205"/>
 							<reference ref="976741091"/>
+							<reference ref="177360137"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
@@ -387,22 +399,27 @@
 						<string key="NS.key.0">switchViews:</string>
 						<string key="NS.object.0">id</string>
 					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<string key="NS.key.0">switchViews:</string>
+						<object class="IBActionInfo" key="NS.object.0">
+							<string key="name">switchViews:</string>
+							<string key="candidateClassName">id</string>
+						</object>
+					</object>
 					<object class="NSMutableDictionary" key="outlets">
-						<bool key="EncodedWithXMLCoder">YES</bool>
-						<object class="NSArray" key="dict.sortedKeys">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>settingsSplitViewController</string>
-							<string>versionLabel</string>
-						</object>
-						<object class="NSMutableArray" key="dict.values">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>UISplitViewController</string>
-							<string>UILabel</string>
+						<string key="NS.key.0">versionLabel</string>
+						<string key="NS.object.0">UILabel</string>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<string key="NS.key.0">versionLabel</string>
+						<object class="IBToOneOutletInfo" key="NS.object.0">
+							<string key="name">versionLabel</string>
+							<string key="candidateClassName">UILabel</string>
 						</object>
 					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
 						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../cocoaTouch/MainMenuViewController.h</string>
+						<string key="minorKey">Classes/MainMenuViewController.h</string>
 					</object>
 				</object>
 			</object>
@@ -595,14 +612,6 @@
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
-					<string key="className">UISplitViewController</string>
-					<string key="superclassName">UIViewController</string>
-					<object class="IBClassDescriptionSource" key="sourceIdentifier" id="53873462">
-						<string key="majorKey">IBFrameworkSource</string>
-						<string key="minorKey">UIKit.framework/Headers/UISplitViewController.h</string>
-					</object>
-				</object>
-				<object class="IBPartialClassDescription">
 					<string key="className">UIView</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
 						<string key="majorKey">IBFrameworkSource</string>
@@ -633,7 +642,10 @@
 				</object>
 				<object class="IBPartialClassDescription">
 					<string key="className">UIViewController</string>
-					<reference key="sourceIdentifier" ref="53873462"/>
+					<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>
@@ -663,7 +675,7 @@
 			<integer value="3000" key="NS.object.0"/>
 		</object>
 		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
-		<string key="IBDocument.LastKnownRelativeProjectPath">../../project_files/HedgewarsMobile/Hedgewars.xcodeproj</string>
+		<string key="IBDocument.LastKnownRelativeProjectPath">../Hedgewars.xcodeproj</string>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -684,6 +696,6 @@
 				<string>{57, 51}</string>
 			</object>
 		</object>
-		<string key="IBCocoaTouchPluginVersion">87</string>
+		<string key="IBCocoaTouchPluginVersion">117</string>
 	</data>
 </archive>
--- a/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Resources/MainMenuViewController-iPhone.xib	Wed Jun 30 22:42:55 2010 +0200
@@ -2,17 +2,16 @@
 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10">
 	<data>
 		<int key="IBDocument.SystemTarget">800</int>
-		<string key="IBDocument.SystemVersion">10D573</string>
-		<string key="IBDocument.InterfaceBuilderVersion">762</string>
+		<string key="IBDocument.SystemVersion">10F569</string>
+		<string key="IBDocument.InterfaceBuilderVersion">788</string>
 		<string key="IBDocument.AppKitVersion">1038.29</string>
-		<string key="IBDocument.HIToolboxVersion">460.00</string>
+		<string key="IBDocument.HIToolboxVersion">461.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">87</string>
+			<string key="NS.object.0">117</string>
 		</object>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<integer value="1"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -47,6 +46,7 @@
 						<int key="NSvFlags">274</int>
 						<string key="NSFrame">{{0, 21}, {480, 278}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<object class="NSColor" key="IBUIBackgroundColor">
 							<int key="NSColorSpace">3</int>
 							<bytes key="NSWhite">MCAwAA</bytes>
@@ -64,6 +64,7 @@
 						<int key="NSvFlags">293</int>
 						<string key="NSFrame">{{121, 25}, {240, 52}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUIContentMode">4</int>
@@ -79,6 +80,7 @@
 						<int key="NSvFlags">289</int>
 						<string key="NSFrame">{{240, 102}, {220, 52}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<object class="NSColor" key="IBUIBackgroundColor">
 							<int key="NSColorSpace">1</int>
 							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
@@ -115,6 +117,7 @@
 						<int key="NSvFlags">265</int>
 						<string key="NSFrame">{{240, 177}, {220, 52}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<object class="NSColor" key="IBUIBackgroundColor">
 							<int key="NSColorSpace">1</int>
 							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
@@ -142,6 +145,7 @@
 						<int key="NSvFlags">260</int>
 						<string key="NSFrame">{{12, 144}, {220, 52}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<object class="NSColor" key="IBUIBackgroundColor">
 							<int key="NSColorSpace">1</int>
 							<bytes key="NSRGB">MCAwIDAgMAA</bytes>
@@ -167,8 +171,9 @@
 					<object class="IBUILabel" id="533529472">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{60, 102}, {145, 21}}</string>
+						<string key="NSFrame">{{37, 102}, {168, 21}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClipsSubviews">YES</bool>
 						<bool key="IBUIUserInteractionEnabled">NO</bool>
@@ -193,6 +198,7 @@
 						<int key="NSvFlags">269</int>
 						<string key="NSFrame">{{209, 237}, {59, 52}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">2</int>
@@ -216,6 +222,7 @@
 						<int key="NSvFlags">290</int>
 						<string key="NSFrameSize">{480, 17}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUIContentMode">4</int>
@@ -231,6 +238,7 @@
 						<int key="NSvFlags">266</int>
 						<string key="NSFrame">{{0, 297}, {480, 23}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUIContentMode">4</int>
@@ -246,6 +254,7 @@
 						<int key="NSvFlags">292</int>
 						<string key="NSFrame">{{20, 270}, {18, 19}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<int key="IBUITag">3</int>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -264,10 +273,14 @@
 				</object>
 				<string key="NSFrameSize">{480, 320}</string>
 				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">1</int>
 					<bytes key="NSRGB">MCAwIDAAA</bytes>
 				</object>
+				<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
+					<int key="interfaceOrientation">3</int>
+				</object>
 				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
 			</object>
 		</object>
@@ -491,13 +504,27 @@
 						<string key="NS.key.0">switchViews:</string>
 						<string key="NS.object.0">id</string>
 					</object>
+					<object class="NSMutableDictionary" key="actionInfosByName">
+						<string key="NS.key.0">switchViews:</string>
+						<object class="IBActionInfo" key="NS.object.0">
+							<string key="name">switchViews:</string>
+							<string key="candidateClassName">id</string>
+						</object>
+					</object>
 					<object class="NSMutableDictionary" key="outlets">
 						<string key="NS.key.0">versionLabel</string>
 						<string key="NS.object.0">UILabel</string>
 					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<string key="NS.key.0">versionLabel</string>
+						<object class="IBToOneOutletInfo" key="NS.object.0">
+							<string key="name">versionLabel</string>
+							<string key="candidateClassName">UILabel</string>
+						</object>
+					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
 						<string key="majorKey">IBProjectSource</string>
-						<string key="minorKey">../../cocoaTouch/MainMenuViewController.h</string>
+						<string key="minorKey">Classes/MainMenuViewController.h</string>
 					</object>
 				</object>
 			</object>
@@ -753,7 +780,7 @@
 			<integer value="3000" 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">../Hedgewars.xcodeproj</string>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -780,6 +807,6 @@
 				<string>{262, 84}</string>
 			</object>
 		</object>
-		<string key="IBCocoaTouchPluginVersion">87</string>
+		<string key="IBCocoaTouchPluginVersion">117</string>
 	</data>
 </archive>
--- a/project_files/HedgewarsMobile/Resources/OverlayViewController.xib	Wed Jun 30 22:20:52 2010 +0200
+++ b/project_files/HedgewarsMobile/Resources/OverlayViewController.xib	Wed Jun 30 22:42:55 2010 +0200
@@ -3,16 +3,15 @@
 	<data>
 		<int key="IBDocument.SystemTarget">800</int>
 		<string key="IBDocument.SystemVersion">10F569</string>
-		<string key="IBDocument.InterfaceBuilderVersion">762</string>
+		<string key="IBDocument.InterfaceBuilderVersion">788</string>
 		<string key="IBDocument.AppKitVersion">1038.29</string>
 		<string key="IBDocument.HIToolboxVersion">461.00</string>
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
-			<string key="NS.object.0">87</string>
+			<string key="NS.object.0">117</string>
 		</object>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<integer value="1"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -45,8 +44,9 @@
 					<object class="IBUIButton" id="584263820">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{0, 237}, {39, 53}}</string>
+						<string key="NSFrame">{{0, 229}, {50, 50}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -77,8 +77,9 @@
 					<object class="IBUIButton" id="123494776">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{75, 237}, {39, 54}}</string>
+						<string key="NSFrame">{{87, 229}, {50, 50}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">1</int>
@@ -100,8 +101,9 @@
 					<object class="IBUIButton" id="590902961">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">265</int>
-						<string key="NSFrame">{{416, 227}, {64, 64}}</string>
+						<string key="NSFrame">{{412, 236}, {64, 64}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">5</int>
@@ -115,16 +117,17 @@
 							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
 						</object>
 						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<object class="NSCustomResource" key="IBUINormalImage" id="639745463">
+						<object class="NSCustomResource" key="IBUINormalImage">
 							<string key="NSClassName">NSImage</string>
-							<string key="NSResourceName">joyPush.png</string>
+							<string key="NSResourceName">joyButton_forwardjump.png</string>
 						</object>
 					</object>
 					<object class="IBUIButton" id="132251648">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">265</int>
-						<string key="NSFrame">{{368, 207}, {64, 64}}</string>
+						<string key="NSFrame">{{365, 203}, {64, 64}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">6</int>
@@ -138,13 +141,17 @@
 							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
 						</object>
 						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<reference key="IBUINormalImage" ref="639745463"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">joyButton_backjump.png</string>
+						</object>
 					</object>
 					<object class="IBUIButton" id="752933969">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">265</int>
-						<string key="NSFrame">{{344, 256}, {64, 64}}</string>
+						<string key="NSFrame">{{354, 256}, {64, 64}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">4</int>
@@ -158,13 +165,17 @@
 							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
 						</object>
 						<reference key="IBUINormalTitleShadowColor" ref="280149554"/>
-						<reference key="IBUINormalImage" ref="639745463"/>
+						<object class="NSCustomResource" key="IBUINormalImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">joyButton_attack.png</string>
+						</object>
 					</object>
 					<object class="IBUIButton" id="261686746">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{29, 207}, {53, 39}}</string>
+						<string key="NSFrame">{{44, 187}, {50, 50}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">2</int>
@@ -186,8 +197,9 @@
 					<object class="IBUIButton" id="81315603">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">268</int>
-						<string key="NSFrame">{{29, 281}, {53, 39}}</string>
+						<string key="NSFrame">{{44, 270}, {50, 50}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
 						<int key="IBUITag">3</int>
@@ -211,6 +223,7 @@
 						<int key="NSvFlags">289</int>
 						<string key="NSFrame">{{412, -6}, {72, 64}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<int key="IBUITag">10</int>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
@@ -231,8 +244,9 @@
 					<object class="IBUIActivityIndicatorView" id="324194355">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">269</int>
-						<string key="NSFrame">{{225, 245}, {37, 37}}</string>
+						<string key="NSFrame">{{225, 248}, {37, 37}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
+						<reference key="NSWindow"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
 						<bool key="IBUIAnimating">YES</bool>
@@ -241,6 +255,7 @@
 				</object>
 				<string key="NSFrameSize">{480, 320}</string>
 				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">3</int>
 					<bytes key="NSWhite">MSAwAA</bytes>
@@ -550,15 +565,15 @@
 						<reference key="object" ref="191373211"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="309477778"/>
+							<reference ref="324194355"/>
+							<reference ref="590902961"/>
+							<reference ref="81315603"/>
 							<reference ref="584263820"/>
-							<reference ref="123494776"/>
 							<reference ref="261686746"/>
-							<reference ref="81315603"/>
-							<reference ref="590902961"/>
+							<reference ref="123494776"/>
 							<reference ref="132251648"/>
 							<reference ref="752933969"/>
-							<reference ref="309477778"/>
-							<reference ref="324194355"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
@@ -649,7 +664,7 @@
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<string>OverlayViewController</string>
 					<string>UIResponder</string>
-					<string>{{222, 756}, {480, 320}}</string>
+					<string>{{899, 369}, {480, 320}}</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -678,7 +693,7 @@
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">64</int>
+			<int key="maxID">65</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -699,17 +714,34 @@
 							<string>id</string>
 						</object>
 					</object>
-					<object class="NSMutableDictionary" key="outlets">
+					<object class="NSMutableDictionary" key="actionInfosByName">
 						<bool key="EncodedWithXMLCoder">YES</bool>
 						<object class="NSArray" key="dict.sortedKeys">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>popoverController</string>
-							<string>spinningWheel</string>
+							<string>buttonPressed:</string>
+							<string>buttonReleased:</string>
 						</object>
 						<object class="NSMutableArray" key="dict.values">
 							<bool key="EncodedWithXMLCoder">YES</bool>
-							<string>id</string>
-							<string>UIActivityIndicatorView</string>
+							<object class="IBActionInfo">
+								<string key="name">buttonPressed:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+							<object class="IBActionInfo">
+								<string key="name">buttonReleased:</string>
+								<string key="candidateClassName">id</string>
+							</object>
+						</object>
+					</object>
+					<object class="NSMutableDictionary" key="outlets">
+						<string key="NS.key.0">spinningWheel</string>
+						<string key="NS.object.0">UIActivityIndicatorView</string>
+					</object>
+					<object class="NSMutableDictionary" key="toOneOutletInfosByName">
+						<string key="NS.key.0">spinningWheel</string>
+						<object class="IBToOneOutletInfo" key="NS.object.0">
+							<string key="name">spinningWheel</string>
+							<string key="candidateClassName">UIActivityIndicatorView</string>
 						</object>
 					</object>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">
@@ -972,19 +1004,23 @@
 				<string>arrowLeft.png</string>
 				<string>arrowRight.png</string>
 				<string>arrowUp.png</string>
-				<string>joyPush.png</string>
+				<string>joyButton_attack.png</string>
+				<string>joyButton_backjump.png</string>
+				<string>joyButton_forwardjump.png</string>
 				<string>menuCorner.png</string>
 			</object>
 			<object class="NSMutableArray" key="dict.values">
 				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>{50, 50}</string>
+				<string>{50, 50}</string>
 				<string>{64, 64}</string>
-				<string>{64, 64}</string>
+				<string>{50, 50}</string>
 				<string>{64, 64}</string>
 				<string>{64, 64}</string>
 				<string>{64, 64}</string>
 				<string>{64, 64}</string>
 			</object>
 		</object>
-		<string key="IBCocoaTouchPluginVersion">87</string>
+		<string key="IBCocoaTouchPluginVersion">117</string>
 	</data>
 </archive>
Binary file project_files/HedgewarsMobile/Resources/arrowDown.png has changed
Binary file project_files/HedgewarsMobile/Resources/arrowLeft.png has changed
Binary file project_files/HedgewarsMobile/Resources/arrowRight.png has changed
Binary file project_files/HedgewarsMobile/Resources/arrowUp.png has changed
Binary file project_files/HedgewarsMobile/Resources/joyButton_attack.png has changed
Binary file project_files/HedgewarsMobile/Resources/joyButton_backjump.png has changed
Binary file project_files/HedgewarsMobile/Resources/joyButton_forwardjump.png has changed
Binary file project_files/HedgewarsMobile/Resources/joyPush.png has changed