Skip to content

fix RotateTo animation when angle is bigger than 360 #20009

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2019
Merged

fix RotateTo animation when angle is bigger than 360 #20009

merged 1 commit into from
Aug 5, 2019

Conversation

dzj0821
Copy link

@dzj0821 dzj0821 commented Aug 2, 2019

sprite->runAction(RotateTo::create(1, 720));

Sprite rotate 720 degrees should be unchanged, but the sprite rotated 360 degrees.

@minggo minggo added this to the next milestone Aug 5, 2019
@minggo minggo merged commit c840544 into cocos2d:v3 Aug 5, 2019
@dzj0821 dzj0821 deleted the patch-4 branch August 5, 2019 03:16
minggo pushed a commit to minggo/cocos2d-x that referenced this pull request Oct 16, 2019
@sonyps5201314
Copy link

sonyps5201314 commented Oct 26, 2019

	local angle = rotateParam[idx].angle + 360 * 5
	local act = cc.RotateTo:create(10, angle)
	local easeRotate = cc.EaseCircleActionOut:create(act)
		local call = cc.CallFunc:create(function( )
		print("rotate over")
	end)
	local seq = cc.Sequence:create(easeRotate, call)
	self.m_spTable:stopAllActions()
	self.m_spTable:runAction(seq)

中文:这是一个错误的提交,这样改了之后就不能用类似上面的代码来做转盘游戏了,本来是需要转很多圈的,这样改了只能转一圈内了,官方麻烦你们不要别人提交什么都想当然的信任别人的代码了,麻烦你们能不能多测试下再合并进去这些可能带来灾难性后果的代码,不要想当然,否则这些合并是不负责任,顾此失彼的。类似的案例还有#20182,如果没有用户使用你们的git版本来开发测试,这些问题将永久存在并被掩盖。
English:Submit this was a mistake, after this change will not be able to use similar to the above code for rotary table games, is originally need to turn a lot of laps, such change can only turn a circle, the official trouble you don't submit anything others for granted the trust of other people's code, can't you be more trouble under test to merge into the code may have disastrous consequences, don't take it for granted, otherwise the merge is irresponsible, attend.In a similar case #20182, if no user USES your git version to develop tests, these problems will persist and be covered up.

@dzj0821
Copy link
Author

dzj0821 commented Oct 27, 2019

	local angle = rotateParam[idx].angle + 360 * 5
	local act = cc.RotateTo:create(10, angle)
	local easeRotate = cc.EaseCircleActionOut:create(act)
		local call = cc.CallFunc:create(function( )
		print("rotate over")
	end)
	local seq = cc.Sequence:create(easeRotate, call)
	self.m_spTable:stopAllActions()
	self.m_spTable:runAction(seq)

中文:这是一个错误的提交,这样改了之后就不能用类似上面的代码来做转盘游戏了,本来是需要转很多圈的,这样改了只能转一圈内了,官方麻烦你们不要别人提交什么都想当然的信任别人的代码了,麻烦你们能不能多测试下再合并进去这些可能带来灾难性后果的代码,不要想当然,否则这些合并是不负责任,顾此失彼的。类似的案例还有#20182,如果没有用户使用你们的git版本来开发测试,这些问题将永久存在并被掩盖。
English:Submit this was a mistake, after this change will not be able to use similar to the above code for rotary table games, is originally need to turn a lot of laps, such change can only turn a circle, the official trouble you don't submit anything others for granted the trust of other people's code, can't you be more trouble under test to merge into the code may have disastrous consequences, don't take it for granted, otherwise the merge is irresponsible, attend.In a similar case #20182, if no user USES your git version to develop tests, these problems will persist and be covered up.

中文:从语义上来看,RotateTo代表旋转至某状态,30度的状态和390度的状态本来就是一样的,不旋转我觉得没有问题,既然要固定旋转360度为什么不用RotateBy呢?
English: When the node rotates 30 degrees, it is the same as when it rotates 390 degrees. I don't think there is any problem. Why don't use RotateBy when you have to rotate 360 degrees?

@sonyps5201314
Copy link

sonyps5201314 commented Oct 27, 2019

一句话就是,你这个修改破坏了API兼容性,让成千上万的老cocos游戏代码可能因为升级cocos引擎而面临兼容性问题,cocos本身之前的版本就版本兼容性做得比较差了,一直为用户所诟病而不敢轻易升级,你这样做就是锦上添花了。另外从文档角度研究,https://cocos2d-x.org/reference/native-cpp/V3.0alpha0/d0/d71/classcocos2d_1_1_rotate_to.htmlhttps://cocos2d-x.org/reference/native-cpp/V3.0rc0/d0/d28/classcocos2d_1_1_rotate_by.html ,RotateTo是旋转到多少度,参数是叫dstAngle 终点角度,强调的是最终,是从0度开始的旋转;而RotateBy 是通过多少度来旋转,参数是叫deltaAngle 变化角度,强调的是变化,是从当前角度开始的再次相对旋转,所以两者用处是不同的,另外看官方文档也没有说明限制必须是360度以内的角度,像你这么说旋转360度就相当于没有旋转了,那361的广告也不用打了,直接改名叫1度算了。另外你这个修改可能解决了你遇到的问题,你其实可以修改你自己的游戏代码来解决的,但是你选择修改了引擎代码,你修改了引擎代码你自己用还好,但是一提交就可能会让大家的代码面临问题,所以还是请谨慎提交,官方也请谨慎对待第三方提交的代码,防止引入新的BUG,或者代码污染,力求稳定性第一,任何没有大面积测试的代码合并,都是不可靠的。国外的大部分开源项目,对第三方提交的代码就很谨慎,甚至不理睬,没有充分论证及实验可靠性不会去合并,说实话cocos是我见到对合并代码管理最松懈的,所以经常因为升级版本而引入新的BUG,这样子用户就会更加怕升级新版本了,适得其反,所以还是请官方谨慎考虑吧。git版本不能用于生产环境,不是理由,你看谷歌的代码项目,如angle基本上都是直接使用的最新git版本作为发布的,版本名字都是git 提交hash值。
我自己的软件也是全是使用各个开源软件的git版本作为开发,都没因为是因为使用的git版本而出现问题,但是cocos就是个例外,我也不是第一次向你们反馈问题了。之前3.17.1发布之前也反应及吐槽过几次,后面一段时间因为怕了,心有余悸了,所以一直不敢升级,后面看到3.17.2发布了所以还是想找个时间升级下结果一升级就发现#20182反馈的同样问题,于是找到作者,请他上来修正了。请官方考虑下我的建议吧,代码质量及稳定性真的很重要,要是在商业公司上班因为这些出问题,可能就会挨骂了,压力真的好大。谢谢。
Translated by google:
In a word, your modification has broken the API compatibility, and thousands of old cocos game code may face compatibility problems due to the upgrade of the cocos engine. The previous versions of cocos itself have done a relatively poor version compatibility. If you are criticized by users and don't dare to upgrade easily, you will be icing on the cake. Also from a documentation perspective, https://cocos2d-x.org/reference/native-cpp/V3.0alpha0/d0/d71/classcocos2d_1_1_rotate_to.html , https://cocos2d-x.org/reference/native-cpp/ V3.0rc0/d0/d28/classcocos2d_1_1_rotate_by.html, RotateTo is the degree of rotation, the parameter is called dstAngle end angle, the emphasis is the final rotation from 0 degrees; and RotateBy is rotated by how many degrees, the parameter is Called deltaAngle change angle, emphasizes the change, is the relative rotation from the current angle, so the use of the two is different, and the official document does not indicate that the limit must be within 360 degrees, as you say 360 The degree is equivalent to no rotation, and the 361 advertisement does not need to be played, and the name is directly changed to 1 degree. In addition, your modification may solve the problem you encountered, you can actually modify your own game code to solve, but you choose to modify the engine code, you modify the engine code you use, but a commit may Will make everyone's code face problems, so please be cautious to submit, the official also please be cautious about the third-party submitted code to prevent the introduction of new bugs, or code pollution, and strive for stability first, any code that does not have large-area test merge, They are all unreliable. Most foreign open source projects are cautious about the code submitted by third parties, and even ignore it. Without sufficient argumentation and experimental reliability, they will not be merged. To be honest, cocos is the most lax I have seen in the management of merged code, so often Because the upgrade version introduces a new bug, so sub-users will be more afraid to upgrade the new version, which is counterproductive, so please ask the official to consider it. The git version can't be used in a production environment, it's not a reason. You see Google's code project, such as angle, which is basically the latest git version that is used directly, and the version name is git to submit the hash value.
My own software is also using the git version of each open source software as a development, not because of the problem with the git version, but cocos is an exception, I am not the first time to give you feedback. Before the release of 3.17.1, I also reacted and spit a few times before. I was afraid of it for a while, but I was afraid to upgrade. I saw that 3.17.2 was released later, so I still want to find a time to upgrade the results. I found the same problem with #20182 feedback, so I found the author and asked him to fix it. Please consider my suggestion, the quality and stability of the code is really important. If you go to work in a commercial company because of these problems, you may be embarrassed, and the pressure is really great. Thank you.

@dzj0821
Copy link
Author

dzj0821 commented Oct 27, 2019

一句话就是,你这个修改破坏了API兼容性,让成千上万的老cocos游戏代码可能因为升级cocos引擎而面临兼容性问题,cocos本身之前的版本就版本兼容性做得比较差了,一直为用户所诟病而不敢轻易升级,你这样做就是锦上添花了。另外从文档角度研究,https://cocos2d-x.org/reference/native-cpp/V3.0alpha0/d0/d71/classcocos2d_1_1_rotate_to.htmlhttps://cocos2d-x.org/reference/native-cpp/V3.0rc0/d0/d28/classcocos2d_1_1_rotate_by.html ,RotateTo是旋转到多少度,参数是叫dstAngle 终点角度,强调的是最终,是从0度开始的旋转;而RotateBy 是通过多少度来旋转,参数是叫deltaAngle 变化角度,强调的是变化,是从当前角度开始的再次相对旋转,所以两者用处是不同的,另外看官方文档也没有说明限制必须是360度以内的角度,像你这么说旋转360度就相当于没有旋转了,那361的广告也不用打了,直接改名叫1度算了。另外你这个修改可能解决了你遇到的问题,你其实可以修改你自己的游戏代码来解决的,但是你选择修改了引擎代码,你修改了引擎代码你自己用还好,但是一提交就可能会让大家的代码面临问题,所以还是请谨慎提交,官方也请谨慎对待第三方提交的代码,防止引入新的BUG,或者代码污染,力求稳定性第一,任何没有大面积测试的代码合并,都是不可靠的。国外的大部分开源项目,对第三方提交的代码就很谨慎,甚至不理睬,没有充分论证及实验可靠性不会去合并,说实话cocos是我见到对合并代码管理最松懈的,所以经常因为升级版本而引入新的BUG,这样子用户就会更加怕升级新版本了,适得其反,所以还是请官方谨慎考虑吧。git版本不能用于生产环境,不是理由,你看谷歌的代码项目,如angle基本上都是直接使用的最新git版本作为发布的,版本名字都是git 提交hash值。
我自己的软件也是全是使用各个开源软件的git版本作为开发,都没因为是因为使用的git版本而出现问题,但是cocos就是个例外,我也不是第一次向你们反馈问题了。之前3.17.1发布之前也反应及吐槽过几次,后面一段时间因为怕了,心有余悸了,所以一直不敢升级,后面看到3.17.2发布了所以还是想找个时间升级下结果一升级就发现#20182反馈的同样问题,于是找到作者,请他上来修正了。请官方考虑下我的建议吧,代码质量及稳定性真的很重要,要是在商业公司上班因为这些出问题,可能就会挨骂了,压力真的好大。谢谢。
Translated by google:
In a word, your modification has broken the API compatibility, and thousands of old cocos game code may face compatibility problems due to the upgrade of the cocos engine. The previous versions of cocos itself have done a relatively poor version compatibility. If you are criticized by users and don't dare to upgrade easily, you will be icing on the cake. Also from a documentation perspective, https://cocos2d-x.org/reference/native-cpp/V3.0alpha0/d0/d71/classcocos2d_1_1_rotate_to.html , https://cocos2d-x.org/reference/native-cpp/ V3.0rc0/d0/d28/classcocos2d_1_1_rotate_by.html, RotateTo is the degree of rotation, the parameter is called dstAngle end angle, the emphasis is the final rotation from 0 degrees; and RotateBy is rotated by how many degrees, the parameter is Called deltaAngle change angle, emphasizes the change, is the relative rotation from the current angle, so the use of the two is different, and the official document does not indicate that the limit must be within 360 degrees, as you say 360 The degree is equivalent to no rotation, and the 361 advertisement does not need to be played, and the name is directly changed to 1 degree. In addition, your modification may solve the problem you encountered, you can actually modify your own game code to solve, but you choose to modify the engine code, you modify the engine code you use, but a commit may Will make everyone's code face problems, so please be cautious to submit, the official also please be cautious about the third-party submitted code to prevent the introduction of new bugs, or code pollution, and strive for stability first, any code that does not have large-area test merge, They are all unreliable. Most foreign open source projects are cautious about the code submitted by third parties, and even ignore it. Without sufficient argumentation and experimental reliability, they will not be merged. To be honest, cocos is the most lax I have seen in the management of merged code, so often Because the upgrade version introduces a new bug, so sub-users will be more afraid to upgrade the new version, which is counterproductive, so please ask the official to consider it. The git version can't be used in a production environment, it's not a reason. You see Google's code project, such as angle, which is basically the latest git version that is used directly, and the version name is git to submit the hash value.
My own software is also using the git version of each open source software as a development, not because of the problem with the git version, but cocos is an exception, I am not the first time to give you feedback. Before the release of 3.17.1, I also reacted and spit a few times before. I was afraid of it for a while, but I was afraid to upgrade. I saw that 3.17.2 was released later, so I still want to find a time to upgrade the results. I found the same problem with #20182 feedback, so I found the author and asked him to fix it. Please consider my suggestion, the quality and stability of the code is really important. If you go to work in a commercial company because of these problems, you may be embarrassed, and the pressure is really great. Thank you.

中文:好的,感谢指点。我的确只从设计的角度在考虑而没有考虑兼容性等问题,之后会更谨慎的考虑。 这个改动请官方来评判吧 @minggo
English: Thanks for pointing. I only consider it from the design level, but I have not considered the compatibility level. I will consider the issue more carefully in the future. Please judge this commit, thanks.

@minggo
Copy link
Contributor

minggo commented Oct 27, 2019

@sonyps5201314 sorry about that, i think you are right, we should consider more about compatibility. But it is hard to test all situations.

About this PR, i think we should revert it.

minggo pushed a commit that referenced this pull request Oct 27, 2019
minggo added a commit that referenced this pull request Oct 27, 2019
@minggo minggo removed this from the next milestone Oct 27, 2019
@sonyps5201314
Copy link

Thanks!

minggo pushed a commit that referenced this pull request Oct 28, 2019
minggo added a commit that referenced this pull request Oct 28, 2019
Rhaylith added a commit to Rhaylith/cocos2d-x that referenced this pull request Jan 20, 2020
* [lua android] use luajit & template cmake update (cocos2d#19239)

* [lua android] use luajit & template cmake update

* update external to v150

* update external to 151

* fix small type error in ScriptingCore (cocos2d#19244)

* [lua-tests] fix LuaJavaBridge crash on release mode (cocos2d#19248)

* [external] update to v152 (cocos2d#19247)

* [external] update to v152

* luaL_reg -> luaL_Reg

* [lua tests]fix evalJs 'alert' frozen (cocos2d#19249)

* update CHANGELOG (cocos2d#19250)

* update CHANGELOG

* fix typo

* fix typo 2

* [lua-tests] use math.fmod  &  lua downloader binding clear stack (cocos2d#19255)

* [lua] add lua_downloader comments, use luaL_register

* chage math.mod to math.fmod

* fix stack error

* [lua] remove luaL_error, which kill process (cocos2d#19257)

* [vs2017] upgrade 3rd party libs to support vs2017 in release mode (cocos2d#19259)

* [uibutton] fix size init order (cocos2d#19260)

* increase cmake stability ,  remove tests/CMakeLists.txt (cocos2d#19261)

* Update changelog and release note (cocos2d#19264)

* add ReleaseNotes

* update versoin code (cocos2d#19265)

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19267)

* standardize pause & resume logic on GLSurfaceView (cocos2d#19256)

* fix spritecache plist parsing issue (cocos2d#19269)

* cmake win32 Precompiled header (cocos2d#19273)

* Precompiled header

* Fix

* Precompiled header for cocos

* Precompiled header jscocos2d

* Ability to get low coupling inheritance (cocos2d#19276)

It is necessary for flexible inheritance from the base class.

* [3rd-libs] upgrade to version 154 (cocos2d#19282)

* Install ninja (cocos2d#19298)

* Install ninja

* Fix android_cocos_new_test

* update 3rd libs & console, fix file issues (cocos2d#19284)

* trigger compile

* update libs

* update 3rd party libs version

* Fix for COCOS2D_DEBUG is always 1 on Android (cocos2d#19291)

Related cocos2d#19289

* revert ndk-build final target, others need it (cocos2d#19296)

* Add clear request and responses method to httpclient (cocos2d#19294)

* Added functionality to clear pending responses and requests in the http client

* Responses and Requests now are processed in similar way

* Fix for clearing the http requests

* Added tests for HttpClient::clearResponseAndRequestQueue

* ReFix bug: PremultipliedAlpha is not working for png (cocos2d#19138)

* Ui video player new style looping input options (cocos2d#19297)

* Implemented looping and disable user input for uiVideoPlayer

* Fixes on how to handle sub states

* Added UI Video Player Demo for Loop, style and user input enabled options

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19320)

* cmake support set iOS Deployment Target for root project (cocos2d#19315)

* support set ios deployment target for root project

* update gitignore

* refine cmake, add iOS sign config (cocos2d#19327)

* refine cmake, add ios sign config

* switch the interface orientations order at info.plist

* refine cmake, allow developer switch Debug/Release in IDE (cocos2d#19329)

* refine cmake, support multi configuration when generate Xcode/VS

* docs update

* cmake, update multi config condition

* remove custom target property: CC_DEPEND_DLLS

* cmake, adapt res copy to multi config types

* move "APP_RES_DIR" up, and improve setup_cocos_app_config

* move repeat comments into docs

* notify user the copy file process

* target_link_options isn't supported until cmake 3.13

* cmake readme update

* Add Android P cutout area support (cocos2d#19286)

* Add Android P cutout area support
Related cocos2d#19285

* coding style fix

* Update AppActivity.java

Fix android build

* suppress lint new api errors

* update change log, "allow cleartext HTTP traffic" don't include template

* Adds Configuration::getInfoAsMap() (cocos2d#19381)

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19390)

* Checking, does the touch is within the height of the line, not the height of the sprite? (cocos2d#19394)

* If path to file is tool long crash is possible. (cocos2d#19383)

* If path to file is tool long crash is possible.

If path to file is tool long crash is possible, because of chart buffer overflow.

* Incorrect replacement. Using iterator is better.

* Style fix

* Correct naming

* Font atlas texture initialization delayed (cocos2d#19384)

If you will try to create CCLabel with True Type font, enabling it's outline and change it's font size with separate commands you will create multiple textures for font atlases, one for label second for label with outline, and third for label with another font size. 
Moving texture initialization from constructor and calling it later, right before usage will cause large memory economy, because even if atlases will be created they won't create textures of allocate memory for current page data.

* fix header path include style (cocos2d#19395)

* Fix memory leak if invoking Texture2D::setAlphaTexture many times. (cocos2d#19400)

* need to generate binding codes for all targets (cocos2d#19424)

* need to generate binding codes for all targets

* all targets depend on ndk, for gen bindings

* fix lack python module

* remove unneeded codes (cocos2d#19421)

* remove unneeded codes

* remove winrt and win8.1

* fix compiling error on android

* refine travis, don't generate binding codes for cpp only target (cocos2d#19430)

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19431)

* Lua: add manual bindings for EventDispatcher::addCustomEventListener (cocos2d#19405)

* Lua: add manual bindings for EventDispatcher::addCustomEventListener

* Lua: Testcase for EventDispatcher::addCustomEventListener

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19439)

* fix the member parameter:_percent is always be 0 during the update process. (cocos2d#19419)

* Method to check if any IME dispatcher is active. (cocos2d#19451)

Useful feature to know if any text field or custom IME dispatcher is active

* [Android] fix FileUtils::listFiles with path 'assets/' (cocos2d#19457)

* Getting current clearing color in Renderer

Will be useful.

* Tabs to spaces

* Tabs to spaces

* Methods of changing clearing color

* Getting clearing color from Director interface

* Ability to change title position

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically

* Only send the ON_PERCENTAGE_CHANGED if and only if the percentage value has actually changed.

* Only send the ON_PERCENTAGE_CHANGED if and only if the percentage value has actually changed. (cocos2d#19556)

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19563)

* [windows] use PostMessage to replace SendMessage (cocos2d#19569)

* revert threads (cocos2d#19572)

* Update CCArmature.cpp (cocos2d#19579)

There is an unmatched ");" in the file at line 720.

* use CC_SAFE_DELETE_ARRAY instead of CC_SAFE_DELETE (cocos2d#19580)

* Fix bug: can't play video in obbfile. (cocos2d#19476)

* Fix bug: can't play video in obbfile.

* Change check order.

* fix base/CMakeLists.txt (cocos2d#19575)

* fix static token array in headfile (cocos2d#19164)

The token array shouldn't be static in CCPUScriptTranslator.h,
otherwise including it will generate duplicate token array.

* End the NS_CC properly. (cocos2d#19603)

* Update UIDeprecated.cpp

There is no need of this last "}".

* End the NS_CC properly.

Change the "}" with NS_CC_END to avoid misunderstandings.

* add build test option for cmake (cocos2d#19608)

* add build test option for cmake

* configure build test option for cmake

* Optimize calls to std::string::find() and friends when the needle passed is a single character string literal. The character literal overload is more efficient. (cocos2d#19614)

* fix outdated documentation [ci skip] (cocos2d#19618)

* prefer delegate constructor over new(this) (cocos2d#19613)

* rewrite parseIntegerList with better performance (cocos2d#19619)

* update binding generator (cocos2d#19625)

* move parseIntegerList to a free function in ccUtils, add few testcases (cocos2d#19634)

* remove redundant user-defined copy constructor and destructor, (cocos2d#19636)

as compiler auto-generated ones are working fine.

* Changed shader data types mediump to highp to remove possible sprite joggling on some Android phones. (cocos2d#19633)

* Optimize cases where loop variable is unecessarily copied in a range-for loop. (cocos2d#19637)

Pass by const reference when appropriate.

* Make precheader files PRIVATE, otherwise they leak to the game project (e.g. precheader.cpp visible in MyGame's Visual Studio project).

* add optimization for OPPO. (cocos2d#19631)

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19644)

* add clang-tidy support (cocos2d#19643)

* add clang-tidy support

* move clang_tidy_test up in travis yaml file

so that it's run first

* use dump-config to generate .clang-tidy file

* use flexible way to find run-clang-tidy.py

clang-tidy and run-clang-tidy.py shares common ancester directory.
find the script dynamically rather than hard-coding it.

* place clang-tidy check options in separate lines

* clang_tidy_test target clean up

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19648)

* fix FastTMXLayer with anchor point

* fix FastTMXLayer does not reflect Opacity

* fix Sprite update_blend_func (cocos2d#19649)

* minor refactoring of AudioEngine

* emplace_back accept constructor args directly
* use reserve

* remove superfluous null pointer check

* add null pointer check

* The scene stack should be cleared in a LIFO manner, which allows for releasing the allocated resources in the correct order, being last in, first out, as is the purpose of the stack.

* Gradle.5.1.1 (cocos2d#19657)

* gradle-5.1.1

* update bindings-generator

* classpath 'com.android.tools.build:gradle:3.4.0'

* enable more clang-tidy performance options (cocos2d#19656)

* enable more clang-tidy performance options

* fix warning: performance-type-promotion-in-math-fn

prefer c++ math functions, as it handles float and double case
correctly. For example, std::sin has overload for both float and
double, but sin only has double argument. C++ math functions avoids
unnecessary floating point type conversions.

* add missing cmath headers

* change log to std::log

* fix concave polygon bug in DrawNode (cocos2d#19641)

* add concave polygon support to DrawNode

* change to cocos2d-x coding style

* add the url of the code comes from

* move test code to a seperate class

* add new clang-tidy option (cocos2d#19670)

* add new clang-tidy option

* readability-container-size-empty

* minor fix for UnitTest

* clang-tidy: filter external directory

* add comment on python regular expression [ci skip]

* add new clang-tidy option (cocos2d#19682)

* add new clang-tidy option

* readability-delete-null-pointer

* more fix for readability-delete-null-pointer

* modify fdGetter (cocos2d#19671)

* modify fdGetter

* Check whether a music file is in the OBB file

* fix twice copy lua scripts error (cocos2d#19687)

* FIX ios bug : You don’t have permission to save the file “Documents_temp”

The iOS side, eg:Writable directory is "**/Documents/",old code will get "**/Documents_temp/", However, due to the sandbox mechanism of iOS, you do not have the permission of this directory, so instead fixed it to  "**/Documents/_temp/"

* fix toupper function call

* Original pointer cast does nothing, as it doesn't change signature
* toupper arugment type should be unsigned char

Reference: https://en.cppreference.com/w/cpp/string/byte/toupper

* setPercent after initialization (cocos2d#19689)

* refactor CCIMEDispatcher (cocos2d#19688)

* remove superfluous destructor
* use range-based for loop
* correct some documentation

* add new clang-tidy option (cocos2d#19698)

* readability-redundant-control-flow

* Fix APK not have assets folder (cocos2d#19679)

* Fix APK not have assets folder

* Android project: copy all res to assets folder

* remove duplicate function call in cmake (cocos2d#19697)

* AssureOutOfSourceBuilds() is called in module file. No need to
call it in root cmake file.

* fix for cocos2d#19713 (cocos2d#19714)

cocos2d#19713

* add missing header

* fix string append (cocos2d#19717)

* add new clang-tidy option (cocos2d#19699)

* readability-redundant-string-cstr

* use string::append  change name

* fix assign nullptr to std::string (cocos2d#19615)

* Support new Mali GPUs (cocos2d#19411)

* Support new Mali GPUs

Some new Mali GPUs use FP16 for matrix that is not precise enough. Should be FP32. Tested on Mali-T880.

The same issue is described here:
https://discuss.cocos2d-x.org/t/critical-issue-regarding-rendering-on-devices-with-renderer-type-mali/45568

* More convenient way to fix the shader precision.

* [Change] the CC_64BITS macro to 64-bit decision. (cocos2d#19723)

* fix wrong buffer type (cocos2d#19724)

* new clang-tidy option: readability-string-compare (cocos2d#19742)

* [Android] gradle copy resources to assets folder before `preDebug|ReleaseBuild` (cocos2d#19732)

* fix get environment

* update gradle.scripts

* fix error

* remove extract modifications

* remove redundant semicolon (cocos2d#19743)

* render state of technique shuold be saved in technique (cocos2d#19725)

* fix (cocos2d#19749)

* add clang-tidy-bugprone options (cocos2d#19750)

* add clang-tidy-bugprone options

* bugprone-argument-comment
* bugprone-bool-pointer-implicit-conversion
* bugprone-dangling-handle
* bugprone-fold-init-type
* bugprone-forward-declaration-namespace

* enable more clang-tidy bugprone options

* bugprone-forwarding-reference-overload
* bugprone-inaccurate-erase,
* bugprone-incorrect-roundings,

* Merge 3.17.2 (cocos2d#19755)

* modify engine version (cocos2d#19677)

* protect empty string (cocos2d#19680)

* fix twice copy lua scripts error (cocos2d#19687) (cocos2d#19691)

* rename Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.* to Cocos2dxLuaJavaBridge.* (cocos2d#19694)

* fix get environment (cocos2d#19690)

* update release note and change log (cocos2d#19711)

* [js-tests/cpp-tests] iOS: add fonts to Info.plist (cocos2d#19708)

* add fonts to Info.plist

* use tabs instead of spaces

* fix lua-tests

* Update CHANGELOG

* setPercent after initialization (cocos2d#19718)

* remove void arg in func delcaration and reformat (cocos2d#19758)

f(void) is same as f() in C++ (but not in C), hence removing void.
And reformat the code around f(void) a bit.

* refactor CCBundle3DData (cocos2d#19756)

* remove superfluous constructor and non-virtual destructor

destructor should be trivial if it doesn't manage resource. A vector
member clears itself automatically. No need to call `clear` in
destructor.

* refactor CCScene (cocos2d#19767)

* refactor-CCScene

prefer in-class initialization

* in-class initialization of pointer to nullptr

* Added support for saving images with non-premultiplied alpha (cocos2d#19782)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19796)

* skip shapes of 0 area in processTriangles (cocos2d#19791)

* [Android]Override removeDirectory function in FileUtilsAndroid, fix "rm not found" error on OPPO ColorOS (cocos2d#19790)

* Override removeDirectory function in FileUtilsAndroid,use JRE method instead of "rm -r path". Because We found that on OPPO's ColorOS, the environment variable PATH may not always correct, it could be ":/sbin" sometimes, then cause an error "rm not found", afterwards the directory could not be deleted。

* omitted variable while call removeDirectoryJNI

* rename RemoveDirectory->renameDirectory obey the coding rule

* rename childFile to childrenFile

* more clang-tidy perf options (cocos2d#19783)

* performance-move-constructor-init
* performance-unnecessary-copy-initialization

Disable warnings on RefPtr refcount test case.

* fix return value in EditBoxImpl-linux (cocos2d#19798)

also remove some redundant semicolon

* refactor use const reference

* android_allowBackup2

* update log_ref (cocos2d#19840)

* update travis ci configuration (cocos2d#19841)

* install g++6.0 in travis (cocos2d#19842)

* refactor AudioEngine-Linux (cocos2d#19822)

* refactor AudioEngine and AudioEngine-linux

* map::erase() can handle case if key doesn't exist.

* use map::iterator when it has already obtained.

* mapChannelInfo[id].channel is nullptr befor resume(). Don't
dereference it.

* FMOD::System::release() calls close, so calling close before release
is not necessary.

* use std::map::insert properly.

* remove unnecessary null check on _audioEngineImpl

* add comment on nullptr dereference

* refactor CCGeometry (cocos2d#19847)

* remove redundant copy constructor and copy assignment operator
* use delegate constructor to simply code
* fix a documentation error

* fix memory leak in CCUserDefault (cocos2d#19853)

fastSet makes the Data object managing a new memory area in
[bytes, bytes + size), but it doesn't releasing the old data
it managed. Failure to release the old data causes memory leak.

The default constructed Data manages null memory, so calling
fastSet on it is fine.

Because `Data ret = defaultValue;` malloc new memory, we might
have better performance without it.

* update oppo sdk. (cocos2d#19864)

* update to 3.17.2 (cocos2d#19869)

just in case developer clones repo and then uses version as a conditional.....

* Speed up post build step by disabling unnecessary cmake command (cocos2d#19873)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* Disabled unnecessary console output from CMake for each and every resource file being copied, which was slowing down builds when there is a large amount of resource names to print out.  Simply having "copying resources..." before the process begins is sufficient.  The disabled code was just commented out, so can be re-enabled for debugging purposes if required.

* [JSB] Some fixes for cc.DrawNode: (cocos2d#19889)

- It was using the same _drawColor field for all instances
- drawSegment() was not checking the optional parameters the way web does, which led to different outcomes

* clang-tidy: performance-unnecessary-value-param (cocos2d#19870)

* clang-tidy: performance-unnecessary-value-param

* Reference: https://releases.llvm.org/7.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/performance-unnecessary-value-param.html

* perfer pass by const reference

If a object is passed by value and moved to new value. Prefer passing
it by reference and copy it, if allowed.

* Add the ability to set global Z order of physics debug draw node (cocos2d#19885)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* Added the ability to set the global Z order of the debug node, since it may not be visible if utilizing global Z in objects within a scene.

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19895)

* fix Wformat warnings (cocos2d#19893)

* add setOptimise function for c++ (cocos2d#19882)

* refactor ObjectFactory (cocos2d#19902)

* remove redundant copy constructor, copy assignment operator, and
destructor in TInfo.
* prefer in-class member initialization.
* default construct std::function, and use `default`
* fix overload resolution
* return early in multiple conditionals
* remove unimplemented removeAll()
* remove typedef that's only used in one place and in private scope

* clang tidy modernize redundant void arg (cocos2d#19900)

* add new clang-tidy option above
* fix warnings from performance-unnecessary-value-param

Reference: https://releases.llvm.org/7.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-redundant-void-arg.html

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19920)

* fix ZipUtils memory-malloc succ check error. (cocos2d#19923)

* fix lua arg check error. (cocos2d#19924)

* Fix cocos2d-js issue: Font height was not getting calculated properly in iOS. (cocos2d#19926)

* disable clang-tidy checks on script bindings code (cocos2d#19928)

* Fix divide by zero in ui::Slider (cocos2d#19957)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* [UISlider.cpp] Divide by 0 error if _maxPercent is equal to 0, which is an allowed value.

* Small performance boost in using Mat4::operator*= instead of operator* (cocos2d#19960)

This avoids creating a new temporary Mat4 transform in operator* https://github.com/cocos2d/cocos2d-x/blob/v3/cocos/math/Mat4.inl#L60

* fix android crash in special http request header (cocos2d#19899)

only crash clang + c++_static

* clang-tidy clang-tidy-modernize-use-emplace (cocos2d#19955)

* clang-tidy clang-tidy-modernize-use-emplace

* Reference: https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html

* use vector.reserve

* remove app from recent apps when exit (cocos2d#19961)

* Update 3rd party lib references (cocos2d#19959)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* Update to v3-deps-159

* refactor-CCDrawNode (cocos2d#19969)

* remove unecessary intermediate temp variables
* remove redundant pointer cast
* remove redundant memset, as the values are assigned immediately in a
for loop.
* minor formatting

* Revert "Small performance boost in using Mat4::operator*= instead of operator* (cocos2d#19960)" (cocos2d#19975)

This reverts commit a242a79.

* refactor CCDrawNode: part2 (cocos2d#19972)

This commit deletes all v2xx static free functions.  All these changes are contained within the file.

* replace v2fzero with Vec2::ZERO
* remove __v2f, as it does nothing
* rename __t to v2ToTex2F to reflect what the function does
* remove the rest of functions, as Vec2 already includes them as member functions

* upgrade glfw to 3.3 (cocos2d#19971)

* Support interface only libraries (cocos2d#19855)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* Added support for interface-only libraries being linked to application via target_link_libraries.  Certain library properties cannot be accessed if it is an interface only library, so we need to check if they are valid library types before accessing those properties.

* Fixed formatting.

* remove MainMenu.xib file. (cocos2d#19968)

* remove MainMenu.xib file.

* fix compile error

* don't invoke super.onPause() to prevent egl context lost (cocos2d#19996)

* fix v3 travis compiling error (cocos2d#20002)

* in Node::enumerateChildren, searchFromParent shouldn't search from children (cocos2d#20007)

* searchFromParent shouldn't search from grand children

* fix RotateTo animation when angle is bigger than 360 (cocos2d#20009)

* fix crash when plist filename hasn't suffix (cocos2d#19999)

* [v3] add renderer performance test (cocos2d#20010)

* refactor Quaternion class (cocos2d#20031)

* remove redundant copy constructor and destructor

* Fixing a bug in Node::enumerateChildren (cocos2d#20045)

This patch fixes an issue that if both // (recursive enumeration)
and .. (starting from parent node) are specified,
Node::enumerateChildren does not honor the latter and starts searching
from current node rather than parent node.

* update deps (cocos2d#20051)

* fix FastTMXLayer (cocos2d#20066)

* update external (cocos2d#20068)

* [bugfix] v3 Fileutils iOS isDirectory (cocos2d#20080)

* use AVPlayerController instead (cocos2d#20085)

* Ios webview (cocos2d#20098)

* Use external-deps-163 (cocos2d#20114)

* fix memory leak (cocos2d#20110)

* uses the same precision for uniforms (cocos2d#20107)

* fix bug that system font is not rendered correctly on macOS Catalina (cocos2d#20124)

* Fix error with update line height (cocos2d#19914)

After movig font atlas `reinit()` (cocos2d#19384) there was indused a problem: the first display of text with a outline in the label does not update line height. This is because the atlas `reinit()` does not occur when the outline is activated. In this case, a new atlas will be created, but the line height will not be taken from it, because line height calculate in `updateContent()`. I propose line height calculating to return to the font atlas constructor.

* Fix include order for Win32.

* Remove tinyxml2 from CCSaxParser implement. (cocos2d#20141)

* Fix RenderTexture PMA setting (cocos2d#20143)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* Corrects the PMA setting on the internal Texture2D instance created by RenderTexture.

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#20148)

* set software mode will slow down performance (cocos2d#20152)

* Sprite and RenderTexture blending mode set based off texture premultiplied alpha setting (cocos2d#20154)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* [CCSprite.cpp] Sprite:initWithTexture() should set the blend mode depending on the texture premultiplied alpha setting.
[CCRenderTexture.cpp] Sprite::setOpacityModifyRGB() is set based on the premultiplied alpha setting.

* Fix for incorrect _opacityModifyRGB on non-PMA.

* [CCSprite.cpp] Removed redundant code related to blending mode and opacityModifyRGB when creating a sprite with a texture.

* Make luabindings framework compat with lua52 & lua53. (cocos2d#20157)

* Make luabindings framework compat with lua52 & lua53.

* Remove link from static lib, let user can choose which lua version hi want.

* Add lua51.lib dependencies for win32.

* [v3] update submodule cocos2d-console (cocos2d#20132)

* [v3] update submodule cocos2d-console

recompile luajit-mac with -DLUAJIT_ENABLE_GC64

* update ref

* Rename cocos2d::MessageBox to cocos2d::ccMessageBox. (cocos2d#20159)

* Rename cocos2d::MessageBox to cocos2d::ccMessageBox to avoid confilicit with win32 API macro 'MessageBox'.

* Sync non-win32 platforms.

* fix OpenGL ERROR 0x0502 cannot delete VAO 0 (cocos2d#20178)

* Upgrade minizip to 1.2.0 (cocos2d#20158)

* Added JS stack trace (cocos2d#20168)

* Update ZipUtils.cpp (cocos2d#20192)

* Update deps to 167 (cocos2d#20194)

* fix text wrong warp issue (cocos2d#20225)

* fix issue: TextField can not receive characters(non number or english… (cocos2d#20209)

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#20231)

* PostMessage to SendMessage (cocos2d#20199)

* fix issue that can not receive Chinese characters with system input m… (cocos2d#20232)

* update bullet (cocos2d#20240)

* add missing function (cocos2d#20250)

* Revert "fix RotateTo animation when angle is bigger than 360 (cocos2d#20009)" (cocos2d#20256)

This reverts commit c840544.

* update Node::getTag comment (cocos2d#20255)

this fixes a typo where getTag should suggest to use getName, like setTag and removeChildrenByTag does.

* add default CFBundleShortVersionString value to info.plist

* Unify the effect of printing multiline logs.

Now all platforms will have the same lines.

* Fixes so that in the web view we are able to navigate different links correctly <Deep> (cocos2d#20266)

* remove extern "C" from base/base64.h for avoiding base64 function symbols conflict at linking libraries. (cocos2d#20276)

* fix lua header path including error (cocos2d#20277)

* fix lua header path error
Include both lua header file and luajit header file may cause problem.

* fix textfield issues (cocos2d#20294)

* don't set glview transparent, it many cause afterimage (cocos2d#20298)

* Allow game code to override BM Font parsing and support rotated font atlas textures (cocos2d#20300)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* [CCFontFNT.cpp/.h] Allow game to override FNT file parsing for extended formats.
[CCFontAtlas] Added flag to indicated if a texture is rotated in FontLetterDefinition.  This will allow for embedding a font atlas image inside a larger image atlas that supports rotation.
[CCLabel.cpp] Ensure that the rotated flag in the font letter definition is used when creating a sprite for the letter.

* [CCFontFNT.h] Fixed missing include statements.

* Recompile luajit (cocos2d#20306)

* Recompile luajit

upgrade luajit in mac & ios

* target_link_options is not supported until 3.13

* update external

* update exteral, luajit -fPIC

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#20312)

* [iOS]Screen Time would makes App stuck sometimes (cocos2d#20313)

* Screen Time would prevent UIApplicationDidBecomeActiveNotification and UIApplicationWillResignActiveNotification from being fired until reboot the iPad.

* code format fix

* fixed broken links, removed outdated links. (cocos2d#20318)

fixed broken links, removed outdated links.

* Cmake mult config (cocos2d#20317)

* MINSIZEREL_RELWITHDEBINFO_Support

* Remove DEBUG_MODE

* Fix clang-tidy

* Improve bmfont api (cocos2d#20309)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* Added support for adding bitmap font atlas image sub-textures in a larger image atlas.  Also supports sub-texture rotation (90 degrees to the right, which is the default of the PLIST atlas format).

* [LabelTest.cpp] Updated BMFontOneAtlas test to support new BMFont label API

* [CCFontFNT.cpp] Added missing include statement.

* Updated LUA and JS bindings for the new BMFont code.
[CCLabelBMFont] This deprecated class required some modifications to work with the manual LUA bindings.

* [CCLabelBMFont] Reverted the API to the original interface since this class is deprecated.
Updated JS bindings.

* [LabelTest/LabelTest.cpp] Reverted usage of deprecated API.

* Re-added old API for creating bitmap font labels, but prefixed them as deprecated, in order to keep backwards compatibility.

* Fix for incorrect usage of variable that may be null.

* Added two new label tests for BM Font labels.  One tests a shared atlas with no rotated textures, and the other uses a PLIST atlas with rotated textures.  Added resources for these tests.

* Moved variable definitions outside of loop.

* [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#20325)

* fix issues of textfield (cocos2d#20303)

* fix infinite loop

* fix issue that touch event does not match
If click area ouside keyboard, then engine only receive touch begin event witouth touch end or touch cancled event.

* Fixing a crash in iOS 9.3.5 when we have a layer with WebView getting deallocated (cocos2d#20285)

* In case of iOS 9.3.5 when we show a web view and deallocate the layer it is trying to release memory associated with WKWebView instance, but it hadn’t retained it in the first place. This results in a crash. This commit fixes that crash.

* Removing the autorelease and retain parts from the WKWebView instantiation.

* Changes so that we can remove the retain from the property declaration and depend only on manual retain and release of memory <Deep>

* fix videoplayer crash in release mode (cocos2d#20327) (cocos2d#20330)

* [v3] fix asan reported errors (cocos2d#20335)

* manually maintain reference count (cocos2d#20329) (cocos2d#20337)

* fix issue that can not close keyboard if using EditBox on iOS (cocos2d#20336)

* close keyboard when Done is pressed (cocos2d#20341)

* close keyboard when Done is pressed

* Added tmx animated tile support, with test case.  (cocos2d#20315)

* Added tmx animated tile support, with test case. Tile animation are disabled by default, if user didn't enable it, the TMXTiledMap class will do just the same as this support not exists, no additional render resources needed. The tile animations are still rendered through SpriteBatchNode, no additional draw call needed.

* changed tileset tococos own's

* used cocos2dx own's tileset

* changed return type of TMXLayer::getAnimTileCoord to pointer for lua api converting

* deleted useless code, improved api

* re-generated script binding

* added CC_DLL to new classes, solved some problem posted on pull request

* changed return type of getTasks to pointer

* made TileAnimTask inherit form Ref

* removed a fixed FIXME

* added const to getTasks, deleted unneeded empty lines, re-generated script bindings

* deleted empty lines in TMXXMLParser

* Fix ui::Layout scissor clipping (cocos2d#20352)

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* [UILayout.cpp] Fix for incorrect SCISSOR clipping rectangle calculation.
[UILayoutTest.cpp] Test added to reproduce issue with SCISSOR clipping.

* Get reference to clipping rectangle instead of a copy.

* UIVideoPlayer-ios.mm regression fix. (cocos2d#20368)

[UIVideoViewWrapperIos clean] shouldn't reset _videoPlayer pointer,
since it is called in setUrl method and leaves instance in invalid
state. Subsequent calls to play, pause, etc. end up with crash.

* Fix visual studio console output (cocos2d#20357)

* Fix to properly delete easingParams array (cocos2d#20374)

* Fix isVariable method buffer overflow. (cocos2d#20376)

Co-authored-by: Arnold <[email protected]>
Co-authored-by: leda <[email protected]>
Co-authored-by: CocosRobot <[email protected]>
Co-authored-by: CHP <[email protected]>
Co-authored-by: gestern <[email protected]>
Co-authored-by: Andrew V. Belousoff <[email protected]>
Co-authored-by: Benjamin Prieto <[email protected]>
Co-authored-by: chongchaoyu <[email protected]>
Co-authored-by: kasandko <[email protected]>
Co-authored-by: sbrednikhin <[email protected]>
Co-authored-by: minggo <[email protected]>
Co-authored-by: James Chen <[email protected]>
Co-authored-by: Jimmy Yin <[email protected]>
Co-authored-by: Eric.Ding <[email protected]>
Co-authored-by: RH <[email protected]>
Co-authored-by: larisand <[email protected]>
Co-authored-by: HALX99 <[email protected]>
Co-authored-by: Xrysnow <[email protected]>
Co-authored-by: Xiang.Lin <[email protected]>
Co-authored-by: deflinhec <[email protected]>
Co-authored-by: John <[email protected]>
Co-authored-by: Ryan B <[email protected]>
Co-authored-by: Ali Kämäräinen <[email protected]>
Co-authored-by: kenshin <[email protected]>
Co-authored-by: kacky <[email protected]>
Co-authored-by: ShadowJobs <[email protected]>
Co-authored-by: Alexander Huang <[email protected]>
Co-authored-by: yang1500313979 <[email protected]>
Co-authored-by: Pinchuk Aleksei <[email protected]>
Co-authored-by: AIGRIND <[email protected]>
Co-authored-by: WangHe <[email protected]>
Co-authored-by: Slack-Moehrle <[email protected]>
Co-authored-by: Ricardo Petrére <[email protected]>
Co-authored-by: ggggamer <[email protected]>
Co-authored-by: vaibhavgohel <[email protected]>
Co-authored-by: TankorSmash <[email protected]>
Co-authored-by: zoxin <[email protected]>
Co-authored-by: coulsonwang <[email protected]>
Co-authored-by: dzj0821 <[email protected]>
Co-authored-by: Nhan Khong <[email protected]>
Co-authored-by: Vyshnav S Deepak <[email protected]>
Co-authored-by: dodo <[email protected]>
Co-authored-by: Deep Shah <[email protected]>
Co-authored-by: Naruto TAKAHASHI <[email protected]>
Co-authored-by: DEAGS3000 <[email protected]>
Co-authored-by: dave-ori <[email protected]>
Co-authored-by: Saber Haj Rabiee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants