project_files/HedgewarsMobile/Hedgewars_Prefix.pch
author mario.liebisch
Wed, 16 Jun 2010 11:50:45 +0200
changeset 3505 ada9f697eb11
parent 3487 b1d00f1950c8
child 3513 f589230fa21b
permissions -rw-r--r--
Engine: * Bomb clusters now inherit 20 % of their parent's horizontal velocity (makes it a little bit more realistic without completely changing gameplay IMO - needs testing) Mercurial: * Added EOL rules (requires plugin to be activated) and ignore list

//
// Prefix header for all source files of the 'OpenGL ES app' target in the 'OpenGL ES app' project
//

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import <UIKit/UIKit.h>
#endif

// by http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/
#ifdef DEBUG
  #define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
  #define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__]
#else
  #define DLog(...) do { } while (0)
  #ifndef NS_BLOCK_ASSERTIONS
    #define NS_BLOCK_ASSERTIONS
  #endif
  #define ALog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
#endif
 
#define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0)