cocoaTouch/otherSrc/CommodityFunctions.m
changeset 3340 96dd168b080b
parent 3339 d558bc5a73c5
child 3352 ac5d14a35482
equal deleted inserted replaced
3339:d558bc5a73c5 3340:96dd168b080b
    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