project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
branchhedgeroid
changeset 6029 5073285b6599
parent 6020 c792d4b3e080
child 6224 42b256eca362
equal deleted inserted replaced
6027:302408e45052 6029:5073285b6599
    79         height = (int) screenBounds.size.width;
    79         height = (int) screenBounds.size.width;
    80     }
    80     }
    81 
    81 
    82     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", width * (int)getScreenScale()];
    82     NSString *horizontalSize = [[NSString alloc] initWithFormat:@"%d", width * (int)getScreenScale()];
    83     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", height * (int)getScreenScale()];
    83     NSString *verticalSize = [[NSString alloc] initWithFormat:@"%d", height * (int)getScreenScale()];
    84     NSString *rotation = [[NSString alloc] initWithString:@"0"];
       
    85 
    84 
    86     NSString *modelId = getModelType();
    85     NSString *modelId = getModelType();
    87     NSInteger tmpQuality;
    86     NSInteger tmpQuality;
    88     if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"])     // = iPhone and iPhone 3G or iPod Touch or iPod Touch 2G
    87     if ([modelId hasPrefix:@"iPhone1"] || [modelId hasPrefix:@"iPod1,1"] || [modelId hasPrefix:@"iPod2,1"])     // = iPhone and iPhone 3G or iPod Touch or iPod Touch 2G
    89         tmpQuality = 0x00000001 | 0x00000002 | 0x00000008 | 0x00000040;                 // rqLowRes | rqBlurryLand | rqSimpleRope | rqKillFlakes
    88         tmpQuality = 0x00000001 | 0x00000002 | 0x00000008 | 0x00000040;                 // rqLowRes | rqBlurryLand | rqSimpleRope | rqKillFlakes
   110     gameArgs[ 4] = "en.txt";//[localeString UTF8String];                                        //cLocaleFName
   109     gameArgs[ 4] = "en.txt";//[localeString UTF8String];                                        //cLocaleFName
   111     gameArgs[ 5] = [username UTF8String];                                                       //UserNick
   110     gameArgs[ 5] = [username UTF8String];                                                       //UserNick
   112     gameArgs[ 6] = [[[settings objectForKey:@"sound"] stringValue] UTF8String];                 //isSoundEnabled
   111     gameArgs[ 6] = [[[settings objectForKey:@"sound"] stringValue] UTF8String];                 //isSoundEnabled
   113     gameArgs[ 7] = [[[settings objectForKey:@"music"] stringValue] UTF8String];                 //isMusicEnabled
   112     gameArgs[ 7] = [[[settings objectForKey:@"music"] stringValue] UTF8String];                 //isMusicEnabled
   114     gameArgs[ 8] = [[[settings objectForKey:@"alternate"] stringValue] UTF8String];             //cAltDamage
   113     gameArgs[ 8] = [[[settings objectForKey:@"alternate"] stringValue] UTF8String];             //cAltDamage
   115     gameArgs[ 9] = [rotation UTF8String];                                                       //rotateQt
   114     gameArgs[ 9] = [[[NSBundle mainBundle] resourcePath] UTF8String];                           //PathPrefix
   116     gameArgs[10] = (self.gameType == gtSave) ? [self.savePath UTF8String] : NULL;               //recordFileName
   115     gameArgs[10] = (self.gameType == gtSave) ? [self.savePath UTF8String] : NULL;               //recordFileName
   117 
   116 
   118     [verticalSize release];
   117     [verticalSize release];
   119     [horizontalSize release];
   118     [horizontalSize release];
   120     [rotation release];
       
   121     [localeString release];
   119     [localeString release];
   122     [ipcString release];
   120     [ipcString release];
   123 
   121 
   124     objcExportsInit();
   122     objcExportsInit();
   125 
   123