From a37e034e61399e597a3e69a17686d145bab420d8 Mon Sep 17 00:00:00 2001 From: Taro Kobayashi <9re.3000@gmail.com> Date: Wed, 28 Nov 2012 17:53:10 +0900 Subject: [PATCH 01/32] added support for Japanese language --- cocos2dx/platform/CCCommon.h | 3 ++- cocos2dx/platform/android/CCApplication.cpp | 4 ++++ cocos2dx/platform/blackberry/CCApplication.cpp | 6 +++++- cocos2dx/platform/ios/CCApplication.mm | 3 +++ cocos2dx/platform/mac/CCApplication.mm | 3 +++ cocos2dx/platform/marmalade/CCApplication.cpp | 4 ++++ cocos2dx/platform/win32/CCApplication.cpp | 3 +++ .../Classes/CurrentLanguageTest/CurrentLanguageTest.cpp | 5 ++++- tools/tolua++/CCApplication.pkg | 4 +++- tools/tolua++/CCCommon.pkg | 4 +++- 10 files changed, 34 insertions(+), 5 deletions(-) diff --git a/cocos2dx/platform/CCCommon.h b/cocos2dx/platform/CCCommon.h index 0ac1f5b754..064d870ab5 100644 --- a/cocos2dx/platform/CCCommon.h +++ b/cocos2dx/platform/CCCommon.h @@ -64,7 +64,8 @@ typedef enum LanguageType kLanguageGerman, kLanguageSpanish, kLanguageRussian, - kLanguageKorean + kLanguageKorean, + kLanguageJapanese } ccLanguageType; // end of platform group diff --git a/cocos2dx/platform/android/CCApplication.cpp b/cocos2dx/platform/android/CCApplication.cpp index 2d2a76047a..44b0491f74 100644 --- a/cocos2dx/platform/android/CCApplication.cpp +++ b/cocos2dx/platform/android/CCApplication.cpp @@ -112,6 +112,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret = kLanguageKorean; } + else if (0 == strcmp("ja", pLanguageName)) + { + ret = kLanguageJapanese; + } return ret; } diff --git a/cocos2dx/platform/blackberry/CCApplication.cpp b/cocos2dx/platform/blackberry/CCApplication.cpp index 5efe65864c..9744a0bcaf 100644 --- a/cocos2dx/platform/blackberry/CCApplication.cpp +++ b/cocos2dx/platform/blackberry/CCApplication.cpp @@ -147,10 +147,14 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret_language = kLanguageRussian; } - else if (strcmp(language, "ko") == 0) + else if (strcmp(language, "ko") == 0) { ret_language = kLanguageKorean; } + else if (strcmp(language, "ja") == 0) + { + ret_language = kLanguageJapanese; + } free(language); free(country); diff --git a/cocos2dx/platform/ios/CCApplication.mm b/cocos2dx/platform/ios/CCApplication.mm index 56233311d3..e92448dd75 100644 --- a/cocos2dx/platform/ios/CCApplication.mm +++ b/cocos2dx/platform/ios/CCApplication.mm @@ -107,6 +107,9 @@ ccLanguageType CCApplication::getCurrentLanguage() else if ([languageCode isEqualToString:@"ko"]){ ret = kLanguageKorean; } + else if ([languageCode isEqualToString:@"ja"]){ + ret = kLanguageJapanese; + } return ret; } diff --git a/cocos2dx/platform/mac/CCApplication.mm b/cocos2dx/platform/mac/CCApplication.mm index 8c2a985d25..266495d311 100755 --- a/cocos2dx/platform/mac/CCApplication.mm +++ b/cocos2dx/platform/mac/CCApplication.mm @@ -113,6 +113,9 @@ ccLanguageType CCApplication::getCurrentLanguage() else if ([languageCode isEqualToString:@"ko"]){ ret = kLanguageKorean; } + else if ([languageCode isEqualToString:@"ja"]){ + ret = kLanguageJapanese; + } return ret; } diff --git a/cocos2dx/platform/marmalade/CCApplication.cpp b/cocos2dx/platform/marmalade/CCApplication.cpp index 94e4d6e485..ce32d9473b 100644 --- a/cocos2dx/platform/marmalade/CCApplication.cpp +++ b/cocos2dx/platform/marmalade/CCApplication.cpp @@ -177,6 +177,10 @@ ccLanguageType CCApplication::getCurrentLanguage() currentLanguage = kLanguageKorean; break; + case S3E_DEVICE_LANGUAGE_JAPANESE: + currentLanguage = kLanguageJapanese; + break; + default: currentLanguage = kLanguageEnglish; break; diff --git a/cocos2dx/platform/win32/CCApplication.cpp b/cocos2dx/platform/win32/CCApplication.cpp index e46a242859..1bee37baa1 100644 --- a/cocos2dx/platform/win32/CCApplication.cpp +++ b/cocos2dx/platform/win32/CCApplication.cpp @@ -139,6 +139,9 @@ ccLanguageType CCApplication::getCurrentLanguage() case LANG_KOREAN: ret = kLanguageKorean; break; + case LANG_JAPANESE: + ret = kLanguageJapanese; + break; } return ret; diff --git a/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp b/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp index 0ef3d20c89..6c2f8d5459 100644 --- a/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp +++ b/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp @@ -33,9 +33,12 @@ CurrentLanguageTest::CurrentLanguageTest() case kLanguageSpanish: labelLanguage->setString("current language is Spanish"); break; - case kLanguageKorean: + case kLanguageKorean: labelLanguage->setString("current language is Korean"); break; + case kLanguageJapanese: + labelLanguage->setString("current language is Japanese"); + break; } addChild(labelLanguage); diff --git a/tools/tolua++/CCApplication.pkg b/tools/tolua++/CCApplication.pkg index 669cea1698..2028b3485b 100644 --- a/tools/tolua++/CCApplication.pkg +++ b/tools/tolua++/CCApplication.pkg @@ -7,7 +7,9 @@ typedef enum LanguageType kLanguageItalian, kLanguageGerman, kLanguageSpanish, - kLanguageRussian + kLanguageRussian, + kLanguageKorean, + kLanguageJapanese } ccLanguageType; enum TargetPlatform diff --git a/tools/tolua++/CCCommon.pkg b/tools/tolua++/CCCommon.pkg index 1226c80592..cf92e077ef 100644 --- a/tools/tolua++/CCCommon.pkg +++ b/tools/tolua++/CCCommon.pkg @@ -7,7 +7,9 @@ typedef enum LanguageType kLanguageItalian, kLanguageGerman, kLanguageSpanish, - kLanguageRussian + kLanguageRussian, + kLanguageKorean, + kLanguageJapanese } ccLanguageType; void CCLuaLog(const char * pszFormat); From 472ce4f9f3ed5cbf55de62459fac4a7f1f77e0ff Mon Sep 17 00:00:00 2001 From: Taro Kobayashi <9re.3000@gmail.com> Date: Wed, 28 Nov 2012 18:21:06 +0900 Subject: [PATCH 02/32] add kLanguageKorean and kLanguageJapanese for lua binding --- scripting/lua/cocos2dx_support/LuaCocos2d.cpp.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/lua/cocos2dx_support/LuaCocos2d.cpp.REMOVED.git-id b/scripting/lua/cocos2dx_support/LuaCocos2d.cpp.REMOVED.git-id index 34b07dcf1c..7dd8519311 100644 --- a/scripting/lua/cocos2dx_support/LuaCocos2d.cpp.REMOVED.git-id +++ b/scripting/lua/cocos2dx_support/LuaCocos2d.cpp.REMOVED.git-id @@ -1 +1 @@ -58e432f8cbf9f340398f9d6db2b61303b6a06034 \ No newline at end of file +4f4952a43ecfeacc4d8e92946a972ad5f3907918 \ No newline at end of file From 3a814de07e8d7c720daf2475a0edfcfbba08a53b Mon Sep 17 00:00:00 2001 From: Taro Kobayashi <9re.3000@gmail.com> Date: Wed, 28 Nov 2012 19:41:50 +0900 Subject: [PATCH 03/32] implemented CCApplication::getCurrentLanguage() for linux platform --- cocos2dx/platform/linux/CCApplication.cpp | 52 ++++++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/cocos2dx/platform/linux/CCApplication.cpp b/cocos2dx/platform/linux/CCApplication.cpp index 86c2352c02..823f2712a4 100644 --- a/cocos2dx/platform/linux/CCApplication.cpp +++ b/cocos2dx/platform/linux/CCApplication.cpp @@ -100,8 +100,56 @@ CCApplication* CCApplication::sharedApplication() ccLanguageType CCApplication::getCurrentLanguage() { - //TODO - return kLanguageEnglish; + char *pLanguageName = getenv("LANG"); + ccLanguageType ret = kLanguageEnglish; + if (!pLanguageName) + { + return kLanguageEnglish; + } + strtok(pLanguageName, "_"); + if (!pLanguageName) + { + return kLanguageEnglish; + } + + if (0 == strcmp("zh", pLanguageName)) + { + ret = kLanguageChinese; + } + else if (0 == strcmp("en", pLanguageName)) + { + ret = kLanguageEnglish; + } + else if (0 == strcmp("fr", pLanguageName)) + { + ret = kLanguageFrench; + } + else if (0 == strcmp("it", pLanguageName)) + { + ret = kLanguageItalian; + } + else if (0 == strcmp("de", pLanguageName)) + { + ret = kLanguageGerman; + } + else if (0 == strcmp("es", pLanguageName)) + { + ret = kLanguageSpanish; + } + else if (0 == strcmp("ru", pLanguageName)) + { + ret = kLanguageRussian; + } + else if (0 == strcmp("ko", pLanguageName)) + { + ret = kLanguageKorean; + } + else if (0 == strcmp("ja", pLanguageName)) + { + ret = kLanguageJapanese; + } + + return ret; } NS_CC_END From 132a76d8010261c85f9fe19a3201d19db040109a Mon Sep 17 00:00:00 2001 From: William Chen Date: Thu, 29 Nov 2012 18:04:07 -0500 Subject: [PATCH 04/32] Fix for CCRenderTexture on Android sleep/resume When an android app goes into the background, all gl context is lost, including any frame buffer objects that are required for rendering to a texture. When the android app returns to focus, a new FBO is generated for each render texture allowing rendering to the texture to continue. --- cocos2dx/misc_nodes/CCRenderTexture.cpp | 83 +++++++++++++++++++------ cocos2dx/misc_nodes/CCRenderTexture.h | 7 ++- 2 files changed, 70 insertions(+), 20 deletions(-) diff --git a/cocos2dx/misc_nodes/CCRenderTexture.cpp b/cocos2dx/misc_nodes/CCRenderTexture.cpp index 51044cc47c..87831a422f 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.cpp +++ b/cocos2dx/misc_nodes/CCRenderTexture.cpp @@ -59,12 +59,19 @@ CCRenderTexture::CCRenderTexture() , m_nClearStencil(0) , m_bAutoDraw(false) { +#if CC_ENABLE_CACHE_TEXTURE_DATA // Listen this event to save render texture before come to background. // Then it can be restored after coming to foreground on Android. CCNotificationCenter::sharedNotificationCenter()->addObserver(this, - callfuncO_selector(CCRenderTexture::listenToBackground), - EVENT_COME_TO_BACKGROUND, - NULL); + callfuncO_selector(CCRenderTexture::listenToBackground), + EVENT_COME_TO_BACKGROUND, + NULL); + + CCNotificationCenter::sharedNotificationCenter()->addObserver(this, + callfuncO_selector(CCRenderTexture::listenToForeground), + EVNET_COME_TO_FOREGROUND, // this is misspelt + NULL); +#endif } CCRenderTexture::~CCRenderTexture() @@ -78,29 +85,59 @@ CCRenderTexture::~CCRenderTexture() glDeleteRenderbuffers(1, &m_uDepthRenderBufffer); } CC_SAFE_DELETE(m_pUITextureImage); - + +#if CC_ENABLE_CACHE_TEXTURE_DATA CCNotificationCenter::sharedNotificationCenter()->removeObserver(this, EVENT_COME_TO_BACKGROUND); + CCNotificationCenter::sharedNotificationCenter()->removeObserver(this, EVNET_COME_TO_FOREGROUND); +#endif } void CCRenderTexture::listenToBackground(cocos2d::CCObject *obj) { #if CC_ENABLE_CACHE_TEXTURE_DATA - CC_SAFE_DELETE(m_pUITextureImage); // to get the rendered texture data - m_pUITextureImage = newCCImage(); - + m_pUITextureImage = newCCImage(false); if (m_pUITextureImage) { const CCSize& s = m_pTexture->getContentSizeInPixels(); VolatileTexture::addDataTexture(m_pTexture, m_pUITextureImage->getData(), kTexture2DPixelFormat_RGBA8888, s); - } + + if ( m_pTextureCopy ) + { + VolatileTexture::addDataTexture(m_pTextureCopy, m_pUITextureImage->getData(), kTexture2DPixelFormat_RGBA8888, s); + } + } else { CCLOG("Cache rendertexture failed!"); } + + glDeleteFramebuffers(1, &m_uFBO); + m_uFBO = 0; +#endif +} + +void CCRenderTexture::listenToForeground(cocos2d::CCObject *obj) +{ +#if CC_ENABLE_CACHE_TEXTURE_DATA + // -- regenerate frame buffer object and attach the texture + glGetIntegerv(GL_FRAMEBUFFER_BINDING, &m_nOldFBO); + + glGenFramebuffers(1, &m_uFBO); + glBindFramebuffer(GL_FRAMEBUFFER, m_uFBO); + + m_pTexture->setAliasTexParameters(); + + if ( m_pTextureCopy ) + { + m_pTextureCopy->setAliasTexParameters(); + } + + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_pTexture->getName(), 0); + glBindFramebuffer(GL_FRAMEBUFFER, m_nOldFBO); #endif } @@ -590,7 +627,7 @@ bool CCRenderTexture::saveToFile(const char *szFilePath) { bool bRet = false; - CCImage *pImage = newCCImage(); + CCImage *pImage = newCCImage(true); if (pImage) { bRet = pImage->saveToFile(szFilePath, kCCImageFormatJPEG); @@ -605,7 +642,7 @@ bool CCRenderTexture::saveToFile(const char *fileName, tCCImageFormat format) CCAssert(format == kCCImageFormatJPEG || format == kCCImageFormatPNG, "the image can only be saved as JPG or PNG format"); - CCImage *pImage = newCCImage(); + CCImage *pImage = newCCImage(true); if (pImage) { std::string fullpath = CCFileUtils::sharedFileUtils()->getWriteablePath() + fileName; @@ -619,7 +656,7 @@ bool CCRenderTexture::saveToFile(const char *fileName, tCCImageFormat format) } /* get buffer as CCImage */ -CCImage* CCRenderTexture::newCCImage() +CCImage* CCRenderTexture::newCCImage(bool flipImage) { CCAssert(m_ePixelFormat == kCCTexture2DPixelFormat_RGBA8888, "only RGBA8888 can be saved as image"); @@ -656,16 +693,24 @@ CCImage* CCRenderTexture::newCCImage() glReadPixels(0,0,nSavedBufferWidth, nSavedBufferHeight,GL_RGBA,GL_UNSIGNED_BYTE, pTempData); this->end(); - // to get the actual texture data - // #640 the image read from rendertexture is dirty - for (int i = 0; i < nSavedBufferHeight; ++i) + if ( flipImage ) // -- flip is only required when saving image to file { - memcpy(&pBuffer[i * nSavedBufferWidth * 4], - &pTempData[(nSavedBufferHeight - i - 1) * nSavedBufferWidth * 4], - nSavedBufferWidth * 4); - } + // to get the actual texture data + // #640 the image read from rendertexture is dirty + for (int i = 0; i < nSavedBufferHeight; ++i) + { + memcpy(&pBuffer[i * nSavedBufferWidth * 4], + &pTempData[(nSavedBufferHeight - i - 1) * nSavedBufferWidth * 4], + nSavedBufferWidth * 4); + } - pImage->initWithImageData(pBuffer, nSavedBufferWidth * nSavedBufferHeight * 4, CCImage::kFmtRawData, nSavedBufferWidth, nSavedBufferHeight, 8); + pImage->initWithImageData(pBuffer, nSavedBufferWidth * nSavedBufferHeight * 4, CCImage::kFmtRawData, nSavedBufferWidth, nSavedBufferHeight, 8); + } + else + { + pImage->initWithImageData(pTempData, nSavedBufferWidth * nSavedBufferHeight * 4, CCImage::kFmtRawData, nSavedBufferWidth, nSavedBufferHeight, 8); + } + } while (0); CC_SAFE_DELETE_ARRAY(pBuffer); diff --git a/cocos2dx/misc_nodes/CCRenderTexture.h b/cocos2dx/misc_nodes/CCRenderTexture.h index 26aff3e68d..313cd67d19 100644 --- a/cocos2dx/misc_nodes/CCRenderTexture.h +++ b/cocos2dx/misc_nodes/CCRenderTexture.h @@ -128,7 +128,7 @@ public: /* creates a new CCImage from with the texture's data. Caller is responsible for releasing it by calling delete. */ - CCImage* newCCImage(); + CCImage* newCCImage(bool flipImage = true); /** saves the texture into a file using JPEG format. The file will be saved in the Documents folder. Returns YES if the operation is successful. @@ -145,6 +145,11 @@ public: */ void listenToBackground(CCObject *obj); + /** Listen "come to foreground" message and restore the frame buffer object + It only has effect on Android. + */ + void listenToForeground(CCObject *obj); + /** Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw is YES. */ unsigned int getClearFlags() const; void setClearFlags(unsigned int uClearFlags); From 43cc38334676833c15bbd21f3593a6cd24d6326b Mon Sep 17 00:00:00 2001 From: Gonzalo Buteler Date: Thu, 29 Nov 2012 22:00:34 -0300 Subject: [PATCH 05/32] Implementation of removeAllObjects() methods in CCSet --- cocos2dx/cocoa/CCDictionary.h | 1 + cocos2dx/cocoa/CCSet.cpp | 18 ++++++++++++++++++ cocos2dx/cocoa/CCSet.h | 4 ++++ 3 files changed, 23 insertions(+) diff --git a/cocos2dx/cocoa/CCDictionary.h b/cocos2dx/cocoa/CCDictionary.h index 18dc2b8f9c..02fadaf2be 100644 --- a/cocos2dx/cocoa/CCDictionary.h +++ b/cocos2dx/cocoa/CCDictionary.h @@ -25,6 +25,7 @@ THE SOFTWARE. #ifndef __CCDICTIONARY_H__ #define __CCDICTIONARY_H__ +#include #include "support/data_support/uthash.h" #include "CCObject.h" #include "CCArray.h" diff --git a/cocos2dx/cocoa/CCSet.cpp b/cocos2dx/cocoa/CCSet.cpp index f284d9c937..0078cfb5d9 100644 --- a/cocos2dx/cocoa/CCSet.cpp +++ b/cocos2dx/cocoa/CCSet.cpp @@ -96,6 +96,24 @@ void CCSet::removeObject(CCObject *pObject) CC_SAFE_RELEASE(pObject); } +void CCSet::removeAllObjects() +{ + if (!m_pSet || m_pSet->empty()) + { + return; + } + + CCSetIterator it; + + for( it = m_pSet->begin(); it != m_pSet->end(); ++it) + { + if(*it) + { + removeObject(*it); + } + } +} + bool CCSet::containsObject(CCObject *pObject) { return m_pSet->find(pObject) != m_pSet->end(); diff --git a/cocos2dx/cocoa/CCSet.h b/cocos2dx/cocoa/CCSet.h index e6513c3685..9c6a621862 100644 --- a/cocos2dx/cocoa/CCSet.h +++ b/cocos2dx/cocoa/CCSet.h @@ -64,6 +64,10 @@ public: *@brief Remove the given element, nothing todo if no element equals pObject. */ void removeObject(CCObject *pObject); + /** + *@brief Remove all elements of the set + */ + void removeAllObjects(); /** *@brief Check if CCSet contains a element equals pObject. */ From 8adb3eb6eb2d8c76d4b13be6fd126c4f22dc387a Mon Sep 17 00:00:00 2001 From: Andres Pagliano Date: Fri, 30 Nov 2012 10:38:27 -0300 Subject: [PATCH 06/32] Refactoring in CCSet --- cocos2dx/cocoa/CCSet.cpp | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/cocos2dx/cocoa/CCSet.cpp b/cocos2dx/cocoa/CCSet.cpp index 0078cfb5d9..8ab306af56 100644 --- a/cocos2dx/cocoa/CCSet.cpp +++ b/cocos2dx/cocoa/CCSet.cpp @@ -52,18 +52,7 @@ CCSet::CCSet(const CCSet &rSetObject) CCSet::~CCSet(void) { - // call release() of elements - CCSetIterator iter; - for (iter = m_pSet->begin(); iter != m_pSet->end(); ++iter) - { - if (! (*iter)) - { - break; - } - - (*iter)->release(); - } - + removeAllObjects(); CC_SAFE_DELETE(m_pSet); } @@ -98,20 +87,16 @@ void CCSet::removeObject(CCObject *pObject) void CCSet::removeAllObjects() { - if (!m_pSet || m_pSet->empty()) - { - return; - } + CCSetIterator it; + for (it = m_pSet->begin(); it != m_pSet->end(); ++it) + { + if (! (*it)) + { + break; + } - CCSetIterator it; - - for( it = m_pSet->begin(); it != m_pSet->end(); ++it) - { - if(*it) - { - removeObject(*it); - } - } + (*it)->release(); + } } bool CCSet::containsObject(CCObject *pObject) From 97efff6e46159035c6db36c3b6ce478b4d3cb3a2 Mon Sep 17 00:00:00 2001 From: Andres Pagliano Date: Fri, 30 Nov 2012 11:30:45 -0300 Subject: [PATCH 07/32] Removed unnescessary header --- cocos2dx/cocoa/CCDictionary.h | 1 - 1 file changed, 1 deletion(-) diff --git a/cocos2dx/cocoa/CCDictionary.h b/cocos2dx/cocoa/CCDictionary.h index 02fadaf2be..18dc2b8f9c 100644 --- a/cocos2dx/cocoa/CCDictionary.h +++ b/cocos2dx/cocoa/CCDictionary.h @@ -25,7 +25,6 @@ THE SOFTWARE. #ifndef __CCDICTIONARY_H__ #define __CCDICTIONARY_H__ -#include #include "support/data_support/uthash.h" #include "CCObject.h" #include "CCArray.h" From 9c04db0e411ab990072dd35baaee570ebdfcffcb Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 4 Dec 2012 12:08:37 +0800 Subject: [PATCH 08/32] modify js-binding related samples according the modification of cocos2d-js-tests --- .../project.pbxproj.REMOVED.git-id | 1 + .../MoonWarriors.xcodeproj/project.pbxproj | 30 ++--- .../project.pbxproj | 112 ++++++++++-------- .../project.pbxproj.REMOVED.git-id | 1 - 4 files changed, 72 insertions(+), 72 deletions(-) create mode 100644 samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id rename samples/{CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj => WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj}/project.pbxproj (94%) delete mode 100644 samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj.REMOVED.git-id diff --git a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id new file mode 100644 index 0000000000..c847559a5c --- /dev/null +++ b/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id @@ -0,0 +1 @@ +fdd8a5d4e5a94b517f86c0f1b7d334adc1eb9c9c \ No newline at end of file diff --git a/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj b/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj index fb10f2746b..3f550e7f72 100644 --- a/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj +++ b/samples/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj @@ -120,15 +120,10 @@ 156752F7163E7FC30002AD61 /* libjs_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 156752F6163E7FC30002AD61 /* libjs_static.a */; }; 156752F9163E82D40002AD61 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 156752F8163E82D40002AD61 /* libz.dylib */; }; 15675300163E870E0002AD61 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 156752FF163E870E0002AD61 /* libxml2.dylib */; }; - 157EFB7E1667237500BF1E11 /* main.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB791667237500BF1E11 /* main.js */; }; - 157EFB801667237500BF1E11 /* MoonWarriors-native.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB7B1667237500BF1E11 /* MoonWarriors-native.js */; }; 157EFB811667237500BF1E11 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 157EFB7C1667237500BF1E11 /* res */; }; 157EFB821667237500BF1E11 /* src in Resources */ = {isa = PBXBuildFile; fileRef = 157EFB7D1667237500BF1E11 /* src */; }; - 157EFB89166723A800BF1E11 /* jsb_constants.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB84166723A800BF1E11 /* jsb_constants.js */; }; - 157EFB8A166723A800BF1E11 /* jsb_constants_chipmunk.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB85166723A800BF1E11 /* jsb_constants_chipmunk.js */; }; - 157EFB8B166723A800BF1E11 /* jsb_constants_cocos2d.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB86166723A800BF1E11 /* jsb_constants_cocos2d.js */; }; - 157EFB8C166723A800BF1E11 /* jsb_constants_cocosbuilder.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB87166723A800BF1E11 /* jsb_constants_cocosbuilder.js */; }; - 157EFB8D166723A800BF1E11 /* jsb_constants_gl.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB88166723A800BF1E11 /* jsb_constants_gl.js */; }; + 1590031F166DABBD006BF838 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 157EFB791667237500BF1E11 /* main.js */; }; + 15900320166DABBD006BF838 /* MoonWarriors-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1590031D166DAB95006BF838 /* MoonWarriors-jsb.js */; }; 15E35BC516688F9900ED83DB /* cocosjs_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E35BC116688F9900ED83DB /* cocosjs_manual_conversions.cpp */; }; 15E35BC616688F9900ED83DB /* js_bindings_ccbreader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E35BC316688F9900ED83DB /* js_bindings_ccbreader.cpp */; }; 15E35BD616688FA900ED83DB /* js_bindings_chipmunk_auto_classes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E35BC816688FA900ED83DB /* js_bindings_chipmunk_auto_classes.cpp */; }; @@ -139,7 +134,6 @@ 15E35BDB16688FA900ED83DB /* js_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E35BD416688FA900ED83DB /* js_manual_conversions.cpp */; }; 15E35BE116688FD800ED83DB /* CCPhysicsDebugNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E35BDD16688FD800ED83DB /* CCPhysicsDebugNode.cpp */; }; 15E35BE216688FD800ED83DB /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E35BDF16688FD800ED83DB /* CCPhysicsSprite.cpp */; }; - 15E35BE31668908C00ED83DB /* MoonWarriors-native.js in Resources */ = {isa = PBXBuildFile; fileRef = 157EFB7B1667237500BF1E11 /* MoonWarriors-native.js */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -365,7 +359,6 @@ 156752F8163E82D40002AD61 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 156752FF163E870E0002AD61 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; 157EFB791667237500BF1E11 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = "../../TestJavascript/cocos2d-js-tests/games/MoonWarriors/main.js"; sourceTree = ""; }; - 157EFB7B1667237500BF1E11 /* MoonWarriors-native.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "MoonWarriors-native.js"; path = "../../TestJavascript/cocos2d-js-tests/games/MoonWarriors/MoonWarriors-native.js"; sourceTree = ""; }; 157EFB7C1667237500BF1E11 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = "../../TestJavascript/cocos2d-js-tests/games/MoonWarriors/res"; sourceTree = ""; }; 157EFB7D1667237500BF1E11 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = "../../TestJavascript/cocos2d-js-tests/games/MoonWarriors/src"; sourceTree = ""; }; 157EFB84166723A800BF1E11 /* jsb_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants.js; sourceTree = ""; }; @@ -373,6 +366,7 @@ 157EFB86166723A800BF1E11 /* jsb_constants_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_cocos2d.js; sourceTree = ""; }; 157EFB87166723A800BF1E11 /* jsb_constants_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_cocosbuilder.js; sourceTree = ""; }; 157EFB88166723A800BF1E11 /* jsb_constants_gl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_gl.js; sourceTree = ""; }; + 1590031D166DAB95006BF838 /* MoonWarriors-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "MoonWarriors-jsb.js"; path = "../../TestJavascript/cocos2d-js-tests/games/MoonWarriors/MoonWarriors-jsb.js"; sourceTree = ""; }; 15E35BC116688F9900ED83DB /* cocosjs_manual_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocosjs_manual_conversions.cpp; sourceTree = ""; }; 15E35BC216688F9900ED83DB /* cocosjs_manual_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocosjs_manual_conversions.h; sourceTree = ""; }; 15E35BC316688F9900ED83DB /* js_bindings_ccbreader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_ccbreader.cpp; sourceTree = ""; }; @@ -586,21 +580,21 @@ 15675123163E73F40002AD61 /* Resources */ = { isa = PBXGroup; children = ( - 157EFB83166723A800BF1E11 /* js */, - 157EFB791667237500BF1E11 /* main.js */, - 157EFB7B1667237500BF1E11 /* MoonWarriors-native.js */, 157EFB7C1667237500BF1E11 /* res */, 157EFB7D1667237500BF1E11 /* src */, - 156752BC163E7C350002AD61 /* Icon-144.png */, + 157EFB791667237500BF1E11 /* main.js */, + 1590031D166DAB95006BF838 /* MoonWarriors-jsb.js */, 15675164163E741E0002AD61 /* Default-568h@2x.png */, 15675165163E741E0002AD61 /* Default.png */, 15675166163E741E0002AD61 /* Default@2x.png */, + 156752BC163E7C350002AD61 /* Icon-144.png */, 15675167163E741E0002AD61 /* Icon-72.png */, 15675168163E741E0002AD61 /* Icon-Small-50.png */, 15675169163E741E0002AD61 /* Icon-Small.png */, 1567516A163E741E0002AD61 /* Icon-Small@2x.png */, 1567516B163E741E0002AD61 /* Icon.png */, 1567516C163E741E0002AD61 /* Icon@2x.png */, + 157EFB83166723A800BF1E11 /* js */, ); name = Resources; sourceTree = ""; @@ -944,6 +938,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1590031F166DABBD006BF838 /* main.js in Resources */, + 15900320166DABBD006BF838 /* MoonWarriors-jsb.js in Resources */, 1567510E163E73B10002AD61 /* README in Resources */, 1567516D163E741E0002AD61 /* Default-568h@2x.png in Resources */, 1567516E163E741E0002AD61 /* Default.png in Resources */, @@ -960,7 +956,6 @@ 151031791668915C00C0F72F /* jsb_constants_gl.js in Resources */, 151031781668915B00C0F72F /* jsb_constants_cocosbuilder.js in Resources */, 151031761668915900C0F72F /* jsb_constants_chipmunk.js in Resources */, - 15E35BE31668908C00ED83DB /* MoonWarriors-native.js in Resources */, 156752BD163E7C350002AD61 /* Icon-144.png in Resources */, 157EFB811667237500BF1E11 /* res in Resources */, 157EFB821667237500BF1E11 /* src in Resources */, @@ -1058,13 +1053,6 @@ 156752A5163E77A90002AD61 /* cpSweep1D.c in Sources */, 156752A6163E77A90002AD61 /* cpVect.c in Sources */, 156752A9163E78180002AD61 /* RootViewController.mm in Sources */, - 157EFB7E1667237500BF1E11 /* main.js in Sources */, - 157EFB801667237500BF1E11 /* MoonWarriors-native.js in Sources */, - 157EFB89166723A800BF1E11 /* jsb_constants.js in Sources */, - 157EFB8A166723A800BF1E11 /* jsb_constants_chipmunk.js in Sources */, - 157EFB8B166723A800BF1E11 /* jsb_constants_cocos2d.js in Sources */, - 157EFB8C166723A800BF1E11 /* jsb_constants_cocosbuilder.js in Sources */, - 157EFB8D166723A800BF1E11 /* jsb_constants_gl.js in Sources */, 15E35BC516688F9900ED83DB /* cocosjs_manual_conversions.cpp in Sources */, 15E35BC616688F9900ED83DB /* js_bindings_ccbreader.cpp in Sources */, 15E35BD616688FA900ED83DB /* js_bindings_chipmunk_auto_classes.cpp in Sources */, diff --git a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj similarity index 94% rename from samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj rename to samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj index 95d674083e..0357f04f45 100644 --- a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj +++ b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj @@ -50,13 +50,7 @@ 15426FE815B5743C00712A7F /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD515B5743C00712A7F /* CocosDenshion.m */; }; 15426FE915B5743C00712A7F /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD615B5743C00712A7F /* SimpleAudioEngine.mm */; }; 15426FEA15B5743C00712A7F /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD815B5743C00712A7F /* SimpleAudioEngine_objc.m */; }; - 157EFB9A1667302B00BF1E11 /* jsb_constants.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB951667302B00BF1E11 /* jsb_constants.js */; }; - 157EFB9B1667302B00BF1E11 /* jsb_constants_chipmunk.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB961667302B00BF1E11 /* jsb_constants_chipmunk.js */; }; - 157EFB9C1667302B00BF1E11 /* jsb_constants_cocos2d.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB971667302B00BF1E11 /* jsb_constants_cocos2d.js */; }; - 157EFB9D1667302B00BF1E11 /* jsb_constants_cocosbuilder.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB981667302B00BF1E11 /* jsb_constants_cocosbuilder.js */; }; - 157EFB9E1667302B00BF1E11 /* jsb_constants_gl.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFB991667302B00BF1E11 /* jsb_constants_gl.js */; }; - 157EFBAE1667308300BF1E11 /* cocos2dxapi.js in Sources */ = {isa = PBXBuildFile; fileRef = 157EFBAD1667308300BF1E11 /* cocos2dxapi.js */; }; - 157EFBB0166730EF00BF1E11 /* Published files iOS in Resources */ = {isa = PBXBuildFile; fileRef = 157EFBAF166730EF00BF1E11 /* Published files iOS */; }; + 15900400166DAD84006BF838 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 159003FF166DAD84006BF838 /* res */; }; 15CFE1A61612FD0E00BF2188 /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE18D1612FD0E00BF2188 /* CCControl.cpp */; }; 15CFE1A71612FD0E00BF2188 /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE18F1612FD0E00BF2188 /* CCControlButton.cpp */; }; 15CFE1A81612FD0E00BF2188 /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1911612FD0E00BF2188 /* CCControlColourPicker.cpp */; }; @@ -71,6 +65,15 @@ 15CFE1B11612FD0E00BF2188 /* CCScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1A41612FD0E00BF2188 /* CCScale9Sprite.cpp */; }; 15E2AE9E165DC52C00F7743F /* CCPhysicsDebugNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E2AE9A165DC52C00F7743F /* CCPhysicsDebugNode.cpp */; }; 15E2AE9F165DC52C00F7743F /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15E2AE9C165DC52C00F7743F /* CCPhysicsSprite.cpp */; }; + 1A995D32166B40C5001C34E9 /* boot-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C5E166B3F52001C34E9 /* boot-jsb.js */; }; + 1A995D33166B40C5001C34E9 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C5F166B3F52001C34E9 /* main.js */; }; + 1A995D34166B40C5001C34E9 /* resources-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995CC8166B3F52001C34E9 /* resources-jsb.js */; }; + 1A995D35166B40C5001C34E9 /* watermelon_with_me.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995CC9166B3F52001C34E9 /* watermelon_with_me.js */; }; + 1A995D36166B40C5001C34E9 /* jsb_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C54166B3F24001C34E9 /* jsb_constants.js */; }; + 1A995D37166B40C5001C34E9 /* jsb_constants_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C55166B3F24001C34E9 /* jsb_constants_chipmunk.js */; }; + 1A995D38166B40C5001C34E9 /* jsb_constants_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C56166B3F24001C34E9 /* jsb_constants_cocos2d.js */; }; + 1A995D39166B40C5001C34E9 /* jsb_constants_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C57166B3F24001C34E9 /* jsb_constants_cocosbuilder.js */; }; + 1A995D3A166B40C5001C34E9 /* jsb_constants_gl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C58166B3F24001C34E9 /* jsb_constants_gl.js */; }; 262829DB15EC7196002C4240 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829AC15EC7196002C4240 /* chipmunk.c */; }; 262829DD15EC7196002C4240 /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829AF15EC7196002C4240 /* cpConstraint.c */; }; 262829DE15EC7196002C4240 /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B015EC7196002C4240 /* cpDampedRotarySpring.c */; }; @@ -239,13 +242,7 @@ 15426FD615B5743C00712A7F /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = ""; }; 15426FD715B5743C00712A7F /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; }; 15426FD815B5743C00712A7F /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; }; - 157EFB951667302B00BF1E11 /* jsb_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants.js; sourceTree = ""; }; - 157EFB961667302B00BF1E11 /* jsb_constants_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_chipmunk.js; sourceTree = ""; }; - 157EFB971667302B00BF1E11 /* jsb_constants_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_cocos2d.js; sourceTree = ""; }; - 157EFB981667302B00BF1E11 /* jsb_constants_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_cocosbuilder.js; sourceTree = ""; }; - 157EFB991667302B00BF1E11 /* jsb_constants_gl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_gl.js; sourceTree = ""; }; - 157EFBAD1667308300BF1E11 /* cocos2dxapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = cocos2dxapi.js; path = ../../../scripting/javascript/bindings/generated/cocos2dxapi.js; sourceTree = ""; }; - 157EFBAF166730EF00BF1E11 /* Published files iOS */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "Published files iOS"; path = "../../TestJavascript/cocos2d-js-tests/games/CocosDragonJS/Published files iOS"; sourceTree = ""; }; + 159003FF166DAD84006BF838 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/res"; sourceTree = ""; }; 15CFE18D1612FD0E00BF2188 /* CCControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControl.cpp; sourceTree = ""; }; 15CFE18E1612FD0E00BF2188 /* CCControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControl.h; sourceTree = ""; }; 15CFE18F1612FD0E00BF2188 /* CCControlButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButton.cpp; sourceTree = ""; }; @@ -275,6 +272,15 @@ 15E2AE9B165DC52C00F7743F /* CCPhysicsDebugNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDebugNode.h; sourceTree = ""; }; 15E2AE9C165DC52C00F7743F /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; }; 15E2AE9D165DC52C00F7743F /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = ""; }; + 1A995C54166B3F24001C34E9 /* jsb_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants.js; sourceTree = ""; }; + 1A995C55166B3F24001C34E9 /* jsb_constants_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_chipmunk.js; sourceTree = ""; }; + 1A995C56166B3F24001C34E9 /* jsb_constants_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_cocos2d.js; sourceTree = ""; }; + 1A995C57166B3F24001C34E9 /* jsb_constants_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_cocosbuilder.js; sourceTree = ""; }; + 1A995C58166B3F24001C34E9 /* jsb_constants_gl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_constants_gl.js; sourceTree = ""; }; + 1A995C5E166B3F52001C34E9 /* boot-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "boot-jsb.js"; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/boot-jsb.js"; sourceTree = ""; }; + 1A995C5F166B3F52001C34E9 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/main.js"; sourceTree = ""; }; + 1A995CC8166B3F52001C34E9 /* resources-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "resources-jsb.js"; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/resources-jsb.js"; sourceTree = ""; }; + 1A995CC9166B3F52001C34E9 /* watermelon_with_me.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = watermelon_with_me.js; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/watermelon_with_me.js"; sourceTree = ""; }; 2628298215EC7196002C4240 /* chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk.h; sourceTree = ""; }; 2628298315EC7196002C4240 /* chipmunk_ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_ffi.h; sourceTree = ""; }; 2628298415EC7196002C4240 /* chipmunk_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_private.h; sourceTree = ""; }; @@ -342,7 +348,7 @@ 263B98CF16548E4D00228D8A /* js_bindings_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_core.h; sourceTree = ""; }; 263B98D316548EB700228D8A /* js_bindings_chipmunk_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_functions.cpp; sourceTree = ""; }; 263B98D516548EB700228D8A /* js_bindings_chipmunk_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_manual.cpp; sourceTree = ""; }; - A922753D1517C094001B78AA /* CocosDragonJS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocosDragonJS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A922753D1517C094001B78AA /* WatermelonWithMe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatermelonWithMe.app; sourceTree = BUILT_PRODUCTS_DIR; }; A92275411517C094001B78AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; A92275431517C094001B78AA /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; A92275451517C094001B78AA /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; @@ -589,9 +595,12 @@ 15628F5B15F0F5C2000CF24B /* Resources */ = { isa = PBXGroup; children = ( - 157EFBAF166730EF00BF1E11 /* Published files iOS */, - 157EFBAD1667308300BF1E11 /* cocos2dxapi.js */, - 157EFB941667302B00BF1E11 /* js */, + 159003FF166DAD84006BF838 /* res */, + 1A995C5E166B3F52001C34E9 /* boot-jsb.js */, + 1A995C5F166B3F52001C34E9 /* main.js */, + 1A995CC8166B3F52001C34E9 /* resources-jsb.js */, + 1A995CC9166B3F52001C34E9 /* watermelon_with_me.js */, + 1A995C53166B3F24001C34E9 /* js */, D446FDA616102D86000ADA7B /* Default-568h@2x.png */, D446FDA416102D82000ADA7B /* Default@2x.png */, D446FDA216102D7D000ADA7B /* Default.png */, @@ -599,19 +608,6 @@ name = Resources; sourceTree = ""; }; - 157EFB941667302B00BF1E11 /* js */ = { - isa = PBXGroup; - children = ( - 157EFB951667302B00BF1E11 /* jsb_constants.js */, - 157EFB961667302B00BF1E11 /* jsb_constants_chipmunk.js */, - 157EFB971667302B00BF1E11 /* jsb_constants_cocos2d.js */, - 157EFB981667302B00BF1E11 /* jsb_constants_cocosbuilder.js */, - 157EFB991667302B00BF1E11 /* jsb_constants_gl.js */, - ); - name = js; - path = ../../../scripting/javascript/bindings/js; - sourceTree = ""; - }; 15CFE18C1612FD0E00BF2188 /* CCControlExtension */ = { isa = PBXGroup; children = ( @@ -655,6 +651,19 @@ path = physics_nodes; sourceTree = ""; }; + 1A995C53166B3F24001C34E9 /* js */ = { + isa = PBXGroup; + children = ( + 1A995C54166B3F24001C34E9 /* jsb_constants.js */, + 1A995C55166B3F24001C34E9 /* jsb_constants_chipmunk.js */, + 1A995C56166B3F24001C34E9 /* jsb_constants_cocos2d.js */, + 1A995C57166B3F24001C34E9 /* jsb_constants_cocosbuilder.js */, + 1A995C58166B3F24001C34E9 /* jsb_constants_gl.js */, + ); + name = js; + path = ../../../scripting/javascript/bindings/js; + sourceTree = ""; + }; 2628297C15EC7196002C4240 /* chipmunk */ = { isa = PBXGroup; children = ( @@ -778,7 +787,7 @@ A922753E1517C094001B78AA /* Products */ = { isa = PBXGroup; children = ( - A922753D1517C094001B78AA /* CocosDragonJS.app */, + A922753D1517C094001B78AA /* WatermelonWithMe.app */, ); name = Products; sourceTree = ""; @@ -827,9 +836,9 @@ /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - A922753C1517C094001B78AA /* CocosDragonJS */ = { + A922753C1517C094001B78AA /* WatermelonWithMe */ = { isa = PBXNativeTarget; - buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "CocosDragonJS" */; + buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "WatermelonWithMe" */; buildPhases = ( A92275391517C094001B78AA /* Sources */, A922753A1517C094001B78AA /* Frameworks */, @@ -840,9 +849,9 @@ dependencies = ( 15426FC215B5741900712A7F /* PBXTargetDependency */, ); - name = CocosDragonJS; - productName = CocosDragonJS; - productReference = A922753D1517C094001B78AA /* CocosDragonJS.app */; + name = WatermelonWithMe; + productName = WatermelonWithMe; + productReference = A922753D1517C094001B78AA /* WatermelonWithMe.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -853,7 +862,7 @@ attributes = { LastUpgradeCheck = 0430; }; - buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "CocosDragonJS" */; + buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "WatermelonWithMe" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -871,7 +880,7 @@ ); projectRoot = ""; targets = ( - A922753C1517C094001B78AA /* CocosDragonJS */, + A922753C1517C094001B78AA /* WatermelonWithMe */, ); }; /* End PBXProject section */ @@ -891,10 +900,19 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1A995D32166B40C5001C34E9 /* boot-jsb.js in Resources */, + 1A995D33166B40C5001C34E9 /* main.js in Resources */, + 1A995D34166B40C5001C34E9 /* resources-jsb.js in Resources */, + 1A995D35166B40C5001C34E9 /* watermelon_with_me.js in Resources */, + 1A995D36166B40C5001C34E9 /* jsb_constants.js in Resources */, + 1A995D37166B40C5001C34E9 /* jsb_constants_chipmunk.js in Resources */, + 1A995D38166B40C5001C34E9 /* jsb_constants_cocos2d.js in Resources */, + 1A995D39166B40C5001C34E9 /* jsb_constants_cocosbuilder.js in Resources */, + 1A995D3A166B40C5001C34E9 /* jsb_constants_gl.js in Resources */, D446FDA316102D7D000ADA7B /* Default.png in Resources */, D446FDA516102D82000ADA7B /* Default@2x.png in Resources */, D446FDA716102D86000ADA7B /* Default-568h@2x.png in Resources */, - 157EFBB0166730EF00BF1E11 /* Published files iOS in Resources */, + 15900400166DAD84006BF838 /* res in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -999,12 +1017,6 @@ 263B98D716548EB700228D8A /* js_bindings_chipmunk_manual.cpp in Sources */, 15E2AE9E165DC52C00F7743F /* CCPhysicsDebugNode.cpp in Sources */, 15E2AE9F165DC52C00F7743F /* CCPhysicsSprite.cpp in Sources */, - 157EFB9A1667302B00BF1E11 /* jsb_constants.js in Sources */, - 157EFB9B1667302B00BF1E11 /* jsb_constants_chipmunk.js in Sources */, - 157EFB9C1667302B00BF1E11 /* jsb_constants_cocos2d.js in Sources */, - 157EFB9D1667302B00BF1E11 /* jsb_constants_cocosbuilder.js in Sources */, - 157EFB9E1667302B00BF1E11 /* jsb_constants_gl.js in Sources */, - 157EFBAE1667308300BF1E11 /* cocos2dxapi.js in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1108,7 +1120,7 @@ "-lz", "-ljs_static", ); - PRODUCT_NAME = CocosDragonJS; + PRODUCT_NAME = WatermelonWithMe; TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = app; }; @@ -1149,7 +1161,7 @@ "-lz", "-ljs_static", ); - PRODUCT_NAME = CocosDragonJS; + PRODUCT_NAME = WatermelonWithMe; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; WRAPPER_EXTENSION = app; @@ -1159,7 +1171,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - A92275371517C094001B78AA /* Build configuration list for PBXProject "CocosDragonJS" */ = { + A92275371517C094001B78AA /* Build configuration list for PBXProject "WatermelonWithMe" */ = { isa = XCConfigurationList; buildConfigurations = ( A92276FE1517C097001B78AA /* Debug */, @@ -1168,7 +1180,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "CocosDragonJS" */ = { + A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "WatermelonWithMe" */ = { isa = XCConfigurationList; buildConfigurations = ( A92277011517C097001B78AA /* Debug */, diff --git a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj.REMOVED.git-id deleted file mode 100644 index aaeac155a7..0000000000 --- a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -b93dc46ded7ce28fc6fae87c15645c8eb8d0f258 \ No newline at end of file From f4656ad00f2b4bce86a3f29a67f9e8135ddfe19b Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 4 Dec 2012 14:00:29 +0800 Subject: [PATCH 09/32] update cocos2d-js-tests to up-stream --- samples/TestJavascript/cocos2d-js-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/TestJavascript/cocos2d-js-tests b/samples/TestJavascript/cocos2d-js-tests index d8a9715050..2e932705a1 160000 --- a/samples/TestJavascript/cocos2d-js-tests +++ b/samples/TestJavascript/cocos2d-js-tests @@ -1 +1 @@ -Subproject commit d8a9715050f52e04aadc5e8410eeeacede4a3451 +Subproject commit 2e932705a10756255a226e5faa18891a8ec9d0d0 From dbeb85fa5d0c178ec977e5bb6f3774973282a762 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 14:09:19 +0800 Subject: [PATCH 10/32] Updated build-win32.bat and win32 template. --- build-win32.bat | 29 ++++++++++++++----- .../msvc/InstallWizardForVC2010Express.js | 2 +- template/msvc/InstallWizardForVS2010.js | 2 +- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/build-win32.bat b/build-win32.bat index ffd7c9f32c..a6a4b6104b 100644 --- a/build-win32.bat +++ b/build-win32.bat @@ -45,15 +45,17 @@ cd ".\Release.win32\" set CC_TEST_BIN=TestCpp.exe -set CC_TEST_RES=..\samples\TestCpp\Resources\*.* -set CC_HELLOWORLD_RES=..\samples\HelloCpp\Resources\*.* -set CC_HELLOLUA_RES=..\samples\HelloLua\Resources\*.* -set CC_TESTJS_RES=..\samples\TestJavascript\Resources\*.* +set CC_TEST_RES=..\samples\TestCpp\Resources +set CC_HELLOWORLD_RES=..\samples\HelloCpp\Resources +set CC_TESTLUA_RES=..\samples\TestLua\Resources +set CC_SIMPLEGAME_RES=..\samples\SimpleGame\Resources +set CC_HELLOLUA_RES=..\samples\HelloLua\Resources +set CC_JSB_SOURCES=..\scripting\javascript\bindings\js +set CC_TESTJS_RES=..\samples\TestJavascript\cocos2d-js-tests\tests +set CC_DRAGONJS_RES=..\samples\TestJavascript\cocos2d-js-tests\games\CocosDragonJS\Published files iOS +set CC_MOONWARRIORS_RES=..\samples\TestJavascript\cocos2d-js-tests\games\MoonWarriors +set CC_WATERMELONWITHME_RES=..\samples\TestJavascript\cocos2d-js-tests\games\WatermelonWithMe -if not exist "%CC_TEST_BIN%" ( - echo Can't find the binary "TestCpp.exe", is there build error? - goto ERROR -) echo./* echo.* Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual Studio User Guide. @@ -62,7 +64,18 @@ echo. xcopy /E /Y /Q "%CC_TEST_RES%" . xcopy /E /Y /Q "%CC_HELLOWORLD_RES%" . xcopy /E /Y /Q "%CC_HELLOLUA_RES%" . +xcopy /E /Y /Q "%CC_TESTLUA_RES%" . +xcopy /E /Y /Q "%CC_SIMPLEGAME_RES%" . +xcopy /E /Y /Q "%CC_JSB_SOURCES%" . xcopy /E /Y /Q "%CC_TESTJS_RES%" . +xcopy /E /Y /Q "%CC_MOONWARRIORS_RES%" . +xcopy /E /Y /Q "%CC_WATERMELONWITHME_RES%" . +xcopy /E /Y /Q "%CC_DRAGONJS_RES%" . + +if not exist "%CC_TEST_BIN%" ( + echo Can't find the binary "TestCpp.exe", is there build error? + goto ERROR +) call "%CC_TEST_BIN%" start http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide diff --git a/template/msvc/InstallWizardForVC2010Express.js b/template/msvc/InstallWizardForVC2010Express.js index 46e4ae18da..65ea45a269 100644 --- a/template/msvc/InstallWizardForVC2010Express.js +++ b/template/msvc/InstallWizardForVC2010Express.js @@ -33,7 +33,7 @@ function main() { // Decode command line arguments var bDebug = false; var bQuiet = false; - var bElevated = false; + var bElevated = true; var Args = WScript.Arguments; for (var i = 0; i < Args.length; i++) { if (Args(i) == "/debug") diff --git a/template/msvc/InstallWizardForVS2010.js b/template/msvc/InstallWizardForVS2010.js index 477b0970c3..b029484c3d 100644 --- a/template/msvc/InstallWizardForVS2010.js +++ b/template/msvc/InstallWizardForVS2010.js @@ -33,7 +33,7 @@ function main() { // Decode command line arguments var bDebug = false; var bQuiet = false; - var bElevated = false; + var bElevated = true; var Args = WScript.Arguments; for (var i = 0; i < Args.length; i++) { if (Args(i) == "/debug") From 77ad17bbd1832f403045faea6ea0827338cc4f2e Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 14:29:05 +0800 Subject: [PATCH 11/32] Removed libExtensions dependence for win32 template. --- template/msvc/CCAppWiz.win32/Scripts/1033/default.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/msvc/CCAppWiz.win32/Scripts/1033/default.js b/template/msvc/CCAppWiz.win32/Scripts/1033/default.js index 7de7505a22..556955d102 100644 --- a/template/msvc/CCAppWiz.win32/Scripts/1033/default.js +++ b/template/msvc/CCAppWiz.win32/Scripts/1033/default.js @@ -287,7 +287,7 @@ function AddConfigurations(proj, strProjectName) { } // Additional Library Directories - var strAddDepends = 'libcocos2d.lib libExtensions.lib opengl32.lib glew32.lib'; + var strAddDepends = 'libcocos2d.lib opengl32.lib glew32.lib'; if (wizard.FindSymbol('CC_USE_BOX2D')) { strAddDepends += ' libBox2d.lib'; } From b961f2a439b6a2e8a5f9d820715eb7a53fc4692c Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 4 Dec 2012 14:44:11 +0800 Subject: [PATCH 12/32] update CHANGELOG --- CHANGELOG | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 6144697cf4..c2b6a5764a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,36 @@ +cocos2d-2.1beta3-x-2.1.0 @Dec.5 2012 + [all platforms] + Bug #1556: set a default texture for CCParticleFire, CCParticleFireworks, etc + Feature #1555: update to cocos2d-iphone v2.1 beta3 + Feature #1564: update tests to cocos2d-iphone v2.1beta3 + Feature #1572: add sample game WatermelonWithMe + Feature #1573: add sample game CocosDragonJS + Refactor #1545: remove the usage of NODE_FUNC and CREATE_FUNC + Refactor #1565: remove VS2008 support + Refactor #1576: update CCBReader to latest version of CocosBuilder + Refactor #1589: add CCBReader::setCCBRootPath() + [iOS] + Bug #1548: update libcurl header files to 7.26.0 on iOS + [android] + Bug #1551: add error handler when reading image data using libjpeg + Refactor #1558: improve the speed of accessing to files from apk + [marmalade] + Bug #1559: fix a bug that if a file in resource directory doesn't exist, it will not search from root directory + Bug #1571: add box2d rope to marmalade project + Bug #1590: JPEG and File fixes for marmalade + Feature #1557: Marmalade support + Refactor #1574: update marmalade languages + Refactor #1575: update samples/TestCpp to compatible with marmalade + Refactor #1578: create cocos2dx-ext marmalade project + Refactor #1591: add TestLua marmalade project + [javascript binding] + Bug #1577: fix a bug that touch events lost on Win32 when using JSBinding + Bug #1586: fix a crash in WatermelonWithMe + Bug #1588: rescheduleCallback support for JSBinding + Refactor #1570: improve the debugger for JSBinding + [lua binding] + Bug #1587: remove lua script handler in CCCallFunc's destructor + cocos2d-2.0-x-2.0.4 @Nov.2 2012 [all platforms] Bug #1473: fix a bug that CCScale9Sprite does not support rotated spriteframe in atlas From ba3a18385657deac7eb9e07512e7e6efd85c2b7f Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 14:46:10 +0800 Subject: [PATCH 13/32] Reverted chipmunk_types.h --- external/chipmunk/include/chipmunk/chipmunk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/chipmunk/include/chipmunk/chipmunk_types.h b/external/chipmunk/include/chipmunk/chipmunk_types.h index 03ef6b5be6..5124d4868f 100644 --- a/external/chipmunk/include/chipmunk/chipmunk_types.h +++ b/external/chipmunk/include/chipmunk/chipmunk_types.h @@ -1,4 +1,4 @@ -//#include +#include #ifdef __APPLE__ #include "TargetConditionals.h" From 98e0123731a31f33d4550f5f781d04cde9411c0b Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 4 Dec 2012 15:54:03 +0800 Subject: [PATCH 14/32] add icons for WatermelonWithMe and CocosDragon --- .../project.pbxproj.REMOVED.git-id | 2 +- .../WatermelonWithMe.xcodeproj/project.pbxproj | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id index c847559a5c..43163e6312 100644 --- a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -fdd8a5d4e5a94b517f86c0f1b7d334adc1eb9c9c \ No newline at end of file +84cd25be53945443ed529554d1a4035b6989d150 \ No newline at end of file diff --git a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj index 0357f04f45..a1d0a81bc8 100644 --- a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj +++ b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj @@ -51,6 +51,10 @@ 15426FE915B5743C00712A7F /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD615B5743C00712A7F /* SimpleAudioEngine.mm */; }; 15426FEA15B5743C00712A7F /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426FD815B5743C00712A7F /* SimpleAudioEngine_objc.m */; }; 15900400166DAD84006BF838 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 159003FF166DAD84006BF838 /* res */; }; + 159004CC166DE338006BF838 /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 159004CB166DE338006BF838 /* Icon-57.png */; }; + 159004CE166DE33E006BF838 /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 159004CD166DE33E006BF838 /* Icon-114.png */; }; + 159004D0166DE346006BF838 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 159004CF166DE346006BF838 /* Icon-72.png */; }; + 159004D2166DE34B006BF838 /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 159004D1166DE34B006BF838 /* Icon-144.png */; }; 15CFE1A61612FD0E00BF2188 /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE18D1612FD0E00BF2188 /* CCControl.cpp */; }; 15CFE1A71612FD0E00BF2188 /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE18F1612FD0E00BF2188 /* CCControlButton.cpp */; }; 15CFE1A81612FD0E00BF2188 /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15CFE1911612FD0E00BF2188 /* CCControlColourPicker.cpp */; }; @@ -243,6 +247,10 @@ 15426FD715B5743C00712A7F /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; }; 15426FD815B5743C00712A7F /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; }; 159003FF166DAD84006BF838 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/res"; sourceTree = ""; }; + 159004CB166DE338006BF838 /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-57.png"; sourceTree = ""; }; + 159004CD166DE33E006BF838 /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; + 159004CF166DE346006BF838 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 159004D1166DE34B006BF838 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; 15CFE18D1612FD0E00BF2188 /* CCControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControl.cpp; sourceTree = ""; }; 15CFE18E1612FD0E00BF2188 /* CCControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControl.h; sourceTree = ""; }; 15CFE18F1612FD0E00BF2188 /* CCControlButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButton.cpp; sourceTree = ""; }; @@ -771,6 +779,10 @@ A92275321517C094001B78AA = { isa = PBXGroup; children = ( + 159004D1166DE34B006BF838 /* Icon-144.png */, + 159004CF166DE346006BF838 /* Icon-72.png */, + 159004CD166DE33E006BF838 /* Icon-114.png */, + 159004CB166DE338006BF838 /* Icon-57.png */, 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */, 15384E3C16119CC30021DC07 /* bindings */, 2628297C15EC7196002C4240 /* chipmunk */, @@ -913,6 +925,10 @@ D446FDA516102D82000ADA7B /* Default@2x.png in Resources */, D446FDA716102D86000ADA7B /* Default-568h@2x.png in Resources */, 15900400166DAD84006BF838 /* res in Resources */, + 159004CC166DE338006BF838 /* Icon-57.png in Resources */, + 159004CE166DE33E006BF838 /* Icon-114.png in Resources */, + 159004D0166DE346006BF838 /* Icon-72.png in Resources */, + 159004D2166DE34B006BF838 /* Icon-144.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; From 96918865828a74637ff17e37183c3ad64b772b8c Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 4 Dec 2012 16:03:27 +0800 Subject: [PATCH 15/32] make TestLua work ok on iOS --- .../TestLua.xcodeproj/project.pbxproj | 60 ------------------- 1 file changed, 60 deletions(-) diff --git a/samples/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj b/samples/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj index 5ed2250c12..1ea67f3c9d 100644 --- a/samples/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj +++ b/samples/TestLua/proj.ios/TestLua.xcodeproj/project.pbxproj @@ -61,13 +61,6 @@ F293BC2115EB838A00256477 /* lvm.c in Sources */ = {isa = PBXBuildFile; fileRef = F293BBE915EB838A00256477 /* lvm.c */; }; F293BC2215EB838A00256477 /* lzio.c in Sources */ = {isa = PBXBuildFile; fileRef = F293BBEB15EB838A00256477 /* lzio.c */; }; F293BC2315EB838A00256477 /* print.c in Sources */ = {isa = PBXBuildFile; fileRef = F293BBED15EB838A00256477 /* print.c */; }; - F293BC2415EB838A00256477 /* Android.mk in Resources */ = {isa = PBXBuildFile; fileRef = F293BBF015EB838A00256477 /* Android.mk */; }; - F293BC2515EB838A00256477 /* .cproject in Resources */ = {isa = PBXBuildFile; fileRef = F293BBF215EB838A00256477 /* .cproject */; }; - F293BC2615EB838A00256477 /* .project in Resources */ = {isa = PBXBuildFile; fileRef = F293BBF315EB838A00256477 /* .project */; }; - F293BC2715EB838A00256477 /* liblua.vcproj in Resources */ = {isa = PBXBuildFile; fileRef = F293BBF515EB838A00256477 /* liblua.vcproj */; }; - F293BC2815EB838A00256477 /* liblua.vcxproj in Resources */ = {isa = PBXBuildFile; fileRef = F293BBF615EB838A00256477 /* liblua.vcxproj */; }; - F293BC2915EB838A00256477 /* liblua.vcxproj.filters in Resources */ = {isa = PBXBuildFile; fileRef = F293BBF715EB838A00256477 /* liblua.vcxproj.filters */; }; - F293BC2A15EB838A00256477 /* liblua.vcxproj.user in Resources */ = {isa = PBXBuildFile; fileRef = F293BBF815EB838A00256477 /* liblua.vcxproj.user */; }; F293BC2B15EB838A00256477 /* tolua_event.c in Sources */ = {isa = PBXBuildFile; fileRef = F293BBFB15EB838A00256477 /* tolua_event.c */; }; F293BC2C15EB838A00256477 /* tolua_is.c in Sources */ = {isa = PBXBuildFile; fileRef = F293BBFD15EB838A00256477 /* tolua_is.c */; }; F293BC2D15EB838A00256477 /* tolua_map.c in Sources */ = {isa = PBXBuildFile; fileRef = F293BBFE15EB838A00256477 /* tolua_map.c */; }; @@ -215,13 +208,6 @@ F293BBEB15EB838A00256477 /* lzio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lzio.c; sourceTree = ""; }; F293BBEC15EB838A00256477 /* lzio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lzio.h; sourceTree = ""; }; F293BBED15EB838A00256477 /* print.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = print.c; sourceTree = ""; }; - F293BBF015EB838A00256477 /* Android.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.mk; sourceTree = ""; }; - F293BBF215EB838A00256477 /* .cproject */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .cproject; sourceTree = ""; }; - F293BBF315EB838A00256477 /* .project */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = .project; sourceTree = ""; }; - F293BBF515EB838A00256477 /* liblua.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = liblua.vcproj; sourceTree = ""; }; - F293BBF615EB838A00256477 /* liblua.vcxproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = liblua.vcxproj; sourceTree = ""; }; - F293BBF715EB838A00256477 /* liblua.vcxproj.filters */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = liblua.vcxproj.filters; sourceTree = ""; }; - F293BBF815EB838A00256477 /* liblua.vcxproj.user */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = liblua.vcxproj.user; sourceTree = ""; }; F293BBFA15EB838A00256477 /* tolua++.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "tolua++.h"; sourceTree = ""; }; F293BBFB15EB838A00256477 /* tolua_event.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tolua_event.c; sourceTree = ""; }; F293BBFC15EB838A00256477 /* tolua_event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tolua_event.h; sourceTree = ""; }; @@ -364,9 +350,6 @@ children = ( F293BBAE15EB838A00256477 /* cocos2dx_support */, F293BBB715EB838A00256477 /* lua */, - F293BBEE15EB838A00256477 /* proj.android */, - F293BBF115EB838A00256477 /* proj.blackberry */, - F293BBF415EB838A00256477 /* proj.win32 */, F293BBF915EB838A00256477 /* tolua */, ); name = lua; @@ -449,42 +432,6 @@ path = lua; sourceTree = ""; }; - F293BBEE15EB838A00256477 /* proj.android */ = { - isa = PBXGroup; - children = ( - F293BBEF15EB838A00256477 /* jni */, - ); - path = proj.android; - sourceTree = ""; - }; - F293BBEF15EB838A00256477 /* jni */ = { - isa = PBXGroup; - children = ( - F293BBF015EB838A00256477 /* Android.mk */, - ); - path = jni; - sourceTree = ""; - }; - F293BBF115EB838A00256477 /* proj.blackberry */ = { - isa = PBXGroup; - children = ( - F293BBF215EB838A00256477 /* .cproject */, - F293BBF315EB838A00256477 /* .project */, - ); - path = proj.blackberry; - sourceTree = ""; - }; - F293BBF415EB838A00256477 /* proj.win32 */ = { - isa = PBXGroup; - children = ( - F293BBF515EB838A00256477 /* liblua.vcproj */, - F293BBF615EB838A00256477 /* liblua.vcxproj */, - F293BBF715EB838A00256477 /* liblua.vcxproj.filters */, - F293BBF815EB838A00256477 /* liblua.vcxproj.user */, - ); - path = proj.win32; - sourceTree = ""; - }; F293BBF915EB838A00256477 /* tolua */ = { isa = PBXGroup; children = ( @@ -678,13 +625,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - F293BC2415EB838A00256477 /* Android.mk in Resources */, - F293BC2515EB838A00256477 /* .cproject in Resources */, - F293BC2615EB838A00256477 /* .project in Resources */, - F293BC2715EB838A00256477 /* liblua.vcproj in Resources */, - F293BC2815EB838A00256477 /* liblua.vcxproj in Resources */, - F293BC2915EB838A00256477 /* liblua.vcxproj.filters in Resources */, - F293BC2A15EB838A00256477 /* liblua.vcxproj.user in Resources */, F2A1553E15EB91DE00C9B0B6 /* Collision in Resources */, F2A1553F15EB91DE00C9B0B6 /* Common in Resources */, F2A1554015EB91DE00C9B0B6 /* Dynamics in Resources */, From cedd58bb77a374b3485906a42954794361733ac5 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 16:40:55 +0800 Subject: [PATCH 16/32] #extension GL_OES_standard_derivatives : enable only valid in GL_ES, this fixes crashes on some Linux machines. --- cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h b/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h index 80470e273c..ab908d6eb9 100644 --- a/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h +++ b/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h @@ -20,9 +20,9 @@ */ " \n\ +#ifdef GL_ES \n\ #extension GL_OES_standard_derivatives : enable \n\ \n\ -#ifdef GL_ES \n\ varying mediump vec4 v_color; \n\ varying mediump vec2 v_texcoord; \n\ #else \n\ From 6aa15e063649cbca2ff0fa572c9c48ddb65e146c Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 16:43:47 +0800 Subject: [PATCH 17/32] Added -DCOCOS2D_DEBUG=1 for linux if building in debug mode. --- cocos2dx/proj.linux/Makefile | 2 +- samples/HelloCpp/proj.linux/Makefile | 2 +- samples/TestCpp/proj.linux/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos2dx/proj.linux/Makefile b/cocos2dx/proj.linux/Makefile index 14b2ca16a6..478b067126 100644 --- a/cocos2dx/proj.linux/Makefile +++ b/cocos2dx/proj.linux/Makefile @@ -174,7 +174,7 @@ SHAREDLIBS += -L../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/ debug: CCFLAGS += -g3 -O0 debug: CXXFLAGS += -g3 -O0 -debug: DEFINES += -DDEBUG -DCC_ENABLE_CHIPMUNK_INTEGRATION +debug: DEFINES += -DDEBUG -DCC_ENABLE_CHIPMUNK_INTEGRATION -DCOCOS2D_DEBUG=1 debug: $(TARGET) release: CCFLAGS += -O3 diff --git a/samples/HelloCpp/proj.linux/Makefile b/samples/HelloCpp/proj.linux/Makefile index 075553a949..30ff3e47d8 100644 --- a/samples/HelloCpp/proj.linux/Makefile +++ b/samples/HelloCpp/proj.linux/Makefile @@ -67,7 +67,7 @@ debug: CCFLAGS += -g3 -O0 debug: CXXFLAGS += -g3 -O0 debug: SHAREDLIBS += -L../../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion debug: SHAREDLIBS += -Wl,-rpath,../../../../../lib/linux/Debug/ -debug: DEFINES += -DDEBUG +debug: DEFINES += -DDEBUG -DCOCOS2D_DEBUG=1 debug: $(TARGET) release: BIN_DIR = $(BIN_DIR_ROOT)/release diff --git a/samples/TestCpp/proj.linux/Makefile b/samples/TestCpp/proj.linux/Makefile index 502bf4630d..4e09433cef 100644 --- a/samples/TestCpp/proj.linux/Makefile +++ b/samples/TestCpp/proj.linux/Makefile @@ -172,7 +172,7 @@ BIN_DIR = BIN_DIR_ROOT debug: SHAREDLIBS += -L../../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../../../../lib/linux/Debug debug: CCFLAGS += -g3 -O0 debug: CXXFLAGS += -g3 -O0 -debug: DEFINES += -DDEBUG -DCC_ENABLE_CHIPMUNK_INTEGRATION +debug: DEFINES += -DDEBUG -DCC_ENABLE_CHIPMUNK_INTEGRATION -DCOCOS2D_DEBUG=1 debug: BIN_DIR = $(BIN_DIR_ROOT)/debug debug: $(TARGET) From 8a8038b3425ff8b73212fdfcd41611e3d8878393 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 16:44:33 +0800 Subject: [PATCH 18/32] Enable stencil buffer for linux. --- cocos2dx/platform/linux/CCEGLView.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cocos2dx/platform/linux/CCEGLView.cpp b/cocos2dx/platform/linux/CCEGLView.cpp index 6cabdcb5ac..75ca2e83cd 100644 --- a/cocos2dx/platform/linux/CCEGLView.cpp +++ b/cocos2dx/platform/linux/CCEGLView.cpp @@ -181,7 +181,7 @@ void CCEGLView::setFrameSize(float width, float height) case 16: { /* Updates video mode */ - eResult = (glfwOpenWindow(width, height, 5, 6, 5, 0, 16, 0, (int)u32GLFWFlags) != false) ? true : false; + eResult = (glfwOpenWindow(width, height, 5, 6, 5, 0, 16, 8, (int)u32GLFWFlags) != false) ? true : false; break; } @@ -190,7 +190,7 @@ void CCEGLView::setFrameSize(float width, float height) case 24: { /* Updates video mode */ - eResult = (glfwOpenWindow(width, height, 8, 8, 8, 0, 16, 0, (int)u32GLFWFlags) != false) ? true : false; + eResult = (glfwOpenWindow(width, height, 8, 8, 8, 0, 16, 8, (int)u32GLFWFlags) != false) ? true : false; break; } @@ -200,7 +200,7 @@ void CCEGLView::setFrameSize(float width, float height) case 32: { /* Updates video mode */ - eResult = (glfwOpenWindow(width, height, 8, 8, 8, 8, 16, 0, (int)u32GLFWFlags) != GL_FALSE) ? true :false; + eResult = (glfwOpenWindow(width, height, 8, 8, 8, 8, 16, 8, (int)u32GLFWFlags) != GL_FALSE) ? true :false; break; } } @@ -320,6 +320,10 @@ bool CCEGLView::initGL() { CCLog("OpenGL 2.0 not supported\n"); } + + // Enable point size by default on linux. + glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); + return true; } From 3e88f8d2e44934d9ea329ca71dca8084473117f0 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 16:45:37 +0800 Subject: [PATCH 19/32] fix compilation errors in eclipse project for linux. --- cocos2dx/proj.linux/.cproject | 13 +++++++------ cocos2dx/proj.linux/.project | 10 +++++----- samples/TestCpp/proj.linux/.cproject | 3 +++ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/cocos2dx/proj.linux/.cproject b/cocos2dx/proj.linux/.cproject index 15fc52aa60..9e0dbc0a23 100755 --- a/cocos2dx/proj.linux/.cproject +++ b/cocos2dx/proj.linux/.cproject @@ -86,13 +86,12 @@ - @@ -106,10 +105,11 @@ - + + @@ -217,12 +217,11 @@ - @@ -236,10 +235,11 @@ - + + @@ -251,6 +251,7 @@ + diff --git a/cocos2dx/proj.linux/.project b/cocos2dx/proj.linux/.project index 52dac3939c..ea9f34c306 100755 --- a/cocos2dx/proj.linux/.project +++ b/cocos2dx/proj.linux/.project @@ -101,11 +101,6 @@ 1 PARENT-1-PROJECT_LOC/CCDirector.cpp - - CCDrawingPrimitives.cpp - 1 - PARENT-1-PROJECT_LOC/CCDrawingPrimitives.cpp - CCScheduler.cpp 1 @@ -131,6 +126,11 @@ 1 PARENT-1-PROJECT_LOC/cocos2d.cpp + + draw_nodes + 2 + PARENT-1-PROJECT_LOC/draw_nodes + effects 2 diff --git a/samples/TestCpp/proj.linux/.cproject b/samples/TestCpp/proj.linux/.cproject index d05b0d5421..efbaa902d0 100755 --- a/samples/TestCpp/proj.linux/.cproject +++ b/samples/TestCpp/proj.linux/.cproject @@ -45,6 +45,7 @@ @@ -66,6 +67,7 @@ + From afec056ab307eb1189574090943e0d4a1cafcac7 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 4 Dec 2012 16:50:14 +0800 Subject: [PATCH 20/32] update version in doxygen configuration --- document/doxygen.config | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/document/doxygen.config b/document/doxygen.config index af4736f0e6..5adc36c084 100644 --- a/document/doxygen.config +++ b/document/doxygen.config @@ -32,7 +32,7 @@ PROJECT_NAME = cocos2d-x # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 2.0.3 +PROJECT_NUMBER = 2.1.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer @@ -676,12 +676,11 @@ WARN_LOGFILE = # with spaces. INPUT = ../cocos2dx \ - ../cocos2dx/platform \ - ../CocosDenshion/include \ + ../cocos2dx/platform \ + ../CocosDenshion/include \ ../document \ ../extensions \ - ../scripting/lua/cocos2dx_support \ - + ../scripting/lua/cocos2dx_support # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is From 34eb3a88c20ac9f7a7dd6023abc0dea00b9d9b02 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 17:23:08 +0800 Subject: [PATCH 21/32] Commented JS_SetGCZeal. --- scripting/javascript/bindings/ScriptingCore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/javascript/bindings/ScriptingCore.cpp b/scripting/javascript/bindings/ScriptingCore.cpp index aba9cb6cff..dd30b55ef5 100644 --- a/scripting/javascript/bindings/ScriptingCore.cpp +++ b/scripting/javascript/bindings/ScriptingCore.cpp @@ -412,7 +412,7 @@ void ScriptingCore::createGlobalContext() { JS_SetOptions(this->cx_, JS_GetOptions(this->cx_) & ~JSOPTION_METHODJIT_ALWAYS); JS_SetErrorReporter(this->cx_, ScriptingCore::reportError); #if defined(JS_GC_ZEAL) && defined(DEBUG) - JS_SetGCZeal(this->cx_, 2, JS_DEFAULT_ZEAL_FREQ); + //JS_SetGCZeal(this->cx_, 2, JS_DEFAULT_ZEAL_FREQ); #endif this->global_ = NewGlobalObject(cx_); for (std::vector::iterator it = registrationList.begin(); it != registrationList.end(); it++) { From cb2427e780db60e64a1cc8c4010a883544f3e71f Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 4 Dec 2012 17:25:40 +0800 Subject: [PATCH 22/32] do some modification --- cocos2dx/include/ccConfig.h | 2 +- .../project.pbxproj.REMOVED.git-id | 2 +- .../proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cocos2dx/include/ccConfig.h b/cocos2dx/include/ccConfig.h index af8b942fc7..b558a50003 100644 --- a/cocos2dx/include/ccConfig.h +++ b/cocos2dx/include/ccConfig.h @@ -107,7 +107,7 @@ To enabled set it to 1. Disabled by default. Default value: 0.1f */ #ifndef CC_DIRECTOR_STATS_INTERVAL -#define CC_DIRECTOR_STATS_INTERVAL (0.1f) +#define CC_DIRECTOR_STATS_INTERVAL (0.5f) #endif /** @def CC_DIRECTOR_FPS_POSITION diff --git a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id index 43163e6312..ba52908f2e 100644 --- a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -84cd25be53945443ed529554d1a4035b6989d150 \ No newline at end of file +4377122f5035f20d5266fff054f52039c3eb59f4 \ No newline at end of file diff --git a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj index a1d0a81bc8..f2b22bf807 100644 --- a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj +++ b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj @@ -603,6 +603,10 @@ 15628F5B15F0F5C2000CF24B /* Resources */ = { isa = PBXGroup; children = ( + 159004D1166DE34B006BF838 /* Icon-144.png */, + 159004CF166DE346006BF838 /* Icon-72.png */, + 159004CD166DE33E006BF838 /* Icon-114.png */, + 159004CB166DE338006BF838 /* Icon-57.png */, 159003FF166DAD84006BF838 /* res */, 1A995C5E166B3F52001C34E9 /* boot-jsb.js */, 1A995C5F166B3F52001C34E9 /* main.js */, @@ -779,10 +783,6 @@ A92275321517C094001B78AA = { isa = PBXGroup; children = ( - 159004D1166DE34B006BF838 /* Icon-144.png */, - 159004CF166DE346006BF838 /* Icon-72.png */, - 159004CD166DE33E006BF838 /* Icon-114.png */, - 159004CB166DE338006BF838 /* Icon-57.png */, 15426AE915B5733200712A7F /* cocos2dx.xcodeproj */, 15384E3C16119CC30021DC07 /* bindings */, 2628297C15EC7196002C4240 /* chipmunk */, From 060698e195c5779f10b7a115d4f3a8f9cfef72a9 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 17:38:15 +0800 Subject: [PATCH 23/32] fixed missing main.js for CocosDragonJS. --- .../CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id index ba52908f2e..4f0122bc2b 100644 --- a/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -4377122f5035f20d5266fff054f52039c3eb59f4 \ No newline at end of file +c445ba0cb7d4f6fdba3cce049e727fc39bd9b44e \ No newline at end of file From eed78507bf89ce4ceb8745857864746364fc3e2a Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 17:46:51 +0800 Subject: [PATCH 24/32] fixed missing level.js for WatermelonWithMe. --- .../proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj index f2b22bf807..37ceb8a910 100644 --- a/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj +++ b/samples/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj @@ -78,6 +78,7 @@ 1A995D38166B40C5001C34E9 /* jsb_constants_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C56166B3F24001C34E9 /* jsb_constants_cocos2d.js */; }; 1A995D39166B40C5001C34E9 /* jsb_constants_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C57166B3F24001C34E9 /* jsb_constants_cocosbuilder.js */; }; 1A995D3A166B40C5001C34E9 /* jsb_constants_gl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A995C58166B3F24001C34E9 /* jsb_constants_gl.js */; }; + 1AAD8928166DFD980028BAAB /* levels.js in Resources */ = {isa = PBXBuildFile; fileRef = 1AAD8926166DFD820028BAAB /* levels.js */; }; 262829DB15EC7196002C4240 /* chipmunk.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829AC15EC7196002C4240 /* chipmunk.c */; }; 262829DD15EC7196002C4240 /* cpConstraint.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829AF15EC7196002C4240 /* cpConstraint.c */; }; 262829DE15EC7196002C4240 /* cpDampedRotarySpring.c in Sources */ = {isa = PBXBuildFile; fileRef = 262829B015EC7196002C4240 /* cpDampedRotarySpring.c */; }; @@ -289,6 +290,7 @@ 1A995C5F166B3F52001C34E9 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/main.js"; sourceTree = ""; }; 1A995CC8166B3F52001C34E9 /* resources-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "resources-jsb.js"; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/resources-jsb.js"; sourceTree = ""; }; 1A995CC9166B3F52001C34E9 /* watermelon_with_me.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = watermelon_with_me.js; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/watermelon_with_me.js"; sourceTree = ""; }; + 1AAD8926166DFD820028BAAB /* levels.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = levels.js; path = "../../TestJavascript/cocos2d-js-tests/games/WatermelonWithMe/levels.js"; sourceTree = ""; }; 2628298215EC7196002C4240 /* chipmunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk.h; sourceTree = ""; }; 2628298315EC7196002C4240 /* chipmunk_ffi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_ffi.h; sourceTree = ""; }; 2628298415EC7196002C4240 /* chipmunk_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = chipmunk_private.h; sourceTree = ""; }; @@ -603,6 +605,7 @@ 15628F5B15F0F5C2000CF24B /* Resources */ = { isa = PBXGroup; children = ( + 1AAD8926166DFD820028BAAB /* levels.js */, 159004D1166DE34B006BF838 /* Icon-144.png */, 159004CF166DE346006BF838 /* Icon-72.png */, 159004CD166DE33E006BF838 /* Icon-114.png */, @@ -912,6 +915,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 1AAD8928166DFD980028BAAB /* levels.js in Resources */, 1A995D32166B40C5001C34E9 /* boot-jsb.js in Resources */, 1A995D33166B40C5001C34E9 /* main.js in Resources */, 1A995D34166B40C5001C34E9 /* resources-jsb.js in Resources */, From 58a187f774760b39134e92d638523b5b5e0328ef Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 4 Dec 2012 18:44:32 +0800 Subject: [PATCH 25/32] do some bug fixes --- extensions/CCBReader/CCBReader.cpp | 66 ++++++++----------- samples/CocosDragonJS/Classes/AppDelegate.cpp | 26 ++++++-- samples/MoonWarriors/Classes/AppDelegate.cpp | 1 + 3 files changed, 50 insertions(+), 43 deletions(-) diff --git a/extensions/CCBReader/CCBReader.cpp b/extensions/CCBReader/CCBReader.cpp index 8cb0211fc6..5586b32225 100644 --- a/extensions/CCBReader/CCBReader.cpp +++ b/extensions/CCBReader/CCBReader.cpp @@ -134,9 +134,9 @@ CCBReader::~CCBReader() { this->mCCNodeLoaderLibrary->release(); - mOwnerOutletNodes->release(); - mOwnerOutletNames.clear(); - mOwnerCallbackNodes->release(); + mOwnerOutletNodes->release(); + mOwnerOutletNames.clear(); + mOwnerCallbackNodes->release(); mOwnerCallbackNames.clear(); // Clear string cache. @@ -292,13 +292,13 @@ CCNode* CCBReader::readNodeGraphFromData(CCData *pData, CCObject *pOwner, const CCDICT_FOREACH(animationManagers, pElement) { CCNode* pNode = (CCNode*)pElement->getIntKey(); - CCBAnimationManager* manager = (CCBAnimationManager*)animationManagers->objectForKey((intptr_t)pNode); - pNode->setUserObject(manager); - - if (jsControlled) - { - mNodesWithAnimationManagers->addObject(pNode); - mAnimationManagersForNodes->addObject(manager); + CCBAnimationManager* manager = (CCBAnimationManager*)animationManagers->objectForKey((intptr_t)pNode); + pNode->setUserObject(manager); + + if (jsControlled) + { + mNodesWithAnimationManagers->addObject(pNode); + mAnimationManagersForNodes->addObject(manager); } } @@ -414,24 +414,24 @@ bool CCBReader::readBool() { return 0 == this->readByte() ? false : true; } -std::string CCBReader::readUTF8() -{ - std::string ret; - - int b0 = this->readByte(); - int b1 = this->readByte(); - - int numBytes = b0 << 8 | b1; - - char* pStr = (char*)malloc(numBytes+1); - memcpy(pStr, mBytes+mCurrentByte, numBytes); - pStr[numBytes] = '\0'; - ret = pStr; - free(pStr); - - mCurrentByte += numBytes; - - return ret; +std::string CCBReader::readUTF8() +{ + std::string ret; + + int b0 = this->readByte(); + int b1 = this->readByte(); + + int numBytes = b0 << 8 | b1; + + char* pStr = (char*)malloc(numBytes+1); + memcpy(pStr, mBytes+mCurrentByte, numBytes); + pStr[numBytes] = '\0'; + ret = pStr; + free(pStr); + + mCurrentByte += numBytes; + + return ret; } bool CCBReader::getBit() { @@ -908,15 +908,7 @@ CCArray* CCBReader::getAnimationManagersForNodes() { float CCBReader::getResolutionScale() { - // Init resolution scale - if (CCApplication::sharedApplication()->getTargetPlatform() == kTargetIpad) - { - return 2; - } - else - { - return 1; - } + return 1; } NS_CC_EXT_END; diff --git a/samples/CocosDragonJS/Classes/AppDelegate.cpp b/samples/CocosDragonJS/Classes/AppDelegate.cpp index 45305b9db6..5f35c9fabb 100644 --- a/samples/CocosDragonJS/Classes/AppDelegate.cpp +++ b/samples/CocosDragonJS/Classes/AppDelegate.cpp @@ -25,18 +25,32 @@ bool AppDelegate::applicationDidFinishLaunching() // initialize director CCDirector *pDirector = CCDirector::sharedDirector(); pDirector->setOpenGLView(CCEGLView::sharedOpenGLView()); + pDirector->setProjection(kCCDirectorProjection2D); CCSize screenSize = CCEGLView::sharedOpenGLView()->getFrameSize(); CCSize designSize = CCSizeMake(320, 480); + CCSize resourceSize = CCSizeMake(320, 480); -// if (screenSize.height > 320) -// { -// CCSize resourceSize = CCSizeMake(640, 960); -// CCFileUtils::sharedFileUtils()->setResourceDirectory("hd"); -// pDirector->setContentScaleFactor(resourceSize.height/designSize.height); -// } + if (screenSize.height > 768) + { + resourceSize = CCSizeMake(1536, 2048); + CCFileUtils::sharedFileUtils()->setResourceDirectory("resources-ipadhd"); + } + else if (screenSize.height > 640) + { + resourceSize = CCSizeMake(768, 1536); + CCFileUtils::sharedFileUtils()->setResourceDirectory("resources-ipad"); + } + else if (screenSize.height > 320) + { + resourceSize = CCSizeMake(640, 960); + CCFileUtils::sharedFileUtils()->setResourceDirectory("resources-iphonehd"); + + } + + pDirector->setContentScaleFactor(resourceSize.height/designSize.height); CCEGLView::sharedOpenGLView()->setDesignResolutionSize(designSize.width, designSize.height, kResolutionNoBorder); diff --git a/samples/MoonWarriors/Classes/AppDelegate.cpp b/samples/MoonWarriors/Classes/AppDelegate.cpp index 79094b721f..7b6f3bd978 100644 --- a/samples/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/MoonWarriors/Classes/AppDelegate.cpp @@ -24,6 +24,7 @@ bool AppDelegate::applicationDidFinishLaunching() // initialize director CCDirector *pDirector = CCDirector::sharedDirector(); pDirector->setOpenGLView(CCEGLView::sharedOpenGLView()); + pDirector->setProjection(kCCDirectorProjection2D); // Set the design resolution CCEGLView::sharedOpenGLView()->setDesignResolutionSize(320, 480, kResolutionShowAll); From d02cb3f3208f1daf6783f29ef066924c23ed45ab Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 20:07:23 +0800 Subject: [PATCH 26/32] Updated samples/MoonWarriors/proj.android/build_native.sh. Because the boot file has been changed from MoonWarriors-native.js to MoonWarriors-jsb.js. --- samples/MoonWarriors/proj.android/build_native.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/MoonWarriors/proj.android/build_native.sh b/samples/MoonWarriors/proj.android/build_native.sh index 6092ef8f76..d4f13d9fae 100755 --- a/samples/MoonWarriors/proj.android/build_native.sh +++ b/samples/MoonWarriors/proj.android/build_native.sh @@ -73,7 +73,7 @@ cp -rf "$RESROUCE_ROOT" "$APP_ANDROID_ROOT"/assets # copy MoonWarriors js cp -rf "$RESROUCE_ROOT"/../src "$APP_ANDROID_ROOT"/assets # copy MoonWarriors-native.js -cp "$RESROUCE_ROOT"/../MoonWarriors-native.js "$APP_ANDROID_ROOT"/assets +cp "$RESROUCE_ROOT"/../*.js "$APP_ANDROID_ROOT"/assets # copy bindings/*.js into assets' root cp -f "$BINDINGS_JS_ROOT"/*.js "$APP_ANDROID_ROOT"/assets From bd471b7ee94d6dabfd7079cc60db4f8b25082490 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Dec 2012 21:54:19 +0800 Subject: [PATCH 27/32] [Marmalade fix] Added development.icf for HelloCpp. Added Marker Felt.ttf for SampleGame. --- samples/HelloCpp/Resources/development.icf | 107 +++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 samples/HelloCpp/Resources/development.icf diff --git a/samples/HelloCpp/Resources/development.icf b/samples/HelloCpp/Resources/development.icf new file mode 100644 index 0000000000..97a05645d0 --- /dev/null +++ b/samples/HelloCpp/Resources/development.icf @@ -0,0 +1,107 @@ +# Settings ICF file automatically generated by S3E development environment + +AccelEnabled = Type=bool, Default="true", Value = "true" +AudioAAC = Type=bool, Default="false", Value = "false" +AudioAACPlus = Type=bool, Default="false", Value = "false" +AudioMIDI = Type=bool, Default="true", Value = "true" +AudioMP3 = Type=bool, Default="true", Value = "true" +AudioPCM = Type=bool, Default="true", Value = "true" +AudioQCP = Type=bool, Default="false", Value = "false" +AudioVolumeDefault = Type=int, Min=0.000000, Max=256.000000, Default="256", Value = "256" +BacklightTimeout = Type=int, Min=0.000000, Max=120000.000000, Default="10000", Value = "10000" +CompassEnabled = Type=bool, Default="true", Value = "true" +ContactsFromAddrBook = Type=bool, Default="false", Value = "false" +DeviceAdvanceSoftkeyPosition = Type=string, Allowed="Bottom Left" "Bottom Right" "Top Right" "Top Left", Default="Bottom Left", Value = "Bottom Left" +DeviceArch = Type=string, Allowed="" "ARM4T" "ARM4" "ARM5T" "ARM5TE" "ARM5TEJ" "ARM6" "ARM6K" "ARM6T2" "ARM6Z" "X86" "PPC" "AMD64" "ARM7", Default="", Value = "" +DeviceBackSoftkeyPosition = Type=string, Allowed="Bottom Left" "Bottom Right" "Top Right" "Top Left", Default="Bottom Right", Value = "Bottom Right" +DeviceBatteryLevel = Type=int, Min=0.000000, Max=100.000000, Default="50", Value = "50" +DeviceClass = Type=string, Allowed="UNKNOWN" "SYMBIAN_GENERIC" "SYMBIAN_SERIES60" "SYMBIAN_SERIES60_EMULATOR" "SYMBIAN_UIQ" "SYMBIAN_UIQ_EMULATOR" "BREW_GENERIC" "BREW_QCIF_3D" "BREW_QCIF_25G" "BREW_SQCIF_256" "BREW_QVGA_3G" "WINDOWS_GENERIC" "WINMOBILE_GENERIC" "WINMOBILE_SP" "WINMOBILE_PPC" "LINUX_GENERIC" "LINUX_DESKTOP" "LINUX_EMBED" "WIPI_GENERIC" "NDS_GENERIC" "ARM_SEMIH_GENERIC" "NULCUES_GENERIC" "NGI_GENERIC", Default="WINDOWS_GENERIC", Value = "WINDOWS_GENERIC" +DeviceFPU = Type=string, Allowed="None" "VFP Present", Default="VFP Present", Value = "VFP Present" +DeviceFreeRAM = Type=int, Min=0.000000, Max=2097151.000000, Default="1048576", Value = "1048576" +DeviceIDInt = Type=int, Default="0", Value = "0" +DeviceIDString = Type=string, Default="", Value = "" +DeviceIMSI = Type=string, Default="SIMULATOR_IMSI", Value = "SIMULATOR_IMSI" +DeviceLSKIsBack = Type=bool, Default="false", Value = "false" +DeviceLanguage = Type=string, Allowed="UNKNOWN" "ENGLISH" "FRENCH" "GERMAN" "SPANISH" "ITALIAN" "PORTUGUESE" "DUTCH" "TURKISH" "CROATIAN" "CZECH" "DANISH" "FINNISH" "HUNGARIAN" "NORWEGIAN" "POLISH" "RUSSIAN" "SERBIAN" "SLOVAK" "SLOVENIAN" "SWEDISH" "UKRAINIAN" "GREEK" "JAPANESE" "SIMPL_CHINESE" "TRAD_CHINESE" "KOREAN" "ICELANDIC" "FLEMISH" "THAI" "AFRIKAANS" "ALBANIAN" "AMHARIC" "ARABIC" "ARMENIAN" "AZERBAIJANI" "TAGALOG" "BELARUSSIAN" "BENGALI" "BULGARIAN" "BURMESE" "CATALAN" "ESTONIAN" "FARSI" "GAELIC" "GEORGIAN" "GUJARATI" "HEBREW" "HINDI" "INDONESIAN" "IRISH" "KANNADA" "KAZAKH" "KHMER" "LAO" "LATVIAN" "LITHUANIAN" "MACEDONIAN" "MALAY" "MALAYALAM" "MARATHI" "MOLDOVIAN" "MONGOLIAN" "PUNJABI" "ROMANIAN" "SINHALESE" "SOMALI" "SWAHILI" "TAJIK" "TAMIL" "TELUGU" "TIBETAN" "TIGRINYA" "TURKMEN" "URDU" "UZBEK" "VIETNAMESE" "WELSH" "ZULU" "", Default="", Value = "" +DeviceMainsPower = Type=bool, Default="false", Value = "false" +DeviceName = Type=string, Default="My Computer", Value = "My Computer" +DeviceOS = Type=string, Allowed="NONE" "SYMBIAN" "BREW" "WINDOWS" "WINMOBILE" "LINUX" "WIPI" "NDS" "ARM_SEMIH" "NUCLEUS" "NGI" "WINCE" "SHARPEMP" "OSX" "IPHONE" "UIQ" "PS3" "X360" "BADA" "ANDROID" "WEBOS" "QNX", Default="NONE", Value = "NONE" +DeviceOSVersion = Type=string, Default="", Value = "" +DeviceOSVersionNumber = Type=int, Default="0", Value = "0" +DevicePhoneNumber = Type=string, Default="0044123456789", Value = "0044123456789" +DeviceTimezone = Type=string, Default="SYSTEM", Value = "SYSTEM" +DeviceTotalRAM = Type=int, Min=0.000000, Max=2097151.000000, Default="1048576", Value = "1048576" +DeviceUniqueID = Type=string, Default="SIMULATOR_ID", Value = "SIMULATOR_ID" +DeviceUniqueIDInt = Type=int, Default="01234567890", Value = "01234567890" +FileTotalStorageSize = Type=int, Min=0.000000, Max=2147483648.000000, Default="67108864", Value = "67108864" +FileUseSeparateRomRam = Type=bool, Default="true", Value = "true" +FileUseTotalStorageSize = Type=bool, Default="false", Value = "false" +GLAPI = Type=string, Allowed="None" "GLES 1.0 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.1 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.0 Common Profile from Imagination POWERVR(TM)" "GLES 1.1 Common Profile from Imagination POWERVR(TM)" "GLES 2.0 from Imagination POWERVR(TM)" "Obey [S3E] SysGlesVersion .icf setting" "GLES 1.1 Common Profile from Qualcomm Snapdragon(TM)" "GLES 2.0 from Qualcomm Snapdragon(TM)" "GLES 2.0 ANGLE", Default="Obey [S3E] SysGlesVersion .icf setting", Value = "Obey [S3E] SysGlesVersion .icf setting" +GLDontUseHiddenWindow = Type=bool, Default="false", Value = "false" +GLTerminateOnSuspend = Type=bool, Default="false", Value = "false" +GLUsePVRVFrame = Type=bool, Default="false", Value = "false" +KeyboardHasAlpha = Type=bool, Default="true", Value = "true" +KeyboardHasDirection = Type=bool, Default="true", Value = "true" +KeyboardHasKeypad = Type=bool, Default="true", Value = "true" +KeyboardNumpadRotation = Type=string, Allowed="Rot0" "Rot90" "Rot180" "Rot270", Default="Rot0", Value = "Rot0" +LicenseExpiryDate = Type=int, Min=0.000000, Max=999999995904.000000, Default="0", Value = "0" +LicenseMinutesRemaining = Type=int, Min=0.000000, Max=10000000.000000, Default="0", Value = "0" +LicenseStatus = Type=string, Allowed="EXPIRED" "DEMO" "USECOUNT" "EXPIRYDATE" "EXPIRYMINSUSE" "PURCHASE" "SUBSCRIPTION" "UPGRADE" "NONCOMMERCIAL", Default="NONCOMMERCIAL", Value = "NONCOMMERCIAL" +LicenseUsesRemaining = Type=int, Min=0.000000, Max=10000000.000000, Default="0", Value = "0" +LocationAltitude = Type=float, Min=-2000.000000, Max=100000.000000, Default="60.0", Value = "60.0" +LocationAvailable = Type=bool, Default="true", Value = "true" +LocationHeading = Type=float, Min=0.000000, Max=359.000000, Default="0.0", Value = "0.0" +LocationHorizontalAccuracy = Type=float, Min=0.000000, Max=100000.000000, Default="20.0", Value = "20.0" +LocationLatitude = Type=float, Min=-90.000000, Max=90.000000, Default="51.511791", Value = "51.511791" +LocationLongitude = Type=float, Min=-180.000000, Max=180.000000, Default="-0.191084", Value = "-0.191084" +LocationSpeed = Type=float, Min=0.000000, Max=10000.000000, Default="0", Value = "0" +LocationVerticalAccuracy = Type=float, Min=0.000000, Max=100000.000000, Default="100.0", Value = "100.0" +MacOSSimulatorCustomSettings = Type=string, Default="", Value = "" +MacOSSimulatorDevices_ANDROID = Type=string, Allowed="Samsung Galaxy S:480x800:512" "HTC Sensation XL:480x800:768" "Samsung Galaxy Note:800x1280:1024" "Motorola Droid Razr:540x960:1024" "Kindle Fire:1024x600:512" "Samsung Galaxy Tab:1024x600:512", Default="Samsung Galaxy S:480x800:512", Value = "Samsung Galaxy S:480x800:512" +MacOSSimulatorDevices_IPHONE = Type=string, Allowed="iPhone 3GS:320x480:256" "iPhone 4:640x960:512" "iPad 2:768x1024:512", Default="iPhone 3GS:320x480:256", Value = "iPhone 3GS:320x480:256" +MacOSSimulatorPlatforms = Type=string, Allowed="IPHONE" "ANDROID", Default="IPHONE", Value = "IPHONE" +MacOSSimulatorUseCustomSettings = Type=bool, Default="true", Value = "true" +MemoryPoison = Type=bool, Default="true", Value = "true" +MemoryPoisonAlloc = Type=int, Min=0.000000, Max=255.000000, Default="170", Value = "170" +MemoryPoisonFree = Type=int, Min=0.000000, Max=255.000000, Default="221", Value = "221" +MemoryPoisonInit = Type=int, Min=0.000000, Max=255.000000, Default="204", Value = "204" +PointerAvailable = Type=bool, Default="true", Value = "true" +PointerMultiSimulationMode = Type=bool, Default="false", Value = "false" +PointerMultiTouchAvailable = Type=bool, Default="false", Value = "false" +PointerStylusType = Type=string, Allowed="INVALID" "STYLUS" "FINGER", Default="INVALID", Value = "INVALID" +PointerType = Type=string, Allowed="INVALID" "MOUSE" "STYLUS", Default="MOUSE", Value = "MOUSE" +SMSEnabled = Type=bool, Default="true", Value = "true" +SMSReceiveEnabled = Type=bool, Default="true", Value = "true" +SocketDNSDelay = Type=int, Min=0.000000, Max=30000.000000, Default="0", Value = "0" +SocketHTTPProxy = Type=string, Default="", Value = "" +SocketHostName = Type=string, Default="", Value = "" +SocketNetworkAvailable = Type=bool, Default="true", Value = "true" +SocketNetworkLoss = Type=bool, Default="false", Value = "false" +SocketNetworkType = Type=string, Allowed="NONE" "UNKNOWN" "LAN" "WLAN" "GPRS" "UMTS" "EVDO" "CDMA2000" "HSDPA" "WIMAX" "BLUETOOTH" "EDGE" "CDMA" "IDEN" "LTE" "EHRPD" "HSPAPLUS", Default="LAN", Value = "LAN" +SocketRecvLimit = Type=int, Min=0.000000, Max=1000000.000000, Default="0", Value = "0" +SocketSendLimit = Type=int, Min=0.000000, Max=1000000.000000, Default="0", Value = "0" +SoundEnabled = Type=bool, Default="true", Value = "true" +SoundRecordEnabled = Type=bool, Default="true", Value = "true" +SoundSampleRate = Type=int, Allowed="8192" "11025" "16000" "22050" "44100", Default="22050", Value = "22050" +SoundStereo = Type=bool, Default="true", Value = "true" +SoundVolumeDefault = Type=int, Min=0.000000, Max=256.000000, Default="256", Value = "256" +SurfaceDisableWhenGLIsActive = Type=bool, Default="false", Value = "false" +SurfaceDoubleBuffer = Type=bool, Default="false", Value = "false" +SurfaceHeight = Type=int, Min=128.000000, Max=4096.000000, Default="480", Value = "320" +SurfacePitch = Type=int, Min=0.000000, Max=8192.000000, Default="0", Value = "0" +SurfacePixelType = Type=string, Allowed="RGB444" "RGB555" "RGB565" "RGB666" "RGB888" "BGR444" "BGR555" "BGR565" "BGR666" "BGR888", Default="RGB565", Value = "RGB565" +SurfacePredefinedResolution = Type=string, Allowed="176x200" "176x208" "240x320 (QVGA Portrait)" "240x400" "320x240 (QVGA Landscape)" "320x400" "320x480 (iPhone Portrait)" "400x240" "480x320 (iPhone Landscape)" "360x640 (qHD Portrait)" "640x360 (qHD Landscape)" "480x640 (VGA Portrait)" "480x800 (WVGA Portrait)" "640x480 (VGA Landscape)" "800x400" "800x480 (WVGA Landscape)" "640x960 (iPhone 4 Portrait)" "960x640 (iPhone 4 Landscape)" "1024x600 (Playbook Landscape)" "600x1024 (Playbook Portrait)" "768x1024 (iPad Portrait)" "1024x768 (iPad Landscape)" "2048x1536 (iPad Retina Landscape)" "1536x2048 (iPad Retina Portrait)", Default="320x480 (iPhone Portrait)", Value = "176x200" +SurfaceRotation = Type=string, Allowed="Rot0" "Rot90" "Rot180" "Rot270", Default="Rot0", Value = "Rot0" +SurfaceUnalign = Type=bool, Default="true", Value = "true" +SurfaceUseMultiBuffers = Type=bool, Default="true", Value = "true" +SurfaceWidth = Type=int, Min=128.000000, Max=4096.000000, Default="320", Value = "480" +SymbianSoundLatency = Type=int, Min=20.000000, Max=1400.000000, Default="120", Value = "120" +ThreadEnabled = Type=bool, Default="true", Value = "true" +TimerAccuracy = Type=int, Min=0.000000, Max=1000.000000, Default="0", Value = "0" +TimerHiRes = Type=bool, Default="false", Value = "false" +TimerLocaltimeOffsetHours = Type=string, Allowed="-12" "-11" "-10" "-9" "-8" "-7" "-6" "-5" "-4" "-3" "-2" "-1" "0" "+1" "+2" "+3" "+4" "+5" "+6" "+7" "+8" "+9" "+10" "+11" "+12" "+13" "SYSTEM", Default="SYSTEM", Value = "SYSTEM" +VibraEnabled = Type=bool, Default="true", Value = "true" +Video3GPP = Type=bool, Default="false", Value = "false" +VideoJPEG = Type=bool, Default="true", Value = "true" +VideoMPEG4 = Type=bool, Default="true", Value = "true" +VideoVolumeDefault = Type=int, Min=0.000000, Max=256.000000, Default="256", Value = "256" From c620b0f5bf9f2971a3742170f9590d25020d10b7 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 5 Dec 2012 14:45:06 +0800 Subject: [PATCH 28/32] Update AUTHORS --- AUTHORS | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AUTHORS b/AUTHORS index e9e9359b76..626240994b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -12,6 +12,12 @@ Developers: Rolando Abarca Javascript Binding and testjs + chenium + fix a bug that CCRenderTexture can not work when coming to foreground on Android + + 9re(Taro Kobayashi) + add Japanese language support + mingulov improve the speed of accessing to files from apk From d858ce2fe222e00e8a48f9043086c15ce611a513 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 5 Dec 2012 17:15:47 +0800 Subject: [PATCH 29/32] some android devices can not compile this frag --- .../shaders/ccShader_PositionColorLengthTexture_frag.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h b/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h index ab908d6eb9..803664a506 100644 --- a/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h +++ b/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h @@ -21,7 +21,7 @@ " \n\ #ifdef GL_ES \n\ -#extension GL_OES_standard_derivatives : enable \n\ +// #extension GL_OES_standard_derivatives : enable \n\ \n\ varying mediump vec4 v_color; \n\ varying mediump vec2 v_texcoord; \n\ @@ -32,10 +32,10 @@ varying vec2 v_texcoord; \n\ \n\ void main() \n\ { \n\ -#if defined GL_OES_standard_derivatives \n\ - gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); \n\ -#else \n\ +// #if defined GL_OES_standard_derivatives \n\ + // gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); \n\ +// #else \n\ gl_FragColor = v_color*step(0.0, 1.0 - length(v_texcoord)); \n\ -#endif \n\ +// #endif \n\ } \n\ "; From 320d532e15ecc6abca87b9fe196c5ced756b6e73 Mon Sep 17 00:00:00 2001 From: fape Date: Wed, 5 Dec 2012 11:31:05 +0100 Subject: [PATCH 30/32] add Hungarian language support --- cocos2dx/platform/CCCommon.h | 3 ++- cocos2dx/platform/android/CCApplication.cpp | 4 ++++ cocos2dx/platform/blackberry/CCApplication.cpp | 4 ++++ cocos2dx/platform/ios/CCApplication.mm | 3 +++ cocos2dx/platform/linux/CCApplication.cpp | 4 ++++ cocos2dx/platform/mac/CCApplication.mm | 3 +++ cocos2dx/platform/marmalade/CCApplication.cpp | 4 ++++ cocos2dx/platform/win32/CCApplication.cpp | 3 +++ .../Classes/CurrentLanguageTest/CurrentLanguageTest.cpp | 3 +++ tools/tolua++/CCApplication.pkg | 3 ++- 10 files changed, 32 insertions(+), 2 deletions(-) diff --git a/cocos2dx/platform/CCCommon.h b/cocos2dx/platform/CCCommon.h index 064d870ab5..1b3ebc07e3 100644 --- a/cocos2dx/platform/CCCommon.h +++ b/cocos2dx/platform/CCCommon.h @@ -65,7 +65,8 @@ typedef enum LanguageType kLanguageSpanish, kLanguageRussian, kLanguageKorean, - kLanguageJapanese + kLanguageJapanese, + kLanguageHungarian } ccLanguageType; // end of platform group diff --git a/cocos2dx/platform/android/CCApplication.cpp b/cocos2dx/platform/android/CCApplication.cpp index 44b0491f74..67b9b42e01 100644 --- a/cocos2dx/platform/android/CCApplication.cpp +++ b/cocos2dx/platform/android/CCApplication.cpp @@ -116,6 +116,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret = kLanguageJapanese; } + else if (0 == strcmp("hu", pLanguageName)) + { + ret = kLanguageHungarian; + } return ret; } diff --git a/cocos2dx/platform/blackberry/CCApplication.cpp b/cocos2dx/platform/blackberry/CCApplication.cpp index 9744a0bcaf..f855796735 100644 --- a/cocos2dx/platform/blackberry/CCApplication.cpp +++ b/cocos2dx/platform/blackberry/CCApplication.cpp @@ -155,6 +155,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret_language = kLanguageJapanese; } + else if (strcmp(language, "hu") == 0) + { + ret_language = kLanguageHungarian; + } free(language); free(country); diff --git a/cocos2dx/platform/ios/CCApplication.mm b/cocos2dx/platform/ios/CCApplication.mm index e92448dd75..7927944b8d 100644 --- a/cocos2dx/platform/ios/CCApplication.mm +++ b/cocos2dx/platform/ios/CCApplication.mm @@ -110,6 +110,9 @@ ccLanguageType CCApplication::getCurrentLanguage() else if ([languageCode isEqualToString:@"ja"]){ ret = kLanguageJapanese; } + else if ([languageCode isEqualToString:@"hu"]){ + ret = kLanguageHungarian; + } return ret; } diff --git a/cocos2dx/platform/linux/CCApplication.cpp b/cocos2dx/platform/linux/CCApplication.cpp index 823f2712a4..397b6f7ea9 100644 --- a/cocos2dx/platform/linux/CCApplication.cpp +++ b/cocos2dx/platform/linux/CCApplication.cpp @@ -148,6 +148,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret = kLanguageJapanese; } + else if (0 == strcmp("hu", pLanguageName)) + { + ret = kLanguageHungarian; + } return ret; } diff --git a/cocos2dx/platform/mac/CCApplication.mm b/cocos2dx/platform/mac/CCApplication.mm index 266495d311..866fa1ba36 100755 --- a/cocos2dx/platform/mac/CCApplication.mm +++ b/cocos2dx/platform/mac/CCApplication.mm @@ -116,6 +116,9 @@ ccLanguageType CCApplication::getCurrentLanguage() else if ([languageCode isEqualToString:@"ja"]){ ret = kLanguageJapanese; } + else if ([languageCode isEqualToString:@"hu"]){ + ret = kLanguageHungarian; + } return ret; } diff --git a/cocos2dx/platform/marmalade/CCApplication.cpp b/cocos2dx/platform/marmalade/CCApplication.cpp index ce32d9473b..25370cea71 100644 --- a/cocos2dx/platform/marmalade/CCApplication.cpp +++ b/cocos2dx/platform/marmalade/CCApplication.cpp @@ -181,6 +181,10 @@ ccLanguageType CCApplication::getCurrentLanguage() currentLanguage = kLanguageJapanese; break; + case S3E_DEVICE_LANGUAGE_HUNGARIAN: + currentLanguage = kLanguageHungarian; + break; + default: currentLanguage = kLanguageEnglish; break; diff --git a/cocos2dx/platform/win32/CCApplication.cpp b/cocos2dx/platform/win32/CCApplication.cpp index 1bee37baa1..a774d350eb 100644 --- a/cocos2dx/platform/win32/CCApplication.cpp +++ b/cocos2dx/platform/win32/CCApplication.cpp @@ -142,6 +142,9 @@ ccLanguageType CCApplication::getCurrentLanguage() case LANG_JAPANESE: ret = kLanguageJapanese; break; + case LANG_HUNGARIAN: + ret = kLanguageHungarian; + break; } return ret; diff --git a/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp b/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp index 6c2f8d5459..344cfbb5bc 100644 --- a/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp +++ b/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp @@ -39,6 +39,9 @@ CurrentLanguageTest::CurrentLanguageTest() case kLanguageJapanese: labelLanguage->setString("current language is Japanese"); break; + case kLanguageHungarian: + labelLanguage->setString("current language is Hungarian"); + break; } addChild(labelLanguage); diff --git a/tools/tolua++/CCApplication.pkg b/tools/tolua++/CCApplication.pkg index ce2185e656..7be440f1b5 100644 --- a/tools/tolua++/CCApplication.pkg +++ b/tools/tolua++/CCApplication.pkg @@ -9,7 +9,8 @@ typedef enum LanguageType kLanguageSpanish, kLanguageRussian, kLanguageKorean, - kLanguageJapanese + kLanguageJapanese, + kLanguageHungarian } ccLanguageType; enum TargetPlatform From e488361e3b9888801740a2219b19ecca4dbd1490 Mon Sep 17 00:00:00 2001 From: fape Date: Wed, 5 Dec 2012 11:43:04 +0100 Subject: [PATCH 31/32] cosmetics: fix formating --- cocos2dx/platform/CCCommon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/platform/CCCommon.h b/cocos2dx/platform/CCCommon.h index 1b3ebc07e3..72340ee036 100644 --- a/cocos2dx/platform/CCCommon.h +++ b/cocos2dx/platform/CCCommon.h @@ -66,7 +66,7 @@ typedef enum LanguageType kLanguageRussian, kLanguageKorean, kLanguageJapanese, - kLanguageHungarian + kLanguageHungarian } ccLanguageType; // end of platform group From 6bf52b22b88c31b347eea6f3b162919e07170bc1 Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 6 Dec 2012 09:41:23 +0800 Subject: [PATCH 32/32] Update AUTHORS --- AUTHORS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index 626240994b..1dafbf6596 100644 --- a/AUTHORS +++ b/AUTHORS @@ -12,6 +12,9 @@ Developers: Rolando Abarca Javascript Binding and testjs + fape + add Hungarian language support + chenium fix a bug that CCRenderTexture can not work when coming to foreground on Android