Skip to content

Commit 8d03f01

Browse files
author
Thayer J Andrews
committed
CCEffectLighting - Wrap lighting in CC_EFFECTS_EXPERIMENTAL
1 parent 83c1a13 commit 8d03f01

File tree

5 files changed

+16
-3
lines changed

5 files changed

+16
-3
lines changed

cocos2d-ui-tests/tests/CCEffectsTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@ - (void)enableOutline:(id)sender
249249
_distanceFieldEffect.outline = !_distanceFieldEffect.outline;
250250
}
251251

252-
#endif
253-
254252
-(void)setupSimpleLightingTest
255253
{
256254
self.subTitle = @"Simple Lighting Test";
@@ -482,6 +480,8 @@ -(void)setupLightingParameterTest
482480
]]];
483481
}
484482

483+
#endif
484+
485485

486486
-(void)setupPaddingEffectTest
487487
{

cocos2d/CCEffectLighting.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#import "CCEffect.h"
1010
#import "CCLightNode.h"
1111

12+
#if CC_EFFECTS_EXPERIMENTAL
13+
1214
/**
1315
* CCEffectLighting uses a normal map and a collection of light nodes to compute the Phong
1416
* lighting on the affected node.
@@ -93,3 +95,6 @@
9395

9496

9597
@end
98+
99+
#endif
100+

cocos2d/CCEffectLighting.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
#import "CCEffectLighting.h"
1010

11+
#if CC_EFFECTS_EXPERIMENTAL
12+
1113
#import "CCDirector.h"
1214
#import "CCEffectUtils.h"
1315
#import "CCRenderer.h"
@@ -323,4 +325,4 @@ BOOL CCLightKeyCompare(CCLightKey a, CCLightKey b)
323325
((a.directionalLightMask) == (b.directionalLightMask)));
324326
}
325327

326-
328+
#endif

cocos2d/CCLightNode.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#import "CCNode.h"
1010

11+
#if CC_EFFECTS_EXPERIMENTAL
1112

1213
typedef NS_ENUM(NSUInteger, CCLightType)
1314
{
@@ -130,3 +131,5 @@ typedef NS_ENUM(NSUInteger, CCLightType)
130131

131132

132133
@end
134+
135+
#endif

cocos2d/CCLightNode.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#import "CCLightNode.h"
1010

11+
#if CC_EFFECTS_EXPERIMENTAL
1112

1213
@implementation CCLightNode
1314

@@ -58,3 +59,5 @@ -(void)setAmbientIntensity:(float)intensity
5859
}
5960

6061
@end
62+
63+
#endif

0 commit comments

Comments
 (0)