Commit Graph

6741 Commits

Author SHA1 Message Date
James Chen dcfd38756d Updated android build files. 2012-12-20 14:04:49 +08:00
James Chen 4660e72eda issue #1603: Moved the position of some projects. 2012-12-20 12:58:21 +08:00
James Chen 3130e0d6a4 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1603-refactor-folder
Conflicts:
	samples/Javascript/Shared
2012-12-20 11:33:14 +08:00
James Chen eb0e189842 Moved the submodule of cocos2d-js-tests and renamed it to Shared. 2012-12-20 11:30:18 +08:00
James Chen c610f85ffd Merge pull request #1764 from dumganhar/iss1617-js-improvements
fixed #1617: Some improvements for JS Bindings.
2012-12-19 19:26:04 -08:00
James Chen 4a41b25753 Merge pull request #1767 from dumganhar/gles20
Updated the submodule of cocos2d-js-tests.
2012-12-19 18:43:47 -08:00
James Chen 43c8aa6878 Updated the submodule of cocos2d-js-tests. 2012-12-20 10:41:36 +08:00
johnangel b8eaf00359 ESC button on Windows behaves like Back button 2012-12-19 21:11:26 +01:00
johnangel f409aba724 Setting Windows app title 2012-12-19 20:43:09 +01:00
unknown adb68ddbb6 Enable Windows XP support in Visual Studio 2012 Update 1.
Not tested with Visual Studio 2010, not sure will it work with PlatformToolset v110_xp.
2012-12-19 19:28:25 +01:00
unknown fdd67d37c9 Missing subproject 2012-12-18 23:01:22 +01:00
James Chen e8c0844dd5 fixed #1617: Some improvements for JS Bindings.
1) Changed cc.REPEAT_FOREVER = - 1 to cc.REPEAT_FOREVER = 0xffffffff
[Reason]: If cc.REPEAT_FOREVER = -1, it will be a very big double value after converting it to double by JS_ValueToNumber on android.
Then cast it to unsigned int, the value will be 0. The schedule will not be able to work.
I don't know why this occurs only on android.
[Solution]: Instead of passing -1 to it, I assign it with max value of unsigned int in c++.

2) Added two helper function, cc.ArrayGetIndexOfObject and cc.ArrayContainsObject.

3) Added JSScheduleWrapper::removeTargetForNativeNode to avoid memory leaks.

4) Improvments for JSTouchDelegate. Added four functions as follows:
// Set the touch delegate to map by using the key (pJSObj).
static void setDelegateForJSObject(JSObject* pJSObj, JSTouchDelegate* pDelegate);

// Get the touch delegate by the key (pJSObj).
static JSTouchDelegate* getDelegateForJSObject(JSObject* pJSObj);

// Remove the delegate by the key (pJSObj).
static void removeDelegateForJSObject(JSObject* pJSObj);

void unregisterTouchDelegate();
And exported cc.unregisterTouchDelegate(); to js.
Fix a memory leak for JSTouchDelegate by making it as an autorelease object.

5) Don't add js callback function to the reserved slot of object.
[Reason]: The target object may execute more than one schedule.
Therefore, previous js callback function will be replaced
by the current one. For example:

this.scheduleOnce(function() { temporary function 1 }, 0.5);
this.scheduleOnce(function() { temporary function 2 }, 0.5);

In this case, the temporary function 1 will be removed from reserved slot 0.
And temporary function 2 will be set to reserved slot 0 of this object.
If gc is triggered before the JSScheduleWrapper::scheduleFunc is invoked,
crash will happen. You could simply reproduce it by adding jsc.garbageCollect(); after scheduleOnce.
[Solution] Because one schedule corresponds to one JSScheduleWrapper, we root
the js callback function in JSScheduleWrapper::setJSCallbackFunc and unroot it
at the destructor of JSScheduleWrapper.
2012-12-18 11:56:44 +08:00
James Chen c2e1cf2d51 Merge pull request #1763 from CocosRobot/updategeneratedsubmodule_1355729180
cocos2dxmatoMac-mini : updating submodule reference to latest autogenerated bindings
2012-12-16 23:40:28 -08:00
CocosRobot 13b04e3ee4 cocos2dxmatoMac-mini : updating submodule reference to latest autogenerated bindings 2012-12-17 15:26:28 +08:00
minggo e9c7db5a36 Merge pull request #1761 from dualface/fix_ccnode_scheduleupdate_lua
[lua] remove current schedule before register new script schedule
2012-12-16 17:26:59 -08:00
minggo 325db7e4f5 Merge pull request #1760 from dualface/fix_android_compile_warning
fix android compile warning
2012-12-16 17:26:19 -08:00
dualface c3f900d36c [lua] remove current schedule before register new script schedule 2012-12-14 18:06:21 +08:00
dualface 98ea80329e fix android compile warning 2012-12-14 18:01:54 +08:00
James Chen 5b23475451 Merge pull request #1759 from dumganhar/gles20
fixed #1614: DrawNodeTest crashes on JSB.
2012-12-13 18:33:26 -08:00
James Chen 254e3838d5 Updated the submodule reference of cocos2d-js-tests to the latest version. 2012-12-14 10:32:06 +08:00
James Chen e7328cf3ba fixed #1614: DrawNodeTest crashes on JSB. 2012-12-14 10:31:31 +08:00
tiantian dc49561357 Fix crash for call runAnimation() in CCBAnimationManagerDelegate::completedAnimationSequenceNamed; Set mRunningSequence to NULL before any runAnimation() call; 2012-12-13 13:21:58 +08:00
James Chen b872909152 Merge pull request #1756 from dumganhar/gles20
Added cc.DrawNode.extend.
2012-12-12 05:51:53 -08:00
Nicolas Gramlich 9537389949 Added cc.DrawNode.extend. 2012-12-12 21:49:29 +08:00
James Chen e706cdb207 Merge pull request #1754 from dualface/fix_compile_error_for_ios_mac_cpp11
fixed #1612: Compilation errors occur when using c++11 compiler for ios/mac.
2012-12-10 02:20:52 -08:00
dualface d6a84e0d16 fix compile error for ios/mac c++11 2012-12-10 18:10:41 +08:00
James Chen 38a1e52bed Update AUTHORS 2012-12-10 17:31:27 +08:00
James Chen 597a6f181d Merge pull request #1752 from dumganhar/linux-lua
fixed #1611: Adding lua support for linux platform
2012-12-10 01:29:15 -08:00
James Chen 190e6c1de5 Merge branch 'linux-lua' of https://github.com/dumganhar/cocos2d-x into lua-linux
Conflicts:
	scripting/lua/cocos2dx_support/LuaCocos2d.cpp
2012-12-10 17:25:23 +08:00
minggo 9d793f0def Merge pull request #1751 from minggo/iss1610_labelttf
fixed #1610:skip only white character
2012-12-10 01:19:27 -08:00
minggo e15c0a33ae fixed #1610:skip only white character 2012-12-10 17:18:20 +08:00
James Chen fdd1479ca9 Merge pull request #1747 from dualface/lua_update
Updated something for luabinding:
1) fix invalid export, e.g. va_list
2) fix CCSequence export 
3) Updated LuaCocos2d.cpp.
2012-12-10 01:11:11 -08:00
James Chen 15251626b0 Merge pull request #1748 from guanqun/fix-doxygen
fix the doxygen output of CCAtlasNode
2012-12-10 01:01:21 -08:00
dualface f815cdc423 merge gles20 2012-12-10 17:00:16 +08:00
James Chen 0adc070146 Merge pull request #1749 from guanqun/fix-reorder
fix the reorder warning of class CCCallFunc
2012-12-10 00:59:00 -08:00
dualface d9abb15b9a Merge branch 'gles20' of git://github.com/cocos2d/cocos2d-x into gles20 2012-12-10 16:56:42 +08:00
James Chen 6cca9b6548 Merge pull request #1750 from dumganhar/iss1608-lua-scheduleUpdateWithPriority
fixed #1608: Adding CCNode::scheduleUpdateWithPriorityLua() for LuaBinding.
2012-12-10 00:54:16 -08:00
James Chen 65d81b0de7 fixed #1608: Updated tools/tolua++/CCAction.pkg. 2012-12-10 16:50:02 +08:00
James Chen fcead8ba34 Merge branch 'lua_add_CCNode_scheduleUpdateScriptHandlerWithPriority' of https://github.com/dualface/cocos2d-x into lua-schedule-improvement 2012-12-10 16:36:46 +08:00
minggo 0f58987ad1 Merge pull request #1740 from rtissera/gles20
[android] Cocos2dxHelper/CCFileUtils JNI fixes and improvements
2012-12-10 00:33:11 -08:00
dualface f08b9c4573 performance fix 2012-12-10 16:31:57 +08:00
dualface 268aa45d2c rename CCNode:scheduleUpdateScriptHandlerWithPriority() to CCNode::scheduleUpdateWhitPriorityLua()
remove unused functions
2012-12-10 16:09:23 +08:00
Lu Guanqun b2c13cba9d fix the reorder warning of class CCCallFunc
../actions/CCActionInstant.h: In constructor 'cocos2d::CCCallFunc::CCCallFunc()':
../actions/CCActionInstant.h:240:25: warning: 'cocos2d::CCCallFunc::<anonymous union>::m_pCallFunc' will be initialized after [-Wreorder]
../actions/CCActionInstant.h:236:6: warning:   'int cocos2d::CCCallFunc::m_nScriptHandler' [-Wreorder]
../actions/CCActionInstant.h:188:5: warning:   when initialized here [-Wreorder]
2012-12-10 16:07:19 +08:00
Lu Guanqun 497ae7c33f fix the reorder warning of class CCCallFunc
../actions/CCActionInstant.h: In constructor 'cocos2d::CCCallFunc::CCCallFunc()':
../actions/CCActionInstant.h:240:25: warning: 'cocos2d::CCCallFunc::<anonymous union>::m_pCallFunc' will be initialized after [-Wreorder]
../actions/CCActionInstant.h:236:6: warning:   'int cocos2d::CCCallFunc::m_nScriptHandler' [-Wreorder]
../actions/CCActionInstant.h:188:5: warning:   when initialized here [-Wreorder]
2012-12-10 16:05:17 +08:00
Lu Guanqun 64772d09b0 fix the doxygen output of CCAtlasNode 2012-12-10 15:31:26 +08:00
minggo 0c00f7cb70 Merge pull request #1746 from dumganhar/gles20
fixed #1606: Return CCSequence pointer for CCSequence::create.
2012-12-09 22:30:27 -08:00
dualface 77d4da6e22 [lua] remove va_list 2012-12-10 14:28:26 +08:00
James Chen fc16cd8d01 Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20 2012-12-10 14:21:18 +08:00
dualface b6e605b9ae [lua] fix CCSequence export 2012-12-10 14:19:18 +08:00
James Chen 21f88534cf fixed #1606: Updated some invocations of CCSequence for TestCpp project. 2012-12-10 14:12:56 +08:00