Skip to content

Commit 426e6a6

Browse files
committed
Merge branch 'combined_projects' into develop
2 parents 9fd3798 + 3b5799f commit 426e6a6

18 files changed

+110
-177
lines changed

UnitTests/CCPackageCocos2dEnablerTests.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ - (void)testDisablePackage
6767
XCTAssertFalse([self isPackageInSearchPath]);
6868

6969
// Can't use [CCSprite spriteWithImageNamed:@"boredSmiley.png"], assertion exception is screwing up test result
70-
CGFloat *scale;
71-
NSString *path = [[CCFileUtils sharedFileUtils] fullPathForFilename:@"boredSmiley.png" contentScale:&scale];
70+
NSString *path = [[CCFileUtils sharedFileUtils] fullPathForFilename:@"boredSmiley.png" contentScale:NULL];
7271
XCTAssertNil(path);
7372
}
7473

UnitTests/CCPackageDownloadTests.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
#import "CCDirector.h"
1515
#import "AppDelegate.h"
1616

17+
@interface CCPackageDownload()
18+
- (NSString *)createTempName;
19+
@end
20+
1721
static NSUInteger __fileDownloadSize = 0;
1822
static BOOL __support_range_request = YES;
1923

@@ -143,7 +147,7 @@ - (void)setUp
143147
self.downloadReturned = NO;
144148
self.downloadError = nil;
145149
self.downloadSuccessful = NO;
146-
self.shouldOverwriteDownloadedFile;
150+
[self shouldOverwriteDownloadedFile];
147151

148152
self.package = [[CCPackage alloc] initWithName:@"testpackage"
149153
resolution:@"phonehd"
@@ -307,7 +311,7 @@ - (void)testPauseDownload
307311

308312
XCTAssertEqual(_package.status, CCPackageStatusDownloadPaused);
309313
NSFileManager *fileManager = [NSFileManager defaultManager];
310-
NSString *tempName = [_download performSelector:@selector(createTempName)];
314+
NSString *tempName = [_download createTempName];
311315

312316
BOOL success = [fileManager fileExistsAtPath:[[_localURL.path stringByDeletingLastPathComponent] stringByAppendingPathComponent:tempName]]
313317
|| [fileManager fileExistsAtPath:_download.localURL.path];
@@ -341,7 +345,7 @@ - (void)setupPartialDownloadOnDisk
341345
NSString *fileName = [_package.remoteURL lastPathComponent];
342346
NSString *pathToPackage = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"Resources-shared/Packages/%@", fileName] ofType:nil];
343347
NSData *data = [[NSData dataWithContentsOfFile:pathToPackage] subdataWithRange:NSMakeRange(0, 5000)];
344-
NSString *tempName = [_download performSelector:@selector(createTempName)];
348+
NSString *tempName = [_download createTempName];
345349
[data writeToFile:[[_localURL.path stringByDeletingLastPathComponent] stringByAppendingPathComponent:tempName] atomically:YES];
346350
}
347351

cocos2d-tests.xcodeproj/project.pbxproj

Lines changed: 25 additions & 100 deletions
Large diffs are not rendered by default.

cocos2d.xcodeproj/project.pbxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,6 @@
441441
7A97912A19E646D8001FFC4D /* libObjectiveChipmunk-Android.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A40377B19E36EFF007B6E8F /* libObjectiveChipmunk-Android.a */; };
442442
7A97912B19E646F9001FFC4D /* libSSZipArchiveAndroid.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A40378319E36EFF007B6E8F /* libSSZipArchiveAndroid.a */; };
443443
83409E4919D5BADC004B7EB9 /* libSSZipArchive.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 83409E3619D5B791004B7EB9 /* libSSZipArchive.a */; };
444-
83B7DB7B19D32FD800B9A452 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 83E1A88D19C8C19D000A3BCA /* libz.dylib */; };
445444
83E1A86219C8ACA0000A3BCA /* CCPackage.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E1A85A19C8ACA0000A3BCA /* CCPackage.h */; };
446445
83E1A86319C8ACA0000A3BCA /* CCPackage.m in Sources */ = {isa = PBXBuildFile; fileRef = 83E1A85B19C8ACA0000A3BCA /* CCPackage.m */; };
447446
83E1A86419C8ACA0000A3BCA /* CCPackageConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E1A85C19C8ACA0000A3BCA /* CCPackageConstants.h */; };
@@ -1484,7 +1483,6 @@
14841483
buildActionMask = 2147483647;
14851484
files = (
14861485
83409E4919D5BADC004B7EB9 /* libSSZipArchive.a in Frameworks */,
1487-
83B7DB7B19D32FD800B9A452 /* libz.dylib in Frameworks */,
14881486
FC64014019C79716003E595A /* libObjectAL.a in Frameworks */,
14891487
D3903B1A19952ABD003AA81A /* Metal.framework in Frameworks */,
14901488
D24FAEEC198014B90043E27D /* GLKit.framework in Frameworks */,

cocos2d/CCPackageCocos2dEnabler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ - (BOOL)isPackagInSearchPath:(CCPackage *)package
1616

1717
- (void)enablePackages:(NSArray *)packages
1818
{
19-
if ([self addPackagestoSearchPath:packages]);
19+
if ([self addPackagestoSearchPath:packages])
2020
{
2121
CCLOGINFO(@"[PACKAGE/INSTALL][INFO] Enable packages - Search path: %@", [CCFileUtils sharedFileUtils].searchPath);
2222

cocos2d/CCPackageDownload.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ - (BOOL)createFileHandle:(NSError **)error
280280

281281
if (!fileHandle)
282282
{
283-
CCLOG(@"[PACKAGE/DOWNLOAD][ERROR] %@, cannot open file for writing download %@", error, _tempPath);
283+
CCLOG(@"[PACKAGE/DOWNLOAD][ERROR] %@, cannot open file for writing download %@", *error, _tempPath);
284284
return NO;
285285
}
286286

cocos2d/CCPackageHelper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
*/
2323
+ (NSString *)defaultResolution;
2424

25-
@end
25+
@end

cocos2d/CCPackage_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
@property (nonatomic, readwrite) BOOL enableOnDownload;
1616
@property (nonatomic, readwrite) CCPackageStatus status;
1717

18-
@end
18+
@end

cocos2d/CCRendererBasicTypes.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ CCRenderBufferSetLine(CCRenderBuffer buffer, int index, GLushort a, GLushort b)
8989

9090

9191
/// Key used to set the source color factor for [CCBlendMode blendModeWithOptions:].
92-
extern const NSString *CCBlendFuncSrcColor;
92+
extern NSString * const CCBlendFuncSrcColor;
9393
/// Key used to set the destination color factor for [CCBlendMode blendModeWithOptions:].
94-
extern const NSString *CCBlendFuncDstColor;
94+
extern NSString * const CCBlendFuncDstColor;
9595
/// Key used to set the color equation for [CCBlendMode blendModeWithOptions:].
96-
extern const NSString *CCBlendEquationColor;
96+
extern NSString * const CCBlendEquationColor;
9797
/// Key used to set the source alpha factor for [CCBlendMode blendModeWithOptions:].
98-
extern const NSString *CCBlendFuncSrcAlpha;
98+
extern NSString * const CCBlendFuncSrcAlpha;
9999
/// Key used to set the destination alpha factor for [CCBlendMode blendModeWithOptions:].
100-
extern const NSString *CCBlendFuncDstAlpha;
100+
extern NSString * const CCBlendFuncDstAlpha;
101101
/// Key used to set the alpha equation for [CCBlendMode blendModeWithOptions:].
102-
extern const NSString *CCBlendEquationAlpha;
102+
extern NSString * const CCBlendEquationAlpha;
103103

104104

105105
/// Blending mode identifiers used with CCNode.blendMode.

0 commit comments

Comments
 (0)