project_files/HedgewarsMobile/Classes/SDL_uikitappdelegate.m
changeset 4356 d1d26f8963a3
parent 4354 c4e1820fa792
child 4454 42bfc1a70968
equal deleted inserted replaced
4354:c4e1820fa792 4356:d1d26f8963a3
   126     const char **gameArgs = [setup getSettings:[gameDictionary objectForKey:@"savefile"]];
   126     const char **gameArgs = [setup getSettings:[gameDictionary objectForKey:@"savefile"]];
   127     NSNumber *menuStyle = [NSNumber numberWithBool:setup.menuStyle];
   127     NSNumber *menuStyle = [NSNumber numberWithBool:setup.menuStyle];
   128     [setup release];
   128     [setup release];
   129 
   129 
   130     // since the sdlwindow is not yet created, we add the overlayController with a delay
   130     // since the sdlwindow is not yet created, we add the overlayController with a delay
   131     NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:isNetGameNum,@"net",menuStyle,@"menu",nil];
   131     NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
       
   132                           isNetGameNum,@"net",
       
   133                           menuStyle,@"menu",
       
   134                           [[gameDictionary objectForKey:@"game_dictionary"] objectForKey:@"orientation"],@"orientation",
       
   135                           nil];
   132     [self performSelector:@selector(displayOverlayLater:) withObject:dict afterDelay:1];
   136     [self performSelector:@selector(displayOverlayLater:) withObject:dict afterDelay:1];
   133 
   137 
   134     // this is the pascal fuction that starts the game (wrapped around isInGame)
   138     // this is the pascal fuction that starts the game (wrapped around isInGame)
   135     self.isInGame = YES;
   139     self.isInGame = YES;
   136     Game(gameArgs);
   140     Game(gameArgs);
   155 -(void) displayOverlayLater:(id) object {
   159 -(void) displayOverlayLater:(id) object {
   156     NSDictionary *dict = (NSDictionary *)object;
   160     NSDictionary *dict = (NSDictionary *)object;
   157     self.overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
   161     self.overlayController = [[OverlayViewController alloc] initWithNibName:@"OverlayViewController" bundle:nil];
   158     self.overlayController.isNetGame = [[dict objectForKey:@"net"] boolValue];
   162     self.overlayController.isNetGame = [[dict objectForKey:@"net"] boolValue];
   159     self.overlayController.useClassicMenu = [[dict objectForKey:@"menu"] boolValue];
   163     self.overlayController.useClassicMenu = [[dict objectForKey:@"menu"] boolValue];
       
   164     self.overlayController.initialOrientation = [[dict objectForKey:@"orientation"] intValue];
   160     
   165     
   161     UIWindow *gameWindow;
   166     UIWindow *gameWindow;
   162     if (IS_DUALHEAD())
   167     if (IS_DUALHEAD())
   163         gameWindow = self.uiwindow;
   168         gameWindow = self.uiwindow;
   164     else
   169     else