-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Ability to get low coupling inheritance #19276
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It is necessary for flexible inheritance from the base class.
PatriceJiang
approved these changes
Jan 4, 2019
stevetranby
added a commit
to stevetranby/cocos2d-x
that referenced
this pull request
Jan 30, 2019
* commit '8fc3b7b4064b107d85c15a4895d08e9ad335b5a8': (43 commits) update change log, "allow cleartext HTTP traffic" don't include template Add Android P cutout area support (cocos2d#19286) refine cmake, allow developer switch Debug/Release in IDE (cocos2d#19329) refine cmake, add iOS sign config (cocos2d#19327) cmake support set iOS Deployment Target for root project (cocos2d#19315) [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19320) Ui video player new style looping input options (cocos2d#19297) ReFix bug: PremultipliedAlpha is not working for png (cocos2d#19138) Add clear request and responses method to httpclient (cocos2d#19294) revert ndk-build final target, others need it (cocos2d#19296) Fix for COCOS2D_DEBUG is always 1 on Android (cocos2d#19291) update 3rd libs & console, fix file issues (cocos2d#19284) Install ninja (cocos2d#19298) [3rd-libs] upgrade to version 154 (cocos2d#19282) Ability to get low coupling inheritance (cocos2d#19276) cmake win32 Precompiled header (cocos2d#19273) fix spritecache plist parsing issue (cocos2d#19269) standardize pause & resume logic on GLSurfaceView (cocos2d#19256) [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19267) update versoin code (cocos2d#19265) ... # Conflicts: # cocos/network/WebSocket.cpp # cocos/platform/android/CCFileUtils-android.cpp # cocos/scripting/js-bindings/CMakeLists.txt # cocos/scripting/js-bindings/auto/api/jsb_cocos2dx_experimental_video_auto_api.js # cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_video_auto.cpp # cocos/scripting/js-bindings/auto/jsb_cocos2dx_experimental_video_auto.hpp # cocos/scripting/js-bindings/manual/ScriptingCore.cpp # cocos/scripting/lua-bindings/auto/api/VideoPlayer.lua # cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_video_auto.cpp # cocos/scripting/lua-bindings/auto/lua_cocos2dx_experimental_video_auto.hpp # cocos/scripting/lua-bindings/manual/CCLuaStack.cpp # cocos/scripting/lua-bindings/manual/Cocos2dxLuaLoader.cpp # cocos/scripting/lua-bindings/proj.android/CMakeLists.txt # templates/js-template-default/CMakeLists.txt # templates/js-template-default/frameworks/runtime-src/Classes/AppDelegate.cpp # templates/js-template-default/frameworks/runtime-src/proj.android/app/jni/Android.mk # templates/lua-template-default/CMakeLists.txt # templates/lua-template-default/frameworks/runtime-src/proj.android/app/jni/Android.mk # tests/game-controller-test/Classes/GameControllerTest.cpp # tests/js-tests/project/CMakeLists.txt # tests/js-tests/project/Classes/AppDelegate.cpp # tests/js-tests/project/proj.android/app/AndroidManifest.xml # tests/js-tests/src/tests-main.js # tests/lua-empty-test/project/CMakeLists.txt # tests/lua-empty-test/project/Classes/AppDelegate.cpp # tests/lua-empty-test/project/proj.android/app/AndroidManifest.xml # tests/lua-game-controller-test/project/Classes/AppDelegate.cpp # tests/lua-game-controller-test/project/proj.android/app/AndroidManifest.xml # tests/lua-tests/project/CMakeLists.txt # tests/lua-tests/project/proj.android/app/AndroidManifest.xml # tests/lua-tests/project/proj.android/app/proguard-rules.pro # tests/lua-tests/src/EffectsTest/EffectsTest.lua # tests/lua-tests/src/ParticleTest/ParticleTest.lua # tests/lua-tests/src/SpriteTest/SpriteTest.lua # tests/lua-tests/src/TransitionsTest/TransitionsTest.lua # tests/lua-tests/src/WebViewTest/WebViewTest.lua # tests/lua-tests/src/mainMenu.lua # tests/performance-tests/Classes/tests/BaseTest.cpp # tools/cocos2d-console
huangwei1024
pushed a commit
to huangwei1024/cocos2d-x
that referenced
this pull request
Jun 20, 2019
It is necessary for flexible inheritance from the base class.
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 <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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is necessary for flexible inheritance from the base class.