Skip to content

Commit

Permalink
V3 (#1)
Browse files Browse the repository at this point in the history
* [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 <40414978+PatriceJiang@users.noreply.github.com>
Co-authored-by: leda <li_cheng_zhe@163.com>
Co-authored-by: CocosRobot <redmine@cocos2d-x.org>
Co-authored-by: CHP <crazyhappygame@gmail.com>
Co-authored-by: gestern <mapc4@yahoo.com>
Co-authored-by: Andrew V. Belousoff <formatCvt@gmail.com>
Co-authored-by: Benjamin Prieto <benjaprieto@hotmail.com>
Co-authored-by: chongchaoyu <h5ru@qq.com>
Co-authored-by: kasandko <39956359+kasandko@users.noreply.github.com>
Co-authored-by: sbrednikhin <sbrednikhin@gmail.com>
Co-authored-by: minggo <xiaoming.zhang@chukong-inc.com>
Co-authored-by: James Chen <dumganhar@gmail.com>
Co-authored-by: Jimmy Yin <jimmy.yin5@gmail.com>
Co-authored-by: Eric.Ding <853003451@qq.com>
Co-authored-by: RH <rh101@users.noreply.github.com>
Co-authored-by: larisand <49346030+larisand@users.noreply.github.com>
Co-authored-by: HALX99 <halx99@live.com>
Co-authored-by: Xrysnow <xrysnow@outlook.com>
Co-authored-by: Xiang.Lin <myd.xia@gmail.com>
Co-authored-by: deflinhec <falconlegend810518@gmail.com>
Co-authored-by: John <3619244+JohnCoconut@users.noreply.github.com>
Co-authored-by: Ryan B <gamehelphere@gmail.com>
Co-authored-by: Ali Kämäräinen <stinkfist0@gmail.com>
Co-authored-by: kenshin <420373550@qq.com>
Co-authored-by: kacky <t_kaki@nextappli.com>
Co-authored-by: ShadowJobs <794878115@qq.com>
Co-authored-by: Alexander Huang <alxddhuang@gmail.com>
Co-authored-by: yang1500313979 <1500313979@qq.com>
Co-authored-by: Pinchuk Aleksei <38797708+Pinchuka@users.noreply.github.com>
Co-authored-by: AIGRIND <AIGRIND-LLC@users.noreply.github.com>
Co-authored-by: WangHe <wanghewin7@163.com>
Co-authored-by: Slack-Moehrle <slackmoehrle@users.noreply.github.com>
Co-authored-by: Ricardo Petrére <ricardo19.93@hotmail.com>
Co-authored-by: ggggamer <even.newbie@gmail.com>
Co-authored-by: vaibhavgohel <vaibhavgohel@gmail.com>
Co-authored-by: TankorSmash <tankorsmash+github@gmail.com>
Co-authored-by: zoxin <zoxinmail@gmail.com>
Co-authored-by: coulsonwang <coulsonwang@126.com>
Co-authored-by: dzj0821 <36768960+dzj0821@users.noreply.github.com>
Co-authored-by: Nhan Khong <49646896+ktrongnhan@users.noreply.github.com>
Co-authored-by: Vyshnav S Deepak <vyshnav.s.deepak@gmail.com>
Co-authored-by: dodo <QingKaka@gmail.com>
Co-authored-by: Deep Shah <deep@gitshah.com>
Co-authored-by: Naruto TAKAHASHI <tnaruto@gmail.com>
Co-authored-by: DEAGS3000 <DEAGS3000@gmail.com>
Co-authored-by: dave-ori <58078677+dave-ori@users.noreply.github.com>
Co-authored-by: Saber Haj Rabiee <sabify@users.noreply.github.com>
  • Loading branch information
Show file tree
Hide file tree
Showing 2,315 changed files with 20,142 additions and 36,555 deletions.
5 changes: 3 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ environment:
PYTHON_VERSION: "2.7.13"
PYTHON_ARCH: "32"
matrix:
- build_type: windows32_cocos_new_test
- build_type: windows32
- build_type: windows32_cmake_test
- build_type: windows32_sln_test
- build_type: android_cpp_tests
- build_type: android_lua_tests
# - build_type: android_cocos_new_test
# - build_type: android_cpp_empty_test
# - build_type: android_gen_libs
Expand Down
33 changes: 33 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
Checks: >
-*,
performance-faster-string-find,
performance-for-range-copy,
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-vector-operation,
performance-move-const-arg,
performance-move-constructor-init,
performance-type-promotion-in-math-fn,
performance-unnecessary-copy-initialization,
performance-unnecessary-value-param,
readability-container-size-empty,
readability-delete-null-pointer,
readability-redundant-control-flow,
readability-redundant-string-cstr,
readability-string-compare,
bugprone-argument-comment,
bugprone-bool-pointer-implicit-conversion,
bugprone-dangling-handle,
bugprone-fold-init-type,
bugprone-forward-declaration-namespace,
bugprone-forwarding-reference-overload,
bugprone-inaccurate-erase,
bugprone-incorrect-roundings,
modernize-redundant-void-arg,
modernize-use-emplace,
WarningsAsErrors: '*'
HeaderFilterRegex: '/(?!external)/.*'
AnalyzeTemporaryDtors: false
FormatStyle: none
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,20 @@ tests/lua-tests/project/proj.tizen/res/
*-build/
# Ignore the CLion build folder, such as cmake-build-debug
cmake-build-*/
.vs
cmake_build*

# tmp android build files
cocos/platform/android/libcocos2dx/.project
tests/lua-tests/project/proj.android/.project
tests/lua-tests/project/proj.android/app/.project
tests/*/proj.android/.settings/org.eclipse.buildship.core.prefs
tests/*/project/proj.android/.settings/org.eclipse.buildship.core.prefs

# tmp folder for temp usage
tmp/
temp/

# external libs zip
*.zip
**/simulator/
72 changes: 61 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ matrix:
include:
# linux
- os: linux
dist: xenial
env:
- BUILD_TARGET=linux
- GEN_BINDING_AND_COCOSFILE=true
Expand All @@ -10,46 +11,92 @@ matrix:
- secure: M5lyDs0qai15mWHzJdkh0WPfVJJmVZu6SWtYULxatukGPXVwoQvmEtYAwAW+iz6aM+tXksQ/mk6nW5L8UFbHm+n6yrsa5bZU9sGXjilPE8p8bLFYDmIbPRazU+E6pBP3J2CDoAm0XnWkiYQ8feTxKTo6ysLnHAEjyaHTw0+Q1GM=
sudo: required
language: cpp
# clang-tidy
- os: linux
dist: xenial
env: BUILD_TARGET=linux_clang_tidy
language: cpp
sudo: required
# mac_cmake
- os: osx
env: BUILD_TARGET=mac_cmake
language: cpp
osx_image: xcode8.3
osx_image: xcode9.3
sudo: required
# iOS_cmake
- os: osx
env: BUILD_TARGET=ios_cmake
language: cpp
osx_image: xcode8.3
osx_image: xcode9.3
sudo: required
# android ndk-build
- os: linux
dist: xenial
env: BUILD_TARGET=android_cpp_ndk-build
language: android
sudo: required
# android
# android_lua ndk-build
- os: linux
env: BUILD_TARGET=android
dist: xenial
env: BUILD_TARGET=android_lua_ndk-build
language: android
sudo: required
# android_lua
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
# android cmake
- os: linux
env: BUILD_TARGET=android_lua
dist: xenial
env: BUILD_TARGET=android_cpp_cmake
language: android
sudo: required
# android_lua cmake
- os: linux
dist: xenial
env: BUILD_TARGET=android_lua_cmake
language: android
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
# android_js cmake
- os: linux
dist: xenial
env: BUILD_TARGET=android_js_cmake
language: android
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
# mac
- os: osx
env: BUILD_TARGET=mac
language: cpp
osx_image: xcode8.3
osx_image: xcode9.3
sudo: required
# iOS
- os: osx
env: BUILD_TARGET=ios
language: cpp
osx_image: xcode8.3
osx_image: xcode9.3
sudo: required
- os: linux
env: BUILD_TARGET=android_cocos_new_test
language: cpp
dist: xenial
env: BUILD_TARGET=android_cocos_new_cpp_test
language: android
sudo: required
- os: linux
env: BUILD_TARGET=linux_cocos_new_test
dist: xenial
env: BUILD_TARGET=linux_cocos_new_lua_test
language: cpp
sudo: required

Expand All @@ -58,6 +105,9 @@ script:
before_install:
- tools/travis-scripts/before-install.sh

jdk:
- oraclejdk8

cache:
bundler: true

Expand Down
109 changes: 108 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,110 @@
cocos2d-x-3.17.2 May.21 2019

[NEW] Network: added clear requests and responses method to httpclient
[NEW] UI: VideoPlayer added ability to enable/disable looping, resonding user input
[NEW] UI: VideoPlayer added function to set style
[NEW] IMEDispacher: added a function to check if any IME dispatcher is active
[NEW] Renderer: add a function to get current clearing color
[NEW] Lua: added binding codes for `EventDispathcer::addCustomEventListener()`

[REFINE] Android: added optimization codes for OPPO devcies
[REFINE] Network: improved websocket traces
[REFINE] Android: supported Android P cutout area
[REFINE] FontAtlas: font atlas texture initialization delayed
[REFINE] LOG: CCLOG may block thread on windows

[FIX] FileUtils:fixed a bug that `listFiles()` can not work correctly if the file path starts with `assets/` on Android
[FIX] AssetsManager: fixed a bug that `_percent` is always be 0 during the update process
[FIX] Texture2D: fixed memory leak if `Texture2D::setAlphaTexture()` is invoked many times
[FIX] FontAtlasCache: avoided crash if a file path is too long
[FIX] Audio: fixed crash on iOS
[FIX] UI: VideoPlayer could not play video in obb file on Android
[FIX] SpriteFrame: fixed performance issue in parsing plist files
[FIX] 3rd: unzip failed to uncompress files

cocos2d-x-3.17.1 Nov.19 2018

[REFINE] Renderer: properly reduce clear buffer times to save energy
[REFINE] Engine: improve the reuse logic of sprite frames cache
[REFINE] Engine: add `GLView::setCursor` for desktop platforms
[REFINE] Engine: add methods to change icons for desktop platforms
[REFINE] UI: improve iPhone X home indicator handling behavior
[REFINE] UI: add line spacing support for system font on iOS and Android
[REFINE] UI: add support for pressed and disabled image in EditBox
[REFINE] UI: shrink extra label text if too long, prevent label too long crash
[REFINE] LUA: add binding code for cocos2d::Downloader
[REFINE] Android: add supporting SafeArea for most edge screens devices
[REFINE] Android: change default value of PROP_BUILD_TYPE from ndk-build to CMake
[REFINE] Android: update project config to gradle 4.6, sdk 28, android gradle plugin 3.1.0
[REFINE] Android: add ability to not stop music on game start in android
[REFINE] Windows: refine CCDevice-win32 BitmapDC
[REFINE] Windows: improve binary folder structure, copy resources to "Resources/" folder
[REFINE] Action: add ui::LoadingBar support to Progress actions
[REFINE] Network: support multiple parameters in SocketIO emit/send method
[REFINE] FileUtils: improve thread safety (use single recursive_mutex)
[REFINE] FileUtils: add getFileSize impl for Windows
[REFINE] FileUtils: add listFiles impl for Android and Windows platform
[REFINE] FileUtils: exact fullPathForDirectory from fullPathForFilename, fullPathForFilename should not accept directory
[REFINE] CMake: improve libraries link, compile options config
[REFINE] CMake: remove un-elegant prebuilt feature at internal cmake build scripts
[REFINE] 3rd: upgrade libwebsockets to 2.4.2 with libuv enabled
[REFINE] 3rd: improve cmake build scripts for external libs
[REFINE] 3rd: upgrade luajit to 2.1.0-beta3, fix random crash in Android release mode
[REFINE] 3rd: external/lua/lua is not referenced in cmake and it will be removed in the near future
[REFINE] Tests: add websocket latency test
[REFINE] Tests: add download multi task test case
[REFINE] Tests: improve part test cases UI shows
[REFINE] cocos console: disable "gen-libs" command
[REFINE] Others: add another xbox 360 configuration
[REFINE] Others: remove ANT_ROOT env check on setup.py
[REFINE] Others: improve cmake tests in travis CI scripts

[FIX] Renderer: handle opengl recreate event for CameraBackgroundDepthBrush
[FIX] Renderer: fix some EVENT_RENDERER_RECREATED problem
[FIX] Engine: fix the last update time was not corrected if next delta time was zeroed
[FIX] Engine: be safe to handle operator= in CCData
[FIX] Engine: aviod reading outside of the buffer when print log
[FIX] Engine: avoid duplicate find action when already found
[FIX] Engine: prevent free _bytes when src and dest are identical in CCData
[FIX] Engine: fix Console::loop() consumes 100% of CPU usage
[FIX] Engine: fix Action doesn't work when follow Node added PhysicsBody
[FIX] UI: fix locate image path relative to tsx file error in TiledMap
[FIX] UI: fix several bugs with button's title, include memory leak
[FIX] UI: fix LabelLetter::isVisible always return false
[FIX] UI: fix not support sprite frame when ignoreContentAdaptWithSize is false
[FIX] UI: fix out of range access in Label
[FIX] UI: fix Widget::getAncestorWidget error
[FIX] UI: fix iOS editbox EndAction wrong when single line mode (UITextField)
[FIX] UI: Fix for Label and UIRichEdit text trailing space trimming
[FXI] JavaScript: fix crash if garbage collection runs between TouchStart and TouchEnd event
[FIX] Audio: fix AudioEngine rotateBufferThread crash on iOS
[FIX] Audio: add extra init checks in pcm audio service, avoid crash in PcmAudioService
[FIX] Audio: fix AVAudioSessionErrorCodeCannotStartPlaying error may occur on Apple
[FIX] Audio: fix background music may resumes even the application is on the background on Android
[FIX] Audio: fix AudioCache* holding invalid pointer value
[FIX] Network: fix memory leaks in WebSocket
[FIX] Network: fix websocket memory zereoing size error
[FIX] Network: fix https downloader timeout on win/mac
[FIX] Network: fix "cc.loader.load" convert url error
[FIX] iOS: fix project build warnings in Xcode
[FIX] iOS: fix crash when saving gray colorspace image
[FIX] iOS: `js/lua tests` fix double free issue on app exits.
[FIX] Android: shorten C++ build path, reduce long path error on Windows
[FIX] Android: keep cocos2dx activity at task root by mark "singleTask" in manifest
[FIX] Android: fix crash caused by JNIEnv null pointer in getStringUTFCharsJNI function
[FIX] Android: use 'Binary names' style on JNI for ClassLoader.loadClass
[FIX] Android: allow cleartext HTTP traffic by default for all tests project
[FIX] Windows: Support VS2017 in release mode
[FIX] Action: fix repeat CallFunc for some times, may never stop
[FIX] Physics: fix PhysicsJointMotor setRate and getRate Bad Access Crash
[FIX] FileUtils: fix removeDirectory() failure on win32
[FIX] FileUtils: let getContents return an error code when the filename is a directory
[FIX] FileUtils: let isFileExistInternal return false when folder as parameter on Linux
[FIX] LUA: performance drop bug introduced in 3.17
[FIX] CMake: fix project name always be "TemplateCpp" when create a new project
[FIX] Tests: fix auto test stop in cpp-tests project
[FIX] cocos console: do uninstall only when that app is installed for android

cocos2d-x-3.17 May.21 2018

[HIGHLIGHT] Android: support Android Studio 3.0, NDK 16
Expand Down Expand Up @@ -1164,7 +1271,7 @@ cocos2d-x-3.7rc0 July.1 2015
[NEW] C++: Added ActionFloat
[NEW] C++: Supported physical keyboard on WinRT
[NEW] FileUtils: checked filename case characters on windows
[NEW] FileUitls: added supporting loading files that which file path include utf-8 characters
[NEW] FileUtils: added supporting loading files that which file path include utf-8 characters
[NEW] PhysicsShape: added sensor property
[NEW] Sprite: used triangle command
[NEW] 3d: Added `getFarPlane` and `getNearPlane` in `Camera` class
Expand Down
23 changes: 18 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,36 @@

# build engine library and all tests

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.6)

project(Cocos2d-x)

# cocos2dx root path
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)

# prevent in-source-build
include(PreventInSourceBuilds)

# works before build libcocos2d
include(CocosBuildSet)

# build options
option(BUILD_TESTS "Build tests" ON)

# default tests include lua, js test project, so we set those option on to build libs
set(BUILD_LUA_LIBS ON)
set(BUILD_JS_LIBS ON)

if(NOT USE_COCOS_PREBUILT)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)

# prevent tests project to build "cocos2d-x/cocos" again
set(BUILD_ENGINE_DONE ON)
# add engine all tests project
if (BUILD_TESTS)
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-empty-test ${ENGINE_BINARY_PATH}/tests/cpp-empty-test)
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-tests ${ENGINE_BINARY_PATH}/tests/cpp-tests)
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/js-tests/project ${ENGINE_BINARY_PATH}/tests/js-tests)
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-empty-test/project ${ENGINE_BINARY_PATH}/tests/lua-empty-test)
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-tests/project ${ENGINE_BINARY_PATH}/tests/lua-test)
endif()
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests ${ENGINE_BINARY_PATH}/tests)

Loading

0 comments on commit de7b5c3

Please sign in to comment.