File tree Expand file tree Collapse file tree 8 files changed +10
-13
lines changed Expand file tree Collapse file tree 8 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ -(void) onEnter {
85
85
86
86
- (void )addNode : (CCNode*)node andSequences : (NSDictionary *)seq
87
87
{
88
- #ifdef DEBUG
88
+ #if DEBUG
89
89
// Sanity check sequences;
90
90
91
91
for (NSMutableDictionary * seqNodeProps in seq.allValues ) {
Original file line number Diff line number Diff line change @@ -265,7 +265,7 @@ -(void) calculateDeltaTime
265
265
_dt = MAX (0 ,_dt);
266
266
}
267
267
268
- #ifdef DEBUG
268
+ #if DEBUG
269
269
// If we are debugging our code, prevent big delta time
270
270
if ( _dt > 0 .2f )
271
271
_dt = 1 /60 .0f ;
Original file line number Diff line number Diff line change 25
25
26
26
#import " CCNode.h"
27
27
28
- #ifdef DEBUG
28
+ #if DEBUG
29
29
30
30
/* * Debugging extensions of CCNode. They are available when the DEBUG macro is defined at compile time. */
31
31
@interface CCNode (Debug)
Original file line number Diff line number Diff line change 26
26
#import " CCNode+Debug.h"
27
27
#import " CCNode_Private.h"
28
28
29
- #ifdef DEBUG
29
+ #if DEBUG
30
30
31
31
@implementation CCNode (Debug)
32
32
Original file line number Diff line number Diff line change @@ -514,7 +514,7 @@ -(void)didRemoveFromPhysicsNode:(CCPhysicsNode *)physics
514
514
// The following are properties which we track on the parent nodes in order to update the child nodes.
515
515
NSString * kDependantProperties [2 ] = { @" position" , @" rotation" };
516
516
517
- #ifdef DEBUG
517
+ #if DEBUG
518
518
// The following are properties which cannot be animated. Changing their values after onEnter in unhandled.
519
519
NSString * kRestrictedProperties [3 ] = { @" scale" , @" scaleX" , @" scaleY" };
520
520
#endif
@@ -531,7 +531,7 @@ -(void)trackParentTransformations:(CCPhysicsNode *)physics
531
531
[node addObserver: self forKeyPath: kDependantProperties [i] options: NSKeyValueObservingOptionNew context: nil ];
532
532
}
533
533
534
- #ifdef DEBUG
534
+ #if DEBUG
535
535
for (int i = 0 ; i < sizeof (kRestrictedProperties )/sizeof (kRestrictedProperties [0 ]); i++)
536
536
{
537
537
[node addObserver: self forKeyPath: kRestrictedProperties [i] options: NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context: nil ];
@@ -552,7 +552,7 @@ -(void)removeParentTransformTracking:(CCPhysicsNode *)physics
552
552
{
553
553
[node removeObserver: self forKeyPath: kDependantProperties [i]];
554
554
}
555
- #ifdef DEBUG
555
+ #if DEBUG
556
556
for (int i = 0 ; i < sizeof (kRestrictedProperties )/sizeof (kRestrictedProperties [0 ]); i++)
557
557
{
558
558
[node removeObserver: self forKeyPath: kRestrictedProperties [i]];
@@ -567,7 +567,7 @@ -(void)removeParentTransformTracking:(CCPhysicsNode *)physics
567
567
568
568
-(void )observeValueForKeyPath : (NSString *)keyPath ofObject : (id )object change : (NSDictionary *)change context : (void *)context
569
569
{
570
- #ifdef DEBUG
570
+ #if DEBUG
571
571
for (int i = 0 ; i < sizeof (kRestrictedProperties )/sizeof (kRestrictedProperties [0 ]); i++)
572
572
{
573
573
if ([kRestrictedProperties [i] isEqualToString: keyPath])
Original file line number Diff line number Diff line change @@ -598,8 +598,7 @@ - (id)initWithContentsOfFile:(NSString *)path
598
598
return nil ;
599
599
}
600
600
601
- #if defined(__CC_PLATFORM_IOS) && defined(DEBUG)
602
-
601
+ #if defined(__CC_PLATFORM_IOS) && DEBUG
603
602
GLenum pixelFormat = _pixelFormatInfo->ccPixelFormat ;
604
603
CCConfiguration *conf = [CCConfiguration sharedConfiguration ];
605
604
Original file line number Diff line number Diff line change @@ -191,10 +191,8 @@ - (void) setupCocos2dWithOptions:(NSDictionary*)config
191
191
192
192
director.wantsFullScreenLayout = YES ;
193
193
194
- // #if DEBUG
195
194
// Display FSP and SPF
196
195
[director setDisplayStats: [config[CCSetupShowDebugStats] boolValue ]];
197
- // #endif
198
196
199
197
// set FPS at 60
200
198
NSTimeInterval animationInterval = [(config[CCSetupAnimationInterval] ?: @(1.0 /60.0 )) doubleValue ];
Original file line number Diff line number Diff line change @@ -433,7 +433,7 @@ -(void) calculateDeltaTime
433
433
if ( _displayStats )
434
434
gettimeofday ( &_lastUpdate, NULL );
435
435
436
- #ifdef DEBUG
436
+ #if DEBUG
437
437
// If we are debugging our code, prevent big delta time
438
438
if ( _dt > 0 .2f )
439
439
_dt = 1 /60 .0f ;
You can’t perform that action at this time.
0 commit comments