project_files/HedgewarsMobile/Classes/CommodityFunctions.h
changeset 3737 2ba6ac8a114b
parent 3703 12d17c6e8855
child 3780 7c704e69242e
equal deleted inserted replaced
3736:d8982f9e7e2c 3737:2ba6ac8a114b
     8 
     8 
     9 #import <Foundation/Foundation.h>
     9 #import <Foundation/Foundation.h>
    10 
    10 
    11 #define MAX_HOGS 8
    11 #define MAX_HOGS 8
    12 
    12 
       
    13 #define DOCUMENTS_FOLDER()      [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]
    13 
    14 
    14 #define SETTINGS_FILE()         [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
    15 #define SETTINGS_FILE()         [DOCUMENTS_FOLDER() stringByAppendingString:@"/settings.plist"]
    15                                  objectAtIndex:0] stringByAppendingString:@"/settings.plist"]
    16 #define DEBUG_FILE()            [DOCUMENTS_FOLDER() stringByAppendingString:@"/debug.txt"]
    16 #define DEBUG_FILE()            [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
       
    17                                  objectAtIndex:0] stringByAppendingString:@"/debug.txt"]
       
    18 
    17 
    19 #define TEAMS_DIRECTORY()       [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
    18 #define TEAMS_DIRECTORY()       [DOCUMENTS_FOLDER() stringByAppendingString:@"/Teams/"]
    20                                  objectAtIndex:0] stringByAppendingString:@"/Teams/"]
    19 #define WEAPONS_DIRECTORY()     [DOCUMENTS_FOLDER() stringByAppendingString:@"/Weapons/"]
    21 #define WEAPONS_DIRECTORY()     [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
    20 #define SCHEMES_DIRECTORY()     [DOCUMENTS_FOLDER() stringByAppendingString:@"/Schemes/"]
    22                                  objectAtIndex:0] stringByAppendingString:@"/Weapons/"]
       
    23 #define SCHEMES_DIRECTORY()     [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
       
    24                                  objectAtIndex:0] stringByAppendingString:@"/Schemes/"]
       
    25 
    21 
    26 #define GRAPHICS_DIRECTORY()    [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"]
    22 #define GRAPHICS_DIRECTORY()    [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"]
    27 #define HATS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"]
    23 #define HATS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"]
    28 #define GRAVES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"]
    24 #define GRAVES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"]
    29 #define BOTLEVELS_DIRECTORY()   [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"]
    25 #define BOTLEVELS_DIRECTORY()   [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"]
    35 #define VOICES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"]
    31 #define VOICES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"]
    36 
    32 
    37 #define MSG_MEMCLEAN()          DLog(@"has cleaned up some memory");
    33 #define MSG_MEMCLEAN()          DLog(@"has cleaned up some memory");
    38 #define MSG_DIDUNLOAD()         DLog(@"unloaded");
    34 #define MSG_DIDUNLOAD()         DLog(@"unloaded");
    39 
    35 
    40 #define CURRENT_AMMOSIZE        46
    36 #define CURRENT_AMMOSIZE        48      // also add a line in SingleWeaponViewController array
    41 
    37 
    42 #define UICOLOR_HW_YELLOW_BODER [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xC0/255 blue:0 alpha:1]
    38 #define UICOLOR_HW_YELLOW_BODER [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xC0/255 blue:0 alpha:1]
    43 #define UICOLOR_HW_YELLOW_TEXT  [UIColor colorWithRed:(CGFloat)0xF0/255 green:(CGFloat)0xD0/255 blue:0 alpha:1]
    39 #define UICOLOR_HW_YELLOW_TEXT  [UIColor colorWithRed:(CGFloat)0xF0/255 green:(CGFloat)0xD0/255 blue:0 alpha:1]
    44 
    40 
    45 void createTeamNamed (NSString *nameWithoutExt);
    41 void createTeamNamed (NSString *nameWithoutExt);
    46 void createWeaponNamed (NSString *nameWithoutExt);
    42 void createWeaponNamed (NSString *nameWithoutExt, int type);
    47 void createSchemeNamed (NSString *nameWithoutExt);
    43 void createSchemeNamed (NSString *nameWithoutExt);
    48 BOOL rotationManager (UIInterfaceOrientation interfaceOrientation);
    44 BOOL rotationManager (UIInterfaceOrientation interfaceOrientation);
    49 NSInteger randomPort ();
    45 NSInteger randomPort ();
    50 void popError (const char *title, const char *message);
    46 void popError (const char *title, const char *message);
    51 void print_free_memory ();
    47 void print_free_memory ();