Commit Graph

6777 Commits

Author SHA1 Message Date
James Chen 15d02e4db8 Merge branch 'iss1581-fix-jsbinding-bugs' of https://github.com/dumganhar/cocos2d-x into iss1583-js-tests
Conflicts:
	scripting/javascript/bindings/cocos2d_specifics.cpp
2012-11-30 21:43:44 +08:00
James Chen eaacc74ce5 issue #1583: Updated the submodule cocos2d-js-tests. 2012-11-30 21:39:58 +08:00
James Chen 95875112fa Merge branch 'iss1583-js-tests' of https://github.com/dumganhar/cocos2d-x into iss1583-js-tests 2012-11-30 21:19:19 +08:00
James Chen daf61bc3eb issue #1583: Deleted samples/WatermelonWithMe/watermelon_with_me.js. 2012-11-30 21:17:06 +08:00
James Chen 344fc5ca6f issue #1583: Updated tools/tojs/cocos2dx.ini. 2012-11-30 21:16:34 +08:00
James Chen 26790eb17a issue #1583: Added some Macros as follows:
cc.MENU_STATE_WAITING = 0;
cc.MENU_STATE_TRACKING_TOUCH = 1;
cc.MENU_HANDLER_PRIORITY = -128;
cc.DEFAULT_PADDING = 5;
2012-11-30 21:15:54 +08:00
James Chen 0d93f2d651 issue #1583: Bind cc.Menu.alignItemsInRows, cc.Menu.alignItemsInColums, cc.LayerMultiplex.create 2012-11-30 21:15:01 +08:00
James Chen 98045f667f issue #1583: Added CCMenu::alignItemsInColumnsWithArray, CCMenu::alignItemsInRowsWithArray, CCLayer::CCLayerMultiplex and CCLayer::initWithArray. 2012-11-30 21:13:25 +08:00
James Chen 96e2707f39 issue #1583: Added jsvals_variadic_to_ccarray function. 2012-11-30 21:12:14 +08:00
James Chen e899265fb3 Merge pull request #6 from minggo/iss1583-update-js
CocosDragonJS MoonWarriors and TestJavascript work ok on Android
2012-11-30 02:33:26 -08:00
minggo 9ac3a356d5 issue #1583:CocosDragonJS MoonWarriors and TestJavascript work ok on android 2012-11-30 18:27:08 +08:00
James Chen e8c5f5f38c Added CCTexture2D::setTexParameters binding.
Fixed pass one more argument in JSCallFuncWrapper::callbackFunc if extraData is void.
2012-11-30 18:15:29 +08:00
minggo bb6e03bd3f Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into iss1583-update-js 2012-11-30 17:42:51 +08:00
James Chen 1867add25e Merge pull request #5 from minggo/iss1583-update-js
issue #1583:MoonWarriors and CocosDragon work ok on iOS
2012-11-30 01:12:02 -08:00
minggo 81077aba58 issue #1583:MoonWarriors and CocosDragon work ok on iOS 2012-11-30 15:07:11 +08:00
James Chen 7417f53ed0 Updated cocos2d-js-tests reference. 2012-11-30 14:43:56 +08:00
James Chen 0333981c94 Suffix check. 2012-11-30 14:16:38 +08:00
minggo e727dfb014 Merge pull request #1681 from minggo/gles20
change accelerometer accurate to SENSOR_DELAY_GAME
2012-11-29 22:08:12 -08:00
minggo 54309c56b2 change accelerometer accurate to SENSOR_DELAY_GAME 2012-11-30 14:07:01 +08:00
James Chen 0f1232ab9f issue #1583: TestJavascript works ok on win32. 2012-11-30 14:01:35 +08:00
minggo 75fb997513 Merge pull request #1670 from rohankuruvilla/gles20
Fixing Accelerometer crash on Android
2012-11-29 22:01:16 -08:00
minggo 84b35c6d48 Merge pull request #1680 from minggo/gles20
comment codes for FPS controlling
2012-11-29 21:58:49 -08:00
minggo 61b2e2b880 comment codes for FPS controlling 2012-11-30 13:55:25 +08:00
James Chen da8cf18d24 Merge branch 'gles20' into iss1583-js-tests 2012-11-30 13:40:52 +08:00
James Chen 6e33d31a63 Updated the submodule cocos2d-js-tests. 2012-11-30 13:07:32 +08:00
James Chen c3b264e630 Using the Minggo's repo of cocos2d-js-tests. 2012-11-30 13:01:23 +08:00
James Chen 43e04bf070 Merge pull request #1679 from dumganhar/gles20
Made all projects compiled ok on Blackberry port.
2012-11-29 20:43:00 -08:00
James Chen 23629b8187 Made all projects compiled ok on Blackberry port. 2012-11-30 12:40:47 +08:00
William Chen 132a76d801 Fix for CCRenderTexture on Android sleep/resume
When an android app goes into the background, all gl context is lost, including any frame buffer objects that are required for rendering to a texture. When the android app returns to focus, a new FBO is generated for each render texture allowing rendering to the texture to continue.
2012-11-29 18:04:07 -05:00
James Chen c53cfe88a7 Merge pull request #1674 from fape/helloCPP_marmalade
Add missing AppMacros.h to HelloCpp marmalade project file
2012-11-29 02:21:34 -08:00
James Chen bd95b198fe Merge pull request #1675 from dumganhar/gles20
Fixed some warning and make TestCpp (win32 release version) compiled ok.
2012-11-29 02:20:52 -08:00
fape 834934fd15 add missing AppMacros.h to HelloCpp marmalade projekt file 2012-11-29 11:06:03 +01:00
James Chen d27ab38be9 fixed some warning and make win32 release version compiled ok. 2012-11-29 18:04:33 +08:00
minggo 26509ec9c4 Merge pull request #1673 from minggo/gles20
add Texture2DTest cases
2012-11-29 01:59:27 -08:00
minggo b6dab85611 add Texture2DTest cases 2012-11-29 17:57:33 +08:00
James Chen b569115f87 Merge pull request #1672 from dumganhar/gles20
Make sure HelloCpp can be full screen.
2012-11-29 00:33:23 -08:00
James Chen 788b478b3c Make sure HelloCpp can be full screen. 2012-11-29 16:31:29 +08:00
James Chen a37cc8a098 Updated jsb_constants_chipmunk.js and jsb_constants_cocosbuilder.js. 2012-11-29 15:29:58 +08:00
James Chen 494806167b Temporary commit. 2012-11-29 15:26:24 +08:00
James Chen 208132895e issue #1583: Moved the common js codes to scripting/javascript/bindings/js folder. Deleted the old js sample resources. 2012-11-29 11:27:39 +08:00
James Chen 358e47e981 issue #1583: Updated the submodule reference of cocos2d-js-tests. 2012-11-29 11:27:16 +08:00
James Chen e7219058af Merge pull request #1671 from dumganhar/gles20
fixed #1582: A logic bug in CCBAnimationManager::setAnimatedProperty.
2012-11-28 19:09:05 -08:00
James Chen 10195d0215 fixed #1582: A logic bug in CCBAnimationManager::setAnimatedProperty. 2012-11-29 11:07:06 +08:00
James Chen bb4b3fb4bc issue #1581: Deleted JS_AddObjectRoot when construct a JS array since JS_SetElement will not trigger a GC. 2012-11-29 11:01:32 +08:00
Rohan Kuruvilla a4b55b5217 Fixing Accelerometer crash on Android 2012-11-28 15:56:57 -08:00
James Chen a4762605b8 issue #1581: Removed some unused codes. 2012-11-28 22:24:12 +08:00
James Chen a814066601 issue #1581: JSBinding bug fixes.
Some fixes of JSBinding codes:
[1] Check whether the proxy was already added in JS_NEW_PROXY
[2] In struct schedFunc_proxy_t, JSScheduleWrapper* --> CCArray*
Reason: One js function may correspond to many targets. To debug this, you could refer to JSScheduleWrapper::dump function. It will prove that i'm right. :)
[3] In ScriptingCore::cleanupSchedulesAndActions function, we must invoke unschedule for all targets and remove the proxy both in _schedFunc_target_ht and _schedTarget_native_ht, otherwise the hash tables will grow bigger and bigger, so I added a new function JSScheduleWrapper::removeAllTargetsForNatiaveNode to make this things easier.
[4] To easily find out the bugs of binding codes, I add JS_SetGCZeal in ScriptingCore::createGlobalContext, it only works in DEBUG mode.
[5] In js_cocos2dx_CCNode_getChildren, we should add the generated array to root to avoid gc happen when invoking JS_SetElement.
[6] The JSCallFuncWrapper isn't needed since an action will be run by a cc.Node and it will be released at the CCNode::cleanup.
[7] Some improvements of JSScheduleWrapper class.
[8] Added a new function JSScheduleWrapper::setTarget, it's for js_CCNode_unschedule to find out which target need to be unscheduled.
[9] Commented JS_SetReservedSlot in js_CCNode_scheduleOnce and js_CCNode_schedule.
Reason:
For js_CCNode_scheduleOnce: Don't add the callback function to the reserved slot of this js object.Since the class of js object may be inherited from cocos class(e.g. cc.Sprite). The subclass will not contain reserved slots. It will crash if invoking this.
For js_CCNode_schedule: Don't add js callback function to the reserved slot of scheduler js object. Since the scheduler is an object always rooted.
So the callback function might not be released when gc comes.I looked inside the implementation of cc.Node.schedule, and it doesn't use JS_SetReservedSlot there.
2012-11-28 22:04:55 +08:00
Taro Kobayashi 3a814de07e implemented CCApplication::getCurrentLanguage() for linux platform 2012-11-28 19:41:50 +09:00
Taro Kobayashi 472ce4f9f3 add kLanguageKorean and kLanguageJapanese for lua binding 2012-11-28 18:21:06 +09:00
Taro Kobayashi a37e034e61 added support for Japanese language 2012-11-28 17:53:10 +09:00