diff --git a/cocos2d-win32.vc2012.sln b/cocos2d-win32.vc2012.sln index ee323cdd2d..306bce15a6 100644 --- a/cocos2d-win32.vc2012.sln +++ b/cocos2d-win32.vc2012.sln @@ -14,6 +14,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "cocos2dx\proj EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "scripting\lua\proj.win32\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}" ProjectSection(ProjectDependencies) = postProject + {21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} EndProjectSection diff --git a/extensions/CCArmature/utils/CCArmatureDataManager.h b/extensions/CCArmature/utils/CCArmatureDataManager.h index 20470c3f3e..2ff8b97d6e 100644 --- a/extensions/CCArmature/utils/CCArmatureDataManager.h +++ b/extensions/CCArmature/utils/CCArmatureDataManager.h @@ -39,13 +39,12 @@ class CCArmatureDataManager : public CCObject { public: static CCArmatureDataManager *sharedArmatureDataManager(); + static void purgeArmatureSystem(); private: CCArmatureDataManager(void); ~CCArmatureDataManager(void); public: - virtual void purgeArmatureSystem(); - /** * Init CCArmatureDataManager */ diff --git a/extensions/network/WebSocket.cpp b/extensions/network/WebSocket.cpp index ec9da29f23..18f40d8987 100644 --- a/extensions/network/WebSocket.cpp +++ b/extensions/network/WebSocket.cpp @@ -222,7 +222,6 @@ void WsThreadHelper::update(float dt) enum WS_MSG { WS_MSG_TO_SUBTRHEAD_SENDING_STRING = 0, WS_MSG_TO_SUBTRHEAD_SENDING_BINARY, - WS_MSG_TO_SUBTRHEAD_CLOSING, WS_MSG_TO_UITHREAD_OPEN, WS_MSG_TO_UITHREAD_MESSAGE, WS_MSG_TO_UITHREAD_ERROR, @@ -381,10 +380,6 @@ void WebSocket::close() CCLOG("websocket (%p) connection closed by client", this); _readyState = kStateClosed; - WsMessage* msg = new WsMessage(); - msg->what = WS_MSG_TO_SUBTRHEAD_CLOSING; - - _wsHelper->sendMessageToSubThread(msg); _wsHelper->joinSubThread(); // onClose callback needs to be invoked at the end of this method @@ -481,20 +476,26 @@ int WebSocket::onSocketCallback(struct libwebsocket_context *ctx, case LWS_CALLBACK_PROTOCOL_DESTROY: case LWS_CALLBACK_CLIENT_CONNECTION_ERROR: { - WsMessage* msg = new WsMessage(); + WsMessage* msg = NULL; if (reason == LWS_CALLBACK_CLIENT_CONNECTION_ERROR || (reason == LWS_CALLBACK_PROTOCOL_DESTROY && _readyState == kStateConnecting) || (reason == LWS_CALLBACK_DEL_POLL_FD && _readyState == kStateConnecting) ) { + msg = new WsMessage(); msg->what = WS_MSG_TO_UITHREAD_ERROR; _readyState = kStateClosing; } else if (reason == LWS_CALLBACK_PROTOCOL_DESTROY && _readyState == kStateClosing) { + msg = new WsMessage(); msg->what = WS_MSG_TO_UITHREAD_CLOSE; } - _wsHelper->sendMessageToUIThread(msg); + + if (msg) + { + _wsHelper->sendMessageToUIThread(msg); + } } break; case LWS_CALLBACK_CLIENT_ESTABLISHED: diff --git a/plugin/samples/HelloAnalytics-JS/Classes/AppDelegate.cpp b/plugin/samples/HelloAnalytics-JS/Classes/AppDelegate.cpp index 679d315fd6..6fd24bcf85 100644 --- a/plugin/samples/HelloAnalytics-JS/Classes/AppDelegate.cpp +++ b/plugin/samples/HelloAnalytics-JS/Classes/AppDelegate.cpp @@ -23,7 +23,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - CCScriptEngineManager::sharedManager()->purgeSharedManager(); + CCScriptEngineManager::purgeSharedManager(); } bool AppDelegate::applicationDidFinishLaunching() diff --git a/plugin/samples/HelloIAP-JS/Classes/AppDelegate.cpp b/plugin/samples/HelloIAP-JS/Classes/AppDelegate.cpp index 03c29644b9..7ede76e6e5 100644 --- a/plugin/samples/HelloIAP-JS/Classes/AppDelegate.cpp +++ b/plugin/samples/HelloIAP-JS/Classes/AppDelegate.cpp @@ -23,7 +23,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - CCScriptEngineManager::sharedManager()->purgeSharedManager(); + CCScriptEngineManager::purgeSharedManager(); } bool AppDelegate::applicationDidFinishLaunching() diff --git a/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp b/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp index 0c86e304a1..7a1cd11826 100644 --- a/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp +++ b/samples/Cpp/TestCpp/Classes/ActionsTest/ActionsTest.cpp @@ -1400,11 +1400,11 @@ void ActionMoveStacked::runActionsInSprite(CCSprite *sprite) sprite->runAction( CCRepeatForever::create( CCSequence::create( - CCMoveBy::create(0.05, ccp(10,10)), - CCMoveBy::create(0.05, ccp(-10,-10)), + CCMoveBy::create(0.05f, ccp(10,10)), + CCMoveBy::create(0.05f, ccp(-10,-10)), NULL))); - CCMoveBy* action = CCMoveBy::create(2, ccp(400,0)); + CCMoveBy* action = CCMoveBy::create(2.0f, ccp(400,0)); CCMoveBy* action_back = (CCMoveBy*)action->reverse(); sprite->runAction( @@ -1426,11 +1426,11 @@ void ActionMoveJumpStacked::runActionsInSprite(CCSprite *sprite) sprite->runAction( CCRepeatForever::create( CCSequence::create( - CCMoveBy::create(0.05, ccp(10,2)), - CCMoveBy::create(0.05, ccp(-10,-2)), + CCMoveBy::create(0.05f, ccp(10,2)), + CCMoveBy::create(0.05f, ccp(-10,-2)), NULL))); - CCJumpBy* jump = CCJumpBy::create(2, ccp(400,0), 100, 5); + CCJumpBy* jump = CCJumpBy::create(2.0f, ccp(400,0), 100, 5); CCJumpBy* jump_back = (CCJumpBy*)jump->reverse(); sprite->runAction( @@ -1465,8 +1465,8 @@ void ActionMoveBezierStacked::runActionsInSprite(CCSprite *sprite) sprite->runAction( CCRepeatForever::create( CCSequence::create( - CCMoveBy::create(0.05, ccp(10,0)), - CCMoveBy::create(0.05, ccp(-10,0)), + CCMoveBy::create(0.05f, ccp(10,0)), + CCMoveBy::create(0.05f, ccp(-10,0)), NULL))); } @@ -1516,8 +1516,8 @@ void ActionCatmullRomStacked::onEnter() m_tamara->runAction( CCRepeatForever::create( CCSequence::create( - CCMoveBy::create(0.05, ccp(10,0)), - CCMoveBy::create(0.05, ccp(-10,0)), + CCMoveBy::create(0.05f, ccp(10,0)), + CCMoveBy::create(0.05f, ccp(-10,0)), NULL))); @@ -1548,8 +1548,8 @@ void ActionCatmullRomStacked::onEnter() m_kathia->runAction( CCRepeatForever::create( CCSequence::create( - CCMoveBy::create(0.05, ccp(10,0)), - CCMoveBy::create(0.05, ccp(-10,0)), + CCMoveBy::create(0.05f, ccp(10,0)), + CCMoveBy::create(0.05f, ccp(-10,0)), NULL))); @@ -1626,8 +1626,8 @@ void ActionCardinalSplineStacked::onEnter() m_tamara->runAction( CCRepeatForever::create( CCSequence::create( - CCMoveBy::create(0.05, ccp(10,0)), - CCMoveBy::create(0.05, ccp(-10,0)), + CCMoveBy::create(0.05f, ccp(10,0)), + CCMoveBy::create(0.05f, ccp(-10,0)), NULL))); @@ -1649,8 +1649,8 @@ void ActionCardinalSplineStacked::onEnter() m_kathia->runAction( CCRepeatForever::create( CCSequence::create( - CCMoveBy::create(0.05, ccp(10,0)), - CCMoveBy::create(0.05, ccp(-10,0)), + CCMoveBy::create(0.05f, ccp(10,0)), + CCMoveBy::create(0.05f, ccp(-10,0)), NULL))); diff --git a/samples/Cpp/TestCpp/Classes/AppDelegate.cpp b/samples/Cpp/TestCpp/Classes/AppDelegate.cpp index ff0af2d637..ce75d72e5e 100644 --- a/samples/Cpp/TestCpp/Classes/AppDelegate.cpp +++ b/samples/Cpp/TestCpp/Classes/AppDelegate.cpp @@ -15,7 +15,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { // SimpleAudioEngine::end(); - cocos2d::extension::CCArmatureDataManager::sharedArmatureDataManager()->purgeArmatureSystem(); + cocos2d::extension::CCArmatureDataManager::purgeArmatureSystem(); } bool AppDelegate::applicationDidFinishLaunching() diff --git a/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp b/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp index dc8dd9875d..1ba2de099e 100644 --- a/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp +++ b/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp @@ -23,7 +23,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - CCScriptEngineManager::sharedManager()->purgeSharedManager(); + CCScriptEngineManager::purgeSharedManager(); } bool AppDelegate::applicationDidFinishLaunching() diff --git a/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp b/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp index ad5e3b4671..a8399d98ac 100644 --- a/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp +++ b/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp @@ -19,7 +19,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - CCScriptEngineManager::sharedManager()->purgeSharedManager(); + CCScriptEngineManager::purgeSharedManager(); } bool AppDelegate::applicationDidFinishLaunching() diff --git a/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp b/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp index 9a1fa7c989..0f55da2517 100644 --- a/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp @@ -15,7 +15,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - CCScriptEngineManager::sharedManager()->purgeSharedManager(); + CCScriptEngineManager::purgeSharedManager(); } bool AppDelegate::applicationDidFinishLaunching() diff --git a/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp b/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp index 1724dadf42..e01f39d8b8 100644 --- a/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp +++ b/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp @@ -23,7 +23,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - CCScriptEngineManager::sharedManager()->purgeSharedManager(); + CCScriptEngineManager::purgeSharedManager(); } bool AppDelegate::applicationDidFinishLaunching() diff --git a/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp b/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp index 7261888e58..8072b4c38d 100644 --- a/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp +++ b/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp @@ -21,7 +21,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - CCScriptEngineManager::sharedManager()->purgeSharedManager(); + CCScriptEngineManager::purgeSharedManager(); } bool AppDelegate::applicationDidFinishLaunching() diff --git a/template/multi-platform-js/Classes/AppDelegate.cpp b/template/multi-platform-js/Classes/AppDelegate.cpp index 6d9bc18a35..6475aba954 100644 --- a/template/multi-platform-js/Classes/AppDelegate.cpp +++ b/template/multi-platform-js/Classes/AppDelegate.cpp @@ -23,7 +23,7 @@ AppDelegate::AppDelegate() AppDelegate::~AppDelegate() { - CCScriptEngineManager::sharedManager()->purgeSharedManager(); + CCScriptEngineManager::purgeSharedManager(); } bool AppDelegate::applicationDidFinishLaunching()