diff --git a/AUTHORS b/AUTHORS index 13b5fa312a..2d5dfb7e5e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,6 +14,7 @@ Developers: carlomorgantinizynga CCLabelTTF supports for shadow and stroke + Adding CCLabelTTF::createWithFontDefinition. James Gregory (j4m3z0r, Zynga) Maintainer of Emscripten port. @@ -447,6 +448,9 @@ Developers: sunxiaoyu Refactoring CCEditBox to add UITextField only when keyboard was opened, remove it when keyboard was closed. + + edwardzhou (Edward Zhou) + Correcting the type detecting order for Lua CCBProxy::getNodeTypeName. Retired Core Developers: WenSheng Yang diff --git a/cocos2dx/label_nodes/CCLabelTTF.cpp b/cocos2dx/label_nodes/CCLabelTTF.cpp index dd375118b1..436094bef6 100644 --- a/cocos2dx/label_nodes/CCLabelTTF.cpp +++ b/cocos2dx/label_nodes/CCLabelTTF.cpp @@ -96,6 +96,18 @@ CCLabelTTF* CCLabelTTF::create(const char *string, const char *fontName, float f return NULL; } +CCLabelTTF * CCLabelTTF::createWithFontDefinition(const char *string, ccFontDefinition &textDefinition) +{ + CCLabelTTF *pRet = new CCLabelTTF(); + if(pRet && pRet->initWithStringAndTextDefinition(string, textDefinition)) + { + pRet->autorelease(); + return pRet; + } + CC_SAFE_DELETE(pRet); + return NULL; +} + bool CCLabelTTF::init() { return this->initWithString("", "Helvetica", 12); diff --git a/cocos2dx/label_nodes/CCLabelTTF.h b/cocos2dx/label_nodes/CCLabelTTF.h index a5f950d5c3..487a89b0c2 100644 --- a/cocos2dx/label_nodes/CCLabelTTF.h +++ b/cocos2dx/label_nodes/CCLabelTTF.h @@ -70,6 +70,10 @@ public: const CCSize& dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment); + + /** Create a lable with string and a font definition*/ + static CCLabelTTF * createWithFontDefinition(const char *string, ccFontDefinition &textDefinition); + /** initializes the CCLabelTTF with a font name and font size */ bool initWithString(const char *string, const char *fontName, float fontSize); diff --git a/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java b/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java index a21cd23af2..c9dbf435e0 100644 --- a/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java +++ b/cocos2dx/platform/android/java/src/org/cocos2dx/lib/Cocos2dxETCLoader.java @@ -65,7 +65,6 @@ public class Cocos2dxETCLoader { texture = ETC1Util.createTexture(inputStream); inputStream.close(); - assetManager.close(); } catch (Exception e) { Log.d("Cocos2dx", "Unable to create texture for " + filePath); @@ -73,6 +72,8 @@ public class Cocos2dxETCLoader { } if (texture != null) { + boolean ret = true; + try { int width = texture.getWidth(); int height = texture.getHeight(); @@ -88,9 +89,10 @@ public class Cocos2dxETCLoader { } catch (Exception e) { Log.d("invoke native function error", e.toString()); + ret = false; } - return true; + return ret; } else { return false; } diff --git a/cocos2dx/proj.blackberry/.project b/cocos2dx/proj.blackberry/.project index 8e6504b691..96e8967027 100644 --- a/cocos2dx/proj.blackberry/.project +++ b/cocos2dx/proj.blackberry/.project @@ -110,6 +110,16 @@ 2 PARENT-1-PROJECT_LOC/base_nodes + + ccFPSImages.c + 1 + PARENT-1-PROJECT_LOC/ccFPSImages.c + + + ccFPSImages.h + 1 + PARENT-1-PROJECT_LOC/ccFPSImages.h + cocoa 2 diff --git a/extensions/network/WebSocket.cpp b/extensions/network/WebSocket.cpp index 3a76a39eb9..6a56127cea 100644 --- a/extensions/network/WebSocket.cpp +++ b/extensions/network/WebSocket.cpp @@ -28,6 +28,7 @@ ****************************************************************************/ #include "WebSocket.h" +#include #include #include #include @@ -465,7 +466,6 @@ void WebSocket::onSubThreadEnded() } - int WebSocket::onSocketCallback(struct libwebsocket_context *ctx, struct libwebsocket *wsi, enum libwebsocket_callback_reasons reason, @@ -658,4 +658,5 @@ void WebSocket::onUIThreadReceiveMessage(WsMessage* msg) break; } } + NS_CC_EXT_END diff --git a/extensions/network/WebSocket.h b/extensions/network/WebSocket.h index 5d9d626cdc..1dc262077b 100644 --- a/extensions/network/WebSocket.h +++ b/extensions/network/WebSocket.h @@ -31,7 +31,6 @@ #define __CC_WEBSOCKET_H__ #include "ExtensionMacros.h" -#include #include "cocos2d.h" #include "libwebsockets.h" #include @@ -149,7 +148,7 @@ private: struct libwebsocket_context* _wsContext; Delegate* _delegate; int _SSLConnection; - libwebsocket_protocols* _wsProtocols; + struct libwebsocket_protocols* _wsProtocols; }; NS_CC_EXT_END diff --git a/extensions/proj.blackberry/.cproject b/extensions/proj.blackberry/.cproject index 76b2e61c04..3d402259ee 100644 --- a/extensions/proj.blackberry/.cproject +++ b/extensions/proj.blackberry/.cproject @@ -83,9 +83,10 @@ - + + @@ -162,6 +163,8 @@ + + @@ -238,6 +241,8 @@ + + @@ -314,6 +319,8 @@ + + @@ -388,6 +395,8 @@ + + @@ -463,6 +472,8 @@ + + @@ -538,6 +549,8 @@ + + diff --git a/extensions/proj.blackberry/.project b/extensions/proj.blackberry/.project index 6643bd180c..57e212a23f 100644 --- a/extensions/proj.blackberry/.project +++ b/extensions/proj.blackberry/.project @@ -84,6 +84,11 @@ 2 PARENT-1-PROJECT_LOC/CCBReader + + Components + 2 + PARENT-1-PROJECT_LOC/Components + GUI 2 @@ -107,12 +112,12 @@ - 1345434795222 - GUI - 10 + 1370598150734 + network + 6 org.eclipse.ui.ide.multiFilter - 1.0-name-matches-true-false-CCEditBox + 1.0-name-matches-false-false-WebSocket* diff --git a/samples/Cpp/HelloCpp/proj.blackberry/.cproject b/samples/Cpp/HelloCpp/proj.blackberry/.cproject index f9fc3cc7ce..ae46d6efa7 100644 --- a/samples/Cpp/HelloCpp/proj.blackberry/.cproject +++ b/samples/Cpp/HelloCpp/proj.blackberry/.cproject @@ -22,7 +22,7 @@ @@ -123,7 +123,7 @@ @@ -210,7 +210,7 @@ @@ -298,7 +298,7 @@ @@ -471,7 +471,7 @@ @@ -558,7 +558,7 @@ @@ -630,33 +630,33 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/Cpp/SimpleGame/proj.blackberry/.cproject b/samples/Cpp/SimpleGame/proj.blackberry/.cproject index bb35fdd0fd..779721d636 100644 --- a/samples/Cpp/SimpleGame/proj.blackberry/.cproject +++ b/samples/Cpp/SimpleGame/proj.blackberry/.cproject @@ -136,7 +136,6 @@ @@ -193,7 +192,7 @@ - + @@ -292,7 +291,7 @@ - + @@ -391,8 +390,7 @@ - - + @@ -488,7 +486,7 @@ - + @@ -586,7 +584,7 @@ - + @@ -684,8 +682,7 @@ - - + diff --git a/samples/Cpp/TestCpp/proj.blackberry/.project b/samples/Cpp/TestCpp/proj.blackberry/.project index 67150ca451..2afe91f5c7 100644 --- a/samples/Cpp/TestCpp/proj.blackberry/.project +++ b/samples/Cpp/TestCpp/proj.blackberry/.project @@ -32,7 +32,7 @@ org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/TestCpp/Device-Debug} + ${workspace_loc:/TestCpp/Device-Release} org.eclipse.cdt.make.core.contents @@ -101,5 +101,14 @@ 1.0-name-matches-true-false-EditBoxTest + + 1370598020962 + Classes/ExtensionsTest/NetworkTest + 6 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-WebSocketTest* + + diff --git a/samples/Lua/HelloLua/proj.blackberry/.cproject b/samples/Lua/HelloLua/proj.blackberry/.cproject index 07db9901a3..b7040839ee 100644 --- a/samples/Lua/HelloLua/proj.blackberry/.cproject +++ b/samples/Lua/HelloLua/proj.blackberry/.cproject @@ -42,6 +42,7 @@ + @@ -164,6 +166,8 @@ - + @@ -265,6 +268,8 @@ - + @@ -365,6 +369,8 @@ - + @@ -462,6 +467,8 @@ + @@ -562,6 +568,8 @@ - + @@ -661,6 +668,8 @@ - +