Commit Graph

13115 Commits

Author SHA1 Message Date
leeda edee97278f V3 android cmake support, add mac/ios support (#18646)
* CMake build improvements

* android cmake support

* Enable proguard for cocos2d

* examples & test cmake support

* add android build type param to gradle.properties file

* less warnings

* update all android configs to recomended settings

* fix network cmake error

* fix js-tests cmake error

* android build config, add cmake

* android build config, add cmake

* add lua share lib

* android lua cmake build fix

* fix

* luajit test

* run fail, still

* fix js-warning

* correct lua main include

* lua test project cmake support android

* try to add lua-template cmake support

* lua template fix

* js_tests support cmake on android

* js-tests improve

* cmake support js-template

* test to realise prebuild

* cmake improve, no feature

* improve templates cmake

* refactor cmake struct

* correct cpp-tests cmake

* cpp-templates cmake improve

* typo fix

* cmake struct refator

* change default option

* adapt new project struct

* uniform cmake test style

* add_dependencies to support make -j

* little struct improve

* little fix

* adapt cmake bin dir

* little improve about cmake version

* change build all tests condition

* add source_group for Xcode

* add mark source files

* add more mark source code

* add template project to test

* add macos info.plist template

* add pak macos for all project

* lua test icon fix

* not consider lua project for now

* modify pak method

* add another ios toolchain

* add ios system library

* update ios toolchain, and reduce ios compile errors

* reduce error

* make ios engine lib compile pass

* cpp-empty-test ios bundle

* cpp-tests ios support

* js-tests ios support

* templates project support ios

* fix the way of lua-tests package

* try to fix lua-template on macOS

* comment lua-template sim file

* improve display on xcode

* update cmake readme

* check android compile again

* fix android compile error

* fix linux cmake res error

* update deps version, for cmake

* fix lua_template linux compile error

* close android cmake support for now

* review template android share library name

* change PROP_BUILD_TOOLS_VERSION version to 27.0.1

* change android compile version

* make `PROP_APP_PLATFORM` back, add comments for android native build

* Revert "make `PROP_APP_PLATFORM` back, add comments for android native build"

This reverts commit 272ddc19886891b9502cde070753a870c0fdb588.
2018-02-08 09:24:33 +08:00
Dimon4eg b3285edb56 Speed up windows build (#18662)
* added precompiled headers

* Configure Visual Studio projects to use precompiled headers
2018-01-29 16:36:38 +08:00
leeda 18a6d8241d update Copyright. might need manual fix later (#18659)
* Copyright use python script updated. might be fix by manual later

* Revert "Copyright use python script updated. might be fix by manual later"

This reverts commit 49e99418e4da1fd02afda448ddeb16210f5e8c71.

* re modify copyright, consider utf-8-sig encoding

* another situation, add Copyright before  "Permission is hereby granted"

* Revert "another situation, add Copyright before  "Permission is hereby granted""

This reverts commit ee82591d32353c7ce2e146fe51ef447433b47571.

* another situation, add Copyright before Permission is hereby granted

* change "Copyright (c) 2016-2016 Chukong Technologies Inc." to " Copyright (c) 2016 Chukong Technologies Inc."

* script modify copyright, consider is cocos copyright or not

* change "Copyright (c) 2017 Chukong Technologies Inc." to "Copyright (c) 2016 Chukong Technologies Inc."

* manual fix, not fix audio related

* change "2016-2016" to "2016"
2018-01-29 16:25:32 +08:00
Jeff Wang e0b5034982 Update CCConsole.cpp (#18649) 2018-01-22 09:23:45 +08:00
minggo e88a05e49a
Fix RenderTexture DepthAndStencil issue on Android (#18648)
* Fixing issue where Stencil and Depths buffers would not function for a render texture if you backgrounded an application, and then resumed.

* Fixing typo: bufffer -> buffer
2018-01-21 19:07:49 +08:00
newnon 2ff42bb38e V3 static analize fixes (#18638)
* fix different problems founded by static analize

* fix bad render assert

* Fix misprint

* reverted calloc in CCScheduler
2018-01-19 13:40:41 +08:00
CocosRobot 4a23e754b2 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18647) 2018-01-19 09:28:46 +08:00
newnon 5d006192aa V3 multisampling support (#18632)
* Multisampling support

* fix opengl initialization with multisampling

* fix merge conflict

* reverted default attributes
2018-01-19 09:28:22 +08:00
monkey256 5ddf8fb596 Fix a crash bug when the UserDefault.xml file is empty. (#18626)
* Fix a crash bug when the UserDefault.xml file is empty.

* Fix a crash bug when play multiple timeline animations.

* Fix a crash bug when loading .plist files.

* Fix code style.
2018-01-19 09:25:58 +08:00
newnon 7e27c250b1 android emulator stensil fix (#18637)
* android emulator stensil fix

* Android emulator fix changed to comment
2018-01-19 09:24:53 +08:00
newnon 58077edc00 Add blend function to Text (#18631) 2018-01-19 09:19:36 +08:00
CocosRobot 63767d5550 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18642) 2018-01-18 17:47:46 +08:00
newnon 2861135cb5 fix nbsp (#18147) 2018-01-18 16:50:50 +08:00
minggo 38864456bf
fix issue that render texture will have wrong effect if using with global z order (#18629) 2018-01-18 14:28:40 +08:00
newnon 881e5d12c7 add one more android return buttons (#18636) 2018-01-18 09:42:28 +08:00
James Chen 2bb2e9f24a Reverts Node::cleanup changes in PR #17836 which is merged in v3.16. (#18565)
* Reverts Node::cleanup changes in PR #17836.

Reason please review the bug report: https://github.com/cocos2d/cocos2d-x/issues/18104

* Adds comment for reverting code in Node::cleanup.
2018-01-17 11:09:23 +08:00
minggo 7058b7ce8a
[ci skip]make codes more readable (#18627) 2018-01-16 15:30:11 +08:00
James Chen b2ecbca549 fix JSB Memory leaks and crashes (#18577)
* [game] Uses global compartment.

* fixed cocostudio bug.

* Fixes Memory leak for JSB.

* Memory leak in ActionsTest.js

* js_callfunc binding check whether jsThis is valid.

* Fixes potential crash in DownloadDelegator .

* CCLOG -> CCLOGINFO for garbage collect callback.

* jsb_c_proxy_s is a struct which contains a JS::Heap<> cpp object. Need to use `new`/`delete` to manage its memory.

* The functionality of JS controls C++ object's lifecycle isn't stable enough, please don't enable it now. Make an error if user enables it.

* Compilation error fixes.

* Removes unused JSAutoCompartment since we use JS_EnterCompartment/JS_LeaveCompartment now.
2018-01-10 14:39:45 +08:00
leeda 8f1459b8ef fix spine crash (#18582) 2018-01-10 14:34:24 +08:00
Vladyslav Kaplun 4f386a4d26 18572 PR amends & override warning fix (#18580) 2018-01-09 09:26:15 +08:00
Ryan B 457de1cce1 Android Emulator Blank Screen 0x501 and 0x502 Problem Bugfix Update (#18606) 2018-01-03 17:15:00 +08:00
minggo c36c9824d9
Revert "fix keyback bug after opened a page (#18153)" (#18601)
This reverts commit 6d50a844d4.
2018-01-02 10:38:02 +08:00
Sevellion 6d50a844d4 fix keyback bug after opened a page (#18153)
bug happen when:
1.implement keyback in a scene
2.implement webview in that scene and load a default URL
3.click any link and wait for it to load
4.press key back, the implemented keyback will not be called
2018-01-02 10:37:38 +08:00
Tiago Martines 2c025d8048 Fix actions with zero duration on NDK 16. (#18596) 2018-01-02 10:35:54 +08:00
Ruud Arentsen ea22822875 Added support for BMFont in TextField (#18587)
* Added support for BMFont in TextField

* Added cursor support for BMFont in TextFieldTTF
Made BMFont detection case insensitive and a bit more fool proof

* Added TextField::createWithBMFont, so that the font size is determined internally.

* Revert "Added TextField::createWithBMFont, so that the font size is determined internally."

This reverts commit 46b4e72ba44979b012ffa52bb78ea0a8493f7869.

* fix BMFont Cursor scale

* remove error add subproject
2017-12-29 11:24:02 +08:00
Peter Siegmund bbdd289a62 Fix gradlew build (#18592)
* fixed ProGuard rule file

* add missing VIBRATE permission

* move permission to correct position in AndroidManifest.xml
2017-12-27 09:36:11 +08:00
Jeff Wang 01ee30a023 improvements for EditBox-win32 (#18579)
* improvements for EditBox-win32

* add test case

* Update UIEditBoxImpl-win32.cpp
2017-12-22 09:14:27 +08:00
CocosRobot 48c55e5891 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18573) 2017-12-20 10:18:55 +08:00
sbrednikhin f0a28d261b Partial cursor support for text field with system font (#18555)
* Partial cursor support for text field with system font

Enables cursor support without cursor blinking an zero with of cursor symbol. In case of system font usage magical "/b" symbol won't be used, also update won't be scheduled.

* Update CCTextFieldTTF.cpp
2017-12-19 08:56:30 +08:00
Vladyslav Kaplun 4c0361e184 Fix cocos2d::EditBox padding (#18572) 2017-12-18 11:23:36 +08:00
AIGRIND 45992aa80e ScrollView API to stop overall scroll (#18552)
* ScrollView API to stop overall scroll

* ScrollView API to stop overall scroll

* ScrollView API to stop overall scroll

Cancel current touch handling after stopScroll() is called

* New test for scrolling stop in UIScrollView

* New test for scrolling stop in UIScrollView
2017-12-14 13:38:03 +08:00
sbrednikhin 9f15e34257 Avoid of type overflow while list size calculation. (#17697)
If _items container is empty `(length - 1) * _itemsMargin` will be large positive value.
Using `size_t` causes type overflow and large positive sizes.
Using int will cause negative size values.
Direct check looks like the best way.
2017-12-14 11:32:34 +08:00
James Chen a664e6d5b3 Fixes missing return value of onWavClose function. (#18544) 2017-12-12 17:50:57 +08:00
James Chen 89781a44df Fixes ResizableBufferAdapter<Data>::resize doesn't consider the situation of new size which is lower than old size. (#18553) 2017-12-12 17:49:11 +08:00
Jeff Wang 7916beb314 fix : win32 system label has wrong scale factor (#18520)
* Update UIEditBoxImpl-win32.cpp

* Fix a fixme
2017-12-08 18:18:04 +08:00
Greg Rynkowski 78f2d9940a Fix typo in the SkeletonAnimation::createWithFile (#18542) 2017-12-08 17:23:08 +08:00
James Chen f77f724caa fixed #18538: TrianglesCommand hashing technique doesn't take padding into account (#18543)
* fixed #18538: TrianglesCommand hashing technique doesn't take padding into account

* sizeof fix
2017-12-08 16:05:58 +08:00
CocosRobot fe69b07e75 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18540) 2017-12-07 13:45:26 +08:00
James Chen 907b6fda75 Uses NDK r16 to generate js/lua binding code (#18536) 2017-12-07 13:34:12 +08:00
CocosRobot 190e1239bf [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18535) 2017-12-05 18:04:27 +08:00
James Chen d21af3b981 Some fixes after using ndk r16 clang to build android projects (#18531)
* [android] Fixes warning in UrlAudioPlayer.cpp and CCUserDefault-android.cpp

* Don't write 'using namespace std;' in header files.

* Uses std::unordered_map instead of std::map for Particle3D module.

* Updates external/config.json to v3-deps-141

* Continue to replace `gnustl_static` to `c++_static` for templates and test projects.

* Updates CCConsole.h/.cpp to resolve the following issue on Android:

jni/../../../../../cocos/base/CCConsole.cpp:321:28:   required from here
/Users/james/Software/android/android-sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include/utility:506:63: error: incomplete type 'std::__ndk1::is_move_assignable<cocos2d::Console::Command>' used in nested name specifier
                         is_move_assignable<first_type>::value &&
                                                               ^
make: *** [obj/local/arm64-v8a/objs-debug/cocos2dx_internal_static/base/CCConsole.o] Error 1

* Fixes a memory leak while addCommand and other minor changes.

* Updates tolua/cocos2dx.ini, don't bind Console::Command

* Adds CC_DLL for Console::Command

* Reverts tolua/cocos2dx.ini and ignore Console::[add Command addSubCommand getSubCommand delSubCommand].

* Ignores Console::getCommand.
2017-12-05 13:35:16 +08:00
Yannick Berthier 1b2a48bd2a Fixed memory leak when using TTF labels (#18505)
* Fixed memory leak when using TTF labels

* FIX : Fixed memory leak in updateContent instead of dealloc
2017-12-04 09:02:13 +08:00
homolumo 878557814f fix build bug in CCLuaJavaBridge.h (#18524) 2017-12-01 09:47:02 +08:00
crazyhappygame 0ff92d3bbd Win10 remove disabled warnings (#18527) 2017-12-01 08:57:49 +08:00
will 966483be30 fix memory leak in FontFreeType::create (#18503) 2017-11-30 16:45:48 +08:00
jjinglover 5f8fde8669 fix keyBoard bug when input chinese on winrt platform (#18516) 2017-11-29 09:21:06 +08:00
CocosRobot 187a6639e9 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18522) 2017-11-29 09:19:23 +08:00
drelaptop 7dee719a94
add an empty create method for UICCTextField (#18518)
fix Issues 18403
* add an empty UICCTextField::create() method

* make normal comment

* code style change

* refinement changed code
2017-11-28 16:42:14 +08:00
Priority10 b9b3640d45 Update CCGLView.cpp (#18508) 2017-11-28 09:30:41 +08:00
crazyhappygame 03066ff47d Windows 10 update compiler to Visual Studio 10 PlatformToolset v141 (#18511) 2017-11-27 17:10:52 +08:00
mschoi17 9eb7e3242e Add comments for Cocos2dxSound.java (#18512)
Add comments for Cocos2dxSound.java
2017-11-27 17:10:07 +08:00
mschoi17 7e4b71a1fd Add comments for cddandroidAndroidJavaEngine.h (#18513)
Add comments for cddandroidAndroidJavaEngine.h
2017-11-27 17:09:17 +08:00
minggo 289668015d
fix warnings (#18499) 2017-11-24 10:41:37 +08:00
CocosRobot 3ffc1e8644 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18494) 2017-11-23 16:06:18 +08:00
Jonathon Walz e890cfa6be Fix endian detection on Android (#18480)
When compiling for Android, the preprocessor defines for byte order are
are not included in the sys/param.h chain. By including sys/endian.h we
we can ensure that the necessary macros are included.

It is especially important that endian-ness is correctly detected as the
node render order uses this information to sort #16262. Without this
fix, nodes will be rendered in the incorrect order on 64-bit Android
devices (on 32-bit, a different algorithm is used that is not
sensitive to byte order).
2017-11-23 09:36:30 +08:00
Priority10 602b9e51f2 Tiny comment fix in ccConfig.h (#18483) 2017-11-23 09:35:41 +08:00
James Chen 14bca227e8 fixed #18474: Provides an interface for getting SafeArea (#18489)
* fixed #18474: Provides an interface for getting SafeArea

* Adds getSafeAreaRect test demo in cpp-empty-test.

* @available(iOS 11.0, *) isn't supported in Xcode8. So we use the old way.
2017-11-23 09:34:23 +08:00
Mozart Louis bb479e4f6d Android Studio 3.0 + Switching to libc++ (c++_static) + Simplify PROP_* values + Adding default Proguard Config for cocos (#18470)
* Updated android build process to use c++_static

* Comment out org.gradle.jvmargs

* Updated all project in test directory

* Update C++ Template

* Update js and lua projects

* Update Proguard + Lower minSdkVersion to 14

* Added All PROP_* values + updated build.gradle

* Updated versions
2017-11-23 09:08:50 +08:00
Vadim Malckin a88ad87731 Bug in mp3reader.cpp (#18476)
* Bug in mp3reader.cpp

This directive  #include <string.h> is used for memset(b, c, l).
Without it the attemt to install .apk (ex. cocos run . -p android --android-studio) is creshed.
Found in the downloaded from http://cocos2d-x.org/download version cocos2d-x-3.16

* #include <string.h> added to avoid crash

The directive #include <string.h> is used for memset(b, c, l).
Without it the attempt to install .apk (ex. cocos run . -p android --android-studio) is crashed.
Found in the downloaded from http://cocos2d-x.org/download version cocos2d-x-3.16:

Here part of log:

In file included from C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorGlobalNewDelete.cpp:27:0:
C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorStrategyGlobalSmallBlock.h: In constructor 'cocos2d::allocator::AllocatorStrategyGlobalSmallBlock::AllocatorStrategyGlobalSmallBlock()':
C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorStrategyGlobalSmallBlock.h:96:75: error: 'memset' was not declared in this scope
             memset(_smallBlockAllocators, 0, sizeof(_smallBlockAllocators));
                                                                           ^
make: *** [C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2dx_internal_static/base/allocator/CCAllocatorGlobalNewDelete.o] Error 1
make: *** Waiting for unfinished jobs....

:TestAndroidGame2:externalNativeBuildDebug (Thread[Task worker for ':',5,main]) completed. Took 16.425 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':TestAndroidGame2:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process F:\android-ndk-r16\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\Vadim\Documents\Cocos2d\TestAndroidGame2\frameworks\runtime-src\proj.android-studio\app\jni\Android.mk NDK_APPLICATION_MK=C:\Users\Vadim\Documents\Cocos2d\TestAndroidGame2\frameworks\runtime-src\proj.android-studio\app\jni\Application.mk APP_ABI=x86 NDK_ALL_ABIS=x86 NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=C:\Users\Vadim\Documents\Cocos2d\TestAndroidGame2\frameworks\runtime-src\proj.android-studio\app\build\intermediates\ndkBuild\debug\lib NDK_TOOLCHAIN_VERSION=4.9 APP_PLATFORM=android-26 NDK_MODULE_PATH=C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x;C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos;C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/external -j4 NDK_DEBUG=1 C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/x86/libcocos2djs.so}
  [x86] Compile++      : audioengine_static <= mp3reader.cpp
  [x86] Compile++      : cocos2dx_internal_static <= CCAllocatorGlobalNewDelete.cpp
  In file included from C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorGlobalNewDelete.cpp:27:0:
  C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorStrategyGlobalSmallBlock.h: In constructor 'cocos2d::allocator::AllocatorStrategyGlobalSmallBlock::AllocatorStrategyGlobalSmallBlock()':
  C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/cocos2d-x/cocos/./base/allocator/CCAllocatorStrategyGlobalSmallBlock.h:96:75: error: 'memset' was not declared in this scope
               memset(_smallBlockAllocators, 0, sizeof(_smallBlockAllocators));
                                                                             ^
  make: *** [C:/Users/Vadim/Documents/Cocos2d/TestAndroidGame2/frameworks/runtime-src/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/x86/objs-debug/cocos2dx_internal_static/base/allocator/CCAllocatorGlobalNewDelete.o] Error 1
  make: *** Waiting for unfinished jobs....
2017-11-21 16:16:25 +08:00
mschoi17 86f5d4cff8 fix comments for JniHelper.h (#18481)
update #18477
2017-11-21 11:36:10 +08:00
Milos Jakovljevic ff8d2cc20f Fixing crash in Allocator if there are no allocated pages (#12908) 2017-11-21 10:56:29 +08:00
Jason Xu a8b6e33d9c Unregister spine event lua event handler should set listener to null. (#12845) 2017-11-21 10:55:55 +08:00
mschoi17 fd8658e22f Add Comments for JniHelper.h (#18477)
* Add Comments for JniHelper.h

* Update JniHelper.h
2017-11-20 10:41:56 +08:00
Jeff Wang bceb242ebd no message (#18460) 2017-11-10 15:05:21 +08:00
protito ed647fbe79 Added missing #include statement (#18452) 2017-11-09 10:04:45 +08:00
halx99 9b8fbf708d Fix cocos2d::log va_list re-use bug (#18426) 2017-11-08 14:07:59 +08:00
halx99 a35c3200a8 Improve StringUtils::format implementation. (#18425) 2017-11-08 14:05:03 +08:00
Jeff Wang b7bb03a061 RichText improvements (#18447)
* RichText improvements

* add support for continuous \n

* update UIRichText.cpp

* fix issue out of bounds

* Update UIRichText.cpp

* replace defaultHeights with lineHeights

* Update UIRichText.cpp
2017-11-08 13:59:57 +08:00
Jeff Wang 540980ab24 Update UIWebViewImpl-ios.mm (#18448) 2017-11-07 09:18:33 +08:00
James Chen db11024924 Reverts add search path logic in PR #17435 . (#18419)
If the last search path is _defaultResRootPath, addSearchPath(path) should not force that the last path is still default resource root path.
I made this mistake and broke the compatibiliy, since I thought resource root path definitely is low priority while search in most case. However, I should not make this assumption.

Anyway, dear developers, thanks for all of you review cocos2d-x source code. I accept any suggestion, any blame. I think everyone makes mistake more or less.
The key point is that `PLEASE DON'T MAKE THE SAME MISTAKE SECOND TIME, THIRD TIME`.
So please don't blame our developers who makes mistakes. We need to work together with all our developers to make our engine better and better.

And in fact, I never think that I deal with cocos2d-x source code as my 'own branch' although I contributed lots of code to it. I didn't push any code to repo directly since I sent Pull Requests. Every one could review code and comment in pull request. We encourage more communication with our developers in github or the forum. You could say GOOD , BAD or SHIT, but please do your best to respect every developer who made a contribution.

Thanks all of you. Good luck!
2017-11-06 10:41:01 +08:00
Dimon4eg 527dfd4579 Fix 60 fps for android (#18445) 2017-11-06 10:30:52 +08:00
Shura L ce5f37c7f5 set texture anti-alias by deault in RenderTexture (#18442)
fix issue #12459
2017-11-06 10:28:36 +08:00
Jeff Wang 0051c21be6 fix typos (#18444) 2017-11-06 10:28:11 +08:00
minggo 19bd8e3835
Spine update (#18438)
* update spine runtime and resource license

* apply patch to fix crash

* fix python path
2017-11-03 13:44:13 +08:00
minggo 1d356a160a
remove vs2013 libs (#18439) 2017-11-03 10:53:14 +08:00
Nikita 28b1953411 Revert #18327 (#18436) 2017-11-03 10:02:50 +08:00
minggo 56baabfe50
update glfw to 3.2.1 (#18434) 2017-11-02 15:25:12 +08:00
minggo 8e2ad2fd12
Editbox init member variable (#18432)
* initialize _adjustHeight

* remove unneeded void
2017-11-02 13:57:11 +08:00
CocosRobot d42098e2c4 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18431) 2017-11-02 11:17:04 +08:00
minggo cfaa77be28
Update spine (#18427) 2017-11-02 09:06:13 +08:00
Felippe Durán d651298d3e Fix bug of returning UNKNOWN event for return type key SEARCH/SEND in EditBox for Android and SEARCH for iOS. (#18192) 2017-11-01 17:33:31 +08:00
minggo b53eb25200
use prebuilt version of Box2D (#18422) 2017-10-31 14:31:23 +08:00
minggo 496de07633 don't have to set NDK_MODULE_PATH manually 2017-10-26 13:40:27 +08:00
sbrednikhin 6cd2c0c340 Fix for issue #18409 (#18410)
Remove unnecessary PLTE chunk from png.
2017-10-26 11:39:50 +08:00
minggo 33135d0d14 remove unneeded log (#18406) 2017-10-26 10:12:53 +08:00
Vladyslav Kaplun 0f9a9c55d1 Fix status check in AudioDecoder.mm (#18374) 2017-10-25 10:48:45 +08:00
Greg Rynkowski 76ba85adfb Make cocos' Android.mk self containing (#18392) (#18393)
PROBLEM
-------

cocos makefile is not self-containing.

From the perspective of a developer that link his target with
`cocos2dx_static` library, it should specify in his `Android.mk` only
a path to a makefile that defines that module, by

a) using `import-add-path` and `import-module`

    $(call import-add-path, <path-to-cocos-root>)
    $(call import-module, cocos)

  or ...

b) using directly an `include` command

    include <path-to-cocos-root>/cocos/Android.mk

Unfortunately the current configuration of cocos' Android.mk doesn't
specify (using `import-add-path`) locations of modules that it uses.
In result, every dev that uses cocos to create Android app has to
populate NDK_MODULE_PATH at his Android.mk files by adding two lines:

    $(call import-add-path, <path-to-cocos-root>/cocos)
    $(call import-add-path, <path-to-cocos-root>/external)

Those lines have to be placed at cocos/Android.mk file.

The current configuration of build script breaks a good practice of
hiding internal details from clients of library or component. In fact
the script exposes internal dependencies and require from a dev to make
them out.

---

SOLUTION

This commit adds corresponding `import-add-path` commands to Android.mk
files.

---

HOW TO TEST

1. Create cocos2d-x app.

2. Import in your Android.mk file a `cocos` module using one of
aforementioned approaches.

3. The app should compile without a error message like the one below:

    Android NDK: jni/../../cocos2d/cocos/Android.mk: Cannot find module with tag 'freetype2/prebuilt/android' in import path
    Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?

Issue: https://github.com/cocos2d/cocos2d-x/issues/18392
2017-10-24 09:20:54 +08:00
CocosRobot bf67850710 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18397) 2017-10-23 11:58:20 +08:00
SBJoker f0be714c0d Fix for Non-TTF Label Shadow, it makes it follow label opacity (#18324) 2017-10-23 11:57:43 +08:00
Vladyslav Kaplun 9e3cc37a0c Remove autorelease mark from UIWebViewWrapper and manage memory manually (#18391) 2017-10-23 11:40:52 +08:00
Nikita 4726fa3b3d Corrected bugs with cursor in TextField (#18371)
* No need to update password text in ccui TextFiled, because it's handled in TextFiledTTF

* Do not update visual state of Label if placeholder set when keyboard is attached
2017-10-23 11:37:07 +08:00
crazyhappygame d06c082bf2 Fix Windows 10 compilation (#18394) 2017-10-23 11:18:14 +08:00
CocosRobot 79b97e9992 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18385) 2017-10-20 10:06:21 +08:00
pyrosphere 09d73ae238 Fix accelerometer on android when screen is rotated on reverse landscape or reverse portrait. (#18317) 2017-10-20 10:05:07 +08:00
okamura d13d55c23f Fix CameraBackgroundColorBrush cannot use alpha (#18281) 2017-10-20 09:43:45 +08:00
Vladimir Perminov 19ea797593 Fix crash TextFieldTTF::setCursorFromPoint (#18159)
A similar problem of
https://github.com/cocos2d/cocos2d-x/issues/15926
2017-10-16 22:58:51 -05:00
Jeff Wang 40ec511f48 improvements for StringUtils::StringUTF8 (#18356)
* 1. add 'const'
2. add range support for 'getAsCharSequence'

* remove default arguments

* use another variable to make it more clear

* rename isAnsi-> isASCII
2017-10-16 22:03:32 -05:00
minggo 25c240391c fix crash (#18375) 2017-10-16 22:01:59 -05:00
xiaoyur347 617009f1cf fix CCTextureCache addImageAsync race condition (#18366) 2017-10-16 00:58:29 -05:00
Jeff Wang 6e535f40e3 fix memory leak (#18351)
fix memory leak in `UserDefault::deleteValueForKey` when `key` not found
2017-10-15 21:56:41 -05:00
Saber Haj Rabiee 37d05d3ca0 wrong code committed, forgot to put :: operator. (#18372) 2017-10-15 21:37:01 -05:00
Greg Rynkowski d32233d787 Fix "Possible misuse of comma operator here" (#18350) 2017-10-12 23:00:04 -05:00
minggo 10acb5a045 update version (#18367) 2017-10-12 22:58:43 -05:00
Jeff Wang 2132e48cd2 fix Memory Leak: ObjectFactory destroyInstance (#18352)
`ObjectFactory destroyInstance` function not called
2017-10-12 22:55:37 -05:00
halx99 809cfe3558 [ci skip]Fix endian detection macro. (#18354) 2017-10-10 09:01:19 +08:00
Knox 0d37220beb [ci skip]EditBox::setText() may crash on some Android devices 2017-09-28 10:59:03 +08:00
Knox 78a167fec1 [ci skip]when keyboard is popup, engine should not continue to handle touch events 2017-09-28 10:25:25 +08:00
minggo f2db054edb [ci skip]fix android violation (#18309) 2017-09-25 09:28:03 +08:00
halx99 e5d19429b8 [ci skip]Make the sort behavior is same on 32bit and 64bit (#18301)
* Make the sort behavior is same on 32bit and 64bit

* Update CCNode.h

* Update CCNode.cpp

* Update ccMacros.h

* Use std::int32_t to for zOrder

* Update CCNode.cpp
2017-09-25 09:27:33 +08:00
James Chen b633260020 Should use setTextColor for editbox placeholder. (#18311) 2017-09-22 16:06:13 +08:00
Jeff Wang bd59575468 fix #18296 (#18299)
fix #18296
2017-09-22 11:56:51 +08:00
minggo a1ef303f47 Merge pull request #18294 from minggo/sync-v316
Sync v316
2017-09-21 11:07:20 +08:00
Thorbjørn Lindeijer 7350aeca8c TMX: Added support for reading the object.rotation attribute (#11540)
Introduced with Tiled 0.10, this attribute stores the rotation of an
object in degrees clockwise.

Closes bjorn/tiled#921
2017-09-20 14:31:15 +08:00
minggo b275a3e2f0 fix conflict 2017-09-20 09:11:35 +08:00
minggo 66471154b0 do not compile unneeded file (#18290) 2017-09-20 09:05:27 +08:00
mogemimi a5374d0411 Fix minor typos (#18289) 2017-09-20 09:05:00 +08:00
yycmmc edd81d3528 use error macro to replace constant value 1410L (#18264) 2017-09-19 10:05:46 +08:00
minggo bb21a206a9 update vertex buffer to update color (#18283) 2017-09-19 09:41:10 +08:00
minggo 99f5fbb63f Fix VAO in CameraBackgroundBrush (#18278) (#18279) 2017-09-18 15:47:50 +08:00
pyrosphere 80c9292969 Fix VAO in CameraBackgroundBrush (#18278) 2017-09-18 10:50:00 +08:00
minggo 36f7f3c37e Merge branch 'v3.16' of github.com:cocos2d/cocos2d-x into syn-v316 2017-09-13 11:18:39 +08:00
James Chen 2fbb6fe32a [ci skip][lua] Bug fix in xhr:getResponseHeader("xxx") and better coding particle. (#18252)
* [lua] Bug fix in xhr:getResponseHeader("xxx") and better coding particle.

* More const auto &.
2017-09-13 10:54:35 +08:00
pandamicro 1929265a7c [ci skip] Fix web engine issues for 3.16 QA (#18251)
* Fix web test case issue in UIListView

* imgLoader callback use texture instead of image

* Update web ref
2017-09-11 21:03:22 -05:00
James Chen 6318324f4d [android] Fixes Cocos2dxActivity is re-created which causes crash if launching app first time and re-opening from icon (#18247) 2017-09-12 09:38:54 +08:00
CocosRobot 46e70d3c71 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18236) 2017-09-08 10:49:17 +08:00
James Chen ddb3c49eec Workaround for getting AL_STOPPTED state after alSourcePlay(sourceId). (#18228) 2017-09-08 09:29:39 +08:00
minggo ce1c207aee add LayerMultiplex::switch(int ,bool) (#18224) 2017-09-08 09:28:57 +08:00
CocosRobot 5d2c3f5d43 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18234) 2017-09-08 09:28:16 +08:00
halx99 557a6c0bf4 Add sourcePosition compatible support. (#18230) 2017-09-07 17:16:46 +08:00
minggo aca7c86739 set default search path to the path the same as .exe file (#18226) 2017-09-07 11:22:00 +08:00
minggo e161b613a4 make jnihelper thread safe (#18189) 2017-09-06 15:07:01 +08:00
minggo c89e35e22a Merge pull request #18216 from cocos2d/v3.16
V3.16
2017-09-06 14:59:36 +08:00
James Chen 7a65363208 Changes JS version to 3.16. (#18210) 2017-09-06 09:10:14 +08:00
James Chen 1fed9ae33b [ci skip]fix android AudioEngine Crash (#18124) (#18209)
* *fix android AudioEngine Crash

switch to background when sound effect is about to end, it's maybe crashed when switch to foreground again

* use "emplace" instead of "insert"
2017-09-01 11:30:10 +08:00
zoxin 7cd828119d [ci skip]fix android AudioEngine Crash (#18124)
* *fix android AudioEngine Crash

switch to background when sound effect is about to end, it's maybe crashed when switch to foreground again

* use "emplace" instead of "insert"
2017-09-01 10:16:04 +08:00
Valera 03635ecc4a Improved Cocos2dxLuaLoader.cpp (#18171)
* Improved Cocos2dxLuaLoader.cpp

* Added testcase for new LuaLoader
2017-08-25 09:32:02 +08:00
jett_yu d11674fd9c [ci skip]implementation conversion lua table to ObjC Dictionary (#18134) 2017-08-24 14:17:21 +08:00
James Chen 1360c2860a Fixes compilation errors for android audio module while building with x86 arch. (#18150)
* Fixes compilation errors for android audio module while building with x86 arch.

* Update bitops.h
2017-08-22 15:13:08 +08:00
Dmitry 6e013b5a8a fixed GLViewImpl::getMonitorSize() for desktop platforms (#18141) 2017-08-22 14:06:53 +08:00
CocosRobot b274322961 [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (#18183) 2017-08-22 10:06:38 +08:00
newnon 9815ccba62 Fix android problem (#18142) 2017-08-22 09:52:28 +08:00
newnon 70ea1fc4d1 fix for ios audio engine (#18146) 2017-08-22 09:46:15 +08:00
newnon a8026b0136 fix android problem with 24 bit depth buffer on some devices (#18148) 2017-08-22 09:43:07 +08:00
newnon 04b2dbbcdb Blend function for UIImageView (#18149) 2017-08-22 09:40:37 +08:00
pyrosphere 0bebd83f6b Fix alpha blending during the animation of TransitionCrossFade. (#18175) 2017-08-22 09:33:37 +08:00
James Chen 8adf780a3c fixed #17989: touch stops responding on android devices. (#18165)
It's caused by `FileUtils::getContents` is invoked in different threads and we use EventDispatcher::dispatchCustomEvent in `FileUtilsAndroid::getContents` to send an event to EngineDataManager.
Since EngineDataManager class is only for internal use and EventDispatcher isn't thread-safe, we make `EngineDataManager::onBeforeReadFile` public and invoke it `FileUtilsAndroid::getContents`.
2017-08-21 23:28:59 +08:00
minggo a6a5426986 [ci skip]update version and readme (#18169) 2017-08-17 14:34:22 +08:00
newnon afbf26ea3c fix FontAtlas crash on some Android devices (#18145) 2017-08-17 00:06:01 +08:00
newnon 9f98e4cf83 less warnings (#18144) 2017-08-14 22:31:31 +08:00
Tyler Dauch a7d7aaa368 Update AudioCache.h (#18136) 2017-08-10 17:40:24 +08:00