Skip to content

Commit 126a423

Browse files
committed
Ups the version of Cocos2D to 3.1.1 and fixes printing of version number
1 parent ee80ab9 commit 126a423

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.0
1+
3.1.1

cocos2d/cocos2d.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
*/
4141

4242
// 0x00 HI ME LO
43-
// 00 03 00 00
44-
#define COCOS2D_VERSION 0x00030100
45-
#define COCOS2D_BUILD @"rc1"
43+
// 00 03 01 01
44+
#define COCOS2D_VERSION 0x00030101
45+
#define COCOS2D_BUILD @"release"
4646
//
4747
// all cocos2d include files
4848
//

cocos2d/cocos2d.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,13 @@
3333
int major = (COCOS2D_VERSION >> 16) & 0x0000FF;
3434
int minor = (COCOS2D_VERSION >> 8) & 0x0000FF;
3535
int rev = (COCOS2D_VERSION >> 0) & 0x0000FF;
36-
return([[NSString stringWithFormat:@"Cocos2D-iPhone version %d.%d.%d ", major, minor, rev] stringByAppendingString:COCOS2D_BUILD]);
36+
37+
if ([COCOS2D_BUILD isEqualToString:@"release"])
38+
{
39+
return [NSString stringWithFormat:@"Cocos2D-Swift version %d.%d.%d", major, minor, rev];
40+
}
41+
else
42+
{
43+
return([[NSString stringWithFormat:@"Cocos2D-Swift version %d.%d.%d-", major, minor, rev] stringByAppendingString:COCOS2D_BUILD]);
44+
}
3745
}

0 commit comments

Comments
 (0)