Skip to content

Commit e33b972

Browse files
s1ddoks1ddok
authored andcommitted
Clean up the rest of android stuff
1 parent 0f25028 commit e33b972

File tree

15 files changed

+11
-110
lines changed

15 files changed

+11
-110
lines changed

cocos2d-ext/CCClippingNode/CCClippingNode.m

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ - (id)initWithStencil:(CCNode *)stencil
8383
});
8484
// warn if the stencil buffer is not enabled
8585
if (_stencilBits <= 0) {
86-
#if __CC_PLATFORM_IOS || __CC_PLATFORM_ANDROID
86+
#if __CC_PLATFORM_IOS
8787
CCLOGWARN(@"Stencil buffer is not enabled; enable it by passing GL_DEPTH24_STENCIL8_OES into the depthFormat parrameter when initializing CCGLView. Until then, everything will be drawn without stencil.");
8888
#elif __CC_PLATFORM_MAC
8989
CCLOGWARN(@"Stencil buffer is not enabled; enable it by setting the Stencil attribue to 8 bit in the Attributes inspector of the CCGLView view object in MainMenu.xib, or programmatically by adding NSOpenGLPFAStencilSize and 8 in the NSOpenGLPixelFormatAttribute array of the NSOpenGLPixelFormat used when initializing CCGLView. Until then, everything will be drawn without stencil.");
@@ -120,44 +120,10 @@ - (void)onExit
120120

121121
- (void)visit:(CCRenderer *)renderer parentTransform:(const GLKMatrix4 *)parentTransform
122122
{
123-
// if stencil buffer disabled
124-
#if !__CC_PLATFORM_ANDROID && __CC_PLATFORM_ANDROID_FIXME
125-
if (_stencilBits < 1) {
126-
// draw everything, as if there where no stencil
127-
[super visit:renderer parentTransform:parentTransform];
128-
return;
129-
}
130-
131-
// return fast (draw nothing, or draw everything if in inverted mode) if:
132-
// - nil stencil node
133-
// - or stencil node invisible:
134-
if (!_stencil || !_stencil.visible) {
135-
if (_inverted) {
136-
// draw everything
137-
[super visit:renderer parentTransform:parentTransform];
138-
}
139-
return;
140-
}
141-
#endif
142-
143123
// store the current stencil layer (position in the stencil buffer),
144124
// this will allow nesting up to n CCClippingNode,
145125
// where n is the number of bits of the stencil buffer.
146126
static GLint layer = -1;
147-
#if !__CC_PLATFORM_ANDROID && __CC_PLATFORM_ANDROID_FIXME
148-
// all the _stencilBits are in use?
149-
if (layer + 1 == _stencilBits) {
150-
// warn once
151-
static dispatch_once_t once;
152-
dispatch_once(&once, ^{
153-
CCLOGWARN(@"Nesting more than %d stencils is not supported. Everything will be drawn without stencil for this node and its childs.", _stencilBits);
154-
});
155-
// draw everything, as if there where no stencil
156-
[super visit:renderer parentTransform:parentTransform];
157-
return;
158-
}
159-
#endif
160-
161127
///////////////////////////////////
162128
// INIT
163129

cocos2d-ext/CCPackages/CCPackage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
@property (nonatomic, copy, readonly) NSString *resolution;
5252

5353
/**
54-
* OS of the package e.g. iOS, Android, Mac
54+
* OS of the package e.g. iOS, Mac
5555
* @since v3.3 and later
5656
* @see standardIdentifier
5757
*/

cocos2d-ext/CCPackages/CCPackageHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
@interface CCPackageHelper : NSObject
77

88
/**
9-
* Returns the current OS, possible values: `iOS` or `Android`.
9+
* Returns the current OS, possible values: `iOS`.
1010
* @note On OS X this will also return `iOS`.
1111
* @since v3.3 and later
1212
*/

cocos2d-ext/CCPackages/CCPackageHelper.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ @implementation CCPackageHelper
88

99
+ (NSString *)currentOS
1010
{
11-
#if __CC_PLATFORM_ANDROID
12-
return @"Android";
13-
#elif __CC_PLATFORM_MAC || __CC_PLATFORM_IOS
11+
#if __CC_PLATFORM_MAC || __CC_PLATFORM_IOS
1412
return @"iOS";
1513
#endif
1614
return nil;

cocos2d-ext/CCPackages/CCPackageManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
*
8383
* @param name Name of the package
8484
* @param resolution SpriteBuilder resolution string (ie `phonehd`)
85-
* @param os operating system string (ie iOS, Android, Mac)
85+
* @param os operating system string (ie iOS, Mac)
8686
* @since v3.3 and later
8787
* @see CCPackage
8888
*/

cocos2d-ext/CCParticles/CCParticleSystemBase.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ -(id) initWithDictionary:(NSDictionary *)dictionary path:(NSString*)dirname
264264
NSAssert( deflated != NULL, @"CCParticleSystem: error ungzipping textureImageData");
265265
NSData *data = [[NSData alloc] initWithBytes:deflated length:deflatedLen];
266266

267-
#if __CC_PLATFORM_IOS || __CC_PLATFORM_ANDROID
267+
#if __CC_PLATFORM_IOS
268268
BOOL png = [[[dictionary valueForKey:@"textureFileName"] lowercaseString] hasSuffix:@".png"];
269269
CGDataProviderRef imgDataProvider = CGDataProviderCreateWithCFData((__bridge CFDataRef)data);
270270
CGImageRef image = (png) ? CGImageCreateWithPNGDataProvider(imgDataProvider, NULL, true, kCGRenderingIntentDefault) : CGImageCreateWithJPEGDataProvider(imgDataProvider, NULL, true, kCGRenderingIntentDefault) ;

cocos2d-ext/TileMaps/CCTiledMapLayer.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
#import "CCTMXXMLParser.h"
3030
#import "CCTiledMap.h"
3131

32-
#if __CC_PLATFORM_ANDROID
33-
#import "CCMathTypesAndroid.h"
34-
#endif
35-
3632
@class CCTiledMapInfo;
3733
@class CCTiledMapLayerInfo;
3834
@class CCTiledMapTilesetInfo;

cocos2d-ext/TileMaps/CCTiledMapLayer.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#import "Support/CGPointExtension.h"
4040
#import "CCTiledMapLayer_Private.h"
4141
#import "CCTexture.h"
42-
// #import "CCMathTypesAndroid.h"
4342

4443
#pragma mark -
4544
#pragma mark CCTMXLayer

cocos2d-ui-tests/MainMenu.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@
2828
#import "../cocos2d/CCMacros.h"
2929
#import <objc/runtime.h>
3030

31-
#if __CC_PLATFORM_ANDROID
32-
#define kCCTestMenuItemHeight 88
33-
#else
3431
#define kCCTestMenuItemHeight 44
35-
#endif
3632

3733
static CGPoint scrollPosition;
3834

cocos2d-ui/CCButton.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ - (void) layout
195195

196196
[super layout];
197197
}
198-
#if __CC_PLATFORM_IOS || __CC_PLATFORM_ANDROID
198+
#if __CC_PLATFORM_IOS
199199

200200
- (void) touchEntered:(CCTouch *)touch withEvent:(CCTouchEvent *)event
201201
{

0 commit comments

Comments
 (0)