project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m
changeset 3650 ec90e573f47a
parent 3629 86212d2b116a
child 3659 f8d5ac50e307
equal deleted inserted replaced
3649:bc35f8fee587 3650:ec90e573f47a
    74     [super dealloc];
    74     [super dealloc];
    75 }
    75 }
    76 
    76 
    77 // main routine for calling the actual game engine
    77 // main routine for calling the actual game engine
    78 -(IBAction) startSDLgame: (NSDictionary *)gameDictionary {
    78 -(IBAction) startSDLgame: (NSDictionary *)gameDictionary {
    79     [UIView beginAnimations:@"removing main controller" context:NULL];
       
    80     [UIView setAnimationDuration:1];
       
    81     mainViewController.view.alpha = 0;
       
    82     [UIView commitAnimations];
       
    83 
       
    84     // pull out useful configuration info from various files
    79     // pull out useful configuration info from various files
    85     GameSetup *setup = [[GameSetup alloc] initWithDictionary:gameDictionary];
    80     GameSetup *setup = [[GameSetup alloc] initWithDictionary:gameDictionary];
    86     
    81     
    87     [setup startThread:@"engineProtocol"];
    82     [setup startThread:@"engineProtocol"];
    88     const char **gameArgs = [setup getSettings];
    83     const char **gameArgs = [setup getSettings];
    96     Game(gameArgs);
    91     Game(gameArgs);
    97     isInGame = NO;
    92     isInGame = NO;
    98     free(gameArgs);
    93     free(gameArgs);
    99     
    94     
   100     // bring the uiwindow below in front
    95     // bring the uiwindow below in front
   101     //UIWindow *aWin = [[[UIApplication sharedApplication] windows] objectAtIndex:0];
    96     UIWindow *aWin = [[[UIApplication sharedApplication] windows] objectAtIndex:0];
   102     //[aWin makeKeyAndVisible];
    97     [aWin makeKeyAndVisible];
   103     
    98     
   104     // notice that in the simulator this reports 2 windows
    99     // notice that in the simulator this reports 2 windows
   105     DLog(@"%@",[[UIApplication sharedApplication] windows]);
   100     DLog(@"%@",[[UIApplication sharedApplication] windows]);
   106     
       
   107     [UIView beginAnimations:@"inserting main controller" context:NULL];
       
   108     [UIView setAnimationDuration:1];
       
   109     mainViewController.view.alpha = 1;
       
   110     [UIView commitAnimations];
       
   111 }
   101 }
   112 
   102 
   113 -(void) displayOverlayLater {
   103 -(void) displayOverlayLater {
   114     // overlay with controls, become visible later, with a transparency effect
   104     // overlay with controls, become visible later, with a transparency effect
   115     OverlayViewController *overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
   105     OverlayViewController *overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];