project_files/HedgewarsMobile/Classes/DefinesAndMacros.h
branchios-develop
changeset 12872 00215a7ec5f5
parent 11560 664d3592a66b
child 13192 d6aea85111c7
equal deleted inserted replaced
12871:2c06b1120749 12872:00215a7ec5f5
    22 
    22 
    23 
    23 
    24 #ifdef DEBUG
    24 #ifdef DEBUG
    25   #define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
    25   #define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
    26   #define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__]
    26   #define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__]
    27   #define releaseAndNil(x) [x release]
       
    28 #else
    27 #else
    29   #define DLog(...) do { } while (0)
       
    30   #ifndef NS_BLOCK_ASSERTIONS
    28   #ifndef NS_BLOCK_ASSERTIONS
    31     #define NS_BLOCK_ASSERTIONS
    29     #define NS_BLOCK_ASSERTIONS
    32   #endif
    30   #endif
    33   #define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
    31   #define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
    34   #define releaseAndNil(x) [x release], x = nil
       
    35 #endif
    32 #endif
    36 
    33 
    37 
    34 
    38 #define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0)
    35 #define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0)
    39 #define rotationManager(x) (IS_IPAD() ? YES : (x == UIInterfaceOrientationLandscapeRight) || (x == UIInterfaceOrientationLandscapeLeft))
    36 #define rotationManager(x) (IS_IPAD() ? YES : (x == UIInterfaceOrientationLandscapeRight) || (x == UIInterfaceOrientationLandscapeLeft))