cocoaTouch/otherSrc/CommodityFunctions.m
changeset 3335 2520ee7a5484
parent 3330 987ec27b6042
child 3339 d558bc5a73c5
equal deleted inserted replaced
3334:f94a52a763d4 3335:2520ee7a5484
     5 //  Created by Vittorio on 08/04/10.
     5 //  Created by Vittorio on 08/04/10.
     6 //  Copyright 2010 __MyCompanyName__. All rights reserved.
     6 //  Copyright 2010 __MyCompanyName__. All rights reserved.
     7 //
     7 //
     8 
     8 
     9 #import "CommodityFunctions.h"
     9 #import "CommodityFunctions.h"
    10 
    10 #import "SDL_uikitappdelegate.h"
    11 
    11 
    12 void createTeamNamed (NSString *nameWithoutExt) {
    12 void createTeamNamed (NSString *nameWithoutExt) {
    13     NSString *teamsDirectory = TEAMS_DIRECTORY();
    13     NSString *teamsDirectory = TEAMS_DIRECTORY();
    14     
    14     
    15     if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) {
    15     if (![[NSFileManager defaultManager] fileExistsAtPath: teamsDirectory]) {
    48     [secondImage drawAtPoint:CGPointMake(0,-4)];
    48     [secondImage drawAtPoint:CGPointMake(0,-4)];
    49     UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
    49     UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
    50     UIGraphicsEndImageContext();
    50     UIGraphicsEndImageContext();
    51     return resultImage; // autoreleased
    51     return resultImage; // autoreleased
    52 }
    52 }
       
    53 
       
    54 BOOL rotationManager (UIInterfaceOrientation interfaceOrientation) {
       
    55     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
       
    56         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
       
    57     else
       
    58         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
       
    59 
       
    60 }