project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m
changeset 4760 224c31b3ce7d
parent 4757 7ca9ebb6895d
child 4976 088d40d8aba2
equal deleted inserted replaced
4757:7ca9ebb6895d 4760:224c31b3ce7d
    83     [secondWindow release];
    83     [secondWindow release];
    84     [super dealloc];
    84     [super dealloc];
    85 }
    85 }
    86 
    86 
    87 // main routine for calling the actual game engine
    87 // main routine for calling the actual game engine
    88 -(NSDictionary *)startSDLgame:(NSDictionary *)gameDictionary {
    88 -(NSArray *)startSDLgame:(NSDictionary *)gameDictionary {
    89     UIWindow *gameWindow;
    89     UIWindow *gameWindow;
    90     if (IS_DUALHEAD())
    90     if (IS_DUALHEAD())
    91         gameWindow = self.secondWindow;
    91         gameWindow = self.secondWindow;
    92     else
    92     else
    93         gameWindow = self.uiwindow;
    93         gameWindow = self.uiwindow;
   142     // this is the pascal fuction that starts the game
   142     // this is the pascal fuction that starts the game
   143     Game(gameArgs);
   143     Game(gameArgs);
   144     self.isInGame = NO;
   144     self.isInGame = NO;
   145     free(gameArgs);
   145     free(gameArgs);
   146     
   146     
   147     NSDictionary *stat = setup.statsDictionary;
   147     NSArray *stats = setup.statsArray;
   148     [setup release];
   148     [setup release];
   149 
   149 
   150 
   150 
   151     [self.uiwindow makeKeyAndVisible];
   151     [self.uiwindow makeKeyAndVisible];
   152     [self.uiwindow bringSubviewToFront:self.mainViewController.view];
   152     [self.uiwindow bringSubviewToFront:self.mainViewController.view];
   159     refSecondBlackView.alpha = 0;
   159     refSecondBlackView.alpha = 0;
   160     [UIView commitAnimations];
   160     [UIView commitAnimations];
   161     [refBlackView performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
   161     [refBlackView performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1];
   162     [refSecondBlackView performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:2];
   162     [refSecondBlackView performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:2];
   163 
   163 
   164     return stat;
   164     return stats;
   165 }
   165 }
   166 
   166 
   167 // overlay with controls, become visible later, with a transparency effect since the sdlwindow is not yet created
   167 // overlay with controls, become visible later, with a transparency effect since the sdlwindow is not yet created
   168 -(void) displayOverlayLater:(id) object {
   168 -(void) displayOverlayLater:(id) object {
   169     NSDictionary *dict = (NSDictionary *)object;
   169     NSDictionary *dict = (NSDictionary *)object;