Commit Graph

2255 Commits

Author SHA1 Message Date
Nite Luo 8c972d96a8 Create new test for NewRenderer 2013-11-12 11:19:18 -08:00
samuele3 c1d256c159 issue #2868:modify ccs lua test samples 2013-11-12 16:52:03 +08:00
samuele3 cfb1cfdf65 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developCCS
Conflicts:
	cocos/editor-support/cocostudio/CCSGUIReader.h
2013-11-12 15:30:36 +08:00
samuele3 482ee5d47f issue #2868:Add more ccs lua test samples 2013-11-12 15:25:47 +08:00
Ricardo Quesada be64dd97cf replaces `delete[]` with `free()` in C-based API
API that returns a newly allocated buffer as an output argument (not return value) are error-prone.

- Users forget to release the newly allocated buffer
- Or the call `delete` instead of `delete[]`

But some of those API need to call `realloc` on the buffer.
But `realloc` is only valid if the buffer was previously allocated with `malloc`.
If a buffer needs to be re-allocated using a C++ API, then `std::vector<char*>` should be used instead...

So, this patch does:

- Migrates the API from  `new []` / `delete[]` to  `malloc()` / `free()`
- Fixes all the memory issues: incorrect deallocs and memory leaks
- Updates the documentation
- And fixes misc issues with the API: removes `cc` from the ZipUtils class.
2013-11-11 18:09:47 -08:00
Nite Luo a28f3f6f03 Merge branch 'develop' into newRenderer 2013-11-11 12:04:28 -08:00
CaiWenzhi 4f76141c41 optimize guireader 2013-11-11 18:22:14 +08:00
CaiWenzhi 782c26bc37 Merge branch 'develop' into develop_nutty_Mergemasterbranchtodevelopbranch 2013-11-11 17:57:43 +08:00
samuele3 7cfe890d5d Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developCCS 2013-11-11 17:04:37 +08:00
samuele3 06c7d3e96d issue #2868:Add ccd lua test samples 2013-11-11 17:03:43 +08:00
minggo bbb2579114 Merge pull request #4160 from dabingnn/iss3025_TextureCache
[ci skip]Iss3025 texture cache
2013-11-10 23:08:01 -08:00
James Chen a6c85a3906 issue #3137: Disabling Accelerometer when layer is destroyed. 2013-11-11 10:23:05 +08:00
James Chen 0eb9caa3d6 Merge commit 'refs/pull/4123/head' of git://github.com/cocos2d/cocos2d-x into fix-acc 2013-11-11 10:08:28 +08:00
samuele3 e26fe04deb Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developCCS 2013-11-09 23:04:11 +08:00
Nite Luo 5a1d92cbf2 Merge branch 'develop' into newRenderer
Conflicts:
	samples/Cpp/TestCpp/Classes/controller.cpp
2013-11-08 14:01:08 -08:00
CaiWenzhi 1f389d3779 Rename event interface 2013-11-08 18:43:06 +08:00
boyu0 a56dedb41a issue #2771: add class PhysicsDebugDraw 2013-11-08 14:25:03 +08:00
Huabing.Xu 6f1e98df34 Merge branch 'develop' of github.com:cocos2d/cocos2d-x into iss3025_TextureCache 2013-11-08 13:50:22 +08:00
CaiWenzhi 18f411fd1e Merge branch 'develop' into develop_nutty_Mergemasterbranchtodevelopbranch 2013-11-08 11:36:59 +08:00
minggo 56d7da8933 Merge pull request #4130 from ricardoquesada/love_in_textfield
[ci skip]More std::string& usage
2013-11-07 19:14:35 -08:00
minggo 109adaf337 Merge pull request #4103 from luisparravicini/issue-2882
[ci skip]added | operator for Control::EventType
2013-11-07 18:59:33 -08:00
minggo d1f94e0d9d Merge pull request #4111 from boyu0/iss2771_physical
[ci skip]issue #2771: physical
2013-11-07 18:51:15 -08:00
minggo 167242e540 Merge pull request #4127 from Dhilan007/ANCHOR_XXX
[ci skip]Point: Adds ANCHOR_XXX constants like ANCHOR_MIDDLE, ANCHOR_TOP_RIGHT, e...
2013-11-07 18:45:50 -08:00
Nite Luo be71eb8626 Merge branch 'develop' into newRenderer
Conflicts:
	.gitignore
	build/cocos2d_libs.xcodeproj/project.pbxproj
	build/cocos2d_samples.xcodeproj/project.pbxproj
	cocos/2d/CCDirector.cpp
2013-11-07 17:24:57 -08:00
Nite Luo 935d2bdebb Implement sprite batching 2013-11-07 16:50:53 -08:00
Nite Luo d7cb4ed219 First attempt for batching 2013-11-07 15:48:37 -08:00
Ricardo Quesada ffd4342548 Adds more strings
and more `override`
and fixes some indetentation issues
2013-11-07 12:42:16 -08:00
Dhilan007 916361af3f Point: Adds ANCHOR_XXX constants like ANCHOR_MIDDLE, ANCHOR_TOP_RIGHT, etc. 2013-11-07 23:40:33 +08:00
Huabing.Xu bd7d62aee0 issue #3025: replace TextureCache::getInstance() by Director::getInstance()->getTextureCache() in samples folder 2013-11-07 21:48:39 +08:00
CaiWenzhi cbb9c655d9 fixed bugs 2013-11-07 21:10:48 +08:00
boyu0 cee966e284 issue #2771: fix build error 2013-11-07 19:24:15 +08:00
boyu0 3e8871f2c9 issue #2771: delete some unfinished PhysicsTest and change subtitle 2013-11-07 17:53:30 +08:00
boyu0 e278ad66c8 issue #2771: change PhysicsJoint::create() to PhysicsJoint::construct() 2013-11-07 17:46:05 +08:00
boyu0 7363be0697 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-11-07 17:37:33 +08:00
CaiWenzhi e2249c8c3f Fixed crash 2013-11-07 17:15:52 +08:00
Jason Xu b5f83c30b6 fix indention 2013-11-07 17:08:16 +08:00
CaiWenzhi 9f2297a5a6 add "retain" to listeners 2013-11-07 16:46:41 +08:00
Jason Xu c9f814c016 fix Accelerometer Test with missing: Device::setAccelerometerEnabled(true); 2013-11-07 16:39:41 +08:00
boyu0 ef5440f738 issue #2771: change rayCast and rectQuery callback class to std::function 2013-11-07 16:23:50 +08:00
samuele3 c055b1a3d6 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developCCS 2013-11-07 15:45:56 +08:00
minggo 4a691942f1 Merge pull request #4113 from nutty898/develop_nutty_Mergemasterbranchtodevelopbranch
Merge 2.x version to 3.0 version
2013-11-06 19:37:08 -08:00
minggo f05b79d140 remove unneeded files 2013-11-07 11:29:23 +08:00
samuele3 4536798842 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developCCS 2013-11-07 10:18:38 +08:00
samuele3 6a1a774303 issue #2868:Config cocoStudio GUI lua binding files and add a few script files 2013-11-07 10:16:02 +08:00
CaiWenzhi cf20ae03ee Merge branch 'develop' into develop_nutty_Mergemasterbranchtodevelopbranch 2013-11-07 10:01:00 +08:00
James Chen d6d041f561 issue #3113: [Linux] Adding options for modules. 2013-11-06 19:17:34 +08:00
CaiWenzhi 7163dd4d76 Merge branch 'develop' into develop_nutty_Mergemasterbranchtodevelopbranch 2013-11-06 18:13:51 +08:00
CaiWenzhi 7a207431cd Merge branch 'develop' into develop_nutty_Mergemasterbranchtodevelopbranch
Conflicts:
	cocos/gui/UIHelper.h
2013-11-06 16:13:10 +08:00
2youyou2 fcf0b1ef5f Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into develop 2013-11-06 16:06:37 +08:00
CaiWenzhi e0aa82da13 Merge master branch to develop branch 2013-11-06 16:04:06 +08:00
boyu0 75dd32cde9 issue #2771: fix physics test compile error 2013-11-06 14:34:27 +08:00
James Chen c364c4f083 issue #3113: Updating CMakeLists.txt, Improve Copying files. 2013-11-06 10:57:36 +08:00
Luis Parravicini 8b1d3af720 added | operator for Control::EventType 2013-11-05 23:55:24 -03:00
boyu0 af129e25f0 issue #2771: change some coding style 2013-11-05 20:02:58 +08:00
2youyou2 16c23d0ad3 remove CC_PROPERTY and CC_SYNTHESIZE. 2013-11-05 19:53:38 +08:00
boyu0 8c62bf813f issue #2771: enhance API and add Slice demo 2013-11-05 15:54:33 +08:00
2youyou2 3eef64c3b8 1. Change NULL to null
2. Remove CocoStudio/Armature files
2013-11-05 15:32:13 +08:00
samuele3 b76865c692 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developCCS 2013-11-05 15:11:05 +08:00
samuele3 b445f0824a issue #2868:Bind UI and Scene parser to lua by bindings-generator and add releated test samples 2013-11-05 15:09:51 +08:00
2youyou2 b076711b69 fix compile error 2013-11-05 13:42:27 +08:00
Nite Luo e4ffd250cb Simple implementation of RenderCommand and RenderQueue 2013-11-04 09:14:22 -08:00
James Chen edb1fc7822 [cmake] Deletes .icf files. 2013-11-04 21:03:09 +08:00
James Chen 733197fa65 [cmake] copy resources works. 2013-11-04 21:03:08 +08:00
James Chen 9be8ca3714 [cmake] output lib to root/lib 2013-11-04 21:03:08 +08:00
James Chen daa91ad413 [CMake] Update library dependency. 2013-11-04 21:03:07 +08:00
James Chen c085412636 [CMake] TestLua and HelloLua is ok. 2013-11-04 21:03:07 +08:00
James Chen 922924e1ab TestCpp is ok. 2013-11-04 21:03:07 +08:00
James Chen e560de6e4e HelloCpp works. 2013-11-04 21:03:07 +08:00
James Chen 8cdd1af982 HelloCpp CMakeLists.txt 2013-11-04 21:03:07 +08:00
samuele3 3289ce8fe0 issue #3037:Modify vs2012 config 2013-11-04 14:50:23 +08:00
samuele3 ba6cf00d9b Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developAssetsManager 2013-11-04 14:47:10 +08:00
samuele3 790be0decc issue #3037:Modify vs2012 config 2013-11-04 14:43:22 +08:00
minggo d1c02e6faa Merge pull request #4078 from minggo/iss3108-signed_char
closed #3108: add -fsigned-char to make char to signed as default on Android arm architecture
2013-11-03 22:37:37 -08:00
boyu0 00acd67ff3 issue #2771: finish OneWayPlatform demo and fix some bugs 2013-11-04 14:36:38 +08:00
minggo f6d82d21d2 closed #3108: add -fsigned-char to make char to signed as default 2013-11-04 10:48:45 +08:00
minggo 25b0ffe853 Merge pull request #4022 from boyu0/iss2771_physical
issue #2771: physical
2013-11-03 18:40:14 -08:00
James Chen 8f213420eb closed #3106: Update NewEventDispatcherTest.cpp. 2013-11-02 22:05:04 +08:00
James Chen 7dc6513687 Adding more tests for EventDispatcherTest. 2013-11-02 21:47:00 +08:00
boyu0 04c8e9f34e Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-11-02 00:12:14 +08:00
James Chen b751c41498 [Android] Updating Android.mk for JSB projects. 2013-11-01 18:27:47 +08:00
James Chen e893ae5697 Using namespace std; for AssetsManagerTest. 2013-11-01 18:27:09 +08:00
minggo d4210c77bb Merge pull request #4058 from samuele3hu/developAssetsManager
issue #3037:Add assetsmananger lua binding and a releated test sample
2013-11-01 02:50:47 -07:00
boyu0 6d37aa8cd5 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-11-01 17:39:09 +08:00
James Chen c754e1b64f Merge pull request #4035 from darkdukey/mousewheel_mac
issue #3099: Adding MouseEvent and MouseListener, Adding Mouse Support For Desktop Platform.
2013-11-01 02:33:28 -07:00
samuele3 463ed08ffe issue #3037:Modify AssetsManagerTest.lua 2013-11-01 17:29:09 +08:00
samuele3 80f3a7d57a Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developAssetsManager
Conflicts:
	build/cocos2d_samples.xcodeproj/project.pbxproj
	cocos/scripting/lua/bindings/LuaScriptHandlerMgr.h
	cocos/scripting/lua/script/Cocos2dConstants.lua
2013-11-01 17:17:21 +08:00
James Chen 9fad8bfc8d Don't set debug flag in AndroidManifest.xml. 2013-11-01 17:02:35 +08:00
boyu0 2f67ceb495 issue #2771: fix some code style 2013-11-01 16:26:03 +08:00
James Chen a04d1acede Fix of compilation errros of SimpleGame. 2013-11-01 15:19:51 +08:00
boyu0 b2951b70ff issue #2771: enhance Listener use EventListener mechanism 2013-11-01 14:50:06 +08:00
2youyou2 a9054ba14a 1.add method to set collider filter 2013-11-01 14:36:44 +08:00
James Chen db6bce4cf0 Merge pull request #4023 from samuele3hu/developHttp
issue #3049:Add XMLHttpRequest lua binding and corresponding test sample
2013-10-31 20:40:29 -07:00
samuelhu 5010779e39 issue #3049:Reset .project file in pro.android. 2013-11-01 11:36:06 +08:00
samuelhu f3ff7955a8 issue #3037:Modify platform build config 2013-11-01 11:18:02 +08:00
minggo f684dc0ff7 Merge pull request #4025 from Dhilan007/di2893
issues #2893:perfect new label
2013-10-31 18:46:30 -07:00
James Chen 074f688d95 Merge pull request #4030 from dumganhar/spv25
[sp v25] Updating SpiderMonkey library to FFv25.
2013-10-31 07:08:09 -07:00
samuelhu de4aaeda2d issue #3049:Add XMLHttpRequest lua binding and corresponding test sample 2013-10-31 22:06:34 +08:00
samuelhu 4031556398 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into developHttp
Conflicts:
	build/cocos2d_samples.xcodeproj/project.pbxproj
	samples/Lua/TestLua/Resources/luaScript/mainMenu.lua
2013-10-31 21:57:24 +08:00
samuelhu 5891f00967 issue #3037:Add assetsmananger lua binding and a releated test sample 2013-10-31 21:52:28 +08:00
Dhilan007 150f1aeaab issue #2893:improve new label 2013-10-31 20:17:30 +08:00