Commit Graph

11607 Commits

Author SHA1 Message Date
Sam Clegg 7bd5025064 [NaCL] Add missing include of <sys/mount.h>
This was previously included by nacl_io.h but
upstrean changes in NaCl removed this.
2013-08-21 20:27:34 -07:00
Ricardo Quesada a3eb0a058e Merge branch 'develop' into dictionary_array_fixes
Conflicts:
	cocos2dx/platform/mac/CCFileUtilsMac.mm
	extensions/CCBReader/CCBAnimationManager.cpp
	extensions/CCBReader/CCBReader.cpp
	extensions/CCBReader/CCBSequenceProperty.cpp
	extensions/GUI/CCScrollView/CCScrollView.cpp
2013-08-21 20:27:19 -07:00
Ricardo Quesada 2e221ee6cc Array & Dictionary fixes
In many places `Dictionary` and `Array` are not being initialized. In fact `Dictionary` doesn't  have the `init()` method creating potential leaks.
Also in objects like `Armature` and the new `LabelTTF`, the `Array` object is not being used a pointer. So it doesn't use the 2 phase initialization, creating potential leaks.

This patch fixes all those issues.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:12:09 -07:00
Ricardo Quesada 4104cdc20e Better destructors logs
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:08:51 -07:00
Ricardo Quesada 967eb4b08f Adds more asserts
The instance methods cannot be used if the instance was not `init()`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:04:30 -07:00
Ricardo Quesada 4dc18029b7 Removed Iterator class
There is no need to implement `Array::Iterator`.
It is replaced by returning `end()` and `begin()`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:03:45 -07:00
Ricardo Quesada f0a2f6cbf8 purge profiler data one + or - is pressed
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:02:50 -07:00
samuele3hu 27c59a799d Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator 2013-08-22 11:01:38 +08:00
James Chen a1da9aeeea Merge pull request #3452 from dumganhar/init-ccarray
Initializing Array after it was constructed.
2013-08-21 19:56:07 -07:00
minggo 2de8963a0a fix warnings caused by deprecating some functions of Array 2013-08-22 10:45:47 +08:00
samuele3hu 8489514d73 issue #2433:Add a newline 2013-08-22 10:28:33 +08:00
minggo 3476a843e2 Array can be use in stl::sort() when not using vector inside 2013-08-22 10:18:59 +08:00
samuele3hu 3cb095f48a Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator 2013-08-22 10:17:59 +08:00
samuele3hu bea62800b4 issue #2433:Modify TestLua samples and add some manual binding code 2013-08-22 10:16:57 +08:00
James Chen 1ee7790f0e Initializing Array after it was constructed. 2013-08-22 10:15:47 +08:00
minggo cd7773ba0e Merge pull request #3448 from ricardoquesada/array_fixes
Array fixes
2013-08-20 18:36:31 -07:00
Ricardo Quesada cf02cb4581 Fixes names in Performance Node tests
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 18:05:35 -07:00
Ricardo Quesada e5551b2872 Compiles both with std::vector and ccCArray
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 16:06:51 -07:00
Ricardo Quesada f9df7cf4e5 Uses high resolution clock for Profiling
and adds another average time.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 16:06:34 -07:00
Ricardo Quesada f7241ea533 Default capacity of Array is 10
plus better documentation

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 16:06:04 -07:00
Ricardo Quesada 20167e2a12 removes unneeded spaces
Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 14:18:45 -07:00
Ricardo Quesada c9b250d4a4 Adds new tests to tests
and enables profiling

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 14:18:32 -07:00
Ricardo Quesada 4c99492589 Profiling: more useful information
Prints min,max, #calls

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 14:18:06 -07:00
Ricardo Quesada d96a504f3c cocos2d in lowercase
Cocos2d -> cocos2d

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 14:17:43 -07:00
Ricardo Quesada 4d6d2d0dfa Better default values for auto-release pool
150 is a reasonable number for auto-release pool.
By using 150, it prevents the unneeded re-alloc of the pool.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 14:17:26 -07:00
Ricardo Quesada 5225758c5c CCArray: performance improvements
CCArray:

- Iterator uses position for iterator. MUCH faster.
- Do not double init the array. performance improvements in memory.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-20 14:16:43 -07:00
NatWeiss fb3d422f0c Fixes full paths on Android (cleaner)
If one adds a search resolutions order directory without a trailing slash, CCFileUtils::getFullPathForDirectoryAndFilename will fail on Android. For example it will return:

assets/sdBg1.png

Instead of the expected:

assets/sd/Bg1.png

This small commit fixes the function to add a slash if necessary, fixing the issue on Android.

Compared to the last pull request of this name, formatting matches the style of code around it and comments have been added.
2013-08-20 10:22:44 -07:00
James Chen 06b66e3427 Merge pull request #3445 from dumganhar/iss2586-xmlhttprequest-mess
closed 2586: The utf8 response in XmlHttpRequest are mess codes.
2013-08-20 03:52:55 -07:00
James Chen 5a393994cd [Best C++ practice] ResponseType is enum class now. Renaming properties in MinXmlHttpRequest class. 2013-08-20 18:35:15 +08:00
James Chen 5407719f44 closed #2586: The utf8 response in XmlHttpRequest are mess codes. 2013-08-20 17:50:43 +08:00
James Chen 0d349d75d0 Update AUTHORS [ci skip] 2013-08-20 16:38:03 +08:00
James Chen f263f01334 Merge pull request #3442 from xbruce/develop
closed 2612: Crash appears when extending cc.ScrollView in JS.
2013-08-20 01:36:59 -07:00
xbruce d2684338a5 Update CCScrollView.cpp
change release mode
2013-08-20 14:58:26 +08:00
minggo f97f7edeb6 Merge pull request #3440 from ricardoquesada/better_array
Better array
2013-08-19 23:39:36 -07:00
James Chen d79e6dee7a Update AUTHORS [ci skip] 2013-08-20 14:25:45 +08:00
James Chen c215a1d5a2 Merge pull request #3285 from gkosciolek/fix_for_CCNotificationCenter
closed 2611: Fixing the bug that observers with the same target and selector but different sender are the same observer in NotificationCenter.
2013-08-19 23:23:18 -07:00
samuele3hu 39686ea503 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator 2013-08-20 13:46:26 +08:00
samuele3hu 7a9f1d6804 issue #2433:Modify TestLua samples and some .ini files 2013-08-20 13:44:37 +08:00
minggo 0ec5d6f029 Merge pull request #3439 from folecr/android_rendering_bugfix
Let CCDirector set all GL state in the Android port
2013-08-19 19:08:47 -07:00
James Chen 0d5042948c Update AUTHORS 2013-08-20 10:04:46 +08:00
James Chen 7e3d3b3d3e Merge pull request #2950 from zcgit/develop
a potential bug in Layer.
2013-08-19 19:02:53 -07:00
Ricardo Quesada 6c2c5f727f small fix to make it compile with std::vector too 2013-08-19 17:33:23 -07:00
Ricardo Quesada 6c02102b17 Fixes crash when reordering 2013-08-19 17:27:31 -07:00
Ricardo Quesada 511ec1cc5d Compiles with improved CCArray
Compiles both with std::vector or ccCArray
2013-08-19 17:09:28 -07:00
folecr 9d8e2d991b Let CCDirector set all GL state 2013-08-19 15:58:05 -07:00
James Chen 175316f2c6 Merge pull request #3404 from timothyqiu/docfix
Documentation fix: broken links and wrong encoding in the doc...
2013-08-18 19:35:47 -07:00
minggo 61e8b14601 Merge pull request #3420 from boyu0/tilemap_plain_xml_format_support
Support for loading tilemaps with plain XML layer format
2013-08-17 01:13:41 -07:00
minggo 3ca26e1aa6 Merge pull request #3430 from boyu0/iss2517_update_local_var_to_auto
closed #2517: Update all test cases use auto for local variables
2013-08-17 01:12:48 -07:00
minggo c7f313419e Merge pull request #3431 from minggo/iss2525-add_iterator_for_array
add iterator for Array and make Array can be used in range-based loop
2013-08-17 00:42:42 -07:00
minggo 06aea85f2e Merge pull request #3432 from folecr/travisci_android_arm_only
Keep TravisCI happy : build Android TestCpp for ARM architecture only.
2013-08-17 00:42:21 -07:00