From d192619ddf768701448b22e39bdec5f572758ae3 Mon Sep 17 00:00:00 2001 From: cw Date: Fri, 14 Mar 2014 16:33:53 +0800 Subject: [PATCH 01/98] add prebuilt runtime --- templates/lua-template-runtime/.buildpath | 4 ++++ templates/lua-template-runtime/.project | 13 +++++++++++++ .../PrebuiltRuntimeLua.apk.REMOVED.git-id | 1 + .../Default-568h@2x.png.REMOVED.git-id | 1 + .../Default@2x.png.REMOVED.git-id | 1 + .../runtime/ios/PrebuiltRuntimeLua.app/PkgInfo | 1 + .../PrebuiltRuntimeLua iOS.REMOVED.git-id | 1 + .../MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id | 1 + .../mac/PrebuiltRuntimeLua.app/Contents/PkgInfo | 1 + .../Contents/Resources/Icon.icns.REMOVED.git-id | 1 + .../Contents/Resources/MainMenu.nib | Bin 0 -> 6889 bytes .../Contents/Resources/WorkSpaceDialog.nib | Bin 0 -> 8435 bytes 12 files changed, 25 insertions(+) create mode 100644 templates/lua-template-runtime/.buildpath create mode 100644 templates/lua-template-runtime/.project create mode 100644 templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id create mode 100644 templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/Default-568h@2x.png.REMOVED.git-id create mode 100644 templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/Default@2x.png.REMOVED.git-id create mode 100644 templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PkgInfo create mode 100644 templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id create mode 100644 templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id create mode 100644 templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/PkgInfo create mode 100644 templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/Icon.icns.REMOVED.git-id create mode 100644 templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/MainMenu.nib create mode 100644 templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/WorkSpaceDialog.nib diff --git a/templates/lua-template-runtime/.buildpath b/templates/lua-template-runtime/.buildpath new file mode 100644 index 0000000000..53ba323fe6 --- /dev/null +++ b/templates/lua-template-runtime/.buildpath @@ -0,0 +1,4 @@ + + + + diff --git a/templates/lua-template-runtime/.project b/templates/lua-template-runtime/.project new file mode 100644 index 0000000000..12fd28f45b --- /dev/null +++ b/templates/lua-template-runtime/.project @@ -0,0 +1,13 @@ + + + CocosGame + + + + + + + org.ccdt.cocosproject + org.eclipse.koneki.ldt.nature + + diff --git a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id new file mode 100644 index 0000000000..19e22f2887 --- /dev/null +++ b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id @@ -0,0 +1 @@ +b6ad138951e439ad072da264df619cc7321f46c6 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/Default-568h@2x.png.REMOVED.git-id b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/Default-568h@2x.png.REMOVED.git-id new file mode 100644 index 0000000000..8f5838f3a8 --- /dev/null +++ b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/Default-568h@2x.png.REMOVED.git-id @@ -0,0 +1 @@ +66c6d1cead373b45218424f6a82f370897e443e4 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/Default@2x.png.REMOVED.git-id b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/Default@2x.png.REMOVED.git-id new file mode 100644 index 0000000000..8843505b20 --- /dev/null +++ b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/Default@2x.png.REMOVED.git-id @@ -0,0 +1 @@ +84689888a14a2123d2b39f7f2f61be8c15207479 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PkgInfo b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PkgInfo new file mode 100644 index 0000000000..bd04210fb4 --- /dev/null +++ b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id new file mode 100644 index 0000000000..bb065b2804 --- /dev/null +++ b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id @@ -0,0 +1 @@ +1ffd33761a672e4eb19b2ea7b540523e6b326a14 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id new file mode 100644 index 0000000000..c1d69d4c62 --- /dev/null +++ b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id @@ -0,0 +1 @@ +31b1a0d01d2ab46a60ad179417cdeb24a4e143c8 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/PkgInfo b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/PkgInfo new file mode 100644 index 0000000000..bd04210fb4 --- /dev/null +++ b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/Icon.icns.REMOVED.git-id b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/Icon.icns.REMOVED.git-id new file mode 100644 index 0000000000..0c90afdb6d --- /dev/null +++ b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/Icon.icns.REMOVED.git-id @@ -0,0 +1 @@ +2040fc6fe624353ae1d3db50cd3d450f4fda5afc \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/MainMenu.nib b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/MainMenu.nib new file mode 100644 index 0000000000000000000000000000000000000000..af8ea56631aa9eb56e17c1a89904a457969c7604 GIT binary patch literal 6889 zcmb_g3!F@4|NlMDncF#Y&dhVpGgu^x#jaddY!{MTv#njUZY!+W-N_EKGizqnhRP!q z3ME}sghi6r86Swof|2mhlt{stKw&(Vm*S5W76LT|`{0dOm((W>NJG+?q>w8} zYtn&qBpIYDxq);ey-0tOM+!(G8AHaBIJtw|NhXtNWICBa=8%WTT=FEDPZp5nTA#uqk)sgB-^`s;+TdFTLkQz#tNsXnZgHpm}q0mu~K>;_Ypn(Uxz(5BBIQXCr z)P;JG1ofc-{$B=-;PSyaxi?25@ew(>JtE;SVvVrJhUet=3l_x&`$J`cSU&UO*F+v9 zenH~u?^%Hfc)xy5Znwh1Kr9w42!?|32^aFRoZP`dyb%fv35JUz)Pf49ctFe&GsNq{j{n=m4l#Q_B%`lQpy@5>kjatbF9`@q*hX|K zEk$whXe1O0ME65;XaOxDbyz}f7^#LPJ_ceVk+m!qkCY^wtU$W7p*1e=hbvG)YiNU} zw5_g=MZ%E~*bdS$blGKbKl+;+h%bS5&>qqT<>ca*1ZM~6RmpVd2pMn{Tn*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L}J3f=3uDj1ww^iNa)|Qt%2sK@>v5J;DZIqp(@HPuM2x z5OxXo3l9i;g?++);Su40@VM}V@Rab3@SN~R;jr+z@TKsz@Qv`D@V)S(aLGknDwoEk zb8#-C%j`;WCA(}chbz_Pbh%t@UF}^RT%BBn(dnFx>Mdg0i}uW?aFua|E|0K7kTBv8UO$Q literal 0 HcmV?d00001 From f76582ae9ed8a986d06145de62aa78bfe763e3a0 Mon Sep 17 00:00:00 2001 From: cw Date: Fri, 14 Mar 2014 21:06:45 +0800 Subject: [PATCH 03/98] update res path --- templates/lua-template-runtime/src/main.lua | 28 ++++++++++----------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/templates/lua-template-runtime/src/main.lua b/templates/lua-template-runtime/src/main.lua index 32bad3df7e..808b6061e6 100644 --- a/templates/lua-template-runtime/src/main.lua +++ b/templates/lua-template-runtime/src/main.lua @@ -17,8 +17,6 @@ local function main() -- avoid memory leak collectgarbage("setpause", 100) collectgarbage("setstepmul", 5000) - cc.FileUtils:getInstance():addSearchResolutionsOrder("src"); - cc.FileUtils:getInstance():addSearchResolutionsOrder("res"); local schedulerID = 0 --support debug local targetPlatform = cc.Application:getInstance():getTargetPlatform() @@ -29,7 +27,7 @@ local function main() --require('debugger')() end - require "hello2" + require "src/hello2" cclog("result is " .. myadd(1, 1)) --------------- @@ -43,7 +41,7 @@ local function main() local frameHeight = 95 -- create dog animate - local textureDog = cc.TextureCache:getInstance():addImage("dog.png") + local textureDog = cc.TextureCache:getInstance():addImage("res/dog.png") local rect = cc.rect(0, 0, frameWidth, frameHeight) local frame0 = cc.SpriteFrame:createWithTexture(textureDog, rect) rect = cc.rect(frameWidth, 0, frameWidth, frameHeight) @@ -86,21 +84,21 @@ local function main() local layerFarm = cc.Layer:create() -- add in farm background - local bg = cc.Sprite:create("farm.jpg") + local bg = cc.Sprite:create("res/farm.jpg") bg:setPosition(origin.x + visibleSize.width / 2 + 80, origin.y + visibleSize.height / 2) layerFarm:addChild(bg) -- add land sprite for i = 0, 3 do for j = 0, 1 do - local spriteLand = cc.Sprite:create("land.png") + local spriteLand = cc.Sprite:create("res/land.png") spriteLand:setPosition(200 + j * 180 - i % 2 * 90, 10 + i * 95 / 2) layerFarm:addChild(spriteLand) end end -- add crop - local frameCrop = cc.SpriteFrame:create("crop.png", cc.rect(0, 0, 105, 95)) + local frameCrop = cc.SpriteFrame:create("res/crop.png", cc.rect(0, 0, 105, 95)) for i = 0, 3 do for j = 0, 1 do local spriteCrop = cc.Sprite:createWithSpriteFrame(frameCrop); @@ -117,7 +115,7 @@ local function main() local touchBeginPoint = nil local function onTouchBegan(touch, event) local location = touch:getLocation() - cclog("onTouchBegan: %0.2f, %0.2f", location.x, location.y) + --cclog("onTouchBegan: %0.2f, %0.2f", location.x, location.y) touchBeginPoint = {x = location.x, y = location.y} spriteDog.isPaused = true -- CCTOUCHBEGAN event must return true @@ -126,7 +124,7 @@ local function main() local function onTouchMoved(touch, event) local location = touch:getLocation() - cclog("onTouchMoved: %0.2f, %0.2f", location.x, location.y) + --cclog("onTouchMoved: %0.2f, %0.2f", location.x, location.y) if touchBeginPoint then local cx, cy = layerFarm:getPosition() layerFarm:setPosition(cx + location.x - touchBeginPoint.x, @@ -137,7 +135,7 @@ local function main() local function onTouchEnded(touch, event) local location = touch:getLocation() - cclog("onTouchEnded: %0.2f, %0.2f", location.x, location.y) + --cclog("onTouchEnded: %0.2f, %0.2f", location.x, location.y) touchBeginPoint = nil spriteDog.isPaused = false end @@ -174,13 +172,13 @@ local function main() local function menuCallbackOpenPopup() -- loop test sound effect - local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav") + local effectPath = cc.FileUtils:getInstance():fullPathForFilename("res/effect1.wav") effectID = cc.SimpleAudioEngine:getInstance():playEffect(effectPath) menuPopup:setVisible(true) end -- add a popup menu - local menuPopupItem = cc.MenuItemImage:create("menu2.png", "menu2.png") + local menuPopupItem = cc.MenuItemImage:create("res/menu2.png", "res/menu2.png") menuPopupItem:setPosition(0, 0) menuPopupItem:registerScriptTapHandler(menuCallbackClosePopup) menuPopup = cc.Menu:create(menuPopupItem) @@ -189,7 +187,7 @@ local function main() layerMenu:addChild(menuPopup) -- add the left-bottom "tools" menu to invoke menuPopup - local menuToolsItem = cc.MenuItemImage:create("menu1.png", "menu1.png") + local menuToolsItem = cc.MenuItemImage:create("res/menu1.png", "res/menu1.png") menuToolsItem:setPosition(0, 0) menuToolsItem:registerScriptTapHandler(menuCallbackOpenPopup) menuTools = cc.Menu:create(menuToolsItem) @@ -205,9 +203,9 @@ local function main() -- uncomment below for the BlackBerry version -- local bgMusicPath = CCFileUtils:getInstance():fullPathForFilename("background.ogg") - local bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("background.mp3") + local bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("res/background.mp3") cc.SimpleAudioEngine:getInstance():playMusic(bgMusicPath, true) - local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav") + local effectPath = cc.FileUtils:getInstance():fullPathForFilename("res/effect1.wav") cc.SimpleAudioEngine:getInstance():preloadEffect(effectPath) -- run From ea9a9bceb25f43d4e4b06417b0b8fbe5020a23da Mon Sep 17 00:00:00 2001 From: cw Date: Sat, 15 Mar 2014 10:34:21 +0800 Subject: [PATCH 04/98] update lua debugger --- .../scripting/lua-bindings/manual/lua_debugger.c.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/manual/lua_debugger.c.REMOVED.git-id b/cocos/scripting/lua-bindings/manual/lua_debugger.c.REMOVED.git-id index b474b19a28..5f4b4125c3 100644 --- a/cocos/scripting/lua-bindings/manual/lua_debugger.c.REMOVED.git-id +++ b/cocos/scripting/lua-bindings/manual/lua_debugger.c.REMOVED.git-id @@ -1 +1 @@ -fe27a3bee5f56dc93ee7ae540adb0d88245d8072 \ No newline at end of file +9ad446c3528688b8df8fe36f8d72cec5eb49789d \ No newline at end of file From e5331c827d701b304c0a5d4d0332d0255b1bd383 Mon Sep 17 00:00:00 2001 From: cw Date: Sat, 15 Mar 2014 11:12:01 +0800 Subject: [PATCH 05/98] update win32 prebuilt --- .../runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id | 1 + 1 file changed, 1 insertion(+) create mode 100644 templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id diff --git a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id new file mode 100644 index 0000000000..c94ed670ae --- /dev/null +++ b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id @@ -0,0 +1 @@ +129179ac926a4f511943ffc9ea7f36161dcaed0c \ No newline at end of file From d8119321e46c44bb1a07ca552b6f8646eaaa4525 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Sat, 15 Mar 2014 17:30:49 +0800 Subject: [PATCH 06/98] release c++ compile --- cocos/2d/cocos2d.vcxproj | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/2d/cocos2d.vcxproj b/cocos/2d/cocos2d.vcxproj index f0855c3101..d67c7769e3 100644 --- a/cocos/2d/cocos2d.vcxproj +++ b/cocos/2d/cocos2d.vcxproj @@ -129,6 +129,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou ProgramDatabase 4267;4251;4244;%(DisableSpecificWarnings) true + CompileAsCpp if not exist "$(OutDir)" mkdir "$(OutDir)" From 2f62cd2383ee1c2f4b01445a8f47f862e3239512 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Sat, 15 Mar 2014 18:30:58 +0800 Subject: [PATCH 07/98] modify recv namelen array --- .../frameworks/runtime-src/Classes/Runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 5fc3dc5d2f..b0cb758961 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -363,7 +363,7 @@ bool CreateDir(const char *sPathName) bool FileServer::recv_file(int fd) { char buffer[1024]={0}; - char namelen[4]={0}; + char namelen[5]={0}; if (recv(fd, namelen, 4,0)<=0) { return false; } From 441c5cd8d4b9e0af55a89be58edd6eae9c43fdd0 Mon Sep 17 00:00:00 2001 From: honghui Date: Sun, 16 Mar 2014 17:04:22 +0800 Subject: [PATCH 08/98] update prebuilt --- .../runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id | 2 +- .../PrebuiltRuntimeLua iOS.REMOVED.git-id | 2 +- .../Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id index 19e22f2887..b9376d420a 100644 --- a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id @@ -1 +1 @@ -b6ad138951e439ad072da264df619cc7321f46c6 \ No newline at end of file +021afa3f570f33b47ff6e90619e3ed8c2d20593d \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id index bb065b2804..4c92d7c77f 100644 --- a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id @@ -1 +1 @@ -1ffd33761a672e4eb19b2ea7b540523e6b326a14 \ No newline at end of file +6f8825517c4d873ff174504589b1f16c16cc68a9 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id index c1d69d4c62..c968ac9d4c 100644 --- a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id @@ -1 +1 @@ -31b1a0d01d2ab46a60ad179417cdeb24a4e143c8 \ No newline at end of file +ff656aecc97dfb8f86a782e0ae606ad43781b33e \ No newline at end of file From b44b5ce52f179cbaea12fea967691a85e7ff2289 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Sun, 16 Mar 2014 17:32:08 +0800 Subject: [PATCH 09/98] add send \n --- .../frameworks/runtime-src/Classes/Runtime.cpp | 3 +++ templates/lua-template-runtime/src/main.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index b0cb758961..2b87fe5281 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -385,6 +385,8 @@ bool FileServer::recv_file(int fd) fwrite(fullfilename, sizeof(char), length,fp); } fclose(fp); + string finish("finish\n"); + send(fd, finish.c_str(), finish.size(),0); return true; } @@ -536,6 +538,7 @@ public: void onRuntimeVersion(int fd, const std::string &args) { string runtimeVer=getRuntimeVersion(); + runtimeVer += "\n"; send(fd, runtimeVer.c_str(), runtimeVer.size(),0); } diff --git a/templates/lua-template-runtime/src/main.lua b/templates/lua-template-runtime/src/main.lua index 808b6061e6..19965cfdfb 100644 --- a/templates/lua-template-runtime/src/main.lua +++ b/templates/lua-template-runtime/src/main.lua @@ -41,7 +41,7 @@ local function main() local frameHeight = 95 -- create dog animate - local textureDog = cc.TextureCache:getInstance():addImage("res/dog.png") + local textureDog = cc.Director:getInstance():getTextureCache():addImage("res/dog.png") local rect = cc.rect(0, 0, frameWidth, frameHeight) local frame0 = cc.SpriteFrame:createWithTexture(textureDog, rect) rect = cc.rect(frameWidth, 0, frameWidth, frameHeight) From 6c1e2ee181aad747b8b123752b153bed9d9b69e9 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Sun, 16 Mar 2014 21:17:19 +0800 Subject: [PATCH 10/98] add win32 --- .../runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id | 2 +- .../runtime/win32/msvcp110.dll.REMOVED.git-id | 1 + .../runtime/win32/msvcr100.dll.REMOVED.git-id | 1 + .../runtime/win32/msvcr110.dll.REMOVED.git-id | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 templates/lua-template-runtime/runtime/win32/msvcp110.dll.REMOVED.git-id create mode 100644 templates/lua-template-runtime/runtime/win32/msvcr100.dll.REMOVED.git-id create mode 100644 templates/lua-template-runtime/runtime/win32/msvcr110.dll.REMOVED.git-id diff --git a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id index c94ed670ae..b32c602037 100644 --- a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id @@ -1 +1 @@ -129179ac926a4f511943ffc9ea7f36161dcaed0c \ No newline at end of file +f8452d02c4e2844d153a78ff692da55a0e7ce3c3 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/win32/msvcp110.dll.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/msvcp110.dll.REMOVED.git-id new file mode 100644 index 0000000000..3660e5bb6d --- /dev/null +++ b/templates/lua-template-runtime/runtime/win32/msvcp110.dll.REMOVED.git-id @@ -0,0 +1 @@ +93fab5683b15236a71735b2b1693ddd69c9abf8d \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/win32/msvcr100.dll.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/msvcr100.dll.REMOVED.git-id new file mode 100644 index 0000000000..7e3ebabcc9 --- /dev/null +++ b/templates/lua-template-runtime/runtime/win32/msvcr100.dll.REMOVED.git-id @@ -0,0 +1 @@ +3e82b1aeace3a21d8b38ff5f6c1c2d8269da4507 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/win32/msvcr110.dll.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/msvcr110.dll.REMOVED.git-id new file mode 100644 index 0000000000..81682550e1 --- /dev/null +++ b/templates/lua-template-runtime/runtime/win32/msvcr110.dll.REMOVED.git-id @@ -0,0 +1 @@ +1ce960d750c5d069e9de8f9b396cd93ea0811609 \ No newline at end of file From 08a04e64080c9565ce4c3afc83cb637ee2a0f4f4 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Mon, 17 Mar 2014 14:44:20 +0800 Subject: [PATCH 11/98] update release writepath --- .../frameworks/runtime-src/Classes/Runtime.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 2b87fe5281..5beb4aef30 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -495,6 +495,7 @@ public: ConsoleCustomCommand():_fileserver(nullptr) { _writepath = FileUtils::getInstance()->getWritablePath(); + _writepath=replace_all(_writepath,"\\","/"); cocos2d::Console *_console = Director::getInstance()->getConsole(); static struct Console::Command commands[] = { {"shutdownapp","exit runtime app",std::bind(&ConsoleCustomCommand::onShutDownApp, this, std::placeholders::_1, std::placeholders::_2)}, From e89f20a0b38ca3972d8a5e8702ef1435a557638f Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Mon, 17 Mar 2014 15:00:21 +0800 Subject: [PATCH 12/98] update win32 prebuilt --- .../runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id index b32c602037..816a372254 100644 --- a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id @@ -1 +1 @@ -f8452d02c4e2844d153a78ff692da55a0e7ce3c3 \ No newline at end of file +6d5d41f67646b089ecf4e03c7c272cd56ab7544a \ No newline at end of file From 6b2ce283e45f192c08ec56b32549e3f443769a67 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Mon, 17 Mar 2014 20:46:49 +0800 Subject: [PATCH 13/98] fixed win32 don't exit --- .../frameworks/runtime-src/Classes/Runtime.cpp | 8 +++++++- .../frameworks/runtime-src/proj.win32/SimulatorWindow.cpp | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 5beb4aef30..9b93e39c96 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -546,7 +546,13 @@ public: void onShutDownApp(int fd, const std::string &args) { Director::getInstance()->getScheduler()->performFunctionInCocosThread([](){ - exit(0); + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + extern void shutDownApp(); + shutDownApp(); +#else + exit(0); +#endif }); } private: diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp index f72f3e2468..d383352772 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp @@ -204,6 +204,12 @@ void onHelpAbout() DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DIALOG_ABOUT), glfwGetWin32Window(g_eglView->getWindow()), AboutDialogCallback); } +void shutDownApp() +{ + HWND hWnd=glfwGetWin32Window(g_eglView->getWindow()); + ::SendMessage(hWnd,WM_CLOSE,NULL,NULL); +} + /*@brief new windows process*/ LRESULT CALLBACK SNewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { @@ -218,7 +224,7 @@ LRESULT CALLBACK SNewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar switch (wmId) { case ID_FILE_EXIT: - exit(0); + shutDownApp(); break; case ID_VIEW_PORTRAIT: From 05a5e93d048260d19454000350b2155659e7f94a Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Tue, 18 Mar 2014 09:41:14 +0800 Subject: [PATCH 14/98] fixed win32 exit --- .../runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id index 816a372254..ba8fd7b8e0 100644 --- a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id @@ -1 +1 @@ -6d5d41f67646b089ecf4e03c7c272cd56ab7544a \ No newline at end of file +2c22910d81ea4d367386059953ebaa44a07be426 \ No newline at end of file From a346d71a91c042c278fa955b971e4d4600a7ac97 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Tue, 18 Mar 2014 15:56:01 +0800 Subject: [PATCH 15/98] fixed reserlution order --- cocos/2d/platform/apple/CCFileUtilsApple.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos/2d/platform/apple/CCFileUtilsApple.mm b/cocos/2d/platform/apple/CCFileUtilsApple.mm index 9c9443e0f7..c2d32600de 100644 --- a/cocos/2d/platform/apple/CCFileUtilsApple.mm +++ b/cocos/2d/platform/apple/CCFileUtilsApple.mm @@ -302,7 +302,11 @@ std::string FileUtilsApple::getFullPathForDirectoryAndFilename(const std::string } else { - std::string fullPath = directory+filename; + std::string fullPath = directory; + if (!directory.empty() && directory[directory.length()-1] != '/') + fullPath.append("/"); + + fullPath.append(filename); // Search path is an absolute path. if ([s_fileManager fileExistsAtPath:[NSString stringWithUTF8String:fullPath.c_str()]]) { return fullPath; From 7af50608962c4628dafdbe85fcaf07dd9b01f7a6 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Tue, 18 Mar 2014 18:24:58 +0800 Subject: [PATCH 17/98] add pc args --- .../runtime-src/Classes/Runtime.cpp | 44 ++++++++++++------- .../proj.ios_mac/mac/SimulatorApp.mm | 7 +++ .../runtime-src/proj.win32/main.cpp | 15 +++++++ 3 files changed, 49 insertions(+), 17 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 9b93e39c96..0f954e2218 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -39,6 +39,7 @@ THE SOFTWARE. using namespace std; using namespace cocos2d; +std::string g_resourcePath; extern string getIPAddress(); string getRuntimeVersion() { @@ -216,7 +217,6 @@ public: _listenfd = -1; _running = false; _endThread = false; - _writepath = FileUtils::getInstance()->getWritablePath(); } bool listenOnTCP(int port); @@ -235,7 +235,6 @@ private: fd_set _read_set; bool _running; bool _endThread; - std::string _writepath; }; bool FileServer::listenOnTCP(int port) @@ -315,7 +314,7 @@ void FileServer::stop() } } -string& replace_all(string& str,const string& old_value,const string& new_value) +string& replaceAll(string& str,const string& old_value,const string& new_value) { while(true) { @@ -373,9 +372,8 @@ bool FileServer::recv_file(int fd) } char fullfilename[1024]={0}; - sprintf(fullfilename,"%s%s",_writepath.c_str(),buffer); + sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),buffer); string file(fullfilename); - file=replace_all(file,"\\","/"); sprintf(fullfilename, "%s", file.c_str()); cocos2d::log("recv fullfilename = %s",fullfilename); CreateDir(file.substr(0,file.find_last_of("/")).c_str()); @@ -494,8 +492,6 @@ class ConsoleCustomCommand public: ConsoleCustomCommand():_fileserver(nullptr) { - _writepath = FileUtils::getInstance()->getWritablePath(); - _writepath=replace_all(_writepath,"\\","/"); cocos2d::Console *_console = Director::getInstance()->getConsole(); static struct Console::Command commands[] = { {"shutdownapp","exit runtime app",std::bind(&ConsoleCustomCommand::onShutDownApp, this, std::placeholders::_1, std::placeholders::_2)}, @@ -513,6 +509,7 @@ public: } ~ConsoleCustomCommand() { + Director::getInstance()->getConsole()->stop(); _fileserver->stop(); if (_fileserver) { delete _fileserver; @@ -563,19 +560,32 @@ private: void startRuntime() { + vector oldSearchPathArray; + oldSearchPathArray=FileUtils::getInstance()->getSearchPaths(); + vector newSearchPathArray; +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + if (g_resourcePath.empty()) + { + g_resourcePath = FileUtils::getInstance()->getWritablePath(); + } + +#else + g_resourcePath = FileUtils::getInstance()->getWritablePath(); + +#endif + + g_resourcePath=replaceAll(g_resourcePath,"\\","/"); + newSearchPathArray.push_back(g_resourcePath); + FileUtils::getInstance()->setSearchPaths(newSearchPathArray); + for (unsigned i = 0; i < oldSearchPathArray.size(); i++) + { + FileUtils::getInstance()->addSearchPath(oldSearchPathArray[i]); + } + static ConsoleCustomCommand s_customCommand; auto engine = LuaEngine::getInstance(); ScriptEngineManager::getInstance()->setScriptEngine(engine); luaopen_debugger(engine->getLuaStack()->getLuaState()); - static ConsoleCustomCommand s_customCommand; - vector searchPathArray; - searchPathArray=FileUtils::getInstance()->getSearchPaths(); - vector writePathArray; - writePathArray.push_back(FileUtils::getInstance()->getWritablePath()); - FileUtils::getInstance()->setSearchPaths(writePathArray); - for (unsigned i = 0; i < searchPathArray.size(); i++) - { - FileUtils::getInstance()->addSearchPath(searchPathArray[i]); - } + auto scene = Scene::create(); auto layer = new ConnectWaitLayer(); layer->autorelease(); diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm index 7ef45ef4e9..af5df54d00 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm @@ -63,6 +63,13 @@ using namespace cocos2d; - (void) applicationDidFinishLaunching:(NSNotification *)aNotification { + NSArray *args = [[NSProcessInfo processInfo] arguments]; + + if (args!=nullptr && [args count]>=2) { + extern std::string g_resourcePath; + g_resourcePath = [[args objectAtIndex:1]UTF8String]; + } + AppDelegate app; [self createSimulator:[NSString stringWithUTF8String:"HelloLua"] viewWidth:960 viewHeight:640 factor:1.0]; Application::getInstance()->run(); diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp index 14085d53d7..80f98b6e56 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp @@ -16,6 +16,21 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); + LPWSTR *szArgList=nullptr; + int argCount=0; + + szArgList = CommandLineToArgvW(GetCommandLine(),&argCount); + if (argCount >=2 ) + { + int iLen = 2*wcslen(szArgList[1]); + char* chRtn = new char[iLen+1]; + wcstombs(chRtn,szArgList[1],iLen+1); + extern std::string g_resourcePath; + g_resourcePath = chRtn; + delete [] chRtn; + } + LocalFree(szArgList); + #ifdef USE_WIN32_CONSOLE AllocConsole(); freopen("CONIN$", "r", stdin); From a0b8200b79bdf6549bf0092d193ccc86a99d2a95 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Wed, 19 Mar 2014 09:50:06 +0800 Subject: [PATCH 18/98] forget include --- .../frameworks/runtime-src/proj.win32/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp index 80f98b6e56..01f8e4fa99 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp @@ -2,7 +2,7 @@ #include "AppDelegate.h" #include "cocos2d.h" #include "SimulatorWindow.h" - +#include USING_NS_CC; // uncomment below line, open debug console From 46d58775d7654080db32e708cd303b0450d34800 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Wed, 19 Mar 2014 17:23:06 +0800 Subject: [PATCH 19/98] update search path --- .../runtime-src/Classes/Runtime.cpp | 21 +++++++++---------- .../proj.ios_mac/mac/SimulatorApp.mm | 5 +++++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 0f954e2218..e4d09e66b5 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -560,27 +560,26 @@ private: void startRuntime() { - vector oldSearchPathArray; - oldSearchPathArray=FileUtils::getInstance()->getSearchPaths(); - vector newSearchPathArray; + vector searchPathArray; + searchPathArray=FileUtils::getInstance()->getSearchPaths(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) if (g_resourcePath.empty()) { - g_resourcePath = FileUtils::getInstance()->getWritablePath(); + extern std::string getCurAppPath(); + string resourcePath = getCurAppPath(); + resourcePath.append("/../../"); + resourcePath =replaceAll(resourcePath,"\\","/"); + g_resourcePath = resourcePath; } #else g_resourcePath = FileUtils::getInstance()->getWritablePath(); #endif - + g_resourcePath=replaceAll(g_resourcePath,"\\","/"); - newSearchPathArray.push_back(g_resourcePath); - FileUtils::getInstance()->setSearchPaths(newSearchPathArray); - for (unsigned i = 0; i < oldSearchPathArray.size(); i++) - { - FileUtils::getInstance()->addSearchPath(oldSearchPathArray[i]); - } + searchPathArray.insert(searchPathArray.begin(),g_resourcePath); + FileUtils::getInstance()->setSearchPaths(searchPathArray); static ConsoleCustomCommand s_customCommand; auto engine = LuaEngine::getInstance(); ScriptEngineManager::getInstance()->setScriptEngine(engine); diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm index af5df54d00..37392458d3 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm @@ -52,6 +52,11 @@ using namespace cocos2d; @synthesize menu; +std::string getCurAppPath(void) +{ + return [[[NSBundle mainBundle] bundlePath] UTF8String]; +} + -(void) dealloc { Director::getInstance()->end(); From 0d4afe3c540b0a348efb7616c88a78c75dc2aa16 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Wed, 19 Mar 2014 18:12:09 +0800 Subject: [PATCH 20/98] reset files --- cocos/2d/platform/apple/CCFileUtilsApple.mm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cocos/2d/platform/apple/CCFileUtilsApple.mm b/cocos/2d/platform/apple/CCFileUtilsApple.mm index c2d32600de..9c9443e0f7 100644 --- a/cocos/2d/platform/apple/CCFileUtilsApple.mm +++ b/cocos/2d/platform/apple/CCFileUtilsApple.mm @@ -302,11 +302,7 @@ std::string FileUtilsApple::getFullPathForDirectoryAndFilename(const std::string } else { - std::string fullPath = directory; - if (!directory.empty() && directory[directory.length()-1] != '/') - fullPath.append("/"); - - fullPath.append(filename); + std::string fullPath = directory+filename; // Search path is an absolute path. if ([s_fileManager fileExistsAtPath:[NSString stringWithUTF8String:fullPath.c_str()]]) { return fullPath; From b505e0650059c9fb9ec4d7f96df581bfc1d0f98b Mon Sep 17 00:00:00 2001 From: cw Date: Thu, 20 Mar 2014 10:38:36 +0800 Subject: [PATCH 21/98] update beside win32 --- .../PrebuiltRuntimeLua.apk.REMOVED.git-id | 2 +- .../PrebuiltRuntimeLua iOS.REMOVED.git-id | 2 +- .../PrebuiltRuntimeLua Mac.REMOVED.git-id | 2 +- .../Contents/Resources/WorkSpaceDialog.nib | Bin 8435 -> 8247 bytes 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id index b9376d420a..7ed617e06f 100644 --- a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id @@ -1 +1 @@ -021afa3f570f33b47ff6e90619e3ed8c2d20593d \ No newline at end of file +900895936333568edb198fccedfeeb3c27d8001b \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id index 4c92d7c77f..e477e6dab3 100644 --- a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id @@ -1 +1 @@ -6f8825517c4d873ff174504589b1f16c16cc68a9 \ No newline at end of file +ae4e396e0663c4f6240d38f76d3b4629c6576b44 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id index c968ac9d4c..d364c26344 100644 --- a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id @@ -1 +1 @@ -ff656aecc97dfb8f86a782e0ae606ad43781b33e \ No newline at end of file +229b00fd32b603fb3886952376223b25becbc3b0 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/WorkSpaceDialog.nib b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/Resources/WorkSpaceDialog.nib index 66abf393b89155c75704803569ff657f15453e2d..0895df15e87b6c272200da271a0b1a19e55196a9 100644 GIT binary patch literal 8247 zcmcgx33yahmOl5^`s&s4QdLRnJwyr!LLi1D5SD*CD_@d& z@7;Uuf6jl-f0x(T7L6oR1qH`|00jdW!31WyiC$Bevs_IiBk@>WPP}o68cHSSDp0`{3vB3%Cy+fEVF+@DlthyasQ>JMa;F41b2dz~}G<{GAwyiI_cqL$tZFqnLsMZR5FbONDY}o=8<|5BdbUk*+90E>&PwSR&oc~Lk^I;$$jL0@(_8L z93qdCr^z$qMe;jxgd8Prl9S|J@^9oL@-aD0J|ll8Us9li8mNhysfF68NF|y*ibj5cp_Pw6N(0t$$A}_)|ydfVJp~jmSop46aH>x*R%E`;74Ek z!+`ndkk+Fr*s3xEGa|~l@x;PD1|Z{GZ0TFLMldo zlA26KVnL0oxmAJb!A3QT;Sg9KcFCJC5hlT8>{kI-!4#;3sW1(u!wjf`nNSV0@F##d zRgJ_?RHISsUy(q68>CB-mS_|injUYCgo4rO!H#%3H7SzNlcGWL~WvN95Do)Jtg<(X2Yu1L*RlWp->SWO@cfpnXiSRPT^(ShX^(O@%Xz@Vx? z4K}NYsL^m)G}0VvRb$vGl&Xv+)l{-p*MfOffypr~c41~`qLnEEvoTu+u}egF4V{|{ zbubSdt%Q1*4+~%+EP@6kB9Ly>#!KSh+_gYtCAycPC8FAntS3{6U?i4GGGGH(87pVa z83Y=n%+AiDf;|725nXxy&f>yRdH$lJuC6zr5kfdf7*uG2W@v#3EI~%1(2CKFLmMmu z%}p(q+&jIJw9L|mLmw~zZSh2kBbby3wkOMjp{31_a$hpj%0?S|ymgSa8jiuGcAPvi*9U-rP4p<4DNVFCK41W^` zh}T+C3@jZA{F7nyG8dDOy!`3uP$V3@3i%DIb1L;Lz8Y3zj|zme53YvX<7jvdtc7*3 z9yY*6*aX+WX3c*MyJlAds(t5`rUfII(yC2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ab3@SN~R;jr+z@TKsz@Qv`D@V)S(aLGknDwoEk zb8#-C%j`;WCA(}chbz_Pbh%t@UF}^RT%BBn(dnFx>Mdg0i}uW?aFua|E|0K7kTBv8UO$Q From e58270b0994242b98085bfeddd2e3848a2a78fd7 Mon Sep 17 00:00:00 2001 From: cw Date: Thu, 20 Mar 2014 11:12:03 +0800 Subject: [PATCH 22/98] updatewin32 --- .../runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id index ba8fd7b8e0..6abeef8dc2 100644 --- a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id @@ -1 +1 @@ -2c22910d81ea4d367386059953ebaa44a07be426 \ No newline at end of file +09c195d853872d33e95bdf5357f5c0182d82270b \ No newline at end of file From 8a40fbc1597e39004f0eca944954d8c0209b2986 Mon Sep 17 00:00:00 2001 From: cw Date: Fri, 21 Mar 2014 11:56:21 +0800 Subject: [PATCH 23/98] update pc show msg --- .../frameworks/runtime-src/Classes/Runtime.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index e4d09e66b5..5610628dbc 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -169,7 +169,15 @@ public: addChild(label, 9999); label->setPosition( Point(VisibleRect::center().x, VisibleRect::top().y - 30) ); - auto labelwait = LabelTTF::create("wait transfer files ...", "Arial", 22); + string strShowMsg =""; + if (CC_PLATFORM_WIN32 == CC_TARGET_PLATFORM || CC_PLATFORM_MAC == CC_TARGET_PLATFORM) + { + strShowMsg = "waiting for debugger to connect ..."; + }else + { + strShowMsg = "waiting for file transfer ..."; + } + auto labelwait = LabelTTF::create(strShowMsg.c_str(), "Arial", 22); addChild(labelwait, 10000); labelwait->setPosition( Point(VisibleRect::center().x, VisibleRect::center().y) ); From 2b458d6f8fd13c20a747883e92ee0fed533088d2 Mon Sep 17 00:00:00 2001 From: cw Date: Fri, 21 Mar 2014 14:13:57 +0800 Subject: [PATCH 24/98] update prebuilt runtime pc --- .../Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id | 2 +- .../runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id index d364c26344..9bbfa4e13a 100644 --- a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id @@ -1 +1 @@ -229b00fd32b603fb3886952376223b25becbc3b0 \ No newline at end of file +9abcb82aa0c4a9055f0fa6cb9e87948b4b83cd3e \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id index 6abeef8dc2..1d70b89ccb 100644 --- a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id @@ -1 +1 @@ -09c195d853872d33e95bdf5357f5c0182d82270b \ No newline at end of file +c388f57e659d1a8d7a2fdb4cd7478d1824b10f32 \ No newline at end of file From 3c575d36d829acc15da8088066784293f1c0b37d Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Fri, 21 Mar 2014 15:53:02 +0800 Subject: [PATCH 25/98] / --- .../frameworks/runtime-src/Classes/Runtime.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 5610628dbc..946c7c6c9f 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -382,6 +382,7 @@ bool FileServer::recv_file(int fd) char fullfilename[1024]={0}; sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),buffer); string file(fullfilename); + file=replaceAll(file,"\\","/"); sprintf(fullfilename, "%s", file.c_str()); cocos2d::log("recv fullfilename = %s",fullfilename); CreateDir(file.substr(0,file.find_last_of("/")).c_str()); From c0db4e91d12ae595da3992a6fd17dee943b544b1 Mon Sep 17 00:00:00 2001 From: cw Date: Fri, 21 Mar 2014 15:59:26 +0800 Subject: [PATCH 26/98] fixed "/" --- .../runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id index 7ed617e06f..c44c598c42 100644 --- a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id @@ -1 +1 @@ -900895936333568edb198fccedfeeb3c27d8001b \ No newline at end of file +28c623da66fd86b306264dd7edecc106a685c9f3 \ No newline at end of file From 504501896f7f28ddfe55871cdfd0b55adf538ddd Mon Sep 17 00:00:00 2001 From: koowolf <450928375@qq.com> Date: Fri, 21 Mar 2014 16:39:00 +0800 Subject: [PATCH 27/98] closed #4497: use /z7 to build without .pdb, or will face with error c3130. --- tests/cpp-tests/proj.win32/cpp-tests.vcxproj | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj index 172ef28da3..b37c6a7ce9 100644 --- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj +++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj @@ -109,9 +109,10 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(Ou Level3 - ProgramDatabase + OldStyle 4267;4251;4244;%(DisableSpecificWarnings) true + false libcurl_imp.lib;websockets.lib;%(AdditionalDependencies) @@ -583,4 +584,4 @@ xcopy /Y /Q "$(ProjectDir)..\..\..\external\websockets\prebuilt\win32\*.*" "$(Ou - + \ No newline at end of file From 749a00e5a9356e15def026c0eaf8182012fad844 Mon Sep 17 00:00:00 2001 From: cw Date: Wed, 26 Mar 2014 11:27:50 +0800 Subject: [PATCH 28/98] update sim to support Xcode 5.1 --- .../lua-template-default/runtime/ios/ios-sim | Bin 87876 -> 97144 bytes .../lua-template-runtime/runtime/ios/ios-sim | Bin 87876 -> 97144 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/templates/lua-template-default/runtime/ios/ios-sim b/templates/lua-template-default/runtime/ios/ios-sim index 4f997e03a6d9e59f72350f9d44bc197aac456077..51a7a05fd8a3a14e918e6b322f3c02f0bac70df8 100755 GIT binary patch literal 97144 zcmeFa3w%`7xi-E72?PWZkSHkHDFy|Bgj+C#iwViVL=r#}F0H~4k_m}~B+iA4f<}`G zjN1Wfy-+We(`sw2ZLz2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&!%Pp zQM{hJd6YkKJyUIt>v{Qx<9ZgJa9rj5HOEzkFQpTlj#c>_a$IHaF8H~`>pmWETsD8q zaoO`p$7QQuz?F{j^``hlGSp5#HR+rdMOv#=GtP+5hL<}&7hdW3h4AH$SHaggUJLJV zJP99$Pr+F%zv@159MI~Mc)#Q7oA|Kf>YwaQ(H5SKq}KOg#5}P89tX&gHAP zN2lZ5_WTP0zc%1|EH9J(la`ZH{KrB3KLS4W6qBaWsSfy+mYZ~L4EVl4=Z6758tA+g z#Fyb5=bBCWGXvgaxk;bVq0%w@wt(*m_@kDabdFk1X(3+$e>>nG2K;31E$JKm(*r&& z;GYe6MZjwUzQ}S)ICF&rJQMI60{xo6!`|qk^#zqFMoIeNJ6Ff-)mR=4;fdWhMwk3?bWKO^prd`Pdfec`IK^WR7>he% zj1jGIsvp~MhPcF!Ymismfkj>Wua45$VOpxM+v>Uou|;V+5^YsKO@jWx5id8JIYnAD zx@BWc`r>A4^>Mpu(^bX0a*7OTbLlrTyv?Q-jazwF7yJ`g%1647=`996Q7@ge@fBnuyB%gJ@0?qJCG9sGXAC2N(wiCE$l&(0 zcPdzyMA1vFXm}aU5kKHMH}re_!&>bpwD_%AbONX8W^Fi*l(U1iiW4s$Ayt%K-oVkA zy}`h)G4}dF`Z2rR2wpo Date: Wed, 26 Mar 2014 14:48:04 +0800 Subject: [PATCH 29/98] update socket protocol --- .../runtime-src/Classes/Runtime.cpp | 157 +++++++++++++----- .../runtime-src/proj.win32/HelloLua.vcxproj | 4 +- 2 files changed, 117 insertions(+), 44 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 946c7c6c9f..2eec792f0f 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -26,6 +26,10 @@ THE SOFTWARE. #include "lua_debugger.h" #include "CCLuaEngine.h" #include "cocos2d.h" +#include "json/document.h" +#include "json/filestream.h" +#include "json/stringbuffer.h" +#include "json/writer.h" #ifdef _WIN32 #include @@ -40,6 +44,8 @@ using namespace std; using namespace cocos2d; std::string g_resourcePath; +rapidjson::Document g_filecfgjson; + extern string getIPAddress(); string getRuntimeVersion() { @@ -367,20 +373,53 @@ bool CreateDir(const char *sPathName) return true; } +void updateResFileInfo(string filename,string filetime) +{ + g_filecfgjson[filename.c_str()] = filetime.c_str(); + rapidjson::StringBuffer buffer; + rapidjson::Writer< rapidjson::StringBuffer > writer(buffer); + g_filecfgjson.Accept(writer); + const char* str = buffer.GetString(); + + string filecfg = g_resourcePath; + filecfg.append("/"); + filecfg.append("fileinfo_debug.json"); + FILE * pFile = fopen (filecfg.c_str() , "w"); + fwrite(str,sizeof(char),strlen(str),pFile); + fclose(pFile); +} + +void readResFile() +{ + string filecfg = g_resourcePath; + filecfg.append("/"); + filecfg.append("fileinfo_debug.json"); + FILE * pFile = fopen (filecfg.c_str() , "r"); + rapidjson::FileStream inputStream(pFile); + g_filecfgjson.ParseStream<0>(inputStream); + fclose(pFile); +} + bool FileServer::recv_file(int fd) { - char buffer[1024]={0}; - char namelen[5]={0}; - if (recv(fd, namelen, 4,0)<=0) { + char filename[1024]={0}; + char headlen[5]={0}; + if (recv(fd, headlen, 4,0)<=0) { + return false; + } + if (recv(fd, filename, atoi(headlen),0)<=0) { return false; } - if (recv(fd, buffer, atoi(namelen),0)<=0) { + char filetimeinfo[1024]={0}; + if (recv(fd, headlen, 4,0)<=0) { + return false; + } + if (recv(fd, filetimeinfo, atoi(headlen),0)<=0) { return false; } - char fullfilename[1024]={0}; - sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),buffer); + sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),filename); string file(fullfilename); file=replaceAll(file,"\\","/"); sprintf(fullfilename, "%s", file.c_str()); @@ -394,6 +433,7 @@ bool FileServer::recv_file(int fd) fclose(fp); string finish("finish\n"); send(fd, finish.c_str(), finish.size(),0); + updateResFileInfo(filename,filetimeinfo); return true; } @@ -503,11 +543,8 @@ public: { cocos2d::Console *_console = Director::getInstance()->getConsole(); static struct Console::Command commands[] = { - {"shutdownapp","exit runtime app",std::bind(&ConsoleCustomCommand::onShutDownApp, this, std::placeholders::_1, std::placeholders::_2)}, - {"start-logic","run game logic script.Arg:[debugArg]",std::bind(&ConsoleCustomCommand::onRunLogicScript, this, std::placeholders::_1, std::placeholders::_2)}, - {"reload","reload script.Args:[filepath]",std::bind(&ConsoleCustomCommand::onReloadScriptFile, this, std::placeholders::_1, std::placeholders::_2)}, - {"getversion","get runtime version.",std::bind(&ConsoleCustomCommand::onRuntimeVersion, this, std::placeholders::_1, std::placeholders::_2)}, - }; + {"sendcmd","send command to runtime.Args[json format]",std::bind(&ConsoleCustomCommand::onSendCommand, this, std::placeholders::_1, std::placeholders::_2)}, + }; for (int i=0;i< sizeof(commands)/sizeof(Console::Command);i++) { _console->addCommand(commands[i]); } @@ -526,41 +563,77 @@ public: } } - void onRunLogicScript(int fd, const std::string &args) - { + void onSendCommand(int fd, const std::string &args) + { Director::getInstance()->getScheduler()->performFunctionInCocosThread([=](){ - char szDebugArg[1024]={0}; - sprintf(szDebugArg, "require('debugger')(%s,'%s')",args.c_str(),_writepath.c_str()); - startScript(szDebugArg); - }); - } - - void onReloadScriptFile(int fd,const std::string &args) - { - Director::getInstance()->getScheduler()->performFunctionInCocosThread([=](){ - reloadScript(args.c_str()); - }); - } - - void onRuntimeVersion(int fd, const std::string &args) - { - string runtimeVer=getRuntimeVersion(); - runtimeVer += "\n"; - send(fd, runtimeVer.c_str(), runtimeVer.size(),0); - } - - void onShutDownApp(int fd, const std::string &args) - { - Director::getInstance()->getScheduler()->performFunctionInCocosThread([](){ - + rapidjson::Document dArgParse; + dArgParse.Parse<0>(args.c_str()); + if (dArgParse.HasMember("cmd")) + { + if (strcmp(dArgParse["cmd"].GetString(),"start-logic")==0) + { + char szDebugArg[1024]={0}; + if (dArgParse.HasMember("debugcfg")) + { + sprintf(szDebugArg, "require('debugger')(%s,'%s')",dArgParse["debugcfg"].GetString(),_writepath.c_str()); + } + startScript(szDebugArg); + + }else if(strcmp(dArgParse["cmd"].GetString(),"reload")==0) + { + if (dArgParse.HasMember("modulefiles")) + { + const rapidjson::Value& objectfiles = dArgParse["modulefiles"]; + for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) + { + reloadScript(objectfiles[i].GetString()); + } + } + }else if(strcmp(dArgParse["cmd"].GetString(),"getversion")==0) + { + dArgParse["version"] = getRuntimeVersion().c_str(); + + }else if(strcmp(dArgParse["cmd"].GetString(),"getfileinfo")==0) + { + for (auto it=g_filecfgjson.MemberonBegin();it!=g_filecfgjson.MemberonEnd();++it) + { + dArgParse[it->name.GetString()]=it->value; + } + + }else if(strcmp(dArgParse["cmd"].GetString(),"getIP")==0) + { + dArgParse["IP"] = getIPAddress().c_str(); + + }else if(strcmp(dArgParse["cmd"].GetString(),"remove")==0) + { + if (dArgParse.HasMember("files")) + { + const rapidjson::Value& objectfiles = dArgParse["files"]; + for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) + { + string filename(g_resourcePath); + filename.append("/"); + filename.append(objectfiles[i].GetString()); + remove(filename.c_str()); + } + } + + }else if(strcmp(dArgParse["cmd"].GetString(),"shutdownapp")==0) + { #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - extern void shutDownApp(); - shutDownApp(); + extern void shutDownApp(); + shutDownApp(); #else - exit(0); + exit(0); #endif - }); - } + } + + char replymsg[1024]={0}; + sprintf(replymsg,"%d:%s",strlen(dArgParse.GetString()),dArgParse.GetString()); + send(fd,replymsg,strlen(replymsg),0); + } + }); + } private: FileServer* _fileserver; string _writepath; diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj index 1c05d2dffb..572e290e82 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj @@ -66,7 +66,7 @@ - $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) + $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) Level3 @@ -231,4 +231,4 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" - + \ No newline at end of file From 5aa3a5d956cb47ffac24238cb66d76ef16027cf7 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Fri, 28 Mar 2014 11:37:17 +0800 Subject: [PATCH 30/98] update socket rules --- .../runtime-src/Classes/Runtime.cpp | 93 +++++++++++++------ .../frameworks/runtime-src/Classes/Runtime.h | 2 +- .../runtime-src/proj.win32/HelloLua.vcxproj | 6 +- 3 files changed, 72 insertions(+), 29 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 2eec792f0f..99c0e6b0c6 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -47,7 +47,7 @@ std::string g_resourcePath; rapidjson::Document g_filecfgjson; extern string getIPAddress(); -string getRuntimeVersion() +const char* getRuntimeVersion() { return "0.0.1"; } @@ -63,14 +63,14 @@ void startScript(string strDebugArg) engine->executeScriptFile("src/main.lua"); } -void reloadScript(const string& modulefile) +bool reloadScript(const string& modulefile) { string strfile = modulefile; if (strfile.empty()) { strfile = "src/main.lua"; } - LuaEngine::getInstance()->reload(strfile.c_str()); + return (LuaEngine::getInstance()->reload(strfile.c_str())==0); } @@ -570,55 +570,88 @@ public: dArgParse.Parse<0>(args.c_str()); if (dArgParse.HasMember("cmd")) { - if (strcmp(dArgParse["cmd"].GetString(),"start-logic")==0) + string strcmd = dArgParse["cmd"].GetString(); + + rapidjson::Document dReplyParse; + dReplyParse.SetObject(); + dReplyParse.AddMember("cmd",strcmd.c_str(),dReplyParse.GetAllocator()); + //dReplyParse.AddMember("cmd",dArgParse["cmd"]); + if (dArgParse.HasMember("seq")) { + dReplyParse.AddMember("seq",dArgParse["seq"],dReplyParse.GetAllocator()); + } + + if(strcmp(strcmd.c_str(),"start-logic")==0) { char szDebugArg[1024]={0}; - if (dArgParse.HasMember("debugcfg")) - { - sprintf(szDebugArg, "require('debugger')(%s,'%s')",dArgParse["debugcfg"].GetString(),_writepath.c_str()); - } + sprintf(szDebugArg, "require('debugger')(%s,'%s')",dArgParse["debugcfg"].GetString(),g_resourcePath.c_str()); startScript(szDebugArg); + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else if(strcmp(dArgParse["cmd"].GetString(),"reload")==0) + }else if(strcmp(strcmd.c_str(),"reload")==0) { if (dArgParse.HasMember("modulefiles")) { + rapidjson::Value bodyvalue(rapidjson::kObjectType); const rapidjson::Value& objectfiles = dArgParse["modulefiles"]; for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) { - reloadScript(objectfiles[i].GetString()); + if (!reloadScript(objectfiles[i].GetString())) { + bodyvalue.AddMember(objectfiles[i].GetString(),1,dReplyParse.GetAllocator()); + } } + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); } - }else if(strcmp(dArgParse["cmd"].GetString(),"getversion")==0) + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + }else if(strcmp(strcmd.c_str(),"getversion")==0) { - dArgParse["version"] = getRuntimeVersion().c_str(); - - }else if(strcmp(dArgParse["cmd"].GetString(),"getfileinfo")==0) + rapidjson::Value bodyvalue(rapidjson::kObjectType); + bodyvalue.AddMember("version",getRuntimeVersion(),dReplyParse.GetAllocator()); + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + }else if(strcmp(strcmd.c_str(),"getfileinfo")==0) { + rapidjson::Value bodyvalue(rapidjson::kObjectType); for (auto it=g_filecfgjson.MemberonBegin();it!=g_filecfgjson.MemberonEnd();++it) { - dArgParse[it->name.GetString()]=it->value; + bodyvalue.AddMember(it->name.GetString(),it->value,dReplyParse.GetAllocator()); } - - }else if(strcmp(dArgParse["cmd"].GetString(),"getIP")==0) + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + + }else if(strcmp(strcmd.c_str(),"getIP")==0) { - dArgParse["IP"] = getIPAddress().c_str(); + rapidjson::Value bodyvalue(rapidjson::kObjectType); + rapidjson::Value IPValue(rapidjson::kStringType); + IPValue.SetString(getIPAddress().c_str(),dReplyParse.GetAllocator()); + bodyvalue.AddMember("IP",IPValue,dReplyParse.GetAllocator()); + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else if(strcmp(dArgParse["cmd"].GetString(),"remove")==0) + }else if(strcmp(strcmd.c_str(),"remove")==0) { if (dArgParse.HasMember("files")) { + rapidjson::Value bodyvalue(rapidjson::kObjectType); const rapidjson::Value& objectfiles = dArgParse["files"]; for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) { string filename(g_resourcePath); filename.append("/"); filename.append(objectfiles[i].GetString()); - remove(filename.c_str()); + if (FileUtils::getInstance()->isFileExist(filename)) { + if(remove(filename.c_str())!=0) + bodyvalue.AddMember(objectfiles[i].GetString(),2,dReplyParse.GetAllocator()); + }else + { + bodyvalue.AddMember(objectfiles[i].GetString(),1,dReplyParse.GetAllocator()); + } + } + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); } + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else if(strcmp(dArgParse["cmd"].GetString(),"shutdownapp")==0) + }else if(strcmp(strcmd.c_str(),"shutdownapp")==0) { #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) extern void shutDownApp(); @@ -628,16 +661,20 @@ public: #endif } - char replymsg[1024]={0}; - sprintf(replymsg,"%d:%s",strlen(dArgParse.GetString()),dArgParse.GetString()); - send(fd,replymsg,strlen(replymsg),0); + rapidjson::StringBuffer buffer; + rapidjson::Writer< rapidjson::StringBuffer > writer(buffer); + dReplyParse.Accept(writer); + const char* str = buffer.GetString(); + char msgSize[64]={0x1,0}; + sprintf(msgSize+1,"%d:",strlen(str)); + string replymsg(msgSize); + replymsg.append(str); + send(fd,replymsg.c_str(),replymsg.size(),0); } }); } private: FileServer* _fileserver; - string _writepath; - }; void startRuntime() @@ -649,7 +686,11 @@ void startRuntime() { extern std::string getCurAppPath(); string resourcePath = getCurAppPath(); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) resourcePath.append("/../../"); +#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + resourcePath.append("/../../../"); +#endif resourcePath =replaceAll(resourcePath,"\\","/"); g_resourcePath = resourcePath; } diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.h b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.h index 7315cc01b1..ef471ef8d1 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.h +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.h @@ -32,7 +32,7 @@ using namespace std; void startRuntime(); -void reloadScript(const string& modulefile); +bool reloadScript(const string& modulefile); // SimulatorConfig typedef struct _SimulatorScreenSize { diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj index 572e290e82..106ebacc97 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj @@ -111,7 +111,8 @@ mkdir "$(OutDir)\Resource\src" mkdir "$(OutDir)\Resource\res" xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\lua-bindings\script" "$(OutDir)\Resource" /e /Y xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\Resource\src" /e /Y -xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\Resource\res" /e /Y +xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\Resource\res" /e /Y +xcopy "$(ProjectDir)..\..\cocos2d-x\external\lua\luasocket\*.lua" "$(OutDir)\Resource" /e /Y copy files @@ -165,7 +166,8 @@ mkdir "$(OutDir)\Resource\src" mkdir "$(OutDir)\Resource\res" xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\lua-bindings\script" "$(OutDir)\Resource" /e /Y xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\Resource\src" /e /Y -xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\Resource\res" /e /Y +xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\Resource\res" /e /Y +xcopy "$(ProjectDir)..\..\cocos2d-x\external\lua\luasocket\*.lua" "$(OutDir)\Resource" /e /Y copy files From 4b691cf7e976fe3dfffa3d6e3996e29a8647a81a Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Fri, 28 Mar 2014 15:06:49 +0800 Subject: [PATCH 31/98] add fileinfo support --- .../frameworks/runtime-src/Classes/Runtime.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 99c0e6b0c6..1188051a89 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -375,7 +375,22 @@ bool CreateDir(const char *sPathName) void updateResFileInfo(string filename,string filetime) { - g_filecfgjson[filename.c_str()] = filetime.c_str(); + + if(!g_filecfgjson.IsObject()) + { + g_filecfgjson.SetObject(); + } + if (g_filecfgjson.HasMember(filename.c_str())) { + g_filecfgjson.RemoveMember(filename.c_str()); + } + rapidjson::Value filetimeValue(rapidjson::kStringType); + filetimeValue.SetString(filetime.c_str(),g_filecfgjson.GetAllocator()); + + rapidjson::Value filenameValue(rapidjson::kStringType); + filenameValue.SetString(filename.c_str(),g_filecfgjson.GetAllocator()); + g_filecfgjson.AddMember(filenameValue.GetString(),filetimeValue,g_filecfgjson.GetAllocator()); + + //g_filecfgjson[filename.c_str()] = filetime.c_str(); rapidjson::StringBuffer buffer; rapidjson::Writer< rapidjson::StringBuffer > writer(buffer); g_filecfgjson.Accept(writer); @@ -708,6 +723,7 @@ void startRuntime() ScriptEngineManager::getInstance()->setScriptEngine(engine); luaopen_debugger(engine->getLuaStack()->getLuaState()); + readResFile(); auto scene = Scene::create(); auto layer = new ConnectWaitLayer(); layer->autorelease(); From c016f80f586fea75cb425ffe845c3ad67619eb83 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Fri, 28 Mar 2014 15:45:10 +0800 Subject: [PATCH 32/98] fixed no json file bug --- .../frameworks/runtime-src/Classes/Runtime.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 1188051a89..5f60ac5808 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -410,8 +410,11 @@ void readResFile() filecfg.append("/"); filecfg.append("fileinfo_debug.json"); FILE * pFile = fopen (filecfg.c_str() , "r"); - rapidjson::FileStream inputStream(pFile); - g_filecfgjson.ParseStream<0>(inputStream); + if(pFile) + { + rapidjson::FileStream inputStream(pFile); + g_filecfgjson.ParseStream<0>(inputStream); + } fclose(pFile); } From 0d65057116f70029b0c2362f7da5625de483f651 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Fri, 28 Mar 2014 16:07:29 +0800 Subject: [PATCH 33/98] update runtime --- .../frameworks/runtime-src/Classes/Runtime.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 5f60ac5808..16d3d635e4 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -376,10 +376,6 @@ bool CreateDir(const char *sPathName) void updateResFileInfo(string filename,string filetime) { - if(!g_filecfgjson.IsObject()) - { - g_filecfgjson.SetObject(); - } if (g_filecfgjson.HasMember(filename.c_str())) { g_filecfgjson.RemoveMember(filename.c_str()); } @@ -414,8 +410,12 @@ void readResFile() { rapidjson::FileStream inputStream(pFile); g_filecfgjson.ParseStream<0>(inputStream); + fclose(pFile); + } + if(!g_filecfgjson.IsObject()) + { + g_filecfgjson.SetObject(); } - fclose(pFile); } bool FileServer::recv_file(int fd) From 2649c5b97113118aa6d91b94526d3939401e8b5c Mon Sep 17 00:00:00 2001 From: cw Date: Fri, 28 Mar 2014 16:26:56 +0800 Subject: [PATCH 34/98] add socket --- .../HelloLua.xcodeproj/project.pbxproj | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj index f81659bdb7..f1740b1ea5 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj @@ -99,6 +99,26 @@ C07828FA18B4D72E00BD2287 /* SimulatorApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = C07828F718B4D72E00BD2287 /* SimulatorApp.mm */; }; C07828FD18B4DC6F00BD2287 /* Runtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C07828FB18B4DC6F00BD2287 /* Runtime.cpp */; }; C07828FE18B4DC7000BD2287 /* Runtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C07828FB18B4DC6F00BD2287 /* Runtime.cpp */; }; + C08D5D5618E567C6009071A4 /* ftp.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D4C18E567C6009071A4 /* ftp.lua */; }; + C08D5D5718E567C6009071A4 /* ftp.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D4C18E567C6009071A4 /* ftp.lua */; }; + C08D5D5818E567C6009071A4 /* headers.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D4D18E567C6009071A4 /* headers.lua */; }; + C08D5D5918E567C6009071A4 /* headers.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D4D18E567C6009071A4 /* headers.lua */; }; + C08D5D5A18E567C6009071A4 /* http.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D4E18E567C6009071A4 /* http.lua */; }; + C08D5D5B18E567C6009071A4 /* http.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D4E18E567C6009071A4 /* http.lua */; }; + C08D5D5C18E567C6009071A4 /* ltn12.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D4F18E567C6009071A4 /* ltn12.lua */; }; + C08D5D5D18E567C6009071A4 /* ltn12.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D4F18E567C6009071A4 /* ltn12.lua */; }; + C08D5D5E18E567C6009071A4 /* mbox.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5018E567C6009071A4 /* mbox.lua */; }; + C08D5D5F18E567C6009071A4 /* mbox.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5018E567C6009071A4 /* mbox.lua */; }; + C08D5D6018E567C6009071A4 /* mime.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5118E567C6009071A4 /* mime.lua */; }; + C08D5D6118E567C6009071A4 /* mime.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5118E567C6009071A4 /* mime.lua */; }; + C08D5D6218E567C6009071A4 /* smtp.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5218E567C6009071A4 /* smtp.lua */; }; + C08D5D6318E567C6009071A4 /* smtp.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5218E567C6009071A4 /* smtp.lua */; }; + C08D5D6418E567C6009071A4 /* socket.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5318E567C6009071A4 /* socket.lua */; }; + C08D5D6518E567C6009071A4 /* socket.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5318E567C6009071A4 /* socket.lua */; }; + C08D5D6618E567C6009071A4 /* tp.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5418E567C6009071A4 /* tp.lua */; }; + C08D5D6718E567C6009071A4 /* tp.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5418E567C6009071A4 /* tp.lua */; }; + C08D5D6818E567C6009071A4 /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5518E567C6009071A4 /* url.lua */; }; + C08D5D6918E567C6009071A4 /* url.lua in Resources */ = {isa = PBXBuildFile; fileRef = C08D5D5518E567C6009071A4 /* url.lua */; }; C09BA7E718BC929700A85A3E /* WorkSpaceDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = C09BA7E418BC929700A85A3E /* WorkSpaceDialog.xib */; }; C09BA7E818BC929700A85A3E /* WorkSpaceDialogController.mm in Sources */ = {isa = PBXBuildFile; fileRef = C09BA7E618BC929700A85A3E /* WorkSpaceDialogController.mm */; }; C09BA7EE18BCA49600A85A3E /* NSAppSheetAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = C09BA7ED18BCA49600A85A3E /* NSAppSheetAdditions.m */; }; @@ -348,6 +368,16 @@ C07828F718B4D72E00BD2287 /* SimulatorApp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimulatorApp.mm; sourceTree = ""; }; C07828FB18B4DC6F00BD2287 /* Runtime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Runtime.cpp; path = ../Classes/Runtime.cpp; sourceTree = ""; }; C07828FC18B4DC6F00BD2287 /* Runtime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Runtime.h; path = ../Classes/Runtime.h; sourceTree = ""; }; + C08D5D4C18E567C6009071A4 /* ftp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ftp.lua; path = "../../cocos2d-x/external/lua/luasocket/ftp.lua"; sourceTree = ""; }; + C08D5D4D18E567C6009071A4 /* headers.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = headers.lua; path = "../../cocos2d-x/external/lua/luasocket/headers.lua"; sourceTree = ""; }; + C08D5D4E18E567C6009071A4 /* http.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = http.lua; path = "../../cocos2d-x/external/lua/luasocket/http.lua"; sourceTree = ""; }; + C08D5D4F18E567C6009071A4 /* ltn12.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = ltn12.lua; path = "../../cocos2d-x/external/lua/luasocket/ltn12.lua"; sourceTree = ""; }; + C08D5D5018E567C6009071A4 /* mbox.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = mbox.lua; path = "../../cocos2d-x/external/lua/luasocket/mbox.lua"; sourceTree = ""; }; + C08D5D5118E567C6009071A4 /* mime.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = mime.lua; path = "../../cocos2d-x/external/lua/luasocket/mime.lua"; sourceTree = ""; }; + C08D5D5218E567C6009071A4 /* smtp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = smtp.lua; path = "../../cocos2d-x/external/lua/luasocket/smtp.lua"; sourceTree = ""; }; + C08D5D5318E567C6009071A4 /* socket.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = socket.lua; path = "../../cocos2d-x/external/lua/luasocket/socket.lua"; sourceTree = ""; }; + C08D5D5418E567C6009071A4 /* tp.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = tp.lua; path = "../../cocos2d-x/external/lua/luasocket/tp.lua"; sourceTree = ""; }; + C08D5D5518E567C6009071A4 /* url.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = url.lua; path = "../../cocos2d-x/external/lua/luasocket/url.lua"; sourceTree = ""; }; C09BA7E418BC929700A85A3E /* WorkSpaceDialog.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WorkSpaceDialog.xib; sourceTree = ""; }; C09BA7E518BC929700A85A3E /* WorkSpaceDialogController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkSpaceDialogController.h; sourceTree = ""; }; C09BA7E618BC929700A85A3E /* WorkSpaceDialogController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WorkSpaceDialogController.mm; sourceTree = ""; }; @@ -436,6 +466,16 @@ 1A0227A417A3AA1A00B867AD /* Lua Common */ = { isa = PBXGroup; children = ( + C08D5D4C18E567C6009071A4 /* ftp.lua */, + C08D5D4D18E567C6009071A4 /* headers.lua */, + C08D5D4E18E567C6009071A4 /* http.lua */, + C08D5D4F18E567C6009071A4 /* ltn12.lua */, + C08D5D5018E567C6009071A4 /* mbox.lua */, + C08D5D5118E567C6009071A4 /* mime.lua */, + C08D5D5218E567C6009071A4 /* smtp.lua */, + C08D5D5318E567C6009071A4 /* socket.lua */, + C08D5D5418E567C6009071A4 /* tp.lua */, + C08D5D5518E567C6009071A4 /* url.lua */, C03781BD18BF656900FE4F13 /* AudioEngine.lua */, C03781BE18BF656900FE4F13 /* CCBReaderLoad.lua */, C03781BF18BF656900FE4F13 /* Cocos2d.lua */, @@ -780,20 +820,30 @@ C03781F018BF656A00FE4F13 /* OpenglConstants.lua in Resources */, C03781E418BF656A00FE4F13 /* extern.lua in Resources */, C03781E618BF656A00FE4F13 /* GuiConstants.lua in Resources */, + C08D5D6118E567C6009071A4 /* mime.lua in Resources */, C03781D418BF656A00FE4F13 /* Cocos2d.lua in Resources */, C03781BA18BF655400FE4F13 /* res in Resources */, C09BA7E718BC929700A85A3E /* WorkSpaceDialog.xib in Resources */, C03781BC18BF655400FE4F13 /* src in Resources */, + C08D5D6918E567C6009071A4 /* url.lua in Resources */, C03781E218BF656A00FE4F13 /* DrawPrimitives.lua in Resources */, + C08D5D6318E567C6009071A4 /* smtp.lua in Resources */, + C08D5D5718E567C6009071A4 /* ftp.lua in Resources */, + C08D5D5B18E567C6009071A4 /* http.lua in Resources */, C03781DA18BF656A00FE4F13 /* Deprecated.lua in Resources */, C03781E018BF656A00FE4F13 /* DeprecatedOpenglEnum.lua in Resources */, + C08D5D6518E567C6009071A4 /* socket.lua in Resources */, + C08D5D5D18E567C6009071A4 /* ltn12.lua in Resources */, C03781EC18BF656A00FE4F13 /* luaoc.lua in Resources */, C07828F918B4D72E00BD2287 /* MainMenu.xib in Resources */, 5023817617EBBE3400990C9B /* Icon.icns in Resources */, C03781D218BF656A00FE4F13 /* CCBReaderLoad.lua in Resources */, + C08D5D5F18E567C6009071A4 /* mbox.lua in Resources */, C03781D018BF656A00FE4F13 /* AudioEngine.lua in Resources */, C03781D818BF656A00FE4F13 /* CocoStudio.lua in Resources */, + C08D5D5918E567C6009071A4 /* headers.lua in Resources */, C03781DC18BF656A00FE4F13 /* DeprecatedClass.lua in Resources */, + C08D5D6718E567C6009071A4 /* tp.lua in Resources */, C03781F218BF656A00FE4F13 /* StudioConstants.lua in Resources */, C03781EA18BF656A00FE4F13 /* luaj.lua in Resources */, C03781DE18BF656A00FE4F13 /* DeprecatedEnum.lua in Resources */, @@ -807,13 +857,19 @@ buildActionMask = 2147483647; files = ( 15A8A4491834C64F00142BE0 /* Icon-114.png in Resources */, + C08D5D5618E567C6009071A4 /* ftp.lua in Resources */, + C08D5D5C18E567C6009071A4 /* ltn12.lua in Resources */, + C08D5D5E18E567C6009071A4 /* mbox.lua in Resources */, C03781DB18BF656A00FE4F13 /* DeprecatedClass.lua in Resources */, 5023811D17EBBCAC00990C9B /* Icon-120.png in Resources */, 5091733B17ECE17A00D62437 /* Icon-100.png in Resources */, + C08D5D5818E567C6009071A4 /* headers.lua in Resources */, C03781E918BF656A00FE4F13 /* luaj.lua in Resources */, 5023811B17EBBCAC00990C9B /* Default@2x.png in Resources */, 5091733617ECE17A00D62437 /* Icon-29.png in Resources */, + C08D5D6418E567C6009071A4 /* socket.lua in Resources */, C03781E718BF656A00FE4F13 /* json.lua in Resources */, + C08D5D5A18E567C6009071A4 /* http.lua in Resources */, 5023811917EBBCAC00990C9B /* Default-568h@2x.png in Resources */, C03781D318BF656A00FE4F13 /* Cocos2d.lua in Resources */, 5091733917ECE17A00D62437 /* Icon-58.png in Resources */, @@ -829,16 +885,20 @@ 5023812217EBBCAC00990C9B /* Icon-76.png in Resources */, C03781DF18BF656A00FE4F13 /* DeprecatedOpenglEnum.lua in Resources */, 5091733A17ECE17A00D62437 /* Icon-80.png in Resources */, + C08D5D6018E567C6009071A4 /* mime.lua in Resources */, 5091733717ECE17A00D62437 /* Icon-40.png in Resources */, 5023811E17EBBCAC00990C9B /* Icon-144.png in Resources */, 5023811A17EBBCAC00990C9B /* Default.png in Resources */, C03781E118BF656A00FE4F13 /* DrawPrimitives.lua in Resources */, + C08D5D6218E567C6009071A4 /* smtp.lua in Resources */, C03781BB18BF655400FE4F13 /* src in Resources */, C03781EB18BF656A00FE4F13 /* luaoc.lua in Resources */, 5091733817ECE17A00D62437 /* Icon-50.png in Resources */, C03781D718BF656A00FE4F13 /* CocoStudio.lua in Resources */, C03781D518BF656A00FE4F13 /* Cocos2dConstants.lua in Resources */, + C08D5D6618E567C6009071A4 /* tp.lua in Resources */, 5023812117EBBCAC00990C9B /* Icon-72.png in Resources */, + C08D5D6818E567C6009071A4 /* url.lua in Resources */, C03781DD18BF656A00FE4F13 /* DeprecatedEnum.lua in Resources */, C03781E318BF656A00FE4F13 /* extern.lua in Resources */, C03781D918BF656A00FE4F13 /* Deprecated.lua in Resources */, From 93c424071ed7bcd5565aa1caedc9c4f1d60baf69 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Mon, 31 Mar 2014 11:18:41 +0800 Subject: [PATCH 35/98] update runtime --- .../runtime-src/Classes/Runtime.cpp | 114 ++++++++++++------ 1 file changed, 75 insertions(+), 39 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 16d3d635e4..7db4b67c22 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -373,20 +373,8 @@ bool CreateDir(const char *sPathName) return true; } -void updateResFileInfo(string filename,string filetime) +bool updateResFileInfo() { - - if (g_filecfgjson.HasMember(filename.c_str())) { - g_filecfgjson.RemoveMember(filename.c_str()); - } - rapidjson::Value filetimeValue(rapidjson::kStringType); - filetimeValue.SetString(filetime.c_str(),g_filecfgjson.GetAllocator()); - - rapidjson::Value filenameValue(rapidjson::kStringType); - filenameValue.SetString(filename.c_str(),g_filecfgjson.GetAllocator()); - g_filecfgjson.AddMember(filenameValue.GetString(),filetimeValue,g_filecfgjson.GetAllocator()); - - //g_filecfgjson[filename.c_str()] = filetime.c_str(); rapidjson::StringBuffer buffer; rapidjson::Writer< rapidjson::StringBuffer > writer(buffer); g_filecfgjson.Accept(writer); @@ -396,11 +384,16 @@ void updateResFileInfo(string filename,string filetime) filecfg.append("/"); filecfg.append("fileinfo_debug.json"); FILE * pFile = fopen (filecfg.c_str() , "w"); + if (!pFile) + return false; + fwrite(str,sizeof(char),strlen(str),pFile); fclose(pFile); + + return true; } -void readResFile() +void readResFileFinfo() { string filecfg = g_resourcePath; filecfg.append("/"); @@ -420,38 +413,62 @@ void readResFile() bool FileServer::recv_file(int fd) { - char filename[1024]={0}; char headlen[5]={0}; if (recv(fd, headlen, 4,0)<=0) { return false; } - if (recv(fd, filename, atoi(headlen),0)<=0) { + char *headSeg = new char[atoi(headlen)+1]; + if (!headSeg) + { + return false; + } + + if (recv(fd, headSeg, atoi(headlen),0)<=0) { return false; } - - char filetimeinfo[1024]={0}; - if (recv(fd, headlen, 4,0)<=0) { - return false; + rapidjson::Document headjson; + headjson.Parse<0>(headSeg); + if (headjson.HasMember("filename")) + { + string filename = headjson["filename"].GetString(); + char fullfilename[1024]={0}; + sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),filename); + string file(fullfilename); + file=replaceAll(file,"\\","/"); + sprintf(fullfilename, "%s", file.c_str()); + cocos2d::log("recv fullfilename = %s",fullfilename); + CreateDir(file.substr(0,file.find_last_of("/")).c_str()); + FILE *fp =fopen(fullfilename, "wb"); + int length =0; + while ((length=recv(fd, fullfilename, sizeof(fullfilename),0)) > 0) { + fwrite(fullfilename, sizeof(char), length,fp); + } + fclose(fp); + + if (headjson.HasMember("lastmodifytime")) + { + string filemodifytime = headjson["lastmodifytime"].GetString(); + if (g_filecfgjson.HasMember(filename.c_str())) + { + g_filecfgjson.RemoveMember(filename.c_str()); + } + rapidjson::Value filetimeValue(rapidjson::kStringType); + filetimeValue.SetString(filemodifytime.c_str(),g_filecfgjson.GetAllocator()); + rapidjson::Value filenameValue(rapidjson::kStringType); + filenameValue.SetString(filename.c_str(),g_filecfgjson.GetAllocator()); + g_filecfgjson.AddMember(filenameValue.GetString(),filetimeValue,g_filecfgjson.GetAllocator()); + updateResFileInfo(); + } } - if (recv(fd, filetimeinfo, atoi(headlen),0)<=0) { - return false; + + if (headSeg) + { + delete [] headSeg; + headSeg =nullptr; } - char fullfilename[1024]={0}; - sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),filename); - string file(fullfilename); - file=replaceAll(file,"\\","/"); - sprintf(fullfilename, "%s", file.c_str()); - cocos2d::log("recv fullfilename = %s",fullfilename); - CreateDir(file.substr(0,file.find_last_of("/")).c_str()); - FILE *fp =fopen(fullfilename, "wb"); - int length =0; - while ((length=recv(fd, fullfilename, sizeof(fullfilename),0)) > 0) { - fwrite(fullfilename, sizeof(char), length,fp); - } - fclose(fp); + string finish("finish\n"); send(fd, finish.c_str(), finish.size(),0); - updateResFileInfo(filename,filetimeinfo); return true; } @@ -631,7 +648,7 @@ public: rapidjson::Value bodyvalue(rapidjson::kObjectType); for (auto it=g_filecfgjson.MemberonBegin();it!=g_filecfgjson.MemberonEnd();++it) { - bodyvalue.AddMember(it->name.GetString(),it->value,dReplyParse.GetAllocator()); + bodyvalue.AddMember(it->name.GetString(),it->value.GetString(),dReplyParse.GetAllocator()); } dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); @@ -645,6 +662,16 @@ public: dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + }else if(strcmp(strcmd.c_str(),"updatefileinfo")==0) + { + if(updateResFileInfo()) + { + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + }else + { + dReplyParse.AddMember("code",1,dReplyParse.GetAllocator()); + } + }else if(strcmp(strcmd.c_str(),"remove")==0) { if (dArgParse.HasMember("files")) @@ -657,8 +684,16 @@ public: filename.append("/"); filename.append(objectfiles[i].GetString()); if (FileUtils::getInstance()->isFileExist(filename)) { - if(remove(filename.c_str())!=0) + if(remove(filename.c_str())==0) + { + if (g_filecfgjson.HasMember(objectfiles[i].GetString())) { + g_filecfgjson.RemoveMember(objectfiles[i].GetString()); + } + } + else + { bodyvalue.AddMember(objectfiles[i].GetString(),2,dReplyParse.GetAllocator()); + } }else { bodyvalue.AddMember(objectfiles[i].GetString(),1,dReplyParse.GetAllocator()); @@ -666,6 +701,7 @@ public: } dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + updateResFileInfo(); } dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); @@ -726,7 +762,7 @@ void startRuntime() ScriptEngineManager::getInstance()->setScriptEngine(engine); luaopen_debugger(engine->getLuaStack()->getLuaState()); - readResFile(); + readResFileFinfo(); auto scene = Scene::create(); auto layer = new ConnectWaitLayer(); layer->autorelease(); From 32402b109e1c8f2ee821421a418dd050a09dcfa4 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Mon, 31 Mar 2014 11:26:30 +0800 Subject: [PATCH 36/98] add memset --- .../frameworks/runtime-src/Classes/Runtime.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 7db4b67c22..685579287a 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -418,6 +418,7 @@ bool FileServer::recv_file(int fd) return false; } char *headSeg = new char[atoi(headlen)+1]; + memset(headSeg,0,atoi(headlen)+1); if (!headSeg) { return false; From 189136ccb8c83e9f97670695744406766d26e087 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Mon, 31 Mar 2014 11:39:49 +0800 Subject: [PATCH 37/98] fixed mistake --- .../frameworks/runtime-src/Classes/Runtime.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 685579287a..1d8a8acba1 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -418,12 +418,12 @@ bool FileServer::recv_file(int fd) return false; } char *headSeg = new char[atoi(headlen)+1]; - memset(headSeg,0,atoi(headlen)+1); if (!headSeg) { return false; } - + memset(headSeg,0,atoi(headlen)+1); + if (recv(fd, headSeg, atoi(headlen),0)<=0) { return false; } @@ -433,7 +433,7 @@ bool FileServer::recv_file(int fd) { string filename = headjson["filename"].GetString(); char fullfilename[1024]={0}; - sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),filename); + sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),filename.c_str()); string file(fullfilename); file=replaceAll(file,"\\","/"); sprintf(fullfilename, "%s", file.c_str()); From d74fd796eb2a355e4435b061c9697b42a5a718be Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Mon, 31 Mar 2014 16:49:12 +0800 Subject: [PATCH 38/98] add resouce reload --- .../frameworks/runtime-src/Classes/Runtime.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 1d8a8acba1..1c4017604a 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -26,6 +26,7 @@ THE SOFTWARE. #include "lua_debugger.h" #include "CCLuaEngine.h" #include "cocos2d.h" +#include "CCFontFNT.h" #include "json/document.h" #include "json/filestream.h" #include "json/stringbuffer.h" @@ -70,6 +71,19 @@ bool reloadScript(const string& modulefile) { strfile = "src/main.lua"; } + + auto director = Director::getInstance(); + FontFNT::purgeCachedData(); + if (director->getOpenGLView()) + { + SpriteFrameCache::getInstance()->removeSpriteFrames(); + director->getTextureCache()->removeAllTextures(); + } + FileUtils::getInstance()->purgeCachedEntries(); + + director->getScheduler()->unscheduleAll(); + director->getScheduler()->scheduleUpdate(director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false); + return (LuaEngine::getInstance()->reload(strfile.c_str())==0); } From a6cd18d05d2b89135595c2e002568552d9f4739a Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Wed, 2 Apr 2014 13:47:09 +0800 Subject: [PATCH 39/98] cmd to request --- .../frameworks/runtime-src/Classes/Runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 1c4017604a..e1984c19d7 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -593,7 +593,7 @@ public: { cocos2d::Console *_console = Director::getInstance()->getConsole(); static struct Console::Command commands[] = { - {"sendcmd","send command to runtime.Args[json format]",std::bind(&ConsoleCustomCommand::onSendCommand, this, std::placeholders::_1, std::placeholders::_2)}, + {"sendrequest","send command to runtime.Args[json format]",std::bind(&ConsoleCustomCommand::onSendCommand, this, std::placeholders::_1, std::placeholders::_2)}, }; for (int i=0;i< sizeof(commands)/sizeof(Console::Command);i++) { _console->addCommand(commands[i]); From d34fddb06eb4e8fe2fbd51396d69a7d1babc32f3 Mon Sep 17 00:00:00 2001 From: cw Date: Wed, 9 Apr 2014 17:03:38 +0800 Subject: [PATCH 41/98] rename lua folder --- .../frameworks/runtime-src/proj.android/jni/Android.mk | 4 ++-- .../proj.android/jni/{hellolua => lua}/Runtime_android.cpp | 0 .../runtime-src/proj.android/jni/{hellolua => lua}/main.cpp | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/{hellolua => lua}/Runtime_android.cpp (100%) rename templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/{hellolua => lua}/main.cpp (100%) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk index ea55d615e5..a52d06268d 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk @@ -6,8 +6,8 @@ LOCAL_MODULE := cocos2dlua_shared LOCAL_MODULE_FILENAME := libcocos2dlua -LOCAL_SRC_FILES := hellolua/main.cpp \ - hellolua/Runtime_android.cpp \ +LOCAL_SRC_FILES := lua/main.cpp \ + lua/Runtime_android.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/Runtime.cpp diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/hellolua/Runtime_android.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/lua/Runtime_android.cpp similarity index 100% rename from templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/hellolua/Runtime_android.cpp rename to templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/lua/Runtime_android.cpp diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/hellolua/main.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/lua/main.cpp similarity index 100% rename from templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/hellolua/main.cpp rename to templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/lua/main.cpp From e97552c2d3fa31efbc0446e2c55cb929c88f3acd Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Wed, 9 Apr 2014 17:54:10 +0800 Subject: [PATCH 42/98] add reload --- .../frameworks/runtime-src/Classes/Runtime.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index e1984c19d7..72db4b8023 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -649,6 +649,11 @@ public: bodyvalue.AddMember(objectfiles[i].GetString(),1,dReplyParse.GetAllocator()); } } + if (0 == objectfiles.Size()) + { + reloadScript(""); + } + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); } dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); From d4e2b72f1250a057e6c1062a6d541d6ecbbb1d1b Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Wed, 9 Apr 2014 19:17:13 +0800 Subject: [PATCH 44/98] add platform symbol --- .../runtime-src/Classes/AppDelegate.cpp | 12 +++++------- .../frameworks/runtime-src/Classes/Runtime.cpp | 17 ++++++++++++++++- .../frameworks/runtime-src/Classes/Runtime.h | 2 +- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp index 704d5e65c0..65de86539a 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -35,17 +35,15 @@ bool AppDelegate::applicationDidFinishLaunching() // set FPS. the default value is 1.0/60 if you don't call this director->setAnimationInterval(1.0 / 60); - - - + #ifdef COCOS2D_DEBUG - startRuntime(); -#else + if (startRuntime()) + return true; +#endif + auto engine = LuaEngine::getInstance(); ScriptEngineManager::getInstance()->setScriptEngine(engine); engine->executeScriptFile("src/main.lua"); -#endif - return true; } diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 72db4b8023..6887e94bdb 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -751,8 +751,22 @@ private: FileServer* _fileserver; }; -void startRuntime() +bool startRuntime() { +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) +#ifndef _DEBUG + return false; +#endif +#elif(CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) +#ifdef NDEBUG + return false; +#endif +#elif(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) +#ifndef DEBUG + return false; +#endif +#endif + vector searchPathArray; searchPathArray=FileUtils::getInstance()->getSearchPaths(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) @@ -789,6 +803,7 @@ void startRuntime() auto director = Director::getInstance(); scene->addChild(layer); director->runWithScene(scene); + return true; } diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.h b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.h index ef471ef8d1..d6b6fd0b5f 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.h +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.h @@ -30,7 +30,7 @@ THE SOFTWARE. using namespace std; -void startRuntime(); +bool startRuntime(); bool reloadScript(const string& modulefile); From c6ec729bf860be65950299ae9f59f9749a12787e Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Thu, 10 Apr 2014 10:35:53 +0800 Subject: [PATCH 45/98] modify --- .../frameworks/runtime-src/Classes/Runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 6887e94bdb..9a2cb06267 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -762,7 +762,7 @@ bool startRuntime() return false; #endif #elif(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) -#ifndef DEBUG +#ifndef COCOS2D_DEBUG return false; #endif #endif From 69865382c01bd9b2feccee0e197fdd1c6cb8f6d0 Mon Sep 17 00:00:00 2001 From: cw Date: Thu, 10 Apr 2014 14:38:31 +0800 Subject: [PATCH 46/98] add prebuilt --- .../runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id | 2 +- .../PrebuiltRuntimeLua iOS.REMOVED.git-id | 2 +- .../Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id | 2 +- .../runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id index c44c598c42..fd12439c7a 100644 --- a/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/android/PrebuiltRuntimeLua.apk.REMOVED.git-id @@ -1 +1 @@ -28c623da66fd86b306264dd7edecc106a685c9f3 \ No newline at end of file +8e9998bc900f66fc53ba7d0c15c57e7c989a8ab9 \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id index e477e6dab3..6bb4d81b14 100644 --- a/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/ios/PrebuiltRuntimeLua.app/PrebuiltRuntimeLua iOS.REMOVED.git-id @@ -1 +1 @@ -ae4e396e0663c4f6240d38f76d3b4629c6576b44 \ No newline at end of file +2625bd2fcb60920b0186e8a5b6654bc78992aa1b \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id index 9bbfa4e13a..4c30e39b65 100644 --- a/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/mac/PrebuiltRuntimeLua.app/Contents/MacOS/PrebuiltRuntimeLua Mac.REMOVED.git-id @@ -1 +1 @@ -9abcb82aa0c4a9055f0fa6cb9e87948b4b83cd3e \ No newline at end of file +31173448a0280d6c576e331fe29698676e6f313e \ No newline at end of file diff --git a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id index 1d70b89ccb..ea42aea6ab 100644 --- a/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id +++ b/templates/lua-template-runtime/runtime/win32/PrebuiltRuntimeLua.exe.REMOVED.git-id @@ -1 +1 @@ -c388f57e659d1a8d7a2fdb4cd7478d1824b10f32 \ No newline at end of file +64894cef61f7c2ff915cf5e71e135d59b794eef1 \ No newline at end of file From d5940243e1381a5dac7c7c37cf78de9a5670a032 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Thu, 10 Apr 2014 15:37:59 +0800 Subject: [PATCH 47/98] mofiy wrong indention --- .../runtime-src/Classes/Runtime.cpp | 835 +++++++++--------- .../runtime-src/proj.win32/HelloLua.vcxproj | 2 +- templates/lua-template-runtime/src/main.lua | 6 +- 3 files changed, 422 insertions(+), 421 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 9a2cb06267..f03afe7174 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -56,33 +56,33 @@ void startScript(string strDebugArg) { // register lua engine auto engine = LuaEngine::getInstance(); - if (!strDebugArg.empty()) - { - engine->executeString(strDebugArg.c_str()); - } - cocos2d::log("debug args = %s",strDebugArg.c_str()); + if (!strDebugArg.empty()) + { + engine->executeString(strDebugArg.c_str()); + } + cocos2d::log("debug args = %s",strDebugArg.c_str()); engine->executeScriptFile("src/main.lua"); } bool reloadScript(const string& modulefile) { - string strfile = modulefile; - if (strfile.empty()) - { - strfile = "src/main.lua"; - } + string strfile = modulefile; + if (strfile.empty()) + { + strfile = "src/main.lua"; + } - auto director = Director::getInstance(); - FontFNT::purgeCachedData(); - if (director->getOpenGLView()) - { - SpriteFrameCache::getInstance()->removeSpriteFrames(); - director->getTextureCache()->removeAllTextures(); - } - FileUtils::getInstance()->purgeCachedEntries(); + auto director = Director::getInstance(); + FontFNT::purgeCachedData(); + if (director->getOpenGLView()) + { + SpriteFrameCache::getInstance()->removeSpriteFrames(); + director->getTextureCache()->removeAllTextures(); + } + FileUtils::getInstance()->purgeCachedEntries(); - director->getScheduler()->unscheduleAll(); - director->getScheduler()->scheduleUpdate(director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false); + director->getScheduler()->unscheduleAll(); + director->getScheduler()->scheduleUpdate(director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false); return (LuaEngine::getInstance()->reload(strfile.c_str())==0); } @@ -180,8 +180,8 @@ class ConnectWaitLayer: public Layer { public: - ConnectWaitLayer() - { + ConnectWaitLayer() + { string strip = getIPAddress(); char szIPAddress[512]={0}; sprintf(szIPAddress, "LocalIP: %s",strip.c_str()); @@ -189,14 +189,14 @@ public: addChild(label, 9999); label->setPosition( Point(VisibleRect::center().x, VisibleRect::top().y - 30) ); - string strShowMsg =""; - if (CC_PLATFORM_WIN32 == CC_TARGET_PLATFORM || CC_PLATFORM_MAC == CC_TARGET_PLATFORM) - { - strShowMsg = "waiting for debugger to connect ..."; - }else - { - strShowMsg = "waiting for file transfer ..."; - } + string strShowMsg =""; + if (CC_PLATFORM_WIN32 == CC_TARGET_PLATFORM || CC_PLATFORM_MAC == CC_TARGET_PLATFORM) + { + strShowMsg = "waiting for debugger to connect ..."; + }else + { + strShowMsg = "waiting for file transfer ..."; + } auto labelwait = LabelTTF::create(strShowMsg.c_str(), "Arial", 22); addChild(labelwait, 10000); labelwait->setPosition( Point(VisibleRect::center().x, VisibleRect::center().y) ); @@ -209,9 +209,9 @@ public: menu->setPosition( Point::ZERO ); menuItem->setPosition( Point( VisibleRect::right().x - 50, VisibleRect::bottom().y + 25) ); addChild(menu, 1); - //_scheduler = CCDirector::sharedDirector()->getScheduler(); + //_scheduler = CCDirector::sharedDirector()->getScheduler(); //scheduleUpdate(); - } + } void playerCallback(Object* sender) { @@ -247,7 +247,7 @@ public: _endThread = false; } - bool listenOnTCP(int port); + bool listenOnTCP(int port); void stop(); private: @@ -267,111 +267,111 @@ private: bool FileServer::listenOnTCP(int port) { - int listenfd, n; - const int on = 1; - struct addrinfo hints, *res, *ressave; - char serv[30]; + int listenfd, n; + const int on = 1; + struct addrinfo hints, *res, *ressave; + char serv[30]; - snprintf(serv, sizeof(serv)-1, "%d", port ); - serv[sizeof(serv)-1]=0; + snprintf(serv, sizeof(serv)-1, "%d", port ); + serv[sizeof(serv)-1]=0; - bzero(&hints, sizeof(struct addrinfo)); - hints.ai_flags = AI_PASSIVE; - hints.ai_family = AF_INET; // AF_UNSPEC: Do we need IPv6 ? - hints.ai_socktype = SOCK_STREAM; + bzero(&hints, sizeof(struct addrinfo)); + hints.ai_flags = AI_PASSIVE; + hints.ai_family = AF_INET; // AF_UNSPEC: Do we need IPv6 ? + hints.ai_socktype = SOCK_STREAM; #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - WSADATA wsaData; - n = WSAStartup(MAKEWORD(2, 2),&wsaData); + WSADATA wsaData; + n = WSAStartup(MAKEWORD(2, 2),&wsaData); #endif - if ( (n = getaddrinfo(NULL, serv, &hints, &res)) != 0) { - fprintf(stderr,"net_listen error for %s: %s", serv, gai_strerror(n)); - return false; - } + if ( (n = getaddrinfo(NULL, serv, &hints, &res)) != 0) { + fprintf(stderr,"net_listen error for %s: %s", serv, gai_strerror(n)); + return false; + } - ressave = res; - do { - listenfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); - if (listenfd < 0) - continue; /* error, try next one */ - - setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on)); - if (::bind(listenfd, res->ai_addr, res->ai_addrlen) == 0) - break; /* success */ - - close(listenfd); /* bind error, close and try next one */ - } while ( (res = res->ai_next) != NULL); + ressave = res; + do { + listenfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); + if (listenfd < 0) + continue; /* error, try next one */ + + setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on)); + if (::bind(listenfd, res->ai_addr, res->ai_addrlen) == 0) + break; /* success */ + + close(listenfd); /* bind error, close and try next one */ + } while ( (res = res->ai_next) != NULL); - if (res == NULL) { - perror("net_listen:"); - freeaddrinfo(ressave); - return false; - } + if (res == NULL) { + perror("net_listen:"); + freeaddrinfo(ressave); + return false; + } - listen(listenfd, 1); + listen(listenfd, 1); - if (res->ai_family == AF_INET) - { - char buf[INET_ADDRSTRLEN] = ""; - struct sockaddr_in *sin = (struct sockaddr_in*) res->ai_addr; - if( inet_ntop(res->ai_family, &sin->sin_addr, buf, sizeof(buf)) != NULL ) - cocos2d::log("Console: listening on %s : %d", buf, ntohs(sin->sin_port)); - else - perror("inet_ntop"); - } else if (res->ai_family == AF_INET6) - { - char buf[INET6_ADDRSTRLEN] = ""; - struct sockaddr_in6 *sin = (struct sockaddr_in6*) res->ai_addr; - if( inet_ntop(res->ai_family, &sin->sin6_addr, buf, sizeof(buf)) != NULL ) - cocos2d::log("Console: listening on %s : %d", buf, ntohs(sin->sin6_port)); - else - perror("inet_ntop"); - } - freeaddrinfo(ressave); - _listenfd = listenfd; - _thread = std::thread( std::bind( &FileServer::loop, this) ); - return true; + if (res->ai_family == AF_INET) + { + char buf[INET_ADDRSTRLEN] = ""; + struct sockaddr_in *sin = (struct sockaddr_in*) res->ai_addr; + if( inet_ntop(res->ai_family, &sin->sin_addr, buf, sizeof(buf)) != NULL ) + cocos2d::log("Console: listening on %s : %d", buf, ntohs(sin->sin_port)); + else + perror("inet_ntop"); + } else if (res->ai_family == AF_INET6) + { + char buf[INET6_ADDRSTRLEN] = ""; + struct sockaddr_in6 *sin = (struct sockaddr_in6*) res->ai_addr; + if( inet_ntop(res->ai_family, &sin->sin6_addr, buf, sizeof(buf)) != NULL ) + cocos2d::log("Console: listening on %s : %d", buf, ntohs(sin->sin6_port)); + else + perror("inet_ntop"); + } + freeaddrinfo(ressave); + _listenfd = listenfd; + _thread = std::thread( std::bind( &FileServer::loop, this) ); + return true; } - + void FileServer::stop() { - if( _running ) { - _endThread = true; - _thread.join(); - } + if( _running ) { + _endThread = true; + _thread.join(); + } } string& replaceAll(string& str,const string& old_value,const string& new_value) { - while(true) - { - int pos=0; - if((pos=str.find(old_value,0))!=string::npos) - str.replace(pos,old_value.length(),new_value); - else break; - } - return str; + while(true) + { + int pos=0; + if((pos=str.find(old_value,0))!=string::npos) + str.replace(pos,old_value.length(),new_value); + else break; + } + return str; } bool CreateDir(const char *sPathName) { - char DirName[256]={0}; - strcpy(DirName, sPathName); - int i,len = strlen(DirName); - if(DirName[len-1]!='/') - strcat(DirName, "/"); + char DirName[256]={0}; + strcpy(DirName, sPathName); + int i,len = strlen(DirName); + if(DirName[len-1]!='/') + strcat(DirName, "/"); - len = strlen(DirName); - for(i=1; i writer(buffer); - g_filecfgjson.Accept(writer); - const char* str = buffer.GetString(); + rapidjson::StringBuffer buffer; + rapidjson::Writer< rapidjson::StringBuffer > writer(buffer); + g_filecfgjson.Accept(writer); + const char* str = buffer.GetString(); - string filecfg = g_resourcePath; - filecfg.append("/"); - filecfg.append("fileinfo_debug.json"); - FILE * pFile = fopen (filecfg.c_str() , "w"); - if (!pFile) - return false; - - fwrite(str,sizeof(char),strlen(str),pFile); - fclose(pFile); + string filecfg = g_resourcePath; + filecfg.append("/"); + filecfg.append("fileinfo_debug.json"); + FILE * pFile = fopen (filecfg.c_str() , "w"); + if (!pFile) + return false; + + fwrite(str,sizeof(char),strlen(str),pFile); + fclose(pFile); - return true; + return true; } -void readResFileFinfo() +static void readResFileFinfo() { - string filecfg = g_resourcePath; - filecfg.append("/"); - filecfg.append("fileinfo_debug.json"); - FILE * pFile = fopen (filecfg.c_str() , "r"); - if(pFile) - { - rapidjson::FileStream inputStream(pFile); - g_filecfgjson.ParseStream<0>(inputStream); - fclose(pFile); - } - if(!g_filecfgjson.IsObject()) - { - g_filecfgjson.SetObject(); - } + string filecfg = g_resourcePath; + filecfg.append("/"); + filecfg.append("fileinfo_debug.json"); + FILE * pFile = fopen (filecfg.c_str() , "r"); + if(pFile) + { + rapidjson::FileStream inputStream(pFile); + g_filecfgjson.ParseStream<0>(inputStream); + fclose(pFile); + } + if(!g_filecfgjson.IsObject()) + { + g_filecfgjson.SetObject(); + } } bool FileServer::recv_file(int fd) { char headlen[5]={0}; - if (recv(fd, headlen, 4,0)<=0) { - return false; - } - char *headSeg = new char[atoi(headlen)+1]; - if (!headSeg) - { - return false; - } - memset(headSeg,0,atoi(headlen)+1); + if (recv(fd, headlen, 4,0)<=0) { + return false; + } + char *headSeg = new char[atoi(headlen)+1]; + if (!headSeg) + { + return false; + } + memset(headSeg,0,atoi(headlen)+1); - if (recv(fd, headSeg, atoi(headlen),0)<=0) { - return false; - } + if (recv(fd, headSeg, atoi(headlen),0)<=0) { + return false; + } rapidjson::Document headjson; - headjson.Parse<0>(headSeg); - if (headjson.HasMember("filename")) - { - string filename = headjson["filename"].GetString(); - char fullfilename[1024]={0}; - sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),filename.c_str()); - string file(fullfilename); - file=replaceAll(file,"\\","/"); - sprintf(fullfilename, "%s", file.c_str()); - cocos2d::log("recv fullfilename = %s",fullfilename); - CreateDir(file.substr(0,file.find_last_of("/")).c_str()); - FILE *fp =fopen(fullfilename, "wb"); - int length =0; - while ((length=recv(fd, fullfilename, sizeof(fullfilename),0)) > 0) { - fwrite(fullfilename, sizeof(char), length,fp); - } - fclose(fp); + headjson.Parse<0>(headSeg); + if (headjson.HasMember("filename")) + { + string filename = headjson["filename"].GetString(); + char fullfilename[1024]={0}; + sprintf(fullfilename,"%s%s",g_resourcePath.c_str(),filename.c_str()); + string file(fullfilename); + file=replaceAll(file,"\\","/"); + sprintf(fullfilename, "%s", file.c_str()); + cocos2d::log("recv fullfilename = %s",fullfilename); + CreateDir(file.substr(0,file.find_last_of("/")).c_str()); + FILE *fp =fopen(fullfilename, "wb"); + int length =0; + while ((length=recv(fd, fullfilename, sizeof(fullfilename),0)) > 0) { + fwrite(fullfilename, sizeof(char), length,fp); + } + fclose(fp); - if (headjson.HasMember("lastmodifytime")) - { - string filemodifytime = headjson["lastmodifytime"].GetString(); - if (g_filecfgjson.HasMember(filename.c_str())) - { - g_filecfgjson.RemoveMember(filename.c_str()); - } - rapidjson::Value filetimeValue(rapidjson::kStringType); - filetimeValue.SetString(filemodifytime.c_str(),g_filecfgjson.GetAllocator()); - rapidjson::Value filenameValue(rapidjson::kStringType); - filenameValue.SetString(filename.c_str(),g_filecfgjson.GetAllocator()); - g_filecfgjson.AddMember(filenameValue.GetString(),filetimeValue,g_filecfgjson.GetAllocator()); - updateResFileInfo(); - } - } + if (headjson.HasMember("lastmodifytime")) + { + string filemodifytime = headjson["lastmodifytime"].GetString(); + if (g_filecfgjson.HasMember(filename.c_str())) + { + g_filecfgjson.RemoveMember(filename.c_str()); + } + rapidjson::Value filetimeValue(rapidjson::kStringType); + filetimeValue.SetString(filemodifytime.c_str(),g_filecfgjson.GetAllocator()); + rapidjson::Value filenameValue(rapidjson::kStringType); + filenameValue.SetString(filename.c_str(),g_filecfgjson.GetAllocator()); + g_filecfgjson.AddMember(filenameValue.GetString(),filetimeValue,g_filecfgjson.GetAllocator()); + updateResFileInfo(); + } + } - if (headSeg) - { - delete [] headSeg; - headSeg =nullptr; - } - + if (headSeg) + { + delete [] headSeg; + headSeg =nullptr; + } + string finish("finish\n"); send(fd, finish.c_str(), finish.size(),0); - return true; + return true; } void FileServer::addClient() { - struct sockaddr client; - socklen_t client_len; + struct sockaddr client; + socklen_t client_len; - /* new client */ - client_len = sizeof( client ); - int fd = accept(_listenfd, (struct sockaddr *)&client, &client_len ); + /* new client */ + client_len = sizeof( client ); + int fd = accept(_listenfd, (struct sockaddr *)&client, &client_len ); - // add fd to list of FD - if( fd != -1 ) { - FD_SET(fd, &_read_set); - _fds.push_back(fd); - _maxfd = std::max(_maxfd,fd); - } + // add fd to list of FD + if( fd != -1 ) { + FD_SET(fd, &_read_set); + _fds.push_back(fd); + _maxfd = std::max(_maxfd,fd); + } } void FileServer::loop() { - fd_set copy_set; - struct timeval timeout, timeout_copy; + fd_set copy_set; + struct timeval timeout, timeout_copy; - _running = true; + _running = true; - FD_ZERO(&_read_set); - FD_SET(_listenfd, &_read_set); - _maxfd = _listenfd; + FD_ZERO(&_read_set); + FD_SET(_listenfd, &_read_set); + _maxfd = _listenfd; - timeout.tv_sec = 0; + timeout.tv_sec = 0; - /* 0.016 seconds. Wake up once per frame at 60PFS */ - timeout.tv_usec = 16000; + /* 0.016 seconds. Wake up once per frame at 60PFS */ + timeout.tv_usec = 16000; - while(!_endThread) { + while(!_endThread) { - copy_set = _read_set; - timeout_copy = timeout; - int nready = select(_maxfd+1, ©_set, NULL, NULL, &timeout_copy); + copy_set = _read_set; + timeout_copy = timeout; + int nready = select(_maxfd+1, ©_set, NULL, NULL, &timeout_copy); - if( nready == -1 ) - { - /* error */ - if(errno != EINTR) - log("Abnormal error in select()\n"); - continue; - } - else if( nready == 0 ) - { - /* timeout. do somethig ? */ - } - else - { - /* new client */ - if(FD_ISSET(_listenfd, ©_set)) { - addClient(); - if(--nready <= 0) - continue; - } + if( nready == -1 ) + { + /* error */ + if(errno != EINTR) + log("Abnormal error in select()\n"); + continue; + } + else if( nready == 0 ) + { + /* timeout. do somethig ? */ + } + else + { + /* new client */ + if(FD_ISSET(_listenfd, ©_set)) { + addClient(); + if(--nready <= 0) + continue; + } - /* data from client */ - std::vector to_remove; - for(const auto &fd: _fds) { - if(FD_ISSET(fd,©_set)) { - if( ! recv_file(fd) ) { - to_remove.push_back(fd); - } - if(--nready <= 0) - break; - } - } + /* data from client */ + std::vector to_remove; + for(const auto &fd: _fds) { + if(FD_ISSET(fd,©_set)) { + if( ! recv_file(fd) ) { + to_remove.push_back(fd); + } + if(--nready <= 0) + break; + } + } - /* remove closed conections */ - for(int fd: to_remove) { - FD_CLR(fd, &_read_set); - _fds.erase(std::remove(_fds.begin(), _fds.end(), fd), _fds.end()); - } - } - } + /* remove closed conections */ + for(int fd: to_remove) { + FD_CLR(fd, &_read_set); + _fds.erase(std::remove(_fds.begin(), _fds.end(), fd), _fds.end()); + } + } + } - // clean up: ignore stdin, stdout and stderr - for(const auto &fd: _fds ) - { + // clean up: ignore stdin, stdout and stderr + for(const auto &fd: _fds ) + { #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - closesocket(fd); + closesocket(fd); #else - close(fd); + close(fd); #endif - } + } #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - closesocket(_listenfd); - WSACleanup(); + closesocket(_listenfd); + WSACleanup(); #else - close(_listenfd); + close(_listenfd); #endif - _running = false; + _running = false; } @@ -593,8 +593,8 @@ public: { cocos2d::Console *_console = Director::getInstance()->getConsole(); static struct Console::Command commands[] = { - {"sendrequest","send command to runtime.Args[json format]",std::bind(&ConsoleCustomCommand::onSendCommand, this, std::placeholders::_1, std::placeholders::_2)}, - }; + {"sendrequest","send command to runtime.Args[json format]",std::bind(&ConsoleCustomCommand::onSendCommand, this, std::placeholders::_1, std::placeholders::_2)}, + }; for (int i=0;i< sizeof(commands)/sizeof(Console::Command);i++) { _console->addCommand(commands[i]); } @@ -605,7 +605,7 @@ public: } ~ConsoleCustomCommand() { - Director::getInstance()->getConsole()->stop(); + Director::getInstance()->getConsole()->stop(); _fileserver->stop(); if (_fileserver) { delete _fileserver; @@ -613,140 +613,141 @@ public: } } - void onSendCommand(int fd, const std::string &args) - { - Director::getInstance()->getScheduler()->performFunctionInCocosThread([=](){ - rapidjson::Document dArgParse; - dArgParse.Parse<0>(args.c_str()); - if (dArgParse.HasMember("cmd")) - { + void onSendCommand(int fd, const std::string &args) + { + Director::getInstance()->getScheduler()->performFunctionInCocosThread([=](){ + rapidjson::Document dArgParse; + dArgParse.Parse<0>(args.c_str()); + if (dArgParse.HasMember("cmd")) + { string strcmd = dArgParse["cmd"].GetString(); rapidjson::Document dReplyParse; - dReplyParse.SetObject(); - dReplyParse.AddMember("cmd",strcmd.c_str(),dReplyParse.GetAllocator()); - //dReplyParse.AddMember("cmd",dArgParse["cmd"]); + dReplyParse.SetObject(); + dReplyParse.AddMember("cmd",strcmd.c_str(),dReplyParse.GetAllocator()); + //dReplyParse.AddMember("cmd",dArgParse["cmd"]); if (dArgParse.HasMember("seq")) { - dReplyParse.AddMember("seq",dArgParse["seq"],dReplyParse.GetAllocator()); + dReplyParse.AddMember("seq",dArgParse["seq"],dReplyParse.GetAllocator()); } - if(strcmp(strcmd.c_str(),"start-logic")==0) - { - char szDebugArg[1024]={0}; - sprintf(szDebugArg, "require('debugger')(%s,'%s')",dArgParse["debugcfg"].GetString(),g_resourcePath.c_str()); - startScript(szDebugArg); - dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - - }else if(strcmp(strcmd.c_str(),"reload")==0) - { - if (dArgParse.HasMember("modulefiles")) - { - rapidjson::Value bodyvalue(rapidjson::kObjectType); - const rapidjson::Value& objectfiles = dArgParse["modulefiles"]; - for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) - { - if (!reloadScript(objectfiles[i].GetString())) { - bodyvalue.AddMember(objectfiles[i].GetString(),1,dReplyParse.GetAllocator()); - } - } - if (0 == objectfiles.Size()) - { - reloadScript(""); - } - - dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); - } - dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else if(strcmp(strcmd.c_str(),"getversion")==0) - { - rapidjson::Value bodyvalue(rapidjson::kObjectType); - bodyvalue.AddMember("version",getRuntimeVersion(),dReplyParse.GetAllocator()); - dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + if(strcmp(strcmd.c_str(),"start-logic")==0) + { + char szDebugArg[1024]={0}; + sprintf(szDebugArg, "require('debugger')(%s,'%s')",dArgParse["debugcfg"].GetString(),g_resourcePath.c_str()); + startScript(szDebugArg); dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else if(strcmp(strcmd.c_str(),"getfileinfo")==0) - { + + }else if(strcmp(strcmd.c_str(),"reload")==0) + { + if (dArgParse.HasMember("modulefiles")) + { + rapidjson::Value bodyvalue(rapidjson::kObjectType); + const rapidjson::Value& objectfiles = dArgParse["modulefiles"]; + for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) + { + if (!reloadScript(objectfiles[i].GetString())) { + bodyvalue.AddMember(objectfiles[i].GetString(),1,dReplyParse.GetAllocator()); + } + } + if (0 == objectfiles.Size()) + { + reloadScript(""); + } + + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + } + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + }else if(strcmp(strcmd.c_str(),"getversion")==0) + { rapidjson::Value bodyvalue(rapidjson::kObjectType); - for (auto it=g_filecfgjson.MemberonBegin();it!=g_filecfgjson.MemberonEnd();++it) - { - bodyvalue.AddMember(it->name.GetString(),it->value.GetString(),dReplyParse.GetAllocator()); - } - dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + bodyvalue.AddMember("version",getRuntimeVersion(),dReplyParse.GetAllocator()); + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + }else if(strcmp(strcmd.c_str(),"getfileinfo")==0) + { + rapidjson::Value bodyvalue(rapidjson::kObjectType); + for (auto it=g_filecfgjson.MemberonBegin();it!=g_filecfgjson.MemberonEnd();++it) + { + bodyvalue.AddMember(it->name.GetString(),it->value.GetString(),dReplyParse.GetAllocator()); + } + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else if(strcmp(strcmd.c_str(),"getIP")==0) - { + }else if(strcmp(strcmd.c_str(),"getIP")==0) + { rapidjson::Value bodyvalue(rapidjson::kObjectType); - rapidjson::Value IPValue(rapidjson::kStringType); - IPValue.SetString(getIPAddress().c_str(),dReplyParse.GetAllocator()); - bodyvalue.AddMember("IP",IPValue,dReplyParse.GetAllocator()); + rapidjson::Value IPValue(rapidjson::kStringType); + IPValue.SetString(getIPAddress().c_str(),dReplyParse.GetAllocator()); + bodyvalue.AddMember("IP",IPValue,dReplyParse.GetAllocator()); dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else if(strcmp(strcmd.c_str(),"updatefileinfo")==0) - { - if(updateResFileInfo()) - { - dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else - { - dReplyParse.AddMember("code",1,dReplyParse.GetAllocator()); - } - - }else if(strcmp(strcmd.c_str(),"remove")==0) - { - if (dArgParse.HasMember("files")) - { + }else if(strcmp(strcmd.c_str(),"updatefileinfo")==0) + { + if(updateResFileInfo()) + { + dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); + }else + { + dReplyParse.AddMember("code",1,dReplyParse.GetAllocator()); + } + + }else if(strcmp(strcmd.c_str(),"remove")==0) + { + if (dArgParse.HasMember("files")) + { rapidjson::Value bodyvalue(rapidjson::kObjectType); - const rapidjson::Value& objectfiles = dArgParse["files"]; - for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) - { - string filename(g_resourcePath); - filename.append("/"); - filename.append(objectfiles[i].GetString()); - if (FileUtils::getInstance()->isFileExist(filename)) { + const rapidjson::Value& objectfiles = dArgParse["files"]; + for (rapidjson::SizeType i = 0; i < objectfiles.Size(); i++) + { + string filename(g_resourcePath); + filename.append("/"); + filename.append(objectfiles[i].GetString()); + if (FileUtils::getInstance()->isFileExist(filename)) + { if(remove(filename.c_str())==0) - { - if (g_filecfgjson.HasMember(objectfiles[i].GetString())) { - g_filecfgjson.RemoveMember(objectfiles[i].GetString()); - } - } - else - { - bodyvalue.AddMember(objectfiles[i].GetString(),2,dReplyParse.GetAllocator()); - } + { + if (g_filecfgjson.HasMember(objectfiles[i].GetString())) { + g_filecfgjson.RemoveMember(objectfiles[i].GetString()); + } + } + else + { + bodyvalue.AddMember(objectfiles[i].GetString(),2,dReplyParse.GetAllocator()); + } }else { - bodyvalue.AddMember(objectfiles[i].GetString(),1,dReplyParse.GetAllocator()); + bodyvalue.AddMember(objectfiles[i].GetString(),1,dReplyParse.GetAllocator()); } - - } - dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); - updateResFileInfo(); - } + + } + dReplyParse.AddMember("body",bodyvalue,dReplyParse.GetAllocator()); + updateResFileInfo(); + } dReplyParse.AddMember("code",0,dReplyParse.GetAllocator()); - }else if(strcmp(strcmd.c_str(),"shutdownapp")==0) - { + }else if(strcmp(strcmd.c_str(),"shutdownapp")==0) + { #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - extern void shutDownApp(); - shutDownApp(); + extern void shutDownApp(); + shutDownApp(); #else - exit(0); + exit(0); #endif - } - + } + rapidjson::StringBuffer buffer; rapidjson::Writer< rapidjson::StringBuffer > writer(buffer); dReplyParse.Accept(writer); const char* str = buffer.GetString(); char msgSize[64]={0x1,0}; - sprintf(msgSize+1,"%d:",strlen(str)); + sprintf(msgSize+1,"%d:",strlen(str)); string replymsg(msgSize); replymsg.append(str); - send(fd,replymsg.c_str(),replymsg.size(),0); - } - }); - } + send(fd,replymsg.c_str(),replymsg.size(),0); + } + }); + } private: FileServer* _fileserver; }; @@ -755,47 +756,47 @@ bool startRuntime() { #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #ifndef _DEBUG - return false; + return false; #endif #elif(CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) #ifdef NDEBUG - return false; + return false; #endif #elif(CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) #ifndef COCOS2D_DEBUG - return false; + return false; #endif #endif - vector searchPathArray; + vector searchPathArray; searchPathArray=FileUtils::getInstance()->getSearchPaths(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - if (g_resourcePath.empty()) - { - extern std::string getCurAppPath(); - string resourcePath = getCurAppPath(); + if (g_resourcePath.empty()) + { + extern std::string getCurAppPath(); + string resourcePath = getCurAppPath(); #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - resourcePath.append("/../../"); + resourcePath.append("/../../"); #elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) resourcePath.append("/../../../"); #endif - resourcePath =replaceAll(resourcePath,"\\","/"); - g_resourcePath = resourcePath; - } + resourcePath =replaceAll(resourcePath,"\\","/"); + g_resourcePath = resourcePath; + } #else - g_resourcePath = FileUtils::getInstance()->getWritablePath(); + g_resourcePath = FileUtils::getInstance()->getWritablePath(); #endif g_resourcePath=replaceAll(g_resourcePath,"\\","/"); - searchPathArray.insert(searchPathArray.begin(),g_resourcePath); + searchPathArray.insert(searchPathArray.begin(),g_resourcePath); FileUtils::getInstance()->setSearchPaths(searchPathArray); - static ConsoleCustomCommand s_customCommand; - auto engine = LuaEngine::getInstance(); - ScriptEngineManager::getInstance()->setScriptEngine(engine); - luaopen_debugger(engine->getLuaStack()->getLuaState()); - + static ConsoleCustomCommand s_customCommand; + auto engine = LuaEngine::getInstance(); + ScriptEngineManager::getInstance()->setScriptEngine(engine); + luaopen_debugger(engine->getLuaStack()->getLuaState()); + readResFileFinfo(); auto scene = Scene::create(); auto layer = new ConnectWaitLayer(); @@ -803,7 +804,7 @@ bool startRuntime() auto director = Director::getInstance(); scene->addChild(layer); director->runWithScene(scene); - return true; + return true; } @@ -811,35 +812,35 @@ bool startRuntime() SimulatorConfig *SimulatorConfig::s_sharedInstance = NULL; SimulatorConfig *SimulatorConfig::getInstance(void) { - if (!s_sharedInstance) - { - s_sharedInstance = new SimulatorConfig(); - } - return s_sharedInstance; + if (!s_sharedInstance) + { + s_sharedInstance = new SimulatorConfig(); + } + return s_sharedInstance; } SimulatorConfig::SimulatorConfig(void) { - m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 3Gs (480x320)", 480, 320)); - m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 4 (960x640)", 960, 640)); - m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 5 (1136x640)", 1136, 640)); - m_screenSizeArray.push_back(SimulatorScreenSize("iPad (1024x768)", 1024, 768)); - m_screenSizeArray.push_back(SimulatorScreenSize("iPad Retina (2048x1536)", 2048, 1536)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (800x480)", 800, 480)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (854x480)", 854, 480)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (960x540)", 960, 540)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (1024x600)", 1024, 600)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (1280x720)", 1280, 720)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (1280x800)", 1280, 800)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (1920x1080)", 1920, 1080)); + m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 3Gs (480x320)", 480, 320)); + m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 4 (960x640)", 960, 640)); + m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 5 (1136x640)", 1136, 640)); + m_screenSizeArray.push_back(SimulatorScreenSize("iPad (1024x768)", 1024, 768)); + m_screenSizeArray.push_back(SimulatorScreenSize("iPad Retina (2048x1536)", 2048, 1536)); + m_screenSizeArray.push_back(SimulatorScreenSize("Android (800x480)", 800, 480)); + m_screenSizeArray.push_back(SimulatorScreenSize("Android (854x480)", 854, 480)); + m_screenSizeArray.push_back(SimulatorScreenSize("Android (960x540)", 960, 540)); + m_screenSizeArray.push_back(SimulatorScreenSize("Android (1024x600)", 1024, 600)); + m_screenSizeArray.push_back(SimulatorScreenSize("Android (1280x720)", 1280, 720)); + m_screenSizeArray.push_back(SimulatorScreenSize("Android (1280x800)", 1280, 800)); + m_screenSizeArray.push_back(SimulatorScreenSize("Android (1920x1080)", 1920, 1080)); } int SimulatorConfig::getScreenSizeCount(void) { - return (int)m_screenSizeArray.size(); + return (int)m_screenSizeArray.size(); } const SimulatorScreenSize SimulatorConfig::getScreenSize(int index) { - return m_screenSizeArray.at(index); + return m_screenSizeArray.at(index); } \ No newline at end of file diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj index 106ebacc97..6e769d5586 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj @@ -122,7 +122,7 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" - $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) + $(ProjectDir)..\Classes;$(EngineRoot)cocos\scripting\lua-bindings\auto;$(EngineRoot)cocos\scripting\lua-bindings\manual;$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\lua\lua;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;$(EngineRoot);%(AdditionalIncludeDirectories) Level3 diff --git a/templates/lua-template-runtime/src/main.lua b/templates/lua-template-runtime/src/main.lua index 3be63ad14f..2547202166 100644 --- a/templates/lua-template-runtime/src/main.lua +++ b/templates/lua-template-runtime/src/main.lua @@ -119,7 +119,7 @@ local function main() local touchBeginPoint = nil local function onTouchBegan(touch, event) local location = touch:getLocation() - cclog("onTouchBegan: %0.2f, %0.2f", location.x, location.y) + --cclog("onTouchBegan: %0.2f, %0.2f", location.x, location.y) touchBeginPoint = {x = location.x, y = location.y} spriteDog.isPaused = true -- CCTOUCHBEGAN event must return true @@ -128,7 +128,7 @@ local function main() local function onTouchMoved(touch, event) local location = touch:getLocation() - cclog("onTouchMoved: %0.2f, %0.2f", location.x, location.y) + --cclog("onTouchMoved: %0.2f, %0.2f", location.x, location.y) if touchBeginPoint then local cx, cy = layerFarm:getPosition() layerFarm:setPosition(cx + location.x - touchBeginPoint.x, @@ -139,7 +139,7 @@ local function main() local function onTouchEnded(touch, event) local location = touch:getLocation() - cclog("onTouchEnded: %0.2f, %0.2f", location.x, location.y) + --cclog("onTouchEnded: %0.2f, %0.2f", location.x, location.y) touchBeginPoint = nil spriteDog.isPaused = false end From eb6ef4d0679a3767e13994d4819881e0d4c83614 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Thu, 10 Apr 2014 15:51:25 +0800 Subject: [PATCH 48/98] tab to 4 space --- .../runtime-src/proj.android/jni/Android.mk | 4 +- .../proj.ios_mac/mac/SimulatorApp.mm | 84 ++-- .../proj.win32/SimulatorWindow.cpp | 400 +++++++++--------- .../runtime-src/proj.win32/main.cpp | 66 +-- 4 files changed, 277 insertions(+), 277 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk index a52d06268d..ab9918e988 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/jni/Android.mk @@ -7,13 +7,13 @@ LOCAL_MODULE := cocos2dlua_shared LOCAL_MODULE_FILENAME := libcocos2dlua LOCAL_SRC_FILES := lua/main.cpp \ - lua/Runtime_android.cpp \ + lua/Runtime_android.cpp \ ../../Classes/AppDelegate.cpp \ ../../Classes/Runtime.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes - + LOCAL_STATIC_LIBRARIES := curl_static_prebuilt LOCAL_WHOLE_STATIC_LIBRARIES := cocos_lua_static diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm index 37392458d3..5b5d279b8c 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.ios_mac/mac/SimulatorApp.mm @@ -76,7 +76,7 @@ std::string getCurAppPath(void) } AppDelegate app; - [self createSimulator:[NSString stringWithUTF8String:"HelloLua"] viewWidth:960 viewHeight:640 factor:1.0]; + [self createSimulator:[NSString stringWithUTF8String:"HelloLua"] viewWidth:960 viewHeight:640 factor:1.0]; Application::getInstance()->run(); // After run, application needs to be terminated immediately. [NSApp terminate: self]; @@ -89,20 +89,20 @@ std::string getCurAppPath(void) - (void) createSimulator:(NSString*)viewName viewWidth:(float)width viewHeight:(float)height factor:(float)frameZoomFactor { if (g_eglView) - { - return; - } + { + return; + } - g_eglView = GLView::createWithRect([viewName cStringUsingEncoding:NSUTF8StringEncoding],cocos2d::Rect(0.0f,0.0f,width,height),frameZoomFactor); - auto director = Director::getInstance(); - director->setOpenGLView(g_eglView); - g_landscape = false; - g_screenSize.width = width; - g_screenSize.height = height; - if (width > height) - { - g_landscape = true; - } + g_eglView = GLView::createWithRect([viewName cStringUsingEncoding:NSUTF8StringEncoding],cocos2d::Rect(0.0f,0.0f,width,height),frameZoomFactor); + auto director = Director::getInstance(); + director->setOpenGLView(g_eglView); + g_landscape = false; + g_screenSize.width = width; + g_screenSize.height = height; + if (width > height) + { + g_landscape = true; + } window = glfwGetCocoaWindow(g_eglView->getWindow()); [NSApp setDelegate: self]; @@ -178,26 +178,26 @@ std::string getCurAppPath(void) } int width = g_screenSize.width; - int height = g_screenSize.height; - if (height > width) - { - int w = width; - width = height; - height = w; - } + int height = g_screenSize.height; + if (height > width) + { + int w = width; + width = height; + height = w; + } - int count = SimulatorConfig::getInstance()->getScreenSizeCount(); - for (int i = 0; i < count; ++i) - { - bool bSel = false; + int count = SimulatorConfig::getInstance()->getScreenSizeCount(); + for (int i = 0; i < count; ++i) + { + bool bSel = false; SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); - if (size.width == width && size.height == height) - { - bSel = true; - } + if (size.width == width && size.height == height) + { + bSel = true; + } NSMenuItem *itemView = [menuScreen itemWithTitle:[NSString stringWithUTF8String:size.title.c_str()]]; [itemView setState:(bSel? NSOnState : NSOffState)]; - } + } //[window setTitle:[NSString stringWithFormat:@"quick-x-player (%0.0f%%)", projectConfig.getFrameScale() * 100]]; @@ -209,14 +209,14 @@ std::string getCurAppPath(void) auto policy = g_eglView->getResolutionPolicy(); auto designSize = g_eglView->getDesignResolutionSize(); - if (g_landscape) - { + if (g_landscape) + { g_eglView->setFrameSize(g_screenSize.width, g_screenSize.height); - } - else - { + } + else + { g_eglView->setFrameSize(g_screenSize.height, g_screenSize.width); - } + } g_eglView->setDesignResolutionSize(designSize.width, designSize.height, policy); @@ -280,13 +280,13 @@ std::string getCurAppPath(void) - (IBAction) onViewChangeFrameSize:(id)sender { NSInteger index = [sender tag]; - if (index >= 0 && index < SimulatorConfig::getInstance()->getScreenSizeCount()) - { + if (index >= 0 && index < SimulatorConfig::getInstance()->getScreenSizeCount()) + { SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(index); - g_screenSize.width = size.width; - g_screenSize.height = size.height; - [self updateView]; - } + g_screenSize.width = size.width; + g_screenSize.height = size.height; + [self updateView]; + } } diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp index d383352772..b7c9101397 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/SimulatorWindow.cpp @@ -44,270 +44,270 @@ INT_PTR CALLBACK AboutDialogCallback(HWND hDlg, UINT message, WPARAM wParam, LPA void createViewMenu() { - HMENU menu = GetMenu(glfwGetWin32Window(g_eglView->getWindow())); - HMENU viewMenu = GetSubMenu(menu, 1); + HMENU menu = GetMenu(glfwGetWin32Window(g_eglView->getWindow())); + HMENU viewMenu = GetSubMenu(menu, 1); - for (int i = SimulatorConfig::getInstance()->getScreenSizeCount() - 1; i >= 0; --i) - { - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); - wstring menuName; - menuName.assign(size.title.begin(), size.title.end()); + for (int i = SimulatorConfig::getInstance()->getScreenSizeCount() - 1; i >= 0; --i) + { + SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); + wstring menuName; + menuName.assign(size.title.begin(), size.title.end()); - MENUITEMINFO item; - ZeroMemory(&item, sizeof(item)); - item.cbSize = sizeof(item); - item.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; - item.fType = MFT_STRING; - item.wID = ID_VIEW_SIZE + i; - item.dwTypeData = (LPTSTR)menuName.c_str(); - item.cch = menuName.length(); + MENUITEMINFO item; + ZeroMemory(&item, sizeof(item)); + item.cbSize = sizeof(item); + item.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; + item.fType = MFT_STRING; + item.wID = ID_VIEW_SIZE + i; + item.dwTypeData = (LPTSTR)menuName.c_str(); + item.cch = menuName.length(); - InsertMenuItem(viewMenu, 0, TRUE, &item); - } + InsertMenuItem(viewMenu, 0, TRUE, &item); + } } void updateMenu() { - HMENU menu = GetMenu(glfwGetWin32Window(g_eglView->getWindow())); - HMENU viewMenu = GetSubMenu(menu, 1); + HMENU menu = GetMenu(glfwGetWin32Window(g_eglView->getWindow())); + HMENU viewMenu = GetSubMenu(menu, 1); - if (g_landscape) - { - CheckMenuItem(viewMenu, ID_VIEW_PORTRAIT, MF_BYCOMMAND | MF_UNCHECKED); - CheckMenuItem(viewMenu, ID_VIEW_LANDSCAPE, MF_BYCOMMAND | MF_CHECKED); - } - else - { - CheckMenuItem(viewMenu, ID_VIEW_PORTRAIT, MF_BYCOMMAND | MF_CHECKED); - CheckMenuItem(viewMenu, ID_VIEW_LANDSCAPE, MF_BYCOMMAND | MF_UNCHECKED); - } + if (g_landscape) + { + CheckMenuItem(viewMenu, ID_VIEW_PORTRAIT, MF_BYCOMMAND | MF_UNCHECKED); + CheckMenuItem(viewMenu, ID_VIEW_LANDSCAPE, MF_BYCOMMAND | MF_CHECKED); + } + else + { + CheckMenuItem(viewMenu, ID_VIEW_PORTRAIT, MF_BYCOMMAND | MF_CHECKED); + CheckMenuItem(viewMenu, ID_VIEW_LANDSCAPE, MF_BYCOMMAND | MF_UNCHECKED); + } - int width = g_screenSize.width; - int height = g_screenSize.height; - if (height > width) - { - int w = width; - width = height; - height = w; - } + int width = g_screenSize.width; + int height = g_screenSize.height; + if (height > width) + { + int w = width; + width = height; + height = w; + } - int count = SimulatorConfig::getInstance()->getScreenSizeCount(); - for (int i = 0; i < count; ++i) - { - bool bSel = false; + int count = SimulatorConfig::getInstance()->getScreenSizeCount(); + for (int i = 0; i < count; ++i) + { + bool bSel = false; - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); - if (size.width == width && size.height == height) - { - bSel = true; - } - CheckMenuItem(viewMenu, i, MF_BYPOSITION | (bSel? MF_CHECKED : MF_UNCHECKED)); - } + SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); + if (size.width == width && size.height == height) + { + bSel = true; + } + CheckMenuItem(viewMenu, i, MF_BYPOSITION | (bSel? MF_CHECKED : MF_UNCHECKED)); + } - int scale=g_eglView->getFrameZoomFactor()*100; - CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT100, MF_BYCOMMAND | MF_UNCHECKED); - CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT75, MF_BYCOMMAND | MF_UNCHECKED); - CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT50, MF_BYCOMMAND | MF_UNCHECKED); - CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT25, MF_BYCOMMAND | MF_UNCHECKED); - switch (scale) - { - case 100: - CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT100, MF_BYCOMMAND | MF_CHECKED); - break; - case 75: - CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT75, MF_BYCOMMAND | MF_CHECKED); - break; - case 50: - CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT50, MF_BYCOMMAND | MF_CHECKED); - break; - case 25: - CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT25, MF_BYCOMMAND | MF_CHECKED); - break; - default: - break; - } + int scale=g_eglView->getFrameZoomFactor()*100; + CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT100, MF_BYCOMMAND | MF_UNCHECKED); + CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT75, MF_BYCOMMAND | MF_UNCHECKED); + CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT50, MF_BYCOMMAND | MF_UNCHECKED); + CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT25, MF_BYCOMMAND | MF_UNCHECKED); + switch (scale) + { + case 100: + CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT100, MF_BYCOMMAND | MF_CHECKED); + break; + case 75: + CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT75, MF_BYCOMMAND | MF_CHECKED); + break; + case 50: + CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT50, MF_BYCOMMAND | MF_CHECKED); + break; + case 25: + CheckMenuItem(viewMenu, ID_VIEW_ZOOMOUT25, MF_BYCOMMAND | MF_CHECKED); + break; + default: + break; + } } /*@brief updateView*/ void updateView() { - auto policy = g_eglView->getResolutionPolicy(); - auto designSize = g_eglView->getDesignResolutionSize(); + auto policy = g_eglView->getResolutionPolicy(); + auto designSize = g_eglView->getDesignResolutionSize(); - if (g_landscape) - { - g_eglView->setFrameSize(g_screenSize.width, g_screenSize.height); - } - else - { - g_eglView->setFrameSize(g_screenSize.height, g_screenSize.width); - } + if (g_landscape) + { + g_eglView->setFrameSize(g_screenSize.width, g_screenSize.height); + } + else + { + g_eglView->setFrameSize(g_screenSize.height, g_screenSize.width); + } - g_eglView->setDesignResolutionSize(designSize.width, designSize.height, policy); + g_eglView->setDesignResolutionSize(designSize.width, designSize.height, policy); - updateMenu(); + updateMenu(); } void onViewChangeOrientation(int viewMenuID) { - if (viewMenuID == ID_VIEW_PORTRAIT && g_landscape) - { - g_landscape = false; - updateView(); - } - else if (viewMenuID == ID_VIEW_LANDSCAPE && !g_landscape) - { - g_landscape = true; - updateView(); - } + if (viewMenuID == ID_VIEW_PORTRAIT && g_landscape) + { + g_landscape = false; + updateView(); + } + else if (viewMenuID == ID_VIEW_LANDSCAPE && !g_landscape) + { + g_landscape = true; + updateView(); + } } void onViewZoomOut(int viewMenuID) { - float scale = 1.0; - switch (viewMenuID) - { - case ID_VIEW_ZOOMOUT100: - scale=1.0; - break; - case ID_VIEW_ZOOMOUT75: - scale=0.75; - break; - case ID_VIEW_ZOOMOUT50: - scale=0.50; - break; - case ID_VIEW_ZOOMOUT25: - scale=0.25; - break; - default: - break; - } - g_eglView->setFrameZoomFactor(scale); - updateView(); + float scale = 1.0; + switch (viewMenuID) + { + case ID_VIEW_ZOOMOUT100: + scale=1.0; + break; + case ID_VIEW_ZOOMOUT75: + scale=0.75; + break; + case ID_VIEW_ZOOMOUT50: + scale=0.50; + break; + case ID_VIEW_ZOOMOUT25: + scale=0.25; + break; + default: + break; + } + g_eglView->setFrameZoomFactor(scale); + updateView(); } void onViewChangeFrameSize(int viewMenuID) { - int index = viewMenuID - ID_VIEW_SIZE; - if (index >= 0 && index < SimulatorConfig::getInstance()->getScreenSizeCount()) - { - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(index); - g_screenSize.width = size.width; - g_screenSize.height = size.height; - updateView(); - } + int index = viewMenuID - ID_VIEW_SIZE; + if (index >= 0 && index < SimulatorConfig::getInstance()->getScreenSizeCount()) + { + SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(index); + g_screenSize.width = size.width; + g_screenSize.height = size.height; + updateView(); + } } void onHelpAbout() { - DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DIALOG_ABOUT), glfwGetWin32Window(g_eglView->getWindow()), AboutDialogCallback); + DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DIALOG_ABOUT), glfwGetWin32Window(g_eglView->getWindow()), AboutDialogCallback); } void shutDownApp() { - HWND hWnd=glfwGetWin32Window(g_eglView->getWindow()); - ::SendMessage(hWnd,WM_CLOSE,NULL,NULL); + HWND hWnd=glfwGetWin32Window(g_eglView->getWindow()); + ::SendMessage(hWnd,WM_CLOSE,NULL,NULL); } /*@brief new windows process*/ LRESULT CALLBACK SNewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { - int wmId, wmEvent; - switch (message) - { - case WM_COMMAND: - { - wmId = LOWORD(wParam); - wmEvent = HIWORD(wParam); + int wmId, wmEvent; + switch (message) + { + case WM_COMMAND: + { + wmId = LOWORD(wParam); + wmEvent = HIWORD(wParam); - switch (wmId) - { - case ID_FILE_EXIT: - shutDownApp(); - break; + switch (wmId) + { + case ID_FILE_EXIT: + shutDownApp(); + break; - case ID_VIEW_PORTRAIT: - case ID_VIEW_LANDSCAPE: - onViewChangeOrientation(wmId); - break; + case ID_VIEW_PORTRAIT: + case ID_VIEW_LANDSCAPE: + onViewChangeOrientation(wmId); + break; - case ID_VIEW_ZOOMOUT100: - case ID_VIEW_ZOOMOUT75: - case ID_VIEW_ZOOMOUT50: - case ID_VIEW_ZOOMOUT25: - onViewZoomOut(wmId); - break; + case ID_VIEW_ZOOMOUT100: + case ID_VIEW_ZOOMOUT75: + case ID_VIEW_ZOOMOUT50: + case ID_VIEW_ZOOMOUT25: + onViewZoomOut(wmId); + break; - case ID_CONTROL_RELOAD: - reloadScript(""); - break; + case ID_CONTROL_RELOAD: + reloadScript(""); + break; - case ID_HELP_ABOUT: - onHelpAbout(); + case ID_HELP_ABOUT: + onHelpAbout(); - default: - if (wmId >= ID_VIEW_SIZE && wmId <= ID_VIEW_SIZE + SimulatorConfig::getInstance()->getScreenSizeCount() - 1) - { - onViewChangeFrameSize(wmId); - break; - } - return 0; - } - } - break; - } - return g_oldProc(hWnd, message, wParam, lParam); + default: + if (wmId >= ID_VIEW_SIZE && wmId <= ID_VIEW_SIZE + SimulatorConfig::getInstance()->getScreenSizeCount() - 1) + { + onViewChangeFrameSize(wmId); + break; + } + return 0; + } + } + break; + } + return g_oldProc(hWnd, message, wParam, lParam); } /*@brief AboutDialog Callback*/ INT_PTR CALLBACK AboutDialogCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { - UNREFERENCED_PARAMETER(lParam); - switch (message) - { - case WM_INITDIALOG: - return (INT_PTR)TRUE; + UNREFERENCED_PARAMETER(lParam); + switch (message) + { + case WM_INITDIALOG: + return (INT_PTR)TRUE; - case WM_COMMAND: - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) - { - EndDialog(hDlg, LOWORD(wParam)); - return (INT_PTR)TRUE; - } - break; - } - return (INT_PTR)FALSE; + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) + { + EndDialog(hDlg, LOWORD(wParam)); + return (INT_PTR)TRUE; + } + break; + } + return (INT_PTR)FALSE; } void createSimulator(const char* viewName, float width, float height, float frameZoomFactor) { - if (g_eglView) - { - return; - } + if (g_eglView) + { + return; + } - g_eglView = GLView::createWithRect(viewName,Rect(0,0,width,height),frameZoomFactor); - auto director = Director::getInstance(); - director->setOpenGLView(g_eglView); - g_landscape = false; - g_screenSize.width = width; - g_screenSize.height = height; - if (width > height) - { - g_landscape = true; - } + g_eglView = GLView::createWithRect(viewName,Rect(0,0,width,height),frameZoomFactor); + auto director = Director::getInstance(); + director->setOpenGLView(g_eglView); + g_landscape = false; + g_screenSize.width = width; + g_screenSize.height = height; + if (width > height) + { + g_landscape = true; + } - HWND hWnd=glfwGetWin32Window(g_eglView->getWindow()); - HMENU hMenu = LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MENU_COCOS)); - SetMenu(hWnd, hMenu); - createViewMenu(); - updateMenu(); + HWND hWnd=glfwGetWin32Window(g_eglView->getWindow()); + HMENU hMenu = LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MENU_COCOS)); + SetMenu(hWnd, hMenu); + createViewMenu(); + updateMenu(); - g_oldProc = (WNDPROC)SetWindowLong(hWnd, GWL_WNDPROC, (LONG)SNewWndProc); - if (g_oldProc==0) - { - printf("SetWindowLong NewWndProc Error:%d\n",GetLastError()); - } + g_oldProc = (WNDPROC)SetWindowLong(hWnd, GWL_WNDPROC, (LONG)SNewWndProc); + if (g_oldProc==0) + { + printf("SetWindowLong NewWndProc Error:%d\n",GetLastError()); + } } \ No newline at end of file diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp index 01f8e4fa99..c89ca37c5f 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/main.cpp @@ -16,20 +16,20 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); - LPWSTR *szArgList=nullptr; - int argCount=0; + LPWSTR *szArgList=nullptr; + int argCount=0; - szArgList = CommandLineToArgvW(GetCommandLine(),&argCount); - if (argCount >=2 ) - { - int iLen = 2*wcslen(szArgList[1]); - char* chRtn = new char[iLen+1]; - wcstombs(chRtn,szArgList[1],iLen+1); - extern std::string g_resourcePath; - g_resourcePath = chRtn; - delete [] chRtn; - } - LocalFree(szArgList); + szArgList = CommandLineToArgvW(GetCommandLine(),&argCount); + if (argCount >=2 ) + { + int iLen = 2*wcslen(szArgList[1]); + char* chRtn = new char[iLen+1]; + wcstombs(chRtn,szArgList[1],iLen+1); + extern std::string g_resourcePath; + g_resourcePath = chRtn; + delete [] chRtn; + } + LocalFree(szArgList); #ifdef USE_WIN32_CONSOLE AllocConsole(); @@ -40,7 +40,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, // create the application instance AppDelegate app; - createSimulator("HelloLua",960,640); + createSimulator("HelloLua",960,640); int ret = Application::getInstance()->run(); @@ -52,23 +52,23 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, } std::string getCurAppPath(void) { - TCHAR szAppDir[MAX_PATH]={0}; - if (!GetModuleFileName(NULL,szAppDir,MAX_PATH)) - return ""; - int nEnd=0; - for (int i=0;szAppDir[i];i++) - { - if(szAppDir[i]=='\\') - nEnd = i; - } - szAppDir[nEnd] = 0; - int iLen = 2*wcslen(szAppDir); - char* chRtn = new char[iLen+1]; - wcstombs(chRtn,szAppDir,iLen+1); - std::string strPath = chRtn; - delete [] chRtn; - chRtn=NULL; - char fuldir[MAX_PATH]={0}; - _fullpath(fuldir,strPath.c_str(),MAX_PATH); - return fuldir; + TCHAR szAppDir[MAX_PATH]={0}; + if (!GetModuleFileName(NULL,szAppDir,MAX_PATH)) + return ""; + int nEnd=0; + for (int i=0;szAppDir[i];i++) + { + if(szAppDir[i]=='\\') + nEnd = i; + } + szAppDir[nEnd] = 0; + int iLen = 2*wcslen(szAppDir); + char* chRtn = new char[iLen+1]; + wcstombs(chRtn,szAppDir,iLen+1); + std::string strPath = chRtn; + delete [] chRtn; + chRtn=NULL; + char fuldir[MAX_PATH]={0}; + _fullpath(fuldir,strPath.c_str(),MAX_PATH); + return fuldir; } \ No newline at end of file From b8ed365b7f7d1b1caf24b0a8493ddcce3f56fdd0 Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Thu, 10 Apr 2014 15:53:42 +0800 Subject: [PATCH 49/98] tab to 4 space --- .../runtime-src/Classes/AppDelegate.cpp | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp index 65de86539a..44770d80f2 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp @@ -22,11 +22,11 @@ bool AppDelegate::applicationDidFinishLaunching() { // initialize director auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - if(!glview) { - glview = GLView::createWithRect("HelloLua", Rect(0,0,900,640)); - director->setOpenGLView(glview); - } + auto glview = director->getOpenGLView(); + if(!glview) { + glview = GLView::createWithRect("HelloLua", Rect(0,0,900,640)); + director->setOpenGLView(glview); + } glview->setDesignResolutionSize(480, 320, ResolutionPolicy::NO_BORDER); @@ -37,13 +37,13 @@ bool AppDelegate::applicationDidFinishLaunching() director->setAnimationInterval(1.0 / 60); #ifdef COCOS2D_DEBUG - if (startRuntime()) - return true; + if (startRuntime()) + return true; #endif - auto engine = LuaEngine::getInstance(); - ScriptEngineManager::getInstance()->setScriptEngine(engine); - engine->executeScriptFile("src/main.lua"); + auto engine = LuaEngine::getInstance(); + ScriptEngineManager::getInstance()->setScriptEngine(engine); + engine->executeScriptFile("src/main.lua"); return true; } From 06b727d184184c7864b1dfb059b2623eb7049c29 Mon Sep 17 00:00:00 2001 From: cw Date: Thu, 10 Apr 2014 18:15:07 +0800 Subject: [PATCH 51/98] remove comment code and rename function --- .../frameworks/runtime-src/Classes/Runtime.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index f03afe7174..eef89a4908 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -209,8 +209,6 @@ public: menu->setPosition( Point::ZERO ); menuItem->setPosition( Point( VisibleRect::right().x - 50, VisibleRect::bottom().y + 25) ); addChild(menu, 1); - //_scheduler = CCDirector::sharedDirector()->getScheduler(); - //scheduleUpdate(); } void playerCallback(Object* sender) @@ -251,7 +249,7 @@ public: void stop(); private: - bool recv_file(int fd); + bool receiveFile(int fd); void addClient(); void loop(); @@ -425,7 +423,7 @@ static void readResFileFinfo() } } -bool FileServer::recv_file(int fd) +bool FileServer::receiveFile(int fd) { char headlen[5]={0}; if (recv(fd, headlen, 4,0)<=0) { @@ -550,7 +548,7 @@ void FileServer::loop() std::vector to_remove; for(const auto &fd: _fds) { if(FD_ISSET(fd,©_set)) { - if( ! recv_file(fd) ) { + if( ! receiveFile(fd) ) { to_remove.push_back(fd); } if(--nready <= 0) @@ -625,7 +623,6 @@ public: rapidjson::Document dReplyParse; dReplyParse.SetObject(); dReplyParse.AddMember("cmd",strcmd.c_str(),dReplyParse.GetAllocator()); - //dReplyParse.AddMember("cmd",dArgParse["cmd"]); if (dArgParse.HasMember("seq")) { dReplyParse.AddMember("seq",dArgParse["seq"],dReplyParse.GetAllocator()); } From 1fadba7de1f5e14cd57fc53e75b5bb233275353e Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Fri, 11 Apr 2014 10:41:35 +0800 Subject: [PATCH 52/98] add static to variable --- .../frameworks/runtime-src/Classes/Runtime.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index eef89a4908..b973f9a0d2 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -26,7 +26,6 @@ THE SOFTWARE. #include "lua_debugger.h" #include "CCLuaEngine.h" #include "cocos2d.h" -#include "CCFontFNT.h" #include "json/document.h" #include "json/filestream.h" #include "json/stringbuffer.h" @@ -45,7 +44,7 @@ using namespace std; using namespace cocos2d; std::string g_resourcePath; -rapidjson::Document g_filecfgjson; +static rapidjson::Document g_filecfgjson; extern string getIPAddress(); const char* getRuntimeVersion() From 85cc100ac4363202b2f5358f87fcb0559bc1a96c Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 11 Apr 2014 13:51:40 +0800 Subject: [PATCH 53/98] Small fix in CCRenderer.cpp, 'auto i = 0' -> 'ssize_t i = 0' in for loop --- cocos/2d/renderer/CCRenderer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cocos/2d/renderer/CCRenderer.cpp b/cocos/2d/renderer/CCRenderer.cpp index 42606a8172..509ce93a56 100644 --- a/cocos/2d/renderer/CCRenderer.cpp +++ b/cocos/2d/renderer/CCRenderer.cpp @@ -261,7 +261,8 @@ int Renderer::createRenderQueue() void Renderer::visitRenderQueue(const RenderQueue& queue) { ssize_t size = queue.size(); - for (auto index = 0; index < size; ++index) + + for (ssize_t index = 0; index < size; ++index) { auto command = queue[index]; auto commandType = command->getType(); From 5b2cf595a28acd0f869a93a4aeb9d45740559211 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Fri, 11 Apr 2014 14:31:44 +0800 Subject: [PATCH 54/98] fix the crash invoked by calling the `glGetUniformfv` --- .../scripting/lua-bindings/manual/LuaOpengl.cpp.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/manual/LuaOpengl.cpp.REMOVED.git-id b/cocos/scripting/lua-bindings/manual/LuaOpengl.cpp.REMOVED.git-id index 17dd7bf0ca..f3fede2d23 100644 --- a/cocos/scripting/lua-bindings/manual/LuaOpengl.cpp.REMOVED.git-id +++ b/cocos/scripting/lua-bindings/manual/LuaOpengl.cpp.REMOVED.git-id @@ -1 +1 @@ -9f759dc3875d5cbbe9b00da054338f2bde85efa0 \ No newline at end of file +5c9b46709a646c59f7dda47fd5d3f2302f1145fb \ No newline at end of file From 3088ac88f5cb94bfb325eda4952803a0cd3ef29d Mon Sep 17 00:00:00 2001 From: lm Date: Fri, 11 Apr 2014 15:06:14 +0800 Subject: [PATCH 55/98] [Jenkins][ci skip] Add rebuild when git fail in pull request builder --- .../configs/cocos-2dx-pull-request-build.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tools/jenkins-scripts/configs/cocos-2dx-pull-request-build.py b/tools/jenkins-scripts/configs/cocos-2dx-pull-request-build.py index 3f387c4916..a09fdf2b79 100644 --- a/tools/jenkins-scripts/configs/cocos-2dx-pull-request-build.py +++ b/tools/jenkins-scripts/configs/cocos-2dx-pull-request-build.py @@ -9,12 +9,23 @@ if(os.path.exists('tools/jenkins-scripts/pull-request-builder.py') == False): else: os.system("cp -r " + source_dir + "/. .") -os.system('git reset --hard') +def clean_workspace(): + os.system('git reset --hard') + os.system('git clean -xdf -f') + +clean_workspace() os.system('git checkout develop') -os.system('git reset --hard') +clean_workspace() os.system('git pull origin develop') -ret = os.system('python -u tools/jenkins-scripts/pull-request-builder.py') -os.system('git reset --hard') + +for i in range(0, 3): + ret = os.system('python -u tools/jenkins-scripts/pull-request-builder.py') + if(ret > 255): + ret >>= 8 + if(ret == 0) or (ret == 1): + break + +clean_workspace() print ret if(ret > 0): ret = 1 From b69b14382e285527b62a011d9a72be2a7197b649 Mon Sep 17 00:00:00 2001 From: boyu0 Date: Fri, 11 Apr 2014 15:25:18 +0800 Subject: [PATCH 56/98] Rename lua cc.Label:create to cc.Label:createWithTTF and cc.Label.createWithSystemFont --- .../AccelerometerTest/AccelerometerTest.lua | 2 +- .../ActionManagerTest/ActionManagerTest.lua | 6 ++-- .../ActionsProgressTest.lua | 6 ++-- .../lua-tests/src/ActionsTest/ActionsTest.lua | 16 ++++----- .../AssetsManagerTest/AssetsManagerModule.lua | 2 +- .../AssetsManagerTest/AssetsManagerTest.lua | 2 +- tests/lua-tests/src/BugsTest/BugsTest.lua | 12 +++---- .../CocoStudioArmatureTest.lua | 10 +++--- .../CocoStudioSceneTest.lua | 2 +- .../CocosDenshionTest/CocosDenshionTest.lua | 2 +- .../CurrentLanguageTest.lua | 4 +-- .../DrawPrimitivesTest/DrawPrimitivesTest.lua | 4 +-- .../lua-tests/src/EffectsTest/EffectsTest.lua | 2 +- .../src/ExtensionTest/ExtensionTest.lua | 36 +++++++++---------- .../src/ExtensionTest/WebProxyTest.lua | 12 +++---- tests/lua-tests/src/FontTest/FontTest.lua | 8 ++--- tests/lua-tests/src/KeypadTest/KeypadTest.lua | 4 +-- .../src/LabelTestNew/LabelTestNew.lua | 4 +-- tests/lua-tests/src/LayerTest/LayerTest.lua | 4 +-- .../src/LuaBridgeTest/LuaBridgeTest.lua | 8 ++--- tests/lua-tests/src/MenuTest/MenuTest.lua | 2 +- .../NewEventDispatcherTest.lua | 14 ++++---- tests/lua-tests/src/OpenGLTest/OpenGLTest.lua | 4 +-- .../src/ParticleTest/ParticleTest.lua | 4 +-- .../PerformanceTest/PerformanceSpriteTest.lua | 4 +-- .../src/PerformanceTest/PerformanceTest.lua | 26 +++++++------- .../lua-tests/src/PhysicsTest/PhysicsTest.lua | 16 ++++----- .../src/RotateWorldTest/RotateWorldTest.lua | 2 +- .../src/Texture2dTest/Texture2dTest.lua | 2 +- .../src/TransitionsTest/TransitionsTest.lua | 8 ++--- .../src/UserDefaultTest/UserDefaultTest.lua | 2 +- .../XMLHttpRequestTest/XMLHttpRequestTest.lua | 12 +++---- tests/lua-tests/src/helper.lua | 6 ++-- tests/lua-tests/src/mainMenu.lua | 2 +- 34 files changed, 125 insertions(+), 125 deletions(-) diff --git a/tests/lua-tests/src/AccelerometerTest/AccelerometerTest.lua b/tests/lua-tests/src/AccelerometerTest/AccelerometerTest.lua index 795d04f49d..0fe4559e01 100644 --- a/tests/lua-tests/src/AccelerometerTest/AccelerometerTest.lua +++ b/tests/lua-tests/src/AccelerometerTest/AccelerometerTest.lua @@ -7,7 +7,7 @@ local function AccelerometerMainLayer() local function onEnter() layer:setAccelerometerEnabled(true) - local label = cc.Label:create(title(), "fonts/arial.ttf", 32) + local label = cc.Label:createWithTTF(title(), "fonts/arial.ttf", 32) layer:addChild(label, 1) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition( cc.p(VisibleRect:center().x, VisibleRect:top().y - 50) ) diff --git a/tests/lua-tests/src/ActionManagerTest/ActionManagerTest.lua b/tests/lua-tests/src/ActionManagerTest/ActionManagerTest.lua index 91e33220f6..51ed3982a3 100644 --- a/tests/lua-tests/src/ActionManagerTest/ActionManagerTest.lua +++ b/tests/lua-tests/src/ActionManagerTest/ActionManagerTest.lua @@ -68,7 +68,7 @@ local function PauseTest() local function onNodeEvent(event) if event == "enter" then local s = cc.Director:getInstance():getWinSize() - local l = cc.Label:create("After 3 seconds grossini should move", "fonts/Thonburi.ttf", 16) + local l = cc.Label:createWithTTF("After 3 seconds grossini should move", "fonts/Thonburi.ttf", 16) ret:addChild(l) l:setAnchorPoint(cc.p(0.5, 0.5)) l:setPosition( cc.p(s.width / 2, 245) ) @@ -102,7 +102,7 @@ end -------------------------------------------------------------------- local function RemoveTest() local ret = createTestLayer("Remove Test") - local l = cc.Label:create("Should not crash", "fonts/Thonburi.ttf", 16) + local l = cc.Label:createWithTTF("Should not crash", "fonts/Thonburi.ttf", 16) local s = cc.Director:getInstance():getWinSize() ret:addChild(l) l:setAnchorPoint(cc.p(0.5, 0.5)) @@ -147,7 +147,7 @@ local function ResumeTest() local function onNodeEvent(event) if event == "enter" then - local l = cc.Label:create("Grossini only rotate/scale in 3 seconds", "fonts/Thonburi.ttf", 16) + local l = cc.Label:createWithTTF("Grossini only rotate/scale in 3 seconds", "fonts/Thonburi.ttf", 16) ret:addChild(l) local s = cc.Director:getInstance():getWinSize() l:setAnchorPoint(cc.p(0.5, 0.5)) diff --git a/tests/lua-tests/src/ActionsProgressTest/ActionsProgressTest.lua b/tests/lua-tests/src/ActionsProgressTest/ActionsProgressTest.lua index 84db9cdc97..9b745b86b6 100644 --- a/tests/lua-tests/src/ActionsProgressTest/ActionsProgressTest.lua +++ b/tests/lua-tests/src/ActionsProgressTest/ActionsProgressTest.lua @@ -198,7 +198,7 @@ local function SpriteProgressBarTintAndFade() left:runAction(cc.RepeatForever:create(cc.Sequence:create(cc.TintTo:create(1, 255, 0, 0), cc.TintTo:create(1, 0, 255, 0), cc.TintTo:create(1, 0, 0, 255)))) layer:addChild(left) - left:addChild(cc.Label:create("Tint", "fonts/Marker Felt.ttf", 20.0)) + left:addChild(cc.Label:createWithTTF("Tint", "fonts/Marker Felt.ttf", 20.0)) local middle = cc.ProgressTimer:create(cc.Sprite:create(s_pPathSister2)) middle:setType(cc.PROGRESS_TIMER_TYPE_BAR) @@ -213,7 +213,7 @@ local function SpriteProgressBarTintAndFade() middle:runAction(cc.RepeatForever:create(fade2)) layer:addChild(middle) - middle:addChild(cc.Label:create("Fade", "fonts/Marker Felt.ttf", 20.0)) + middle:addChild(cc.Label:createWithTTF("Fade", "fonts/Marker Felt.ttf", 20.0)) local right = cc.ProgressTimer:create(cc.Sprite:create(s_pPathSister2)) right:setType(cc.PROGRESS_TIMER_TYPE_BAR) @@ -227,7 +227,7 @@ local function SpriteProgressBarTintAndFade() right:runAction(cc.RepeatForever:create(cc.Sequence:create(cc.FadeTo:create(1.0, 0), cc.FadeTo:create(1.0, 255)))) layer:addChild(right) - right:addChild(cc.Label:create("Tint and Fade", "fonts/Marker Felt.ttf", 20.0)) + right:addChild(cc.Label:createWithTTF("Tint and Fade", "fonts/Marker Felt.ttf", 20.0)) Helper.subtitleLabel:setString("ProgressTo Bar Mid") return layer diff --git a/tests/lua-tests/src/ActionsTest/ActionsTest.lua b/tests/lua-tests/src/ActionsTest/ActionsTest.lua index 72728dae45..f3840a6469 100644 --- a/tests/lua-tests/src/ActionsTest/ActionsTest.lua +++ b/tests/lua-tests/src/ActionsTest/ActionsTest.lua @@ -184,7 +184,7 @@ local function ActionRotationalSkewVSStandardSkew() box:ignoreAnchorPointForPosition(false); box:setPosition(cc.p(s.width/2, s.height - 100 - box:getContentSize().height/2)); layer:addChild(box); - local label = cc.Label:create("Standard cocos2d Skew", s_markerFeltFontPath, 16); + local label = cc.Label:createWithTTF("Standard cocos2d Skew", s_markerFeltFontPath, 16); label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p(s.width/2, s.height - 100 + label:getContentSize().height)); layer:addChild(label); @@ -200,7 +200,7 @@ local function ActionRotationalSkewVSStandardSkew() box:ignoreAnchorPointForPosition(false); box:setPosition(cc.p(s.width/2, s.height - 250 - box:getContentSize().height/2)); layer:addChild(box); - label = cc.Label:create("Rotational Skew", s_markerFeltFontPath, 16); + label = cc.Label:createWithTTF("Rotational Skew", s_markerFeltFontPath, 16); label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p(s.width/2, s.height - 250 + label:getContentSize().height/2)); layer:addChild(label); @@ -590,7 +590,7 @@ end local actionSequenceLayer = nil local function ActionSequenceCallback1() - local label = cc.Label:create("callback 1 called", s_markerFeltFontPath, 16) + local label = cc.Label:createWithTTF("callback 1 called", s_markerFeltFontPath, 16) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(size.width / 4, size.height / 2) @@ -598,7 +598,7 @@ local function ActionSequenceCallback1() end local function ActionSequenceCallback2(sender) - local label = cc.Label:create("callback 2 called", s_markerFeltFontPath, 16) + local label = cc.Label:createWithTTF("callback 2 called", s_markerFeltFontPath, 16) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p(size.width / 4 * 2, size.height / 2)) @@ -606,7 +606,7 @@ local function ActionSequenceCallback2(sender) end local function ActionSequenceCallback3(sender) - local label = cc.Label:create("callback 3 called", s_markerFeltFontPath, 16) + local label = cc.Label:createWithTTF("callback 3 called", s_markerFeltFontPath, 16) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p(size.width / 4 * 3, size.height / 2)) @@ -789,7 +789,7 @@ end local callFuncLayer = nil local function CallFucnCallback1() - local label = cc.Label:create("callback 1 called", s_markerFeltFontPath, 16) + local label = cc.Label:createWithTTF("callback 1 called", s_markerFeltFontPath, 16) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(size.width / 4, size.height / 2) @@ -797,7 +797,7 @@ local function CallFucnCallback1() end local function CallFucnCallback2(sender) - local label = cc.Label:create("callback 2 called", s_markerFeltFontPath, 16) + local label = cc.Label:createWithTTF("callback 2 called", s_markerFeltFontPath, 16) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(size.width / 4 * 2, size.height / 2) @@ -805,7 +805,7 @@ local function CallFucnCallback2(sender) end local function CallFucnCallback3(sender) - local label = cc.Label:create("callback 3 called", s_markerFeltFontPath, 16) + local label = cc.Label:createWithTTF("callback 3 called", s_markerFeltFontPath, 16) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(size.width / 4 * 3, size.height / 2) diff --git a/tests/lua-tests/src/AssetsManagerTest/AssetsManagerModule.lua b/tests/lua-tests/src/AssetsManagerTest/AssetsManagerModule.lua index 85d57230b9..53d9a832fd 100644 --- a/tests/lua-tests/src/AssetsManagerTest/AssetsManagerModule.lua +++ b/tests/lua-tests/src/AssetsManagerTest/AssetsManagerModule.lua @@ -26,7 +26,7 @@ function AssetManagerModule.newScene(backfunc) backMenu:addChild(backMenuItem) layer:addChild(backMenu,6) - local helloLabel = cc.Label:create("Hello World", s_arialPath, 38) + local helloLabel = cc.Label:createWithTTF("Hello World", s_arialPath, 38) helloLabel:setAnchorPoint(cc.p(0.5, 0.5)) helloLabel:setPosition(cc.p(winSize.width / 2, winSize.height - 40)) layer:addChild(helloLabel, 5) diff --git a/tests/lua-tests/src/AssetsManagerTest/AssetsManagerTest.lua b/tests/lua-tests/src/AssetsManagerTest/AssetsManagerTest.lua index e0c1108ea7..4d6000557a 100644 --- a/tests/lua-tests/src/AssetsManagerTest/AssetsManagerTest.lua +++ b/tests/lua-tests/src/AssetsManagerTest/AssetsManagerTest.lua @@ -35,7 +35,7 @@ local function updateLayer() cc.MenuItemFont:setFontName("Arial") cc.MenuItemFont:setFontSize(24) - local progressLable = cc.Label:create("",s_arialPath,30) + local progressLable = cc.Label:createWithTTF("",s_arialPath,30) progressLable:setAnchorPoint(cc.p(0.5, 0.5)) progressLable:setPosition(cc.p(140,50)) layer:addChild(progressLable) diff --git a/tests/lua-tests/src/BugsTest/BugsTest.lua b/tests/lua-tests/src/BugsTest/BugsTest.lua index 3ad2898899..c4b02b1c02 100644 --- a/tests/lua-tests/src/BugsTest/BugsTest.lua +++ b/tests/lua-tests/src/BugsTest/BugsTest.lua @@ -90,7 +90,7 @@ local function BugTest458() local function InitQuestionContainerSprite(pSprite) --Add label - local pLabel = cc.Label:create("Answer 1", s_arialPath, 12) + local pLabel = cc.Label:createWithTTF("Answer 1", s_arialPath, 12) pLabel:setAnchorPoint(cc.p(0.5,0.5)) pLabel:setTag(100) @@ -190,7 +190,7 @@ local BugTest624_2_entry = nil local function BugTest624() local pLayer = cc.Layer:create() - local pLabel = cc.Label:create("Layer1", s_markerFeltFontPath, 36) + local pLabel = cc.Label:createWithTTF("Layer1", s_markerFeltFontPath, 36) pLabel:setAnchorPoint(cc.p(0.5, 0.5)) pLabel:setPosition(cc.p(Winsize.width / 2, Winsize.height / 2)) pLayer:addChild(pLabel) @@ -230,7 +230,7 @@ end function BugTest624_2() local pLayer = cc.Layer:create() - local pLabel = cc.Label:create("Layer2", s_markerFeltFontPath, 36) + local pLabel = cc.Label:createWithTTF("Layer2", s_markerFeltFontPath, 36) pLabel:setAnchorPoint(cc.p(0.5, 0.5)) pLabel:setPosition(cc.p(Winsize.width / 2, Winsize.height / 2)) pLayer:addChild(pLabel) @@ -319,7 +319,7 @@ local function BugTest914() cc.Director:getInstance():replaceScene(scene) end - local label = cc.Label:create("Hello World", s_markerFeltFontPath, 64) + local label = cc.Label:createWithTTF("Hello World", s_markerFeltFontPath, 64) label:setAnchorPoint(cc.p(0.5, 0.5)) --position the label on the center of the screen label:setPosition(cc.p( Winsize.width /2 , Winsize.height/2 )) @@ -382,7 +382,7 @@ local function BugTest1159() pScene:addChild(pLayer) cc.Director:getInstance():replaceScene(cc.TransitionPageTurn:create(1.0, pScene, false)) end - local label = cc.MenuItemLabel:create(cc.Label:create("Flip Me", "Helvetica", 24)) + local label = cc.MenuItemLabel:createWithSystemFont(cc.Label:createWithSystemFont("Flip Me", "Helvetica", 24)) label:setAnchorPoint(cc.p(0.5, 0.5)) label:registerScriptTapHandler(menuCallback) local menu = cc.Menu:create() @@ -594,7 +594,7 @@ local function BugsTestMainLayer() local i = 1 for i = 1, nTestCount do - local label = cc.Label:create(testNames[i], s_arialPath, 24) + local label = cc.Label:createWithTTF(testNames[i], s_arialPath, 24) label:setAnchorPoint(cc.p(0.5, 0.5)) local pMenuItem = cc.MenuItemLabel:create(label) pMenuItem:registerScriptTapHandler(menuCallback) diff --git a/tests/lua-tests/src/CocoStudioTest/CocoStudioArmatureTest/CocoStudioArmatureTest.lua b/tests/lua-tests/src/CocoStudioTest/CocoStudioArmatureTest/CocoStudioArmatureTest.lua index 0e3774b505..fe41ca0d9c 100644 --- a/tests/lua-tests/src/CocoStudioTest/CocoStudioArmatureTest/CocoStudioArmatureTest.lua +++ b/tests/lua-tests/src/CocoStudioTest/CocoStudioArmatureTest/CocoStudioArmatureTest.lua @@ -195,14 +195,14 @@ function ArmatureTestLayer:createToExtensionMenu() end function ArmatureTestLayer:creatTitleAndSubTitle(idx) - local title = cc.Label:create(ArmatureTestLayer.title(idx), s_arialPath, 18) + local title = cc.Label:createWithTTF(ArmatureTestLayer.title(idx), s_arialPath, 18) title:setColor(cc.c3b(0,0,0)) self:addChild(title, 1, 10000) title:setAnchorPoint(cc.p(0.5, 0.5)) title:setPosition( cc.p(VisibleRect:center().x, VisibleRect:top().y - 30)) local subTitle = nil if "" ~= ArmatureTestLayer.subTitle(idx) then - local subTitle = cc.Label:create(ArmatureTestLayer.subTitle(idx), s_arialPath, 18) + local subTitle = cc.Label:createWithTTF(ArmatureTestLayer.subTitle(idx), s_arialPath, 18) subTitle:setColor(cc.c3b(0,0,0)) self:addChild(subTitle, 1, 10001) subTitle:setAnchorPoint(cc.p(0.5, 0.5)) @@ -228,7 +228,7 @@ function TestAsynchronousLoading:onEnter() self._restarItem:setEnabled(false) self._nextItem:setEnabled(false) - local title = cc.Label:create(ArmatureTestLayer.title(1), s_arialPath, 18) + local title = cc.Label:createWithTTF(ArmatureTestLayer.title(1), s_arialPath, 18) title:setColor(cc.c3b(0,0,0)) self:addChild(title, 1, 10000) title:setAnchorPoint(cc.p(0.5, 0.5)) @@ -236,7 +236,7 @@ function TestAsynchronousLoading:onEnter() local subTitle = nil if "" ~= ArmatureTestLayer.subTitle(1) then local subInfo = ArmatureTestLayer.subTitle(1) .. 0.0 - local subTitle = cc.Label:create(subInfo, s_arialPath, 18) + local subTitle = cc.Label:createWithTTF(subInfo, s_arialPath, 18) subTitle:setColor(cc.c3b(0,0,0)) self:addChild(subTitle, 1, 10001) subTitle:setAnchorPoint(cc.p(0.5, 0.5)) @@ -1164,7 +1164,7 @@ function TestArmatureNesting2:onEnter() end self._touchedMenu = false - local label = cc.Label:create("Change Mount", s_arialPath, 20) + local label = cc.Label:createWithTTF("Change Mount", s_arialPath, 20) label:setAnchorPoint(cc.p(0.5, 0.5)) local menuItem = cc.MenuItemLabel:create(label) menuItem:registerScriptTapHandler(changeMountCallback) diff --git a/tests/lua-tests/src/CocoStudioTest/CocoStudioSceneTest/CocoStudioSceneTest.lua b/tests/lua-tests/src/CocoStudioTest/CocoStudioSceneTest/CocoStudioSceneTest.lua index 4740d93678..b64aad32b8 100644 --- a/tests/lua-tests/src/CocoStudioTest/CocoStudioSceneTest/CocoStudioSceneTest.lua +++ b/tests/lua-tests/src/CocoStudioTest/CocoStudioSceneTest/CocoStudioSceneTest.lua @@ -63,7 +63,7 @@ function SceneEditorTestLayer.create() end function SceneEditorTestLayer:createTitle() - local title = cc.Label:create(self.title[sceneEditorTestIdx], s_arialPath, 18) + local title = cc.Label:createWithTTF(self.title[sceneEditorTestIdx], s_arialPath, 18) title:setAnchorPoint(cc.p(0.5, 0.5)) title:setColor(cc.c3b(255, 255, 255)) self:addChild(title, 1, 10000) diff --git a/tests/lua-tests/src/CocosDenshionTest/CocosDenshionTest.lua b/tests/lua-tests/src/CocosDenshionTest/CocosDenshionTest.lua index 36d054a636..771827fc3f 100644 --- a/tests/lua-tests/src/CocosDenshionTest/CocosDenshionTest.lua +++ b/tests/lua-tests/src/CocosDenshionTest/CocosDenshionTest.lua @@ -105,7 +105,7 @@ local function CocosDenshionTest() m_nTestCount = table.getn(testItems) local i = 1 for i = 1, m_nTestCount do - local label = cc.Label:create(testItems[i], s_arialPath, 24) + local label = cc.Label:createWithTTF(testItems[i], s_arialPath, 24) label:setAnchorPoint(cc.p(0.5, 0.5)) local pMenuItem = cc.MenuItemLabel:create(label) pMenuItem:registerScriptTapHandler(menuCallback) diff --git a/tests/lua-tests/src/CurrentLanguageTest/CurrentLanguageTest.lua b/tests/lua-tests/src/CurrentLanguageTest/CurrentLanguageTest.lua index 934a147865..709fa5c6ef 100644 --- a/tests/lua-tests/src/CurrentLanguageTest/CurrentLanguageTest.lua +++ b/tests/lua-tests/src/CurrentLanguageTest/CurrentLanguageTest.lua @@ -1,11 +1,11 @@ local function CurrentLanguageTest() local ret = cc.Layer:create() - local label = cc.Label:create("Current language Test", s_arialPath, 28) + local label = cc.Label:createWithTTF("Current language Test", s_arialPath, 28) ret:addChild(label, 0) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition( cc.p(VisibleRect:center().x, VisibleRect:top().y-50) ) - local labelLanguage = cc.Label:create("", s_arialPath, 20) + local labelLanguage = cc.Label:createWithTTF("", s_arialPath, 20) labelLanguage:setAnchorPoint(cc.p(0.5, 0.5)) labelLanguage:setPosition(VisibleRect:center()) diff --git a/tests/lua-tests/src/DrawPrimitivesTest/DrawPrimitivesTest.lua b/tests/lua-tests/src/DrawPrimitivesTest/DrawPrimitivesTest.lua index 1b36949338..fd23694ea2 100644 --- a/tests/lua-tests/src/DrawPrimitivesTest/DrawPrimitivesTest.lua +++ b/tests/lua-tests/src/DrawPrimitivesTest/DrawPrimitivesTest.lua @@ -66,13 +66,13 @@ local function drawPrimitivesMainLayer() local function InitTitle(layer) --Title - local lableTitle = cc.Label:create(GetTitle(), s_arialPath, 40) + local lableTitle = cc.Label:createWithTTF(GetTitle(), s_arialPath, 40) layer:addChild(lableTitle, 15) lableTitle:setAnchorPoint(cc.p(0.5, 0.5)) lableTitle:setPosition(cc.p(size.width / 2, size.height - 32)) lableTitle:setColor(cc.c3b(255, 255, 40)) --SubTitle - local subLabelTitle = cc.Label:create(GetSubTitle(), s_thonburiPath, 16) + local subLabelTitle = cc.Label:createWithTTF(GetSubTitle(), s_thonburiPath, 16) layer:addChild(subLabelTitle, 15) subLabelTitle:setAnchorPoint(cc.p(0.5, 0.5)) subLabelTitle:setPosition(cc.p(size.width / 2, size.height - 80)) diff --git a/tests/lua-tests/src/EffectsTest/EffectsTest.lua b/tests/lua-tests/src/EffectsTest/EffectsTest.lua index 4558f65c3c..c70ee0097d 100644 --- a/tests/lua-tests/src/EffectsTest/EffectsTest.lua +++ b/tests/lua-tests/src/EffectsTest/EffectsTest.lua @@ -352,7 +352,7 @@ function CreateEffectsTestLayer() local x, y = size.width, size.height - titleLabel = cc.Label:create(EffectsList[ActionIdx], s_markerFeltFontPath, 32) + titleLabel = cc.Label:createWithTTF(EffectsList[ActionIdx], s_markerFeltFontPath, 32) titleLabel:setAnchorPoint(cc.p(0.5, 0.5)) titleLabel:setPosition(x / 2, y - 80) testLayer:addChild(titleLabel) diff --git a/tests/lua-tests/src/ExtensionTest/ExtensionTest.lua b/tests/lua-tests/src/ExtensionTest/ExtensionTest.lua index 542172cf58..fdecbdfdab 100644 --- a/tests/lua-tests/src/ExtensionTest/ExtensionTest.lua +++ b/tests/lua-tests/src/ExtensionTest/ExtensionTest.lua @@ -78,8 +78,8 @@ local function runNotificationCenterTest() cc.NotificationCenter:getInstance():postNotification(NotificationCenterParam.MSG_SWITCH_STATE,selectedItem) end - local switchlabel1 = cc.Label:create("switch off", "Marker Felt", 26) - local switchlabel2 = cc.Label:create("switch on", "Marker Felt", 26) + local switchlabel1 = cc.Label:createWithSystemFont("switch off", "Marker Felt", 26) + local switchlabel2 = cc.Label:createWithSystemFont("switch on", "Marker Felt", 26) local switchitem1 = cc.MenuItemLabel:create(switchlabel1) local switchitem2 = cc.MenuItemLabel:create(switchlabel2) local switchitem = cc.MenuItemToggle:create(switchitem1) @@ -144,9 +144,9 @@ local function runNotificationCenterTest() lightArray[i]:setPosition(cc.p(100, s.height / 4 * i) ) pLayer:addChild(lightArray[i]) - local connectlabel1 = cc.Label:create("not connected", "Marker Felt", 26) + local connectlabel1 = cc.Label:createWithSystemFont("not connected", "Marker Felt", 26) - local connectlabel2 = cc.Label:create("connected", "Marker Felt", 26) + local connectlabel2 = cc.Label:createWithSystemFont("connected", "Marker Felt", 26) local connectitem1 = cc.MenuItemLabel:create(connectlabel1) local connectitem2 = cc.MenuItemLabel:create(connectlabel2) local connectitem = cc.MenuItemToggle:create(connectitem1) @@ -348,7 +348,7 @@ local function runCCControlTest() pLayer:addChild(pRibbon) --Add the title - pSceneTitleLabel = cc.Label:create("Title", "Arial", 12) + pSceneTitleLabel = cc.Label:createWithSystemFont("Title", "Arial", 12) pSceneTitleLabel:setPosition(cc.p (VisibleRect:center().x, VisibleRect:top().y - pSceneTitleLabel:getContentSize().height / 2 - 5)) pLayer:addChild(pSceneTitleLabel, 1) pSceneTitleLabel:setString(pStrTitle) @@ -366,7 +366,7 @@ local function runCCControlTest() local screenSize = cc.Director:getInstance():getWinSize() --Add a label in which the slider value will be displayed - local pDisplayValueLabel = cc.Label:create("Move the slider thumb!\nThe lower slider is restricted." ,"Marker Felt", 32) + local pDisplayValueLabel = cc.Label:createWithSystemFont("Move the slider thumb!\nThe lower slider is restricted." ,"Marker Felt", 32) pDisplayValueLabel:retain() pDisplayValueLabel:setAnchorPoint(cc.p(0.5, -1.0)) pDisplayValueLabel:setPosition(cc.p(screenSize.width / 1.7, screenSize.height / 2.0)) @@ -453,7 +453,7 @@ local function runCCControlTest() pNode:addChild(pBackground) dLayer_width = dLayer_width + pBackground:getContentSize().width - pColorLabel = cc.Label:create("#color", "Marker Felt", 30) + pColorLabel = cc.Label:createWithSystemFont("#color", "Marker Felt", 30) pColorLabel:retain() pColorLabel:setPosition(pBackground:getPosition()) pNode:addChild(pColorLabel) @@ -487,7 +487,7 @@ local function runCCControlTest() pNode:addChild(pBackground) dLayer_width = dLayer_width + pBackground:getContentSize().width - local pDisplayValueLabel = cc.Label:create("#color" ,"Marker Felt" ,30) + local pDisplayValueLabel = cc.Label:createWithSystemFont("#color" ,"Marker Felt" ,30) pDisplayValueLabel:retain() pDisplayValueLabel:setPosition(pBackground:getPosition()) @@ -511,8 +511,8 @@ local function runCCControlTest() cc.Sprite:create("extensions/switch-on.png"), cc.Sprite:create("extensions/switch-off.png"), cc.Sprite:create("extensions/switch-thumb.png"), - cc.Label:create("On", "Arial-BoldMT", 16), - cc.Label:create("Off", "Arial-BoldMT", 16) + cc.Label:createWithSystemFont("On", "Arial-BoldMT", 16), + cc.Label:createWithSystemFont("Off", "Arial-BoldMT", 16) ) pSwitchControl:setPosition(cc.p (dLayer_width + 10 + pSwitchControl:getContentSize().width / 2, 0)) pNode:addChild(pSwitchControl) @@ -532,7 +532,7 @@ local function runCCControlTest() local pBackgroundButton = cc.Scale9Sprite:create("extensions/button.png") local pBackgroundHighlightedButton = cc.Scale9Sprite:create("extensions/buttonHighlighted.png") - pTitleButton = cc.Label:create(pStrTitle, "Marker Felt", 30) + pTitleButton = cc.Label:createWithSystemFont(pStrTitle, "Marker Felt", 30) pTitleButton:setColor(cc.c3b(159, 168, 176)) @@ -587,7 +587,7 @@ local function runCCControlTest() local pBackgroundHighlightedButton = cc.Scale9Sprite:create("extensions/buttonHighlighted.png") pBackgroundHighlightedButton:setPreferredSize(cc.size(45, 45)) - local pTitleButton = cc.Label:create(pStrTitle, "Marker Felt", 30) + local pTitleButton = cc.Label:createWithSystemFont(pStrTitle, "Marker Felt", 30) pTitleButton:setColor(cc.c3b(159, 168, 176)) @@ -651,7 +651,7 @@ local function runCCControlTest() --Add a label in which the button events will be displayed local pDisplayValueLabel = nil - pDisplayValueLabel = cc.Label:create("No Event", "Marker Felt", 32) + pDisplayValueLabel = cc.Label:createWithSystemFont("No Event", "Marker Felt", 32) pDisplayValueLabel:setAnchorPoint(cc.p(0.5, -1)) pDisplayValueLabel:setPosition(cc.p(screenSize.width / 2.0, screenSize.height / 2.0)) pLayer:addChild(pDisplayValueLabel, 1) @@ -660,7 +660,7 @@ local function runCCControlTest() local pBackgroundButton = cc.Scale9Sprite:create("extensions/button.png") local pBackgroundHighlightedButton = cc.Scale9Sprite:create("extensions/buttonHighlighted.png") - local pTitleButtonLabel = cc.Label:create("Touch Me!", "Marker Felt", 30) + local pTitleButtonLabel = cc.Label:createWithSystemFont("Touch Me!", "Marker Felt", 30) pTitleButtonLabel:setColor(cc.c3b(159, 168, 176)) local pControlButton = cc.ControlButton:create(pTitleButtonLabel, pBackgroundButton) @@ -764,7 +764,7 @@ local function runCCControlTest() dLayer_width = dLayer_width + pBackground:getContentSize().width - local pDisplayValueLabel = cc.Label:create("", "HelveticaNeue-Bold", 30) + local pDisplayValueLabel = cc.Label:createWithSystemFont("", "HelveticaNeue-Bold", 30) pDisplayValueLabel:setPosition(pBackground:getPosition()) pNode:addChild(pDisplayValueLabel) @@ -816,7 +816,7 @@ local function runCCControlTest() background:setPosition(cc.p(layer_width + background:getContentSize().width / 2.0, 0)) pNode:addChild(background) - local pDisplayValueLabel = cc.Label:create("0", "HelveticaNeue-Bold", 30) + local pDisplayValueLabel = cc.Label:createWithSystemFont("0", "HelveticaNeue-Bold", 30) pDisplayValueLabel:setPosition(background:getPosition()) pNode:addChild(pDisplayValueLabel) @@ -901,7 +901,7 @@ local function runEditBoxTest() pBg:setPosition(cc.p(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/2)) newLayer:addChild(pBg) - local TTFShowEditReturn = cc.Label:create("No edit control return!", "", 30) + local TTFShowEditReturn = cc.Label:createWithSystemFont("No edit control return!", "", 30) TTFShowEditReturn:setPosition(cc.p(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y + visibleSize.height - 50)) newLayer:addChild(TTFShowEditReturn) @@ -1032,7 +1032,7 @@ function TableViewTestLayer.tableCellAtIndex(table, idx) sprite:setPosition(cc.p(0, 0)) cell:addChild(sprite) - label = cc.Label:create(strValue, "Helvetica", 20.0) + label = cc.Label:createWithSystemFont(strValue, "Helvetica", 20.0) label:setPosition(cc.p(0,0)) label:setAnchorPoint(cc.p(0,0)) label:setTag(123) diff --git a/tests/lua-tests/src/ExtensionTest/WebProxyTest.lua b/tests/lua-tests/src/ExtensionTest/WebProxyTest.lua index 79fc85b03d..9545978279 100644 --- a/tests/lua-tests/src/ExtensionTest/WebProxyTest.lua +++ b/tests/lua-tests/src/ExtensionTest/WebProxyTest.lua @@ -15,7 +15,7 @@ local receiveTextTimes = 0 local receiveBinaryTimes = 0 - local label = cc.Label:create("WebSocket Test", s_arialPath, 28) + local label = cc.Label:createWithTTF("WebSocket Test", s_arialPath, 28) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p( winSize.width / 2, winSize.height - MARGIN)) layer:addChild(label, 0) @@ -37,7 +37,7 @@ end end end - local labelSendText = cc.Label:create("Send Text", s_arialPath, 22) + local labelSendText = cc.Label:createWithTTF("Send Text", s_arialPath, 22) labelSendText:setAnchorPoint(0.5, 0.5) local itemSendText = cc.MenuItemLabel:create(labelSendText) itemSendText:registerScriptTapHandler(onMenuSendTextClicked) @@ -56,7 +56,7 @@ end end end - local labelSendBinary = cc.Label:create("Send Binary", s_arialPath, 22) + local labelSendBinary = cc.Label:createWithTTF("Send Binary", s_arialPath, 22) labelSendBinary:setAnchorPoint(cc.p(0.5, 0.5)) local itemSendBinary = cc.MenuItemLabel:create(labelSendBinary) itemSendBinary:registerScriptTapHandler(onMenuSendBinaryClicked) @@ -64,19 +64,19 @@ menuRequest:addChild(itemSendBinary) --Send Text Status Label - sendTextStatus = cc.Label:create("Send Text WS is waiting...", s_arialPath, 14,cc.size(160, 100),cc.VERTICAL_TEXT_ALIGNMENT_CENTER,cc.VERTICAL_TEXT_ALIGNMENT_TOP) + sendTextStatus = cc.Label:createWithTTF("Send Text WS is waiting...", s_arialPath, 14,cc.size(160, 100),cc.VERTICAL_TEXT_ALIGNMENT_CENTER,cc.VERTICAL_TEXT_ALIGNMENT_TOP) sendTextStatus:setAnchorPoint(cc.p(0, 0)) sendTextStatus:setPosition(cc.p(0, 25)) layer:addChild(sendTextStatus) --Send Binary Status Label - sendBinaryStatus = cc.Label:create("Send Binary WS is waiting...", s_arialPath, 14, cc.size(160, 100), cc.VERTICAL_TEXT_ALIGNMENT_CENTER, cc.VERTICAL_TEXT_ALIGNMENT_TOP) + sendBinaryStatus = cc.Label:createWithTTF("Send Binary WS is waiting...", s_arialPath, 14, cc.size(160, 100), cc.VERTICAL_TEXT_ALIGNMENT_CENTER, cc.VERTICAL_TEXT_ALIGNMENT_TOP) sendBinaryStatus:setAnchorPoint(cc.p(0, 0)) sendBinaryStatus:setPosition(cc.p(160, 25)) layer:addChild(sendBinaryStatus) --Error Label - errorStatus = cc.Label:create("Error WS is waiting...", s_arialPath, 14, cc.size(160, 100), cc.VERTICAL_TEXT_ALIGNMENT_CENTER, cc.VERTICAL_TEXT_ALIGNMENT_TOP) + errorStatus = cc.Label:createWithTTF("Error WS is waiting...", s_arialPath, 14, cc.size(160, 100), cc.VERTICAL_TEXT_ALIGNMENT_CENTER, cc.VERTICAL_TEXT_ALIGNMENT_TOP) errorStatus:setAnchorPoint(cc.p(0, 0)) errorStatus:setPosition(cc.p(320, 25)) layer:addChild(errorStatus) diff --git a/tests/lua-tests/src/FontTest/FontTest.lua b/tests/lua-tests/src/FontTest/FontTest.lua index 18eb6de81e..aa5e5e3282 100644 --- a/tests/lua-tests/src/FontTest/FontTest.lua +++ b/tests/lua-tests/src/FontTest/FontTest.lua @@ -37,12 +37,12 @@ local function showFont(ret, pFont) ret:removeChildByTag(kTagLabel3, true) ret:removeChildByTag(kTagLabel4, true) - local top = cc.Label:create(pFont, pFont, 24) - local left = cc.Label:create("alignment left", pFont, fontSize, + local top = cc.Label:createWithSystemFont(pFont, pFont, 24) + local left = cc.Label:createWithSystemFont("alignment left", pFont, fontSize, blockSize, cc.TEXT_ALIGNMENT_LEFT, verticalAlignment[vAlignIdx]) - local center = cc.Label:create("alignment center", pFont, fontSize, + local center = cc.Label:createWithSystemFont("alignment center", pFont, fontSize, blockSize, cc.TEXT_ALIGNMENT_CENTER, verticalAlignment[vAlignIdx]) - local right = cc.Label:create("alignment right", pFont, fontSize, + local right = cc.Label:createWithSystemFont("alignment right", pFont, fontSize, blockSize, cc.TEXT_ALIGNMENT_RIGHT, verticalAlignment[vAlignIdx]) local leftColor = cc.LayerColor:create(cc.c4b(100, 100, 100, 255), blockSize.width, blockSize.height) diff --git a/tests/lua-tests/src/KeypadTest/KeypadTest.lua b/tests/lua-tests/src/KeypadTest/KeypadTest.lua index 12f1ef0947..b7e36aefcd 100644 --- a/tests/lua-tests/src/KeypadTest/KeypadTest.lua +++ b/tests/lua-tests/src/KeypadTest/KeypadTest.lua @@ -4,12 +4,12 @@ local function KeypadMainLayer() local function onEnter() print("come in") local s = cc.Director:getInstance():getWinSize() - local label = cc.Label:create("Keypad Test", s_thonburiPath, 28) + local label = cc.Label:createWithTTF("Keypad Test", s_thonburiPath, 28) layer:addChild(label, 0) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p(s.width/2, s.height-50)) - local labelTip = cc.Label:create("Please press any key...", "s_thonburiPath", 22) + local labelTip = cc.Label:createWithTTF("Please press any key...", s_thonburiPath, 22) labelTip:setAnchorPoint(cc.p(0.5, 0.5)) labelTip:setPosition(cc.p(s.width / 2, s.height / 2)) layer:addChild(labelTip, 0) diff --git a/tests/lua-tests/src/LabelTestNew/LabelTestNew.lua b/tests/lua-tests/src/LabelTestNew/LabelTestNew.lua index 27130654a9..dd01031fa1 100644 --- a/tests/lua-tests/src/LabelTestNew/LabelTestNew.lua +++ b/tests/lua-tests/src/LabelTestNew/LabelTestNew.lua @@ -1478,7 +1478,7 @@ function LabelFontNameTest.create() label1:setPosition( cc.p(size.width/2, size.height * 0.7) ) layer:addChild(label1) - local label3 = cc.Label:create("fonts/Marker Felt.ttf","fonts/Marker Felt.ttf",32) + local label3 = cc.Label:createWithTTF("fonts/Marker Felt.ttf","fonts/Marker Felt.ttf",32) label3:setPosition( cc.p(size.width/2, size.height * 0.5) ) layer:addChild(label3) @@ -1673,7 +1673,7 @@ function LabelTTFOldNew.create() local s = cc.Director:getInstance():getWinSize() local delta = s.height/4 - local label1 = cc.Label:create("Cocos2d-x Label Test", "arial", 24) + local label1 = cc.Label:createWithSystemFont("Cocos2d-x Label Test", "arial", 24) layer:addChild(label1, 0, kTagBitmapAtlas1) label1:setPosition(cc.p(s.width/2, delta * 2)) label1:setColor(cc.c3b(255, 0, 0)) diff --git a/tests/lua-tests/src/LayerTest/LayerTest.lua b/tests/lua-tests/src/LayerTest/LayerTest.lua index b0516e6ba0..59dc27aeb9 100644 --- a/tests/lua-tests/src/LayerTest/LayerTest.lua +++ b/tests/lua-tests/src/LayerTest/LayerTest.lua @@ -442,9 +442,9 @@ local function LayerGradient() local layer1 = cc.LayerGradient:create(cc.c4b(255,0,0,255), cc.c4b(0,255,0,255), cc.p(0.9, 0.9)) ret:addChild(layer1, 0, kTagLayer) - local label1 = cc.Label:create("Compressed Interpolation: Enabled", s_markerFeltFontPath, 26) + local label1 = cc.Label:createWithTTF("Compressed Interpolation: Enabled", s_markerFeltFontPath, 26) label1:setAnchorPoint(cc.p(0.5, 0.5)) - local label2 = cc.Label:create("Compressed Interpolation: Disabled", s_markerFeltFontPath, 26) + local label2 = cc.Label:createWithTTF("Compressed Interpolation: Disabled", s_markerFeltFontPath, 26) label2:setAnchorPoint(cc.p(0.5, 0.5)) local item1 = cc.MenuItemLabel:create(label1) local item2 = cc.MenuItemLabel:create(label2) diff --git a/tests/lua-tests/src/LuaBridgeTest/LuaBridgeTest.lua b/tests/lua-tests/src/LuaBridgeTest/LuaBridgeTest.lua index baae0ff7c4..6bf0dde475 100644 --- a/tests/lua-tests/src/LuaBridgeTest/LuaBridgeTest.lua +++ b/tests/lua-tests/src/LuaBridgeTest/LuaBridgeTest.lua @@ -48,13 +48,13 @@ local function LuaBridgeLayer() local function newLuaJavaBridge() local newScene = cc.Scene:create() - local titleLabel = cc.Label:create("", s_arialPath, 28) + local titleLabel = cc.Label:createWithTTF("", s_arialPath, 28) newScene:addChild(titleLabel, 1) titleLabel:setAnchorPoint(cc.p(0.5, 0.5)) titleLabel:setPosition(s.width / 2, s.height - 50) titleLabel:setString("LuaJavaBridge Test") - subtitleLabel = cc.Label:create("", s_thonburiPath, 16) + subtitleLabel = cc.Label:createWithTTF("", s_thonburiPath, 16) newScene:addChild(subtitleLabel, 1) subtitleLabel:setAnchorPoint(cc.p(0.5, 0.5)) subtitleLabel:setPosition(s.width / 2, s.height - 80) @@ -88,13 +88,13 @@ local function LuaBridgeLayer() local function newLuaObjectCBridge() local newScene = cc.Scene:create() - local titleLabel = cc.Label:create("", s_arialPath, 28) + local titleLabel = cc.Label:createWithTTF("", s_arialPath, 28) newScene:addChild(titleLabel, 1) titleLabel:setAnchorPoint(cc.p(0.5, 0.5)) titleLabel:setPosition(s.width / 2, s.height - 50) titleLabel:setString("LuaObjectCBridge Test") - subtitleLabel = cc.Label:create("", s_thonburiPath, 16) + subtitleLabel = cc.Label:createWithTTF("", s_thonburiPath, 16) newScene:addChild(subtitleLabel, 1) subtitleLabel:setAnchorPoint(cc.p(0.5, 0.5)) subtitleLabel:setPosition(s.width / 2, s.height - 80) diff --git a/tests/lua-tests/src/MenuTest/MenuTest.lua b/tests/lua-tests/src/MenuTest/MenuTest.lua index 3f0cda793f..746f580329 100644 --- a/tests/lua-tests/src/MenuTest/MenuTest.lua +++ b/tests/lua-tests/src/MenuTest/MenuTest.lua @@ -520,7 +520,7 @@ local function RemoveMenuItemWhenMove() local ret = cc.Layer:create() local s = cc.Director:getInstance():getWinSize() - local label = cc.Label:create("click item and move, should not crash", s_arialPath, 20) + local label = cc.Label:createWithTTF("click item and move, should not crash", s_arialPath, 20) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p(s.width/2, s.height - 30)) ret:addChild(label) diff --git a/tests/lua-tests/src/NewEventDispatcherTest/NewEventDispatcherTest.lua b/tests/lua-tests/src/NewEventDispatcherTest/NewEventDispatcherTest.lua index c0d3aebc77..0637edd403 100644 --- a/tests/lua-tests/src/NewEventDispatcherTest/NewEventDispatcherTest.lua +++ b/tests/lua-tests/src/NewEventDispatcherTest/NewEventDispatcherTest.lua @@ -165,14 +165,14 @@ function EventDispatcherTestDemo:createMenu() end function EventDispatcherTestDemo:creatTitleAndSubTitle(idx) - local title = cc.Label:create(EventDispatcherTestDemo.title(idx),s_arialPath,18) + local title = cc.Label:createWithTTF(EventDispatcherTestDemo.title(idx),s_arialPath,18) title:setColor(cc.c3b(128,128,0)) self:addChild(title, 1, 10000) title:setAnchorPoint(cc.p(0.5, 0.5)) title:setPosition( cc.p(VisibleRect:center().x, VisibleRect:top().y - 30)) local subTitle = nil if "" ~= EventDispatcherTestDemo.subTitle(idx) then - local subTitle = cc.Label:create(EventDispatcherTestDemo.subTitle(idx), s_arialPath, 18) + local subTitle = cc.Label:createWithTTF(EventDispatcherTestDemo.subTitle(idx), s_arialPath, 18) subTitle:setColor(cc.c3b(128,128,0)) self:addChild(subTitle, 1, 10001) subTitle:setAnchorPoint(cc.p(0.5, 0.5)) @@ -493,7 +493,7 @@ function RemoveListenerWhenDispatchingTest:onEnter() local eventDispatcher = self:getEventDispatcher() eventDispatcher:addEventListenerWithSceneGraphPriority(listener1, sprite1) - local statusLabel = cc.Label:create("The sprite could be touched!", "", 20) + local statusLabel = cc.Label:createWithSystemFont("The sprite could be touched!", "", 20) statusLabel:setAnchorPoint(cc.p(0.5, 0.5)) statusLabel:setPosition(cc.p(origin.x + size.width/2, origin.y + size.height - 90)) self:addChild(statusLabel) @@ -560,7 +560,7 @@ function CustomEventTest:onEnter() cc.MenuItemFont:setFontSize(20) - local statusLabel1 = cc.Label:create("No custom event 1 received!", "", 20) + local statusLabel1 = cc.Label:createWithSystemFont("No custom event 1 received!", "", 20) statusLabel1:setAnchorPoint(cc.p(0.5, 0.5)) statusLabel1:setPosition(cc.p(origin.x + size.width/2, origin.y + size.height-90 )) self:addChild(statusLabel1) @@ -586,7 +586,7 @@ function CustomEventTest:onEnter() sendItem1:registerScriptTapHandler(sendCallback1) sendItem1:setPosition(cc.p(origin.x + size.width/2, origin.y + size.height/2)) - local statusLabel2 = cc.Label:create("No custom event 2 received!", "", 20) + local statusLabel2 = cc.Label:createWithSystemFont("No custom event 2 received!", "", 20) statusLabel2:setAnchorPoint(cc.p(0.5, 0.5)) statusLabel2:setPosition(cc.p(origin.x + size.width/2, origin.y + size.height-120 )) self:addChild(statusLabel2) @@ -659,7 +659,7 @@ function LabelKeyboardEventTest:onEnter() local origin = cc.Director:getInstance():getVisibleOrigin() local size = cc.Director:getInstance():getVisibleSize() - local statusLabel = cc.Label:create("No keyboard event received!", "", 20) + local statusLabel = cc.Label:createWithSystemFont("No keyboard event received!", "", 20) statusLabel:setAnchorPoint(cc.p(0.5, 0.5)) statusLabel:setPosition(cc.p(origin.x + size.width/2,origin.y + size.height/2)) self:addChild(statusLabel) @@ -1365,7 +1365,7 @@ function Issue4129Test:onEnter() local eventDispatcher = self:getEventDispatcher() local function eventCustomListener(event) - local label = cc.Label:create("Yeah, this issue was fixed.", "", 20) + local label = cc.Label:createWithSystemFont("Yeah, this issue was fixed.", "", 20) label:setAnchorPoint(cc.p(0, 0.5)) label:setPosition(VisibleRect:left()) self:addChild(label) diff --git a/tests/lua-tests/src/OpenGLTest/OpenGLTest.lua b/tests/lua-tests/src/OpenGLTest/OpenGLTest.lua index 2e5d64b7c0..b76c19bb4d 100644 --- a/tests/lua-tests/src/OpenGLTest/OpenGLTest.lua +++ b/tests/lua-tests/src/OpenGLTest/OpenGLTest.lua @@ -125,13 +125,13 @@ local function OpenGLTestMainLayer() local function InitTitle(layer) --Title - local lableTitle = cc.Label:create(GetTitle(), s_arialPath, 40) + local lableTitle = cc.Label:createWithTTF(GetTitle(), s_arialPath, 40) layer:addChild(lableTitle, 15) lableTitle:setAnchorPoint(cc.p(0.5, 0.5)) lableTitle:setPosition(cc.p(size.width/2, size.height-32)) lableTitle:setColor(cc.c3b(255,255,40)) --SubTitle - local subLabelTitle = cc.Label:create(GetSubTitle(), s_thonburiPath, 16) + local subLabelTitle = cc.Label:createWithTTF(GetSubTitle(), s_thonburiPath, 16) layer:addChild(subLabelTitle, 15) subLabelTitle:setAnchorPoint(cc.p(0.5, 0.5)) subLabelTitle:setPosition(cc.p(size.width/2, size.height-80)) diff --git a/tests/lua-tests/src/ParticleTest/ParticleTest.lua b/tests/lua-tests/src/ParticleTest/ParticleTest.lua index 9d04e86532..78f71cd52f 100644 --- a/tests/lua-tests/src/ParticleTest/ParticleTest.lua +++ b/tests/lua-tests/src/ParticleTest/ParticleTest.lua @@ -98,12 +98,12 @@ local function getBaseLayer() emitter = nil - titleLabel = cc.Label:create("", s_arialPath, 28) + titleLabel = cc.Label:createWithTTF("", s_arialPath, 28) layer:addChild(titleLabel, 100, 1000) titleLabel:setAnchorPoint(cc.p(0.5, 0.5)) titleLabel:setPosition(s.width / 2, s.height - 50) - subtitleLabel = cc.Label:create("", s_arialPath, 16) + subtitleLabel = cc.Label:createWithTTF("", s_arialPath, 16) layer:addChild(subtitleLabel, 100) subtitleLabel:setAnchorPoint(cc.p(0.5, 0.5)) subtitleLabel:setPosition(s.width / 2, s.height - 80) diff --git a/tests/lua-tests/src/PerformanceTest/PerformanceSpriteTest.lua b/tests/lua-tests/src/PerformanceTest/PerformanceSpriteTest.lua index 7f9cadc484..78050ac48e 100644 --- a/tests/lua-tests/src/PerformanceTest/PerformanceSpriteTest.lua +++ b/tests/lua-tests/src/PerformanceTest/PerformanceSpriteTest.lua @@ -357,7 +357,7 @@ local function initWithMainTest(scene, asubtest, nNodes) menu:setPosition(s.width / 2, s.height - 65) scene:addChild(menu, 1) - infoLabel = cc.Label:create("0 nodes", s_markerFeltFontPath, 30) + infoLabel = cc.Label:createWithTTF("0 nodes", s_markerFeltFontPath, 30) infoLabel:setColor(cc.c3b(0, 200, 20)) infoLabel:setAnchorPoint(cc.p(0.5, 0.5)) infoLabel:setPosition(s.width / 2, s.height - 90) @@ -389,7 +389,7 @@ local function initWithMainTest(scene, asubtest, nNodes) scene:addChild(subMenu, 1) -- add title label - titleLabel = cc.Label:create("No title", s_arialPath, 40) + titleLabel = cc.Label:createWithTTF("No title", s_arialPath, 40) scene:addChild(titleLabel, 1) titleLabel:setAnchorPoint(cc.p(0.5, 0.5)) titleLabel:setPosition(s.width / 2, s.height - 32) diff --git a/tests/lua-tests/src/PerformanceTest/PerformanceTest.lua b/tests/lua-tests/src/PerformanceTest/PerformanceTest.lua index d01b1df35b..825ae2010a 100644 --- a/tests/lua-tests/src/PerformanceTest/PerformanceTest.lua +++ b/tests/lua-tests/src/PerformanceTest/PerformanceTest.lua @@ -338,14 +338,14 @@ local function runNodeChildrenTest() local s = cc.Director:getInstance():getWinSize() --Title - local pLabel = cc.Label:create(GetTitle(), s_arialPath, 40) + local pLabel = cc.Label:createWithTTF(GetTitle(), s_arialPath, 40) pNewscene:addChild(pLabel, 1) pLabel:setAnchorPoint(cc.p(0.5, 0.5)) pLabel:setPosition(cc.p(s.width/2, s.height-32)) pLabel:setColor(cc.c3b(255,255,40)) if (nil ~= GetSubTitle()) and ("" ~= GetSubTitle()) then - local pSubLabel = cc.Label:create(GetSubTitle(), s_thonburiPath, 16) + local pSubLabel = cc.Label:createWithTTF(GetSubTitle(), s_thonburiPath, 16) pNewscene:addChild(pSubLabel, 1) pSubLabel:setAnchorPoint(cc.p(0.5, 0.5)) pSubLabel:setPosition(cc.p(s.width/2, s.height-80)) @@ -372,7 +372,7 @@ local function runNodeChildrenTest() pNewscene:addChild(pMenuAddOrSub,1) --InfoLayer - local pInfoLabel = cc.Label:create("0 nodes", s_markerFeltFontPath, 30) + local pInfoLabel = cc.Label:createWithTTF("0 nodes", s_markerFeltFontPath, 30) pInfoLabel:setColor(cc.c3b(0,200,20)) pInfoLabel:setAnchorPoint(cc.p(0.5, 0.5)) pInfoLabel:setPosition(cc.p(s.width/2, s.height/2-15)) @@ -828,7 +828,7 @@ local function runParticleTest() pMenuAddOrSub:setPosition(cc.p(s.width/2, s.height/2+15)) pNewScene:addChild(pMenuAddOrSub,1) - local pInfoLabel = cc.Label:create("0 nodes", s_markerFeltFontPath, 30) + local pInfoLabel = cc.Label:createWithTTF("0 nodes", s_markerFeltFontPath, 30) pInfoLabel:setColor(cc.c3b(0,200,20)) pInfoLabel:setAnchorPoint(cc.p(0.5, 0.5)) pInfoLabel:setPosition(cc.p(s.width/2, s.height - 90)) @@ -867,7 +867,7 @@ local function runParticleTest() pSubMenu:setPosition(cc.p(s.width/2, 80)) pNewScene:addChild(pSubMenu, 2) - local pLabel = cc.Label:create(GetTitle(), s_arialPath, 40) + local pLabel = cc.Label:createWithTTF(GetTitle(), s_arialPath, 40) pNewScene:addChild(pLabel, 1) pLabel:setAnchorPoint(cc.p(0.5, 0.5)) pLabel:setPosition(cc.p(s.width/2, s.height-32)) @@ -1274,7 +1274,7 @@ local function runSpriteTest() pMenuAddOrSub:setPosition(cc.p(s.width/2, s.height/2+15)) pNewScene:addChild(pMenuAddOrSub,1) - local pInfoLabel = cc.Label:create("0 nodes", s_markerFeltFontPath, 30) + local pInfoLabel = cc.Label:createWithTTF("0 nodes", s_markerFeltFontPath, 30) pInfoLabel:setColor(cc.c3b(0,200,20)) pInfoLabel:setAnchorPoint(cc.p(0.5, 0.5)) pInfoLabel:setPosition(cc.p(s.width/2, s.height - 90)) @@ -1313,7 +1313,7 @@ local function runSpriteTest() pSubMenu:setPosition(cc.p(s.width/2, 80)) pNewScene:addChild(pSubMenu, 2) - local pLabel = cc.Label:create(GetTitle(), s_arialPath, 40) + local pLabel = cc.Label:createWithTTF(GetTitle(), s_arialPath, 40) pNewScene:addChild(pLabel, 1) pLabel:setAnchorPoint(cc.p(0.5, 0.5)) pLabel:setPosition(cc.p(s.width/2, s.height-32)) @@ -1438,14 +1438,14 @@ local function runTextureTest() end --Title - local pLabel = cc.Label:create(GetTitle(), s_arialPath, 40) + local pLabel = cc.Label:createWithTTF(GetTitle(), s_arialPath, 40) pLayer:addChild(pLabel, 1) pLabel:setAnchorPoint(cc.p(0.5, 0.5)) pLabel:setPosition(cc.p(s.width/2, s.height-32)) pLabel:setColor(cc.c3b(255,255,40)) --Subtitle - local pSubLabel = cc.Label:create(GetSubtitle(), s_thonburiPath, 16) + local pSubLabel = cc.Label:createWithTTF(GetSubtitle(), s_thonburiPath, 16) pLayer:addChild(pSubLabel, 1) pSubLabel:setAnchorPoint(cc.p(0.5, 0.5)) pSubLabel:setPosition(cc.p(s.width/2, s.height-80)) @@ -1605,7 +1605,7 @@ local function runTouchesTest() pLayer:addChild(pTouchesTestMenu) --Title - local pLabel = cc.Label:create(GetTitle(), s_arialPath, 40) + local pLabel = cc.Label:createWithTTF(GetTitle(), s_arialPath, 40) pLayer:addChild(pLabel, 1) pLabel:setAnchorPoint(cc.p(0.5, 0.5)) pLabel:setPosition(cc.p(s.width/2, s.height-32)) @@ -1697,13 +1697,13 @@ local function runFuncRelateWithTable() end --Title - local title = cc.Label:create(GetTitle(), s_arialPath, 28) + local title = cc.Label:createWithTTF(GetTitle(), s_arialPath, 28) layer:addChild(title, 1) title:setAnchorPoint(cc.p(0.5, 0.5)) title:setPosition(cc.p(s.width/2, s.height-32)) title:setColor(cc.c3b(255,255,40)) --Subtitle - local subTitle = cc.Label:create(GetSubtitle(), s_thonburiPath, 16) + local subTitle = cc.Label:createWithTTF(GetSubtitle(), s_thonburiPath, 16) layer:addChild(subTitle, 1) subTitle:setAnchorPoint(cc.p(0.5, 0.5)) subTitle:setPosition(cc.p(s.width/2, s.height-80)) @@ -1742,7 +1742,7 @@ local function runFuncRelateWithTable() layer:addChild(menuAddOrSub,1) --num - local numLabel = cc.Label:create("10000", s_markerFeltFontPath, 30) + local numLabel = cc.Label:createWithTTF("10000", s_markerFeltFontPath, 30) numLabel:setColor(cc.c3b(0,200,20)) numLabel:setAnchorPoint(cc.p(0.5, 0.5)) numLabel:setPosition(cc.p(s.width/2, s.height/2-15)) diff --git a/tests/lua-tests/src/PhysicsTest/PhysicsTest.lua b/tests/lua-tests/src/PhysicsTest/PhysicsTest.lua index beb8c9adb7..9043a42c8d 100644 --- a/tests/lua-tests/src/PhysicsTest/PhysicsTest.lua +++ b/tests/lua-tests/src/PhysicsTest/PhysicsTest.lua @@ -1076,22 +1076,22 @@ local function PhysicsContactTest() local s = cc.size(VisibleRect:getVisibleRect().width, VisibleRect:getVisibleRect().height); - local label = cc.Label:create(tostring(layer.yellowBoxNum), s_arialPath, 32); + local label = cc.Label:createWithTTF(tostring(layer.yellowBoxNum), s_arialPath, 32); root:addChild(label, 1); label:setAnchorPoint(cc.p(0.5, 0.5)); label:setPosition(cc.p(s.width/2, s.height-50)); - label = cc.Label:create(tostring(layer.blueBoxNum), s_arialPath, 32); + label = cc.Label:createWithTTF(tostring(layer.blueBoxNum), s_arialPath, 32); root:addChild(label, 1); label:setAnchorPoint(cc.p(0.5, 0.5)); label:setPosition(cc.p(s.width/2, s.height-90)); - label = cc.Label:create(tostring(layer.yellowTriangleNum), s_arialPath, 32); + label = cc.Label:createWithTTF(tostring(layer.yellowTriangleNum), s_arialPath, 32); root:addChild(label, 1); label:setAnchorPoint(cc.p(0.5, 0.5)); label:setPosition(cc.p(s.width/2, s.height-130)); - label = cc.Label:create(tostring(layer.blueTriangleNum), s_arialPath, 32); + label = cc.Label:createWithTTF(tostring(layer.blueTriangleNum), s_arialPath, 32); root:addChild(label, 1); label:setAnchorPoint(cc.p(0.5, 0.5)); label:setPosition(cc.p(s.width/2, s.height-170)); @@ -1213,7 +1213,7 @@ local function PhysicsContactTest() menu1:setPosition(cc.p(s.width/2, s.height-50)); layer:addChild(menu1, 1); - local label = cc.Label:create("yellow box", s_arialPath, 32); + local label = cc.Label:createWithTTF("yellow box", s_arialPath, 32); layer:addChild(label, 1); label:setAnchorPoint(cc.p(0.5, 0.5)); label:setPosition(cc.p(s.width/2 - 150, s.height-50)); @@ -1232,7 +1232,7 @@ local function PhysicsContactTest() menu2:setPosition(cc.p(s.width/2, s.height-90)); layer:addChild(menu2, 1); - label = cc.Label:create("blue box", s_arialPath, 32); + label = cc.Label:createWithTTF("blue box", s_arialPath, 32); layer:addChild(label, 1); label:setAnchorPoint(cc.p(0.5, 0.5)); label:setPosition(cc.p(s.width/2 - 150, s.height-90)); @@ -1251,7 +1251,7 @@ local function PhysicsContactTest() menu3:setPosition(cc.p(s.width/2, s.height-130)); layer:addChild(menu3, 1); - label = cc.Label:create("yellow triangle", s_arialPath, 32); + label = cc.Label:createWithTTF("yellow triangle", s_arialPath, 32); layer:addChild(label, 1); label:setAnchorPoint(cc.p(0.5, 0.5)); label:setPosition(cc.p(s.width/2 - 150, s.height-130)); @@ -1270,7 +1270,7 @@ local function PhysicsContactTest() menu4:setPosition(cc.p(s.width/2, s.height-170)); layer:addChild(menu4, 1); - label = cc.Label:create("blue triangle", s_arialPath, 32); + label = cc.Label:createWithTTF("blue triangle", s_arialPath, 32); layer:addChild(label, 1); label:setAnchorPoint(cc.p(0.5, 0.5)); label:setPosition(cc.p(s.width/2 - 150, s.height-170)); diff --git a/tests/lua-tests/src/RotateWorldTest/RotateWorldTest.lua b/tests/lua-tests/src/RotateWorldTest/RotateWorldTest.lua index 1d2f03f387..2b29afd0ac 100644 --- a/tests/lua-tests/src/RotateWorldTest/RotateWorldTest.lua +++ b/tests/lua-tests/src/RotateWorldTest/RotateWorldTest.lua @@ -54,7 +54,7 @@ local function CreateTestLayer() x = size.width y = size.height - local label = cc.Label:create("cocos2d", s_tahomaPath, 64) + local label = cc.Label:createWithTTF("cocos2d", s_tahomaPath, 64) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(x / 2, y / 2) layer:addChild(label) diff --git a/tests/lua-tests/src/Texture2dTest/Texture2dTest.lua b/tests/lua-tests/src/Texture2dTest/Texture2dTest.lua index 67870e3900..ae36d8feb7 100644 --- a/tests/lua-tests/src/Texture2dTest/Texture2dTest.lua +++ b/tests/lua-tests/src/Texture2dTest/Texture2dTest.lua @@ -959,7 +959,7 @@ local function TextureAsync() local size =cc.Director:getInstance():getWinSize() - local label = cc.Label:create("Loading...", s_markerFeltFontPath, 32) + local label = cc.Label:createWithTTF("Loading...", s_markerFeltFontPath, 32) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p( size.width/2, size.height/2)) ret:addChild(label, 10) diff --git a/tests/lua-tests/src/TransitionsTest/TransitionsTest.lua b/tests/lua-tests/src/TransitionsTest/TransitionsTest.lua index cddc951f9c..3f27897a73 100644 --- a/tests/lua-tests/src/TransitionsTest/TransitionsTest.lua +++ b/tests/lua-tests/src/TransitionsTest/TransitionsTest.lua @@ -62,13 +62,13 @@ local function createLayer1() bg1:setPosition(cc.p(s.width / 2, s.height / 2)) layer:addChild(bg1, -1) - local titleLabel = cc.Label:create(Transition_Name[SceneIdx], s_thonburiPath, 32) + local titleLabel = cc.Label:createWithTTF(Transition_Name[SceneIdx], s_thonburiPath, 32) layer:addChild(titleLabel) titleLabel:setColor(cc.c3b(255,32,32)) titleLabel:setAnchorPoint(cc.p(0.5, 0.5)) titleLabel:setPosition(x / 2, y - 100) - local label = cc.Label:create("SCENE 1", s_markerFeltFontPath, 38) + local label = cc.Label:createWithTTF("SCENE 1", s_markerFeltFontPath, 38) label:setColor(cc.c3b(16,16,255)) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(x / 2, y / 2) @@ -107,13 +107,13 @@ local function createLayer2() bg1:setPosition(cc.p(s.width / 2, s.height / 2)) layer:addChild(bg1, -1) - local titleLabel = cc.Label:create(Transition_Name[SceneIdx], s_thonburiPath, 32 ) + local titleLabel = cc.Label:createWithTTF(Transition_Name[SceneIdx], s_thonburiPath, 32 ) layer:addChild(titleLabel) titleLabel:setAnchorPoint(cc.p(0.5, 0.5)) titleLabel:setColor(cc.c3b(255,32,32)) titleLabel:setPosition(x / 2, y - 100) - local label = cc.Label:create("SCENE 2", s_markerFeltFontPath, 38) + local label = cc.Label:createWithTTF("SCENE 2", s_markerFeltFontPath, 38) label:setColor(cc.c3b(16,16,255)) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(x / 2, y / 2) diff --git a/tests/lua-tests/src/UserDefaultTest/UserDefaultTest.lua b/tests/lua-tests/src/UserDefaultTest/UserDefaultTest.lua index 7ed6578d47..2162f92274 100644 --- a/tests/lua-tests/src/UserDefaultTest/UserDefaultTest.lua +++ b/tests/lua-tests/src/UserDefaultTest/UserDefaultTest.lua @@ -72,7 +72,7 @@ end function UserDefaultTestMain() local ret = cc.Scene:create() local s = cc.Director:getInstance():getWinSize() - local label = cc.Label:create("UserDefault test see log", s_arialPath, 28) + local label = cc.Label:createWithTTF("UserDefault test see log", s_arialPath, 28) ret:addChild(label, 0) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition( cc.p(s.width/2, s.height-50) ) diff --git a/tests/lua-tests/src/XMLHttpRequestTest/XMLHttpRequestTest.lua b/tests/lua-tests/src/XMLHttpRequestTest/XMLHttpRequestTest.lua index 6151b4ff56..2a591aca49 100644 --- a/tests/lua-tests/src/XMLHttpRequestTest/XMLHttpRequestTest.lua +++ b/tests/lua-tests/src/XMLHttpRequestTest/XMLHttpRequestTest.lua @@ -7,13 +7,13 @@ local function XMLHttpRequestLayer() local space = 35 local function init() - local label = cc.Label:create("XML Http Request Test", s_arialPath, 28) + local label = cc.Label:createWithTTF("XML Http Request Test", s_arialPath, 28) label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p(winSize.width / 2, winSize.height - margin)) layer:addChild(label, 0) --Response Code Label - local labelStatusCode = cc.Label:create("HTTP Status Code", s_markerFeltFontPath, 20) + local labelStatusCode = cc.Label:createWithTTF("HTTP Status Code", s_markerFeltFontPath, 20) labelStatusCode:setAnchorPoint(cc.p(0.5, 0.5)) labelStatusCode:setPosition(cc.p(winSize.width / 2, winSize.height - margin - 6 * space)) layer:addChild(labelStatusCode) @@ -40,7 +40,7 @@ local function XMLHttpRequestLayer() labelStatusCode:setString("waiting...") end - local labelGet = cc.Label:create("Test Get", s_arialPath, 22) + local labelGet = cc.Label:createWithTTF("Test Get", s_arialPath, 22) labelGet:setAnchorPoint(cc.p(0.5, 0.5)) local itemGet = cc.MenuItemLabel:create(labelGet) itemGet:registerScriptTapHandler(onMenuGetClicked) @@ -62,7 +62,7 @@ local function XMLHttpRequestLayer() labelStatusCode:setString("waiting...") end - local labelPost = cc.Label:create("Test Post", s_arialPath, 22) + local labelPost = cc.Label:createWithTTF("Test Post", s_arialPath, 22) labelPost:setAnchorPoint(cc.p(0.5, 0.5)) local itemPost = cc.MenuItemLabel:create(labelPost) itemPost:registerScriptTapHandler(onMenuPostClicked) @@ -97,7 +97,7 @@ local function XMLHttpRequestLayer() labelStatusCode:setString("waiting...") end - local labelPostBinary = cc.Label:create("Test Post Binary", s_arialPath, 22) + local labelPostBinary = cc.Label:createWithTTF("Test Post Binary", s_arialPath, 22) labelPostBinary:setAnchorPoint(cc.p(0.5, 0.5)) local itemPostBinary = cc.MenuItemLabel:create(labelPostBinary) itemPostBinary:registerScriptTapHandler(onMenuPostBinaryClicked) @@ -126,7 +126,7 @@ local function XMLHttpRequestLayer() labelStatusCode:setString("waiting...") end - local labelPostJson = cc.Label:create("Test Post Json", s_arialPath, 22) + local labelPostJson = cc.Label:createWithTTF("Test Post Json", s_arialPath, 22) labelPostJson:setAnchorPoint(cc.p(0.5, 0.5)) local itemPostJson = cc.MenuItemLabel:create(labelPostJson) itemPostJson:registerScriptTapHandler(onMenuPostJsonClicked) diff --git a/tests/lua-tests/src/helper.lua b/tests/lua-tests/src/helper.lua index 05763b944b..25cec85d3e 100644 --- a/tests/lua-tests/src/helper.lua +++ b/tests/lua-tests/src/helper.lua @@ -40,7 +40,7 @@ end -- add the menu item for back to main menu function CreateBackMenuItem() - local label = cc.Label:create("MainMenu", s_arialPath, 20) + local label = cc.Label:createWithTTF("MainMenu", s_arialPath, 20) label:setAnchorPoint(cc.p(0.5, 0.5)) local MenuItem = cc.MenuItemLabel:create(label) MenuItem:registerScriptTapHandler(MainMenuCallback) @@ -101,12 +101,12 @@ function Helper.initWithLayer(layer) Helper.currentLayer = layer local size = cc.Director:getInstance():getWinSize() - Helper.titleLabel = cc.Label:create("", s_arialPath, 28) + Helper.titleLabel = cc.Label:createWithTTF("", s_arialPath, 28) Helper.titleLabel:setAnchorPoint(cc.p(0.5, 0.5)) layer:addChild(Helper.titleLabel, 1) Helper.titleLabel:setPosition(size.width / 2, size.height - 50) - Helper.subtitleLabel = cc.Label:create("", s_thonburiPath, 16) + Helper.subtitleLabel = cc.Label:createWithTTF("", s_thonburiPath, 16) Helper.subtitleLabel:setAnchorPoint(cc.p(0.5, 0.5)) layer:addChild(Helper.subtitleLabel, 1) Helper.subtitleLabel:setPosition(size.width / 2, size.height - 80) diff --git a/tests/lua-tests/src/mainMenu.lua b/tests/lua-tests/src/mainMenu.lua index 77336f3475..844fb7e1a5 100644 --- a/tests/lua-tests/src/mainMenu.lua +++ b/tests/lua-tests/src/mainMenu.lua @@ -159,7 +159,7 @@ function CreateTestMenu() local index = 0 local obj = nil for index, obj in pairs(_allTests) do - local testLabel = cc.Label:create(obj.name, s_arialPath, 24) + local testLabel = cc.Label:createWithTTF(obj.name, s_arialPath, 24) testLabel:setAnchorPoint(cc.p(0.5, 0.5)) local testMenuItem = cc.MenuItemLabel:create(testLabel) if not obj.isSupported then From 51289e8a4cb77f5dffb22b60e73808db44db397d Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Fri, 11 Apr 2014 16:05:22 +0800 Subject: [PATCH 57/98] 1. add assert condition of rendering when adding command 2. fix bug: renderTexture->SpriteRenderTextureBug --- cocos/2d/renderer/CCRenderer.cpp | 8 +++++++- cocos/2d/renderer/CCRenderer.h | 2 ++ .../RenderTextureTest/RenderTextureTest.cpp | 17 +++++++---------- .../RenderTextureTest/RenderTextureTest.h | 6 +----- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/cocos/2d/renderer/CCRenderer.cpp b/cocos/2d/renderer/CCRenderer.cpp index 509ce93a56..72b37c49f4 100644 --- a/cocos/2d/renderer/CCRenderer.cpp +++ b/cocos/2d/renderer/CCRenderer.cpp @@ -102,6 +102,7 @@ Renderer::Renderer() :_lastMaterialID(0) ,_numQuads(0) ,_glViewAssigned(false) +,_isRendering(false) #if CC_ENABLE_CACHE_TEXTURE_DATA ,_cacheTextureListener(nullptr) #endif @@ -236,6 +237,7 @@ void Renderer::addCommand(RenderCommand* command) void Renderer::addCommand(RenderCommand* command, int renderQueue) { + CCASSERT(!_isRendering, "Cannot add command while rendering"); CCASSERT(renderQueue >=0, "Invalid render queue"); CCASSERT(command->getType() != RenderCommand::Type::UNKNOWN_COMMAND, "Invalid Command Type"); _renderGroups[renderQueue].push_back(command); @@ -243,11 +245,13 @@ void Renderer::addCommand(RenderCommand* command, int renderQueue) void Renderer::pushGroup(int renderQueueID) { + CCASSERT(!_isRendering, "Cannot add command while rendering"); _commandGroupStack.push(renderQueueID); } void Renderer::popGroup() { + CCASSERT(!_isRendering, "Cannot add command while rendering"); _commandGroupStack.pop(); } @@ -317,7 +321,8 @@ void Renderer::render() //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //TODO setup camera or MVP - + _isRendering = true; + if (_glViewAssigned) { // cleanup @@ -333,6 +338,7 @@ void Renderer::render() flush(); } clean(); + _isRendering = false; } void Renderer::clean() diff --git a/cocos/2d/renderer/CCRenderer.h b/cocos/2d/renderer/CCRenderer.h index 812407932e..0cfddf78a6 100644 --- a/cocos/2d/renderer/CCRenderer.h +++ b/cocos/2d/renderer/CCRenderer.h @@ -148,6 +148,8 @@ protected: // stats ssize_t _drawnBatches; ssize_t _drawnVertices; + //flags to indicate rendering + bool _isRendering; #if CC_ENABLE_CACHE_TEXTURE_DATA EventListenerCustom* _cacheTextureListener; diff --git a/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.cpp b/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.cpp index 91c1751931..77bba6de46 100644 --- a/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.cpp +++ b/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.cpp @@ -670,6 +670,10 @@ std::string RenderTextureTargetNode::subtitle() const // SpriteRenderTextureBug SpriteRenderTextureBug::SimpleSprite::SimpleSprite() : _rt(nullptr) {} +SpriteRenderTextureBug::SimpleSprite::~SimpleSprite() +{ + CC_SAFE_RELEASE(_rt); +} SpriteRenderTextureBug::SimpleSprite* SpriteRenderTextureBug::SimpleSprite::create(const char* filename, const Rect &rect) { @@ -687,16 +691,6 @@ SpriteRenderTextureBug::SimpleSprite* SpriteRenderTextureBug::SimpleSprite::crea } void SpriteRenderTextureBug::SimpleSprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) -{ - _customCommand.init(_globalZOrder); - _customCommand.func = CC_CALLBACK_0(SpriteRenderTextureBug::SimpleSprite::onBeforeDraw, this); - renderer->addCommand(&_customCommand); - - Sprite::draw(renderer, transform, transformUpdated); - -} - -void SpriteRenderTextureBug::SimpleSprite::onBeforeDraw() { if (_rt == nullptr) { @@ -706,6 +700,9 @@ void SpriteRenderTextureBug::SimpleSprite::onBeforeDraw() } _rt->beginWithClear(0.0f, 0.0f, 0.0f, 1.0f); _rt->end(); + + Sprite::draw(renderer, transform, transformUpdated); + } SpriteRenderTextureBug::SpriteRenderTextureBug() diff --git a/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.h b/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.h index eeff431ac3..e87c8cb82b 100644 --- a/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.h +++ b/tests/cpp-tests/Classes/RenderTextureTest/RenderTextureTest.h @@ -139,14 +139,10 @@ public: public: static SimpleSprite* create(const char* filename, const Rect &rect); SimpleSprite(); + ~SimpleSprite(); virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated); - - protected: - void onBeforeDraw(); public: RenderTexture *_rt; - protected: - CustomCommand _customCommand; }; public: From 7c027b16b01b3c2e4d8642349b7aa14a6c3e1b55 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Fri, 11 Apr 2014 16:07:55 +0800 Subject: [PATCH 58/98] change assert message --- cocos/2d/renderer/CCRenderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/renderer/CCRenderer.cpp b/cocos/2d/renderer/CCRenderer.cpp index 72b37c49f4..f09eb302f7 100644 --- a/cocos/2d/renderer/CCRenderer.cpp +++ b/cocos/2d/renderer/CCRenderer.cpp @@ -245,13 +245,13 @@ void Renderer::addCommand(RenderCommand* command, int renderQueue) void Renderer::pushGroup(int renderQueueID) { - CCASSERT(!_isRendering, "Cannot add command while rendering"); + CCASSERT(!_isRendering, "Cannot change render queue while rendering"); _commandGroupStack.push(renderQueueID); } void Renderer::popGroup() { - CCASSERT(!_isRendering, "Cannot add command while rendering"); + CCASSERT(!_isRendering, "Cannot change render queue while rendering"); _commandGroupStack.pop(); } From 4be149e492bddd468b1dadb4827eb668a254f50f Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 11 Apr 2014 16:30:25 +0800 Subject: [PATCH 59/98] closed #4761, fix zfighting between tests --- tests/cpp-tests/Classes/NodeTest/NodeTest.cpp | 2 ++ tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp | 6 ++++++ tests/cpp-tests/Classes/TileMapTest/TileMapTest.h | 1 + tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp | 2 ++ 4 files changed, 11 insertions(+) diff --git a/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp b/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp index 251eeaac60..b4ac8cb444 100644 --- a/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp +++ b/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp @@ -1053,6 +1053,7 @@ void CameraTest1::onEnter() void CameraTest1::onExit() { Director::getInstance()->setProjection(_preProjection); + Director::getInstance()->setDepthTest(false); TestCocosNodeDemo::onExit(); } @@ -1100,6 +1101,7 @@ void CameraTest2::onEnter() void CameraTest2::onExit() { Director::getInstance()->setProjection(_preProjection); + Director::getInstance()->setDepthTest(false); TestCocosNodeDemo::onExit(); } diff --git a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp index a44e3f0e08..995d59e1a4 100644 --- a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp +++ b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp @@ -118,6 +118,11 @@ void TileDemo::onEnter() BaseTest::onEnter(); } +void TileMapTestScene::onExit() +{ + Layer::onExit(); + Director::getInstance()->setDepthTest(false); +} void TileDemo::restartCallback(Ref* sender) { auto s = new TileMapTestScene(); @@ -166,6 +171,7 @@ void TileMapTestScene::runThisTest() Director::getInstance()->replaceScene(this); } + //------------------------------------------------------------------ // // TileMapTest diff --git a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.h b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.h index 57e5db5895..ef8e60fdcc 100644 --- a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.h +++ b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.h @@ -14,6 +14,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; virtual void onEnter() override; + virtual void onExit()override; void restartCallback(Ref* sender); void nextCallback(Ref* sender); diff --git a/tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp b/tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp index 53d1faf8fc..b190c7ce5e 100644 --- a/tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp +++ b/tests/cpp-tests/Classes/TransitionsTest/TransitionsTest.cpp @@ -380,6 +380,7 @@ void TestLayer1::onExitTransitionDidStart() void TestLayer1::onExit() { Layer::onExit(); + Director::getInstance()->setDepthTest(false); log("Scene 1 onExit"); } @@ -509,5 +510,6 @@ void TestLayer2::onExitTransitionDidStart() void TestLayer2::onExit() { Layer::onExit(); + Director::getInstance()->setDepthTest(false); log("Scene 2 onExit"); } From 83664e23224b22cba0318d3503e49d8a88b2e072 Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 11 Apr 2014 16:34:26 +0800 Subject: [PATCH 60/98] closed #4761. fix a improve super class function call --- tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp index 995d59e1a4..cb4fc40acb 100644 --- a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp +++ b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp @@ -120,7 +120,7 @@ void TileDemo::onEnter() void TileMapTestScene::onExit() { - Layer::onExit(); + TileDemo::onExit(); Director::getInstance()->setDepthTest(false); } void TileDemo::restartCallback(Ref* sender) From 280c2755b376bd7f09563844c131c07907460071 Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 11 Apr 2014 16:47:35 +0800 Subject: [PATCH 61/98] closed #4761. fix a compile error --- tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp index cb4fc40acb..ac00064941 100644 --- a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp +++ b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp @@ -118,9 +118,9 @@ void TileDemo::onEnter() BaseTest::onEnter(); } -void TileMapTestScene::onExit() +void TileDemo::onExit() { - TileDemo::onExit(); + BaseTest::onExit(); Director::getInstance()->setDepthTest(false); } void TileDemo::restartCallback(Ref* sender) From a8378a2b99af167cbeb98d2676dbb94955a55734 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Fri, 11 Apr 2014 17:31:35 +0800 Subject: [PATCH 62/98] adjust comment --- cocos/2d/renderer/CCRenderer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/renderer/CCRenderer.h b/cocos/2d/renderer/CCRenderer.h index 0cfddf78a6..6d143e6b43 100644 --- a/cocos/2d/renderer/CCRenderer.h +++ b/cocos/2d/renderer/CCRenderer.h @@ -148,7 +148,7 @@ protected: // stats ssize_t _drawnBatches; ssize_t _drawnVertices; - //flags to indicate rendering + //the flag for checking whether renderer is rendering bool _isRendering; #if CC_ENABLE_CACHE_TEXTURE_DATA From 5b3d5badfadc3597da0cf482a171f169c582b6a0 Mon Sep 17 00:00:00 2001 From: koowolf <450928375@qq.com> Date: Fri, 11 Apr 2014 16:57:25 +0800 Subject: [PATCH 63/98] closed #4763: 1.fix stopalleffect lead to stop background music 2.fix play effect may lead to memory leak --- cocos/audio/wp8/Audio.cpp | 42 +++++++++++++++++++++++---- cocos/audio/wp8/Audio.h | 5 +++- cocos/audio/wp8/SimpleAudioEngine.cpp | 4 +-- 3 files changed, 42 insertions(+), 9 deletions(-) diff --git a/cocos/audio/wp8/Audio.cpp b/cocos/audio/wp8/Audio.cpp index 0be32e6069..feaf711a18 100644 --- a/cocos/audio/wp8/Audio.cpp +++ b/cocos/audio/wp8/Audio.cpp @@ -203,8 +203,10 @@ void Audio::StopBackgroundMusic(bool bReleaseData) StopSoundEffect(m_backgroundID); - if (bReleaseData) + if (bReleaseData){ UnloadSoundEffect(m_backgroundID); + RemoveFromList(m_backgroundID); + } } void Audio::PauseBackgroundMusic() @@ -406,7 +408,8 @@ void Audio::PauseAllSoundEffects() EffectList::iterator iter; for (iter = m_soundEffects.begin(); iter != m_soundEffects.end(); iter++) { - PauseSoundEffect(iter->first); + if (iter->first != m_backgroundID) + PauseSoundEffect(iter->first); } } @@ -419,11 +422,12 @@ void Audio::ResumeAllSoundEffects() EffectList::iterator iter; for (iter = m_soundEffects.begin(); iter != m_soundEffects.end(); iter++) { - ResumeSoundEffect(iter->first); + if (iter->first != m_backgroundID) + ResumeSoundEffect(iter->first); } } -void Audio::StopAllSoundEffects() +void Audio::StopAllSoundEffects(bool bReleaseData) { if (m_engineExperiencedCriticalError) { return; @@ -432,8 +436,27 @@ void Audio::StopAllSoundEffects() EffectList::iterator iter; for (iter = m_soundEffects.begin(); iter != m_soundEffects.end(); iter++) { - StopSoundEffect(iter->first); + if (iter->first != m_backgroundID){ + StopSoundEffect(iter->first); + if (bReleaseData) + { + UnloadSoundEffect(iter->first); + } + } } + if (bReleaseData) + { + for (iter = m_soundEffects.begin(); iter != m_soundEffects.end();) + { + if (iter->first != m_backgroundID){ + m_soundEffects.erase(iter++); + } + else + { + iter++; + } + } + } } bool Audio::IsSoundEffectStarted(unsigned int sound) @@ -556,6 +579,8 @@ void Audio::UnloadSoundEffect(const char* pszFilePath) int sound = Hash(pszFilePath); UnloadSoundEffect(sound); + + RemoveFromList(sound); } void Audio::UnloadSoundEffect(unsigned int sound) @@ -575,7 +600,12 @@ void Audio::UnloadSoundEffect(unsigned int sound) m_soundEffects[sound].m_soundEffectBufferData = nullptr; m_soundEffects[sound].m_soundEffectSourceVoice = nullptr; m_soundEffects[sound].m_soundEffectStarted = false; - ZeroMemory(&m_soundEffects[sound].m_audioBuffer, sizeof(m_soundEffects[sound].m_audioBuffer)); + ZeroMemory(&m_soundEffects[sound].m_audioBuffer, sizeof(m_soundEffects[sound].m_audioBuffer)); +} +void Audio::RemoveFromList( unsigned int sound ) +{ m_soundEffects.erase(sound); } + + diff --git a/cocos/audio/wp8/Audio.h b/cocos/audio/wp8/Audio.h index d279de50b6..a00b9a2ef7 100644 --- a/cocos/audio/wp8/Audio.h +++ b/cocos/audio/wp8/Audio.h @@ -156,9 +156,12 @@ public: void PauseAllSoundEffects(); void ResumeAllSoundEffects(); - void StopAllSoundEffects(); + void StopAllSoundEffects(bool bReleaseData); void PreloadSoundEffect(const char* pszFilePath, bool isMusic = false); void UnloadSoundEffect(const char* pszFilePath); void UnloadSoundEffect(unsigned int sound); + +private: + void RemoveFromList(unsigned int sound); }; diff --git a/cocos/audio/wp8/SimpleAudioEngine.cpp b/cocos/audio/wp8/SimpleAudioEngine.cpp index e7dffaa3b4..6a9b17354b 100644 --- a/cocos/audio/wp8/SimpleAudioEngine.cpp +++ b/cocos/audio/wp8/SimpleAudioEngine.cpp @@ -63,7 +63,7 @@ SimpleAudioEngine::~SimpleAudioEngine() void SimpleAudioEngine::end() { sharedAudioController()->StopBackgroundMusic(true); - sharedAudioController()->StopAllSoundEffects(); + sharedAudioController()->StopAllSoundEffects(true); sharedAudioController()->ReleaseResources(); s_initialized = false; } @@ -158,7 +158,7 @@ void SimpleAudioEngine::resumeAllEffects() void SimpleAudioEngine::stopAllEffects() { - sharedAudioController()->StopAllSoundEffects(); + sharedAudioController()->StopAllSoundEffects(false); } void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath) From 7c5b4be0b16254fef0590c7cacf3c7fdcfc32114 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 11 Apr 2014 18:06:53 +0800 Subject: [PATCH 64/98] Warning fixes in ui, getZOrder -> getLocalZOrder --- cocos/ui/CCProtectedNode.cpp | 4 ++-- cocos/ui/UILayout.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/ui/CCProtectedNode.cpp b/cocos/ui/CCProtectedNode.cpp index d8a12940ec..d86292e6f9 100644 --- a/cocos/ui/CCProtectedNode.cpp +++ b/cocos/ui/CCProtectedNode.cpp @@ -304,7 +304,7 @@ void ProtectedNode::visit(Renderer* renderer, const kmMat4 &parentTransform, boo { auto node = _children.at(i); - if ( node && node->getZOrder() < 0 ) + if ( node && node->getLocalZOrder() < 0 ) node->visit(renderer, _modelViewTransform, dirty); else break; @@ -314,7 +314,7 @@ void ProtectedNode::visit(Renderer* renderer, const kmMat4 &parentTransform, boo { auto node = _protectedChildren.at(j); - if ( node && node->getZOrder() < 0 ) + if ( node && node->getLocalZOrder() < 0 ) node->visit(renderer, _modelViewTransform, dirty); else break; diff --git a/cocos/ui/UILayout.cpp b/cocos/ui/UILayout.cpp index 7399653ad4..9e4886e369 100644 --- a/cocos/ui/UILayout.cpp +++ b/cocos/ui/UILayout.cpp @@ -790,7 +790,7 @@ void Layout::stencilClippingVisit(Renderer *renderer, const kmMat4 &parentTransf { auto node = _children.at(i); - if ( node && node->getZOrder() < 0 ) + if ( node && node->getLocalZOrder() < 0 ) node->visit(renderer, _modelViewTransform, dirty); else break; @@ -800,7 +800,7 @@ void Layout::stencilClippingVisit(Renderer *renderer, const kmMat4 &parentTransf { auto node = _protectedChildren.at(j); - if ( node && node->getZOrder() < 0 ) + if ( node && node->getLocalZOrder() < 0 ) node->visit(renderer, _modelViewTransform, dirty); else break; From 0eee9bc2880d21d2861aeb51bfae41b97e637ca6 Mon Sep 17 00:00:00 2001 From: zhangbin Date: Fri, 11 Apr 2014 20:02:11 +0800 Subject: [PATCH 65/98] Solve the incorrect effect of some transition test case in lua-tests. --- tests/cpp-tests/Classes/NodeTest/NodeTest.cpp | 2 ++ tests/lua-tests/src/ActionsTest/ActionsTest.lua | 4 ++-- tests/lua-tests/src/NodeTest/NodeTest.lua | 10 ++++++---- tests/lua-tests/src/TileMapTest/TileMapTest.lua | 7 +++---- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp b/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp index b4ac8cb444..b587dcb173 100644 --- a/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp +++ b/tests/cpp-tests/Classes/NodeTest/NodeTest.cpp @@ -584,11 +584,13 @@ void CameraOrbitTest::onEnter() { TestCocosNodeDemo::onEnter(); _preProjection = Director::getInstance()->getProjection(); + Director::getInstance()->setDepthTest(true); Director::getInstance()->setProjection(Director::Projection::_3D); } void CameraOrbitTest::onExit() { + Director::getInstance()->setDepthTest(false); Director::getInstance()->setProjection(_preProjection); TestCocosNodeDemo::onExit(); } diff --git a/tests/lua-tests/src/ActionsTest/ActionsTest.lua b/tests/lua-tests/src/ActionsTest/ActionsTest.lua index f3840a6469..64ad791a10 100644 --- a/tests/lua-tests/src/ActionsTest/ActionsTest.lua +++ b/tests/lua-tests/src/ActionsTest/ActionsTest.lua @@ -204,8 +204,8 @@ local function ActionRotationalSkewVSStandardSkew() label:setAnchorPoint(cc.p(0.5, 0.5)) label:setPosition(cc.p(s.width/2, s.height - 250 + label:getContentSize().height/2)); layer:addChild(label); - local actionTo2 = cc.RotateBy:create(2, 360); - local actionToBack2 = cc.RotateBy:create(2, -360); + local actionTo2 = cc.RotateBy:create(2, 360, 0); + local actionToBack2 = cc.RotateBy:create(2, -360, 0); seq = cc.Sequence:create(actionTo2, actionToBack2) box:runAction(seq); diff --git a/tests/lua-tests/src/NodeTest/NodeTest.lua b/tests/lua-tests/src/NodeTest/NodeTest.lua index ecbc50f03c..8574c8c097 100644 --- a/tests/lua-tests/src/NodeTest/NodeTest.lua +++ b/tests/lua-tests/src/NodeTest/NodeTest.lua @@ -426,8 +426,10 @@ end local function CameraOrbitTest_onEnterOrExit(tag) if tag == "enter" then cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION3_D) + cc.Director:getInstance():setDepthTest(true) elseif tag == "exit" then - cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION2_D) + cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION_DEFAULT) + cc.Director:getInstance():setDepthTest(false) end end @@ -470,7 +472,7 @@ local function CameraOrbitTest() p:runAction(cc.RepeatForever:create(orbit)) layer:setScale(1) - + layer:registerScriptHandler(CameraOrbitTest_onEnterOrExit) Helper.titleLabel:setString("Camera Orbit test") return layer end @@ -499,7 +501,7 @@ local function CameraZoomTest_onEnterOrExit(tag) cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION3_D) CameraZoomTest_entry = scheduler:scheduleScriptFunc(CameraZoomTest_update, 0.0, false) elseif tag == "exit" then - cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION2_D) + cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION_DEFAULT) scheduler:unscheduleScriptEntry(CameraZoomTest_entry) end end @@ -693,7 +695,7 @@ function CocosNodeTest() StressTest2, NodeToWorld, CameraOrbitTest, - CameraZoomTest, + -- CameraZoomTest, ConvertToNode, NodeOpaqueTest, NodeNonOpaqueTest, diff --git a/tests/lua-tests/src/TileMapTest/TileMapTest.lua b/tests/lua-tests/src/TileMapTest/TileMapTest.lua index f7821fcb3d..b356b7cdf9 100644 --- a/tests/lua-tests/src/TileMapTest/TileMapTest.lua +++ b/tests/lua-tests/src/TileMapTest/TileMapTest.lua @@ -180,7 +180,7 @@ local function TMXOrthoTest() if event == "enter" then cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION3_D ) elseif event == "exit" then - cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION2_D ) + cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION_DEFAULT ) end end @@ -941,8 +941,7 @@ local function TMXIsoVertexZ() schedulerEntry = scheduler:scheduleScriptFunc(repositionSprite, 0, false) elseif event == "exit" then -- At exit use any other projection. - -- cc.Director:getInstance():setProjection:cc.DIRECTOR_PROJECTION3_D ) - + cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION_DEFAULT ) if m_tamara ~= nil then m_tamara:release() end @@ -996,7 +995,7 @@ local function TMXOrthoVertexZ() schedulerEntry = scheduler:scheduleScriptFunc(repositionSprite, 0, false) elseif event == "exit" then -- At exit use any other projection. - -- cc.Director:getInstance():setProjection:cc.DIRECTOR_PROJECTION3_D ) + cc.Director:getInstance():setProjection(cc.DIRECTOR_PROJECTION_DEFAULT ) if m_tamara ~= nil then m_tamara:release() end From 576d9d872c28665b39ab06785a7c530e787b13f9 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 11 Apr 2014 20:07:54 +0800 Subject: [PATCH 66/98] Fixes for Console, 1) wrong lambda capture, 2) Crashes when click 'next' in ConsoleTest. --- cocos/base/CCConsole.cpp | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/cocos/base/CCConsole.cpp b/cocos/base/CCConsole.cpp index fc0c599990..70ba8da9a1 100644 --- a/cocos/base/CCConsole.cpp +++ b/cocos/base/CCConsole.cpp @@ -38,7 +38,7 @@ #if defined(_MSC_VER) || defined(__MINGW32__) #include #include - +#include #define bzero(a, b) memset(a, 0, b); #else @@ -463,7 +463,7 @@ void Console::commandFileUtils(int fd, const std::string &args) void Console::commandConfig(int fd, const std::string& args) { Scheduler *sched = Director::getInstance()->getScheduler(); - sched->performFunctionInCocosThread( [&](){ + sched->performFunctionInCocosThread( [=](){ mydprintf(fd, "%s", Configuration::getInstance()->getInfo().c_str()); sendPrompt(fd); } @@ -504,7 +504,7 @@ void Console::commandResolution(int fd, const std::string& args) stream >> width >> height>> policy; Scheduler *sched = Director::getInstance()->getScheduler(); - sched->performFunctionInCocosThread( [&](){ + sched->performFunctionInCocosThread( [=](){ Director::getInstance()->getOpenGLView()->setDesignResolutionSize(width, height, static_cast(policy)); } ); } @@ -538,13 +538,13 @@ void Console::commandProjection(int fd, const std::string& args) } else if( args.compare("2d") == 0) { - sched->performFunctionInCocosThread( [&](){ + sched->performFunctionInCocosThread( [=](){ director->setProjection(Director::Projection::_2D); } ); } else if( args.compare("3d") == 0) { - sched->performFunctionInCocosThread( [&](){ + sched->performFunctionInCocosThread( [=](){ director->setProjection(Director::Projection::_3D); } ); } @@ -560,14 +560,14 @@ void Console::commandTextures(int fd, const std::string& args) if( args.compare("flush")== 0) { - sched->performFunctionInCocosThread( [&](){ + sched->performFunctionInCocosThread( [](){ Director::getInstance()->getTextureCache()->removeAllTextures(); } ); } else if(args.length()==0) { - sched->performFunctionInCocosThread( [&](){ + sched->performFunctionInCocosThread( [=](){ mydprintf(fd, "%s", Director::getInstance()->getTextureCache()->getCachedTextureInfo().c_str()); sendPrompt(fd); } @@ -596,7 +596,7 @@ void Console::commandDirector(int fd, const std::string& args) else if(args == "pause") { Scheduler *sched = director->getScheduler(); - sched->performFunctionInCocosThread( [&](){ + sched->performFunctionInCocosThread( [](){ Director::getInstance()->pause(); } ); @@ -609,7 +609,7 @@ void Console::commandDirector(int fd, const std::string& args) else if(args == "stop") { Scheduler *sched = director->getScheduler(); - sched->performFunctionInCocosThread( [&](){ + sched->performFunctionInCocosThread( [](){ Director::getInstance()->stopAnimation(); } ); @@ -1063,15 +1063,20 @@ void Console::loop() //On linux, if you send data to a closed socket, the sending process will //receive a SIGPIPE, which will cause linux system shutdown the sending process. //Add this ioctl code to check if the socket has been closed by peer. -#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) + +#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) + u_long n = 0; + ioctlsocket(fd, FIONREAD, &n); +#else int n = 0; ioctl(fd, FIONREAD, &n); +#endif if(n == 0) { //no data received, or fd is closed continue; } -#endif + if( ! parseCommand(fd) ) { to_remove.push_back(fd); From 99766cdd039e24dd19ec15edf370f0d1bf9c22c4 Mon Sep 17 00:00:00 2001 From: zhangbin Date: Fri, 11 Apr 2014 20:17:34 +0800 Subject: [PATCH 67/98] fix the error show of ` FontTest` --- tests/lua-tests/src/FontTest/FontTest.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/lua-tests/src/FontTest/FontTest.lua b/tests/lua-tests/src/FontTest/FontTest.lua index aa5e5e3282..1e19a714ae 100644 --- a/tests/lua-tests/src/FontTest/FontTest.lua +++ b/tests/lua-tests/src/FontTest/FontTest.lua @@ -37,12 +37,12 @@ local function showFont(ret, pFont) ret:removeChildByTag(kTagLabel3, true) ret:removeChildByTag(kTagLabel4, true) - local top = cc.Label:createWithSystemFont(pFont, pFont, 24) - local left = cc.Label:createWithSystemFont("alignment left", pFont, fontSize, + local top = cc.Label:createWithTTF(pFont, pFont, 24) + local left = cc.Label:createWithTTF("alignment left", pFont, fontSize, blockSize, cc.TEXT_ALIGNMENT_LEFT, verticalAlignment[vAlignIdx]) - local center = cc.Label:createWithSystemFont("alignment center", pFont, fontSize, + local center = cc.Label:createWithTTF("alignment center", pFont, fontSize, blockSize, cc.TEXT_ALIGNMENT_CENTER, verticalAlignment[vAlignIdx]) - local right = cc.Label:createWithSystemFont("alignment right", pFont, fontSize, + local right = cc.Label:createWithTTF("alignment right", pFont, fontSize, blockSize, cc.TEXT_ALIGNMENT_RIGHT, verticalAlignment[vAlignIdx]) local leftColor = cc.LayerColor:create(cc.c4b(100, 100, 100, 255), blockSize.width, blockSize.height) From 427ca4ecf05b81e17c318a7e268866420689baa1 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 11 Apr 2014 05:45:18 -0700 Subject: [PATCH 68/98] Small fix in Lua test. --- tests/lua-tests/src/BugsTest/BugsTest.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lua-tests/src/BugsTest/BugsTest.lua b/tests/lua-tests/src/BugsTest/BugsTest.lua index c4b02b1c02..8a000ca05a 100644 --- a/tests/lua-tests/src/BugsTest/BugsTest.lua +++ b/tests/lua-tests/src/BugsTest/BugsTest.lua @@ -382,7 +382,7 @@ local function BugTest1159() pScene:addChild(pLayer) cc.Director:getInstance():replaceScene(cc.TransitionPageTurn:create(1.0, pScene, false)) end - local label = cc.MenuItemLabel:createWithSystemFont(cc.Label:createWithSystemFont("Flip Me", "Helvetica", 24)) + local label = cc.MenuItemLabel:create(cc.Label:createWithSystemFont("Flip Me", "Helvetica", 24)) label:setAnchorPoint(cc.p(0.5, 0.5)) label:registerScriptTapHandler(menuCallback) local menu = cc.Menu:create() From 922b399ef2a7b54bbe0b57a42af6c4335ecdfa73 Mon Sep 17 00:00:00 2001 From: James Chen Date: Sat, 12 Apr 2014 12:56:36 +0800 Subject: [PATCH 69/98] Memory leak fix for ClippingNode --- cocos/2d/CCClippingNode.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index ed2e2b700b..d2542ef983 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -76,7 +76,11 @@ ClippingNode::ClippingNode() ClippingNode::~ClippingNode() { - CC_SAFE_RELEASE(_stencil); + if (_stencil) + { + _stencil->stopAllActions(); + _stencil->release(); + } } ClippingNode* ClippingNode::create() @@ -291,9 +295,9 @@ Node* ClippingNode::getStencil() const void ClippingNode::setStencil(Node *stencil) { + CC_SAFE_RETAIN(stencil); CC_SAFE_RELEASE(_stencil); _stencil = stencil; - CC_SAFE_RETAIN(_stencil); } GLfloat ClippingNode::getAlphaThreshold() const From b715a87791a2d97b5c41805c120ada3c7014d2ea Mon Sep 17 00:00:00 2001 From: James Chen Date: Sat, 12 Apr 2014 12:58:00 +0800 Subject: [PATCH 70/98] Memory leak fix in macro IMPLEMENT_CLASS_INFO --- cocos/editor-support/cocostudio/TriggerBase.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/editor-support/cocostudio/TriggerBase.h b/cocos/editor-support/cocostudio/TriggerBase.h index 20e172ec30..27e5ae0dcc 100755 --- a/cocos/editor-support/cocostudio/TriggerBase.h +++ b/cocos/editor-support/cocostudio/TriggerBase.h @@ -40,7 +40,9 @@ THE SOFTWARE. #define IMPLEMENT_CLASS_INFO(className) \ cocos2d::Ref* className::createInstance(void) \ { \ - return new className; \ + auto ret = new className; \ + ret->autorelease(); \ + return ret; \ } \ cocostudio::ObjectFactory::TInfo className::Type(#className, &className::createInstance); \ From 043f86cd6b0d3bd188228d699fc4b23c7aa67229 Mon Sep 17 00:00:00 2001 From: James Chen Date: Sat, 12 Apr 2014 12:59:28 +0800 Subject: [PATCH 71/98] Memory leak fix in SchedulerTest --- tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp b/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp index 071c248838..bbaa4f88fa 100644 --- a/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp +++ b/tests/cpp-tests/Classes/SchedulerTest/SchedulerTest.cpp @@ -1076,7 +1076,7 @@ void SchedulerIssue2268::onEnter() void SchedulerIssue2268::update(float dt) { - if ( testNode != NULL ) { + if ( testNode != nullptr ) { // do something with testNode // at some point we are done, pause the nodes actions and schedulers @@ -1085,13 +1085,13 @@ void SchedulerIssue2268::update(float dt) // at some other point we are completely done with the node and want to clear it testNode->unscheduleAllSelectors(); testNode->release(); - testNode = NULL; + testNode = nullptr; } } SchedulerIssue2268::~SchedulerIssue2268() { - + CC_SAFE_RELEASE(testNode); } std::string SchedulerIssue2268::title() const From b276c42ae667f6977a3d74aeeaee98d52ae4dcbe Mon Sep 17 00:00:00 2001 From: James Chen Date: Sat, 12 Apr 2014 13:01:42 +0800 Subject: [PATCH 72/98] GroupCommandManager should not be a singleton, it should be managed by Renderer. --- cocos/2d/renderer/CCGroupCommand.cpp | 25 ++++++------------------- cocos/2d/renderer/CCGroupCommand.h | 9 +++------ cocos/2d/renderer/CCRenderer.cpp | 3 +++ cocos/2d/renderer/CCRenderer.h | 6 ++++++ 4 files changed, 18 insertions(+), 25 deletions(-) diff --git a/cocos/2d/renderer/CCGroupCommand.cpp b/cocos/2d/renderer/CCGroupCommand.cpp index 95b9a5ccb5..b848b6b2fb 100644 --- a/cocos/2d/renderer/CCGroupCommand.cpp +++ b/cocos/2d/renderer/CCGroupCommand.cpp @@ -29,20 +29,6 @@ NS_CC_BEGIN -static GroupCommandManager* s_instance; -GroupCommandManager *GroupCommandManager::getInstance() -{ - if(!s_instance) - { - s_instance = new GroupCommandManager(); - if(!s_instance->init()) - { - CC_SAFE_DELETE(s_instance); - } - } - return s_instance; -} - GroupCommandManager::GroupCommandManager() { @@ -50,7 +36,7 @@ GroupCommandManager::GroupCommandManager() GroupCommandManager::~GroupCommandManager() { - CC_SAFE_RELEASE_NULL(s_instance); + } bool GroupCommandManager::init() @@ -88,19 +74,20 @@ void GroupCommandManager::releaseGroupID(int groupID) GroupCommand::GroupCommand() { _type = RenderCommand::Type::GROUP_COMMAND; - _renderQueueID = GroupCommandManager::getInstance()->getGroupID(); + _renderQueueID = Director::getInstance()->getRenderer()->getGroupCommandManager()->getGroupID(); } void GroupCommand::init(float globalOrder) { _globalOrder = globalOrder; - GroupCommandManager::getInstance()->releaseGroupID(_renderQueueID); - _renderQueueID = GroupCommandManager::getInstance()->getGroupID(); + auto manager = Director::getInstance()->getRenderer()->getGroupCommandManager(); + manager->releaseGroupID(_renderQueueID); + _renderQueueID = manager->getGroupID(); } GroupCommand::~GroupCommand() { - GroupCommandManager::getInstance()->releaseGroupID(_renderQueueID); + Director::getInstance()->getRenderer()->getGroupCommandManager()->releaseGroupID(_renderQueueID); } NS_CC_END diff --git a/cocos/2d/renderer/CCGroupCommand.h b/cocos/2d/renderer/CCGroupCommand.h index 56e8563fa7..af1429672e 100644 --- a/cocos/2d/renderer/CCGroupCommand.h +++ b/cocos/2d/renderer/CCGroupCommand.h @@ -37,17 +37,14 @@ NS_CC_BEGIN class GroupCommandManager : public Ref { public: - static GroupCommandManager* getInstance(); - - ~GroupCommandManager(); - - bool init(); - int getGroupID(); void releaseGroupID(int groupID); protected: + friend class Renderer; GroupCommandManager(); + ~GroupCommandManager(); + bool init(); std::unordered_map _groupMapping; }; diff --git a/cocos/2d/renderer/CCRenderer.cpp b/cocos/2d/renderer/CCRenderer.cpp index f09eb302f7..21cd19f1d7 100644 --- a/cocos/2d/renderer/CCRenderer.cpp +++ b/cocos/2d/renderer/CCRenderer.cpp @@ -107,6 +107,8 @@ Renderer::Renderer() ,_cacheTextureListener(nullptr) #endif { + _groupCommandManager = new GroupCommandManager(); + _commandGroupStack.push(DEFAULT_RENDER_QUEUE); RenderQueue defaultRenderQueue; @@ -117,6 +119,7 @@ Renderer::Renderer() Renderer::~Renderer() { _renderGroups.clear(); + _groupCommandManager->release(); glDeleteBuffers(2, _buffersVBO); diff --git a/cocos/2d/renderer/CCRenderer.h b/cocos/2d/renderer/CCRenderer.h index 6d143e6b43..b204d9ef9c 100644 --- a/cocos/2d/renderer/CCRenderer.h +++ b/cocos/2d/renderer/CCRenderer.h @@ -64,6 +64,8 @@ struct RenderStackElement ssize_t currentIndex; }; +class GroupCommandManager; + /* Class responsible for the rendering in. Whenever possible prefer to use `QuadCommand` objects since the renderer will automatically batch them. @@ -110,6 +112,8 @@ public: /* RenderCommands (except) QuadCommand should update this value */ void addDrawnVertices(ssize_t number) { _drawnVertices += number; }; + inline GroupCommandManager* getGroupCommandManager() const { return _groupCommandManager; }; + protected: void setupIndices(); @@ -151,6 +155,8 @@ protected: //the flag for checking whether renderer is rendering bool _isRendering; + GroupCommandManager* _groupCommandManager; + #if CC_ENABLE_CACHE_TEXTURE_DATA EventListenerCustom* _cacheTextureListener; #endif From d778a947f52883f02e98288a9262b89622ead11a Mon Sep 17 00:00:00 2001 From: Anton Sokolchenko Date: Sat, 12 Apr 2014 18:29:50 +0300 Subject: [PATCH 73/98] Fix incompatible pointer conversion --- external/chipmunk/src/cpArray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/chipmunk/src/cpArray.c b/external/chipmunk/src/cpArray.c index eb2257eea3..4d46b422cd 100644 --- a/external/chipmunk/src/cpArray.c +++ b/external/chipmunk/src/cpArray.c @@ -52,7 +52,7 @@ cpArrayPush(cpArray *arr, void *object) { if(arr->num == arr->max){ arr->max *= 2; - arr->arr = (void **)cprealloc(arr->arr, arr->max*sizeof(void**)); + arr->arr = (void **)cprealloc(arr->arr, arr->max*sizeof(void*)); } arr->arr[arr->num] = object; From 69223549f35e82998e1f648ac688688eab24cd54 Mon Sep 17 00:00:00 2001 From: Sachin Garg Date: Mon, 14 Apr 2014 05:46:30 +0530 Subject: [PATCH 74/98] Add support for orientation change callback (applicationScreenSizeChanged) in Android Java activity. --- .../android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java | 2 ++ cocos/2d/platform/android/javaactivity.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java index 787f954280..eb1d5d0853 100644 --- a/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java +++ b/cocos/2d/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java @@ -75,6 +75,7 @@ public class Cocos2dxRenderer implements GLSurfaceView.Renderer { @Override public void onSurfaceChanged(final GL10 pGL10, final int pWidth, final int pHeight) { + Cocos2dxRenderer.nativeOnSurfaceChanged(pWidth, pHeight); } @Override @@ -118,6 +119,7 @@ public class Cocos2dxRenderer implements GLSurfaceView.Renderer { private static native boolean nativeKeyDown(final int pKeyCode); private static native void nativeRender(); private static native void nativeInit(final int pWidth, final int pHeight); + private static native void nativeOnSurfaceChanged(final int pWidth, final int pHeight); private static native void nativeOnPause(); private static native void nativeOnResume(); diff --git a/cocos/2d/platform/android/javaactivity.cpp b/cocos/2d/platform/android/javaactivity.cpp index 9e068d1f63..52190a117a 100644 --- a/cocos/2d/platform/android/javaactivity.cpp +++ b/cocos/2d/platform/android/javaactivity.cpp @@ -79,4 +79,10 @@ void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thi } +void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnSurfaceChanged(JNIEnv* env, jobject thiz, jint w, jint h) +{ + cocos2d::Application::getInstance()->applicationScreenSizeChanged(w, h); +} + + } From c99f503a107903e9bec692a5e4935d8746caef00 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 14 Apr 2014 09:52:15 +0800 Subject: [PATCH 75/98] [ci skip] --- AUTHORS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index 3d3f2cf4fa..9b8212cf92 100644 --- a/AUTHORS +++ b/AUTHORS @@ -823,6 +823,9 @@ Developers: gaoxiaosong Fixed a warning in cpCollision.c + + sachingarg05 + Re-added orientation change callback in java activity Retired Core Developers: WenSheng Yang From 37bfeff8f09047cd68a610b8664c1c44b15eda27 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Mon, 14 Apr 2014 09:56:01 +0800 Subject: [PATCH 76/98] Add interface setCullingEnabled(), culling is disabled by default --- cocos/2d/CCSprite.cpp | 7 +++++++ cocos/2d/CCSprite.h | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index fd60eca586..2d37fa7b47 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -276,6 +276,7 @@ Sprite::Sprite(void) : _shouldBeHidden(false) , _texture(nullptr) , _insideBounds(true) +, _cullingEnabled(false) { } @@ -621,9 +622,15 @@ void Sprite::drawDebugData() } #endif //CC_SPRITE_DEBUG_DRAW +void Sprite::setCullingEnabled(bool enabled) +{ + _cullingEnabled = enabled; +} + // Culling function from cocos2d-iphone CCSprite.m file bool Sprite::isInsideBounds() const { + if(!_cullingEnabled) return true; // half size of the screen Size screen_half = Director::getInstance()->getWinSize(); screen_half.width /= 2; diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 8321412551..c75d2fee9f 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -519,6 +519,11 @@ CC_CONSTRUCTOR_ACCESS: */ virtual bool initWithFile(const std::string& filename, const Rect& rect); + /** + * set use auto culling or not + **/ + void setCullingEnabled(bool enabled); + protected: void updateColor(void); @@ -574,7 +579,7 @@ protected: bool _flippedY; /// Whether the sprite is flipped vertically or not bool _insideBounds; /// whether or not the sprite was inside bounds the previous frame - + bool _cullingEnabled; private: CC_DISALLOW_COPY_AND_ASSIGN(Sprite); }; From 5000873778c1f0064e7b3900858b525ccf383c59 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 14 Apr 2014 10:01:17 +0800 Subject: [PATCH 77/98] Const love: std::function -> const std::function& --- cocos/2d/CCTextureCache.cpp | 2 +- cocos/2d/CCTextureCache.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/CCTextureCache.cpp b/cocos/2d/CCTextureCache.cpp index 029df4218a..d384a1da30 100644 --- a/cocos/2d/CCTextureCache.cpp +++ b/cocos/2d/CCTextureCache.cpp @@ -93,7 +93,7 @@ std::string TextureCache::getDescription() const return StringUtils::format("", static_cast(_textures.size())); } -void TextureCache::addImageAsync(const std::string &path, std::function callback) +void TextureCache::addImageAsync(const std::string &path, const std::function& callback) { Texture2D *texture = nullptr; diff --git a/cocos/2d/CCTextureCache.h b/cocos/2d/CCTextureCache.h index 39b1a8e957..7f3cfb86f1 100644 --- a/cocos/2d/CCTextureCache.h +++ b/cocos/2d/CCTextureCache.h @@ -117,7 +117,7 @@ public: * Supported image extensions: .png, .jpg * @since v0.8 */ - virtual void addImageAsync(const std::string &filepath, std::function callback); + virtual void addImageAsync(const std::string &filepath, const std::function& callback); /** Returns a Texture2D object given an Image. * If the image was not previously loaded, it will create a new Texture2D object and it will return it. From 09911b712ba2bc87f8fbb15191c06faf4113305c Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 14 Apr 2014 10:50:32 +0800 Subject: [PATCH 78/98] [ci skip] --- CHANGELOG.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.REMOVED.git-id b/CHANGELOG.REMOVED.git-id index 3607a60ba8..57de9c50c4 100644 --- a/CHANGELOG.REMOVED.git-id +++ b/CHANGELOG.REMOVED.git-id @@ -1 +1 @@ -3dec43835640892d3595d2063489624cf216dd73 \ No newline at end of file +0f35c93ef2907727c9ace16b5760935861409117 \ No newline at end of file From 2ee06a3533a888cb9bda9ac6e4fa988444aff3f5 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 14 Apr 2014 11:15:54 +0800 Subject: [PATCH 79/98] Update AUTHORS [ci skip] --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 9b8212cf92..6abc36c6e3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -817,6 +817,7 @@ Developers: iSevenDays Fixed a bug that the result of 'malloc' is incompatible with type 'unsigned char *' in Image::saveImageToPNG Fixed a potential memory leak in CCEditBoxImplIOS.mm + Fixed incompatible pointer conversion in external/chipmunk/src/cpArray.c ololomax Fixed a potential crash in SceneReader::createNodeWithSceneFile From 9935e8ddfba37c687ea4185f5916ed49528bae34 Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Mon, 14 Apr 2014 11:33:40 +0800 Subject: [PATCH 80/98] setCullingEnabled set to public access changed renderer->culling test case --- cocos/2d/CCSprite.cpp | 1 + cocos/2d/CCSprite.h | 7 +- .../NewRendererTest/NewRendererTest.cpp | 91 +++++++++---------- .../Classes/NewRendererTest/NewRendererTest.h | 3 + 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 2d37fa7b47..7a0748890b 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -631,6 +631,7 @@ void Sprite::setCullingEnabled(bool enabled) bool Sprite::isInsideBounds() const { if(!_cullingEnabled) return true; + // half size of the screen Size screen_half = Director::getInstance()->getWinSize(); screen_half.width /= 2; diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index c75d2fee9f..229903ef9c 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -426,6 +426,8 @@ public: virtual void setOpacityModifyRGB(bool modify) override; virtual bool isOpacityModifyRGB(void) const override; /// @} + //set culling enabled + void setCullingEnabled(bool enabled); CC_CONSTRUCTOR_ACCESS: @@ -519,11 +521,6 @@ CC_CONSTRUCTOR_ACCESS: */ virtual bool initWithFile(const std::string& filename, const Rect& rect); - /** - * set use auto culling or not - **/ - void setCullingEnabled(bool enabled); - protected: void updateColor(void); diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp index a7a72db35d..94c42396e2 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp @@ -472,54 +472,53 @@ std::string NewDrawNodeTest::subtitle() const NewCullingTest::NewCullingTest() { - auto s = Director::getInstance()->getWinSize(); + Size size = Director::getInstance()->getWinSize(); + auto sprite = Sprite::create("Images/btn-about-normal-vertical.png"); + sprite->setRotation(-85); + sprite->setPosition(Point(size.width/2,size.height/3)); + sprite->setCullingEnabled(true); + sprite->setScale(2); + addChild(sprite); - std::vector images; - images.push_back("Images/grossini_dance_01.png"); - images.push_back("Images/grossini_dance_02.png"); - images.push_back("Images/grossini_dance_03.png"); - images.push_back("Images/grossini_dance_04.png"); - images.push_back("Images/grossini_dance_05.png"); - images.push_back("Images/grossini_dance_06.png"); - images.push_back("Images/grossini_dance_07.png"); - images.push_back("Images/grossini_dance_08.png"); - images.push_back("Images/grossini_dance_09.png"); - images.push_back("Images/grossini_dance_10.png"); - images.push_back("Images/grossini_dance_11.png"); - images.push_back("Images/grossini_dance_12.png"); - images.push_back("Images/grossini_dance_13.png"); - images.push_back("Images/grossini_dance_14.png"); - images.push_back("Images/grossini.png"); - auto parent = Node::create(); - parent->setPosition(s.width/2, s.height/2); - addChild(parent); - for(int index = 0; index < 500; ++index) - { - auto parent2 = Node::create(); - parent2->setPosition(0,0); - parent->addChild(parent2); - parent2->setPosition(-50,0); - parent2->runAction(RepeatForever::create((JumpBy::create(10, Point(0,0), 400, 1)))); - Sprite* sprite = Sprite::create(images[index % images.size()].c_str()); - sprite->setPosition(Point(0,0)); - //sprite->runAction(RepeatForever::create(RotateBy::create(3, 360))); - sprite->runAction(RepeatForever::create(Sequence::createWithTwoActions(ScaleBy::create(2, 2), ScaleBy::create(2,0.5)))); - parent2->addChild(sprite); - } + auto sprite2 = Sprite::create("Images/btn-about-normal-vertical.png"); + sprite2->setRotation(-85); + sprite2->setPosition(Point(size.width/2,size.height * 2/3)); + sprite2->setScale(2); + sprite2->setCullingEnabled(false); + addChild(sprite2); - for(int index = 0; index < 500; ++index) - { - auto parent2 = Node::create(); - parent->addChild(parent2); - parent2->setPosition(50,0); - parent2->runAction(RepeatForever::create((JumpBy::create(7, Point(0,0), 400, 1)))); - Sprite* sprite = Sprite::create(images[index % images.size()].c_str()); - sprite->setPosition(Point(0,0)); - //sprite->runAction(RepeatForever::create(RotateBy::create(3, 360))); - sprite->runAction(RepeatForever::create(Sequence::createWithTwoActions(ScaleBy::create(2, 2), ScaleBy::create(2,0.5)))); - parent2->addChild(sprite); - } + auto listener = EventListenerTouchOneByOne::create(); + listener->setSwallowTouches(true); + + listener->onTouchBegan = CC_CALLBACK_2(NewCullingTest::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(NewCullingTest::onTouchMoved, this); + + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + +} +bool NewCullingTest::onTouchBegan(Touch* touch, Event *event) +{ + auto pos = touch->getLocation(); + _lastPos = pos; + return true; +} + +void NewCullingTest::onTouchMoved(Touch* touch, Event *event) +{ + //Point pos = touch->getLocationInView(); //ªÒ»°¥•√˛Œª÷√ + //pos = Director::getInstance()->convertToGL(pos);//◊¯±Í◊™ªª + //setPosition(pos); + + auto pos = touch->getLocation(); + + auto offset = pos - _lastPos; + + auto layerPos = getPosition(); + auto newPos = layerPos + offset; + + setPosition(newPos); + _lastPos = pos; } NewCullingTest::~NewCullingTest() @@ -534,7 +533,7 @@ std::string NewCullingTest::title() const std::string NewCullingTest::subtitle() const { - return "Culling"; + return "Drag the layer to test the result of culling"; } VBOFullTest::VBOFullTest() diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h index 7d41f92c7c..686b5f43b9 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h @@ -129,6 +129,9 @@ public: protected: NewCullingTest(); virtual ~NewCullingTest(); + bool onTouchBegan(Touch* touch, Event *event); + void onTouchMoved(Touch* touch, Event *event); + Point _lastPos; }; class VBOFullTest : public MultiSceneTest From 6fe64b83f8b8ad94c7d9612038e241e314c5468e Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Mon, 14 Apr 2014 11:33:46 +0800 Subject: [PATCH 81/98] LabelTTF:fixed display incorrect if create by FontDefinition. --- cocos/2d/CCLabel.cpp | 67 ++++++++++++++++++++++++-------------------- cocos/2d/CCLabel.h | 1 + 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 67de55513f..88a7788dfe 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -258,6 +258,7 @@ Label::Label(FontAtlas *atlas /* = nullptr */, TextHAlignment hAlignment /* = Te , _textSprite(nullptr) , _contentDirty(false) , _shadowDirty(false) +, _compatibilityMode(false) { setAnchorPoint(Point::ANCHOR_MIDDLE); reset(); @@ -943,6 +944,7 @@ void Label::setFontDefinition(const FontDefinition& textDefinition) _fontDefinition._shadow._shadowEnabled = false; enableShadow(Color4B(0,0,0,255 * _fontDefinition._shadow._shadowOpacity),_fontDefinition._shadow._shadowOffset,_fontDefinition._shadow._shadowBlur); } + _compatibilityMode = true; } void Label::updateContent() @@ -968,41 +970,44 @@ void Label::updateContent() } else { - _fontDefinition._fontName = _systemFont; - _fontDefinition._fontSize = _systemFontSize; - - _fontDefinition._alignment = _hAlignment; - _fontDefinition._vertAlignment = _vAlignment; - - _fontDefinition._dimensions.width = _labelWidth; - _fontDefinition._dimensions.height = _labelHeight; - - _fontDefinition._fontFillColor.r = _textColor.r; - _fontDefinition._fontFillColor.g = _textColor.g; - _fontDefinition._fontFillColor.b = _textColor.b; - - _fontDefinition._shadow._shadowEnabled = false; - - if (_currLabelEffect == LabelEffect::OUTLINE && _outlineSize > 0) + if (!_compatibilityMode) { - _fontDefinition._stroke._strokeEnabled = true; - _fontDefinition._stroke._strokeSize = _outlineSize; - _fontDefinition._stroke._strokeColor.r = _effectColor.r; - _fontDefinition._stroke._strokeColor.g = _effectColor.g; - _fontDefinition._stroke._strokeColor.b = _effectColor.b; - } - else - { - _fontDefinition._stroke._strokeEnabled = false; - } + _fontDefinition._fontName = _systemFont; + _fontDefinition._fontSize = _systemFontSize; + + _fontDefinition._alignment = _hAlignment; + _fontDefinition._vertAlignment = _vAlignment; + + _fontDefinition._dimensions.width = _labelWidth; + _fontDefinition._dimensions.height = _labelHeight; + + _fontDefinition._fontFillColor.r = _textColor.r; + _fontDefinition._fontFillColor.g = _textColor.g; + _fontDefinition._fontFillColor.b = _textColor.b; + + _fontDefinition._shadow._shadowEnabled = false; + + if (_currLabelEffect == LabelEffect::OUTLINE && _outlineSize > 0) + { + _fontDefinition._stroke._strokeEnabled = true; + _fontDefinition._stroke._strokeSize = _outlineSize; + _fontDefinition._stroke._strokeColor.r = _effectColor.r; + _fontDefinition._stroke._strokeColor.g = _effectColor.g; + _fontDefinition._stroke._strokeColor.b = _effectColor.b; + } + else + { + _fontDefinition._stroke._strokeEnabled = false; + } #if (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS) - if (_fontDefinition._stroke._strokeEnabled) - { - CCLOGERROR("Currently only supported on iOS and Android!"); - } - _fontDefinition._stroke._strokeEnabled = false; + if (_fontDefinition._stroke._strokeEnabled) + { + CCLOGERROR("Currently only supported on iOS and Android!"); + } + _fontDefinition._stroke._strokeEnabled = false; #endif + } createSpriteWithFontDefinition(); } diff --git a/cocos/2d/CCLabel.h b/cocos/2d/CCLabel.h index 2905addf52..784b9d8a23 100644 --- a/cocos/2d/CCLabel.h +++ b/cocos/2d/CCLabel.h @@ -325,6 +325,7 @@ protected: //compatibility with older LabelTTF Sprite* _textSprite; FontDefinition _fontDefinition; + bool _compatibilityMode; //! used for optimization Sprite *_reusedLetter; From d2dd57d4124a494b26a6ae244fcd71335803478c Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Mon, 14 Apr 2014 11:45:06 +0800 Subject: [PATCH 82/98] change indention to space and remove comment code --- .../NewRendererTest/NewRendererTest.cpp | 32 ++++++++----------- .../Classes/NewRendererTest/NewRendererTest.h | 2 +- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp index 94c42396e2..312100f39d 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp @@ -488,37 +488,33 @@ NewCullingTest::NewCullingTest() addChild(sprite2); auto listener = EventListenerTouchOneByOne::create(); - listener->setSwallowTouches(true); + listener->setSwallowTouches(true); - listener->onTouchBegan = CC_CALLBACK_2(NewCullingTest::onTouchBegan, this); - listener->onTouchMoved = CC_CALLBACK_2(NewCullingTest::onTouchMoved, this); + listener->onTouchBegan = CC_CALLBACK_2(NewCullingTest::onTouchBegan, this); + listener->onTouchMoved = CC_CALLBACK_2(NewCullingTest::onTouchMoved, this); - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); } bool NewCullingTest::onTouchBegan(Touch* touch, Event *event) { - auto pos = touch->getLocation(); - _lastPos = pos; - return true; + auto pos = touch->getLocation(); + _lastPos = pos; + return true; } void NewCullingTest::onTouchMoved(Touch* touch, Event *event) -{ - //Point pos = touch->getLocationInView(); //ªÒ»°¥•√˛Œª÷√ - //pos = Director::getInstance()->convertToGL(pos);//◊¯±Í◊™ªª - //setPosition(pos); +{ + auto pos = touch->getLocation(); - auto pos = touch->getLocation(); + auto offset = pos - _lastPos; - auto offset = pos - _lastPos; + auto layerPos = getPosition(); + auto newPos = layerPos + offset; - auto layerPos = getPosition(); - auto newPos = layerPos + offset; - - setPosition(newPos); - _lastPos = pos; + setPosition(newPos); + _lastPos = pos; } NewCullingTest::~NewCullingTest() diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h index 686b5f43b9..ddafaf97c2 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.h @@ -130,7 +130,7 @@ protected: NewCullingTest(); virtual ~NewCullingTest(); bool onTouchBegan(Touch* touch, Event *event); - void onTouchMoved(Touch* touch, Event *event); + void onTouchMoved(Touch* touch, Event *event); Point _lastPos; }; From 7e807f3ea944c929f22e1c76d27956d92d3dfe5e Mon Sep 17 00:00:00 2001 From: zhangbin Date: Mon, 14 Apr 2014 11:48:48 +0800 Subject: [PATCH 83/98] closed #4784, Solve the problem of setup.py on windows. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4392d2d666..b3a258b4c3 100755 --- a/setup.py +++ b/setup.py @@ -227,7 +227,7 @@ class SetEnvVar(object): 0, _winreg.KEY_READ) - ret = _winreg.QueryValueEx(env, var) + ret = _winreg.QueryValueEx(env, var)[0] _winreg.CloseKey(env) except Exception: if env: From 884974f5e4a3c34c4fa4671429f00bc7e8dc471a Mon Sep 17 00:00:00 2001 From: shujunqiao Date: Mon, 14 Apr 2014 11:55:11 +0800 Subject: [PATCH 84/98] [ci skip], add close app in autotest.py --- tools/jenkins-scripts/autotest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/jenkins-scripts/autotest.py b/tools/jenkins-scripts/autotest.py index 88ddcd6b9d..b585cef14e 100755 --- a/tools/jenkins-scripts/autotest.py +++ b/tools/jenkins-scripts/autotest.py @@ -45,8 +45,15 @@ def autotest(type): while True: data = soc.recv(1024) print data + if data == 'TestEnd': + lastTestInfo = True + break + global lastTestInfo + if len(data) > len('\n') : + lastTestInfo = data if not data: break + soc.send('director end\r\n') print 'test end and close socket.' soc.close() From aef2767d23e3eed8af5132154a09e77d82a5eda8 Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Mon, 14 Apr 2014 13:42:37 +0800 Subject: [PATCH 85/98] change variable name. --- cocos/2d/CCLabel.cpp | 6 +++--- cocos/2d/CCLabel.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 88a7788dfe..58acf58a79 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -258,7 +258,7 @@ Label::Label(FontAtlas *atlas /* = nullptr */, TextHAlignment hAlignment /* = Te , _textSprite(nullptr) , _contentDirty(false) , _shadowDirty(false) -, _compatibilityMode(false) +, _compatibleMode(false) { setAnchorPoint(Point::ANCHOR_MIDDLE); reset(); @@ -944,7 +944,7 @@ void Label::setFontDefinition(const FontDefinition& textDefinition) _fontDefinition._shadow._shadowEnabled = false; enableShadow(Color4B(0,0,0,255 * _fontDefinition._shadow._shadowOpacity),_fontDefinition._shadow._shadowOffset,_fontDefinition._shadow._shadowBlur); } - _compatibilityMode = true; + _compatibleMode = true; } void Label::updateContent() @@ -970,7 +970,7 @@ void Label::updateContent() } else { - if (!_compatibilityMode) + if (!_compatibleMode) { _fontDefinition._fontName = _systemFont; _fontDefinition._fontSize = _systemFontSize; diff --git a/cocos/2d/CCLabel.h b/cocos/2d/CCLabel.h index 784b9d8a23..7bbafda2dd 100644 --- a/cocos/2d/CCLabel.h +++ b/cocos/2d/CCLabel.h @@ -325,7 +325,7 @@ protected: //compatibility with older LabelTTF Sprite* _textSprite; FontDefinition _fontDefinition; - bool _compatibilityMode; + bool _compatibleMode; //! used for optimization Sprite *_reusedLetter; From 45b2a7b2a535998ef8d8b774ab656c9b6b8a4308 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 14 Apr 2014 14:52:01 +0800 Subject: [PATCH 86/98] [ci skip] --- CHANGELOG.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.REMOVED.git-id b/CHANGELOG.REMOVED.git-id index 57de9c50c4..127163711f 100644 --- a/CHANGELOG.REMOVED.git-id +++ b/CHANGELOG.REMOVED.git-id @@ -1 +1 @@ -0f35c93ef2907727c9ace16b5760935861409117 \ No newline at end of file +92af7d01ae301982038e9f464b790c0a314698bb \ No newline at end of file From daccbdb2bf0cec3ccc05d24ef0acfe69c2136e0a Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Mon, 14 Apr 2014 06:55:48 +0000 Subject: [PATCH 87/98] [AUTO]: updating luabinding automatically --- cocos/scripting/lua-bindings/auto/api/Sprite.lua | 5 +++++ .../lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id | 2 +- cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Sprite.lua index 0fffcc711e..d60137cb68 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite.lua @@ -128,6 +128,11 @@ -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) +-------------------------------- +-- @function [parent=#Sprite] setCullingEnabled +-- @param self +-- @param #bool bool + -------------------------------- -- @function [parent=#Sprite] isFlippedX -- @param self diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id index 97ed386aba..dfd4d0725b 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id @@ -1 +1 @@ -877f92ef1788ddee60729373e99035e25a6cdb5c \ No newline at end of file +9921d1d42011f4fa01a4ec82372430689f5c845c \ No newline at end of file diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index b87c20bc2b..67273651dc 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1559,6 +1559,7 @@ int register_all_cocos2dx(lua_State* tolua_S); + #endif // __cocos2dx_h__ From a5e900a86b66439e664fb3f73ccc22bff4f8963a Mon Sep 17 00:00:00 2001 From: "Huabing.Xu" Date: Mon, 14 Apr 2014 17:06:35 +0800 Subject: [PATCH 88/98] manually enable depth test in test case TMXIsoVertexZ --- tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp index ac00064941..eb31be2600 100644 --- a/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp +++ b/tests/cpp-tests/Classes/TileMapTest/TileMapTest.cpp @@ -1101,12 +1101,14 @@ void TMXIsoVertexZ::onEnter() // TIP: 2d projection should be used Director::getInstance()->setProjection(Director::Projection::_2D); + Director::getInstance()->setDepthTest(true); } void TMXIsoVertexZ::onExit() { // At exit use any other projection. Director::getInstance()->setProjection(Director::Projection::DEFAULT); + Director::getInstance()->setDepthTest(false); TileDemo::onExit(); } From 7874cd8045a27bfd787803db7a2604ec05db98c9 Mon Sep 17 00:00:00 2001 From: zhangbin Date: Mon, 14 Apr 2014 17:29:37 +0800 Subject: [PATCH 89/98] closed #4786, Show tip message when python is not compatible. --- setup.py | 58 +++++++++++++++++++++++++------------------ tools/cocos2d-console | 2 +- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/setup.py b/setup.py index b3a258b4c3..e240751084 100755 --- a/setup.py +++ b/setup.py @@ -60,6 +60,14 @@ NDK_ROOT = 'NDK_ROOT' ANDROID_SDK_ROOT = 'ANDROID_SDK_ROOT' ANT_ROOT = 'ANT_ROOT' +def _check_python_version(): + major_ver = sys.version_info[0] + if major_ver > 2: + print ("The python version is %d.%d. But python 2.x is required. (Version 2.7 is well tested)\n" + "Download it here: https://www.python.org/" % (major_ver, sys.version_info[1])) + return False + + return True class SetEnvVar(object): @@ -168,7 +176,7 @@ class SetEnvVar(object): def _set_environment_variable(self, key, value): - print " -> Add %s environment variable..." % key + print(" -> Add %s environment variable..." % key) ret = False if self._isWindows(): ret = self._set_environment_variable_win32(key, value) @@ -176,9 +184,9 @@ class SetEnvVar(object): ret = self._set_environment_variable_unix(key, value) if ret: - print " ->Added %s=%s\n" % (key, value) + print(" ->Added %s=%s\n" % (key, value)) else: - print " ->Add failed\n" + print(" ->Add failed\n") return ret @@ -199,7 +207,7 @@ class SetEnvVar(object): return ret def _find_environment_variable(self, var): - print " ->Find environment variable %s..." % var + print(" ->Find environment variable %s..." % var) ret = None try: ret = os.environ[var] @@ -235,9 +243,9 @@ class SetEnvVar(object): ret = None if ret is None: - print " ->%s not found\n" % var + print(" ->%s not found\n" % var) else: - print " ->%s is found : %s\n" % (var, ret) + print(" ->%s is found : %s\n" % (var, ret)) return ret @@ -320,7 +328,7 @@ class SetEnvVar(object): ret = False if not ret: - print ' ->Error: "%s" is not a valid path of %s. Ignoring it.' % (value, var_name) + print(' ->Error: "%s" is not a valid path of %s. Ignoring it.' % (value, var_name)) return ret @@ -384,9 +392,9 @@ class SetEnvVar(object): _winreg.FlushKey(env) _winreg.CloseKey(env) - print ' ->Remove directory \"%s\" from PATH!\n' % remove_dir + print(' ->Remove directory \"%s\" from PATH!\n' % remove_dir) except Exception: - print ' ->Remove directory \"%s\" from PATH failed!\n' % remove_dir + print(' ->Remove directory \"%s\" from PATH failed!\n' % remove_dir) def set_windows_path(self, add_dir): ret = False @@ -425,13 +433,13 @@ class SetEnvVar(object): _winreg.CloseKey(env) if ret: - print " ->Add directory \"%s\" into PATH succeed!\n" % add_dir + print(" ->Add directory \"%s\" into PATH succeed!\n" % add_dir) else: - print " ->Add directory \"%s\" into PATH failed!\n" % add_dir + print(" ->Add directory \"%s\" into PATH failed!\n" % add_dir) def set_console_root(self): - print "->Check environment variable %s" % COCOS_CONSOLE_ROOT + print("->Check environment variable %s" % COCOS_CONSOLE_ROOT) cocos_consle_root = os.path.join(self.current_absolute_path, 'tools', 'cocos2d-console', 'bin') old_dir = self._find_environment_variable(COCOS_CONSOLE_ROOT) if old_dir is None: @@ -459,7 +467,7 @@ class SetEnvVar(object): if self._isLinux(): file_list = SetEnvVar.LINUX_CHECK_FILES - print " ->Update variable %s in files %s" % (var_name, str(file_list)) + print(" ->Update variable %s in files %s" % (var_name, str(file_list))) variable_updated = False for file_name in file_list: path = os.path.join(home, file_name) @@ -484,11 +492,11 @@ class SetEnvVar(object): file_obj = open(path, 'w') file_obj.writelines(lines) file_obj.close() - print " ->File %s updated!" % path + print(" ->File %s updated!" % path) # nothing updated, should add variable if not variable_updated: - print "\n ->No files updated, add variable %s instead!" % var_name + print("\n ->No files updated, add variable %s instead!" % var_name) ret = self._set_environment_variable(var_name, value) else: ret = True @@ -499,18 +507,18 @@ class SetEnvVar(object): def _force_update_env(self, var_name, value): ret = False if self._isWindows(): - print " ->Force update environment variable %s" % var_name + print(" ->Force update environment variable %s" % var_name) ret = self._set_environment_variable_win32(var_name, value) if not ret: - print " ->Failed!" + print(" ->Failed!") else: - print " ->Succeed : %s=%s" % (var_name, value) + print(" ->Succeed : %s=%s" % (var_name, value)) else: ret = self._force_update_unix_env(var_name, value) return ret def set_variable(self, var_name, value): - print "->Check environment variable %s" % var_name + print("->Check environment variable %s" % var_name) find_value = self._find_environment_variable(var_name) var_found = (find_value is not None) action_none = 0 @@ -558,7 +566,7 @@ class SetEnvVar(object): def set_environment_variables(self, ndk_root, android_sdk_root, ant_root): - print '\nSetting up cocos2d-x...' + print('\nSetting up cocos2d-x...') self.file_used_for_setup = self._get_filepath_for_setup() @@ -569,15 +577,17 @@ class SetEnvVar(object): # tip the backup file if (self.backup_file is not None) and (os.path.exists(self.backup_file)): - print '\nA backup file \"%s\" is created for \"%s\".' % (self.backup_file, self.file_used_for_setup) + print('\nA backup file \"%s\" is created for \"%s\".' % (self.backup_file, self.file_used_for_setup)) if self._isWindows(): - print '\nPlease restart the terminal or restart computer to make added system variables take effect\n' + print('\nPlease restart the terminal or restart computer to make added system variables take effect\n') else: - print '\nPlease execute command: "source %s" to make added system variables take effect\n' % self.file_used_for_setup - + print('\nPlease execute command: "source %s" to make added system variables take effect\n' % self.file_used_for_setup) if __name__ == '__main__': + if not _check_python_version(): + exit() + parser = OptionParser() parser.add_option('-n', '--ndkroot', dest='ndk_root', help='directory of ndk root') parser.add_option('-a', '--androidsdkroot', dest='android_sdk_root', help='directory of android sdk root') diff --git a/tools/cocos2d-console b/tools/cocos2d-console index ae27f3bafb..3b619aec6b 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit ae27f3bafbbdda9c32e5b89c79183183486e1299 +Subproject commit 3b619aec6b20841119110059189279b89a9344f4 From 0ecd8e271ebe89dc601bac5c1f045fc5ab3dbe9e Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 14 Apr 2014 21:02:01 +0800 Subject: [PATCH 90/98] update console submodule --- tools/cocos2d-console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cocos2d-console b/tools/cocos2d-console index 3b619aec6b..b594698b59 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit 3b619aec6b20841119110059189279b89a9344f4 +Subproject commit b594698b5974304694e990cfd63887564d877c53 From 584ccf65e4fc7962a844fc1f256bec8ea76ce56e Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Mon, 14 Apr 2014 16:46:19 -0700 Subject: [PATCH 92/98] Culling working again --- cocos/2d/CCSprite.cpp | 39 +-------------- cocos/2d/CCSprite.h | 5 -- cocos/2d/renderer/CCRenderer.cpp | 49 +++++++++++++++++-- cocos/2d/renderer/CCRenderer.h | 5 +- cocos/math/kazmath/kazmath/kazmath.h | 1 + cocos/math/kazmath/kazmath/vec4.c | 5 ++ .../NewRendererTest/NewRendererTest.cpp | 4 +- 7 files changed, 57 insertions(+), 51 deletions(-) diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 7a0748890b..811895651f 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -276,7 +276,6 @@ Sprite::Sprite(void) : _shouldBeHidden(false) , _texture(nullptr) , _insideBounds(true) -, _cullingEnabled(false) { } @@ -590,7 +589,7 @@ void Sprite::updateTransform(void) void Sprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { // Don't do calculate the culling if the transform was not updated - _insideBounds = transformUpdated ? isInsideBounds() : _insideBounds; + _insideBounds = transformUpdated ? renderer->checkVisibility(transform, _contentSize) : _insideBounds; if(_insideBounds) { @@ -622,42 +621,6 @@ void Sprite::drawDebugData() } #endif //CC_SPRITE_DEBUG_DRAW -void Sprite::setCullingEnabled(bool enabled) -{ - _cullingEnabled = enabled; -} - -// Culling function from cocos2d-iphone CCSprite.m file -bool Sprite::isInsideBounds() const -{ - if(!_cullingEnabled) return true; - - // half size of the screen - Size screen_half = Director::getInstance()->getWinSize(); - screen_half.width /= 2; - screen_half.height /= 2; - - float hcsx = _contentSize.width / 2; - float hcsy = _contentSize.height / 2; - - // convert to world coordinates - float x = hcsx * _modelViewTransform.mat[0] + hcsy * _modelViewTransform.mat[4] + _modelViewTransform.mat[12]; - float y = hcsx * _modelViewTransform.mat[1] + hcsy * _modelViewTransform.mat[5] + _modelViewTransform.mat[13]; - - // center of screen is (0,0) - x -= screen_half.width; - y -= screen_half.height; - - // convert content size to world coordinates - float wchw = hcsx * std::max(fabsf(_modelViewTransform.mat[0] + _modelViewTransform.mat[4]), fabsf(_modelViewTransform.mat[0] - _modelViewTransform.mat[4])); - float wchh = hcsy * std::max(fabsf(_modelViewTransform.mat[1] + _modelViewTransform.mat[5]), fabsf(_modelViewTransform.mat[1] - _modelViewTransform.mat[5])); - - // compare if it in the positive quadrant of the screen - float tmpx = (fabsf(x)-wchw); - float tmpy = (fabsf(y)-wchh); - return (tmpx < screen_half.width && tmpy < screen_half.height); -} - // Node overrides void Sprite::addChild(Node *child, int zOrder, int tag) { diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index 229903ef9c..27e011ccf3 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -426,8 +426,6 @@ public: virtual void setOpacityModifyRGB(bool modify) override; virtual bool isOpacityModifyRGB(void) const override; /// @} - //set culling enabled - void setCullingEnabled(bool enabled); CC_CONSTRUCTOR_ACCESS: @@ -529,8 +527,6 @@ protected: virtual void setReorderChildDirtyRecursively(void); virtual void setDirtyRecursively(bool bValue); - bool isInsideBounds() const; - // // Data used when the sprite is rendered using a SpriteSheet // @@ -576,7 +572,6 @@ protected: bool _flippedY; /// Whether the sprite is flipped vertically or not bool _insideBounds; /// whether or not the sprite was inside bounds the previous frame - bool _cullingEnabled; private: CC_DISALLOW_COPY_AND_ASSIGN(Sprite); }; diff --git a/cocos/2d/renderer/CCRenderer.cpp b/cocos/2d/renderer/CCRenderer.cpp index 21cd19f1d7..43e22b4b47 100644 --- a/cocos/2d/renderer/CCRenderer.cpp +++ b/cocos/2d/renderer/CCRenderer.cpp @@ -23,6 +23,9 @@ ****************************************************************************/ #include "renderer/CCRenderer.h" + +#include + #include "renderer/CCQuadCommand.h" #include "renderer/CCBatchCommand.h" #include "renderer/CCCustomCommand.h" @@ -34,15 +37,19 @@ #include "CCEventDispatcher.h" #include "CCEventListenerCustom.h" #include "CCEventType.h" -#include + +#include "kazmath/kazmath.h" NS_CC_BEGIN +// helper bool compareRenderCommand(RenderCommand* a, RenderCommand* b) { return a->getGlobalOrder() < b->getGlobalOrder(); } +// queue + void RenderQueue::push_back(RenderCommand* command) { float z = command->getGlobalOrder(); @@ -92,12 +99,14 @@ void RenderQueue::clear() _queuePosZ.clear(); } +// +// +// +static const int DEFAULT_RENDER_QUEUE = 0; // +// constructors, destructors, init // -// -#define DEFAULT_RENDER_QUEUE 0 - Renderer::Renderer() :_lastMaterialID(0) ,_numQuads(0) @@ -497,4 +506,36 @@ void Renderer::flush() _lastMaterialID = 0; } +// helpers + +bool Renderer::checkVisibility(const kmMat4 &transform, const Size &size) +{ + // half size of the screen + Size screen_half = Director::getInstance()->getWinSize(); + screen_half.width /= 2; + screen_half.height /= 2; + + float hSizeX = size.width/2; + float hSizeY = size.height/2; + + kmVec4 v4world; + kmVec4 v4local = (kmVec4) {hSizeX, hSizeY, 0, 1}; + kmVec4MultiplyMat4(&v4world, &v4local, &transform); + + // center of screen is (0,0) + v4world.x -= screen_half.width; + v4world.y -= screen_half.height; + + // convert content size to world coordinates + float wshw = std::max(fabsf(hSizeX * transform.mat[0] + hSizeY * transform.mat[4]), fabsf(hSizeX * transform.mat[0] - hSizeY * transform.mat[4])); + float wshh = std::max(fabsf(hSizeX * transform.mat[1] + hSizeY * transform.mat[5]), fabsf(hSizeX * transform.mat[1] - hSizeY * transform.mat[5])); + + // compare if it in the positive quadrant of the screen + float tmpx = (fabsf(v4world.x)-wshw); + float tmpy = (fabsf(v4world.y)-wshh); + bool ret = (tmpx < screen_half.width && tmpy < screen_half.height); + + return ret; +} + NS_CC_END diff --git a/cocos/2d/renderer/CCRenderer.h b/cocos/2d/renderer/CCRenderer.h index b204d9ef9c..472b8cbe87 100644 --- a/cocos/2d/renderer/CCRenderer.h +++ b/cocos/2d/renderer/CCRenderer.h @@ -113,7 +113,10 @@ public: void addDrawnVertices(ssize_t number) { _drawnVertices += number; }; inline GroupCommandManager* getGroupCommandManager() const { return _groupCommandManager; }; - + + /** returns whether or not a rectangle is visible or not */ + bool checkVisibility(const kmMat4& transform, const Size& size); + protected: void setupIndices(); diff --git a/cocos/math/kazmath/kazmath/kazmath.h b/cocos/math/kazmath/kazmath/kazmath.h index 3e1063d445..a25feaa0d7 100644 --- a/cocos/math/kazmath/kazmath/kazmath.h +++ b/cocos/math/kazmath/kazmath/kazmath.h @@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "vec2.h" #include "vec3.h" +#include "vec4.h" #include "mat3.h" #include "mat4.h" #include "utility.h" diff --git a/cocos/math/kazmath/kazmath/vec4.c b/cocos/math/kazmath/kazmath/vec4.c index 2efc88cb78..13a187466b 100644 --- a/cocos/math/kazmath/kazmath/vec4.c +++ b/cocos/math/kazmath/kazmath/vec4.c @@ -31,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "vec4.h" #include "mat4.h" +#include "neon_matrix_impl.h" kmVec4* kmVec4Fill(kmVec4* pOut, kmScalar x, kmScalar y, kmScalar z, kmScalar w) { @@ -137,10 +138,14 @@ kmVec4* kmVec4Div( kmVec4* pOut,const kmVec4* pV1, const kmVec4* pV2 ) { /// Multiplies a 4D vector by a matrix, the result is stored in pOut, and pOut is returned. kmVec4* kmVec4MultiplyMat4(kmVec4* pOut, const kmVec4* pV, const struct kmMat4* pM) { +#if defined(__ARM_NEON__) && !defined(__arm64__) + NEON_Matrix4Vector4Mul(&pM->mat[0], (const float*)pV, (float*)pOut); +#else pOut->x = pV->x * pM->mat[0] + pV->y * pM->mat[4] + pV->z * pM->mat[8] + pV->w * pM->mat[12]; pOut->y = pV->x * pM->mat[1] + pV->y * pM->mat[5] + pV->z * pM->mat[9] + pV->w * pM->mat[13]; pOut->z = pV->x * pM->mat[2] + pV->y * pM->mat[6] + pV->z * pM->mat[10] + pV->w * pM->mat[14]; pOut->w = pV->x * pM->mat[3] + pV->y * pM->mat[7] + pV->z * pM->mat[11] + pV->w * pM->mat[15]; +#endif return pOut; } diff --git a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp index 312100f39d..3e7f763135 100644 --- a/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp +++ b/tests/cpp-tests/Classes/NewRendererTest/NewRendererTest.cpp @@ -474,9 +474,8 @@ NewCullingTest::NewCullingTest() { Size size = Director::getInstance()->getWinSize(); auto sprite = Sprite::create("Images/btn-about-normal-vertical.png"); - sprite->setRotation(-85); + sprite->setRotation(5); sprite->setPosition(Point(size.width/2,size.height/3)); - sprite->setCullingEnabled(true); sprite->setScale(2); addChild(sprite); @@ -484,7 +483,6 @@ NewCullingTest::NewCullingTest() sprite2->setRotation(-85); sprite2->setPosition(Point(size.width/2,size.height * 2/3)); sprite2->setScale(2); - sprite2->setCullingEnabled(false); addChild(sprite2); auto listener = EventListenerTouchOneByOne::create(); From 3978cee2ee067213ae0c794b896f34e5c05abc4d Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Mon, 14 Apr 2014 20:00:06 -0700 Subject: [PATCH 93/98] compiles on windows --- cocos/2d/renderer/CCRenderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/renderer/CCRenderer.cpp b/cocos/2d/renderer/CCRenderer.cpp index 43e22b4b47..0a54dcbd72 100644 --- a/cocos/2d/renderer/CCRenderer.cpp +++ b/cocos/2d/renderer/CCRenderer.cpp @@ -518,8 +518,8 @@ bool Renderer::checkVisibility(const kmMat4 &transform, const Size &size) float hSizeX = size.width/2; float hSizeY = size.height/2; - kmVec4 v4world; - kmVec4 v4local = (kmVec4) {hSizeX, hSizeY, 0, 1}; + kmVec4 v4world, v4local; + kmVec4Fill(&v4local, hSizeX, hSizeY, 0, 1); kmVec4MultiplyMat4(&v4world, &v4local, &transform); // center of screen is (0,0) From 4f9387447de8e4db01719b379a368713d50d4985 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 15 Apr 2014 03:41:34 +0000 Subject: [PATCH 94/98] [AUTO]: updating luabinding automatically --- cocos/scripting/lua-bindings/auto/api/Sprite.lua | 5 ----- .../lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id | 2 +- cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/cocos/scripting/lua-bindings/auto/api/Sprite.lua b/cocos/scripting/lua-bindings/auto/api/Sprite.lua index d60137cb68..0fffcc711e 100644 --- a/cocos/scripting/lua-bindings/auto/api/Sprite.lua +++ b/cocos/scripting/lua-bindings/auto/api/Sprite.lua @@ -128,11 +128,6 @@ -- @param self -- @return TextureAtlas#TextureAtlas ret (return value: cc.TextureAtlas) --------------------------------- --- @function [parent=#Sprite] setCullingEnabled --- @param self --- @param #bool bool - -------------------------------- -- @function [parent=#Sprite] isFlippedX -- @param self diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id index dfd4d0725b..97ed386aba 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp.REMOVED.git-id @@ -1 +1 @@ -9921d1d42011f4fa01a4ec82372430689f5c845c \ No newline at end of file +877f92ef1788ddee60729373e99035e25a6cdb5c \ No newline at end of file diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp index 67273651dc..b87c20bc2b 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp @@ -1559,7 +1559,6 @@ int register_all_cocos2dx(lua_State* tolua_S); - #endif // __cocos2dx_h__ From e622b1fa0ee1cc6e8d90fc69aaedc3ea9e93fb26 Mon Sep 17 00:00:00 2001 From: zhangbin Date: Tue, 15 Apr 2014 11:49:16 +0800 Subject: [PATCH 95/98] closed #4849, The environment variable take effect without reboot machine on windows. --- setup.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/setup.py b/setup.py index e240751084..32f45a0b48 100755 --- a/setup.py +++ b/setup.py @@ -449,6 +449,10 @@ class SetEnvVar(object): self._set_environment_variable(COCOS_CONSOLE_ROOT, cocos_consle_root) else: + if old_dir == cocos_consle_root: + # is same with before, nothing to do + return + # update the environment variable if self._isWindows(): self.remove_dir_from_win_path(old_dir) @@ -597,3 +601,12 @@ if __name__ == '__main__': # set environment variables env = SetEnvVar() env.set_environment_variables(opts.ndk_root, opts.android_sdk_root, opts.ant_root) + + if env._isWindows(): + import ctypes + HWND_BROADCAST = 0xFFFF + WM_SETTINGCHANGE = 0x1A + SMTO_ABORTIFHUNG = 0x0002 + result = ctypes.c_long() + SendMessageTimeoutW = ctypes.windll.user32.SendMessageTimeoutW + SendMessageTimeoutW(HWND_BROADCAST, WM_SETTINGCHANGE, 0, u'Environment', SMTO_ABORTIFHUNG, 5000, ctypes.byref(result)) From cb807e61c2d0e96acb24268aa2207d741a4bb3a0 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 15 Apr 2014 11:56:50 +0800 Subject: [PATCH 96/98] closed #4607: Fixed project created by template crashes on iOS5.1 device. --- .../proj.ios_mac/ios/RootViewController.mm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm b/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm index b7d78629ab..c6e23901b4 100644 --- a/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm +++ b/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm @@ -70,14 +70,20 @@ } - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); + cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); + + if (glview) + { CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView(); - CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]); - - cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); + if (eaglview) + { + CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]); + cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); + } + } } //fix not hide status on ios7 From 8134404734f78b9b7717ba5a60a6d9827f86ac45 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 15 Apr 2014 12:50:33 +0800 Subject: [PATCH 97/98] Renames the protected method: 'EventListener::(s|g)etSceneGraphPriority' -> 'EventListener::(s|g)etAssociatedNode' --- cocos/2d/CCEventDispatcher.cpp | 34 +++++++++++++++++----------------- cocos/2d/CCEventListener.h | 10 +++++----- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cocos/2d/CCEventDispatcher.cpp b/cocos/2d/CCEventDispatcher.cpp index e5fca539c4..328aea7d7e 100644 --- a/cocos/2d/CCEventDispatcher.cpp +++ b/cocos/2d/CCEventDispatcher.cpp @@ -349,9 +349,9 @@ void EventDispatcher::removeEventListenersForTarget(Node* target, bool recursive { EventListener * listener = *iter; - if (listener->getSceneGraphPriority() == target) + if (listener->getAssociatedNode() == target) { - listener->setSceneGraphPriority(nullptr); // Ensure no dangling ptr to the target node. + listener->setAssociatedNode(nullptr); // Ensure no dangling ptr to the target node. listener->setRegistered(false); listener->release(); iter = _toAddedListeners.erase(iter); @@ -446,7 +446,7 @@ void EventDispatcher::forceAddEventListener(EventListener* listener) { setDirty(listenerID, DirtyFlag::SCENE_GRAPH_PRIORITY); - auto node = listener->getSceneGraphPriority(); + auto node = listener->getAssociatedNode(); CCASSERT(node != nullptr, "Invalid scene graph priority!"); associateNodeAndEventListener(node, listener); @@ -470,7 +470,7 @@ void EventDispatcher::addEventListenerWithSceneGraphPriority(EventListener* list if (!listener->checkAvailable()) return; - listener->setSceneGraphPriority(node); + listener->setAssociatedNode(node); listener->setFixedPriority(0); listener->setRegistered(true); @@ -493,7 +493,7 @@ void EventDispatcher::debugCheckNodeHasNoEventListenersOnDestruction(Node* node) for (EventListener * listener : *eventListenerVector->getSceneGraphPriorityListeners()) { CCASSERT(!listener || - listener->getSceneGraphPriority() != node, + listener->getAssociatedNode() != node, "Node should have no event listeners registered for it upon destruction!"); } } @@ -509,7 +509,7 @@ void EventDispatcher::debugCheckNodeHasNoEventListenersOnDestruction(Node* node) { for (EventListener * listener : *keyValuePair.second) { - CCASSERT(listener->getSceneGraphPriority() != node, + CCASSERT(listener->getAssociatedNode() != node, "Node should have no event listeners registered for it upon destruction!"); } } @@ -525,7 +525,7 @@ void EventDispatcher::debugCheckNodeHasNoEventListenersOnDestruction(Node* node) // Check the to be added list for (EventListener * listener : _toAddedListeners) { - CCASSERT(listener->getSceneGraphPriority() != node, + CCASSERT(listener->getAssociatedNode() != node, "Node should have no event listeners registered for it upon destruction!"); } @@ -549,7 +549,7 @@ void EventDispatcher::addEventListenerWithFixedPriority(EventListener* listener, if (!listener->checkAvailable()) return; - listener->setSceneGraphPriority(nullptr); + listener->setAssociatedNode(nullptr); listener->setFixedPriority(fixedPriority); listener->setRegistered(true); listener->setPaused(false); @@ -582,10 +582,10 @@ void EventDispatcher::removeEventListener(EventListener* listener) { CC_SAFE_RETAIN(l); l->setRegistered(false); - if (l->getSceneGraphPriority() != nullptr) + if (l->getAssociatedNode() != nullptr) { - dissociateNodeAndEventListener(l->getSceneGraphPriority(), l); - l->setSceneGraphPriority(nullptr); // NULL out the node pointer so we don't have any dangling pointers to destroyed nodes. + dissociateNodeAndEventListener(l->getAssociatedNode(), l); + l->setAssociatedNode(nullptr); // NULL out the node pointer so we don't have any dangling pointers to destroyed nodes. } if (_inDispatch == 0) @@ -681,7 +681,7 @@ void EventDispatcher::setPriority(EventListener* listener, int fixedPriority) auto found = std::find(fixedPriorityListeners->begin(), fixedPriorityListeners->end(), listener); if (found != fixedPriorityListeners->end()) { - CCASSERT(listener->getSceneGraphPriority() == nullptr, "Can't set fixed priority with scene graph based listener."); + CCASSERT(listener->getAssociatedNode() == nullptr, "Can't set fixed priority with scene graph based listener."); if (listener->getFixedPriority() != fixedPriority) { @@ -782,7 +782,7 @@ void EventDispatcher::dispatchEvent(Event* event) auto listeners = iter->second; auto onEvent = [&event](EventListener* listener) -> bool{ - event->setCurrentTarget(listener->getSceneGraphPriority()); + event->setCurrentTarget(listener->getAssociatedNode()); listener->_onEvent(event); return event->isStopped(); }; @@ -1168,7 +1168,7 @@ void EventDispatcher::sortEventListenersOfSceneGraphPriority(const EventListener // After sort: priority < 0, > 0 std::sort(sceneGraphListeners->begin(), sceneGraphListeners->end(), [this](const EventListener* l1, const EventListener* l2) { - return _nodePriorityMap[l1->getSceneGraphPriority()] > _nodePriorityMap[l2->getSceneGraphPriority()]; + return _nodePriorityMap[l1->getAssociatedNode()] > _nodePriorityMap[l2->getAssociatedNode()]; }); #if DUMP_LISTENER_ITEM_PRIORITY_INFO @@ -1245,10 +1245,10 @@ void EventDispatcher::removeEventListenersForListenerID(const EventListener::Lis { auto l = *iter; l->setRegistered(false); - if (l->getSceneGraphPriority() != nullptr) + if (l->getAssociatedNode() != nullptr) { - dissociateNodeAndEventListener(l->getSceneGraphPriority(), l); - l->setSceneGraphPriority(nullptr); // NULL out the node pointer so we don't have any dangling pointers to destroyed nodes. + dissociateNodeAndEventListener(l->getAssociatedNode(), l); + l->setAssociatedNode(nullptr); // NULL out the node pointer so we don't have any dangling pointers to destroyed nodes. } if (_inDispatch == 0) diff --git a/cocos/2d/CCEventListener.h b/cocos/2d/CCEventListener.h index ca851c9ec4..3cb750317e 100644 --- a/cocos/2d/CCEventListener.h +++ b/cocos/2d/CCEventListener.h @@ -128,13 +128,13 @@ protected: */ inline int getFixedPriority() const { return _fixedPriority; }; - /** Sets scene graph priority for this listener */ - inline void setSceneGraphPriority(Node* node) { _node = node; }; + /** Sets the node associated with this listener */ + inline void setAssociatedNode(Node* node) { _node = node; }; - /** Gets scene graph priority of this listener - * @return nullptr if it's a fixed priority listener, non-nullptr for scene graph priority listener + /** Gets the node associated with this listener + * @return nullptr if it's a fixed priority listener, otherwise return non-nullptr */ - inline Node* getSceneGraphPriority() const { return _node; }; + inline Node* getAssociatedNode() const { return _node; }; /////////////// // Properties From 46e7058587a1f6e19ca60b64a311b9c8fa56ace6 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 15 Apr 2014 13:58:51 +0800 Subject: [PATCH 98/98] update version information --- CHANGELOG.REMOVED.git-id | 2 +- cocos/2d/cocos2d.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.REMOVED.git-id b/CHANGELOG.REMOVED.git-id index 127163711f..149faa75e6 100644 --- a/CHANGELOG.REMOVED.git-id +++ b/CHANGELOG.REMOVED.git-id @@ -1 +1 @@ -92af7d01ae301982038e9f464b790c0a314698bb \ No newline at end of file +f9627687e49dc44eace02e9648208c4cd1987246 \ No newline at end of file diff --git a/cocos/2d/cocos2d.cpp b/cocos/2d/cocos2d.cpp index bc28f52742..65d686bab9 100644 --- a/cocos/2d/cocos2d.cpp +++ b/cocos/2d/cocos2d.cpp @@ -31,7 +31,7 @@ NS_CC_BEGIN const char* cocos2dVersion() { - return "3.0"; + return "3.0-rc2"; } NS_CC_END