project_files/HedgewarsMobile/Hedgewars_Prefix.pch
author smaxx
Fri, 30 Jul 2010 18:20:42 +0200
changeset 3689 e2be39ee19f0
parent 3663 8c28abf427f5
child 3701 8c449776ebe6
permissions -rw-r--r--
Engine: * Engine will now try to load the grave "Statue" if it couldn't load a team's grave graphic (http://code.google.com/p/hedgewars/issues/detail?id=3) * Explosions may now create chunks/stones knocked out of the landscape (only supported on Olympic theme so far)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3366
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     1
//
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     2
// Prefix header for all source files of the 'OpenGL ES app' target in the 'OpenGL ES app' project
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     3
//
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     4
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     5
#ifdef __OBJC__
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     6
#import <Foundation/Foundation.h>
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     7
#import <CoreGraphics/CoreGraphics.h>
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     8
#import <UIKit/UIKit.h>
f0e5ff24fb72 rename the project from HedgewarsMobile to Hedgewars
koda
parents:
diff changeset
     9
#endif
3487
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    10
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    11
// by http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    12
#ifdef DEBUG
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    13
  #define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    14
  #define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__]
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    15
#else
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    16
  #define DLog(...) do { } while (0)
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    17
  #ifndef NS_BLOCK_ASSERTIONS
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    18
    #define NS_BLOCK_ASSERTIONS
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    19
  #endif
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    20
  #define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    21
#endif
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    22
 
b1d00f1950c8 add some memory aware code
koda
parents: 3366
diff changeset
    23
#define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0)
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    24
3663
8c28abf427f5 reduce the number of keywords used and switch to BMP format for screenshots
koda
parents: 3513
diff changeset
    25
// by http://blog.coriolis.ch/2009/01/05/macros-for-xcode/
8c28abf427f5 reduce the number of keywords used and switch to BMP format for screenshots
koda
parents: 3513
diff changeset
    26
#define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];
8c28abf427f5 reduce the number of keywords used and switch to BMP format for screenshots
koda
parents: 3513
diff changeset
    27
#define END_TIMER(msg) 	NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start]);
8c28abf427f5 reduce the number of keywords used and switch to BMP format for screenshots
koda
parents: 3513
diff changeset
    28
8c28abf427f5 reduce the number of keywords used and switch to BMP format for screenshots
koda
parents: 3513
diff changeset
    29
#define releaseAndNil(x) [x release], x = nil;
8c28abf427f5 reduce the number of keywords used and switch to BMP format for screenshots
koda
parents: 3513
diff changeset
    30
8c28abf427f5 reduce the number of keywords used and switch to BMP format for screenshots
koda
parents: 3513
diff changeset
    31
3513
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    32
#if !__IPHONE_3_2
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    33
typedef enum {
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    34
    UIUserInterfaceIdiomPhone,           // iPhone and iPod touch style UI
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    35
    UIUserInterfaceIdiomPad,             // iPad style UI
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    36
} UIUserInterfaceIdiom;
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    37
#define UI_USER_INTERFACE_IDIOM() UIUserInterfaceIdiomPhone
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    38
#define UIPopoverController id
f589230fa21b now it's possible to select the scheme file in the ifrontendfix a type about loading an image (iphone file system IS case senstive)
koda
parents: 3487
diff changeset
    39
#endif // ifndef __IPHONE_3_2