Commit Graph

6406 Commits

Author SHA1 Message Date
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
James Chen cccd9d5294 Merge pull request #1664 from CocosRobot/updategeneratedsubmodule_1354074829
cocos2dxmatoMac-mini : updating submodule reference to latest autogenerated bindings
2012-11-27 19:55:27 -08:00
CocosRobot 9e929019c3 cocos2dxmatoMac-mini : updating submodule reference to latest autogenerated bindings 2012-11-28 11:53:56 +08:00
James Chen 40e8073167 Merge pull request #1663 from dumganhar/gles20
Updated the submodule reference of cxx-generator. Bind some functions for js:
2012-11-27 19:51:08 -08:00
James Chen 95ccf17739 Bind some functions for js:
void runAnimationsForSequenceNamedTweenDuration(const char *pName, float fTweenDuration);
    void runAnimationsForSequenceNamed(const char *pName);
    void runAnimationsForSequenceIdTweenDuration(int nSeqId, float fTweenDuraiton);
2012-11-28 11:49:20 +08:00
Lu Guanqun f64774ec6c when user specified 'group' parameter, it should be parsed as an 'int'
Otherwise, when we do slicing, it would report type error.
2012-11-27 15:11:43 +08:00
minggo 33647ccebb Merge pull request #1660 from minggo/gles20
make CocosGragon work on iOS devices with debug mode
2012-11-26 19:57:37 -08:00
minggo 09344d55be make CocosGragon work on iOS devices with debug mode 2012-11-27 11:55:59 +08:00
James Chen 342c7bc724 Merge pull request #1657 from fape/cocos_extensions_marmalade
fixed #1578: Create cocos2dx-ext marmalade project.
2012-11-26 19:15:06 -08:00
James Chen 0ce47db8f1 Merge pull request #1648 from CocosRobot/updategeneratedsubmodule_1353897594
cocos2dxmatoMac-mini : updating submodule reference to latest autogenerated bindings
2012-11-26 19:13:05 -08:00
James Chen 24d6a1658d Merge pull request #1659 from dumganhar/gles20
fixed #1577: Fix touch event lost on Win32, the reason is that:
Cocos2d-x is using touch event callback for all platforms, it's different from cocos2d-iphone which uses mouse event for Mac port. So we just need to touch event by using kCCBPlatformIOS.
2012-11-26 19:09:24 -08:00