diff -r 4c9ae0f484da -r 878e551f0b4a project_files/HedgewarsMobile/Hedgewars_Prefix.pch --- a/project_files/HedgewarsMobile/Hedgewars_Prefix.pch Thu May 12 23:00:26 2011 +0200 +++ b/project_files/HedgewarsMobile/Hedgewars_Prefix.pch Thu May 12 23:29:31 2011 +0200 @@ -16,6 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +// some macros by http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ +// and http://blog.coriolis.ch/2009/01/05/macros-for-xcode/ + #ifdef __OBJC__ #import #import @@ -30,26 +34,27 @@ #import "SDL_mixer.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__] + #define releaseAndNil(x) [x release] #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__]) + #define releaseAndNil(x) [x release], x = nil #endif + #define ZAssert(condition, ...) do { if (!(condition)) { ALog(__VA_ARGS__); }} while(0) +#define rotationManager(x) (x == UIInterfaceOrientationLandscapeRight) || (x == UIInterfaceOrientationLandscapeLeft) -// by http://blog.coriolis.ch/2009/01/05/macros-for-xcode/ #define START_TIMER NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate]; #define END_TIMER(msg) NSTimeInterval stop = [NSDate timeIntervalSinceReferenceDate]; CMLog([NSString stringWithFormat:@"%@ Time = %f", msg, stop-start]); -#define releaseAndNil(x) [x release], x = nil; - #if !__IPHONE_3_2 typedef enum {