Commit Graph

143 Commits

Author SHA1 Message Date
halx99 a2adfaf7df #Improve node sort performance for 64-bit by std::sort + long long (_localZOrder) ()
* #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
MagicXrEv 8e6ca57f4f lua binding : Rename end() to endToLua(). 2016-06-14 23:35:17 +08:00
xpol 43a94c0693 Add FileUtils::getContents(). ()
* Add FileUtils::getContents().

* skip FileUtils::getContents() in binding generator config.

* use FileUtils::getContents in CCDataReaderHelper.

* obey the cocos2d-x coding style.

* Explicit constructor.

* More docs.

* More tests.

* Move FileError to FileUtils::Error.

* Fixes wrong buffer size for reading into string and vector.

* Update tests.

* Add note on padding for output buffers.

* FileUtils: implements old methods by using `getContents()`.

methods are:

* FileUtils::getDataFromFile()
* FileUtils::getStringFromFile()
* FileUtils::getFileData()

and follow Android methods are now just calls FileUtils' ones.

* FileUtilsAndroid::getDataFromFile()
* FileUtilsAndroid::getStringFromFile()
* FileUtilsAndroid::getFileData()

* Fixes build error.

* FileUtils::getFileData: Return the size of data.

* Remove old methods form FileUtilsAndroid they are now done in FileUtils.

* Fixes for win32 code.

* Fixes build error in test and add more test.

* Better error message.

* Make template type name more readable.

* Update comments.

* Move internal functions to anonymous namespace.

* Refactor FileUtils test.

* Fix warning about compare signed and unsigned.

* Win32 and WinRT does not use text mode.

That is we don't need simulate convert CRLF to LF.

* Fixes for Win32 and WinRT.

* Update for Win32 and WinRT.

* Win32: return FileUtils:Error::TooLarge when file is large than 2^32-1.
* Win32: remove checkFileName() which has no effect at all.
* WinRT: add FileUtilsWinRT::getContents() using ::CreateFile2.
* WinRT: add override keyword for FileUtilsWinRT::getFileSize().

* Update for coding styles.

* More error strings.

* check read and malloc return codes.

* rename FileUtils::Error to FileUtils::Status.

* Fixes for WinRT, use GetFileInformationByHandleEx to get file size.

* Fixes build error for winrt and cleanup FileUtils::Status.

* Try to fix the build error on Linux.

Status must defined in some header, so move FileUtils.h up.

* Remove support of text mode on WinRT (it is the last platform support text mode).
2016-04-26 13:37:22 +08:00
yangxiao 1b3cb97b71 fix script binding 2015-12-01 23:05:47 +08:00
Joachim Grill 9a0ea79b61 remove set/get/hasPolygonInfo methods from js / lua api; fixed C++11 issue 2015-09-30 15:20:53 +02:00
pandamicro 7b85211cfe Remove ScriptComponent
Because windows platform can't successfully compile in previous architecture
2015-09-27 22:18:59 +08:00
pandamicro 2a3526a3fd Fix lua project 2015-09-26 19:43:36 +08:00
pandamicro ddb636a022 Add ScriptComponent and ComponentJS 2015-09-26 19:43:36 +08:00
pandamicro 7e2b8c71a7 Improve lua script component 2015-09-26 19:43:35 +08:00
minggo 26632ec69a linjia demo finish 2015-09-26 19:43:35 +08:00
WenhaiLin a3f363735e Refine lua/js binding tool 2015-09-19 00:08:15 +08:00
WenhaiLin a17a702cd1 Refine components to improve performance 2015-09-18 14:34:02 +08:00
Ricardo Quesada d2e8cf53be don't generate bindings for `getCocos2dThreadId` 2015-08-13 11:18:51 -07:00
pandamicro 3c2e66e425 Merge branch 'v3.7.1' of https://github.com/cocos2d/cocos2d-x into v3
# Conflicts:
#	.travis.yml
#	build/cocos2d_js_tests.xcodeproj/project.pbxproj
#	build/cocos2d_tests.xcodeproj/project.pbxproj
#	cocos/2d/CCFont.h
#	cocos/2d/CCFontAtlas.cpp
#	cocos/2d/CCFontAtlas.h
#	cocos/2d/CCFontFreeType.cpp
#	cocos/2d/CCFontFreeType.h
#	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj
#	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj
#	cocos/2d/libcocos2d_win10/libcocos2d.vcxproj
#	cocos/cocos2d.cpp
#	cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp
#	templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj
#	templates/js-template-default/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj
#	templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj
#	templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj
#	tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp
#	tests/cpp-tests/Classes/LabelTest/LabelTestNew.h
#	tools/bindings-generator
#	tools/simulator/frameworks/runtime-src/proj.ios_mac/simulator.xcodeproj/project.pbxproj
#	tools/travis-scripts/generate-bindings.sh
#	tools/travis-scripts/generate-cocosfiles.sh
#	tools/travis-scripts/travis_mac.yml
2015-08-02 22:28:27 +08:00
dualface 4c7e4c654a update cocos2dx.ini for luabinding 2015-07-26 17:16:50 +08:00
pandamicro 15bb633adb Revert "add lua-binding of EventDispacher::dispatchCustomEvent()" 2015-07-12 20:19:52 +08:00
pandamicro 0d9da2f500 Merge pull request from minggo/bind-missing-function
add lua-binding of EventDispacher::dispatchCustomEvent()
2015-07-11 17:17:32 +08:00
minggo 3911e1d696 add lua-binding of EventDispacher::dispatchCustomEvent() 2015-07-10 10:29:21 +08:00
jianglong0156 13d00d129d fix the jsb and lua ini error, ignore writeDataToFile 2015-07-07 14:54:31 +08:00
samuele3hu ef1bccd926 Fix the error skip function error for Sprite. 2015-06-18 12:03:30 +08:00
WuHao 27d0f51e9b Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into fix_spritepolygon
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	build/cocos2d_tests.xcodeproj/project.pbxproj
	cocos/2d/libcocos2d.vcxproj.filters
	tools/cocos2d-console
	web
2015-06-15 16:13:36 +08:00
samuele3hu 1b20e463d8 Update the Lua binding about the Polygon and update the test case. 2015-06-11 14:38:38 +08:00
yangxiao c782d63bef add 3d navigation 2015-05-29 16:45:33 +08:00
samuele3hu 9934d73548 issue : Add Lua bindings for material systems and related test cases. 2015-05-27 15:37:59 +08:00
samuele3hu f4b57511b0 Update cocos2dx_3d.ini and cocos2dx.ini for generating Lua bindings code to support CC_CONSTRUCTOR_ACCESS equal to public 2015-04-30 17:18:12 +08:00
samuele3hu 5819159889 Add Lua-bindings for SpritePolygon and related test case 2015-04-28 18:19:57 +08:00
samuele3hu 79c0258449 Remove useless configure for bindings-generator of Lua 2015-03-30 15:48:47 +08:00
samuele3hu 80c2e0c153 Add AsyncLoadSprite3D test case and update the related lua binding 2015-01-28 21:47:52 +08:00
samuele3hu 1d94ae4302 issue #9820:Inconsistent :setBlendFunc(...) function binding for Sprite and LabelBMFont classes 2015-01-14 13:51:09 +08:00
samuele3hu 58d946b578 issue : Extract related physical auto-binding codes to manual-binding to add `CC_USE_PHYSICS` limit 2015-01-05 17:10:25 +08:00
yangxiao de7b70f63e skip Node::set/getRotationQuat 2014-12-25 14:55:43 +08:00
samuele3hu 222f2cbd51 Decrease the package size of lua_empty_test 2014-11-26 21:54:18 +08:00
samuele3hu a62fa8de58 Skip binding nodeWithFlatBuffers of CSLoader for lua 2014-11-24 23:36:44 +08:00
samuele3hu 042969ce35 Remove some useless rename functions in the cocos2dx.ini and cocos2dx_studio.ini 2014-10-20 16:14:24 +08:00
samuele3hu 3348f8300e Add lua-bindings for AmbientLight,BaseLight,DirectionLight,PointLight,SpotLight and related test case 2014-10-18 00:13:22 +08:00
samuele3hu 936510411b Rename addSpriteFramesWithFile->addSpriteFrames for SpriteFrameCache 2014-10-17 15:04:16 +08:00
samuele3hu b4c91f0712 Update the related cocosstudio lua test cases 2014-10-16 15:51:01 +08:00
samuele3hu 4a67963420 Update CSLoader lua-bindings and adjust project config 2014-10-14 23:37:00 +08:00
yangxiao d680e58f80 merge cocos resolve conflict 2014-09-30 08:32:37 +08:00
samuele3hu 6ea43a60b0 Update cocos2dx.ini to skip Node::setAdditionalTransform 2014-09-29 10:19:32 +08:00
samuele3hu f00187d3bb Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_3D
Conflicts:
	tools/tolua/cocos2dx.ini
2014-09-29 09:48:35 +08:00
samuele3hu 6b2acf88fc Modify CameraTest and update related lua-bindings files 2014-09-28 16:47:06 +08:00
samuele3hu e50eaf684f Add CameraTest and update related lua-bindings files 2014-09-28 14:31:58 +08:00
yangxiao 98d9cea774 merge cocos 2014-09-26 15:14:57 +08:00
yangxiao d69b6558c4 lua 2014-09-26 15:07:23 +08:00
Hong Liang 1c71234921 export lua function "cc.Device::getDPI()" 2014-09-26 11:52:52 +08:00
minggo 55783b66c2 Merge pull request from huangshiwu/v3_drawnode_prbk
V3 drawnode prbk
2014-09-12 15:17:49 +08:00
huangshiwu d9634057ab Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_drawnode_prbk 2014-09-11 16:41:54 +08:00
yangxiao 5274b4f958 merge cocos resolve conflict 2014-09-11 16:02:07 +08:00
huangshiwu fb1d47900c Deprecate DrawPrimitives and enhance DrawNode 2014-09-11 15:39:56 +08:00