equal
deleted
inserted
replaced
40 [theTeam writeToFile:teamFile atomically:YES]; |
40 [theTeam writeToFile:teamFile atomically:YES]; |
41 [teamFile release]; |
41 [teamFile release]; |
42 [theTeam release]; |
42 [theTeam release]; |
43 } |
43 } |
44 |
44 |
45 UIImage *mergeTwoImages (UIImage *firstImage, UIImage *secondImage) { |
45 UIImage *mergeHogHatSprites (UIImage *firstImage, UIImage *secondImage) { |
46 UIGraphicsBeginImageContext(firstImage.size); |
46 UIGraphicsBeginImageContext(firstImage.size); |
47 [firstImage drawAtPoint:CGPointMake(0,0)]; |
47 [firstImage drawAtPoint:CGPointMake(0,0)]; |
48 [secondImage drawAtPoint:CGPointMake(0,-4)]; |
48 [secondImage drawAtPoint:CGPointMake(0,-5)]; |
49 UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext(); |
49 UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext(); |
50 UIGraphicsEndImageContext(); |
50 UIGraphicsEndImageContext(); |
51 return resultImage; // autoreleased |
51 return resultImage; // autoreleased |
52 } |
52 } |
53 |
53 |