project_files/HedgewarsMobile/Classes/HogHatViewController.m
changeset 5983 f0925204f50e
parent 5208 878e551f0b4a
child 6074 047eaed35cbb
equal deleted inserted replaced
5982:283be2ca54a7 5983:f0925204f50e
    40     NSString *hatsDirectory = HATS_DIRECTORY();
    40     NSString *hatsDirectory = HATS_DIRECTORY();
    41     NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:hatsDirectory error:NULL];
    41     NSArray *array = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:hatsDirectory error:NULL];
    42     self.hatArray = array;
    42     self.hatArray = array;
    43 
    43 
    44     // load the base hog image, drawing will occure in cellForRow...
    44     // load the base hog image, drawing will occure in cellForRow...
    45     NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/Hedgehog.png",GRAPHICS_DIRECTORY()];
    45     NSString *normalHogFile = [[NSString alloc] initWithFormat:@"%@/basehat-hedgehog.png",[[NSBundle mainBundle] resourcePath]];
    46     UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile andCutAt:CGRectMake(96, 0, 32, 32)];
    46     UIImage *hogSprite = [[UIImage alloc] initWithContentsOfFile:normalHogFile];
    47     [normalHogFile release];
    47     [normalHogFile release];
    48     self.normalHogSprite = hogSprite;
    48     self.normalHogSprite = hogSprite;
    49     [hogSprite release];
    49     [hogSprite release];
    50 
    50 
    51     self.title = NSLocalizedString(@"Change hedgehog's hat",@"");
    51     self.title = NSLocalizedString(@"Change hedgehog's hat",@"");