Commit Graph

6443 Commits

Author SHA1 Message Date
minggo 9beac15305 issue #1603: modify some pathes 2012-12-21 15:05:22 +08:00
minggo f71f13fc53 issue #1536:add permissions and modify module path error 2012-12-21 14:40:34 +08:00
minggo 7b81217c3c issue #1603:modify pathes for auto test 2012-12-21 14:06:20 +08:00
minggo f23f69088c Merge pull request #4 from dumganhar/iss1603-adjust-directory
issue #1603: Updated TestLua project setting for iOS port.
2012-12-20 18:41:29 -08:00
James Chen e670d702a8 issue #1603: Updated TestLua project setting for iOS port. 2012-12-20 21:58:26 +08:00
James Chen a36446cba2 Merge branch 'iss1603-adjust-directory' of https://github.com/minggo/cocos2d-x into iss1603-adjust-directory 2012-12-20 18:39:52 +08:00
James Chen d94a0cf4c7 issue #1603: fixed a warning in unzip.cpp. 2012-12-20 18:39:29 +08:00
James Chen f47c5e1714 Added app.icf, development.icf. 2012-12-20 18:29:25 +08:00
minggo 65e01b9ade issue #1603:build ok on mac 2012-12-20 18:02:24 +08:00
James Chen f65717cd86 issue #1603: updated linux project configuration. 2012-12-20 17:49:34 +08:00
James Chen 08aa5066a5 issue #1603: updated blackberry, linux, marmalade project configurations. 2012-12-20 17:47:30 +08:00
James Chen 6700a1c4ce issue #1603: fixed some warnings for liblua.vcxproj. 2012-12-20 17:28:49 +08:00
minggo 977046cc32 issue #1603:make some samples build ok on iOS 2012-12-20 17:20:10 +08:00
James Chen 9a0a5e6b31 issue #1603: fixed some warnings. 2012-12-20 17:18:49 +08:00
James Chen 1562658bd8 issue #1603: Added libJSBinding project for win32 platform. 2012-12-20 17:18:02 +08:00
James Chen 7b19ab2689 Updated vs project configuration after adjusting directory. 2012-12-20 15:07:19 +08:00
minggo 959b7a3f0d issue #1603:build MoonWarriors ok on iOS and android 2012-12-20 15:06:02 +08:00
minggo 7433da8bec issue #1603:build CocosDragon ok on iOS and android 2012-12-20 14:54:20 +08:00
James Chen af03a969c1 Merge branch 'iss1603-adjust-directory' of https://github.com/minggo/cocos2d-x into iss1603-refactor-folder 2012-12-20 14:36:08 +08:00
minggo f9a9d45f88 issue #1603:adjust samples directory
Signed-off-by: minggo <ming@cocos2d-x.org>
2012-12-20 14:14:53 +08:00
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
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
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