diff --git a/AUTHORS b/AUTHORS
index 216378ba75..c6a0ecb2a6 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -936,6 +936,12 @@ Developers:
yongkangchen
Fixed a bug that font size of EditBox is not scaled when glview is scaled on Mac OS X
Fixed a bug that Label::setTextColor does not have any effect on Mac OS X
+
+ wagulu
+ Fixed a bug that particle effect is wrong when scaled
+
+ reckhou
+ Optimize FPS control on Android
Retired Core Developers:
WenSheng Yang
diff --git a/CHANGELOG b/CHANGELOG
index e3bd65b1fc..df58c668cb 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,13 +7,17 @@ cocos2d-x-3.3 ??
[FIX] EditBox: font size is not scaled when glview is scaled on Mac OS X
[FIX] Label: can not set charmap after it is created
[FIX] Label: setTextColor does not have any effect on Mac OS X
+ [FIX] ParticleSystem: effect is wrong if scene scaled
+ [FIX] ParticleSystemQuad: setTotalParticles() can't set a value larger than initialized value
[FIX] Scale9Sprite: new added sprite will be hidden
[FIX] UIListView: can not insert an item in specific position, it is added at bottom
[FIX] TabelView: can handle touch event though its parents are invisible
[FIX] TextField: can not use backspace to delete a character
[FIX] UIVideoPlayer: video frame size is not calculated correctly on iOS
+ [FIX] UIWidget: may crash if remove itself in touch call back function
[FIX] Others: can not import java library shift by engine correctly when using Eclispe on Android
+ [FIX] Others: optimize FPS contorl algorithm on Android
[FIX] Lua-binding: replace dynamic_cast to std::is_base_of in object_to_luaval
diff --git a/build/cocos2d-win32.vc2012.sln b/build/cocos2d-win32.vc2012.sln
index 8c661cfacc..74d3130b20 100644
--- a/build/cocos2d-win32.vc2012.sln
+++ b/build/cocos2d-win32.vc2012.sln
@@ -1,88 +1,54 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
- ProjectSection(ProjectDependencies) = postProject
- {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libBox2D", "..\external\Box2D\proj.win32\Box2D.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-tests", "..\tests\cpp-tests\proj.win32\cpp-tests.vcxproj", "{76A39BB2-9B84-4C65-98A5-654D86B86F2A}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnetwork", "..\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\cocos\scripting\lua-bindings\proj.win32\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-tests", "..\tests\lua-tests\project\proj.win32\lua-tests.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos\ui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}"
- ProjectSection(ProjectDependencies) = postProject
- {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
- EndProjectSection
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpp-empty-test", "..\tests\cpp-empty-test\proj.win32\cpp-empty-test.vcxproj", "{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua-empty-test", "..\tests\lua-empty-test\project\proj.win32\lua-empty-test.vcxproj", "{13E55395-94A2-4CD9-BFC2-1A051F80C17D}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbox2d", "..\external\Box2D\proj.win32\libbox2d.vcxproj", "{929480E7-23C0-4DF6-8456-096D71547116}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos\2d\libcocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocosdenshion", "..\cocos\audio\proj.win32\libcocosdenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libui", "..\cocos\ui\proj.win32\libui.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libextension", "..\extensions\proj.win32\libextension.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspine", "..\cocos\editor-support\spine\proj.win32\libspine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocosbuilder", "..\cocos\editor-support\cocosbuilder\proj.win32\libcocosbuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocostudio", "..\cocos\editor-support\cocostudio\proj.win32\libcocostudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32
- {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32
- {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32
- {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.Build.0 = Release|Win32
- {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32
- {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
- {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
- {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
- {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
- {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
- {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
- {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32
- {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32
- {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
- {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
- {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.ActiveCfg = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Debug|Win32.Build.0 = Debug|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.ActiveCfg = Release|Win32
{76A39BB2-9B84-4C65-98A5-654D86B86F2A}.Release|Win32.Build.0 = Release|Win32
- {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32
- {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32
- {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32
- {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.Build.0 = Release|Win32
- {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.ActiveCfg = Debug|Win32
- {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.Build.0 = Debug|Win32
- {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.ActiveCfg = Release|Win32
- {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.Build.0 = Release|Win32
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Debug|Win32.ActiveCfg = Debug|Win32
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Debug|Win32.Build.0 = Debug|Win32
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Release|Win32.ActiveCfg = Release|Win32
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Release|Win32.Build.0 = Release|Win32
- {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32
- {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32
- {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32
- {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.ActiveCfg = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.Build.0 = Debug|Win32
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.ActiveCfg = Release|Win32
@@ -91,10 +57,6 @@ Global
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32
- {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.ActiveCfg = Debug|Win32
- {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.Build.0 = Debug|Win32
- {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.ActiveCfg = Release|Win32
- {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.Build.0 = Release|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.ActiveCfg = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Debug|Win32.Build.0 = Debug|Win32
{B8BF9E81-35FD-4582-BA1C-B85FA365BABB}.Release|Win32.ActiveCfg = Release|Win32
@@ -103,6 +65,38 @@ Global
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Debug|Win32.Build.0 = Debug|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.ActiveCfg = Release|Win32
{13E55395-94A2-4CD9-BFC2-1A051F80C17D}.Release|Win32.Build.0 = Release|Win32
+ {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.ActiveCfg = Debug|Win32
+ {929480E7-23C0-4DF6-8456-096D71547116}.Debug|Win32.Build.0 = Debug|Win32
+ {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.ActiveCfg = Release|Win32
+ {929480E7-23C0-4DF6-8456-096D71547116}.Release|Win32.Build.0 = Release|Win32
+ {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32
+ {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32
+ {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32
+ {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32
+ {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32
+ {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32
+ {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.Build.0 = Release|Win32
+ {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.Build.0 = Debug|Win32
+ {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.ActiveCfg = Release|Win32
+ {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.Build.0 = Release|Win32
+ {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32
+ {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
+ {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
+ {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
+ {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32
+ {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32
+ {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32
+ {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32
+ {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32
+ {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.Build.0 = Release|Win32
+ {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.ActiveCfg = Debug|Win32
+ {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.Build.0 = Debug|Win32
+ {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.ActiveCfg = Release|Win32
+ {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/build all tests Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/build all tests Mac.xcscheme
new file mode 100644
index 0000000000..784723fab8
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/build all tests Mac.xcscheme
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/build all tests iOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/build all tests iOS.xcscheme
new file mode 100644
index 0000000000..ccac8c68e7
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/build all tests iOS.xcscheme
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-empty-test Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-empty-test Mac.xcscheme
new file mode 100644
index 0000000000..2695cf3b5b
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-empty-test Mac.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-empty-test iOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-empty-test iOS.xcscheme
new file mode 100644
index 0000000000..1e1fbd1e16
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-empty-test iOS.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-tests Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-tests Mac.xcscheme
new file mode 100644
index 0000000000..a564058291
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-tests Mac.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-tests iOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-tests iOS.xcscheme
new file mode 100644
index 0000000000..cd2767875e
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/cpp-tests iOS.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test IOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test IOS.xcscheme
new file mode 100644
index 0000000000..a08bedb508
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/game-controller-test IOS.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-empty-test Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-empty-test Mac.xcscheme
new file mode 100644
index 0000000000..f9d22ba13a
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-empty-test Mac.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-empty-test iOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-empty-test iOS.xcscheme
new file mode 100644
index 0000000000..1688704dca
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-empty-test iOS.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-game-controller-test iOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-game-controller-test iOS.xcscheme
new file mode 100644
index 0000000000..8fedb825f3
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-game-controller-test iOS.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests Mac.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests Mac.xcscheme
new file mode 100644
index 0000000000..121971847f
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests Mac.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests iOS.xcscheme b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests iOS.xcscheme
new file mode 100644
index 0000000000..a49efa4774
--- /dev/null
+++ b/build/cocos2d_tests.xcodeproj/xcshareddata/xcschemes/lua-tests iOS.xcscheme
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp
index 44f707a46f..3773ad668f 100644
--- a/cocos/2d/CCParticleSystemQuad.cpp
+++ b/cocos/2d/CCParticleSystemQuad.cpp
@@ -449,6 +449,10 @@ void ParticleSystemQuad::setTotalParticles(int tp)
_totalParticles = tp;
}
+ // fixed issue #5762
+ // reset the emission rate
+ setEmissionRate(_totalParticles / _life);
+
resetSystem();
}
diff --git a/cocos/2d/cocos2d.vcxproj b/cocos/2d/libcocos2d.vcxproj
similarity index 99%
rename from cocos/2d/cocos2d.vcxproj
rename to cocos/2d/libcocos2d.vcxproj
index a80983576c..9556b9f757 100644
--- a/cocos/2d/cocos2d.vcxproj
+++ b/cocos/2d/libcocos2d.vcxproj
@@ -103,6 +103,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\websockets\prebuilt\win32\*.*" "$(OutDi
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\zlib\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\icon\prebuilt\*.*" "$(OutDir)"
xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(OutDir)"
+xcopy /Y /Q "$(ProjectDir)..\..\external\sqlite3\libraries\win32\*.*" "$(OutDir)"
diff --git a/cocos/2d/cocos2d.vcxproj.filters b/cocos/2d/libcocos2d.vcxproj.filters
similarity index 100%
rename from cocos/2d/cocos2d.vcxproj.filters
rename to cocos/2d/libcocos2d.vcxproj.filters
diff --git a/cocos/audio/proj.win32/CocosDenshion.vcxproj b/cocos/audio/proj.win32/libcocosdenshion.vcxproj
similarity index 98%
rename from cocos/audio/proj.win32/CocosDenshion.vcxproj
rename to cocos/audio/proj.win32/libcocosdenshion.vcxproj
index e2d7f20825..ecb37bbc32 100644
--- a/cocos/audio/proj.win32/CocosDenshion.vcxproj
+++ b/cocos/audio/proj.win32/libcocosdenshion.vcxproj
@@ -11,7 +11,7 @@
- libAudio
+ libcocosdenshion
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
CocosDenshion.win32
Win32Proj
@@ -131,7 +131,7 @@
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
diff --git a/cocos/audio/proj.win32/CocosDenshion.vcxproj.filters b/cocos/audio/proj.win32/libcocosdenshion.vcxproj.filters
similarity index 100%
rename from cocos/audio/proj.win32/CocosDenshion.vcxproj.filters
rename to cocos/audio/proj.win32/libcocosdenshion.vcxproj.filters
diff --git a/cocos/audio/proj.win32/CocosDenshion.vcxproj.user b/cocos/audio/proj.win32/libcocosdenshion.vcxproj.user
similarity index 100%
rename from cocos/audio/proj.win32/CocosDenshion.vcxproj.user
rename to cocos/audio/proj.win32/libcocosdenshion.vcxproj.user
diff --git a/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj b/cocos/editor-support/cocosbuilder/proj.win32/libcocosbuilder.vcxproj
similarity index 98%
rename from cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj
rename to cocos/editor-support/cocosbuilder/proj.win32/libcocosbuilder.vcxproj
index ed92699ef1..ffdfd9ff9a 100644
--- a/cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj
+++ b/cocos/editor-support/cocosbuilder/proj.win32/libcocosbuilder.vcxproj
@@ -12,7 +12,7 @@
{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}
- libCocosBuilder
+ libcocosbuilder
@@ -146,10 +146,10 @@
-
+
{21b2c324-891f-48ea-ad1a-5ae13de12e28}
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
diff --git a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj b/cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj
similarity index 95%
rename from cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj
rename to cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj
index c60c6de5ca..4b77d77a26 100644
--- a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj
+++ b/cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj
@@ -138,19 +138,20 @@
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
-
+
{f8edd7fa-9a51-4e80-baeb-860825d2eac6}
-
+
{7e06e92c-537a-442b-9e4a-4761c84f8a1a}
{B57CF53F-2E49-4031-9822-047CC0E6BDE2}
- libCocosStudio
+ libcocostudio
+ libcocostudio
@@ -210,7 +211,7 @@
true
$(OutDir);%(AdditionalLibraryDirectories)
- libcocos2d.lib;libExtensions.lib;libGUI.lib;libBox2d.lib;libchipmunk.lib;libzlib.lib;libAudio.lib;%(AdditionalDependencies)
+ libzlib.lib;%(AdditionalDependencies)
@@ -230,7 +231,7 @@
true
true
true
- libcocos2d.lib;libExtensions.lib;libGUI.lib;libBox2d.lib;libchipmunk.lib;libzlib.lib;libAudio.lib;%(AdditionalDependencies)
+ libzlib.lib;%(AdditionalDependencies)
$(OutDir);%(AdditionalLibraryDirectories)
diff --git a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.filters b/cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj.filters
similarity index 100%
rename from cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.filters
rename to cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj.filters
diff --git a/cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.user b/cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj.user
similarity index 100%
rename from cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.user
rename to cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj.user
diff --git a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj
index 723adeec4b..60941a0cb1 100644
--- a/cocos/editor-support/spine/proj.win32/libSpine.vcxproj
+++ b/cocos/editor-support/spine/proj.win32/libSpine.vcxproj
@@ -65,9 +65,14 @@
+
+
+ {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
+
+
{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}
- libSpine
+ libspine
diff --git a/cocos/network/proj.win32/libNetwork.vcxproj b/cocos/network/proj.win32/libnetwork.vcxproj
similarity index 98%
rename from cocos/network/proj.win32/libNetwork.vcxproj
rename to cocos/network/proj.win32/libnetwork.vcxproj
index 703bf1ea1b..4716547e07 100644
--- a/cocos/network/proj.win32/libNetwork.vcxproj
+++ b/cocos/network/proj.win32/libnetwork.vcxproj
@@ -23,14 +23,14 @@
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
- libNetwork
+ libnetwork
{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}
- network.win32
+ libnetwork.win32
Win32Proj
diff --git a/cocos/network/proj.win32/libNetwork.vcxproj.filters b/cocos/network/proj.win32/libnetwork.vcxproj.filters
similarity index 100%
rename from cocos/network/proj.win32/libNetwork.vcxproj.filters
rename to cocos/network/proj.win32/libnetwork.vcxproj.filters
diff --git a/cocos/network/proj.win32/libNetwork.vcxproj.user b/cocos/network/proj.win32/libnetwork.vcxproj.user
similarity index 100%
rename from cocos/network/proj.win32/libNetwork.vcxproj.user
rename to cocos/network/proj.win32/libnetwork.vcxproj.user
diff --git a/cocos/platform/CCFileUtils.cpp b/cocos/platform/CCFileUtils.cpp
index 84930e6ae8..598b086bbd 100644
--- a/cocos/platform/CCFileUtils.cpp
+++ b/cocos/platform/CCFileUtils.cpp
@@ -888,39 +888,19 @@ std::string FileUtils::getFullPathForDirectoryAndFilename(const std::string& dir
std::string FileUtils::searchFullPathForFilename(const std::string& filename) const
{
- // If filename is absolute path, we don't need to consider 'search paths' and 'resolution orders'.
if (isAbsolutePath(filename))
{
return filename;
}
-
- // Already Cached ?
- auto cacheIter = _fullPathCache.find(filename);
- if( cacheIter != _fullPathCache.end() )
+ std::string path = const_cast(this)->fullPathForFilename(filename);
+ if (0 == path.compare(filename))
{
- return cacheIter->second;
+ return "";
}
-
- // Get the new file name.
- const std::string newFilename( getNewFilename(filename) );
-
- std::string fullpath;
-
- for (auto searchIt = _searchPathArray.cbegin(); searchIt != _searchPathArray.cend(); ++searchIt)
+ else
{
- for (auto resolutionIt = _searchResolutionsOrderArray.cbegin(); resolutionIt != _searchResolutionsOrderArray.cend(); ++resolutionIt)
- {
- fullpath = const_cast(this)->getPathForFilename(newFilename, *resolutionIt, *searchIt);
-
- if (!fullpath.empty())
- {
- // Using the filename passed in as key.
- const_cast(this)->_fullPathCache.insert(std::make_pair(filename, fullpath));
- return fullpath;
- }
- }
+ return path;
}
- return "";
}
bool FileUtils::isFileExist(const std::string& filename) const
diff --git a/cocos/platform/CCFileUtils.h b/cocos/platform/CCFileUtils.h
index 5fe985694d..9594b52d11 100644
--- a/cocos/platform/CCFileUtils.h
+++ b/cocos/platform/CCFileUtils.h
@@ -407,12 +407,16 @@ protected:
virtual std::string getNewFilename(const std::string &filename) const;
/**
- * Checks whether file exists without considering search paths and resolution orders.
+ * Checks whether a file exists without considering search paths and resolution orders.
+ * @param The file (with absolute path) to look up for
+ * @return Returns true if the file found at the given absolute path, otherwise returns false
*/
virtual bool isFileExistInternal(const std::string& filename) const = 0;
/**
- * Checks whether file exists without considering search paths and resolution orders.
+ * Checks whether a directory exists without considering search paths and resolution orders.
+ * @param The directory (with absolute path) to look up for
+ * @return Returns true if the directory found at the given absolute path, otherwise returns false
*/
virtual bool isDirectoryExistInternal(const std::string& dirPath) const;
@@ -438,7 +442,14 @@ protected:
*/
virtual std::string getFullPathForDirectoryAndFilename(const std::string& directory, const std::string& filename);
-
+ /**
+ * Returns the fullpath for a given filename.
+ * This is an alternative for fullPathForFilename, there are two main differences:
+ * First, it returns empty string instead of the original filename when no file found for the given name.
+ * Secondly, it's a const function.
+ * @param filename The file name to look up for
+ * @return The full path for the file, if not found, the return value will be an empty string
+ */
virtual std::string searchFullPathForFilename(const std::string& filename) const;
diff --git a/cocos/platform/android/CCApplication.cpp b/cocos/platform/android/CCApplication.cpp
index 9cfaf5d8a8..e3afdb9ba2 100644
--- a/cocos/platform/android/CCApplication.cpp
+++ b/cocos/platform/android/CCApplication.cpp
@@ -68,7 +68,16 @@ int Application::run()
void Application::setAnimationInterval(double interval)
{
- // NYI
+ JniMethodInfo methodInfo;
+ if (! JniHelper::getStaticMethodInfo(methodInfo, "org/cocos2dx/lib/Cocos2dxRenderer", "setAnimationInterval",
+ "(D)V"))
+ {
+ CCLOG("%s %d: error to get methodInfo", __FILE__, __LINE__);
+ }
+ else
+ {
+ methodInfo.env->CallStaticVoidMethod(methodInfo.classID, methodInfo.methodID, interval);
+ }
}
//////////////////////////////////////////////////////////////////////////
diff --git a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java
index a40d06019e..14cb7739c6 100644
--- a/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java
+++ b/cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxRenderer.java
@@ -82,31 +82,30 @@ public class Cocos2dxRenderer implements GLSurfaceView.Renderer {
@Override
public void onDrawFrame(final GL10 gl) {
/*
- * FPS controlling algorithm is not accurate, and it will slow down FPS
- * on some devices. So comment FPS controlling code.
+ * No need to use algorithm in default(60 FPS) situation,
+ * since onDrawFrame() was called by system 60 times per second by default.
*/
+ if (sAnimationInterval <= 1.0 / 60 * Cocos2dxRenderer.NANOSECONDSPERSECOND) {
+ Cocos2dxRenderer.nativeRender();
+ } else {
+ final long now = System.nanoTime();
+ final long interval = now - this.mLastTickInNanoSeconds;
- /*
- final long nowInNanoSeconds = System.nanoTime();
- final long interval = nowInNanoSeconds - this.mLastTickInNanoSeconds;
- */
-
- // should render a frame when onDrawFrame() is called or there is a
- // "ghost"
- Cocos2dxRenderer.nativeRender();
-
- /*
- // fps controlling
- if (interval < Cocos2dxRenderer.sAnimationInterval) {
- try {
- // because we render it before, so we should sleep twice time interval
- Thread.sleep((Cocos2dxRenderer.sAnimationInterval - interval) / Cocos2dxRenderer.NANOSECONDSPERMICROSECOND);
- } catch (final Exception e) {
+ if (interval < Cocos2dxRenderer.sAnimationInterval) {
+ try {
+ Thread.sleep((Cocos2dxRenderer.sAnimationInterval - interval) / Cocos2dxRenderer.NANOSECONDSPERMICROSECOND);
+ } catch (final Exception e) {
+ }
}
+ /*
+ * Render time MUST be counted in, or the FPS will slower than appointed.
+ */
+ final long renderStart = System.nanoTime();
+ Cocos2dxRenderer.nativeRender();
+ final long renderEnd = System.nanoTime();
+ final long renderInterval = renderEnd - renderStart;
+ this.mLastTickInNanoSeconds = renderEnd - renderInterval;
}
-
- this.mLastTickInNanoSeconds = nowInNanoSeconds;
- */
}
// ===========================================================
diff --git a/cocos/scripting/lua-bindings/auto/api/Image.lua b/cocos/scripting/lua-bindings/auto/api/Image.lua
index b491b70e7c..4ce6cd8d50 100644
--- a/cocos/scripting/lua-bindings/auto/api/Image.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Image.lua
@@ -16,11 +16,6 @@
-- @param #bool bool
-- @return bool#bool ret (return value: bool)
---------------------------------
--- @function [parent=#Image] getBitPerPixel
--- @param self
--- @return int#int ret (return value: int)
-
--------------------------------
-- @function [parent=#Image] hasAlpha
-- @param self
@@ -48,9 +43,9 @@
-- @return int#int ret (return value: int)
--------------------------------
--- @function [parent=#Image] isPremultipliedAlpha
+-- @function [parent=#Image] getBitPerPixel
-- @param self
--- @return bool#bool ret (return value: bool)
+-- @return int#int ret (return value: int)
--------------------------------
-- @function [parent=#Image] getFileType
@@ -67,6 +62,11 @@
-- @param self
-- @return int#int ret (return value: int)
+--------------------------------
+-- @function [parent=#Image] setPVRImagesHavePremultipliedAlpha
+-- @param self
+-- @param #bool bool
+
--------------------------------
-- @function [parent=#Image] Image
-- @param self
diff --git a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua
index 81a1947825..c7c1456291 100644
--- a/cocos/scripting/lua-bindings/auto/api/Texture2D.lua
+++ b/cocos/scripting/lua-bindings/auto/api/Texture2D.lua
@@ -150,11 +150,6 @@
-- @param self
-- @return int#int ret (return value: int)
---------------------------------
--- @function [parent=#Texture2D] PVRImagesHavePremultipliedAlpha
--- @param self
--- @param #bool bool
-
--------------------------------
-- @function [parent=#Texture2D] Texture2D
-- @param self
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
index bc2442b771..959a3237c1 100644
--- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
+++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.cpp
@@ -3500,38 +3500,6 @@ int lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat(lua_State* tolua_S)
#endif
return 0;
}
-int lua_cocos2dx_Texture2D_PVRImagesHavePremultipliedAlpha(lua_State* tolua_S)
-{
- int argc = 0;
- bool ok = true;
-
-#if COCOS2D_DEBUG >= 1
- tolua_Error tolua_err;
-#endif
-
-#if COCOS2D_DEBUG >= 1
- if (!tolua_isusertable(tolua_S,1,"cc.Texture2D",0,&tolua_err)) goto tolua_lerror;
-#endif
-
- argc = lua_gettop(tolua_S) - 1;
-
- if (argc == 1)
- {
- bool arg0;
- ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Texture2D:PVRImagesHavePremultipliedAlpha");
- if(!ok)
- return 0;
- cocos2d::Texture2D::PVRImagesHavePremultipliedAlpha(arg0);
- return 0;
- }
- CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Texture2D:PVRImagesHavePremultipliedAlpha",argc, 1);
- return 0;
-#if COCOS2D_DEBUG >= 1
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_PVRImagesHavePremultipliedAlpha'.",&tolua_err);
-#endif
- return 0;
-}
int lua_cocos2dx_Texture2D_constructor(lua_State* tolua_S)
{
int argc = 0;
@@ -3606,7 +3574,6 @@ int lua_register_cocos2dx_Texture2D(lua_State* tolua_S)
tolua_function(tolua_S,"setMaxS",lua_cocos2dx_Texture2D_setMaxS);
tolua_function(tolua_S,"setDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_setDefaultAlphaPixelFormat);
tolua_function(tolua_S,"getDefaultAlphaPixelFormat", lua_cocos2dx_Texture2D_getDefaultAlphaPixelFormat);
- tolua_function(tolua_S,"PVRImagesHavePremultipliedAlpha", lua_cocos2dx_Texture2D_PVRImagesHavePremultipliedAlpha);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::Texture2D).name();
g_luaType[typeName] = "cc.Texture2D";
@@ -44744,50 +44711,6 @@ int lua_cocos2dx_Image_saveToFile(lua_State* tolua_S)
return 0;
}
-int lua_cocos2dx_Image_getBitPerPixel(lua_State* tolua_S)
-{
- int argc = 0;
- cocos2d::Image* cobj = nullptr;
- bool ok = true;
-
-#if COCOS2D_DEBUG >= 1
- tolua_Error tolua_err;
-#endif
-
-
-#if COCOS2D_DEBUG >= 1
- if (!tolua_isusertype(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror;
-#endif
-
- cobj = (cocos2d::Image*)tolua_tousertype(tolua_S,1,0);
-
-#if COCOS2D_DEBUG >= 1
- if (!cobj)
- {
- tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getBitPerPixel'", nullptr);
- return 0;
- }
-#endif
-
- argc = lua_gettop(tolua_S)-1;
- if (argc == 0)
- {
- if(!ok)
- return 0;
- int ret = cobj->getBitPerPixel();
- tolua_pushnumber(tolua_S,(lua_Number)ret);
- return 1;
- }
- CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:getBitPerPixel",argc, 0);
- return 0;
-
-#if COCOS2D_DEBUG >= 1
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getBitPerPixel'.",&tolua_err);
-#endif
-
- return 0;
-}
int lua_cocos2dx_Image_hasAlpha(lua_State* tolua_S)
{
int argc = 0;
@@ -45011,7 +44934,7 @@ int lua_cocos2dx_Image_getWidth(lua_State* tolua_S)
return 0;
}
-int lua_cocos2dx_Image_isPremultipliedAlpha(lua_State* tolua_S)
+int lua_cocos2dx_Image_getBitPerPixel(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Image* cobj = nullptr;
@@ -45031,7 +44954,7 @@ int lua_cocos2dx_Image_isPremultipliedAlpha(lua_State* tolua_S)
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
- tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_isPremultipliedAlpha'", nullptr);
+ tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Image_getBitPerPixel'", nullptr);
return 0;
}
#endif
@@ -45041,16 +44964,16 @@ int lua_cocos2dx_Image_isPremultipliedAlpha(lua_State* tolua_S)
{
if(!ok)
return 0;
- bool ret = cobj->isPremultipliedAlpha();
- tolua_pushboolean(tolua_S,(bool)ret);
+ int ret = cobj->getBitPerPixel();
+ tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
- CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:isPremultipliedAlpha",argc, 0);
+ CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Image:getBitPerPixel",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_isPremultipliedAlpha'.",&tolua_err);
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_getBitPerPixel'.",&tolua_err);
#endif
return 0;
@@ -45187,6 +45110,38 @@ int lua_cocos2dx_Image_getRenderFormat(lua_State* tolua_S)
return 0;
}
+int lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha(lua_State* tolua_S)
+{
+ int argc = 0;
+ bool ok = true;
+
+#if COCOS2D_DEBUG >= 1
+ tolua_Error tolua_err;
+#endif
+
+#if COCOS2D_DEBUG >= 1
+ if (!tolua_isusertable(tolua_S,1,"cc.Image",0,&tolua_err)) goto tolua_lerror;
+#endif
+
+ argc = lua_gettop(tolua_S) - 1;
+
+ if (argc == 1)
+ {
+ bool arg0;
+ ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.Image:setPVRImagesHavePremultipliedAlpha");
+ if(!ok)
+ return 0;
+ cocos2d::Image::setPVRImagesHavePremultipliedAlpha(arg0);
+ return 0;
+ }
+ CCLOG("%s has wrong number of arguments: %d, was expecting %d\n ", "cc.Image:setPVRImagesHavePremultipliedAlpha",argc, 1);
+ return 0;
+#if COCOS2D_DEBUG >= 1
+ tolua_lerror:
+ tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha'.",&tolua_err);
+#endif
+ return 0;
+}
int lua_cocos2dx_Image_constructor(lua_State* tolua_S)
{
int argc = 0;
@@ -45236,16 +45191,16 @@ int lua_register_cocos2dx_Image(lua_State* tolua_S)
tolua_function(tolua_S,"new",lua_cocos2dx_Image_constructor);
tolua_function(tolua_S,"hasPremultipliedAlpha",lua_cocos2dx_Image_hasPremultipliedAlpha);
tolua_function(tolua_S,"saveToFile",lua_cocos2dx_Image_saveToFile);
- tolua_function(tolua_S,"getBitPerPixel",lua_cocos2dx_Image_getBitPerPixel);
tolua_function(tolua_S,"hasAlpha",lua_cocos2dx_Image_hasAlpha);
tolua_function(tolua_S,"isCompressed",lua_cocos2dx_Image_isCompressed);
tolua_function(tolua_S,"getHeight",lua_cocos2dx_Image_getHeight);
tolua_function(tolua_S,"initWithImageFile",lua_cocos2dx_Image_initWithImageFile);
tolua_function(tolua_S,"getWidth",lua_cocos2dx_Image_getWidth);
- tolua_function(tolua_S,"isPremultipliedAlpha",lua_cocos2dx_Image_isPremultipliedAlpha);
+ tolua_function(tolua_S,"getBitPerPixel",lua_cocos2dx_Image_getBitPerPixel);
tolua_function(tolua_S,"getFileType",lua_cocos2dx_Image_getFileType);
tolua_function(tolua_S,"getNumberOfMipmaps",lua_cocos2dx_Image_getNumberOfMipmaps);
tolua_function(tolua_S,"getRenderFormat",lua_cocos2dx_Image_getRenderFormat);
+ tolua_function(tolua_S,"setPVRImagesHavePremultipliedAlpha", lua_cocos2dx_Image_setPVRImagesHavePremultipliedAlpha);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::Image).name();
g_luaType[typeName] = "cc.Image";
diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp
index 5e6bd89644..0cff4e3b27 100644
--- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp
+++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_auto.hpp
@@ -1574,7 +1574,6 @@ int register_all_cocos2dx(lua_State* tolua_S);
-
#endif // __cocos2dx_h__
diff --git a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h
index 8c200a4bd9..0f3db745eb 100644
--- a/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h
+++ b/cocos/scripting/lua-bindings/manual/LuaBasicConversions.h
@@ -47,6 +47,7 @@ cocos2d::log(__VA_ARGS__); \
extern bool luaval_is_usertype(lua_State* L,int lo,const char* type, int def);
// to native
+extern bool luaval_to_ulong(lua_State* L,int lo, unsigned long* outValue, const char* funcName="");
extern bool luaval_to_ushort(lua_State* L, int lo, unsigned short* outValue, const char* funcName = "");
extern bool luaval_to_int32(lua_State* L,int lo,int* outValue, const char* funcName = "");
extern bool luaval_to_uint32(lua_State* L, int lo, unsigned int* outValue, const char* funcName = "");
diff --git a/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/xcshareddata/xcschemes/luabindings Mac.xcscheme b/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/xcshareddata/xcschemes/luabindings Mac.xcscheme
index 59ef8fc5d8..4aa19dbd74 100644
--- a/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/xcshareddata/xcschemes/luabindings Mac.xcscheme
+++ b/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/xcshareddata/xcschemes/luabindings Mac.xcscheme
@@ -1,6 +1,6 @@
+
+
+
+
@@ -48,6 +57,15 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
+
+
+
+
diff --git a/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/xcshareddata/xcschemes/luabindings iOS.xcscheme b/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/xcshareddata/xcschemes/luabindings iOS.xcscheme
index ca661aa036..d9f900f7bb 100644
--- a/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/xcshareddata/xcschemes/luabindings iOS.xcscheme
+++ b/cocos/scripting/lua-bindings/proj.ios_mac/cocos2d_lua_bindings.xcodeproj/xcshareddata/xcschemes/luabindings iOS.xcscheme
@@ -1,6 +1,6 @@
+
+
+
+
@@ -48,6 +57,15 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
+
+
+
+
diff --git a/cocos/scripting/lua-bindings/proj.win32/liblua.vcxproj b/cocos/scripting/lua-bindings/proj.win32/liblua.vcxproj
index 8afd7fae0a..17d4be7a0a 100644
--- a/cocos/scripting/lua-bindings/proj.win32/liblua.vcxproj
+++ b/cocos/scripting/lua-bindings/proj.win32/liblua.vcxproj
@@ -134,6 +134,11 @@
+
+
+ {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
+
+
{DDC3E27F-004D-4DD4-9DD3-931A013D2159}
liblua
diff --git a/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj b/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj
deleted file mode 100644
index 2f37b0f0fd..0000000000
--- a/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
-
- Debug
- Win32
-
-
- Release
- Win32
-
-
-
-
-
-
-
-
-
- {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}
- libLocalStorage
-
-
-
- StaticLibrary
- true
- v100
- v110
- v110_xp
- v120
- v120_xp
- Unicode
-
-
- StaticLibrary
- false
- v100
- v110
- v110_xp
- v120
- v120_xp
- true
- Unicode
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(SolutionDir)$(Configuration).win32\
- $(Configuration).win32\
-
-
- $(SolutionDir)$(Configuration).win32\
- $(Configuration).win32\
-
-
-
- Level3
- Disabled
-
-
- $(EngineRoot)external\sqlite3\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- true
- 4267;4251;4244;%(DisableSpecificWarnings)
- false
-
-
- true
-
-
-
-
- Level3
- MinSpace
- true
- true
-
-
- $(EngineRoot)external\sqlite3\include;%(AdditionalIncludeDirectories)
- WIN32;_WINDOWS;_LIB;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)
- None
- false
-
-
- true
- true
- true
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj.filters b/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj.filters
deleted file mode 100644
index b23d606b74..0000000000
--- a/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj.filters
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- {0310200c-b520-4f77-85f6-46f568b10f4d}
-
-
- {69cfa37c-4b20-409e-ad74-a26314878d8a}
-
-
-
-
- Source Files
-
-
-
-
- Header Files
-
-
-
\ No newline at end of file
diff --git a/cocos/ui/UIWidget.cpp b/cocos/ui/UIWidget.cpp
index f16248a3b8..6de3360581 100644
--- a/cocos/ui/UIWidget.cpp
+++ b/cocos/ui/UIWidget.cpp
@@ -717,6 +717,7 @@ void Widget::onTouchCancelled(Touch *touch, Event *unusedEvent)
void Widget::pushDownEvent()
{
+ this->retain();
if (_touchEventCallback) {
_touchEventCallback(this, TouchEventType::BEGAN);
}
@@ -725,10 +726,12 @@ void Widget::pushDownEvent()
{
(_touchEventListener->*_touchEventSelector)(this,TOUCH_EVENT_BEGAN);
}
+ this->release();
}
void Widget::moveEvent()
{
+ this->retain();
if (_touchEventCallback) {
_touchEventCallback(this, TouchEventType::MOVED);
}
@@ -737,11 +740,12 @@ void Widget::moveEvent()
{
(_touchEventListener->*_touchEventSelector)(this,TOUCH_EVENT_MOVED);
}
+ this->release();
}
void Widget::releaseUpEvent()
{
-
+ this->retain();
if (_touchEventCallback) {
_touchEventCallback(this, TouchEventType::ENDED);
}
@@ -750,10 +754,12 @@ void Widget::releaseUpEvent()
{
(_touchEventListener->*_touchEventSelector)(this,TOUCH_EVENT_ENDED);
}
+ this->release();
}
void Widget::cancelUpEvent()
{
+ this->retain();
if (_touchEventCallback)
{
_touchEventCallback(this, TouchEventType::CANCELED);
@@ -763,7 +769,7 @@ void Widget::cancelUpEvent()
{
(_touchEventListener->*_touchEventSelector)(this,TOUCH_EVENT_CANCELED);
}
-
+ this->release();
}
void Widget::addTouchEventListener(Ref *target, SEL_TouchEvent selector)
diff --git a/cocos/ui/proj.win32/libGUI.vcxproj.user b/cocos/ui/proj.win32/libGUI.vcxproj.user
deleted file mode 100644
index a375ae3527..0000000000
--- a/cocos/ui/proj.win32/libGUI.vcxproj.user
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/cocos/ui/proj.win32/libGUI.vcxproj b/cocos/ui/proj.win32/libui.vcxproj
similarity index 95%
rename from cocos/ui/proj.win32/libGUI.vcxproj
rename to cocos/ui/proj.win32/libui.vcxproj
index 969aa1ed5c..689fcf70d2 100644
--- a/cocos/ui/proj.win32/libGUI.vcxproj
+++ b/cocos/ui/proj.win32/libui.vcxproj
@@ -64,16 +64,17 @@
-
+
{21b2c324-891f-48ea-ad1a-5ae13de12e28}
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
{7E06E92C-537A-442B-9E4A-4761C84F8A1A}
- libGUI
+ libui
+ libui
@@ -133,7 +134,7 @@
true
$(OutDir);%(AdditionalLibraryDirectories)
- libcocos2d.lib;opengl32.lib;glew32.lib;libExtensions.lib;%(AdditionalDependencies)
+ opengl32.lib;glew32.lib;%(AdditionalDependencies)
@@ -154,7 +155,7 @@
true
true
$(OutDir);%(AdditionalLibraryDirectories)
- libcocos2d.lib;opengl32.lib;glew32.lib;libExtensions.lib;%(AdditionalDependencies)
+ opengl32.lib;glew32.lib;%(AdditionalDependencies)
diff --git a/cocos/ui/proj.win32/libGUI.vcxproj.filters b/cocos/ui/proj.win32/libui.vcxproj.filters
similarity index 100%
rename from cocos/ui/proj.win32/libGUI.vcxproj.filters
rename to cocos/ui/proj.win32/libui.vcxproj.filters
diff --git a/cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj.user b/cocos/ui/proj.win32/libui.vcxproj.user
similarity index 100%
rename from cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj.user
rename to cocos/ui/proj.win32/libui.vcxproj.user
diff --git a/extensions/proj.win32/libExtensions.vcxproj b/extensions/proj.win32/libextension.vcxproj
similarity index 97%
rename from extensions/proj.win32/libExtensions.vcxproj
rename to extensions/proj.win32/libextension.vcxproj
index dc1a283282..ba58ce11f1 100644
--- a/extensions/proj.win32/libExtensions.vcxproj
+++ b/extensions/proj.win32/libextension.vcxproj
@@ -12,8 +12,9 @@
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}
- Extensions.win32
+ libextension.win32
Win32Proj
+ libextension
@@ -162,12 +163,9 @@
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
-
- {929480e7-23c0-4df6-8456-096d71547116}
-
diff --git a/extensions/proj.win32/libExtensions.vcxproj.filters b/extensions/proj.win32/libextension.vcxproj.filters
similarity index 100%
rename from extensions/proj.win32/libExtensions.vcxproj.filters
rename to extensions/proj.win32/libextension.vcxproj.filters
diff --git a/extensions/proj.win32/libExtensions.vcxproj.user b/extensions/proj.win32/libextension.vcxproj.user
similarity index 100%
rename from extensions/proj.win32/libExtensions.vcxproj.user
rename to extensions/proj.win32/libextension.vcxproj.user
diff --git a/external/Box2D/proj.win32/Box2D.vcxproj b/external/Box2D/proj.win32/libbox2d.vcxproj
similarity index 99%
rename from external/Box2D/proj.win32/Box2D.vcxproj
rename to external/Box2D/proj.win32/libbox2d.vcxproj
index 8193b38dff..188b960501 100644
--- a/external/Box2D/proj.win32/Box2D.vcxproj
+++ b/external/Box2D/proj.win32/libbox2d.vcxproj
@@ -11,9 +11,9 @@
- libBox2D
+ libbox2d
{929480E7-23C0-4DF6-8456-096D71547116}
- Box2D.win32
+ libbox2d.win32
Win32Proj
diff --git a/external/Box2D/proj.win32/Box2D.vcxproj.filters b/external/Box2D/proj.win32/libbox2d.vcxproj.filters
similarity index 100%
rename from external/Box2D/proj.win32/Box2D.vcxproj.filters
rename to external/Box2D/proj.win32/libbox2d.vcxproj.filters
diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json
index 2b3e3a1eae..9c26b3c877 100644
--- a/templates/cocos2dx_files.json
+++ b/templates/cocos2dx_files.json
@@ -181,8 +181,6 @@
"cocos/2d/CCTweenFunction.h",
"cocos/2d/CMakeLists.txt",
"cocos/2d/cocos2d.def",
- "cocos/2d/cocos2d.vcxproj",
- "cocos/2d/cocos2d.vcxproj.filters",
"cocos/2d/cocos2d_headers.props",
"cocos/2d/cocos2d_winrt.props",
"cocos/2d/cocos2d_winrt.vcxproj",
@@ -192,6 +190,8 @@
"cocos/2d/cocos2d_wp8.vcxproj.filters",
"cocos/2d/cocos2d_wp8_headers.props",
"cocos/2d/cocos2dx.props",
+ "cocos/2d/libcocos2d.vcxproj",
+ "cocos/2d/libcocos2d.vcxproj.filters",
"cocos/3d/CCAnimate3D.cpp",
"cocos/3d/CCAnimate3D.h",
"cocos/3d/CCAnimation3D.cpp",
@@ -254,9 +254,9 @@
"cocos/audio/openal/OpenALDecoder.cpp",
"cocos/audio/openal/OpenALDecoder.h",
"cocos/audio/openal/SimpleAudioEngineOpenAL.cpp",
- "cocos/audio/proj.win32/CocosDenshion.vcxproj",
- "cocos/audio/proj.win32/CocosDenshion.vcxproj.filters",
- "cocos/audio/proj.win32/CocosDenshion.vcxproj.user",
+ "cocos/audio/proj.win32/libcocosdenshion.vcxproj",
+ "cocos/audio/proj.win32/libcocosdenshion.vcxproj.filters",
+ "cocos/audio/proj.win32/libcocosdenshion.vcxproj.user",
"cocos/audio/proj.wp8/CocosDenshion.vcxproj",
"cocos/audio/proj.wp8/CocosDenshion.vcxproj.filters",
"cocos/audio/proj.wp8/CocosDenshion.vcxproj.user",
@@ -455,9 +455,9 @@
"cocos/editor-support/cocosbuilder/CCSpriteLoader.h",
"cocos/editor-support/cocosbuilder/CMakeLists.txt",
"cocos/editor-support/cocosbuilder/CocosBuilder.h",
- "cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj",
"cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj.filters",
"cocos/editor-support/cocosbuilder/proj.win32/libCocosBuilder.vcxproj.user",
+ "cocos/editor-support/cocosbuilder/proj.win32/libcocosbuilder.vcxproj",
"cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj",
"cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.filters",
"cocos/editor-support/cocosbuilder/proj.wp8/libCocosBuilder.vcxproj.user",
@@ -578,9 +578,9 @@
"cocos/editor-support/cocostudio/WidgetReader/WidgetReader.cpp",
"cocos/editor-support/cocostudio/WidgetReader/WidgetReader.h",
"cocos/editor-support/cocostudio/WidgetReader/WidgetReaderProtocol.h",
- "cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj",
- "cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.filters",
- "cocos/editor-support/cocostudio/proj.win32/libCocosStudio.vcxproj.user",
+ "cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj",
+ "cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj.filters",
+ "cocos/editor-support/cocostudio/proj.win32/libcocostudio.vcxproj.user",
"cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj",
"cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.filters",
"cocos/editor-support/cocostudio/proj.wp8/libCocosStudio.vcxproj.user",
@@ -687,9 +687,9 @@
"cocos/network/SocketIO.h",
"cocos/network/WebSocket.cpp",
"cocos/network/WebSocket.h",
- "cocos/network/proj.win32/libNetwork.vcxproj",
- "cocos/network/proj.win32/libNetwork.vcxproj.filters",
- "cocos/network/proj.win32/libNetwork.vcxproj.user",
+ "cocos/network/proj.win32/libnetwork.vcxproj",
+ "cocos/network/proj.win32/libnetwork.vcxproj.filters",
+ "cocos/network/proj.win32/libnetwork.vcxproj.user",
"cocos/network/proj.wp8/libNetwork.vcxproj",
"cocos/network/proj.wp8/libNetwork.vcxproj.filters",
"cocos/physics/CCPhysicsBody.cpp",
@@ -981,9 +981,6 @@
"cocos/storage/local-storage/LocalStorage.cpp",
"cocos/storage/local-storage/LocalStorage.h",
"cocos/storage/local-storage/LocalStorageAndroid.cpp",
- "cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj",
- "cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj.filters",
- "cocos/storage/local-storage/proj.win32/libLocalStorage.vcxproj.user",
"cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj",
"cocos/storage/local-storage/proj.wp8/libLocalStorage.vcxproj.filters",
"cocos/ui/Android.mk",
@@ -1041,9 +1038,9 @@
"cocos/ui/UIVideoPlayerIOS.mm",
"cocos/ui/UIWidget.cpp",
"cocos/ui/UIWidget.h",
- "cocos/ui/proj.win32/libGUI.vcxproj",
- "cocos/ui/proj.win32/libGUI.vcxproj.filters",
- "cocos/ui/proj.win32/libGUI.vcxproj.user",
+ "cocos/ui/proj.win32/libui.vcxproj",
+ "cocos/ui/proj.win32/libui.vcxproj.filters",
+ "cocos/ui/proj.win32/libui.vcxproj.user",
"cocos/ui/proj.wp8/libGUI.vcxproj",
"cocos/ui/proj.wp8/libGUI.vcxproj.filters",
"docs/CODING_STYLE.md",
@@ -1111,9 +1108,9 @@
"extensions/physics-nodes/CCPhysicsSprite.h",
"extensions/proj.win32/Win32InputBox.cpp",
"extensions/proj.win32/Win32InputBox.h",
- "extensions/proj.win32/libExtensions.vcxproj",
- "extensions/proj.win32/libExtensions.vcxproj.filters",
- "extensions/proj.win32/libExtensions.vcxproj.user",
+ "extensions/proj.win32/libextension.vcxproj",
+ "extensions/proj.win32/libextension.vcxproj.filters",
+ "extensions/proj.win32/libextension.vcxproj.user",
"extensions/proj.wp8/libExtensions.vcxproj",
"extensions/proj.wp8/libExtensions.vcxproj.filters",
"extensions/proj.wp8/pch.cpp",
@@ -1213,8 +1210,8 @@
"external/Box2D/Dynamics/b2WorldCallbacks.h",
"external/Box2D/Rope/b2Rope.cpp",
"external/Box2D/Rope/b2Rope.h",
- "external/Box2D/proj.win32/Box2D.vcxproj",
- "external/Box2D/proj.win32/Box2D.vcxproj.filters",
+ "external/Box2D/proj.win32/libbox2d.vcxproj",
+ "external/Box2D/proj.win32/libbox2d.vcxproj.filters",
"external/Box2D/proj.wp8/Box2D.vcxproj",
"external/Box2D/proj.wp8/Box2D.vcxproj.filters",
"external/ConvertUTF/ConvertUTF.c",
diff --git a/templates/lua-template-default/src/main.lua b/templates/lua-template-default/src/main.lua
index b33be1cbca..4b1e4d37c6 100644
--- a/templates/lua-template-default/src/main.lua
+++ b/templates/lua-template-default/src/main.lua
@@ -58,7 +58,7 @@ local function main()
local origin = cc.Director:getInstance():getVisibleOrigin()
-- add the moving dog
- local function creatDog()
+ local function createDog()
local frameWidth = 105
local frameHeight = 95
@@ -130,7 +130,7 @@ local function main()
end
-- add moving dog
- local spriteDog = creatDog()
+ local spriteDog = createDog()
layerFarm:addChild(spriteDog)
-- handing touch events
diff --git a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj
index 87410d9263..cb5221ad76 100644
--- a/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj
+++ b/tests/cpp-empty-test/proj.win32/cpp-empty-test.vcxproj
@@ -89,7 +89,7 @@
true
Windows
MachineX86
- libcocos2d.lib;libchipmunk.lib;%(AdditionalDependencies)
+ %(AdditionalDependencies)
@@ -111,7 +111,7 @@
4267;4251;4244;%(DisableSpecificWarnings)
- libcocos2d.lib;%(AdditionalDependencies)
+ %(AdditionalDependencies)
$(OutDir)$(ProjectName).exe
$(OutDir);%(AdditionalLibraryDirectories)
true
@@ -137,9 +137,8 @@
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
- false
{207bc7a9-ccf1-4f2f-a04d-45f72242ae25}
diff --git a/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp b/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp
index 5f3beb9d31..b12946a99c 100644
--- a/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp
+++ b/tests/cpp-tests/Classes/ParticleTest/ParticleTest.cpp
@@ -1012,13 +1012,14 @@ Layer* createParticleLayer(int nIndex)
case 46: return new Issue3990();
case 47: return new ParticleAutoBatching();
case 48: return new ParticleVisibleTest();
+ case 49: return new ParticleResetTotalParticles();
default:
break;
}
return nullptr;
}
-#define MAX_LAYER 49
+#define MAX_LAYER 50
Layer* nextParticleAction()
@@ -2005,6 +2006,52 @@ std::string ParticleAutoBatching::subtitle() const
return "All 10 particles should be drawin in one batch";
}
+
+//
+// ParticleResetTotalParticles
+//
+void ParticleResetTotalParticles::onEnter()
+{
+ ParticleDemo::onEnter();
+
+ _color->setColor(Color3B::BLACK);
+ removeChild(_background, true);
+ _background = nullptr;
+
+ auto p = ParticleFire::createWithTotalParticles(10);
+ this->addChild(p);
+
+ auto add = MenuItemFont::create("add 10 particles",
+ [p](Ref*)->void
+ {
+ p->setTotalParticles(p->getTotalParticles() + 10 );
+ });
+ add->setPosition(Vec2(0, 25));
+ auto remove = MenuItemFont::create("remove 10 particles",
+ [p](Ref*)->void
+ {
+ int count = p->getTotalParticles() - 10;
+ if (count < 0) { count = 0; }
+ p->setTotalParticles(count);
+ });
+ remove->setPosition(Vec2(0, -25));
+
+ auto menu = Menu::create(add, remove, nullptr);
+ menu->setPosition(Vec2(VisibleRect::center()));
+ this->addChild(menu);
+
+}
+
+std::string ParticleResetTotalParticles::title() const
+{
+ return "reset total particles";
+}
+
+std::string ParticleResetTotalParticles::subtitle() const
+{
+ return "it should work as well";
+}
+
//
// main
//
diff --git a/tests/cpp-tests/Classes/ParticleTest/ParticleTest.h b/tests/cpp-tests/Classes/ParticleTest/ParticleTest.h
index ba3adb9058..c18d00be62 100644
--- a/tests/cpp-tests/Classes/ParticleTest/ParticleTest.h
+++ b/tests/cpp-tests/Classes/ParticleTest/ParticleTest.h
@@ -328,4 +328,12 @@ public:
virtual std::string subtitle() const override;
};
+class ParticleResetTotalParticles : public ParticleDemo
+{
+public:
+ virtual void onEnter() override;
+ virtual std::string title() const override;
+ virtual std::string subtitle() const override;
+};
+
#endif
diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp
index 04e6c0eead..0868b2f6a9 100644
--- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp
+++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp
@@ -51,7 +51,7 @@ g_guisTests[] =
UISceneManager* sceneManager = UISceneManager::sharedUISceneManager();
sceneManager->setCurrentUISceneId(kUIButtonTest);
sceneManager->setMinUISceneId(kUIButtonTest);
- sceneManager->setMaxUISceneId(kUIButtonTest_Title);
+ sceneManager->setMaxUISceneId(kUIButtonTest_RemoveSelf);
Scene* scene = sceneManager->currentUIScene();
Director::getInstance()->replaceScene(scene);
}
diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp
index 35c713551b..8b8e7959dd 100644
--- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp
+++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp
@@ -344,3 +344,80 @@ void UIButtonTest_Title::touchEvent(Ref *pSender, Widget::TouchEventType type)
break;
}
}
+
+
+// UIButtonTest_RemoveSelf
+UIButtonTestRemoveSelf::UIButtonTestRemoveSelf()
+: _displayValueLabel(nullptr)
+{
+
+}
+
+UIButtonTestRemoveSelf::~UIButtonTestRemoveSelf()
+{
+}
+
+bool UIButtonTestRemoveSelf::init()
+{
+ if (UIScene::init())
+ {
+ Size widgetSize = _widget->getContentSize();
+
+ // Add a label in which the button events will be displayed
+ _displayValueLabel = Text::create("No Event", "fonts/Marker Felt.ttf",32);
+ _displayValueLabel->setAnchorPoint(Vec2(0.5f, -1.0f));
+ _displayValueLabel->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f));
+ _uiLayer->addChild(_displayValueLabel);
+
+ // Add the alert
+ Text* alert = Text::create("Remove Self in the Button's Callback shouldn't cause crash!","fonts/Marker Felt.ttf",10);
+ alert->setColor(Color3B(159, 168, 176));
+
+ alert->setPosition(Vec2(widgetSize.width / 2.0f,
+ widgetSize.height / 2.0f - alert->getContentSize().height * 2.75f));
+
+ _uiLayer->addChild(alert);
+
+ // Create the button
+ Button* button = Button::create("cocosui/animationbuttonnormal.png",
+ "cocosui/animationbuttonpressed.png");
+ button->setPosition(Vec2(widgetSize.width / 2.0f, widgetSize.height / 2.0f));
+ // button->addTouchEventListener(this, toucheventselector(UIButtonTest::touchEvent));
+ button->addTouchEventListener(CC_CALLBACK_2(UIButtonTestRemoveSelf::touchEvent, this));
+ _uiLayer->addChild(button);
+
+
+
+ return true;
+ }
+ return false;
+}
+
+void UIButtonTestRemoveSelf::touchEvent(Ref *pSender, Widget::TouchEventType type)
+{
+ switch (type)
+ {
+ case Widget::TouchEventType::BEGAN:
+ _displayValueLabel->setString(String::createWithFormat("Touch Down")->getCString());
+ break;
+
+ case Widget::TouchEventType::MOVED:
+ _displayValueLabel->setString(String::createWithFormat("Touch Move")->getCString());
+ break;
+
+ case Widget::TouchEventType::ENDED:
+ {
+ _displayValueLabel->setString(String::createWithFormat("Touch Up")->getCString());
+
+ _uiLayer->removeFromParentAndCleanup(true);
+ }
+ break;
+
+ case Widget::TouchEventType::CANCELED:
+ _displayValueLabel->setString(String::createWithFormat("Touch Cancelled")->getCString());
+ break;
+
+ default:
+ break;
+ }
+}
diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h
index 0cf2f01c8f..48031ba3b3 100644
--- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h
+++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.h
@@ -79,4 +79,17 @@ protected:
Text* _displayValueLabel;
};
+class UIButtonTestRemoveSelf : public UIScene
+{
+public:
+ UIButtonTestRemoveSelf();
+ ~UIButtonTestRemoveSelf();
+ bool init();
+ void touchEvent(Ref *pSender, Widget::TouchEventType type);
+
+protected:
+ UI_SCENE_CREATE_FUNC(UIButtonTestRemoveSelf)
+ Text* _displayValueLabel;
+};
+
#endif /* defined(__TestCpp__UIButtonTest__) */
diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp
index 444a95c75b..05b505b6cd 100644
--- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp
+++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.cpp
@@ -45,6 +45,7 @@ static const char* s_testArray[] =
"UIButtonTest_Scale9",
"UIButtonTest_PressedAction",
"UIButtonTest_Title",
+ "UIButtonTest_RemoveSelf",
"UICheckBoxTest",
"UISliderTest",
"UISliderTest_Scale9",
@@ -191,7 +192,8 @@ Scene *UISceneManager::currentUIScene()
case kUIButtonTest_Title:
return UIButtonTest_Title::sceneWithTitle(s_testArray[_currentUISceneId]);
-
+ case kUIButtonTest_RemoveSelf:
+ return UIButtonTestRemoveSelf::sceneWithTitle(s_testArray[_currentUISceneId]);
case kUICheckBoxTest:
return UICheckBoxTest::sceneWithTitle(s_testArray[_currentUISceneId]);
diff --git a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h
index ccda1e8905..bbdf68dec1 100644
--- a/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h
+++ b/tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UISceneManager.h
@@ -35,6 +35,7 @@ enum
kUIButtonTest_Scale9,
kUIButtonTest_PressedAction,
kUIButtonTest_Title,
+ kUIButtonTest_RemoveSelf,
kUICheckBoxTest,
kUISliderTest,
kUISliderTest_Scale9,
diff --git a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj
index 14520e39ae..3fe5678a28 100644
--- a/tests/cpp-tests/proj.win32/cpp-tests.vcxproj
+++ b/tests/cpp-tests/proj.win32/cpp-tests.vcxproj
@@ -90,7 +90,7 @@
true
Windows
MachineX86
- libcurl_imp.lib;websockets.lib;libcocos2d.lib;libExtensions.lib;libAudio.lib;libGUI.lib;libCocosStudio.lib;opengl32.lib;glew32.lib;libBox2d.lib;libchipmunk.lib;%(AdditionalDependencies)
+ libcurl_imp.lib;websockets.lib;opengl32.lib;glew32.lib;%(AdditionalDependencies)
@@ -118,7 +118,7 @@
false
- libcurl_imp.lib;websockets.lib;libcocos2d.lib;libExtensions.lib;libAudio.lib;libGUI.lib;libCocosStudio.lib;opengl32.lib;glew32.lib;libBox2d.lib;libchipmunk.lib;%(AdditionalDependencies)
+ libcurl_imp.lib;websockets.lib;opengl32.lib;glew32.lib;%(AdditionalDependencies)
$(OutDir)$(ProjectName).exe
$(OutDir);%(AdditionalLibraryDirectories)
false
@@ -558,36 +558,32 @@
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
- false
-
+
{f8edd7fa-9a51-4e80-baeb-860825d2eac6}
- false
-
+
{811c0dab-7b96-4bd3-a154-b7572b58e4ab}
-
+
{b57cf53f-2e49-4031-9822-047cc0e6bde2}
-
+
{b7c2a162-dec9-4418-972e-240ab3cbfcae}
-
- {7e06e92c-537a-442b-9e4a-4761c84f8a1a}
-
{df2638c0-8128-4847-867c-6eafe3dee7b5}
-
- {21b2c324-891f-48ea-ad1a-5ae13de12e28}
- false
+
+ {7e06e92c-537a-442b-9e4a-4761c84f8a1a}
-
+
+ {21b2c324-891f-48ea-ad1a-5ae13de12e28}
+
+
{929480e7-23c0-4df6-8456-096d71547116}
- false
{207bc7a9-ccf1-4f2f-a04d-45f72242ae25}
diff --git a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj
index b6b87c3e0f..234a4bee40 100644
--- a/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj
+++ b/tests/lua-empty-test/project/proj.win32/lua-empty-test.vcxproj
@@ -175,31 +175,31 @@ xcopy "$(ProjectDir)..\..\..\..\external\lua\luasocket\*.lua" "$(ProjectDir)..\.
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
-
+
{f8edd7fa-9a51-4e80-baeb-860825d2eac6}
-
+
{811c0dab-7b96-4bd3-a154-b7572b58e4ab}
-
+
{b57cf53f-2e49-4031-9822-047cc0e6bde2}
-
+
{b7c2a162-dec9-4418-972e-240ab3cbfcae}
{ddc3e27f-004d-4dd4-9dd3-931a013d2159}
-
- {7e06e92c-537a-442b-9e4a-4761c84f8a1a}
-
{df2638c0-8128-4847-867c-6eafe3dee7b5}
-
+
+ {7e06e92c-537a-442b-9e4a-4761c84f8a1a}
+
+
{21b2c324-891f-48ea-ad1a-5ae13de12e28}
diff --git a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj
index e094ca0c26..0e3fb6f8e3 100644
--- a/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj
+++ b/tests/lua-tests/project/proj.win32/lua-tests.win32.vcxproj
@@ -178,31 +178,31 @@ xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)"
-
- {ddc3e27f-004d-4dd4-9dd3-931a013d2159}
-
-
+
{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}
-
+
{f8edd7fa-9a51-4e80-baeb-860825d2eac6}
-
+
{811c0dab-7b96-4bd3-a154-b7572b58e4ab}
-
+
{b57cf53f-2e49-4031-9822-047cc0e6bde2}
-
+
{b7c2a162-dec9-4418-972e-240ab3cbfcae}
-
- {7e06e92c-537a-442b-9e4a-4761c84f8a1a}
+
+ {ddc3e27f-004d-4dd4-9dd3-931a013d2159}
{df2638c0-8128-4847-867c-6eafe3dee7b5}
-
+
+ {7e06e92c-537a-442b-9e4a-4761c84f8a1a}
+
+
{21b2c324-891f-48ea-ad1a-5ae13de12e28}