author | koda |
Tue, 12 Oct 2010 05:06:30 +0200 | |
changeset 3971 | 5c82ee165ed5 |
parent 3941 | 017b2b31e1c6 |
child 3983 | aa24192417a8 |
permissions | -rw-r--r-- |
3829 | 1 |
/* |
2 |
* Hedgewars-iOS, a Hedgewars port for iOS devices |
|
3 |
* Copyright (c) 2009-2010 Vittorio Giovara <vittorio.giovara@gmail.com> |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
17 |
* |
|
18 |
* File created on 08/04/2010. |
|
19 |
*/ |
|
20 |
||
3547 | 21 |
|
22 |
#import <Foundation/Foundation.h> |
|
23 |
||
3737
2ba6ac8a114b
reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents:
3703
diff
changeset
|
24 |
#define DOCUMENTS_FOLDER() [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] |
3547 | 25 |
|
3737
2ba6ac8a114b
reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents:
3703
diff
changeset
|
26 |
#define SETTINGS_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/settings.plist"] |
3923
694e6f6e0e30
various classes updates (new version in mainmenu, opt in mapconfig, clear all in savegames)
koda
parents:
3917
diff
changeset
|
27 |
#define DEBUG_FILE() [DOCUMENTS_FOLDER() stringByAppendingString:@"/hw-game.log"] |
3737
2ba6ac8a114b
reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents:
3703
diff
changeset
|
28 |
|
2ba6ac8a114b
reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents:
3703
diff
changeset
|
29 |
#define TEAMS_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Teams/"] |
2ba6ac8a114b
reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents:
3703
diff
changeset
|
30 |
#define WEAPONS_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Weapons/"] |
2ba6ac8a114b
reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents:
3703
diff
changeset
|
31 |
#define SCHEMES_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Schemes/"] |
3891 | 32 |
#define SAVES_DIRECTORY() [DOCUMENTS_FOLDER() stringByAppendingString:@"/Saves/"] |
3547 | 33 |
|
34 |
#define GRAPHICS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/"] |
|
35 |
#define HATS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hats/"] |
|
36 |
#define GRAVES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Graves/"] |
|
37 |
#define BOTLEVELS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Hedgehog/botlevels"] |
|
38 |
#define BTN_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Btn"] |
|
39 |
#define FLAGS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Graphics/Flags/"] |
|
40 |
#define FORTS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Forts/"] |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3891
diff
changeset
|
41 |
#define VOICES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Sounds/voices/"] |
3547 | 42 |
#define THEMES_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Themes/"] |
43 |
#define MAPS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Maps/"] |
|
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3891
diff
changeset
|
44 |
#define MISSIONS_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Missions/Maps/"] |
3926
668b71f31e51
use dynamic data from engine instead of using hardcoded values
koda
parents:
3923
diff
changeset
|
45 |
#define LOCALE_DIRECTORY() [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/Data/Locale/"] |
3547 | 46 |
|
3548
4d220ee7c75f
server somewhat simplified and correct sporadic crasher
koda
parents:
3547
diff
changeset
|
47 |
#define MSG_MEMCLEAN() DLog(@"has cleaned up some memory"); |
4d220ee7c75f
server somewhat simplified and correct sporadic crasher
koda
parents:
3547
diff
changeset
|
48 |
#define MSG_DIDUNLOAD() DLog(@"unloaded"); |
3547 | 49 |
|
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3670
diff
changeset
|
50 |
#define UICOLOR_HW_YELLOW_BODER [UIColor colorWithRed:(CGFloat)0xFE/255 green:(CGFloat)0xC0/255 blue:0 alpha:1] |
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3670
diff
changeset
|
51 |
#define UICOLOR_HW_YELLOW_TEXT [UIColor colorWithRed:(CGFloat)0xF0/255 green:(CGFloat)0xD0/255 blue:0 alpha:1] |
3780
7c704e69242e
fade in when returning from game, labels rewritten so that they are drawn at runtime (more flexibility with i18n and iphone support)
koda
parents:
3737
diff
changeset
|
52 |
#define UICOLOR_HW_DARKBLUE [UIColor colorWithRed:(CGFloat)0x0F/255 green:0 blue:(CGFloat)0x42/255 alpha:1] |
3703
12d17c6e8855
halfway-through finishing the frontend with new graphics by Tiy + initial 'About' page set up
koda
parents:
3670
diff
changeset
|
53 |
|
3941 | 54 |
#define IS_DUALHEAD() ([[UIScreen screens] count] > 1) |
55 |
||
3971 | 56 |
#define DEFAULT_NETGAME_PORT 46631 |
57 |
||
3941 | 58 |
|
3547 | 59 |
void createTeamNamed (NSString *nameWithoutExt); |
3737
2ba6ac8a114b
reworked the initialization functions, now it should be safe to update and no more need of spinning wheel at first launch
koda
parents:
3703
diff
changeset
|
60 |
void createWeaponNamed (NSString *nameWithoutExt, int type); |
3547 | 61 |
void createSchemeNamed (NSString *nameWithoutExt); |
3941 | 62 |
void print_free_memory (void); |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3891
diff
changeset
|
63 |
void playSound (NSString *snd); |
3547 | 64 |
void popError (const char *title, const char *message); |
3911
46d7a5cf8ac6
further rework of MapConfigViewController, lists missions correctly (they don't load fine yet)
koda
parents:
3891
diff
changeset
|
65 |
BOOL rotationManager (UIInterfaceOrientation interfaceOrientation); |
3941 | 66 |
BOOL isApplePhone (void); |
67 |
NSInteger randomPort (void); |
|
68 |
NSString *modelType (void); |
|
69 |
NSArray *getAvailableColors (void); |