author | sheepluva |
Fri, 07 May 2010 02:33:42 +0000 | |
changeset 3441 | f31225f99a06 |
parent 3377 | a3f0849f26bc |
child 3479 | 972ae3ec178a |
permissions | -rw-r--r-- |
3325 | 1 |
// |
2 |
// CommodityFunctions.h |
|
3 |
// HedgewarsMobile |
|
4 |
// |
|
5 |
// Created by Vittorio on 08/04/10. |
|
6 |
// Copyright 2010 __MyCompanyName__. All rights reserved. |
|
7 |
// |
|
8 |
||
9 |
#import <Foundation/Foundation.h> |
|
10 |
||
11 |
#define MAX_HOGS 8 |
|
12 |
||
3339 | 13 |
|
3335 | 14 |
#define SETTINGS_FILE() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ |
15 |
objectAtIndex:0] stringByAppendingString:@"/settings.plist"] |
|
3364 | 16 |
#define GAMECONFIG_FILE() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ |
17 |
objectAtIndex:0] stringByAppendingString:@"/gameconfig.plist"] |
|
3377 | 18 |
#define DEBUG_FILE() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ |
19 |
objectAtIndex:0] stringByAppendingString:@"/debug.txt"] |
|
3339 | 20 |
|
3330 | 21 |
#define TEAMS_DIRECTORY() [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) \ |
22 |
objectAtIndex:0] stringByAppendingString:@"/Teams/"] |
|
3339 | 23 |
|
3330 | 24 |
#define GRAPHICS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"] |
25 |
#define HATS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"] |
|
3352 | 26 |
#define GRAVES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"] |
27 |
#define BOTLEVELS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"] |
|
3373 | 28 |
#define FLAGS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"] |
3352 | 29 |
#define FORTS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"] |
3373 | 30 |
#define THEMES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Themes/"] |
31 |
#define MAPS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Maps/"] |
|
3352 | 32 |
#define VOICES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"] |
3325 | 33 |
|
34 |
void createTeamNamed (NSString *nameWithoutExt); |
|
3335 | 35 |
BOOL rotationManager (UIInterfaceOrientation interfaceOrientation); |
3373 | 36 |
NSInteger randomPort (); |
37 |
void popError (const char *title, const char *message); |
|
38 |
||
3374
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
39 |
|
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
40 |
#ifndef __IPHONE_3_2 // if iPhoneOS is 3.2 or greater then __IPHONE_3_2 will be defined |
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
41 |
typedef enum { |
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
42 |
UIUserInterfaceIdiomPhone, // iPhone and iPod touch style UI |
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
43 |
UIUserInterfaceIdiomPad, // iPad style UI |
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
44 |
} UIUserInterfaceIdiom; |
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
45 |
#define UI_USER_INTERFACE_IDIOM() UIUserInterfaceIdiomPhone |
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
46 |
#endif // ifndef __IPHONE_3_2 |
0d522416d97f
lazy loading for all the tables with images (might affect performance but ui feels much more responsive)
koda
parents:
3373
diff
changeset
|
47 |