project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
changeset 6415 af2047bb4f70
parent 6365 c992df555afb
parent 6344 cba81e10235c
child 6527 d19c6af9fa48
equal deleted inserted replaced
6414:8474b7fa84d6 6415:af2047bb4f70
   133         height = screenBounds.size.width;
   133         height = screenBounds.size.width;
   134     }
   134     }
   135 
   135 
   136     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)];
   136     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", (int)(width * screenScale)];
   137     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", (int)(height * screenScale)];
   137     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", (int)(height * screenScale)];
   138     NSString *rotation = [[NSString alloc] initWithString:@"0"];
   138     NSString *resourcePath = [[NSString alloc] initWithFormat:@"%@/Data", [[NSBundle mainBundle] resourcePath]];
   139 
   139 
   140     NSString *modelId = [HWUtils modelType];
   140     NSString *modelId = [HWUtils modelType];
   141     NSInteger tmpQuality;
   141     NSInteger tmpQuality;
   142     if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"])     // = iPhone and iPhone 3G or iPod Touch or iPod Touch 2G
   142     if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"])     // = iPhone and iPhone 3G or iPod Touch or iPod Touch 2G
   143         tmpQuality = 0x00000001 | 0x00000002 | 0x00000008 | 0x00000040;                 // rqLowRes | rqBlurryLand | rqSimpleRope | rqKillFlakes
   143         tmpQuality = 0x00000001 | 0x00000002 | 0x00000008 | 0x00000040;                 // rqLowRes | rqBlurryLand | rqSimpleRope | rqKillFlakes
   166     gameArgs[ 4] = "en.txt";//[localeString UTF8String];                                        //cLocaleFName
   166     gameArgs[ 4] = "en.txt";//[localeString UTF8String];                                        //cLocaleFName
   167     gameArgs[ 5] = [username UTF8String];                                                       //UserNick
   167     gameArgs[ 5] = [username UTF8String];                                                       //UserNick
   168     gameArgs[ 6] = [[[settings objectForKey:@"sound"] stringValue] UTF8String];                 //isSoundEnabled
   168     gameArgs[ 6] = [[[settings objectForKey:@"sound"] stringValue] UTF8String];                 //isSoundEnabled
   169     gameArgs[ 7] = [[[settings objectForKey:@"music"] stringValue] UTF8String];                 //isMusicEnabled
   169     gameArgs[ 7] = [[[settings objectForKey:@"music"] stringValue] UTF8String];                 //isMusicEnabled
   170     gameArgs[ 8] = [[[settings objectForKey:@"alternate"] stringValue] UTF8String];             //cAltDamage
   170     gameArgs[ 8] = [[[settings objectForKey:@"alternate"] stringValue] UTF8String];             //cAltDamage
   171     gameArgs[ 9] = [rotation UTF8String];                                                       //rotateQt
   171     gameArgs[ 9] = [resourcePath UTF8String];                                                   //PathPrefix
   172     gameArgs[10] = ([HWUtils gameType] == gtSave) ? [self.savePath UTF8String] : NULL;          //recordFileName
   172     gameArgs[10] = ([HWUtils gameType] == gtSave) ? [self.savePath UTF8String] : NULL;          //recordFileName
   173 
   173 
   174     [verticalSize release];
   174     [verticalSize release];
   175     [horizontalSize release];
   175     [horizontalSize release];
   176     [rotation release];
   176     [resourcePath release];
   177     [localeString release];
   177     [localeString release];
   178     [ipcString release];
   178     [ipcString release];
   179 
   179 
   180     [HWUtils setGameStatus:gsLoading];
   180     [HWUtils setGameStatus:gsLoading];
   181 
   181