author | burp |
Sun, 29 Aug 2010 16:48:20 +0200 | |
changeset 3784 | 75aa91bea32b |
parent 3701 | 8c449776ebe6 |
child 3829 | 81db3c85784b |
permissions | -rw-r--r-- |
3366 | 1 |
// |
2 |
// Prefix header for all source files of the 'OpenGL ES app' target in the 'OpenGL ES app' project |
|
3 |
// |
|
4 |
||
5 |
#ifdef __OBJC__ |
|
6 |
#import <Foundation/Foundation.h> |
|
7 |
#import <CoreGraphics/CoreGraphics.h> |
|
8 |
#import <UIKit/UIKit.h> |
|
3701 | 9 |
#import "PascalImports.h" |
10 |
#import "UIImageExtra.h" |
|
11 |
#import "CommodityFunctions.h" |
|
12 |
#import "SDL.h" |
|
13 |
#import "SDL_video.h" |
|
14 |
#import "SDL_net.h" |
|
15 |
#import "SDL_mixer.h" |
|
3366 | 16 |
#endif |
3487 | 17 |
|
18 |
// by http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ |
|
19 |
#ifdef DEBUG |
|
20 |
#define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) |
|
21 |
#define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__] |
|
22 |
#else |
|
23 |
#define DLog(...) do { } while (0) |
|
24 |
#ifndef NS_BLOCK_ASSERTIONS |
|
25 |
#define NS_BLOCK_ASSERTIONS |
|
26 |
#endif |
|
27 |
#define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) |
|
28 |
#endif |
|
3701 | 29 |
|
3487 | 30 |
#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
|
31 |
|
3663
8c28abf427f5
reduce the number of keywords used and switch to BMP format for screenshots
koda
parents:
3513
diff
changeset
|
32 |
// 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
|
33 |
#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
|
34 |
#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
|
35 |
|
8c28abf427f5
reduce the number of keywords used and switch to BMP format for screenshots
koda
parents:
3513
diff
changeset
|
36 |
#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
|
37 |
|
8c28abf427f5
reduce the number of keywords used and switch to BMP format for screenshots
koda
parents:
3513
diff
changeset
|
38 |
|
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
|
39 |
#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
|
40 |
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
|
41 |
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
|
42 |
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
|
43 |
} 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
|
44 |
#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
|
45 |
#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
|
46 |
#endif // ifndef __IPHONE_3_2 |