project_files/HedgewarsMobile/Classes/CommodityFunctions.h
author koda
Wed, 23 Jun 2010 22:03:56 +0200
changeset 3547 02875b1145b7
parent 3546 ccf4854df294
child 3548 4d220ee7c75f
permissions -rw-r--r--
i <3 mercurial
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3547
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     1
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     2
//  CommodityFunctions.h
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     3
//  HedgewarsMobile
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     4
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     5
//  Created by Vittorio on 08/04/10.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     7
//
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     8
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
     9
#import <Foundation/Foundation.h>
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    10
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    11
#define MAX_HOGS 8
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    12
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    13
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    14
#define SETTINGS_FILE()         [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    15
                                 objectAtIndex:0] stringByAppendingString:@"/settings.plist"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    16
#define GAMECONFIG_FILE()       [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    17
                                 objectAtIndex:0] stringByAppendingString:@"/gameconfig.plist"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    18
#define DEBUG_FILE()            [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    19
                                 objectAtIndex:0] stringByAppendingString:@"/debug.txt"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    20
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    21
#define TEAMS_DIRECTORY()       [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    22
                                 objectAtIndex:0] stringByAppendingString:@"/Teams/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    23
#define WEAPONS_DIRECTORY()     [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    24
                                 objectAtIndex:0] stringByAppendingString:@"/Weapons/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    25
#define SCHEMES_DIRECTORY()     [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    26
                                 objectAtIndex:0] stringByAppendingString:@"/Schemes/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    27
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    28
#define GRAPHICS_DIRECTORY()    [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    29
#define HATS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    30
#define GRAVES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    31
#define BOTLEVELS_DIRECTORY()   [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    32
#define BTN_DIRECTORY()         [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    33
#define FLAGS_DIRECTORY()       [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    34
#define FORTS_DIRECTORY()       [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    35
#define THEMES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Themes/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    36
#define MAPS_DIRECTORY()        [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Maps/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    37
#define VOICES_DIRECTORY()      [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"]
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    38
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    39
#define MSG_MEMCLEAN()          DLog(@"has cleaned up some memory"); print_free_memory()
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    40
#define MSG_DIDUNLOAD()         DLog(@"did unload");
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    41
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    42
void createTeamNamed (NSString *nameWithoutExt);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    43
void createWeaponNamed (NSString *nameWithoutExt);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    44
void createSchemeNamed (NSString *nameWithoutExt);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    45
BOOL rotationManager (UIInterfaceOrientation interfaceOrientation);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    46
NSInteger randomPort ();
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    47
void popError (const char *title, const char *message);
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    48
void print_free_memory ();
02875b1145b7 i <3 mercurial
koda
parents: 3546
diff changeset
    49