equal
deleted
inserted
replaced
58 NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[hogArray count]]; |
58 NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:[hogArray count]]; |
59 for (NSDictionary *hog in hogArray) { |
59 for (NSDictionary *hog in hogArray) { |
60 NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/Data/Graphics/Hats/%@.png",[[NSBundle mainBundle] resourcePath],[hog objectForKey:@"hat"]]; |
60 NSString *hatFile = [[NSString alloc] initWithFormat:@"%@/Data/Graphics/Hats/%@.png",[[NSBundle mainBundle] resourcePath],[hog objectForKey:@"hat"]]; |
61 |
61 |
62 UIImage *image = [[UIImage alloc] initWithContentsOfFile: hatFile]; |
62 UIImage *image = [[UIImage alloc] initWithContentsOfFile: hatFile]; |
|
63 [hatFile release]; |
63 CGRect firstSpriteArea = CGRectMake(0, 0, 32, 32); |
64 CGRect firstSpriteArea = CGRectMake(0, 0, 32, 32); |
64 CGImageRef cgImgage = CGImageCreateWithImageInRect([image CGImage], firstSpriteArea); |
65 CGImageRef cgImgage = CGImageCreateWithImageInRect([image CGImage], firstSpriteArea); |
65 [image release]; |
66 [image release]; |
66 |
67 |
67 UIImage *hatSprite = [[UIImage alloc] initWithCGImage:cgImgage]; |
68 UIImage *hatSprite = [[UIImage alloc] initWithCGImage:cgImgage]; |