project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m
changeset 3616 85d69ddb41b6
parent 3598 a8aa06bae895
child 3625 9f1d79e01a60
--- a/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m	Sat Jul 03 04:09:27 2010 +0200
+++ b/project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m	Sat Jul 03 04:42:29 2010 +0200
@@ -75,14 +75,15 @@
 }
 
 // main routine for calling the actual game engine
--(IBAction) startSDLgame {
+-(IBAction) startSDLgame: (NSDictionary *)gameDictionary {
     [UIView beginAnimations:@"removing main controller" context:NULL];
     [UIView setAnimationDuration:1];
     mainViewController.view.alpha = 0;
     [UIView commitAnimations];
 
     // pull out useful configuration info from various files
-    GameSetup *setup = [[GameSetup alloc] init];
+    GameSetup *setup = [[GameSetup alloc] initWithDictionary:gameDictionary];
+    
     [setup startThread:@"engineProtocol"];
     const char **gameArgs = [setup getSettings];
     [setup release];
@@ -96,6 +97,7 @@
     isInGame = NO;
     free(gameArgs);
     
+    // bring the uiwindow below in front
     UIWindow *aWin = [[[UIApplication sharedApplication] windows] objectAtIndex:0];
     [aWin makeKeyAndVisible];
     aWin =  [[[UIApplication sharedApplication] windows] lastObject];