Commit Graph

1251 Commits

Author SHA1 Message Date
Atsumu Ono 08467be5a8 Add const keyward to Node::isScheduled and Scheduler::isScheduled (#17833) 2017-05-19 17:24:05 +08:00
James Chen 95baff7086 fixed #17835: pauseEventListenersForTarget doesn't work correctly while in dispatching event (#17836)
* add test.

* fixed #17835: pauseEventListenersForTarget doesn't work correctly while in dispatching event

* remove a unneeded check
2017-05-19 14:03:51 +08:00
David DeSimone ca0a7f313e Changing AsyncTaskPool/Scheduler to better leverage move semantics (#17727)
* Changing CCAsyncTaskPool and CCScheduler to better leverage move semantics, to avoid several lambda copy constructor calls. Chaning call sites in the cocos engine to better leverage move semantics.

* Editing binding generator to not generate bindings for AsyncTaskPool::enqueue. Bindings were not previously generated for this function due to it's type signature involving a template parameter.

* Adding missing std::move call in AsyncTaskPool to skip a copy constructor call.
2017-05-08 13:39:17 +08:00
Dimon4eg a3cb7de101 Fix reschedule issue with same key (#17706)
* fix reschedule issue

* correct code formatting

* Fix isScheduled

* improve a bit performance of executing functions in cocos thread

* added test to verify reschedule issue

* re-init timer in schedule if timer exists and alive
2017-05-04 16:24:20 +08:00
Vladimir Perminov 973d6aa955 Added function for calculating md5 hash from Data. (#17762)
* Added function for calculating md5 hash from Data.

getFileMD5Hash now use getDataMD5Hash.

For example, AssetsManagerEx VerifyCallback.
Get Data from file, check equal size, if equal to get md5 hash.

* Data::isNull check size equal 0

* Build on linux and android.
2017-05-04 09:21:22 +08:00
newnon ad260980c7 projection fixes (#17487) 2017-04-10 09:15:40 +08:00
minggo 9ed5127edc synchronize v3.15 2017-04-01 17:16:45 +08:00
James Chen a924e29c2c Adds libmd5-rfc third-party library for calculating MD5 since the functions in <openssl/md5.h> aren’t exported in win10, plus <openssl/md5.h> seems to be private header. (#17625)
* Adds libmd5-rfc library since the functions in <openssl/md5.h> aren’t exported in win10, plus <openssl/md5.h> seems to be private header.

* Adds libmd5-rfc library for win32 and win10.

* Removes json/msinttypes folder from xcode since it’s only needed for win32 | win10.
2017-04-01 11:43:17 +08:00
James Chen 2b3087ffc5 Fixes ConsoleUploadFile test could not work on android. (#17607)
* Should not use fread to read file from assets, uses FileUtils::getDataFromFile instead.
* Client socket should not be closed immediatelly after ::send. Otherwise, sever may will receive “Connection reset by peer - Errno 104” error on some platforms. It could be 100% reproduced on Android.
2017-03-29 14:23:33 +08:00
James Chen 1eea499466 fixed #17603: Connection error in Console uploadFile test. (#17604)
* fixed #17603: Connection error in Console uploadFile test.

* tab -> spaces

* tab -> spaces

* tab -> spaces
2017-03-29 09:17:37 +08:00
mogemimi 8be22ce55c Fix typos in comments and strings (#17534) 2017-03-17 10:44:38 +08:00
rh101 27935acd64 VS and XCode project files have non-existent file references (#17512)
* [libcocos2d.vcxproj, libcocos2d.vcxproj.filters] Removed entries for non-existent files that were causing "Build is out of date" issues in Visual Studio
[project.pbxproj] Removed entries for non-existent file

* [libcocos2d.vcxproj.filters] Renamed CCStencilStateManager.h extension to .hpp.

* [libcocos2d.vcxproj, libcocos2d.vcxproj.filters] Removed entry for file CCDownloaderImpl.h which does not exist.

* Changed extension of CCStencilStateManager.hpp to .h
2017-03-16 13:54:50 +08:00
pandamicro 68fc0dbfa9 Add utils::getMD5Hash (#17520)
* Add FileUtils::getMD5Hash

* Improve name
2017-03-16 13:47:45 +08:00
pyrosphere e3bff6452d Support for the tvOS micro gamepad as a CCController (#17517)
* Fixes cocos2d build for tvOS.

* Support for the tvOS micro gamepad as a CCController.
2017-03-16 10:33:36 +08:00
pandamicro 75383bdcde Jsb improvements (#17513)
* Cleanup ScriptingCore code

* Add jsb.ENABLE_GC_FOR_NATIVE_OBJECTS to indicate the memory model

* Use incremental GC

* Improve ScriptingCore::executeFunctionWithOwner performance

* Support ScriptingCore::executeGlobalFunction

* Reuse js objects for get_or_create_weak_jsobject reduce memory usage

* Fix sequence / spawn js object lost issue

* Improve wrappers with cppOwner system
2017-03-16 09:42:16 +08:00
James Chen 90403fc632 Fixes memory issues catched by Xcode Analyze Tool. (#17489) 2017-03-14 11:09:31 +08:00
j-jorge 67d16bee98 Prevent unexpected calls to unscheduled selector in long updates. (#17431)
If the delta time dt passed to cocos2d::Timer::update(float) is longer than the
interval of the timer, then the timer will be triggered several times even if
the selector is unscheduled during the call.

This commit adds a flag in cocos2d::Timer stop the update loop if the selector
has been unscheduled.
2017-03-07 11:16:30 +08:00
radman0x c442275c8e 17357: Better encapsulate the definition of mouse buttons (#17358)
* 17357: Better encapsulate the definition of mouse buttons

Move definition of buttons from a list of #define's to an enum class and
make appropriate updates for successful compilation.

* 17357: Better encapsulate the definition of mouse buttons

Updates from code review:
* Removed changes to automatically generated files
* Removed std::ostream& convenience operator

* 17357: Fix mouse tests
2017-03-02 13:39:33 +08:00
CocosRobot 8fbf04ee28 Updates license year. (#17363) 2017-02-14 14:59:12 +08:00
CocosRobot d07794052f Update license to 2017 (#17362)
* Typo: CopyRight -> Copyright

* Copyright update: chukong-inc.com -> Chukong Technologies Inc.

* [js files] Copyright update: 2014 -> 2014-2017

* [cpp files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2015 -> 2015-2017

* [js files] Copyright update: 2014 -> 2014-2017

* Copyright update: 2016 -> 2016-2017

* Copyright update: 2013 -> 2013-2017

* Copyright update: 201?-201? -> 201?-2017

* License year fixes.

* Liscene year fix in CCRay.cpp

* Updates license years in CCGLProgramState.h & CCGLProgramStateCache.h
2017-02-14 14:36:57 +08:00
minggo e80f4bb9f6 use stable sort to keep order (#17321) 2017-02-08 13:57:41 +08:00
Jeff Wang ae60397472 add 'makeRef' for easier making a RefPtr (#17302) 2017-02-08 10:00:08 +08:00
mogemimi e2ad8946cb Replace unsigned int with size_t to avoid implicit conversion (#17297) 2017-02-07 09:41:19 +08:00
newnon 88c3fcde67 Full unicode support (#17179)
* Full unicode support

* test for emoji
2017-02-06 16:41:52 +08:00
j-jorge c616d6d9ff Compilation fix (#17209)
* Fix various compilation issues.

Mostly errors on field initialization order but also missing files
in CMakeLists and missing include directives.

* Fix compilations issues with GCC 6.2

* Fix gitignore libs/ entry to not ignore the Android external libraries.
2017-02-04 09:46:32 +08:00
Nakhyun Choi 42c77247cc Fixed Scheduler bug occured when unschedule target during update. (#17203) 2017-01-18 16:32:36 +08:00
mogemimi 8b9c89f6a9 Fix typos in comments and strings (#17201) 2017-01-18 15:41:18 +08:00
minggo d9637f30b0 remove scheduler in time (#17198)
* remove scheduler in time

* fix compiling error

* add test case

* fix logic error
2017-01-16 17:37:59 +08:00
mogemimi 1d2b73166e Fix typos in docs (#17132) 2017-01-11 09:31:45 +08:00
minggo 4574896dbb add some comments for key limitation (#17122) 2017-01-09 09:27:38 +08:00
James Chen c0291afad7 Merge branch 'v3.14' into merge-v3.14 2016-12-14 17:03:58 +08:00
pandamicro 5823f5792b Synchronize creator engine bug fixes and upgrade web engine (#17003)
* Add EventDispatcher#hasEventListener (sync from creator)

* Fix function wrapper using js object during its gc

* Support more system languages

* Direct log/error for better understanding problems & add sys.now

* Synchronize Editbox APIs

* Synchronize Scheduler.PRIORITY_NON_SYSTEM const

* Upgrade web engine

* Upgrade test cases

* Manually bind EventDispatcher::addCustomEventListener to avoid memory issue

* Manual bind EventListeners’ create to avoid memory issue

* Fix compilation issue when COCOS_DEBUG = 2

* Unify function name of Texture2D::releaseTexture

* Fix compilation issues and update web & bindings-generator

* Fix lua compilation issue

* Use %ld instead of %zd
2016-12-14 09:27:47 +08:00
David DeSimone 3b7ffcf5d0 unscheduleAll() does not unschedule scheduled with performFunctionInCocosThread. (#16856)
* Fixing issue where Scheduler::unscheduleAll() would not unschedule functions scheduled with Scheduler::performFunctionInCocosThread.

* Removing clear of _functionsToPerform from unscheduleAll, based on code review feedback. Adding a function removeAllFunctionsToBePerfomedInCocosThread, which will remove all pending functions scheduled with performFunctionOnCocosThread.

* Adding test case for Scheduler::removeAllFunctionsToBePerformedInCocosThread

* Adding proper cleanup code to Scheduler test for SchedulerRemoveAllFunctionsToBePerformedInCocosThread
2016-12-08 11:58:58 +08:00
minggo 7556b60103 check VAO with correct way (#16901) 2016-11-25 09:33:20 +08:00
Dmitry 1e1ac655b1 fixes for iOS 7 and earlier (#16879)
* initialize Director::_invalid on first init

* fix: Setting the GLView should be done after creating the RootViewController

* restore 2016 copyright on templates/cpp-template-default/proj.ios_mac/ios/AppController

* remove old iOS js and lua templates

* copy actual iOS templates from cpp to js and lua
2016-11-23 09:28:34 +08:00
pyrosphere 663bb4d7ed No CC_UNUSED_PARAM (#16812)
* Added -Wno-unused-parameter and removed all uses of the CC_UNUSED_PARAM macro

* Commented unused parameter names in .cpp files which previously used CC_UNUSED_PARAM

* Reverted -Wno-unused-param flag.
Moved deprecated touch methods definitions to .cpp file.
Commented more unused parameter names.

* Fixed some errors and warnings caused by the previous commit.

* Commented remaining unused parameter names in .cpp files.

* Fixed unused parameter warnings in headers.

* Fixed some more unused parameter warnings.

* Fixed some more unused parameters warnings.

* Fixed mistake in previous commit, missing ComAudioReader:: in method. Other warnings.

* Fixed build errors.

* Added missing file to CMakeLists
2016-11-16 09:48:37 +08:00
yahont e9b39a99e2 cocos2dInternal cleaned of some warnings (#16818)
* cocos2dInternal cleaned of some warnings: unused parameters and signed-unsigned comparisons

* -Werror removed

* tab fixed

* indent fixed

* more warnings fixed
2016-11-09 10:34:50 +08:00
Ce Zheng 4b3525f7a8 use STL emplace when possible (#16815)
* replaced some unordered_map::insert(std::make_pair(foo, bar)) with unordered_map::emplace(foo, bar)
* replaced some vector::push_back(std::make_pair(foo, bar)) with vector::emplace_back(foo, bar)

The old way will construct a std::pair first then call move constructor
when putting it into the container, while using emplace will construct
the pair in-place in the container. Also, the emplace way is shorter &
more concise.
2016-11-08 11:50:00 +08:00
SongChengJiang af8b9cc47c Support MultiView matrix array (#16723)
* Support MultiView matrix array

Support MultiView matrix array and add new interface in GLProgram to
support shader header definitions.

* support getMatrixStackSize

* optimize code

* remove indents

* rename resetMatrixStack(unsigned int stackCount)

* Add document to interfaces

* Supplement document of render interface
2016-10-28 09:33:31 +08:00
Wilson E. Alvarez c0e1e91373 Performance tweak: Use range-based for-loops and allocate std::vector size() and *end() on the stack where favorable. (#16716)
* Use range-based for-loops and allocate std::vector size(), end(), cend(), rend(), crend() on the stack where favorable.

Other minor trivial changes were applied.

* Fixed Android compilation error

* Fixed windows-universal compilation error
2016-10-27 15:10:24 +08:00
mogemimi 5b8919829c Fix typos in local variables (#16712) 2016-10-20 18:17:37 +08:00
mogemimi 63b3043dc0 Remove extra semicolon after member function definition (#16595) 2016-09-20 14:43:48 +08:00
Steve Tranby 2776d1e715 XCode sometimes gets confused with multiple 'Rect' types (#16579) 2016-09-14 10:46:17 -07:00
Jun Hyeon, Nam 4342aabe28 remove unnecessary comments (#16572) 2016-09-14 10:42:25 -07:00
mogemimi eca7b2392d Remove unnecessary inline keywords (#16562) 2016-09-12 09:44:21 +08:00
David DeSimone feb48aea9c Improving CCRef LEAK_DETECTION tools by making them thread safe. It is possible that ref's can be created and mutated off thread, and with leak detection on. This can cause ungaurded writes from two or more threads to a non-protected structure. Fixing a crash on iOS when using std::list instead of std::vector. (#16415) 2016-08-30 09:36:45 +08:00
Ricardo Quesada 9dea92b2e0 feat: add support for Game Controllers on Mac (#16461)
it shares 100% the same code with iOS.
it only adds a few #ifdefs.

github issue #16460
2016-08-29 16:58:44 -07:00
minggo 04fd2b16b2 merge v3.13 back to v3 2016-08-29 11:57:13 +08:00
mogemimi a9a8add717 Add missing class declaration and remove duplicate declaration (#16423) 2016-08-24 18:09:29 +08:00
pandamicro f0be4f3069 Merge part of Cocos2d-x-lite (#16380)
* Update js auto binding settings with new ndk version

* Remove unnecessary property from Ref

* Merge part of Cocos2d-x-lite :
1. Improve network bindings
2. Use nullptr instead of NULL
3. Remove usage of some deprecated APIs
4. Add some defensive code and cleanup

* Fix spine track entry circle referencing issue

* cocos2d/cocos2d-x#16327: Fix global object leak issue in JSB

* Improve ScriptingCore::evalString, old implementation have been deprecated in Spidermonkey

* Update JS versions

* Add docs for web v3.13

* Improve ScriptingCore

* Manual merge cocos2d/cocos2d-x#16383 by DavidDeSimone

* Fix auto bindings configurations

* Update web ref
2016-08-19 16:28:47 +08:00
Ricardo Quesada 3ecaa71944 fix: validates director before layout in iOS (#16394)
Adds Director::isValid()
removes DisplayLinkDirector()
removes virtual functions from Director()
Director is no longer an abstract class

github issue #14276
2016-08-18 18:13:15 -07:00
Ricardo Quesada 604312ac35 Revert "fix: uses correct constant for Eye in Director" (#16385) 2016-08-17 17:53:20 -07:00
Ricardo Quesada dcea1b65ae fix: uses correct constant for Eye in Director (#16369)
fixes github issue #8354
2016-08-15 23:27:20 -07:00
Ricardo Quesada d41124a5b1 check for correct GL extension (#16346)
uses `GL_IMG_texture_format_BGRA8888` instead of `GL_IMG_texture_format_BGRA888`

fixes issue #16336
2016-08-10 03:24:41 -07:00
JaryGuo f9abbf02f6 fix the problem in ccUTF8.cpp and CCLuaJavaBridge.cpp (#16314)
* fix the return value when return null in java

fix the return value when return null in java

* fix getStringUTFCharsJNI

fix getStringUTFCharsJNI when srcjStr is null

* remove a word

remove a word added by mistake

* make a indention

line 233 utf8Str
2016-08-08 10:43:14 +08:00
vlad-tkachenko c3130caf27 Fix Desktop App crash upon exit when NotificationNode exists. (#11274) 2016-08-08 10:20:15 +08:00
James Chen b135d512d2 Update copyright to 2016. (#16311) 2016-08-05 09:42:15 +08:00
halx99 a2adfaf7df #Improve node sort performance for 64-bit by std::sort + long long (_localZOrder) (#16262)
* #improve node sort performance by std::sort + unsigned long long (_localZOrder)

* Use bit field for make _localZOrder storage more clearly.

* #Comment _localZOrder members for meaningful.

* fix issues

* #use explicit bits integer of localZOrder storage

* #Fix compile error, add include <cstdint> to CCNode.h

* use the optimization for 64bit and no optimization solution for 32bit

* Use the optimization for 64bit and no optimization solution for 32bit

* #Improve node sort performance 64-bit by std::sort + long long (_localZOrder)

* fix issues

* test case

* Revert "test case"

This reverts commit 85471d07a433f2b7f0265c3b7dd483fcc28e3e2f.

* fix issues

* use lambda, and any other sort issues.

* skip sotNodes

* fix compile error

* fix  compile issue
2016-07-31 22:44:24 +08:00
mogemimi bf35e0f6b5 Avoid overhead of casting between float and double 2016-07-28 06:49:41 +09:00
mogemimi 15030ad4c3 Fix typos in log messages 2016-07-25 02:53:22 +09:00
Ricardo Quesada 1a834ebdbf fix: FPS appears again
Sets default glviewport() when the GLView::updateDesignResolutionSize()
is called

github issue #16139
2016-07-21 15:12:57 -07:00
minggo bb25bed6f2 Merge pull request #16164 from dumganhar/fix/iss16046-fps-clock
Uses std::chrono::steay_clock for calculating dt.
2016-07-21 16:01:58 +08:00
minggo e19393fa23 Merge pull request #16123 from ricardoquesada/issue_15805
Fix: not cransh on android when mapBuffer() is not present
2016-07-20 14:10:04 +08:00
James Chen ddb25ca563 Uses std::chrono::steay_clock for calculating dt. 2016-07-20 12:43:40 +08:00
Ricardo Quesada cd495f68ba Fix: not cransh on android when mapBuffer() is not present
more info:
https://www.khronos.org/registry/gles/extensions/OES/OES_mapbuffer.txt

add methods to check whether or not glMapBuffer exists
2016-07-19 21:00:50 -07:00
Ricardo Quesada 5f0c0163b3 fix: display FPS again on GLFW platforms
Apparently GLFW stop emitting some events that creation time.
2016-07-19 18:26:14 -07:00
James Chen 15ef80e27d [big refactoring] Audio latency fix for Android. Support to preload effects on Android now. (#15875)
* Audio latency fix for Android. Support preload effects on Android now.

Squashed commits:
[b6d80fe] log fix
[a0a918e] Fixes assetFd didn't be released while PcmData is returned from cache.
[4b956ba] Potential crash fix for PcmAudioPlayer while pause / resume.
[398ab8c] Updates LOG_TAG position in AudioEngine-inl.cpp
[e3634e7] include stdlib.h for posix_memalign
[9004074] fixes setVolume logical error.
[c96df46] Don't use another thread for mixing, enqueue is in a seperated thread, therefore doing mixing in another thread will waste more time.
[0a4c1a8] Adds setLoop, setVolume, setPostion support for Track
[c35fb20] Fixed include.
[cdd9d32] Do mixing by ourself. (TO BE POLISHED)
[6447025] µ -> u since µ could not be shown on some android devices.
[97be0c6] Don't send a silence clip.
[c1607ed] Make linter.py happy.
[0898b54] Puts enqueue & SetPlayState in PcmAudioPlayer::play to thread pool.
[b79fc01] Adds getDuration, getPosition support for PcmAudioPlayer
[80fa2ab] minor fix of the code position of resetting state to State::INITIALIZED
[d9c62f1] underrun fix for PcmAudioPlayer.
[9c2212a] UrlAudioPlayer, playOverMutex should be static, and should be used in update method.
[1519d2e] static variables
[19da936] _pcmAudioPlayer Null pointer check in AudioPlayerProvider.
[e6b0d14] Updates audio performance test.
[fc01dd4] Registers foreground & background event in AudioEngine-inl.cpp(android), the callback should invoke `provider`'s pause & resume method.
[e00a886] TBD: Pause & resume support for PcmAudioPlayerPool.
Since OpenSLES audio resources are expensive and device shared, we should delete all unused PcmAudioPlayers in pool while pause and re-create them while resume.
But this commit isn't finished yet, I don't find a better way to register pause&resume event in AudioEngine module.
[9e42ea3] Interleave mono audio to stereo audio. PcmAudioPlayerPool only contains PcmAudioPlayers with 2 channels.
[3f18d05] Adds a strategy for checking small size of different file formats.
[753ff49] Adds performance test for AudioEngine.
[09d3045] Releases an extra PcmAudioPlayer for UrlAudioPlayer while allocating PcmAudioPlayer fails.
[9dd4477] Using std::move for PcmData move constructor & move assignment.
[6ca3bcb] some fixes:
1) new -> new (std::nothrow)
2) break if allocate PcmAudioPlayer fails
3) renames 'initForPlayPcmData' to 'init'
4) PcmAudioPlayer destructor deadlock if 'init' failed
[54675b6] include path fix.
[a1903ca] More refactorings.
[19b9498] Makes linter.py happy. :)
[923c530] Fixes:
1) Avoid getFileInfo to be invoked twice
2) A critical bug fix for UrlAudioPlayer and adds detailed comments
3) __clang__ compiler option fix for AudioResamplerSinc.cpp.
[5ec4faf] minor fix.
[faaa0f3] output a log in the destructor of UrlAudioPlayer.
[9c20355] NewAudioEngineTest,TestControll crash fix.
[f114464] fixes an unused import.
[1dc5dab] Better algorithm for allocating PcmAudioPlayer.
[331a213] minor fix.
[e54084a] null -> nullptr
[f9a0389] Support uncache.
[89a364f] Removes unused update, and TODO uncache functionality.
[1732bf9] Supports AudioEngineImpl::setFinishCallback for android.
[43d1596] UrlAudioPlayer::stop fix.
[e2ee941] Test case fix in NewAudioEngineTest/AudioIssue11143Test
[5c5ba01] More fixes for making cpp-tests/New Audio Engine Test happy.
[8b554a3] Adds log while remove player from map.
[ed71322] If original file is larger than 30k bytes, consider it's a large audio file.
[fb1845a] Updates project.properties
[6f3839f] minor log output fix in AudioEngine-inl.cpp
[c68bc6c] Don't resample if the sample rate of the decoded pcm data matchs the device's.
[43ca45f] PcmAudioPlayers also need to be removed while they play over, but should not be deleted since their lifecycle is managed by PcmAudioPlayerPool.
[f5e63c9] Audio latency fix for Android. Support preload effects on Android now.

* Supports to loading audio files asynchronously.

* Crash fix for stop audio right after play2d.

* Minor fix for logic in AudioMixerController.cpp

* Adds missing files (CCThreadPool.h/.cpp).

* Minor fix for including.

* Minor fix for missing include <functional> in Track.h

* update license information in audio.h

* Don't use std::future/std::promise anymore since ndk counldn't support it well in armeabi arch.

* isSmallFile postion updated, fixes large audio file goto the checking logic of cache.

* std::atomic<int> isn't supported by ndk-r10e while compiling with `armeabi` arch, using a int with a mutex instead.

* fixes __isnanf & posix_memalign doesn't exist on low api (<=16) devices.

* namespace updated: cocos2d -> cocos2d::experimental

* Removes commented code in AudioMixerController.h/.cpp

* Removes unused code again, and fixes a memory leak of `Track` instance.

* Oops, namespace changed.

* Only outputs log in debug mode.

* Uses ALOGV for outputing logs in AudioEngine-inl.cpp

* const PcmData& ->  PcmData for Track

* Fixes a protential crash in NewAudioEngineTest

* Adds `COCOS` prefix in header #ifndef COCOS_BALABALA #define COCOS_BALABALA

* Uses _ prefix for cocos code style instead of `m` prefix.

* Deletes AudioResamplerSinc related files.

* Bug fix from @minggo's reply on github.

* Don't need to invoke pause after in UrlAudioPlayer::prepare.

* Updates ThreadPool class, uses enum class and adds const keyword.
2016-07-18 10:22:40 +08:00
halx99 9e80526251 #Use std::string reference instead of char* for utils::findChild (#16117)
* #Optimize, Use std::string reference instead of char* for utils::findChild

* Check Node::INVALID_TAG

* revert submodules
2016-07-14 13:52:30 +08:00
minggo 125b0601c3 Merge pull request #16091 from mtak-/data_clear_on_move
fix leak in Data on move assignment
2016-07-14 11:40:19 +08:00
mogemimi b9c78ac41c Use std::abs to avoid overhead of casting float to double 2016-07-13 00:55:11 +09:00
Tyler Kopf 5ecd016a9e fix leak in Data on move assignment 2016-07-11 15:33:51 -07:00
minggo 3d5789ee77 Merge pull request #16077 from mogemimi/fix-documentation-comments
Fix documentation when compile with -Wdocumentation and Clang
2016-07-11 15:49:28 +08:00
minggo a146f3eec7 use std::srand() instead 2016-07-11 11:17:28 +08:00
mogemimi 7531c5156b Fix documentation when compile with -Wdocumentation and Clang 2016-07-10 17:38:32 +09:00
mogemimi bed4e048b6 Fix various typos 2016-07-06 08:27:39 +09:00
mogemimi 2650fd1afd Add missing float suffix to avoid -Wdouble-promotion 2016-07-04 23:12:45 +09:00
minggo ca8ff36f2e Merge pull request #16016 from LeeMyoungYeol/v3
Update utils::getTimeInMilliseconds()
2016-07-04 10:55:41 +08:00
mogemimi 2443e09d29 Fix typos and other mistakes in docs 2016-07-04 00:42:10 +09:00
이명열 853e083c68 - The result comes across as negative.(device android) 2016-07-01 15:32:43 +09:00
mogemimi c0f2194961 Fix some minor typos in local variable names 2016-06-29 11:04:11 +09:00
minggo bbd837aefa merge v3.12 back to v3 2016-06-28 17:53:50 +08:00
mogemimi a287e696c9 Improve RefPtr to avoid casting when possible 2016-06-26 21:39:43 +09:00
Ricardo Quesada 04a01b65f4 fix: FPS appears on iOS
`glViewport()` has a default value so that it has a valid value
after `Scene::render()` exits

Github issue #15934
2016-06-24 11:44:55 -07:00
Ricardo Quesada 4f973044ac fix: FPS appears on iOS
`glViewport()` has a default value so that it has a valid value
after `Scene::render()` exits

github issue #15934
2016-06-24 11:40:13 -07:00
minggo b29fbf0fc8 Merge pull request #15885 from Sumxx/v3
fix restart game crash in FT_Get_Char_Index
2016-06-24 10:08:32 +08:00
minggo 1042b18999 Merge pull request #15936 from mogemimi/use-nullptr-instead
Use nullptr instead of 0 or NULL whenever possible
2016-06-24 09:54:15 +08:00
minggo ee7ceee007 Merge pull request #15874 from mogemimi/fix-unused-variable
Fix unused variable warnings when compiling release mode
2016-06-23 15:55:11 +08:00
minggo 08898db883 Merge pull request #15831 from j-jorge/premultiplied-alpha-config
Add a config option to enable or disable the premultiplied alpha code.
2016-06-23 13:57:41 +08:00
mogemimi cbc0612306 Use nullptr instead of 0 or NULL 2016-06-23 12:39:23 +09:00
minggo 597fb61a78 Merge pull request #15922 from dumganhar/fix/lua-binding
Some lua bindings fixes:
2016-06-23 10:00:45 +08:00
Ricardo Quesada a31279f8cb fix: reverse iterator on events + doesn't use additionalTransform
use reverse Camera iterator when traversing events (of course).
but somehow setAdditionalTransform() breaks
setNodeToParentTransform(). And since setAdditionalTransform is not
needed, we just don't use it.

Github issue #15909
2016-06-22 11:28:58 -07:00
Ricardo Quesada edafe726cc fix: reverse iterator on events + doesn't use additionalTransform
use reverse Camera iterator when traversing events (of course).
but somehow `setAdditionalTransform()` breaks
`setNodeToParentTransform()`. And since `setAdditionalTransform` is not
needed, we just don't use it.

Github issue #15909
2016-06-22 11:22:47 -07:00
James Chen 710ab777dd Some lua bindings fixes:
1) Reverts changes in  #15443, the behavor of LuaEngine::handleCommonEvent should not be changed. empty eventName should be supported, otherwise it will break compatiblity.
2) Null pointer check in CommonScriptData initialization
3) No error callback in lua (fixed #15904)
2016-06-22 17:48:17 +08:00
mogemimi a3bc979452 Fix typos in documentation and comments 2016-06-22 11:22:05 +09:00
Julien Jorge 6fb3946c51 Add a config option to enable or disable the premultiplied alpha code. 2016-06-20 18:05:11 +02:00
mogemimi f0028e5459 Fix unused variable warnings when compiling release mode 2016-06-20 09:23:42 +09:00
sum 4700bbce43 fix restart game crash in FT_Get_Char_Index 2016-06-19 03:22:57 +08:00
minggo 6778ebf451 Merge pull request #15853 from ricardoquesada/vr_squashed
Squashed commit of the following:
2016-06-17 10:15:20 +08:00
minggo 9b210e00d7 Merge pull request #15837 from geemedia/cmake-improvements
Various CMake improvements
2016-06-16 14:53:10 +08:00
mogemimi 01aaff66c8 Fix -Wsometimes-uninitialized warning in release build 2016-06-16 14:27:52 +09:00
Ricardo Quesada 180c2f1e9a Squashed commit of the following:
VR support for cocos2d-x

commit 087aff0aec24b81418fa2678ce0cae2d4c1e2e01
Merge: b32d329 fc44d0d
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Jun 15 11:26:33 2016 -0700

    Merge branch 'v3' into vr

commit b32d329f9331a4f9bbbbf946b88b31db7559934d
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Jun 15 11:25:27 2016 -0700

    fix: dont' include oculus files

commit 816928c6a8782984830aa92de5bed038c1306cdc
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Jun 15 10:57:26 2016 -0700

    fix: missing guard in header

commit 2abd4eb5a1fc961c2cbae9b00809b5e6409740db
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Jun 15 10:43:49 2016 -0700

    removed VR engines... should be part of package manager

commit 583179755d1c66c02e898297230d0f882e629b98
Merge: 12f4f71 b6d6bb0
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Jun 15 10:42:37 2016 -0700

    Merge branch 'vr' of github.com:ricardoquesada/cocos2d-x into vr

commit 12f4f71aca4fa15231976a7727faf40648d62313
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Jun 15 10:42:12 2016 -0700

    fix: new VR API... easier to enable/disable different VR renderers

commit b6d6bb087f54cbd272fbfb9e1cf1cd6bba776ffa
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jun 14 20:48:04 2016 -0700

    fix: compiles and runs on win10

commit e73aa8902118377abbd2192c757104c4531d2a9e
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jun 14 20:27:06 2016 -0700

    fix: vr works again

commit 5615e276507edf8602f043f3130204a89dbaba69
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jun 14 18:55:18 2016 -0700

    fix: compiles on windows

commit 494061ee4da8fbc5616f83efb64b2c0c3932778e
Merge: 284910b fd3b6d4
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jun 14 17:13:47 2016 -0700

    Merge branch 'v3' into vr

commit 284910b204ee0dd76d949ea8f2b2f6b1b72e533f
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jun 14 17:12:25 2016 -0700

    android vr: better performance

commit aa8328e8029143dd7c6c724f38915f0fb3b64abe
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Jun 13 16:10:14 2016 -0700

    fix: low pass filter in accel and magnet

commit f6d9b622abff5abb95ad60fa7139f3ce1ec9caab
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Jun 13 15:43:00 2016 -0700

    fix: removes debugging info

commit 2004f0ce5605dad70ff8656a058073181346f083
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Jun 13 14:54:32 2016 -0700

    fix: kind of works on android! yeah!

commit d6dcb6a3410fda053f0d6fbc00af817a13a86d3b
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri Jun 10 09:44:53 2016 -0700

    logging

commit 7e5d6ad52d39642c111e7b690173338af4e94092
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jun 7 22:53:07 2016 -0300

    android head tracking

    compiles, doesn't work yet... how to debug java code?

commit cbf5f6482aa0ae002a7dc40045ef3ffdbe192e26
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jun 7 19:45:41 2016 -0300

    reading sensor from android

    not compiling yet

commit 6ee0a3c2c43f8e8a603bfce9fddb0cce5ce79415
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jun 7 11:45:06 2016 -0300

    compiles on android... finally

commit fb728da756ca7ee94b316c113e2239a77d9f4b53
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Jun 6 18:15:12 2016 -0300

    fix: compile vr android files only on android

commit 90db6daef382d142bb60207d2b16936dd66ee245
Merge: 2e56f03 cc936af
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Jun 6 12:15:56 2016 -0300

    Merge pull request #11 from songchengjiang/riq_vr

    daydream VR platform supporting

commit cc936afac44518a00b90ec3133aaac5d00f0b91f
Author: songchengjiang <moses_jc@sina.com>
Date:   Mon Jun 6 10:38:27 2016 +0800

    remove VR 3rdparty dependence

commit 5f7a1a9c80f84cc915763ad6f52ffc524dd59309
Author: songchengjiang <moses_jc@sina.com>
Date:   Mon Jun 6 10:34:37 2016 +0800

    remove VR 3rdparty dependence

commit 3f72ecde2a259357a137bec1e99e731a2e78df84
Author: songchengjiang <moses_jc@sina.com>
Date:   Mon Jun 6 10:28:43 2016 +0800

    remove VR 3rdparty dependence

commit 2e56f032d1daced1b66b984acacc6f5007f5ecc3
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri Jun 3 10:45:44 2016 -0300

    fix: started android support

commit 1910c9c488ee4315110081b60438aa1b7c1011f2
Author: songchengjiang <moses_jc@sina.com>
Date:   Thu Jun 2 15:58:34 2016 +0800

    add CCVRGvrRenderer and CCVRGvrHeadTracker framework

commit 96200eedea9234287153d71b4f198077cc49389a
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue May 31 13:07:44 2016 -0300

    fix: little fixes

commit a2eb8114b2969beca83762ba829c8cb809b1615a
Merge: 20a74e0 5fddebc
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue May 31 12:12:59 2016 -0300

    Merge pull request #10 from songchengjiang/riq_vr

    bugs fixed

commit 5fddebcae997db9e1a4108413d73b0d057a61e83
Author: songchengjiang <moses_jc@sina.com>
Date:   Fri May 27 15:57:30 2016 +0800

    parameter corrected

commit 925aad012ae513ebeeec682b003123a3c543759f
Merge: 9b5e02f 20a74e0
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Fri May 27 15:46:13 2016 +0800

    Merge branch 'vr' of https://github.com/ricardoquesada/cocos2d-x into riq_vr

    Conflicts:
    	cocos/2d/CCScene.cpp

commit 9b5e02fa7c9fcdd15cfea99769560ed30b976e9e
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Fri May 27 14:36:31 2016 +0800

    fixed ProjectionMatrix error on oculus platform
    fixed ScrollView error on oculus platform

commit 3c63ead1943d1cf8aa3c0fd722a4b3834db323b1
Author: songchengjiang <moses_jc@sina.com>
Date:   Fri May 27 10:51:46 2016 +0800

    bugs fixed

    mobile VR platforms:
    fixed ProjectionMatrix  error
    fixed culling error of ScrollView

commit 20a74e064708e6bf9d15cc5551d1f86af9d24010
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 20 09:22:45 2016 -0300

    fix: setAdditionalTransform support reference

commit 8341df82a02683b8e4ae02654e90617a2e5ced6d
Merge: 83751de 469d38d
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed May 18 07:38:49 2016 -0700

    Merge pull request #8 from songchengjiang/riq_vr

    Finished VR integration of SKDs based on VRProtocol

commit 469d38d778cd5f947098a08d8fd14ca6f32b0502
Author: songchengjiang <moses_jc@sina.com>
Date:   Wed May 18 15:32:32 2016 +0800

    fix bug of deepoon's headtracking

commit 83751deac133910c24321ddaddff93bf736de884
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue May 17 09:41:17 2016 -0700

    fix: Scene inverts the eye matrix

commit 41ae41969a71fd5b07396faac78e777c4afbe5c4
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue May 17 06:54:34 2016 -0700

    fix: inversed matrix for camera

commit 049dee721356a47b19f5e51a0face6a5a1647095
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Tue May 17 15:51:57 2016 +0800

    add headtracker of oculus

commit 3f6478352a4baebc684105156389655edbac7e6f
Author: songchengjiang <moses_jc@sina.com>
Date:   Tue May 17 14:22:56 2016 +0800

    add headtracker of SKDs

    gearvr/deepoon/cardboard

commit 59df985b72adf0dbb5a4c66c80ae7299b16ae909
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon May 16 22:12:23 2016 -0700

    fix: head tracker works

commit 306c59da0175708c96b5757f5f27afd6a6592fe3
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon May 16 17:55:43 2016 -0700

    fix: adds missing methods to `VRIHeadTracker`

commit 91100b8a86d78801fbcd08e99427d6a6363ad69b
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Mon May 16 14:17:21 2016 +0800

    Rename Oculus's files

commit 01ef6215de936a8d8bb15f9ec195cb81b2b4b18f
Author: songchengjiang <moses_jc@sina.com>
Date:   Mon May 16 11:41:56 2016 +0800

    Rename files based on riq's changes

commit 734efbb045064d24df095c5b8fc604ef2aab1dea
Merge: 91449c9 769a883
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Mon May 16 09:57:57 2016 +0800

    Merge branch 'riq_vr' of https://github.com/songchengjiang/cocos2d-x into riq_vr

    Conflicts:
    	build/cocos2d_libs.xcodeproj/project.pbxproj
    	cocos/vr/CCVRGeneric.cpp
    	cocos/vr/CCVRGenericHeadTracker.h

commit 91449c9d23e357549cb1aeae6d1454274def1aab
Merge: d3e4550 a33faaf
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Mon May 16 09:54:44 2016 +0800

    Merge branch 'vr' of https://github.com/ricardoquesada/cocos2d-x into riq_vr

    Conflicts:
    	build/cocos2d_libs.xcodeproj/project.pbxproj
    	cocos/platform/CCGLView.cpp

commit a33faafa1a2b6cffdc32d87f3c1c321f46f94789
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Sat May 14 00:57:54 2016 -0700

    fix: adds head tracker

commit ea348cf72d3e54dc3864571bff1405909dbb65c9
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 13 18:40:32 2016 -0700

    fix: removes red background

commit 113c7debe9a35fc142183a9012cac40063e17efe
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 13 18:39:31 2016 -0700

    fix: centers image

commit 769a883c93f4f7c6191462626845f01d6f8596fe
Author: songchengjiang <moses_jc@sina.com>
Date:   Fri May 13 20:36:19 2016 +0800

    Merge branch 'vr' of https://github.com/ricardoquesada/cocos2d-x into riq_vr

commit d3e45501cd2cada87735390a407fbd44e61cd84e
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Fri May 13 17:52:46 2016 +0800

    update win32 project for VR

commit ba0fdb8b8e1efaf8fdf88e044e701fb5bedb4839
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Thu May 12 23:21:50 2016 -0700

    fix: no hardcoded values

    code is simpler, fixed a few bugs

commit b30596cdae4cdcf39d960a39661a79200b27c7a8
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Thu May 12 21:50:18 2016 -0700

    fix: simplified distortion

commit 37b184f084e7b50bac9a5a3c59a87f8f03440b53
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Fri May 13 09:39:34 2016 +0800

    finished VR rendering of Oculus

commit f7d74cd0a2479541c0546d0ec41fe4f867405fcc
Author: songchengjiang <moses_jc@sina.com>
Date:   Thu May 12 10:00:43 2016 +0800

    Finished GearVR and Deepoon VR rendering integration

commit 776fb4fd7420f1c14403eb476df1e9716362f1e5
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed May 11 16:56:57 2016 -0700

    fix: distortion working... with too many hardcoded values

    time to "un-hardcode" the values

commit 0584773cca88c5b3dee72821830841f617cfb21c
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue May 10 19:49:07 2016 -0700

    feat: distortion WIP

commit 9b5ef01776eaa617dd4677c3824e50c1f9da41c6
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue May 10 15:49:17 2016 -0700

    fix: simpler

    one texture that holds both left and right eye

commit bfff504c499c253a0c36b342e6b5bcb0edf4fed7
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon May 9 10:50:43 2016 -0700

    fix: Camera code is cleaner

commit fcf730bc2afc6c4552787273577e1942088c2e42
Author: songchengjiang <moses_jc@sina.com>
Date:   Mon May 9 16:43:58 2016 +0800

    support cardboard VR rendering

commit f88b834b70fbfb28db0c8442e68984c61192d7cc
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 6 21:16:10 2016 -0700

    fix: proj fixes. works ok in any resolution

commit f980a616837b0f259d9564e622c78e0f4869ed53
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 6 19:08:47 2016 -0700

    fix: renders ok in any device

commit 4799ad32ea38ddd217e80e868c3d9021c03e88ce
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Thu Apr 28 16:46:30 2016 -0700

    fix: renders something

    fix: passing camera to scene

    adds a way to return user camera

    fix: stereo rendering works

    fix: viewport left is correct

    fix: scissor is not needed...

    fix: works!

    fix: minor fixes

    fix: new approach... almost working

    fix: camera is moved

    whitespace fixes

    fix: whitespaces

    fix: new line

commit c137a53aba227cf2e2a1809b55cb9b3da25d432b
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Apr 27 18:56:41 2016 -0700

    fix: VR refactor... still WIP

commit 16fde77d71b8309e982bf6fa4f4ee0acea5fc0d1
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Apr 26 22:21:21 2016 -0700

    feat: VR, initial commit
2016-06-15 11:33:25 -07:00
mogemimi a348cbda8b Move StringUtils functions from deprecated header file to ccUTF8.h (#15835)
* Move StringUtils functions outside of deprecated header

* Replace deprecated headers with 'base/ccUTF8.h'
2016-06-15 15:01:26 +08:00
子龙山人 51f4deee01 Add system label overflow (#15827)
* Add system font overflow

1. currently only iOS, Mac and Android platform are supported

add mac label overflow shrink

modify system font overflow test

fix warning and possible memory leaks

add ios system label overflow support

add iOS system font overflow support

fix iOS system font overflow

fix Mac System font overflow

add android system font clamp

add Android system font shrink

cleanup iOS shrink related code

fix Android system font clamp

add core text to project template

fix iOS tests project

fix mac and iOS shrink

improve iOS and Mac clamp feature

fix header file include path

* modify the comments, make it more clearer
2016-06-15 10:43:15 +08:00
Adrien de Sentenac dac9be5016 Various CMake improvements
- Added c++_shared (LLVM) to Android toolchain options. Fixed AndroidNdkGdb.cmake.
- Fixed includes when not using prebuilt libs. Added option to use sources in external when not using prebuilt libs.
- Added option in CMake to be able build Box2D without using it as physics library in cocos2d-x (similar to what is done in the Visual Studio solution).
2016-06-14 10:20:57 -04:00
TheCodez 7885f55ce5 Cache bas64 images 2016-06-06 16:32:50 +02:00
mogemimi 69974ab06f Fix warnings caused by comparison between RefPtr and C++11's nullptr 2016-05-28 22:15:56 +09:00
mogemimi 1e04cb5950 Use nullptr instead of 0 or NULL 2016-05-25 03:09:11 +09:00
minggo 2c9716d714 Merge pull request #6927 from TimothyZhang/fix-cc-utf8-to-utf16
fixed bug of cc_utf8_to_utf16() when length!=-1
2016-05-20 14:59:06 +08:00
mogemimi 948f64631f Use const references whenever possible 2016-05-17 13:17:56 +09:00
minggo abe020e808 Merge pull request #15654 from minggo/ipv6-compatibility
Ipv6 compatibility
2016-05-17 09:25:14 +08:00
minggo 2b480a75bf use AF_UNSPEC to support ipv6 2016-05-16 14:45:09 +08:00
mogemimi bbbb7e498d Prevent variable shadowing warnings 2016-05-08 12:32:36 +09:00
halx99 fc9880ab49 Add captureNode for cocos2d::utils (#15558)
* Add captureNode for cocos2d::utils

Add captureNode for cocos2d::utils and fix CC_DLL syntax.

* Add test case for utils::captureNode

Add test case for utils::captureNode.

* Store captured image to disk with RGB.

* Trigger jenkins check
2016-05-07 22:10:53 +08:00
mogemimi 2df9afbe71 Fix typos in documentation and comments 2016-05-05 08:05:20 +09:00
minggo a5602cc732 merge v3.11 back to v3 2016-05-04 16:02:23 +08:00
halx99 9ff61f915c Add findChild for cocos2d::utils (#15548)
* Add searchNode for cocos2d::utils

Add searchNode for cocos2d::utils

* fix compile error on win32_bak

* convert line terminates to unix sytle.

* Rename searchNode to findChild, and etc.

* fix compile error.
2016-05-04 09:46:00 +08:00
minggo 4766e0dd9b Merge pull request #15545 from minggo/isse-15540
avoid remove event listener multiple times
2016-05-04 09:39:38 +08:00
Adrien de Sentenac 1a76c9ea3b Add OBB (zip) support (#15515)
* Add OBB support.
OBB must be a zip file with audio and video files stored uncompressed.

* Use introspection to be able to build with Android API level 10.
Using the new audio engine to play sounds from the OBB will only work with API level 12 (Android 3.1) or above.
2016-05-04 09:21:35 +08:00
minggo d41207e99a avoid remove event listener multiple times 2016-05-03 10:56:03 +08:00
Xpol Wan f111583214 Refactor FileUtils::getFileData() and CCFreeTypeFont::loadFont().
* Remove unnecessary memory copy in FileUtils::getFileData()
* Add Data::takeBuffer() to simplify FileUtils::getFileData() and CCFreeTypeFont::loadFont().
2016-04-29 09:31:09 +08:00
Ricardo Quesada c432b23ef6 fix: removes `friend class Game`
fixes Github issue #15221
2016-04-27 18:57:41 -07:00
zilongshanren 482788c933 Add tizen support (#15518)
* add Tizen Support

* fix linter error

* fix tizen audio engine lua bindings config
2016-04-28 09:49:55 +08:00
Xpol Wan 94944082c4 Fixes warning about deprecated cc_wcslen. 2016-04-26 14:21:25 +08:00
mogemimi 71677ee286 Fix unused variable warning when building with Xcode 2016-04-22 20:25:32 +09:00
Steve Tranby 0f0c9b627b Add support for Unsigned with CCValue (#13785)
Add support for Unsigned with CCValue
2016-04-22 13:49:20 +08:00
minggo 488ceb485d Merge pull request #14547 from colajam93/fix-linux-clang-build
Add missing header
2016-04-21 15:38:53 +08:00
MURAKAMI Yukio 9514b51057 Console refactor (#15013) 2016-04-21 11:31:20 +08:00
minggo 08b000bacf Merge pull request #14426 from pyrosphere/fix-controller-ios6
Fix crash when using cocos2d::Controller on iOS6
2016-04-20 11:45:13 +08:00
minggo f49f69dac8 Merge pull request #14525 from elvman/key_none
Add enum value for no key
2016-04-20 11:21:43 +08:00
minggo 5bd592ca34 Merge pull request #15231 from SteveKChiu/v3
Fix calculation of base64Encode outLength
2016-04-18 17:54:14 +08:00
zilongshanren 001a0ee812 remove useless warning log of stencil buffer. (#15396)
1. disable GC for Native object

2. improve js tests of label
2016-04-18 15:43:54 +08:00
xpol 3780064a82 Allow inherit form platform fileutils (#15304)
* Allow inherit form FileUtilsLinux, FileUtilsWin32 and FileUtilsWinRT.

* Removed objc from CCFileUtils-apple.h

define FILEUTILS_APPLE_ENABLE_OBJC to enable FileUtilsApple:setBundle() for compatibility.

* Smart pointers heal us all.

* Add config macro in ccConfig.h and prefix with CC_.

* enabled by default.
* use #if rather than #ifndef.

* Do not deprecate setBundle.
2016-04-14 11:59:24 +08:00
James Chen f3e6e8331a Fixes wrong usage of std::vector's constructor in EventDispatcher::removeAllEventListener. 2016-04-11 11:54:15 +08:00
Sai628 dfc12c8351 Bug fix: CCValue operator overloading of Comparison "==" in case Type::VECTOR 2016-04-08 14:11:39 +08:00
colajam93 d023a3ad1a Add missing header 2016-04-08 02:16:22 +09:00
minggo 6ac9a42e6c Merge pull request #15383 from mogemimi/fix-implicit-conversion
Fix implicit conversion issues with Xcode 7.3
2016-04-07 17:58:30 +08:00
mogemimi c0e4780e77 Fix implicit conversion issues with Xcode 7.3 2016-04-07 17:01:17 +09:00
James Chen 514ac58bf3 Fixes wrong usage of std::vector's constructor in EventDispatcher::removeAllEventListener. 2016-04-07 15:50:59 +08:00
Nam Hyeon Uk 7f2b0edc04 Vector iterator declaration & initializer list constructor
* Vector iterator typedef -> alias declaration

* Vector constructor with initializer list

* fix indent
2016-04-07 13:47:01 +08:00
JANG SUN HYUK 107cef0667 getRandomObject() in Vector, Map is changed
* getRandomObject is changed

https://github.com/cocos2d/cocos2d-x/issues/15270

getRandomObject issue in Vector

* Update CCMap.h

* Update CCVector.h
2016-04-07 11:46:54 +08:00
minggo 944307a5f8 Merge pull request #15260 from mxenabled/dennacerise/color_constructor
Add optional alpha parameter to Color4B and Color4F constructors
2016-04-06 11:50:02 +08:00
mogemimi 44080a04d8 Fix typos in comments and strings 2016-03-29 10:52:17 +09:00
zilongshanren 400e77808c Revert "UIEditBox attachWithIME, detachWithIME make working" 2016-03-22 14:18:39 +08:00
Xpol Wan 32e408487f Fixes import path for m and mm files. 2016-03-21 20:12:58 +08:00
Xpol Wan 931d56bc10 Fixes includes in .m and .mm files. 2016-03-21 11:02:00 +08:00
Xpol Wan 90456d29ba Fixes 1605 include path in 541 files
using the tools/coding-style/include-linter.py with -f options.
2016-03-20 21:53:44 +08:00
zilongshanren 56878bd441 Merge pull request #14532 from xpol/refactor-utf-module
Overhaul UTF modules and add full set of UTFs conversion functions.
2016-03-18 14:00:47 +08:00
YooJaehong 7eeccbc771 UIEditBox attachWithIME, detachWithIME make working
(android, iOS tested)
2016-03-17 10:26:53 +09:00
Denna Lawrence 737455fda6 Add optional alpha parameter to Color4B and Color4F constructors 2016-03-16 16:08:49 -06:00
Steve K. Chiu 4769890d4e Fix calculation of outLength
The order of integer arithmetic is important, the original code fail to
calculate the length correctly, e.g. inLength 20 for base64Encode should
output 28, not 30. It is fixed and simplified with this commit.
2016-03-12 15:42:52 +08:00