From 69b2b133254fa93a181edcafc5b0261751a7afec Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 11 Mar 2013 16:39:28 +0800 Subject: [PATCH 1/4] fixed #1748: Generating jsb_cocos2dx_extension_auto.hpp/.cpp. It was separated from original `cocos2dx.hpp/cpp`. Developer could remove redundant jsbinding codes now. --- .../CocosDragonJS/Classes/AppDelegate.cpp | 8 +- .../CocosDragonJS.xcodeproj/project.pbxproj | 1155 +++++++ .../project.pbxproj.REMOVED.git-id | 1 - .../CrystalCraze/Classes/AppDelegate.cpp | 8 +- .../CrystalCraze.xcodeproj/project.pbxproj | 108 +- .../MoonWarriors/Classes/AppDelegate.cpp | 8 +- .../MoonWarriors.xcodeproj/project.pbxproj | 720 +++++ .../project.pbxproj.REMOVED.git-id | 1 - .../TestJavascript/Classes/AppDelegate.cpp | 6 +- .../project.pbxproj.REMOVED.git-id | 2 +- .../WatermelonWithMe/Classes/AppDelegate.cpp | 6 +- .../project.pbxproj.REMOVED.git-id | 2 +- scripting/javascript/bindings/Android.mk | 4 +- .../javascript/bindings/cocos2d_specifics.cpp | 2790 +++++++++++++++++ .../cocos2d_specifics.cpp.REMOVED.git-id | 1 - scripting/javascript/bindings/js/jsb.js | 1 + .../javascript/bindings/js/jsb_cocos2d.js | 39 +- .../bindings/js/jsb_cocos2d_extension.js | 41 + .../jsb_cocos2dx_extension_manual.cpp | 383 +++ .../bindings/jsb_cocos2dx_extension_manual.h | 17 + tools/tojs/cocos2dx.ini | 19 +- tools/tojs/cocos2dx_extension.ini | 65 + tools/tojs/genbindings.sh | 5 +- 23 files changed, 5246 insertions(+), 144 deletions(-) create mode 100644 samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj delete mode 100644 samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id create mode 100644 samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj delete mode 100644 samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj.REMOVED.git-id create mode 100644 scripting/javascript/bindings/cocos2d_specifics.cpp delete mode 100644 scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id create mode 100644 scripting/javascript/bindings/js/jsb_cocos2d_extension.js create mode 100644 scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp create mode 100644 scripting/javascript/bindings/jsb_cocos2dx_extension_manual.h create mode 100644 tools/tojs/cocos2dx_extension.ini diff --git a/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp b/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp index bcfda7d461..ca31d40370 100644 --- a/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp +++ b/samples/Javascript/CocosDragonJS/Classes/AppDelegate.cpp @@ -6,9 +6,10 @@ #include "cocos2d.h" #include "SimpleAudioEngine.h" #include "ScriptingCore.h" -#include "generated/cocos2dx.hpp" +#include "generated/jsb_cocos2dx_auto.hpp" +#include "generated/jsb_cocos2dx_extension_auto.hpp" +#include "jsb_cocos2dx_extension_manual.h" #include "cocos2d_specifics.hpp" -#include "js_bindings_chipmunk_registration.h" #include "js_bindings_ccbreader.h" #include "js_bindings_system_registration.h" @@ -113,9 +114,10 @@ bool AppDelegate::applicationDidFinishLaunching() ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); + sc->addRegisterCallback(register_all_cocos2dx_extension); sc->addRegisterCallback(register_cocos2dx_js_extensions); + sc->addRegisterCallback(register_all_cocos2dx_extension_manual); sc->addRegisterCallback(register_CCBuilderReader); - sc->addRegisterCallback(jsb_register_chipmunk); sc->addRegisterCallback(jsb_register_system); sc->start(); diff --git a/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj b/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6638c09553 --- /dev/null +++ b/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj @@ -0,0 +1,1155 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 152647CB16B6AA5100A2D258 /* fileLookup.plist in Resources */ = {isa = PBXBuildFile; fileRef = 152647CA16B6AA5100A2D258 /* fileLookup.plist */; }; + 159004B2166DE190006BF838 /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 159004B1166DE18F006BF838 /* Icon-57.png */; }; + 159004B4166DE19C006BF838 /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 159004B3166DE19C006BF838 /* Icon-114.png */; }; + 159004B6166DE1A8006BF838 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 159004B5166DE1A8006BF838 /* Icon-72.png */; }; + 159004B8166DE1AF006BF838 /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 159004B7166DE1AF006BF838 /* Icon-144.png */; }; + 15A3CEB31682C292002FB0C5 /* Bomb.ccbi in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE8D1682C292002FB0C5 /* Bomb.ccbi */; }; + 15A3CEB51682C292002FB0C5 /* ccbResources in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE8F1682C292002FB0C5 /* ccbResources */; }; + 15A3CEB61682C292002FB0C5 /* cloud.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE901682C292002FB0C5 /* cloud.png */; }; + 15A3CEB71682C292002FB0C5 /* Coin.ccbi in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE911682C292002FB0C5 /* Coin.ccbi */; }; + 15A3CEB91682C292002FB0C5 /* Coin.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE931682C292002FB0C5 /* Coin.mp3 */; }; + 15A3CEBA1682C292002FB0C5 /* Dragon.ccbi in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE941682C292002FB0C5 /* Dragon.ccbi */; }; + 15A3CEBC1682C292002FB0C5 /* EndCoin.ccbi in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE961682C292002FB0C5 /* EndCoin.ccbi */; }; + 15A3CEBE1682C292002FB0C5 /* Explo.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE981682C292002FB0C5 /* Explo.mp3 */; }; + 15A3CEBF1682C292002FB0C5 /* Explosion.ccbi in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE991682C292002FB0C5 /* Explosion.ccbi */; }; + 15A3CEC11682C292002FB0C5 /* gameobjects.plist in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE9B1682C292002FB0C5 /* gameobjects.plist */; }; + 15A3CEC21682C292002FB0C5 /* gameobjects.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE9C1682C292002FB0C5 /* gameobjects.png */; }; + 15A3CEC31682C292002FB0C5 /* GameScene.ccbi in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE9D1682C292002FB0C5 /* GameScene.ccbi */; }; + 15A3CEC51682C292002FB0C5 /* Level.ccbi in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE9F1682C292002FB0C5 /* Level.ccbi */; }; + 15A3CEC71682C292002FB0C5 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA11682C292002FB0C5 /* logo.png */; }; + 15A3CEC91682C292002FB0C5 /* MainMenuScene.ccbi in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA31682C292002FB0C5 /* MainMenuScene.ccbi */; }; + 15A3CECB1682C292002FB0C5 /* Music.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA51682C292002FB0C5 /* Music.mp3 */; }; + 15A3CECC1682C292002FB0C5 /* play-button-down.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA61682C292002FB0C5 /* play-button-down.png */; }; + 15A3CECD1682C292002FB0C5 /* play-button.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA71682C292002FB0C5 /* play-button.png */; }; + 15A3CECF1682C292002FB0C5 /* resources-ipad in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA91682C292002FB0C5 /* resources-ipad */; }; + 15A3CED01682C292002FB0C5 /* resources-ipadhd in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEAA1682C292002FB0C5 /* resources-ipadhd */; }; + 15A3CED11682C292002FB0C5 /* resources-iphone in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEAB1682C292002FB0C5 /* resources-iphone */; }; + 15A3CED21682C292002FB0C5 /* resources-iphonehd in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEAC1682C292002FB0C5 /* resources-iphonehd */; }; + 15A3CED31682C292002FB0C5 /* settings-button-down.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEAD1682C292002FB0C5 /* settings-button-down.png */; }; + 15A3CED41682C292002FB0C5 /* settings-button.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEAE1682C292002FB0C5 /* settings-button.png */; }; + 15A3CED51682C292002FB0C5 /* settings-caption-music.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEAF1682C292002FB0C5 /* settings-caption-music.png */; }; + 15A3CED61682C292002FB0C5 /* settings-caption-musicoff.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEB01682C292002FB0C5 /* settings-caption-musicoff.png */; }; + 15A3CED71682C292002FB0C5 /* settings-caption-tilt.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEB11682C292002FB0C5 /* settings-caption-tilt.png */; }; + 15A3CED81682C292002FB0C5 /* settings-caption-touch.png in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEB21682C292002FB0C5 /* settings-caption-touch.png */; }; + 15A3CF571682C2B8002FB0C5 /* CCBAnimationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEDC1682C2B7002FB0C5 /* CCBAnimationManager.cpp */; }; + 15A3CF581682C2B8002FB0C5 /* CCBFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEDE1682C2B7002FB0C5 /* CCBFileLoader.cpp */; }; + 15A3CF591682C2B8002FB0C5 /* CCBKeyframe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEE01682C2B7002FB0C5 /* CCBKeyframe.cpp */; }; + 15A3CF5A1682C2B8002FB0C5 /* CCBReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEE31682C2B7002FB0C5 /* CCBReader.cpp */; }; + 15A3CF5B1682C2B8002FB0C5 /* CCBSequence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEE61682C2B7002FB0C5 /* CCBSequence.cpp */; }; + 15A3CF5C1682C2B8002FB0C5 /* CCBSequenceProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEE81682C2B7002FB0C5 /* CCBSequenceProperty.cpp */; }; + 15A3CF5D1682C2B8002FB0C5 /* CCBValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEEA1682C2B7002FB0C5 /* CCBValue.cpp */; }; + 15A3CF5E1682C2B8002FB0C5 /* CCControlButtonLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEEC1682C2B7002FB0C5 /* CCControlButtonLoader.cpp */; }; + 15A3CF5F1682C2B8002FB0C5 /* CCControlLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEEE1682C2B7002FB0C5 /* CCControlLoader.cpp */; }; + 15A3CF601682C2B8002FB0C5 /* CCData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEF01682C2B7002FB0C5 /* CCData.cpp */; }; + 15A3CF611682C2B8002FB0C5 /* CCLabelBMFontLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEF21682C2B7002FB0C5 /* CCLabelBMFontLoader.cpp */; }; + 15A3CF621682C2B8002FB0C5 /* CCLabelTTFLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEF41682C2B7002FB0C5 /* CCLabelTTFLoader.cpp */; }; + 15A3CF631682C2B8002FB0C5 /* CCLayerColorLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEF61682C2B7002FB0C5 /* CCLayerColorLoader.cpp */; }; + 15A3CF641682C2B8002FB0C5 /* CCLayerGradientLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEF81682C2B7002FB0C5 /* CCLayerGradientLoader.cpp */; }; + 15A3CF651682C2B8002FB0C5 /* CCLayerLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEFA1682C2B8002FB0C5 /* CCLayerLoader.cpp */; }; + 15A3CF661682C2B8002FB0C5 /* CCMenuItemImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEFC1682C2B8002FB0C5 /* CCMenuItemImageLoader.cpp */; }; + 15A3CF671682C2B8002FB0C5 /* CCMenuItemLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CEFE1682C2B8002FB0C5 /* CCMenuItemLoader.cpp */; }; + 15A3CF681682C2B8002FB0C5 /* CCNode+CCBRelativePositioning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF011682C2B8002FB0C5 /* CCNode+CCBRelativePositioning.cpp */; }; + 15A3CF691682C2B8002FB0C5 /* CCNodeLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF031682C2B8002FB0C5 /* CCNodeLoader.cpp */; }; + 15A3CF6A1682C2B8002FB0C5 /* CCNodeLoaderLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF051682C2B8002FB0C5 /* CCNodeLoaderLibrary.cpp */; }; + 15A3CF6B1682C2B8002FB0C5 /* CCParticleSystemQuadLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF081682C2B8002FB0C5 /* CCParticleSystemQuadLoader.cpp */; }; + 15A3CF6C1682C2B8002FB0C5 /* CCScale9SpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF0A1682C2B8002FB0C5 /* CCScale9SpriteLoader.cpp */; }; + 15A3CF6D1682C2B8002FB0C5 /* CCScrollViewLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF0C1682C2B8002FB0C5 /* CCScrollViewLoader.cpp */; }; + 15A3CF6E1682C2B8002FB0C5 /* CCSpriteLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF0E1682C2B8002FB0C5 /* CCSpriteLoader.cpp */; }; + 15A3D00E1682C331002FB0C5 /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFA91682C331002FB0C5 /* CDAudioManager.m */; }; + 15A3D00F1682C331002FB0C5 /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFAC1682C331002FB0C5 /* CDOpenALSupport.m */; }; + 15A3D0101682C331002FB0C5 /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFAE1682C331002FB0C5 /* CocosDenshion.m */; }; + 15A3D0111682C331002FB0C5 /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFAF1682C331002FB0C5 /* SimpleAudioEngine.mm */; }; + 15A3D0121682C331002FB0C5 /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFB11682C331002FB0C5 /* SimpleAudioEngine_objc.m */; }; + 15A3D0691682C3B8002FB0C5 /* Bomb.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE8E1682C292002FB0C5 /* Bomb.js */; }; + 15A3D06A1682C3B8002FB0C5 /* Coin.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE921682C292002FB0C5 /* Coin.js */; }; + 15A3D06B1682C3B8002FB0C5 /* Dragon.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE951682C292002FB0C5 /* Dragon.js */; }; + 15A3D06C1682C3B8002FB0C5 /* EndCoin.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE971682C292002FB0C5 /* EndCoin.js */; }; + 15A3D06D1682C3B8002FB0C5 /* Explosion.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE9A1682C292002FB0C5 /* Explosion.js */; }; + 15A3D06E1682C3B8002FB0C5 /* GameScene.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CE9E1682C292002FB0C5 /* GameScene.js */; }; + 15A3D06F1682C3B8002FB0C5 /* Level.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA01682C292002FB0C5 /* Level.js */; }; + 15A3D0701682C3B8002FB0C5 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA21682C292002FB0C5 /* main.js */; }; + 15A3D0711682C3B8002FB0C5 /* MainMenuScene.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3CEA41682C292002FB0C5 /* MainMenuScene.js */; }; + 15A3D09F1682E721002FB0C5 /* cocos2d_specifics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D07A1682E721002FB0C5 /* cocos2d_specifics.cpp */; }; + 15A3D0A31682E721002FB0C5 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D0821682E721002FB0C5 /* README */; }; + 15A3D0A91682E721002FB0C5 /* js_bindings_ccbreader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D0891682E721002FB0C5 /* js_bindings_ccbreader.cpp */; }; + 15A3D0AE1682E721002FB0C5 /* js_bindings_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D0961682E721002FB0C5 /* js_bindings_core.cpp */; }; + 15A3D0AF1682E721002FB0C5 /* js_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D0981682E721002FB0C5 /* js_manual_conversions.cpp */; }; + 15A3D0B01682E721002FB0C5 /* ScriptingCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D09A1682E721002FB0C5 /* ScriptingCore.cpp */; }; + 15A3D0B81682E7D2002FB0C5 /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A3CE091682C057002FB0C5 /* libcocos2dx.a */; }; + 1A177F141698297600C9AC27 /* js_bindings_system_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A177F101698297600C9AC27 /* js_bindings_system_functions.cpp */; }; + 1A177F151698297600C9AC27 /* js_bindings_system_registration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A177F121698297600C9AC27 /* js_bindings_system_registration.cpp */; }; + 1A2757A01697FA7200504026 /* jsb_chipmunk.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A2757991697FA7200504026 /* jsb_chipmunk.js */; }; + 1A2757A11697FA7200504026 /* jsb_cocos2d.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A27579A1697FA7200504026 /* jsb_cocos2d.js */; }; + 1A2757A21697FA7200504026 /* jsb_cocosbuilder.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A27579B1697FA7200504026 /* jsb_cocosbuilder.js */; }; + 1A2757A31697FA7200504026 /* jsb_debugger.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A27579C1697FA7200504026 /* jsb_debugger.js */; }; + 1A2757A41697FA7200504026 /* jsb_opengl.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A27579D1697FA7200504026 /* jsb_opengl.js */; }; + 1A2757A51697FA7200504026 /* jsb_sys.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A27579E1697FA7200504026 /* jsb_sys.js */; }; + 1A2757A61697FA7200504026 /* jsb.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A27579F1697FA7200504026 /* jsb.js */; }; + 1A2758101698218C00504026 /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A2757991697FA7200504026 /* jsb_chipmunk.js */; }; + 1A2758111698218C00504026 /* jsb_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A27579A1697FA7200504026 /* jsb_cocos2d.js */; }; + 1A2758121698218C00504026 /* jsb_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A27579B1697FA7200504026 /* jsb_cocosbuilder.js */; }; + 1A2758131698218C00504026 /* jsb_debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A27579C1697FA7200504026 /* jsb_debugger.js */; }; + 1A2758141698218C00504026 /* jsb_opengl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A27579D1697FA7200504026 /* jsb_opengl.js */; }; + 1A2758151698218C00504026 /* jsb_sys.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A27579E1697FA7200504026 /* jsb_sys.js */; }; + 1A2758161698218C00504026 /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A27579F1697FA7200504026 /* jsb.js */; }; + 1A82F5D1169AC71F00C4B13A /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5D0169AC71F00C4B13A /* libsqlite3.dylib */; }; + 1A82F5D8169AC75500C4B13A /* LocalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A82F5D5169AC75500C4B13A /* LocalStorage.cpp */; }; + 1A82F5D9169AC75500C4B13A /* LocalStorageAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A82F5D7169AC75500C4B13A /* LocalStorageAndroid.cpp */; }; + 1AAC78F916EDC13D00B97F83 /* jsb_cocos2dx_auto_api.js in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC78F616EDC13D00B97F83 /* jsb_cocos2dx_auto_api.js */; }; + 1AAC78FA16EDC13D00B97F83 /* jsb_cocos2dx_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC78F716EDC13D00B97F83 /* jsb_cocos2dx_auto.cpp */; }; + 1AAC792B16EDC26E00B97F83 /* CCControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC78FD16EDC26E00B97F83 /* CCControl.cpp */; }; + 1AAC792C16EDC26E00B97F83 /* CCControlButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC78FF16EDC26E00B97F83 /* CCControlButton.cpp */; }; + 1AAC792D16EDC26E00B97F83 /* CCControlColourPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC790116EDC26E00B97F83 /* CCControlColourPicker.cpp */; }; + 1AAC792E16EDC26E00B97F83 /* CCControlHuePicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC790416EDC26E00B97F83 /* CCControlHuePicker.cpp */; }; + 1AAC792F16EDC26E00B97F83 /* CCControlPotentiometer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC790616EDC26E00B97F83 /* CCControlPotentiometer.cpp */; }; + 1AAC793016EDC26E00B97F83 /* CCControlSaturationBrightnessPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC790816EDC26E00B97F83 /* CCControlSaturationBrightnessPicker.cpp */; }; + 1AAC793116EDC26E00B97F83 /* CCControlSlider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC790A16EDC26E00B97F83 /* CCControlSlider.cpp */; }; + 1AAC793216EDC26E00B97F83 /* CCControlStepper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC790C16EDC26E00B97F83 /* CCControlStepper.cpp */; }; + 1AAC793316EDC26E00B97F83 /* CCControlSwitch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC790E16EDC26E00B97F83 /* CCControlSwitch.cpp */; }; + 1AAC793416EDC26E00B97F83 /* CCControlUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC791016EDC26E00B97F83 /* CCControlUtils.cpp */; }; + 1AAC793516EDC26E00B97F83 /* CCInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC791216EDC26E00B97F83 /* CCInvocation.cpp */; }; + 1AAC793616EDC26E00B97F83 /* CCScale9Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC791416EDC26E00B97F83 /* CCScale9Sprite.cpp */; }; + 1AAC793716EDC26E00B97F83 /* CCEditBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC791716EDC26E00B97F83 /* CCEditBox.cpp */; }; + 1AAC793816EDC26E00B97F83 /* CCEditBoxImplAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC791A16EDC26E00B97F83 /* CCEditBoxImplAndroid.cpp */; }; + 1AAC793916EDC26E00B97F83 /* CCEditBoxImplIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC791D16EDC26E00B97F83 /* CCEditBoxImplIOS.mm */; }; + 1AAC793A16EDC26E00B97F83 /* CCEditBoxImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC791F16EDC26E00B97F83 /* CCEditBoxImplMac.mm */; }; + 1AAC793B16EDC26E00B97F83 /* CCEditBoxImplWin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC792016EDC26E00B97F83 /* CCEditBoxImplWin.cpp */; }; + 1AAC793C16EDC26E00B97F83 /* CCScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC792316EDC26E00B97F83 /* CCScrollView.cpp */; }; + 1AAC793D16EDC26E00B97F83 /* CCSorting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC792516EDC26E00B97F83 /* CCSorting.cpp */; }; + 1AAC793E16EDC26E00B97F83 /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC792716EDC26E00B97F83 /* CCTableView.cpp */; }; + 1AAC793F16EDC26E00B97F83 /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC792916EDC26E00B97F83 /* CCTableViewCell.cpp */; }; + 1AAC794216EDC2C700B97F83 /* jsb_cocos2dx_extension_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC794016EDC2C700B97F83 /* jsb_cocos2dx_extension_manual.cpp */; }; + 1AAC794616EDC2D700B97F83 /* jsb_cocos2dx_extension_auto_api.js in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC794316EDC2D700B97F83 /* jsb_cocos2dx_extension_auto_api.js */; }; + 1AAC794716EDC2D700B97F83 /* jsb_cocos2dx_extension_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC794416EDC2D700B97F83 /* jsb_cocos2dx_extension_auto.cpp */; }; + A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; }; + A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275431517C094001B78AA /* OpenGLES.framework */; }; + A92275461517C094001B78AA /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; }; + A92275481517C094001B78AA /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275471517C094001B78AA /* AudioToolbox.framework */; }; + A922754A1517C094001B78AA /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275491517C094001B78AA /* AVFoundation.framework */; }; + A922754C1517C094001B78AA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754B1517C094001B78AA /* UIKit.framework */; }; + A922754E1517C094001B78AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754D1517C094001B78AA /* Foundation.framework */; }; + A92275501517C094001B78AA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754F1517C094001B78AA /* CoreGraphics.framework */; }; + D446FDA316102D7D000ADA7B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = D446FDA216102D7D000ADA7B /* Default.png */; }; + D446FDA516102D82000ADA7B /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D446FDA416102D82000ADA7B /* Default@2x.png */; }; + D446FDA716102D86000ADA7B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D446FDA616102D86000ADA7B /* Default-568h@2x.png */; }; + D45446D3156DE74F00887EB5 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = D45446CE156DE74F00887EB5 /* AppController.mm */; }; + D45446D4156DE74F00887EB5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D45446CF156DE74F00887EB5 /* main.m */; }; + D45446D5156DE74F00887EB5 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = D45446D2156DE74F00887EB5 /* RootViewController.mm */; }; + D454520A156E22B400887EB5 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D4545209156E22B400887EB5 /* libxml2.dylib */; }; + D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; + D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 15A3CE081682C057002FB0C5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15A3CE011682C057002FB0C5 /* cocos2dx.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1551A33F158F2AB200E66CFE; + remoteInfo = cocos2dx; + }; + 15A3D0B61682E7C5002FB0C5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15A3CE011682C057002FB0C5 /* cocos2dx.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 1551A33E158F2AB200E66CFE; + remoteInfo = cocos2dx; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 152647CA16B6AA5100A2D258 /* fileLookup.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = fileLookup.plist; path = "../../Shared/games/CocosDragonJS/Published files iOS/fileLookup.plist"; sourceTree = ""; }; + 159004B1166DE18F006BF838 /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-57.png"; sourceTree = ""; }; + 159004B3166DE19C006BF838 /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; + 159004B5166DE1A8006BF838 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 159004B7166DE1AF006BF838 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; + 15A3CE011682C057002FB0C5 /* cocos2dx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2dx.xcodeproj; path = ../../../../cocos2dx/proj.ios/cocos2dx.xcodeproj; sourceTree = ""; }; + 15A3CE8D1682C292002FB0C5 /* Bomb.ccbi */ = {isa = PBXFileReference; lastKnownFileType = file; name = Bomb.ccbi; path = "../../Shared/games/CocosDragonJS/Published files iOS/Bomb.ccbi"; sourceTree = ""; }; + 15A3CE8E1682C292002FB0C5 /* Bomb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = Bomb.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/Bomb.js"; sourceTree = ""; }; + 15A3CE8F1682C292002FB0C5 /* ccbResources */ = {isa = PBXFileReference; lastKnownFileType = folder; name = ccbResources; path = "../../Shared/games/CocosDragonJS/Published files iOS/ccbResources"; sourceTree = ""; }; + 15A3CE901682C292002FB0C5 /* cloud.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = cloud.png; path = "../../Shared/games/CocosDragonJS/Published files iOS/cloud.png"; sourceTree = ""; }; + 15A3CE911682C292002FB0C5 /* Coin.ccbi */ = {isa = PBXFileReference; lastKnownFileType = file; name = Coin.ccbi; path = "../../Shared/games/CocosDragonJS/Published files iOS/Coin.ccbi"; sourceTree = ""; }; + 15A3CE921682C292002FB0C5 /* Coin.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = Coin.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/Coin.js"; sourceTree = ""; }; + 15A3CE931682C292002FB0C5 /* Coin.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = Coin.mp3; path = "../../Shared/games/CocosDragonJS/Published files iOS/Coin.mp3"; sourceTree = ""; }; + 15A3CE941682C292002FB0C5 /* Dragon.ccbi */ = {isa = PBXFileReference; lastKnownFileType = file; name = Dragon.ccbi; path = "../../Shared/games/CocosDragonJS/Published files iOS/Dragon.ccbi"; sourceTree = ""; }; + 15A3CE951682C292002FB0C5 /* Dragon.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = Dragon.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/Dragon.js"; sourceTree = ""; }; + 15A3CE961682C292002FB0C5 /* EndCoin.ccbi */ = {isa = PBXFileReference; lastKnownFileType = file; name = EndCoin.ccbi; path = "../../Shared/games/CocosDragonJS/Published files iOS/EndCoin.ccbi"; sourceTree = ""; }; + 15A3CE971682C292002FB0C5 /* EndCoin.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = EndCoin.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/EndCoin.js"; sourceTree = ""; }; + 15A3CE981682C292002FB0C5 /* Explo.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = Explo.mp3; path = "../../Shared/games/CocosDragonJS/Published files iOS/Explo.mp3"; sourceTree = ""; }; + 15A3CE991682C292002FB0C5 /* Explosion.ccbi */ = {isa = PBXFileReference; lastKnownFileType = file; name = Explosion.ccbi; path = "../../Shared/games/CocosDragonJS/Published files iOS/Explosion.ccbi"; sourceTree = ""; }; + 15A3CE9A1682C292002FB0C5 /* Explosion.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = Explosion.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/Explosion.js"; sourceTree = ""; }; + 15A3CE9B1682C292002FB0C5 /* gameobjects.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = gameobjects.plist; path = "../../Shared/games/CocosDragonJS/Published files iOS/gameobjects.plist"; sourceTree = ""; }; + 15A3CE9C1682C292002FB0C5 /* gameobjects.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gameobjects.png; path = "../../Shared/games/CocosDragonJS/Published files iOS/gameobjects.png"; sourceTree = ""; }; + 15A3CE9D1682C292002FB0C5 /* GameScene.ccbi */ = {isa = PBXFileReference; lastKnownFileType = file; name = GameScene.ccbi; path = "../../Shared/games/CocosDragonJS/Published files iOS/GameScene.ccbi"; sourceTree = ""; }; + 15A3CE9E1682C292002FB0C5 /* GameScene.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = GameScene.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/GameScene.js"; sourceTree = ""; }; + 15A3CE9F1682C292002FB0C5 /* Level.ccbi */ = {isa = PBXFileReference; lastKnownFileType = file; name = Level.ccbi; path = "../../Shared/games/CocosDragonJS/Published files iOS/Level.ccbi"; sourceTree = ""; }; + 15A3CEA01682C292002FB0C5 /* Level.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = Level.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/Level.js"; sourceTree = ""; }; + 15A3CEA11682C292002FB0C5 /* logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = logo.png; path = "../../Shared/games/CocosDragonJS/Published files iOS/logo.png"; sourceTree = ""; }; + 15A3CEA21682C292002FB0C5 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/main.js"; sourceTree = ""; }; + 15A3CEA31682C292002FB0C5 /* MainMenuScene.ccbi */ = {isa = PBXFileReference; lastKnownFileType = file; name = MainMenuScene.ccbi; path = "../../Shared/games/CocosDragonJS/Published files iOS/MainMenuScene.ccbi"; sourceTree = ""; }; + 15A3CEA41682C292002FB0C5 /* MainMenuScene.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = MainMenuScene.js; path = "../../Shared/games/CocosDragonJS/Published files iOS/MainMenuScene.js"; sourceTree = ""; }; + 15A3CEA51682C292002FB0C5 /* Music.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = Music.mp3; path = "../../Shared/games/CocosDragonJS/Published files iOS/Music.mp3"; sourceTree = ""; }; + 15A3CEA61682C292002FB0C5 /* play-button-down.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "play-button-down.png"; path = "../../Shared/games/CocosDragonJS/Published files iOS/play-button-down.png"; sourceTree = ""; }; + 15A3CEA71682C292002FB0C5 /* play-button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "play-button.png"; path = "../../Shared/games/CocosDragonJS/Published files iOS/play-button.png"; sourceTree = ""; }; + 15A3CEA91682C292002FB0C5 /* resources-ipad */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-ipad"; path = "../../Shared/games/CocosDragonJS/Published files iOS/resources-ipad"; sourceTree = ""; }; + 15A3CEAA1682C292002FB0C5 /* resources-ipadhd */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-ipadhd"; path = "../../Shared/games/CocosDragonJS/Published files iOS/resources-ipadhd"; sourceTree = ""; }; + 15A3CEAB1682C292002FB0C5 /* resources-iphone */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-iphone"; path = "../../Shared/games/CocosDragonJS/Published files iOS/resources-iphone"; sourceTree = ""; }; + 15A3CEAC1682C292002FB0C5 /* resources-iphonehd */ = {isa = PBXFileReference; lastKnownFileType = folder; name = "resources-iphonehd"; path = "../../Shared/games/CocosDragonJS/Published files iOS/resources-iphonehd"; sourceTree = ""; }; + 15A3CEAD1682C292002FB0C5 /* settings-button-down.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settings-button-down.png"; path = "../../Shared/games/CocosDragonJS/Published files iOS/settings-button-down.png"; sourceTree = ""; }; + 15A3CEAE1682C292002FB0C5 /* settings-button.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settings-button.png"; path = "../../Shared/games/CocosDragonJS/Published files iOS/settings-button.png"; sourceTree = ""; }; + 15A3CEAF1682C292002FB0C5 /* settings-caption-music.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settings-caption-music.png"; path = "../../Shared/games/CocosDragonJS/Published files iOS/settings-caption-music.png"; sourceTree = ""; }; + 15A3CEB01682C292002FB0C5 /* settings-caption-musicoff.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settings-caption-musicoff.png"; path = "../../Shared/games/CocosDragonJS/Published files iOS/settings-caption-musicoff.png"; sourceTree = ""; }; + 15A3CEB11682C292002FB0C5 /* settings-caption-tilt.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settings-caption-tilt.png"; path = "../../Shared/games/CocosDragonJS/Published files iOS/settings-caption-tilt.png"; sourceTree = ""; }; + 15A3CEB21682C292002FB0C5 /* settings-caption-touch.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "settings-caption-touch.png"; path = "../../Shared/games/CocosDragonJS/Published files iOS/settings-caption-touch.png"; sourceTree = ""; }; + 15A3CEDC1682C2B7002FB0C5 /* CCBAnimationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBAnimationManager.cpp; sourceTree = ""; }; + 15A3CEDD1682C2B7002FB0C5 /* CCBAnimationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBAnimationManager.h; sourceTree = ""; }; + 15A3CEDE1682C2B7002FB0C5 /* CCBFileLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBFileLoader.cpp; sourceTree = ""; }; + 15A3CEDF1682C2B7002FB0C5 /* CCBFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBFileLoader.h; sourceTree = ""; }; + 15A3CEE01682C2B7002FB0C5 /* CCBKeyframe.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBKeyframe.cpp; sourceTree = ""; }; + 15A3CEE11682C2B7002FB0C5 /* CCBKeyframe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBKeyframe.h; sourceTree = ""; }; + 15A3CEE21682C2B7002FB0C5 /* CCBMemberVariableAssigner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBMemberVariableAssigner.h; sourceTree = ""; }; + 15A3CEE31682C2B7002FB0C5 /* CCBReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBReader.cpp; sourceTree = ""; }; + 15A3CEE41682C2B7002FB0C5 /* CCBReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBReader.h; sourceTree = ""; }; + 15A3CEE51682C2B7002FB0C5 /* CCBSelectorResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSelectorResolver.h; sourceTree = ""; }; + 15A3CEE61682C2B7002FB0C5 /* CCBSequence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBSequence.cpp; sourceTree = ""; }; + 15A3CEE71682C2B7002FB0C5 /* CCBSequence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSequence.h; sourceTree = ""; }; + 15A3CEE81682C2B7002FB0C5 /* CCBSequenceProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBSequenceProperty.cpp; sourceTree = ""; }; + 15A3CEE91682C2B7002FB0C5 /* CCBSequenceProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBSequenceProperty.h; sourceTree = ""; }; + 15A3CEEA1682C2B7002FB0C5 /* CCBValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCBValue.cpp; sourceTree = ""; }; + 15A3CEEB1682C2B7002FB0C5 /* CCBValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBValue.h; sourceTree = ""; }; + 15A3CEEC1682C2B7002FB0C5 /* CCControlButtonLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButtonLoader.cpp; sourceTree = ""; }; + 15A3CEED1682C2B7002FB0C5 /* CCControlButtonLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlButtonLoader.h; sourceTree = ""; }; + 15A3CEEE1682C2B7002FB0C5 /* CCControlLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlLoader.cpp; sourceTree = ""; }; + 15A3CEEF1682C2B7002FB0C5 /* CCControlLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlLoader.h; sourceTree = ""; }; + 15A3CEF01682C2B7002FB0C5 /* CCData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCData.cpp; sourceTree = ""; }; + 15A3CEF11682C2B7002FB0C5 /* CCData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCData.h; sourceTree = ""; }; + 15A3CEF21682C2B7002FB0C5 /* CCLabelBMFontLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelBMFontLoader.cpp; sourceTree = ""; }; + 15A3CEF31682C2B7002FB0C5 /* CCLabelBMFontLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelBMFontLoader.h; sourceTree = ""; }; + 15A3CEF41682C2B7002FB0C5 /* CCLabelTTFLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLabelTTFLoader.cpp; sourceTree = ""; }; + 15A3CEF51682C2B7002FB0C5 /* CCLabelTTFLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLabelTTFLoader.h; sourceTree = ""; }; + 15A3CEF61682C2B7002FB0C5 /* CCLayerColorLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerColorLoader.cpp; sourceTree = ""; }; + 15A3CEF71682C2B7002FB0C5 /* CCLayerColorLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerColorLoader.h; sourceTree = ""; }; + 15A3CEF81682C2B7002FB0C5 /* CCLayerGradientLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerGradientLoader.cpp; sourceTree = ""; }; + 15A3CEF91682C2B7002FB0C5 /* CCLayerGradientLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerGradientLoader.h; sourceTree = ""; }; + 15A3CEFA1682C2B8002FB0C5 /* CCLayerLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCLayerLoader.cpp; sourceTree = ""; }; + 15A3CEFB1682C2B8002FB0C5 /* CCLayerLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerLoader.h; sourceTree = ""; }; + 15A3CEFC1682C2B8002FB0C5 /* CCMenuItemImageLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMenuItemImageLoader.cpp; sourceTree = ""; }; + 15A3CEFD1682C2B8002FB0C5 /* CCMenuItemImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuItemImageLoader.h; sourceTree = ""; }; + 15A3CEFE1682C2B8002FB0C5 /* CCMenuItemLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCMenuItemLoader.cpp; sourceTree = ""; }; + 15A3CEFF1682C2B8002FB0C5 /* CCMenuItemLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuItemLoader.h; sourceTree = ""; }; + 15A3CF001682C2B8002FB0C5 /* CCMenuLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMenuLoader.h; sourceTree = ""; }; + 15A3CF011682C2B8002FB0C5 /* CCNode+CCBRelativePositioning.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "CCNode+CCBRelativePositioning.cpp"; sourceTree = ""; }; + 15A3CF021682C2B8002FB0C5 /* CCNode+CCBRelativePositioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CCNode+CCBRelativePositioning.h"; sourceTree = ""; }; + 15A3CF031682C2B8002FB0C5 /* CCNodeLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNodeLoader.cpp; sourceTree = ""; }; + 15A3CF041682C2B8002FB0C5 /* CCNodeLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoader.h; sourceTree = ""; }; + 15A3CF051682C2B8002FB0C5 /* CCNodeLoaderLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCNodeLoaderLibrary.cpp; sourceTree = ""; }; + 15A3CF061682C2B8002FB0C5 /* CCNodeLoaderLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoaderLibrary.h; sourceTree = ""; }; + 15A3CF071682C2B8002FB0C5 /* CCNodeLoaderListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNodeLoaderListener.h; sourceTree = ""; }; + 15A3CF081682C2B8002FB0C5 /* CCParticleSystemQuadLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCParticleSystemQuadLoader.cpp; sourceTree = ""; }; + 15A3CF091682C2B8002FB0C5 /* CCParticleSystemQuadLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCParticleSystemQuadLoader.h; sourceTree = ""; }; + 15A3CF0A1682C2B8002FB0C5 /* CCScale9SpriteLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScale9SpriteLoader.cpp; sourceTree = ""; }; + 15A3CF0B1682C2B8002FB0C5 /* CCScale9SpriteLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScale9SpriteLoader.h; sourceTree = ""; }; + 15A3CF0C1682C2B8002FB0C5 /* CCScrollViewLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScrollViewLoader.cpp; sourceTree = ""; }; + 15A3CF0D1682C2B8002FB0C5 /* CCScrollViewLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScrollViewLoader.h; sourceTree = ""; }; + 15A3CF0E1682C2B8002FB0C5 /* CCSpriteLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSpriteLoader.cpp; sourceTree = ""; }; + 15A3CF0F1682C2B8002FB0C5 /* CCSpriteLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSpriteLoader.h; sourceTree = ""; }; + 15A3CF101682C2B8002FB0C5 /* cocos-ext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cocos-ext.h"; sourceTree = ""; }; + 15A3CF111682C2B8002FB0C5 /* ExtensionMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionMacros.h; sourceTree = ""; }; + 15A3CFA51682C331002FB0C5 /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = ""; }; + 15A3CFA61682C331002FB0C5 /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = ""; }; + 15A3CFA81682C331002FB0C5 /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = ""; }; + 15A3CFA91682C331002FB0C5 /* CDAudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = ""; }; + 15A3CFAA1682C331002FB0C5 /* CDConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = ""; }; + 15A3CFAB1682C331002FB0C5 /* CDOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = ""; }; + 15A3CFAC1682C331002FB0C5 /* CDOpenALSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = ""; }; + 15A3CFAD1682C331002FB0C5 /* CocosDenshion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = ""; }; + 15A3CFAE1682C331002FB0C5 /* CocosDenshion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = ""; }; + 15A3CFAF1682C331002FB0C5 /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = ""; }; + 15A3CFB01682C331002FB0C5 /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; }; + 15A3CFB11682C331002FB0C5 /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; }; + 15A3D07A1682E721002FB0C5 /* cocos2d_specifics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2d_specifics.cpp; sourceTree = ""; }; + 15A3D07B1682E721002FB0C5 /* cocos2d_specifics.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2d_specifics.hpp; sourceTree = ""; }; + 15A3D0821682E721002FB0C5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + 15A3D0891682E721002FB0C5 /* js_bindings_ccbreader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_ccbreader.cpp; sourceTree = ""; }; + 15A3D08A1682E721002FB0C5 /* js_bindings_ccbreader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_ccbreader.h; sourceTree = ""; }; + 15A3D0951682E721002FB0C5 /* js_bindings_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_config.h; sourceTree = ""; }; + 15A3D0961682E721002FB0C5 /* js_bindings_core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_core.cpp; sourceTree = ""; }; + 15A3D0971682E721002FB0C5 /* js_bindings_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_core.h; sourceTree = ""; }; + 15A3D0981682E721002FB0C5 /* js_manual_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_manual_conversions.cpp; sourceTree = ""; }; + 15A3D0991682E721002FB0C5 /* js_manual_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_manual_conversions.h; sourceTree = ""; }; + 15A3D09A1682E721002FB0C5 /* ScriptingCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptingCore.cpp; sourceTree = ""; }; + 15A3D09B1682E721002FB0C5 /* ScriptingCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptingCore.h; sourceTree = ""; }; + 15A3D09C1682E721002FB0C5 /* spidermonkey_specifics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spidermonkey_specifics.h; sourceTree = ""; }; + 15A3D09D1682E721002FB0C5 /* uthash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uthash.h; sourceTree = ""; }; + 1A177F0F1698297600C9AC27 /* js_bindings_system_functions_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_system_functions_registration.h; sourceTree = ""; }; + 1A177F101698297600C9AC27 /* js_bindings_system_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_system_functions.cpp; sourceTree = ""; }; + 1A177F111698297600C9AC27 /* js_bindings_system_functions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_system_functions.h; sourceTree = ""; }; + 1A177F121698297600C9AC27 /* js_bindings_system_registration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_system_registration.cpp; sourceTree = ""; }; + 1A177F131698297600C9AC27 /* js_bindings_system_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_system_registration.h; sourceTree = ""; }; + 1A2757991697FA7200504026 /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk.js; sourceTree = ""; }; + 1A27579A1697FA7200504026 /* jsb_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocos2d.js; sourceTree = ""; }; + 1A27579B1697FA7200504026 /* jsb_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocosbuilder.js; sourceTree = ""; }; + 1A27579C1697FA7200504026 /* jsb_debugger.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_debugger.js; sourceTree = ""; }; + 1A27579D1697FA7200504026 /* jsb_opengl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_opengl.js; sourceTree = ""; }; + 1A27579E1697FA7200504026 /* jsb_sys.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_sys.js; sourceTree = ""; }; + 1A27579F1697FA7200504026 /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb.js; sourceTree = ""; }; + 1A82F5D0169AC71F00C4B13A /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + 1A82F5D5169AC75500C4B13A /* LocalStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorage.cpp; sourceTree = ""; }; + 1A82F5D6169AC75500C4B13A /* LocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorage.h; sourceTree = ""; }; + 1A82F5D7169AC75500C4B13A /* LocalStorageAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorageAndroid.cpp; sourceTree = ""; }; + 1AAC78F616EDC13D00B97F83 /* jsb_cocos2dx_auto_api.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocos2dx_auto_api.js; sourceTree = ""; }; + 1AAC78F716EDC13D00B97F83 /* jsb_cocos2dx_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_auto.cpp; sourceTree = ""; }; + 1AAC78F816EDC13D00B97F83 /* jsb_cocos2dx_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_auto.hpp; sourceTree = ""; }; + 1AAC78FD16EDC26E00B97F83 /* CCControl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControl.cpp; sourceTree = ""; }; + 1AAC78FE16EDC26E00B97F83 /* CCControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControl.h; sourceTree = ""; }; + 1AAC78FF16EDC26E00B97F83 /* CCControlButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlButton.cpp; sourceTree = ""; }; + 1AAC790016EDC26E00B97F83 /* CCControlButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlButton.h; sourceTree = ""; }; + 1AAC790116EDC26E00B97F83 /* CCControlColourPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlColourPicker.cpp; sourceTree = ""; }; + 1AAC790216EDC26E00B97F83 /* CCControlColourPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlColourPicker.h; sourceTree = ""; }; + 1AAC790316EDC26E00B97F83 /* CCControlExtensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlExtensions.h; sourceTree = ""; }; + 1AAC790416EDC26E00B97F83 /* CCControlHuePicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlHuePicker.cpp; sourceTree = ""; }; + 1AAC790516EDC26E00B97F83 /* CCControlHuePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlHuePicker.h; sourceTree = ""; }; + 1AAC790616EDC26E00B97F83 /* CCControlPotentiometer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlPotentiometer.cpp; sourceTree = ""; }; + 1AAC790716EDC26E00B97F83 /* CCControlPotentiometer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlPotentiometer.h; sourceTree = ""; }; + 1AAC790816EDC26E00B97F83 /* CCControlSaturationBrightnessPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSaturationBrightnessPicker.cpp; sourceTree = ""; }; + 1AAC790916EDC26E00B97F83 /* CCControlSaturationBrightnessPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSaturationBrightnessPicker.h; sourceTree = ""; }; + 1AAC790A16EDC26E00B97F83 /* CCControlSlider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSlider.cpp; sourceTree = ""; }; + 1AAC790B16EDC26E00B97F83 /* CCControlSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSlider.h; sourceTree = ""; }; + 1AAC790C16EDC26E00B97F83 /* CCControlStepper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlStepper.cpp; sourceTree = ""; }; + 1AAC790D16EDC26E00B97F83 /* CCControlStepper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlStepper.h; sourceTree = ""; }; + 1AAC790E16EDC26E00B97F83 /* CCControlSwitch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlSwitch.cpp; sourceTree = ""; }; + 1AAC790F16EDC26E00B97F83 /* CCControlSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlSwitch.h; sourceTree = ""; }; + 1AAC791016EDC26E00B97F83 /* CCControlUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCControlUtils.cpp; sourceTree = ""; }; + 1AAC791116EDC26E00B97F83 /* CCControlUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCControlUtils.h; sourceTree = ""; }; + 1AAC791216EDC26E00B97F83 /* CCInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCInvocation.cpp; sourceTree = ""; }; + 1AAC791316EDC26E00B97F83 /* CCInvocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCInvocation.h; sourceTree = ""; }; + 1AAC791416EDC26E00B97F83 /* CCScale9Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScale9Sprite.cpp; sourceTree = ""; }; + 1AAC791516EDC26E00B97F83 /* CCScale9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScale9Sprite.h; sourceTree = ""; }; + 1AAC791716EDC26E00B97F83 /* CCEditBox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBox.cpp; sourceTree = ""; }; + 1AAC791816EDC26E00B97F83 /* CCEditBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBox.h; sourceTree = ""; }; + 1AAC791916EDC26E00B97F83 /* CCEditBoxImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImpl.h; sourceTree = ""; }; + 1AAC791A16EDC26E00B97F83 /* CCEditBoxImplAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplAndroid.cpp; sourceTree = ""; }; + 1AAC791B16EDC26E00B97F83 /* CCEditBoxImplAndroid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplAndroid.h; sourceTree = ""; }; + 1AAC791C16EDC26E00B97F83 /* CCEditBoxImplIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplIOS.h; sourceTree = ""; }; + 1AAC791D16EDC26E00B97F83 /* CCEditBoxImplIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplIOS.mm; sourceTree = ""; }; + 1AAC791E16EDC26E00B97F83 /* CCEditBoxImplMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplMac.h; sourceTree = ""; }; + 1AAC791F16EDC26E00B97F83 /* CCEditBoxImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCEditBoxImplMac.mm; sourceTree = ""; }; + 1AAC792016EDC26E00B97F83 /* CCEditBoxImplWin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCEditBoxImplWin.cpp; sourceTree = ""; }; + 1AAC792116EDC26E00B97F83 /* CCEditBoxImplWin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCEditBoxImplWin.h; sourceTree = ""; }; + 1AAC792316EDC26E00B97F83 /* CCScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCScrollView.cpp; sourceTree = ""; }; + 1AAC792416EDC26E00B97F83 /* CCScrollView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScrollView.h; sourceTree = ""; }; + 1AAC792516EDC26E00B97F83 /* CCSorting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCSorting.cpp; sourceTree = ""; }; + 1AAC792616EDC26E00B97F83 /* CCSorting.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSorting.h; sourceTree = ""; }; + 1AAC792716EDC26E00B97F83 /* CCTableView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableView.cpp; sourceTree = ""; }; + 1AAC792816EDC26E00B97F83 /* CCTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTableView.h; sourceTree = ""; }; + 1AAC792916EDC26E00B97F83 /* CCTableViewCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableViewCell.cpp; sourceTree = ""; }; + 1AAC792A16EDC26E00B97F83 /* CCTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTableViewCell.h; sourceTree = ""; }; + 1AAC794016EDC2C700B97F83 /* jsb_cocos2dx_extension_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_extension_manual.cpp; sourceTree = ""; }; + 1AAC794116EDC2C700B97F83 /* jsb_cocos2dx_extension_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsb_cocos2dx_extension_manual.h; sourceTree = ""; }; + 1AAC794316EDC2D700B97F83 /* jsb_cocos2dx_extension_auto_api.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocos2dx_extension_auto_api.js; sourceTree = ""; }; + 1AAC794416EDC2D700B97F83 /* jsb_cocos2dx_extension_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_extension_auto.cpp; sourceTree = ""; }; + 1AAC794516EDC2D700B97F83 /* jsb_cocos2dx_extension_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_extension_auto.hpp; sourceTree = ""; }; + A922753D1517C094001B78AA /* CocosDragonJS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CocosDragonJS.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A92275411517C094001B78AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + A92275431517C094001B78AA /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + A92275451517C094001B78AA /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + A92275471517C094001B78AA /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + A92275491517C094001B78AA /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + A922754B1517C094001B78AA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + A922754D1517C094001B78AA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + A922754F1517C094001B78AA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + D446FDA216102D7D000ADA7B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + D446FDA416102D82000ADA7B /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + D446FDA616102D86000ADA7B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + D45446CD156DE74F00887EB5 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; }; + D45446CE156DE74F00887EB5 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = ""; }; + D45446CF156DE74F00887EB5 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + D45446D0156DE74F00887EB5 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; + D45446D1156DE74F00887EB5 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; + D45446D2156DE74F00887EB5 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RootViewController.mm; sourceTree = ""; }; + D45446D6156DE79D00887EB5 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D4545209156E22B400887EB5 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; + D454520B156E22BD00887EB5 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + D4545215156E28EF00887EB5 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; }; + D4545216156E28EF00887EB5 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A922753A1517C094001B78AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A82F5D1169AC71F00C4B13A /* libsqlite3.dylib in Frameworks */, + 15A3D0B81682E7D2002FB0C5 /* libcocos2dx.a in Frameworks */, + D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */, + D454520A156E22B400887EB5 /* libxml2.dylib in Frameworks */, + A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */, + A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */, + A92275461517C094001B78AA /* OpenAL.framework in Frameworks */, + A92275481517C094001B78AA /* AudioToolbox.framework in Frameworks */, + A922754A1517C094001B78AA /* AVFoundation.framework in Frameworks */, + A922754C1517C094001B78AA /* UIKit.framework in Frameworks */, + A922754E1517C094001B78AA /* Foundation.framework in Frameworks */, + A92275501517C094001B78AA /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 15628F5B15F0F5C2000CF24B /* Resources */ = { + isa = PBXGroup; + children = ( + 159004B7166DE1AF006BF838 /* Icon-144.png */, + 159004B5166DE1A8006BF838 /* Icon-72.png */, + 159004B3166DE19C006BF838 /* Icon-114.png */, + 159004B1166DE18F006BF838 /* Icon-57.png */, + 159002C7166DAB1B006BF838 /* cocosdragon */, + D446FDA616102D86000ADA7B /* Default-568h@2x.png */, + D446FDA416102D82000ADA7B /* Default@2x.png */, + D446FDA216102D7D000ADA7B /* Default.png */, + ); + name = Resources; + sourceTree = ""; + }; + 159002C7166DAB1B006BF838 /* cocosdragon */ = { + isa = PBXGroup; + children = ( + 152647CA16B6AA5100A2D258 /* fileLookup.plist */, + 15A3CE8D1682C292002FB0C5 /* Bomb.ccbi */, + 15A3CE8E1682C292002FB0C5 /* Bomb.js */, + 15A3CE8F1682C292002FB0C5 /* ccbResources */, + 15A3CE901682C292002FB0C5 /* cloud.png */, + 15A3CE911682C292002FB0C5 /* Coin.ccbi */, + 15A3CE921682C292002FB0C5 /* Coin.js */, + 15A3CE931682C292002FB0C5 /* Coin.mp3 */, + 15A3CE941682C292002FB0C5 /* Dragon.ccbi */, + 15A3CE951682C292002FB0C5 /* Dragon.js */, + 15A3CE961682C292002FB0C5 /* EndCoin.ccbi */, + 15A3CE971682C292002FB0C5 /* EndCoin.js */, + 15A3CE981682C292002FB0C5 /* Explo.mp3 */, + 15A3CE991682C292002FB0C5 /* Explosion.ccbi */, + 15A3CE9A1682C292002FB0C5 /* Explosion.js */, + 15A3CE9B1682C292002FB0C5 /* gameobjects.plist */, + 15A3CE9C1682C292002FB0C5 /* gameobjects.png */, + 15A3CE9D1682C292002FB0C5 /* GameScene.ccbi */, + 15A3CE9E1682C292002FB0C5 /* GameScene.js */, + 15A3CE9F1682C292002FB0C5 /* Level.ccbi */, + 15A3CEA01682C292002FB0C5 /* Level.js */, + 15A3CEA11682C292002FB0C5 /* logo.png */, + 15A3CEA21682C292002FB0C5 /* main.js */, + 15A3CEA31682C292002FB0C5 /* MainMenuScene.ccbi */, + 15A3CEA41682C292002FB0C5 /* MainMenuScene.js */, + 15A3CEA51682C292002FB0C5 /* Music.mp3 */, + 15A3CEA61682C292002FB0C5 /* play-button-down.png */, + 15A3CEA71682C292002FB0C5 /* play-button.png */, + 15A3CEA91682C292002FB0C5 /* resources-ipad */, + 15A3CEAA1682C292002FB0C5 /* resources-ipadhd */, + 15A3CEAB1682C292002FB0C5 /* resources-iphone */, + 15A3CEAC1682C292002FB0C5 /* resources-iphonehd */, + 15A3CEAD1682C292002FB0C5 /* settings-button-down.png */, + 15A3CEAE1682C292002FB0C5 /* settings-button.png */, + 15A3CEAF1682C292002FB0C5 /* settings-caption-music.png */, + 15A3CEB01682C292002FB0C5 /* settings-caption-musicoff.png */, + 15A3CEB11682C292002FB0C5 /* settings-caption-tilt.png */, + 15A3CEB21682C292002FB0C5 /* settings-caption-touch.png */, + ); + name = cocosdragon; + sourceTree = ""; + }; + 15A3CE021682C057002FB0C5 /* Products */ = { + isa = PBXGroup; + children = ( + 15A3CE091682C057002FB0C5 /* libcocos2dx.a */, + ); + name = Products; + sourceTree = ""; + }; + 15A3CED91682C2B7002FB0C5 /* extensions */ = { + isa = PBXGroup; + children = ( + 15A3CEDB1682C2B7002FB0C5 /* CCBReader */, + 15A3CF101682C2B8002FB0C5 /* cocos-ext.h */, + 15A3CF111682C2B8002FB0C5 /* ExtensionMacros.h */, + 1AAC78FB16EDC26E00B97F83 /* GUI */, + 1A82F5D4169AC75500C4B13A /* LocalStorage */, + ); + name = extensions; + path = ../../../../extensions; + sourceTree = ""; + }; + 15A3CEDB1682C2B7002FB0C5 /* CCBReader */ = { + isa = PBXGroup; + children = ( + 15A3CEDC1682C2B7002FB0C5 /* CCBAnimationManager.cpp */, + 15A3CEDD1682C2B7002FB0C5 /* CCBAnimationManager.h */, + 15A3CEDE1682C2B7002FB0C5 /* CCBFileLoader.cpp */, + 15A3CEDF1682C2B7002FB0C5 /* CCBFileLoader.h */, + 15A3CEE01682C2B7002FB0C5 /* CCBKeyframe.cpp */, + 15A3CEE11682C2B7002FB0C5 /* CCBKeyframe.h */, + 15A3CEE21682C2B7002FB0C5 /* CCBMemberVariableAssigner.h */, + 15A3CEE31682C2B7002FB0C5 /* CCBReader.cpp */, + 15A3CEE41682C2B7002FB0C5 /* CCBReader.h */, + 15A3CEE51682C2B7002FB0C5 /* CCBSelectorResolver.h */, + 15A3CEE61682C2B7002FB0C5 /* CCBSequence.cpp */, + 15A3CEE71682C2B7002FB0C5 /* CCBSequence.h */, + 15A3CEE81682C2B7002FB0C5 /* CCBSequenceProperty.cpp */, + 15A3CEE91682C2B7002FB0C5 /* CCBSequenceProperty.h */, + 15A3CEEA1682C2B7002FB0C5 /* CCBValue.cpp */, + 15A3CEEB1682C2B7002FB0C5 /* CCBValue.h */, + 15A3CEEC1682C2B7002FB0C5 /* CCControlButtonLoader.cpp */, + 15A3CEED1682C2B7002FB0C5 /* CCControlButtonLoader.h */, + 15A3CEEE1682C2B7002FB0C5 /* CCControlLoader.cpp */, + 15A3CEEF1682C2B7002FB0C5 /* CCControlLoader.h */, + 15A3CEF01682C2B7002FB0C5 /* CCData.cpp */, + 15A3CEF11682C2B7002FB0C5 /* CCData.h */, + 15A3CEF21682C2B7002FB0C5 /* CCLabelBMFontLoader.cpp */, + 15A3CEF31682C2B7002FB0C5 /* CCLabelBMFontLoader.h */, + 15A3CEF41682C2B7002FB0C5 /* CCLabelTTFLoader.cpp */, + 15A3CEF51682C2B7002FB0C5 /* CCLabelTTFLoader.h */, + 15A3CEF61682C2B7002FB0C5 /* CCLayerColorLoader.cpp */, + 15A3CEF71682C2B7002FB0C5 /* CCLayerColorLoader.h */, + 15A3CEF81682C2B7002FB0C5 /* CCLayerGradientLoader.cpp */, + 15A3CEF91682C2B7002FB0C5 /* CCLayerGradientLoader.h */, + 15A3CEFA1682C2B8002FB0C5 /* CCLayerLoader.cpp */, + 15A3CEFB1682C2B8002FB0C5 /* CCLayerLoader.h */, + 15A3CEFC1682C2B8002FB0C5 /* CCMenuItemImageLoader.cpp */, + 15A3CEFD1682C2B8002FB0C5 /* CCMenuItemImageLoader.h */, + 15A3CEFE1682C2B8002FB0C5 /* CCMenuItemLoader.cpp */, + 15A3CEFF1682C2B8002FB0C5 /* CCMenuItemLoader.h */, + 15A3CF001682C2B8002FB0C5 /* CCMenuLoader.h */, + 15A3CF011682C2B8002FB0C5 /* CCNode+CCBRelativePositioning.cpp */, + 15A3CF021682C2B8002FB0C5 /* CCNode+CCBRelativePositioning.h */, + 15A3CF031682C2B8002FB0C5 /* CCNodeLoader.cpp */, + 15A3CF041682C2B8002FB0C5 /* CCNodeLoader.h */, + 15A3CF051682C2B8002FB0C5 /* CCNodeLoaderLibrary.cpp */, + 15A3CF061682C2B8002FB0C5 /* CCNodeLoaderLibrary.h */, + 15A3CF071682C2B8002FB0C5 /* CCNodeLoaderListener.h */, + 15A3CF081682C2B8002FB0C5 /* CCParticleSystemQuadLoader.cpp */, + 15A3CF091682C2B8002FB0C5 /* CCParticleSystemQuadLoader.h */, + 15A3CF0A1682C2B8002FB0C5 /* CCScale9SpriteLoader.cpp */, + 15A3CF0B1682C2B8002FB0C5 /* CCScale9SpriteLoader.h */, + 15A3CF0C1682C2B8002FB0C5 /* CCScrollViewLoader.cpp */, + 15A3CF0D1682C2B8002FB0C5 /* CCScrollViewLoader.h */, + 15A3CF0E1682C2B8002FB0C5 /* CCSpriteLoader.cpp */, + 15A3CF0F1682C2B8002FB0C5 /* CCSpriteLoader.h */, + ); + path = CCBReader; + sourceTree = ""; + }; + 15A3CF8E1682C331002FB0C5 /* CocosDenshion */ = { + isa = PBXGroup; + children = ( + 15A3CFA41682C331002FB0C5 /* include */, + 15A3CFA71682C331002FB0C5 /* ios */, + ); + name = CocosDenshion; + path = ../../../../CocosDenshion; + sourceTree = ""; + }; + 15A3CFA41682C331002FB0C5 /* include */ = { + isa = PBXGroup; + children = ( + 15A3CFA51682C331002FB0C5 /* Export.h */, + 15A3CFA61682C331002FB0C5 /* SimpleAudioEngine.h */, + ); + path = include; + sourceTree = ""; + }; + 15A3CFA71682C331002FB0C5 /* ios */ = { + isa = PBXGroup; + children = ( + 15A3CFA81682C331002FB0C5 /* CDAudioManager.h */, + 15A3CFA91682C331002FB0C5 /* CDAudioManager.m */, + 15A3CFAA1682C331002FB0C5 /* CDConfig.h */, + 15A3CFAB1682C331002FB0C5 /* CDOpenALSupport.h */, + 15A3CFAC1682C331002FB0C5 /* CDOpenALSupport.m */, + 15A3CFAD1682C331002FB0C5 /* CocosDenshion.h */, + 15A3CFAE1682C331002FB0C5 /* CocosDenshion.m */, + 15A3CFAF1682C331002FB0C5 /* SimpleAudioEngine.mm */, + 15A3CFB01682C331002FB0C5 /* SimpleAudioEngine_objc.h */, + 15A3CFB11682C331002FB0C5 /* SimpleAudioEngine_objc.m */, + ); + path = ios; + sourceTree = ""; + }; + 15A3D0781682E721002FB0C5 /* bindings */ = { + isa = PBXGroup; + children = ( + 15A3D07A1682E721002FB0C5 /* cocos2d_specifics.cpp */, + 15A3D07B1682E721002FB0C5 /* cocos2d_specifics.hpp */, + 15A3D07E1682E721002FB0C5 /* generated */, + 15A3D0831682E721002FB0C5 /* js */, + 15A3D0891682E721002FB0C5 /* js_bindings_ccbreader.cpp */, + 15A3D08A1682E721002FB0C5 /* js_bindings_ccbreader.h */, + 15A3D0951682E721002FB0C5 /* js_bindings_config.h */, + 15A3D0961682E721002FB0C5 /* js_bindings_core.cpp */, + 15A3D0971682E721002FB0C5 /* js_bindings_core.h */, + 1A177F101698297600C9AC27 /* js_bindings_system_functions.cpp */, + 1A177F111698297600C9AC27 /* js_bindings_system_functions.h */, + 1A177F0F1698297600C9AC27 /* js_bindings_system_functions_registration.h */, + 1A177F121698297600C9AC27 /* js_bindings_system_registration.cpp */, + 1A177F131698297600C9AC27 /* js_bindings_system_registration.h */, + 15A3D0981682E721002FB0C5 /* js_manual_conversions.cpp */, + 15A3D0991682E721002FB0C5 /* js_manual_conversions.h */, + 1AAC794016EDC2C700B97F83 /* jsb_cocos2dx_extension_manual.cpp */, + 1AAC794116EDC2C700B97F83 /* jsb_cocos2dx_extension_manual.h */, + 15A3D09A1682E721002FB0C5 /* ScriptingCore.cpp */, + 15A3D09B1682E721002FB0C5 /* ScriptingCore.h */, + 15A3D09C1682E721002FB0C5 /* spidermonkey_specifics.h */, + 15A3D09D1682E721002FB0C5 /* uthash.h */, + ); + name = bindings; + path = ../../../../scripting/javascript/bindings; + sourceTree = ""; + }; + 15A3D07E1682E721002FB0C5 /* generated */ = { + isa = PBXGroup; + children = ( + 1AAC78F716EDC13D00B97F83 /* jsb_cocos2dx_auto.cpp */, + 1AAC78F816EDC13D00B97F83 /* jsb_cocos2dx_auto.hpp */, + 1AAC78F616EDC13D00B97F83 /* jsb_cocos2dx_auto_api.js */, + 1AAC794416EDC2D700B97F83 /* jsb_cocos2dx_extension_auto.cpp */, + 1AAC794516EDC2D700B97F83 /* jsb_cocos2dx_extension_auto.hpp */, + 1AAC794316EDC2D700B97F83 /* jsb_cocos2dx_extension_auto_api.js */, + 15A3D0821682E721002FB0C5 /* README */, + ); + path = generated; + sourceTree = ""; + }; + 15A3D0831682E721002FB0C5 /* js */ = { + isa = PBXGroup; + children = ( + 1A2757991697FA7200504026 /* jsb_chipmunk.js */, + 1A27579A1697FA7200504026 /* jsb_cocos2d.js */, + 1A27579B1697FA7200504026 /* jsb_cocosbuilder.js */, + 1A27579C1697FA7200504026 /* jsb_debugger.js */, + 1A27579D1697FA7200504026 /* jsb_opengl.js */, + 1A27579E1697FA7200504026 /* jsb_sys.js */, + 1A27579F1697FA7200504026 /* jsb.js */, + ); + path = js; + sourceTree = ""; + }; + 1A82F5D4169AC75500C4B13A /* LocalStorage */ = { + isa = PBXGroup; + children = ( + 1A82F5D5169AC75500C4B13A /* LocalStorage.cpp */, + 1A82F5D6169AC75500C4B13A /* LocalStorage.h */, + 1A82F5D7169AC75500C4B13A /* LocalStorageAndroid.cpp */, + ); + path = LocalStorage; + sourceTree = ""; + }; + 1AAC78FB16EDC26E00B97F83 /* GUI */ = { + isa = PBXGroup; + children = ( + 1AAC78FC16EDC26E00B97F83 /* CCControlExtension */, + 1AAC791616EDC26E00B97F83 /* CCEditBox */, + 1AAC792216EDC26E00B97F83 /* CCScrollView */, + ); + path = GUI; + sourceTree = ""; + }; + 1AAC78FC16EDC26E00B97F83 /* CCControlExtension */ = { + isa = PBXGroup; + children = ( + 1AAC78FD16EDC26E00B97F83 /* CCControl.cpp */, + 1AAC78FE16EDC26E00B97F83 /* CCControl.h */, + 1AAC78FF16EDC26E00B97F83 /* CCControlButton.cpp */, + 1AAC790016EDC26E00B97F83 /* CCControlButton.h */, + 1AAC790116EDC26E00B97F83 /* CCControlColourPicker.cpp */, + 1AAC790216EDC26E00B97F83 /* CCControlColourPicker.h */, + 1AAC790316EDC26E00B97F83 /* CCControlExtensions.h */, + 1AAC790416EDC26E00B97F83 /* CCControlHuePicker.cpp */, + 1AAC790516EDC26E00B97F83 /* CCControlHuePicker.h */, + 1AAC790616EDC26E00B97F83 /* CCControlPotentiometer.cpp */, + 1AAC790716EDC26E00B97F83 /* CCControlPotentiometer.h */, + 1AAC790816EDC26E00B97F83 /* CCControlSaturationBrightnessPicker.cpp */, + 1AAC790916EDC26E00B97F83 /* CCControlSaturationBrightnessPicker.h */, + 1AAC790A16EDC26E00B97F83 /* CCControlSlider.cpp */, + 1AAC790B16EDC26E00B97F83 /* CCControlSlider.h */, + 1AAC790C16EDC26E00B97F83 /* CCControlStepper.cpp */, + 1AAC790D16EDC26E00B97F83 /* CCControlStepper.h */, + 1AAC790E16EDC26E00B97F83 /* CCControlSwitch.cpp */, + 1AAC790F16EDC26E00B97F83 /* CCControlSwitch.h */, + 1AAC791016EDC26E00B97F83 /* CCControlUtils.cpp */, + 1AAC791116EDC26E00B97F83 /* CCControlUtils.h */, + 1AAC791216EDC26E00B97F83 /* CCInvocation.cpp */, + 1AAC791316EDC26E00B97F83 /* CCInvocation.h */, + 1AAC791416EDC26E00B97F83 /* CCScale9Sprite.cpp */, + 1AAC791516EDC26E00B97F83 /* CCScale9Sprite.h */, + ); + path = CCControlExtension; + sourceTree = ""; + }; + 1AAC791616EDC26E00B97F83 /* CCEditBox */ = { + isa = PBXGroup; + children = ( + 1AAC791716EDC26E00B97F83 /* CCEditBox.cpp */, + 1AAC791816EDC26E00B97F83 /* CCEditBox.h */, + 1AAC791916EDC26E00B97F83 /* CCEditBoxImpl.h */, + 1AAC791A16EDC26E00B97F83 /* CCEditBoxImplAndroid.cpp */, + 1AAC791B16EDC26E00B97F83 /* CCEditBoxImplAndroid.h */, + 1AAC791C16EDC26E00B97F83 /* CCEditBoxImplIOS.h */, + 1AAC791D16EDC26E00B97F83 /* CCEditBoxImplIOS.mm */, + 1AAC791E16EDC26E00B97F83 /* CCEditBoxImplMac.h */, + 1AAC791F16EDC26E00B97F83 /* CCEditBoxImplMac.mm */, + 1AAC792016EDC26E00B97F83 /* CCEditBoxImplWin.cpp */, + 1AAC792116EDC26E00B97F83 /* CCEditBoxImplWin.h */, + ); + path = CCEditBox; + sourceTree = ""; + }; + 1AAC792216EDC26E00B97F83 /* CCScrollView */ = { + isa = PBXGroup; + children = ( + 1AAC792316EDC26E00B97F83 /* CCScrollView.cpp */, + 1AAC792416EDC26E00B97F83 /* CCScrollView.h */, + 1AAC792516EDC26E00B97F83 /* CCSorting.cpp */, + 1AAC792616EDC26E00B97F83 /* CCSorting.h */, + 1AAC792716EDC26E00B97F83 /* CCTableView.cpp */, + 1AAC792816EDC26E00B97F83 /* CCTableView.h */, + 1AAC792916EDC26E00B97F83 /* CCTableViewCell.cpp */, + 1AAC792A16EDC26E00B97F83 /* CCTableViewCell.h */, + ); + path = CCScrollView; + sourceTree = ""; + }; + A92275321517C094001B78AA = { + isa = PBXGroup; + children = ( + 15A3CE011682C057002FB0C5 /* cocos2dx.xcodeproj */, + 15A3D0781682E721002FB0C5 /* bindings */, + D4545214156E28EF00887EB5 /* Classes */, + 15A3CF8E1682C331002FB0C5 /* CocosDenshion */, + 15A3CED91682C2B7002FB0C5 /* extensions */, + A92275401517C094001B78AA /* Frameworks */, + D45446CC156DE73F00887EB5 /* ios */, + A922753E1517C094001B78AA /* Products */, + 15628F5B15F0F5C2000CF24B /* Resources */, + ); + sourceTree = ""; + }; + A922753E1517C094001B78AA /* Products */ = { + isa = PBXGroup; + children = ( + A922753D1517C094001B78AA /* CocosDragonJS.app */, + ); + name = Products; + sourceTree = ""; + }; + A92275401517C094001B78AA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1A82F5D0169AC71F00C4B13A /* libsqlite3.dylib */, + D454520B156E22BD00887EB5 /* libz.dylib */, + D4545209156E22B400887EB5 /* libxml2.dylib */, + A92275411517C094001B78AA /* QuartzCore.framework */, + A92275431517C094001B78AA /* OpenGLES.framework */, + A92275451517C094001B78AA /* OpenAL.framework */, + A92275471517C094001B78AA /* AudioToolbox.framework */, + A92275491517C094001B78AA /* AVFoundation.framework */, + A922754B1517C094001B78AA /* UIKit.framework */, + A922754D1517C094001B78AA /* Foundation.framework */, + A922754F1517C094001B78AA /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + D45446CC156DE73F00887EB5 /* ios */ = { + isa = PBXGroup; + children = ( + D45446D6156DE79D00887EB5 /* Info.plist */, + D45446CD156DE74F00887EB5 /* AppController.h */, + D45446CE156DE74F00887EB5 /* AppController.mm */, + D45446CF156DE74F00887EB5 /* main.m */, + D45446D0156DE74F00887EB5 /* Prefix.pch */, + D45446D1156DE74F00887EB5 /* RootViewController.h */, + D45446D2156DE74F00887EB5 /* RootViewController.mm */, + ); + name = ios; + sourceTree = ""; + }; + D4545214156E28EF00887EB5 /* Classes */ = { + isa = PBXGroup; + children = ( + D4545215156E28EF00887EB5 /* AppDelegate.cpp */, + D4545216156E28EF00887EB5 /* AppDelegate.h */, + ); + name = Classes; + path = ../Classes; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + A922753C1517C094001B78AA /* CocosDragonJS */ = { + isa = PBXNativeTarget; + buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "CocosDragonJS" */; + buildPhases = ( + A92275391517C094001B78AA /* Sources */, + A922753A1517C094001B78AA /* Frameworks */, + A922753B1517C094001B78AA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 15A3D0B71682E7C5002FB0C5 /* PBXTargetDependency */, + ); + name = CocosDragonJS; + productName = CocosDragonJS; + productReference = A922753D1517C094001B78AA /* CocosDragonJS.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A92275341517C094001B78AA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0430; + }; + buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "CocosDragonJS" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = A92275321517C094001B78AA; + productRefGroup = A922753E1517C094001B78AA /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 15A3CE021682C057002FB0C5 /* Products */; + ProjectRef = 15A3CE011682C057002FB0C5 /* cocos2dx.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + A922753C1517C094001B78AA /* CocosDragonJS */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 15A3CE091682C057002FB0C5 /* libcocos2dx.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcocos2dx.a; + remoteRef = 15A3CE081682C057002FB0C5 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + A922753B1517C094001B78AA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A2758101698218C00504026 /* jsb_chipmunk.js in Resources */, + 1A2758111698218C00504026 /* jsb_cocos2d.js in Resources */, + 1A2758121698218C00504026 /* jsb_cocosbuilder.js in Resources */, + 1A2758131698218C00504026 /* jsb_debugger.js in Resources */, + 1A2758141698218C00504026 /* jsb_opengl.js in Resources */, + 1A2758151698218C00504026 /* jsb_sys.js in Resources */, + 1A2758161698218C00504026 /* jsb.js in Resources */, + 15A3D0691682C3B8002FB0C5 /* Bomb.js in Resources */, + 15A3D06A1682C3B8002FB0C5 /* Coin.js in Resources */, + 15A3D06B1682C3B8002FB0C5 /* Dragon.js in Resources */, + 15A3D06C1682C3B8002FB0C5 /* EndCoin.js in Resources */, + 15A3D06D1682C3B8002FB0C5 /* Explosion.js in Resources */, + 15A3D06E1682C3B8002FB0C5 /* GameScene.js in Resources */, + 15A3D06F1682C3B8002FB0C5 /* Level.js in Resources */, + 15A3D0701682C3B8002FB0C5 /* main.js in Resources */, + 15A3D0711682C3B8002FB0C5 /* MainMenuScene.js in Resources */, + D446FDA316102D7D000ADA7B /* Default.png in Resources */, + D446FDA516102D82000ADA7B /* Default@2x.png in Resources */, + D446FDA716102D86000ADA7B /* Default-568h@2x.png in Resources */, + 159004B2166DE190006BF838 /* Icon-57.png in Resources */, + 159004B4166DE19C006BF838 /* Icon-114.png in Resources */, + 159004B6166DE1A8006BF838 /* Icon-72.png in Resources */, + 159004B8166DE1AF006BF838 /* Icon-144.png in Resources */, + 15A3CEB31682C292002FB0C5 /* Bomb.ccbi in Resources */, + 15A3CEB51682C292002FB0C5 /* ccbResources in Resources */, + 15A3CEB61682C292002FB0C5 /* cloud.png in Resources */, + 15A3CEB71682C292002FB0C5 /* Coin.ccbi in Resources */, + 15A3CEB91682C292002FB0C5 /* Coin.mp3 in Resources */, + 15A3CEBA1682C292002FB0C5 /* Dragon.ccbi in Resources */, + 15A3CEBC1682C292002FB0C5 /* EndCoin.ccbi in Resources */, + 15A3CEBE1682C292002FB0C5 /* Explo.mp3 in Resources */, + 15A3CEBF1682C292002FB0C5 /* Explosion.ccbi in Resources */, + 15A3CEC11682C292002FB0C5 /* gameobjects.plist in Resources */, + 15A3CEC21682C292002FB0C5 /* gameobjects.png in Resources */, + 15A3CEC31682C292002FB0C5 /* GameScene.ccbi in Resources */, + 15A3CEC51682C292002FB0C5 /* Level.ccbi in Resources */, + 15A3CEC71682C292002FB0C5 /* logo.png in Resources */, + 15A3CEC91682C292002FB0C5 /* MainMenuScene.ccbi in Resources */, + 15A3CECB1682C292002FB0C5 /* Music.mp3 in Resources */, + 15A3CECC1682C292002FB0C5 /* play-button-down.png in Resources */, + 15A3CECD1682C292002FB0C5 /* play-button.png in Resources */, + 15A3CECF1682C292002FB0C5 /* resources-ipad in Resources */, + 15A3CED01682C292002FB0C5 /* resources-ipadhd in Resources */, + 15A3CED11682C292002FB0C5 /* resources-iphone in Resources */, + 15A3CED21682C292002FB0C5 /* resources-iphonehd in Resources */, + 15A3CED31682C292002FB0C5 /* settings-button-down.png in Resources */, + 15A3CED41682C292002FB0C5 /* settings-button.png in Resources */, + 15A3CED51682C292002FB0C5 /* settings-caption-music.png in Resources */, + 15A3CED61682C292002FB0C5 /* settings-caption-musicoff.png in Resources */, + 15A3CED71682C292002FB0C5 /* settings-caption-tilt.png in Resources */, + 15A3CED81682C292002FB0C5 /* settings-caption-touch.png in Resources */, + 15A3D0A31682E721002FB0C5 /* README in Resources */, + 152647CB16B6AA5100A2D258 /* fileLookup.plist in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + A92275391517C094001B78AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D45446D3156DE74F00887EB5 /* AppController.mm in Sources */, + D45446D4156DE74F00887EB5 /* main.m in Sources */, + D45446D5156DE74F00887EB5 /* RootViewController.mm in Sources */, + D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */, + 15A3CF571682C2B8002FB0C5 /* CCBAnimationManager.cpp in Sources */, + 15A3CF581682C2B8002FB0C5 /* CCBFileLoader.cpp in Sources */, + 15A3CF591682C2B8002FB0C5 /* CCBKeyframe.cpp in Sources */, + 15A3CF5A1682C2B8002FB0C5 /* CCBReader.cpp in Sources */, + 15A3CF5B1682C2B8002FB0C5 /* CCBSequence.cpp in Sources */, + 15A3CF5C1682C2B8002FB0C5 /* CCBSequenceProperty.cpp in Sources */, + 15A3CF5D1682C2B8002FB0C5 /* CCBValue.cpp in Sources */, + 15A3CF5E1682C2B8002FB0C5 /* CCControlButtonLoader.cpp in Sources */, + 15A3CF5F1682C2B8002FB0C5 /* CCControlLoader.cpp in Sources */, + 15A3CF601682C2B8002FB0C5 /* CCData.cpp in Sources */, + 15A3CF611682C2B8002FB0C5 /* CCLabelBMFontLoader.cpp in Sources */, + 15A3CF621682C2B8002FB0C5 /* CCLabelTTFLoader.cpp in Sources */, + 15A3CF631682C2B8002FB0C5 /* CCLayerColorLoader.cpp in Sources */, + 15A3CF641682C2B8002FB0C5 /* CCLayerGradientLoader.cpp in Sources */, + 15A3CF651682C2B8002FB0C5 /* CCLayerLoader.cpp in Sources */, + 15A3CF661682C2B8002FB0C5 /* CCMenuItemImageLoader.cpp in Sources */, + 15A3CF671682C2B8002FB0C5 /* CCMenuItemLoader.cpp in Sources */, + 15A3CF681682C2B8002FB0C5 /* CCNode+CCBRelativePositioning.cpp in Sources */, + 15A3CF691682C2B8002FB0C5 /* CCNodeLoader.cpp in Sources */, + 15A3CF6A1682C2B8002FB0C5 /* CCNodeLoaderLibrary.cpp in Sources */, + 15A3CF6B1682C2B8002FB0C5 /* CCParticleSystemQuadLoader.cpp in Sources */, + 15A3CF6C1682C2B8002FB0C5 /* CCScale9SpriteLoader.cpp in Sources */, + 15A3CF6D1682C2B8002FB0C5 /* CCScrollViewLoader.cpp in Sources */, + 15A3CF6E1682C2B8002FB0C5 /* CCSpriteLoader.cpp in Sources */, + 15A3D00E1682C331002FB0C5 /* CDAudioManager.m in Sources */, + 15A3D00F1682C331002FB0C5 /* CDOpenALSupport.m in Sources */, + 15A3D0101682C331002FB0C5 /* CocosDenshion.m in Sources */, + 15A3D0111682C331002FB0C5 /* SimpleAudioEngine.mm in Sources */, + 15A3D0121682C331002FB0C5 /* SimpleAudioEngine_objc.m in Sources */, + 15A3D09F1682E721002FB0C5 /* cocos2d_specifics.cpp in Sources */, + 15A3D0A91682E721002FB0C5 /* js_bindings_ccbreader.cpp in Sources */, + 15A3D0AE1682E721002FB0C5 /* js_bindings_core.cpp in Sources */, + 15A3D0AF1682E721002FB0C5 /* js_manual_conversions.cpp in Sources */, + 15A3D0B01682E721002FB0C5 /* ScriptingCore.cpp in Sources */, + 1A2757A01697FA7200504026 /* jsb_chipmunk.js in Sources */, + 1A2757A11697FA7200504026 /* jsb_cocos2d.js in Sources */, + 1A2757A21697FA7200504026 /* jsb_cocosbuilder.js in Sources */, + 1A2757A31697FA7200504026 /* jsb_debugger.js in Sources */, + 1A2757A41697FA7200504026 /* jsb_opengl.js in Sources */, + 1A2757A51697FA7200504026 /* jsb_sys.js in Sources */, + 1A2757A61697FA7200504026 /* jsb.js in Sources */, + 1A177F141698297600C9AC27 /* js_bindings_system_functions.cpp in Sources */, + 1A177F151698297600C9AC27 /* js_bindings_system_registration.cpp in Sources */, + 1A82F5D8169AC75500C4B13A /* LocalStorage.cpp in Sources */, + 1A82F5D9169AC75500C4B13A /* LocalStorageAndroid.cpp in Sources */, + 1AAC78F916EDC13D00B97F83 /* jsb_cocos2dx_auto_api.js in Sources */, + 1AAC78FA16EDC13D00B97F83 /* jsb_cocos2dx_auto.cpp in Sources */, + 1AAC792B16EDC26E00B97F83 /* CCControl.cpp in Sources */, + 1AAC792C16EDC26E00B97F83 /* CCControlButton.cpp in Sources */, + 1AAC792D16EDC26E00B97F83 /* CCControlColourPicker.cpp in Sources */, + 1AAC792E16EDC26E00B97F83 /* CCControlHuePicker.cpp in Sources */, + 1AAC792F16EDC26E00B97F83 /* CCControlPotentiometer.cpp in Sources */, + 1AAC793016EDC26E00B97F83 /* CCControlSaturationBrightnessPicker.cpp in Sources */, + 1AAC793116EDC26E00B97F83 /* CCControlSlider.cpp in Sources */, + 1AAC793216EDC26E00B97F83 /* CCControlStepper.cpp in Sources */, + 1AAC793316EDC26E00B97F83 /* CCControlSwitch.cpp in Sources */, + 1AAC793416EDC26E00B97F83 /* CCControlUtils.cpp in Sources */, + 1AAC793516EDC26E00B97F83 /* CCInvocation.cpp in Sources */, + 1AAC793616EDC26E00B97F83 /* CCScale9Sprite.cpp in Sources */, + 1AAC793716EDC26E00B97F83 /* CCEditBox.cpp in Sources */, + 1AAC793816EDC26E00B97F83 /* CCEditBoxImplAndroid.cpp in Sources */, + 1AAC793916EDC26E00B97F83 /* CCEditBoxImplIOS.mm in Sources */, + 1AAC793A16EDC26E00B97F83 /* CCEditBoxImplMac.mm in Sources */, + 1AAC793B16EDC26E00B97F83 /* CCEditBoxImplWin.cpp in Sources */, + 1AAC793C16EDC26E00B97F83 /* CCScrollView.cpp in Sources */, + 1AAC793D16EDC26E00B97F83 /* CCSorting.cpp in Sources */, + 1AAC793E16EDC26E00B97F83 /* CCTableView.cpp in Sources */, + 1AAC793F16EDC26E00B97F83 /* CCTableViewCell.cpp in Sources */, + 1AAC794216EDC2C700B97F83 /* jsb_cocos2dx_extension_manual.cpp in Sources */, + 1AAC794616EDC2D700B97F83 /* jsb_cocos2dx_extension_auto_api.js in Sources */, + 1AAC794716EDC2D700B97F83 /* jsb_cocos2dx_extension_auto.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 15A3D0B71682E7C5002FB0C5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = cocos2dx; + targetProxy = 15A3D0B61682E7C5002FB0C5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + A92276FE1517C097001B78AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + SDKROOT = iphoneos; + }; + name = Debug; + }; + A92276FF1517C097001B78AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + }; + name = Release; + }; + A92277011517C097001B78AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 1; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + COCOS2D_JAVASCRIPT, + DEBUG, + "COCOS2D_DEBUG=1", + USE_FILE32API, + CC_TARGET_OS_IPHONE, + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../cocos2dx\"", + "\"$(SRCROOT)/../../../../cocos2dx/kazmath/include\"", + "\"$(SRCROOT)/../../../../CocosDenshion/include\"", + "\"$(SDKROOT)/usr/include/libxml2\"", + "$(SRCROOT)/../../../../cocos2dx/include", + "$(SRCROOT)/../../../../cocos2dx/platform/ios", + "$(SRCROOT)/../../../../external/chipmunk/include/chipmunk", + "$(SRCROOT)/../../../../scripting/javascript/spidermonkey-ios/include", + "$(SRCROOT)/../../../../scripting/javascript/bindings", + ); + INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../scripting/javascript/spidermonkey-ios/lib\""; + OTHER_LDFLAGS = ( + "-lxml2", + "-lz", + "-ljs_static", + ); + PRODUCT_NAME = CocosDragonJS; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + A92277021517C097001B78AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + COCOS2D_JAVASCRIPT, + NDEBUG, + USE_FILE32API, + CC_TARGET_OS_IPHONE, + "CC_ENABLE_CHIPMUNK_INTEGRATION=1", + ); + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../cocos2dx\"", + "\"$(SRCROOT)/../../../../cocos2dx/kazmath/include\"", + "\"$(SRCROOT)/../../../../CocosDenshion/include\"", + "\"$(SDKROOT)/usr/include/libxml2\"", + "$(SRCROOT)/../../../../cocos2dx/include", + "$(SRCROOT)/../../../../cocos2dx/platform/ios", + "$(SRCROOT)/../../../../external/chipmunk/include/chipmunk", + "$(SRCROOT)/../../../../scripting/javascript/spidermonkey-ios/include", + "$(SRCROOT)/../../../../scripting/javascript/bindings", + ); + INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 5.1; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../scripting/javascript/spidermonkey-ios/lib\""; + OTHER_LDFLAGS = ( + "-lxml2", + "-lz", + "-ljs_static", + ); + PRODUCT_NAME = CocosDragonJS; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A92275371517C094001B78AA /* Build configuration list for PBXProject "CocosDragonJS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A92276FE1517C097001B78AA /* Debug */, + A92276FF1517C097001B78AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "CocosDragonJS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A92277011517C097001B78AA /* Debug */, + A92277021517C097001B78AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A92275341517C094001B78AA /* Project object */; +} diff --git a/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id deleted file mode 100644 index 3cde1ba20e..0000000000 --- a/samples/Javascript/CocosDragonJS/proj.ios/CocosDragonJS.xcodeproj/project.pbxproj.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -7aba7eb803d8f223aaa4bab109f54f7913b4bb3b \ No newline at end of file diff --git a/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp b/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp index 878396a819..ad5e3b4671 100644 --- a/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp +++ b/samples/Javascript/CrystalCraze/Classes/AppDelegate.cpp @@ -3,9 +3,10 @@ #include "cocos2d.h" #include "SimpleAudioEngine.h" #include "ScriptingCore.h" -#include "generated/cocos2dx.hpp" +#include "generated/jsb_cocos2dx_auto.hpp" +#include "generated/jsb_cocos2dx_extension_auto.hpp" +#include "jsb_cocos2dx_extension_manual.h" #include "cocos2d_specifics.hpp" -#include "js_bindings_chipmunk_registration.h" #include "js_bindings_ccbreader.h" #include "js_bindings_system_registration.h" @@ -98,9 +99,10 @@ bool AppDelegate::applicationDidFinishLaunching() ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); + sc->addRegisterCallback(register_all_cocos2dx_extension); sc->addRegisterCallback(register_cocos2dx_js_extensions); + sc->addRegisterCallback(register_all_cocos2dx_extension_manual); sc->addRegisterCallback(register_CCBuilderReader); - sc->addRegisterCallback(jsb_register_chipmunk); sc->addRegisterCallback(jsb_register_system); sc->start(); diff --git a/samples/Javascript/CrystalCraze/proj.ios/CrystalCraze.xcodeproj/project.pbxproj b/samples/Javascript/CrystalCraze/proj.ios/CrystalCraze.xcodeproj/project.pbxproj index c3c50743fe..c9a9e4ee23 100644 --- a/samples/Javascript/CrystalCraze/proj.ios/CrystalCraze.xcodeproj/project.pbxproj +++ b/samples/Javascript/CrystalCraze/proj.ios/CrystalCraze.xcodeproj/project.pbxproj @@ -83,23 +83,14 @@ 15A3CF801682C2B8002FB0C5 /* CCSorting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF3A1682C2B8002FB0C5 /* CCSorting.cpp */; }; 15A3CF811682C2B8002FB0C5 /* CCTableView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF3C1682C2B8002FB0C5 /* CCTableView.cpp */; }; 15A3CF821682C2B8002FB0C5 /* CCTableViewCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF3E1682C2B8002FB0C5 /* CCTableViewCell.cpp */; }; - 15A3CF841682C2B8002FB0C5 /* CCPhysicsDebugNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF461682C2B8002FB0C5 /* CCPhysicsDebugNode.cpp */; }; - 15A3CF851682C2B8002FB0C5 /* CCPhysicsSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CF481682C2B8002FB0C5 /* CCPhysicsSprite.cpp */; }; 15A3D00E1682C331002FB0C5 /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFA91682C331002FB0C5 /* CDAudioManager.m */; }; 15A3D00F1682C331002FB0C5 /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFAC1682C331002FB0C5 /* CDOpenALSupport.m */; }; 15A3D0101682C331002FB0C5 /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFAE1682C331002FB0C5 /* CocosDenshion.m */; }; 15A3D0111682C331002FB0C5 /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFAF1682C331002FB0C5 /* SimpleAudioEngine.mm */; }; 15A3D0121682C331002FB0C5 /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3CFB11682C331002FB0C5 /* SimpleAudioEngine_objc.m */; }; - 15A3D09E1682E721002FB0C5 /* Android.mk in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D0791682E721002FB0C5 /* Android.mk */; }; 15A3D09F1682E721002FB0C5 /* cocos2d_specifics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D07A1682E721002FB0C5 /* cocos2d_specifics.cpp */; }; - 15A3D0A01682E721002FB0C5 /* cocosjs_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D07C1682E721002FB0C5 /* cocosjs_manual_conversions.cpp */; }; - 15A3D0A11682E721002FB0C5 /* cocos2dx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D07F1682E721002FB0C5 /* cocos2dx.cpp */; }; 15A3D0A31682E721002FB0C5 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D0821682E721002FB0C5 /* README */; }; 15A3D0A91682E721002FB0C5 /* js_bindings_ccbreader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D0891682E721002FB0C5 /* js_bindings_ccbreader.cpp */; }; - 15A3D0AA1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D08B1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes.cpp */; }; - 15A3D0AB1682E721002FB0C5 /* js_bindings_chipmunk_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D08E1682E721002FB0C5 /* js_bindings_chipmunk_functions.cpp */; }; - 15A3D0AC1682E721002FB0C5 /* js_bindings_chipmunk_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D0911682E721002FB0C5 /* js_bindings_chipmunk_manual.cpp */; }; - 15A3D0AD1682E721002FB0C5 /* js_bindings_chipmunk_registration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D0931682E721002FB0C5 /* js_bindings_chipmunk_registration.cpp */; }; 15A3D0AE1682E721002FB0C5 /* js_bindings_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D0961682E721002FB0C5 /* js_bindings_core.cpp */; }; 15A3D0AF1682E721002FB0C5 /* js_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D0981682E721002FB0C5 /* js_manual_conversions.cpp */; }; 15A3D0B01682E721002FB0C5 /* ScriptingCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D09A1682E721002FB0C5 /* ScriptingCore.cpp */; }; @@ -117,6 +108,11 @@ 1A82F5D1169AC71F00C4B13A /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5D0169AC71F00C4B13A /* libsqlite3.dylib */; }; 1A82F5D8169AC75500C4B13A /* LocalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A82F5D5169AC75500C4B13A /* LocalStorage.cpp */; }; 1A82F5D9169AC75500C4B13A /* LocalStorageAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A82F5D7169AC75500C4B13A /* LocalStorageAndroid.cpp */; }; + 1AAC794F16EDC4F400B97F83 /* jsb_cocos2dx_auto_api.js in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC794916EDC4F400B97F83 /* jsb_cocos2dx_auto_api.js */; }; + 1AAC795016EDC4F400B97F83 /* jsb_cocos2dx_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC794A16EDC4F400B97F83 /* jsb_cocos2dx_auto.cpp */; }; + 1AAC795516EDC62500B97F83 /* jsb_cocos2dx_extension_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC795316EDC62500B97F83 /* jsb_cocos2dx_extension_manual.cpp */; }; + 1AAC795916EDC63A00B97F83 /* jsb_cocos2dx_extension_auto_api.js in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC795616EDC63A00B97F83 /* jsb_cocos2dx_extension_auto_api.js */; }; + 1AAC795A16EDC63A00B97F83 /* jsb_cocos2dx_extension_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC795716EDC63A00B97F83 /* jsb_cocos2dx_extension_auto.cpp */; }; A92275421517C094001B78AA /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; }; A92275441517C094001B78AA /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275431517C094001B78AA /* OpenGLES.framework */; }; A92275461517C094001B78AA /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; }; @@ -307,10 +303,6 @@ 15A3CF3D1682C2B8002FB0C5 /* CCTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTableView.h; sourceTree = ""; }; 15A3CF3E1682C2B8002FB0C5 /* CCTableViewCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTableViewCell.cpp; sourceTree = ""; }; 15A3CF3F1682C2B8002FB0C5 /* CCTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTableViewCell.h; sourceTree = ""; }; - 15A3CF461682C2B8002FB0C5 /* CCPhysicsDebugNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsDebugNode.cpp; sourceTree = ""; }; - 15A3CF471682C2B8002FB0C5 /* CCPhysicsDebugNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsDebugNode.h; sourceTree = ""; }; - 15A3CF481682C2B8002FB0C5 /* CCPhysicsSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCPhysicsSprite.cpp; sourceTree = ""; }; - 15A3CF491682C2B8002FB0C5 /* CCPhysicsSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPhysicsSprite.h; sourceTree = ""; }; 15A3CFA51682C331002FB0C5 /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = ""; }; 15A3CFA61682C331002FB0C5 /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = ""; }; 15A3CFA81682C331002FB0C5 /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = ""; }; @@ -323,27 +315,11 @@ 15A3CFAF1682C331002FB0C5 /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = ""; }; 15A3CFB01682C331002FB0C5 /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; }; 15A3CFB11682C331002FB0C5 /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; }; - 15A3D0791682E721002FB0C5 /* Android.mk */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.mk; sourceTree = ""; }; 15A3D07A1682E721002FB0C5 /* cocos2d_specifics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2d_specifics.cpp; sourceTree = ""; }; 15A3D07B1682E721002FB0C5 /* cocos2d_specifics.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2d_specifics.hpp; sourceTree = ""; }; - 15A3D07C1682E721002FB0C5 /* cocosjs_manual_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocosjs_manual_conversions.cpp; sourceTree = ""; }; - 15A3D07D1682E721002FB0C5 /* cocosjs_manual_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cocosjs_manual_conversions.h; sourceTree = ""; }; - 15A3D07F1682E721002FB0C5 /* cocos2dx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2dx.cpp; sourceTree = ""; }; - 15A3D0801682E721002FB0C5 /* cocos2dx.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2dx.hpp; sourceTree = ""; }; - 15A3D0811682E721002FB0C5 /* cocos2dxapi.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = cocos2dxapi.js; sourceTree = ""; }; 15A3D0821682E721002FB0C5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; 15A3D0891682E721002FB0C5 /* js_bindings_ccbreader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_ccbreader.cpp; sourceTree = ""; }; 15A3D08A1682E721002FB0C5 /* js_bindings_ccbreader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_ccbreader.h; sourceTree = ""; }; - 15A3D08B1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_auto_classes.cpp; sourceTree = ""; }; - 15A3D08C1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_auto_classes.h; sourceTree = ""; }; - 15A3D08D1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_auto_classes_registration.h; sourceTree = ""; }; - 15A3D08E1682E721002FB0C5 /* js_bindings_chipmunk_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_functions.cpp; sourceTree = ""; }; - 15A3D08F1682E721002FB0C5 /* js_bindings_chipmunk_functions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_functions.h; sourceTree = ""; }; - 15A3D0901682E721002FB0C5 /* js_bindings_chipmunk_functions_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_functions_registration.h; sourceTree = ""; }; - 15A3D0911682E721002FB0C5 /* js_bindings_chipmunk_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_manual.cpp; sourceTree = ""; }; - 15A3D0921682E721002FB0C5 /* js_bindings_chipmunk_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_manual.h; sourceTree = ""; }; - 15A3D0931682E721002FB0C5 /* js_bindings_chipmunk_registration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_chipmunk_registration.cpp; sourceTree = ""; }; - 15A3D0941682E721002FB0C5 /* js_bindings_chipmunk_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_registration.h; sourceTree = ""; }; 15A3D0951682E721002FB0C5 /* js_bindings_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_config.h; sourceTree = ""; }; 15A3D0961682E721002FB0C5 /* js_bindings_core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_core.cpp; sourceTree = ""; }; 15A3D0971682E721002FB0C5 /* js_bindings_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_core.h; sourceTree = ""; }; @@ -370,6 +346,14 @@ 1A82F5D5169AC75500C4B13A /* LocalStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorage.cpp; sourceTree = ""; }; 1A82F5D6169AC75500C4B13A /* LocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorage.h; sourceTree = ""; }; 1A82F5D7169AC75500C4B13A /* LocalStorageAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorageAndroid.cpp; sourceTree = ""; }; + 1AAC794916EDC4F400B97F83 /* jsb_cocos2dx_auto_api.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocos2dx_auto_api.js; sourceTree = ""; }; + 1AAC794A16EDC4F400B97F83 /* jsb_cocos2dx_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_auto.cpp; sourceTree = ""; }; + 1AAC794B16EDC4F400B97F83 /* jsb_cocos2dx_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_auto.hpp; sourceTree = ""; }; + 1AAC795316EDC62500B97F83 /* jsb_cocos2dx_extension_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_extension_manual.cpp; sourceTree = ""; }; + 1AAC795416EDC62500B97F83 /* jsb_cocos2dx_extension_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsb_cocos2dx_extension_manual.h; sourceTree = ""; }; + 1AAC795616EDC63A00B97F83 /* jsb_cocos2dx_extension_auto_api.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocos2dx_extension_auto_api.js; sourceTree = ""; }; + 1AAC795716EDC63A00B97F83 /* jsb_cocos2dx_extension_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_extension_auto.cpp; sourceTree = ""; }; + 1AAC795816EDC63A00B97F83 /* jsb_cocos2dx_extension_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_extension_auto.hpp; sourceTree = ""; }; A922753D1517C094001B78AA /* CrystalCraze.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CrystalCraze.app; sourceTree = BUILT_PRODUCTS_DIR; }; A92275411517C094001B78AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; A92275431517C094001B78AA /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; @@ -553,7 +537,6 @@ 15A3CF101682C2B8002FB0C5 /* cocos-ext.h */, 15A3CF111682C2B8002FB0C5 /* ExtensionMacros.h */, 15A3CF121682C2B8002FB0C5 /* GUI */, - 15A3CF451682C2B8002FB0C5 /* physics_nodes */, ); name = extensions; path = ../../../../extensions; @@ -687,17 +670,6 @@ path = CCScrollView; sourceTree = ""; }; - 15A3CF451682C2B8002FB0C5 /* physics_nodes */ = { - isa = PBXGroup; - children = ( - 15A3CF461682C2B8002FB0C5 /* CCPhysicsDebugNode.cpp */, - 15A3CF471682C2B8002FB0C5 /* CCPhysicsDebugNode.h */, - 15A3CF481682C2B8002FB0C5 /* CCPhysicsSprite.cpp */, - 15A3CF491682C2B8002FB0C5 /* CCPhysicsSprite.h */, - ); - path = physics_nodes; - sourceTree = ""; - }; 15A3CF8E1682C331002FB0C5 /* CocosDenshion */ = { isa = PBXGroup; children = ( @@ -738,38 +710,27 @@ isa = PBXGroup; children = ( 15A3D07A1682E721002FB0C5 /* cocos2d_specifics.cpp */, - 15A3D07C1682E721002FB0C5 /* cocosjs_manual_conversions.cpp */, + 15A3D07B1682E721002FB0C5 /* cocos2d_specifics.hpp */, + 15A3D07E1682E721002FB0C5 /* generated */, + 15A3D0831682E721002FB0C5 /* js */, 15A3D0891682E721002FB0C5 /* js_bindings_ccbreader.cpp */, - 15A3D08B1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes.cpp */, - 15A3D08E1682E721002FB0C5 /* js_bindings_chipmunk_functions.cpp */, - 15A3D0911682E721002FB0C5 /* js_bindings_chipmunk_manual.cpp */, - 15A3D0931682E721002FB0C5 /* js_bindings_chipmunk_registration.cpp */, - 15A3D0961682E721002FB0C5 /* js_bindings_core.cpp */, - 1A177F101698297600C9AC27 /* js_bindings_system_functions.cpp */, - 1A177F121698297600C9AC27 /* js_bindings_system_registration.cpp */, - 15A3D0981682E721002FB0C5 /* js_manual_conversions.cpp */, - 15A3D09A1682E721002FB0C5 /* ScriptingCore.cpp */, - 15A3D07D1682E721002FB0C5 /* cocosjs_manual_conversions.h */, 15A3D08A1682E721002FB0C5 /* js_bindings_ccbreader.h */, - 15A3D08C1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes.h */, - 15A3D08D1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes_registration.h */, - 15A3D08F1682E721002FB0C5 /* js_bindings_chipmunk_functions.h */, - 15A3D0901682E721002FB0C5 /* js_bindings_chipmunk_functions_registration.h */, - 15A3D0921682E721002FB0C5 /* js_bindings_chipmunk_manual.h */, - 15A3D0941682E721002FB0C5 /* js_bindings_chipmunk_registration.h */, 15A3D0951682E721002FB0C5 /* js_bindings_config.h */, + 15A3D0961682E721002FB0C5 /* js_bindings_core.cpp */, 15A3D0971682E721002FB0C5 /* js_bindings_core.h */, + 1A177F101698297600C9AC27 /* js_bindings_system_functions.cpp */, 1A177F111698297600C9AC27 /* js_bindings_system_functions.h */, 1A177F0F1698297600C9AC27 /* js_bindings_system_functions_registration.h */, + 1A177F121698297600C9AC27 /* js_bindings_system_registration.cpp */, 1A177F131698297600C9AC27 /* js_bindings_system_registration.h */, + 15A3D0981682E721002FB0C5 /* js_manual_conversions.cpp */, 15A3D0991682E721002FB0C5 /* js_manual_conversions.h */, + 1AAC795316EDC62500B97F83 /* jsb_cocos2dx_extension_manual.cpp */, + 1AAC795416EDC62500B97F83 /* jsb_cocos2dx_extension_manual.h */, + 15A3D09A1682E721002FB0C5 /* ScriptingCore.cpp */, 15A3D09B1682E721002FB0C5 /* ScriptingCore.h */, 15A3D09C1682E721002FB0C5 /* spidermonkey_specifics.h */, 15A3D09D1682E721002FB0C5 /* uthash.h */, - 15A3D07B1682E721002FB0C5 /* cocos2d_specifics.hpp */, - 15A3D0791682E721002FB0C5 /* Android.mk */, - 15A3D07E1682E721002FB0C5 /* generated */, - 15A3D0831682E721002FB0C5 /* js */, ); name = bindings; path = ../../../../scripting/javascript/bindings; @@ -778,9 +739,12 @@ 15A3D07E1682E721002FB0C5 /* generated */ = { isa = PBXGroup; children = ( - 15A3D07F1682E721002FB0C5 /* cocos2dx.cpp */, - 15A3D0801682E721002FB0C5 /* cocos2dx.hpp */, - 15A3D0811682E721002FB0C5 /* cocos2dxapi.js */, + 1AAC794A16EDC4F400B97F83 /* jsb_cocos2dx_auto.cpp */, + 1AAC794B16EDC4F400B97F83 /* jsb_cocos2dx_auto.hpp */, + 1AAC794916EDC4F400B97F83 /* jsb_cocos2dx_auto_api.js */, + 1AAC795716EDC63A00B97F83 /* jsb_cocos2dx_extension_auto.cpp */, + 1AAC795816EDC63A00B97F83 /* jsb_cocos2dx_extension_auto.hpp */, + 1AAC795616EDC63A00B97F83 /* jsb_cocos2dx_extension_auto_api.js */, 15A3D0821682E721002FB0C5 /* README */, ); path = generated; @@ -958,7 +922,6 @@ 159004B6166DE1A8006BF838 /* Icon-72.png in Resources */, 159004B8166DE1AF006BF838 /* Icon-144.png in Resources */, 15A3CE661682C205002FB0C5 /* CMakeLists.txt in Resources */, - 15A3D09E1682E721002FB0C5 /* Android.mk in Resources */, 15A3D0A31682E721002FB0C5 /* README in Resources */, 1A21ED5216B02EE100A2E30E /* Published-iOS in Resources */, ); @@ -1046,21 +1009,13 @@ 15A3CF801682C2B8002FB0C5 /* CCSorting.cpp in Sources */, 15A3CF811682C2B8002FB0C5 /* CCTableView.cpp in Sources */, 15A3CF821682C2B8002FB0C5 /* CCTableViewCell.cpp in Sources */, - 15A3CF841682C2B8002FB0C5 /* CCPhysicsDebugNode.cpp in Sources */, - 15A3CF851682C2B8002FB0C5 /* CCPhysicsSprite.cpp in Sources */, 15A3D00E1682C331002FB0C5 /* CDAudioManager.m in Sources */, 15A3D00F1682C331002FB0C5 /* CDOpenALSupport.m in Sources */, 15A3D0101682C331002FB0C5 /* CocosDenshion.m in Sources */, 15A3D0111682C331002FB0C5 /* SimpleAudioEngine.mm in Sources */, 15A3D0121682C331002FB0C5 /* SimpleAudioEngine_objc.m in Sources */, 15A3D09F1682E721002FB0C5 /* cocos2d_specifics.cpp in Sources */, - 15A3D0A01682E721002FB0C5 /* cocosjs_manual_conversions.cpp in Sources */, - 15A3D0A11682E721002FB0C5 /* cocos2dx.cpp in Sources */, 15A3D0A91682E721002FB0C5 /* js_bindings_ccbreader.cpp in Sources */, - 15A3D0AA1682E721002FB0C5 /* js_bindings_chipmunk_auto_classes.cpp in Sources */, - 15A3D0AB1682E721002FB0C5 /* js_bindings_chipmunk_functions.cpp in Sources */, - 15A3D0AC1682E721002FB0C5 /* js_bindings_chipmunk_manual.cpp in Sources */, - 15A3D0AD1682E721002FB0C5 /* js_bindings_chipmunk_registration.cpp in Sources */, 15A3D0AE1682E721002FB0C5 /* js_bindings_core.cpp in Sources */, 15A3D0AF1682E721002FB0C5 /* js_manual_conversions.cpp in Sources */, 15A3D0B01682E721002FB0C5 /* ScriptingCore.cpp in Sources */, @@ -1068,6 +1023,11 @@ 1A177F151698297600C9AC27 /* js_bindings_system_registration.cpp in Sources */, 1A82F5D8169AC75500C4B13A /* LocalStorage.cpp in Sources */, 1A82F5D9169AC75500C4B13A /* LocalStorageAndroid.cpp in Sources */, + 1AAC794F16EDC4F400B97F83 /* jsb_cocos2dx_auto_api.js in Sources */, + 1AAC795016EDC4F400B97F83 /* jsb_cocos2dx_auto.cpp in Sources */, + 1AAC795516EDC62500B97F83 /* jsb_cocos2dx_extension_manual.cpp in Sources */, + 1AAC795916EDC63A00B97F83 /* jsb_cocos2dx_extension_auto_api.js in Sources */, + 1AAC795A16EDC63A00B97F83 /* jsb_cocos2dx_extension_auto.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp b/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp index b981bb32bc..9a1fa7c989 100644 --- a/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp +++ b/samples/Javascript/MoonWarriors/Classes/AppDelegate.cpp @@ -3,11 +3,8 @@ #include "cocos2d.h" #include "SimpleAudioEngine.h" #include "ScriptingCore.h" -#include "generated/cocos2dx.hpp" +#include "generated/jsb_cocos2dx_auto.hpp" #include "cocos2d_specifics.hpp" -#include "js_bindings_chipmunk_registration.h" -#include "js_bindings_ccbreader.h" -#include "js_bindings_system_registration.h" USING_NS_CC; using namespace CocosDenshion; @@ -40,9 +37,6 @@ bool AppDelegate::applicationDidFinishLaunching() ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); sc->addRegisterCallback(register_cocos2dx_js_extensions); - sc->addRegisterCallback(register_CCBuilderReader); - sc->addRegisterCallback(jsb_register_chipmunk); - sc->addRegisterCallback(jsb_register_system); sc->start(); CCScriptEngineProtocol *pEngine = ScriptingCore::getInstance(); diff --git a/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj b/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..a9a8892c99 --- /dev/null +++ b/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj @@ -0,0 +1,720 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 15674A6E163E70370002AD61 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15674A6D163E70370002AD61 /* QuartzCore.framework */; }; + 15674A70163E70370002AD61 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15674A6F163E70370002AD61 /* OpenGLES.framework */; }; + 15674A72163E70370002AD61 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15674A71163E70370002AD61 /* OpenAL.framework */; }; + 15674A74163E70370002AD61 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15674A73163E70370002AD61 /* AudioToolbox.framework */; }; + 15674A76163E70370002AD61 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15674A75163E70370002AD61 /* AVFoundation.framework */; }; + 15674A78163E70370002AD61 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15674A77163E70370002AD61 /* UIKit.framework */; }; + 15674A7A163E70370002AD61 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15674A79163E70370002AD61 /* Foundation.framework */; }; + 15674A7C163E70370002AD61 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 15674A7B163E70370002AD61 /* CoreGraphics.framework */; }; + 15674EFF163E72EE0002AD61 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15674EFD163E72EE0002AD61 /* AppDelegate.cpp */; }; + 15674F05163E73290002AD61 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15674F02163E73290002AD61 /* AppController.mm */; }; + 15674F06163E73290002AD61 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 15674F03163E73290002AD61 /* main.m */; }; + 1567516D163E741E0002AD61 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 15675164163E741E0002AD61 /* Default-568h@2x.png */; }; + 1567516E163E741E0002AD61 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 15675165163E741E0002AD61 /* Default.png */; }; + 1567516F163E741E0002AD61 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 15675166163E741E0002AD61 /* Default@2x.png */; }; + 15675170163E741E0002AD61 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 15675167163E741E0002AD61 /* Icon-72.png */; }; + 15675171163E741E0002AD61 /* Icon-Small-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 15675168163E741E0002AD61 /* Icon-Small-50.png */; }; + 15675172163E741E0002AD61 /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = 15675169163E741E0002AD61 /* Icon-Small.png */; }; + 15675173163E741E0002AD61 /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1567516A163E741E0002AD61 /* Icon-Small@2x.png */; }; + 15675174163E741E0002AD61 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 1567516B163E741E0002AD61 /* Icon.png */; }; + 15675175163E741E0002AD61 /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1567516C163E741E0002AD61 /* Icon@2x.png */; }; + 156752A9163E78180002AD61 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 156752A8163E78180002AD61 /* RootViewController.mm */; }; + 156752BD163E7C350002AD61 /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 156752BC163E7C350002AD61 /* Icon-144.png */; }; + 156752F7163E7FC30002AD61 /* libjs_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 156752F6163E7FC30002AD61 /* libjs_static.a */; }; + 156752F9163E82D40002AD61 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 156752F8163E82D40002AD61 /* libz.dylib */; }; + 15675300163E870E0002AD61 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 156752FF163E870E0002AD61 /* libxml2.dylib */; }; + 15A3D1C11682EE23002FB0C5 /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D15C1682EE23002FB0C5 /* CDAudioManager.m */; }; + 15A3D1C21682EE23002FB0C5 /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D15F1682EE23002FB0C5 /* CDOpenALSupport.m */; }; + 15A3D1C31682EE23002FB0C5 /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D1611682EE23002FB0C5 /* CocosDenshion.m */; }; + 15A3D1C41682EE23002FB0C5 /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D1621682EE23002FB0C5 /* SimpleAudioEngine.mm */; }; + 15A3D1C51682EE23002FB0C5 /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D1641682EE23002FB0C5 /* SimpleAudioEngine_objc.m */; }; + 15A3D2C21682EE81002FB0C5 /* cocos2d_specifics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D29D1682EE81002FB0C5 /* cocos2d_specifics.cpp */; }; + 15A3D2C61682EE81002FB0C5 /* README in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D2A51682EE81002FB0C5 /* README */; }; + 15A3D2D11682EE81002FB0C5 /* js_bindings_core.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D2B91682EE81002FB0C5 /* js_bindings_core.cpp */; }; + 15A3D2D21682EE81002FB0C5 /* js_manual_conversions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D2BB1682EE81002FB0C5 /* js_manual_conversions.cpp */; }; + 15A3D2D31682EE81002FB0C5 /* ScriptingCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 15A3D2BD1682EE81002FB0C5 /* ScriptingCore.cpp */; }; + 15A3D2D61682EEC8002FB0C5 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D2D41682EEC8002FB0C5 /* res */; }; + 15A3D2D71682EEC8002FB0C5 /* src in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D2D51682EEC8002FB0C5 /* src */; }; + 15A3D2DE1682EF08002FB0C5 /* libcocos2dx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A3D0C71682EDB7002FB0C5 /* libcocos2dx.a */; }; + 15A3D2E41682EF31002FB0C5 /* main.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D2D81682EEEA002FB0C5 /* main.js */; }; + 15A3D2E51682EF31002FB0C5 /* MoonWarriors-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 15A3D2D91682EEEA002FB0C5 /* MoonWarriors-jsb.js */; }; + 1A177EB71698261C00C9AC27 /* jsb_chipmunk.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EB01698261C00C9AC27 /* jsb_chipmunk.js */; }; + 1A177EB81698261C00C9AC27 /* jsb_cocos2d.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EB11698261C00C9AC27 /* jsb_cocos2d.js */; }; + 1A177EB91698261C00C9AC27 /* jsb_cocosbuilder.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EB21698261C00C9AC27 /* jsb_cocosbuilder.js */; }; + 1A177EBA1698261C00C9AC27 /* jsb_debugger.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EB31698261C00C9AC27 /* jsb_debugger.js */; }; + 1A177EBB1698261C00C9AC27 /* jsb_opengl.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EB41698261C00C9AC27 /* jsb_opengl.js */; }; + 1A177EBC1698261C00C9AC27 /* jsb_sys.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EB51698261C00C9AC27 /* jsb_sys.js */; }; + 1A177EBD1698261C00C9AC27 /* jsb.js in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EB61698261C00C9AC27 /* jsb.js */; }; + 1A177EBE1698262E00C9AC27 /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A177EB01698261C00C9AC27 /* jsb_chipmunk.js */; }; + 1A177EBF1698262E00C9AC27 /* jsb_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A177EB11698261C00C9AC27 /* jsb_cocos2d.js */; }; + 1A177EC01698262E00C9AC27 /* jsb_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A177EB21698261C00C9AC27 /* jsb_cocosbuilder.js */; }; + 1A177EC11698262E00C9AC27 /* jsb_debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A177EB31698261C00C9AC27 /* jsb_debugger.js */; }; + 1A177EC21698262E00C9AC27 /* jsb_opengl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A177EB41698261C00C9AC27 /* jsb_opengl.js */; }; + 1A177EC31698262E00C9AC27 /* jsb_sys.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A177EB51698261C00C9AC27 /* jsb_sys.js */; }; + 1A177EC41698262E00C9AC27 /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A177EB61698261C00C9AC27 /* jsb.js */; }; + 1A177ECA1698271700C9AC27 /* js_bindings_system_functions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EC61698271700C9AC27 /* js_bindings_system_functions.cpp */; }; + 1A177ECB1698271700C9AC27 /* js_bindings_system_registration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A177EC81698271700C9AC27 /* js_bindings_system_registration.cpp */; }; + 1A82F5E7169AC86100C4B13A /* LocalStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A82F5E4169AC86100C4B13A /* LocalStorage.cpp */; }; + 1A82F5E8169AC86100C4B13A /* LocalStorageAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A82F5E6169AC86100C4B13A /* LocalStorageAndroid.cpp */; }; + 1A82F5EA169AC8DD00C4B13A /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5E9169AC8DD00C4B13A /* libsqlite3.dylib */; }; + 1AAC795F16EDC7C000B97F83 /* jsb_cocos2dx_auto_api.js in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC795C16EDC7C000B97F83 /* jsb_cocos2dx_auto_api.js */; }; + 1AAC796016EDC7C000B97F83 /* jsb_cocos2dx_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AAC795D16EDC7C000B97F83 /* jsb_cocos2dx_auto.cpp */; }; + A9706D8416A0C1FA0090A01D /* main.debug.js in Sources */ = {isa = PBXBuildFile; fileRef = A9706D8316A0C1FA0090A01D /* main.debug.js */; }; + A9706D8516A0C3830090A01D /* main.debug.js in Resources */ = {isa = PBXBuildFile; fileRef = A9706D8316A0C1FA0090A01D /* main.debug.js */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 15A3D0C61682EDB7002FB0C5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15A3D0BF1682EDB7002FB0C5 /* cocos2dx.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 1551A33F158F2AB200E66CFE; + remoteInfo = cocos2dx; + }; + 15A3D2DC1682EEFD002FB0C5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 15A3D0BF1682EDB7002FB0C5 /* cocos2dx.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 1551A33E158F2AB200E66CFE; + remoteInfo = cocos2dx; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 15674A69163E70370002AD61 /* MoonWarriors.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MoonWarriors.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 15674A6D163E70370002AD61 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 15674A6F163E70370002AD61 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + 15674A71163E70370002AD61 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 15674A73163E70370002AD61 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 15674A75163E70370002AD61 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 15674A77163E70370002AD61 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 15674A79163E70370002AD61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 15674A7B163E70370002AD61 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 15674EFD163E72EE0002AD61 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; }; + 15674EFE163E72EE0002AD61 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 15674F01163E73290002AD61 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; }; + 15674F02163E73290002AD61 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = ""; }; + 15674F03163E73290002AD61 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 15674F04163E73290002AD61 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; + 15675164163E741E0002AD61 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; + 15675165163E741E0002AD61 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; + 15675166163E741E0002AD61 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; + 15675167163E741E0002AD61 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; + 15675168163E741E0002AD61 /* Icon-Small-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small-50.png"; sourceTree = ""; }; + 15675169163E741E0002AD61 /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small.png"; sourceTree = ""; }; + 1567516A163E741E0002AD61 /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-Small@2x.png"; sourceTree = ""; }; + 1567516B163E741E0002AD61 /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; + 1567516C163E741E0002AD61 /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = ""; }; + 156752A7163E78180002AD61 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; + 156752A8163E78180002AD61 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RootViewController.mm; sourceTree = ""; }; + 156752BC163E7C350002AD61 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; + 156752F6163E7FC30002AD61 /* libjs_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjs_static.a; path = "../../../scripting/javascript/spidermonkey-ios/lib/libjs_static.a"; sourceTree = ""; }; + 156752F8163E82D40002AD61 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; + 156752FF163E870E0002AD61 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; + 15A3D0BF1682EDB7002FB0C5 /* cocos2dx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2dx.xcodeproj; path = ../../../../cocos2dx/proj.ios/cocos2dx.xcodeproj; sourceTree = ""; }; + 15A3D1581682EE23002FB0C5 /* Export.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = ""; }; + 15A3D1591682EE23002FB0C5 /* SimpleAudioEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine.h; sourceTree = ""; }; + 15A3D15B1682EE23002FB0C5 /* CDAudioManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDAudioManager.h; sourceTree = ""; }; + 15A3D15C1682EE23002FB0C5 /* CDAudioManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDAudioManager.m; sourceTree = ""; }; + 15A3D15D1682EE23002FB0C5 /* CDConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDConfig.h; sourceTree = ""; }; + 15A3D15E1682EE23002FB0C5 /* CDOpenALSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDOpenALSupport.h; sourceTree = ""; }; + 15A3D15F1682EE23002FB0C5 /* CDOpenALSupport.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDOpenALSupport.m; sourceTree = ""; }; + 15A3D1601682EE23002FB0C5 /* CocosDenshion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CocosDenshion.h; sourceTree = ""; }; + 15A3D1611682EE23002FB0C5 /* CocosDenshion.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CocosDenshion.m; sourceTree = ""; }; + 15A3D1621682EE23002FB0C5 /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = ""; }; + 15A3D1631682EE23002FB0C5 /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = ""; }; + 15A3D1641682EE23002FB0C5 /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = ""; }; + 15A3D21D1682EE48002FB0C5 /* cocos-ext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cocos-ext.h"; sourceTree = ""; }; + 15A3D21E1682EE48002FB0C5 /* ExtensionMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtensionMacros.h; sourceTree = ""; }; + 15A3D29D1682EE81002FB0C5 /* cocos2d_specifics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cocos2d_specifics.cpp; sourceTree = ""; }; + 15A3D29E1682EE81002FB0C5 /* cocos2d_specifics.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = cocos2d_specifics.hpp; sourceTree = ""; }; + 15A3D2A51682EE81002FB0C5 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = ""; }; + 15A3D2B81682EE81002FB0C5 /* js_bindings_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_config.h; sourceTree = ""; }; + 15A3D2B91682EE81002FB0C5 /* js_bindings_core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_core.cpp; sourceTree = ""; }; + 15A3D2BA1682EE81002FB0C5 /* js_bindings_core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_core.h; sourceTree = ""; }; + 15A3D2BB1682EE81002FB0C5 /* js_manual_conversions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_manual_conversions.cpp; sourceTree = ""; }; + 15A3D2BC1682EE81002FB0C5 /* js_manual_conversions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_manual_conversions.h; sourceTree = ""; }; + 15A3D2BD1682EE81002FB0C5 /* ScriptingCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptingCore.cpp; sourceTree = ""; }; + 15A3D2BE1682EE81002FB0C5 /* ScriptingCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptingCore.h; sourceTree = ""; }; + 15A3D2BF1682EE81002FB0C5 /* spidermonkey_specifics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = spidermonkey_specifics.h; sourceTree = ""; }; + 15A3D2C01682EE81002FB0C5 /* uthash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = uthash.h; sourceTree = ""; }; + 15A3D2D41682EEC8002FB0C5 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../../Shared/games/MoonWarriors/res; sourceTree = ""; }; + 15A3D2D51682EEC8002FB0C5 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../../Shared/games/MoonWarriors/src; sourceTree = ""; }; + 15A3D2D81682EEEA002FB0C5 /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../../Shared/games/MoonWarriors/main.js; sourceTree = ""; }; + 15A3D2D91682EEEA002FB0C5 /* MoonWarriors-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "MoonWarriors-jsb.js"; path = "../../Shared/games/MoonWarriors/MoonWarriors-jsb.js"; sourceTree = ""; }; + 1A177EB01698261C00C9AC27 /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_chipmunk.js; sourceTree = ""; }; + 1A177EB11698261C00C9AC27 /* jsb_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocos2d.js; sourceTree = ""; }; + 1A177EB21698261C00C9AC27 /* jsb_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocosbuilder.js; sourceTree = ""; }; + 1A177EB31698261C00C9AC27 /* jsb_debugger.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_debugger.js; sourceTree = ""; }; + 1A177EB41698261C00C9AC27 /* jsb_opengl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_opengl.js; sourceTree = ""; }; + 1A177EB51698261C00C9AC27 /* jsb_sys.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_sys.js; sourceTree = ""; }; + 1A177EB61698261C00C9AC27 /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb.js; sourceTree = ""; }; + 1A177EC51698271700C9AC27 /* js_bindings_system_functions_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_system_functions_registration.h; sourceTree = ""; }; + 1A177EC61698271700C9AC27 /* js_bindings_system_functions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_system_functions.cpp; sourceTree = ""; }; + 1A177EC71698271700C9AC27 /* js_bindings_system_functions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_system_functions.h; sourceTree = ""; }; + 1A177EC81698271700C9AC27 /* js_bindings_system_registration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = js_bindings_system_registration.cpp; sourceTree = ""; }; + 1A177EC91698271700C9AC27 /* js_bindings_system_registration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_system_registration.h; sourceTree = ""; }; + 1A82F5E4169AC86100C4B13A /* LocalStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorage.cpp; sourceTree = ""; }; + 1A82F5E5169AC86100C4B13A /* LocalStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalStorage.h; sourceTree = ""; }; + 1A82F5E6169AC86100C4B13A /* LocalStorageAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocalStorageAndroid.cpp; sourceTree = ""; }; + 1A82F5E9169AC8DD00C4B13A /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + 1AAC795C16EDC7C000B97F83 /* jsb_cocos2dx_auto_api.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = jsb_cocos2dx_auto_api.js; sourceTree = ""; }; + 1AAC795D16EDC7C000B97F83 /* jsb_cocos2dx_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_auto.cpp; sourceTree = ""; }; + 1AAC795E16EDC7C000B97F83 /* jsb_cocos2dx_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_auto.hpp; sourceTree = ""; }; + A9706D8316A0C1FA0090A01D /* main.debug.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = main.debug.js; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 15674A66163E70370002AD61 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A82F5EA169AC8DD00C4B13A /* libsqlite3.dylib in Frameworks */, + 15A3D2DE1682EF08002FB0C5 /* libcocos2dx.a in Frameworks */, + 15675300163E870E0002AD61 /* libxml2.dylib in Frameworks */, + 156752F9163E82D40002AD61 /* libz.dylib in Frameworks */, + 156752F7163E7FC30002AD61 /* libjs_static.a in Frameworks */, + 15674A6E163E70370002AD61 /* QuartzCore.framework in Frameworks */, + 15674A70163E70370002AD61 /* OpenGLES.framework in Frameworks */, + 15674A72163E70370002AD61 /* OpenAL.framework in Frameworks */, + 15674A74163E70370002AD61 /* AudioToolbox.framework in Frameworks */, + 15674A76163E70370002AD61 /* AVFoundation.framework in Frameworks */, + 15674A78163E70370002AD61 /* UIKit.framework in Frameworks */, + 15674A7A163E70370002AD61 /* Foundation.framework in Frameworks */, + 15674A7C163E70370002AD61 /* CoreGraphics.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 15674A5E163E70370002AD61 = { + isa = PBXGroup; + children = ( + 15A3D0BF1682EDB7002FB0C5 /* cocos2dx.xcodeproj */, + 15A3D29B1682EE81002FB0C5 /* bindings */, + 15674EFC163E72EE0002AD61 /* Classes */, + 15A3D1411682EE23002FB0C5 /* CocosDenshion */, + 15A3D1E61682EE48002FB0C5 /* extensions */, + 15674A6C163E70370002AD61 /* Frameworks */, + 15674F00163E730E0002AD61 /* ios */, + 15674A6A163E70370002AD61 /* Products */, + 15675123163E73F40002AD61 /* Resources */, + ); + sourceTree = ""; + }; + 15674A6A163E70370002AD61 /* Products */ = { + isa = PBXGroup; + children = ( + 15674A69163E70370002AD61 /* MoonWarriors.app */, + ); + name = Products; + sourceTree = ""; + }; + 15674A6C163E70370002AD61 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1A82F5E9169AC8DD00C4B13A /* libsqlite3.dylib */, + 156752FF163E870E0002AD61 /* libxml2.dylib */, + 156752F8163E82D40002AD61 /* libz.dylib */, + 156752F6163E7FC30002AD61 /* libjs_static.a */, + 15674A6D163E70370002AD61 /* QuartzCore.framework */, + 15674A6F163E70370002AD61 /* OpenGLES.framework */, + 15674A71163E70370002AD61 /* OpenAL.framework */, + 15674A73163E70370002AD61 /* AudioToolbox.framework */, + 15674A75163E70370002AD61 /* AVFoundation.framework */, + 15674A77163E70370002AD61 /* UIKit.framework */, + 15674A79163E70370002AD61 /* Foundation.framework */, + 15674A7B163E70370002AD61 /* CoreGraphics.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 15674EFC163E72EE0002AD61 /* Classes */ = { + isa = PBXGroup; + children = ( + 15674EFD163E72EE0002AD61 /* AppDelegate.cpp */, + 15674EFE163E72EE0002AD61 /* AppDelegate.h */, + ); + name = Classes; + path = ../Classes; + sourceTree = ""; + }; + 15674F00163E730E0002AD61 /* ios */ = { + isa = PBXGroup; + children = ( + 156752A7163E78180002AD61 /* RootViewController.h */, + 156752A8163E78180002AD61 /* RootViewController.mm */, + 15674F01163E73290002AD61 /* AppController.h */, + 15674F02163E73290002AD61 /* AppController.mm */, + 15674F03163E73290002AD61 /* main.m */, + 15674F04163E73290002AD61 /* Prefix.pch */, + ); + name = ios; + sourceTree = ""; + }; + 15675123163E73F40002AD61 /* Resources */ = { + isa = PBXGroup; + children = ( + 15A3D2D81682EEEA002FB0C5 /* main.js */, + 15A3D2D91682EEEA002FB0C5 /* MoonWarriors-jsb.js */, + 15A3D2D41682EEC8002FB0C5 /* res */, + 15A3D2D51682EEC8002FB0C5 /* src */, + 15675164163E741E0002AD61 /* Default-568h@2x.png */, + 15675165163E741E0002AD61 /* Default.png */, + 15675166163E741E0002AD61 /* Default@2x.png */, + 156752BC163E7C350002AD61 /* Icon-144.png */, + 15675167163E741E0002AD61 /* Icon-72.png */, + 15675168163E741E0002AD61 /* Icon-Small-50.png */, + 15675169163E741E0002AD61 /* Icon-Small.png */, + 1567516A163E741E0002AD61 /* Icon-Small@2x.png */, + 1567516B163E741E0002AD61 /* Icon.png */, + 1567516C163E741E0002AD61 /* Icon@2x.png */, + ); + name = Resources; + sourceTree = ""; + }; + 15A3D0C01682EDB7002FB0C5 /* Products */ = { + isa = PBXGroup; + children = ( + 15A3D0C71682EDB7002FB0C5 /* libcocos2dx.a */, + ); + name = Products; + sourceTree = ""; + }; + 15A3D1411682EE23002FB0C5 /* CocosDenshion */ = { + isa = PBXGroup; + children = ( + 15A3D1571682EE23002FB0C5 /* include */, + 15A3D15A1682EE23002FB0C5 /* ios */, + ); + name = CocosDenshion; + path = ../../../../CocosDenshion; + sourceTree = ""; + }; + 15A3D1571682EE23002FB0C5 /* include */ = { + isa = PBXGroup; + children = ( + 15A3D1581682EE23002FB0C5 /* Export.h */, + 15A3D1591682EE23002FB0C5 /* SimpleAudioEngine.h */, + ); + path = include; + sourceTree = ""; + }; + 15A3D15A1682EE23002FB0C5 /* ios */ = { + isa = PBXGroup; + children = ( + 15A3D15B1682EE23002FB0C5 /* CDAudioManager.h */, + 15A3D15C1682EE23002FB0C5 /* CDAudioManager.m */, + 15A3D15D1682EE23002FB0C5 /* CDConfig.h */, + 15A3D15E1682EE23002FB0C5 /* CDOpenALSupport.h */, + 15A3D15F1682EE23002FB0C5 /* CDOpenALSupport.m */, + 15A3D1601682EE23002FB0C5 /* CocosDenshion.h */, + 15A3D1611682EE23002FB0C5 /* CocosDenshion.m */, + 15A3D1621682EE23002FB0C5 /* SimpleAudioEngine.mm */, + 15A3D1631682EE23002FB0C5 /* SimpleAudioEngine_objc.h */, + 15A3D1641682EE23002FB0C5 /* SimpleAudioEngine_objc.m */, + ); + path = ios; + sourceTree = ""; + }; + 15A3D1E61682EE48002FB0C5 /* extensions */ = { + isa = PBXGroup; + children = ( + 1A82F5E3169AC86100C4B13A /* LocalStorage */, + 15A3D21D1682EE48002FB0C5 /* cocos-ext.h */, + 15A3D21E1682EE48002FB0C5 /* ExtensionMacros.h */, + ); + name = extensions; + path = ../../../../extensions; + sourceTree = ""; + }; + 15A3D29B1682EE81002FB0C5 /* bindings */ = { + isa = PBXGroup; + children = ( + 15A3D29D1682EE81002FB0C5 /* cocos2d_specifics.cpp */, + 15A3D29E1682EE81002FB0C5 /* cocos2d_specifics.hpp */, + 15A3D2A11682EE81002FB0C5 /* generated */, + 15A3D2A61682EE81002FB0C5 /* js */, + 15A3D2B81682EE81002FB0C5 /* js_bindings_config.h */, + 15A3D2B91682EE81002FB0C5 /* js_bindings_core.cpp */, + 15A3D2BA1682EE81002FB0C5 /* js_bindings_core.h */, + 1A177EC61698271700C9AC27 /* js_bindings_system_functions.cpp */, + 1A177EC71698271700C9AC27 /* js_bindings_system_functions.h */, + 1A177EC51698271700C9AC27 /* js_bindings_system_functions_registration.h */, + 1A177EC81698271700C9AC27 /* js_bindings_system_registration.cpp */, + 1A177EC91698271700C9AC27 /* js_bindings_system_registration.h */, + 15A3D2BB1682EE81002FB0C5 /* js_manual_conversions.cpp */, + 15A3D2BC1682EE81002FB0C5 /* js_manual_conversions.h */, + 15A3D2BD1682EE81002FB0C5 /* ScriptingCore.cpp */, + 15A3D2BE1682EE81002FB0C5 /* ScriptingCore.h */, + 15A3D2BF1682EE81002FB0C5 /* spidermonkey_specifics.h */, + 15A3D2C01682EE81002FB0C5 /* uthash.h */, + ); + name = bindings; + path = ../../../../scripting/javascript/bindings; + sourceTree = ""; + }; + 15A3D2A11682EE81002FB0C5 /* generated */ = { + isa = PBXGroup; + children = ( + 1AAC795C16EDC7C000B97F83 /* jsb_cocos2dx_auto_api.js */, + 1AAC795D16EDC7C000B97F83 /* jsb_cocos2dx_auto.cpp */, + 1AAC795E16EDC7C000B97F83 /* jsb_cocos2dx_auto.hpp */, + 15A3D2A51682EE81002FB0C5 /* README */, + ); + path = generated; + sourceTree = ""; + }; + 15A3D2A61682EE81002FB0C5 /* js */ = { + isa = PBXGroup; + children = ( + A9706D8316A0C1FA0090A01D /* main.debug.js */, + 1A177EB01698261C00C9AC27 /* jsb_chipmunk.js */, + 1A177EB11698261C00C9AC27 /* jsb_cocos2d.js */, + 1A177EB21698261C00C9AC27 /* jsb_cocosbuilder.js */, + 1A177EB31698261C00C9AC27 /* jsb_debugger.js */, + 1A177EB41698261C00C9AC27 /* jsb_opengl.js */, + 1A177EB51698261C00C9AC27 /* jsb_sys.js */, + 1A177EB61698261C00C9AC27 /* jsb.js */, + ); + path = js; + sourceTree = ""; + }; + 1A82F5E3169AC86100C4B13A /* LocalStorage */ = { + isa = PBXGroup; + children = ( + 1A82F5E4169AC86100C4B13A /* LocalStorage.cpp */, + 1A82F5E5169AC86100C4B13A /* LocalStorage.h */, + 1A82F5E6169AC86100C4B13A /* LocalStorageAndroid.cpp */, + ); + path = LocalStorage; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 15674A68163E70370002AD61 /* MoonWarriors */ = { + isa = PBXNativeTarget; + buildConfigurationList = 15674E3B163E70430002AD61 /* Build configuration list for PBXNativeTarget "MoonWarriors" */; + buildPhases = ( + 15674A65163E70370002AD61 /* Sources */, + 15674A66163E70370002AD61 /* Frameworks */, + 15674A67163E70370002AD61 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 15A3D2DD1682EEFD002FB0C5 /* PBXTargetDependency */, + ); + name = MoonWarriors; + productName = MoonWarriors; + productReference = 15674A69163E70370002AD61 /* MoonWarriors.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 15674A60163E70370002AD61 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0450; + }; + buildConfigurationList = 15674A63163E70370002AD61 /* Build configuration list for PBXProject "MoonWarriors" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 15674A5E163E70370002AD61; + productRefGroup = 15674A6A163E70370002AD61 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 15A3D0C01682EDB7002FB0C5 /* Products */; + ProjectRef = 15A3D0BF1682EDB7002FB0C5 /* cocos2dx.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 15674A68163E70370002AD61 /* MoonWarriors */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 15A3D0C71682EDB7002FB0C5 /* libcocos2dx.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libcocos2dx.a; + remoteRef = 15A3D0C61682EDB7002FB0C5 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 15674A67163E70370002AD61 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1A177EBE1698262E00C9AC27 /* jsb_chipmunk.js in Resources */, + 1A177EBF1698262E00C9AC27 /* jsb_cocos2d.js in Resources */, + 1A177EC01698262E00C9AC27 /* jsb_cocosbuilder.js in Resources */, + 1A177EC11698262E00C9AC27 /* jsb_debugger.js in Resources */, + 1A177EC21698262E00C9AC27 /* jsb_opengl.js in Resources */, + 1A177EC31698262E00C9AC27 /* jsb_sys.js in Resources */, + 1A177EC41698262E00C9AC27 /* jsb.js in Resources */, + 15A3D2E41682EF31002FB0C5 /* main.js in Resources */, + A9706D8516A0C3830090A01D /* main.debug.js in Resources */, + 15A3D2E51682EF31002FB0C5 /* MoonWarriors-jsb.js in Resources */, + 1567516D163E741E0002AD61 /* Default-568h@2x.png in Resources */, + 1567516E163E741E0002AD61 /* Default.png in Resources */, + 1567516F163E741E0002AD61 /* Default@2x.png in Resources */, + 15675170163E741E0002AD61 /* Icon-72.png in Resources */, + 15675171163E741E0002AD61 /* Icon-Small-50.png in Resources */, + 15675172163E741E0002AD61 /* Icon-Small.png in Resources */, + 15675173163E741E0002AD61 /* Icon-Small@2x.png in Resources */, + 15675174163E741E0002AD61 /* Icon.png in Resources */, + 15675175163E741E0002AD61 /* Icon@2x.png in Resources */, + 156752BD163E7C350002AD61 /* Icon-144.png in Resources */, + 15A3D2C61682EE81002FB0C5 /* README in Resources */, + 15A3D2D61682EEC8002FB0C5 /* res in Resources */, + 15A3D2D71682EEC8002FB0C5 /* src in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 15674A65163E70370002AD61 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 15674EFF163E72EE0002AD61 /* AppDelegate.cpp in Sources */, + 15674F05163E73290002AD61 /* AppController.mm in Sources */, + 15674F06163E73290002AD61 /* main.m in Sources */, + 156752A9163E78180002AD61 /* RootViewController.mm in Sources */, + 15A3D1C11682EE23002FB0C5 /* CDAudioManager.m in Sources */, + 15A3D1C21682EE23002FB0C5 /* CDOpenALSupport.m in Sources */, + 15A3D1C31682EE23002FB0C5 /* CocosDenshion.m in Sources */, + 15A3D1C41682EE23002FB0C5 /* SimpleAudioEngine.mm in Sources */, + 15A3D1C51682EE23002FB0C5 /* SimpleAudioEngine_objc.m in Sources */, + 15A3D2C21682EE81002FB0C5 /* cocos2d_specifics.cpp in Sources */, + 15A3D2D11682EE81002FB0C5 /* js_bindings_core.cpp in Sources */, + 15A3D2D21682EE81002FB0C5 /* js_manual_conversions.cpp in Sources */, + 15A3D2D31682EE81002FB0C5 /* ScriptingCore.cpp in Sources */, + 1A177EB71698261C00C9AC27 /* jsb_chipmunk.js in Sources */, + 1A177EB81698261C00C9AC27 /* jsb_cocos2d.js in Sources */, + 1A177EB91698261C00C9AC27 /* jsb_cocosbuilder.js in Sources */, + 1A177EBA1698261C00C9AC27 /* jsb_debugger.js in Sources */, + 1A177EBB1698261C00C9AC27 /* jsb_opengl.js in Sources */, + 1A177EBC1698261C00C9AC27 /* jsb_sys.js in Sources */, + 1A177EBD1698261C00C9AC27 /* jsb.js in Sources */, + 1A177ECA1698271700C9AC27 /* js_bindings_system_functions.cpp in Sources */, + 1A177ECB1698271700C9AC27 /* js_bindings_system_registration.cpp in Sources */, + 1A82F5E7169AC86100C4B13A /* LocalStorage.cpp in Sources */, + 1A82F5E8169AC86100C4B13A /* LocalStorageAndroid.cpp in Sources */, + A9706D8416A0C1FA0090A01D /* main.debug.js in Sources */, + 1AAC795F16EDC7C000B97F83 /* jsb_cocos2dx_auto_api.js in Sources */, + 1AAC796016EDC7C000B97F83 /* jsb_cocos2dx_auto.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 15A3D2DD1682EEFD002FB0C5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = cocos2dx; + targetProxy = 15A3D2DC1682EEFD002FB0C5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 15674E39163E70430002AD61 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + DEBUG, + "COCOS2D_DEBUG=1", + USE_FILE32API, + TARGET_OS_IPHONE, + COCOS2D_JAVASCRIPT, + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(PROJECT_NAME)/libs/cocos2dx/kazmath/include\"", + "\"$(PROJECT_NAME)/libs/cocos2dx\"", + "\"$(PROJECT_NAME)/libs/CocosDenshion/include\"", + "\"$(SDKROOT)/usr/include/libxml2\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/include\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/platform/third_party/ios\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/platform/ios\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 15674E3A163E70430002AD61 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT)"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + NDEBUG, + USE_FILE32API, + TARGET_OS_IPHONE, + COCOS2D_JAVASCRIPT, + ); + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(PROJECT_NAME)/libs/cocos2dx/kazmath/include\"", + "\"$(PROJECT_NAME)/libs/cocos2dx\"", + "\"$(PROJECT_NAME)/libs/CocosDenshion/include\"", + "\"$(SDKROOT)/usr/include/libxml2\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/include\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/platform/third_party/ios\"", + "\"$(PROJECT_NAME)/libs/cocos2dx/platform/ios\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; + SDKROOT = iphoneos; + }; + name = Release; + }; + 15674E3C163E70430002AD61 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 1; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + DEBUG, + "COCOS2D_DEBUG=1", + USE_FILE32API, + CC_TARGET_OS_IPHONE, + COCOS2D_JAVASCRIPT, + CC_ENABLE_CHIPMUNK_INTEGRATION, + ); + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../cocos2dx/kazmath/include\"", + "\"$(SRCROOT)/../../../../cocos2dx\"", + "\"$(SRCROOT)/../../../../CocosDenshion/include\"", + "\"$(SRCROOT)/usr/include/libxml2\"", + "\"$(SRCROOT)/../../../../cocos2dx/include\"", + "\"$(SRCROOT)/../../../../cocos2dx/platform/third_party/ios\"", + "\"$(SRCROOT)/../../../../cocos2dx/platform/ios\"", + "$(SRCROOT)/../../../../scripting/javascript/spidermonkey-ios/include", + "$(SRCROOT)/../../../../scripting/javascript/bindings", + "$(SRCROOT)/../../../../external/chipmunk/include/**", + ); + INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../../scripting/javascript/spidermonkey-ios/lib\"", + ); + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + VALID_ARCHS = "armv7 armv7s"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 15674E3D163E70430002AD61 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + NDEBUG, + USE_FILE32API, + CC_TARGET_OS_IPHONE, + COCOS2D_JAVASCRIPT, + CC_ENABLE_CHIPMUNK_INTEGRATION, + ); + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../cocos2dx/kazmath/include\"", + "\"$(SRCROOT)/../../../../cocos2dx\"", + "\"$(SRCROOT)/../../../../CocosDenshion/include\"", + "\"$(SRCROOT)/usr/include/libxml2\"", + "\"$(SRCROOT)/../../../../cocos2dx/include\"", + "\"$(SRCROOT)/../../../../cocos2dx/platform/third_party/ios\"", + "\"$(SRCROOT)/../../../../cocos2dx/platform/ios\"", + "$(SRCROOT)/../../../../scripting/javascript/spidermonkey-ios/include", + "$(SRCROOT)/../../../../scripting/javascript/bindings", + "$(SRCROOT)/../../../../external/chipmunk/include/**", + ); + INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 4.3; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../../../scripting/javascript/spidermonkey-ios/lib\"", + ); + OTHER_LDFLAGS = ""; + PRODUCT_NAME = "$(TARGET_NAME)"; + PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; + TARGETED_DEVICE_FAMILY = "1,2"; + USER_HEADER_SEARCH_PATHS = ""; + VALIDATE_PRODUCT = YES; + VALID_ARCHS = "armv7 armv7s"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 15674A63163E70370002AD61 /* Build configuration list for PBXProject "MoonWarriors" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15674E39163E70430002AD61 /* Debug */, + 15674E3A163E70430002AD61 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 15674E3B163E70430002AD61 /* Build configuration list for PBXNativeTarget "MoonWarriors" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 15674E3C163E70430002AD61 /* Debug */, + 15674E3D163E70430002AD61 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 15674A60163E70370002AD61 /* Project object */; +} diff --git a/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj.REMOVED.git-id deleted file mode 100644 index 1f46329ed7..0000000000 --- a/samples/Javascript/MoonWarriors/proj.ios/MoonWarriors.xcodeproj/project.pbxproj.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -c29148da456b0a1eb38816bf26c68ba21fa50ab7 \ No newline at end of file diff --git a/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp b/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp index 01a94291ef..ab228a448e 100644 --- a/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp +++ b/samples/Javascript/TestJavascript/Classes/AppDelegate.cpp @@ -3,7 +3,9 @@ #include "cocos2d.h" #include "SimpleAudioEngine.h" #include "ScriptingCore.h" -#include "generated/cocos2dx.hpp" +#include "generated/jsb_cocos2dx_auto.hpp" +#include "generated/jsb_cocos2dx_extension_auto.hpp" +#include "jsb_cocos2dx_extension_manual.h" #include "cocos2d_specifics.hpp" #include "js_bindings_chipmunk_registration.h" #include "js_bindings_system_registration.h" @@ -34,7 +36,9 @@ bool AppDelegate::applicationDidFinishLaunching() ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); + sc->addRegisterCallback(register_all_cocos2dx_extension); sc->addRegisterCallback(register_cocos2dx_js_extensions); + sc->addRegisterCallback(register_all_cocos2dx_extension_manual); sc->addRegisterCallback(jsb_register_chipmunk); sc->addRegisterCallback(jsb_register_system); diff --git a/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj.REMOVED.git-id index 54b572755c..4f2e19f60d 100644 --- a/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/Javascript/TestJavascript/proj.ios/TestJavascript.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -b5f704f01d19ceb56728e6f0569321dfe418cb5d \ No newline at end of file +ac9538f501938e68d78bc40af5feebd3e50d0730 \ No newline at end of file diff --git a/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp b/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp index c2a8775505..00ac253dec 100644 --- a/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp +++ b/samples/Javascript/WatermelonWithMe/Classes/AppDelegate.cpp @@ -3,7 +3,9 @@ #include "cocos2d.h" #include "SimpleAudioEngine.h" #include "ScriptingCore.h" -#include "generated/cocos2dx.hpp" +#include "generated/jsb_cocos2dx_auto.hpp" +#include "generated/jsb_cocos2dx_extension_auto.hpp" +#include "jsb_cocos2dx_extension_manual.h" #include "cocos2d_specifics.hpp" #include "js_bindings_chipmunk_registration.h" #include "js_bindings_ccbreader.h" @@ -35,6 +37,8 @@ bool AppDelegate::applicationDidFinishLaunching() ScriptingCore* sc = ScriptingCore::getInstance(); sc->addRegisterCallback(register_all_cocos2dx); + sc->addRegisterCallback(register_all_cocos2dx_extension); + sc->addRegisterCallback(register_all_cocos2dx_extension_manual); sc->addRegisterCallback(register_cocos2dx_js_extensions); sc->addRegisterCallback(jsb_register_chipmunk); sc->addRegisterCallback(register_CCBuilderReader); diff --git a/samples/Javascript/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/Javascript/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj.REMOVED.git-id index 1e8bca7e0c..ae3fd2127b 100644 --- a/samples/Javascript/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/Javascript/WatermelonWithMe/proj.ios/WatermelonWithMe.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -256ff6e456360f571ae24d610f20eaf087c174b9 \ No newline at end of file +d4c0a2ec4ee124a03aabebf924deab3229c33d89 \ No newline at end of file diff --git a/scripting/javascript/bindings/Android.mk b/scripting/javascript/bindings/Android.mk index 7e4dad6067..b2ebbc38b0 100644 --- a/scripting/javascript/bindings/Android.mk +++ b/scripting/javascript/bindings/Android.mk @@ -8,6 +8,7 @@ LOCAL_MODULE_FILENAME := libscriptingcore-spidermonkey LOCAL_SRC_FILES := ScriptingCore.cpp \ cocos2d_specifics.cpp \ + jsb_cocos2dx_extension_manual.cpp \ js_manual_conversions.cpp \ cocosjs_manual_conversions.cpp \ js_bindings_chipmunk_manual.cpp \ @@ -18,7 +19,8 @@ LOCAL_SRC_FILES := ScriptingCore.cpp \ js_bindings_system_registration.cpp \ js_bindings_ccbreader.cpp \ js_bindings_core.cpp \ - generated/cocos2dx.cpp + generated/jsb_cocos2dx_auto.cpp \ + generated/jsb_cocos2dx_extension_auto.cpp LOCAL_CFLAGS := -DCOCOS2D_JAVASCRIPT diff --git a/scripting/javascript/bindings/cocos2d_specifics.cpp b/scripting/javascript/bindings/cocos2d_specifics.cpp new file mode 100644 index 0000000000..116c8c5765 --- /dev/null +++ b/scripting/javascript/bindings/cocos2d_specifics.cpp @@ -0,0 +1,2790 @@ +#include "cocos2d.h" +#include "cocos-ext.h" +#include "cocos2d_specifics.hpp" +#include +#include "js_bindings_config.h" +#include "generated/jsb_cocos2dx_auto.hpp" + +USING_NS_CC_EXT; + +schedFunc_proxy_t *_schedFunc_target_ht = NULL; +schedTarget_proxy_t *_schedTarget_native_ht = NULL; +callfuncTarget_proxy_t *_callfuncTarget_native_ht = NULL; + +JSTouchDelegate::TouchDelegateMap JSTouchDelegate::sTouchDelegateMap; + +void JSTouchDelegate::setDelegateForJSObject(JSObject* pJSObj, JSTouchDelegate* pDelegate) +{ + CCAssert(sTouchDelegateMap.find(pJSObj) == sTouchDelegateMap.end(), ""); + sTouchDelegateMap.insert(TouchDelegatePair(pJSObj, pDelegate)); +} + +JSTouchDelegate* JSTouchDelegate::getDelegateForJSObject(JSObject* pJSObj) +{ + JSTouchDelegate* pRet = NULL; + TouchDelegateMap::iterator iter = sTouchDelegateMap.find(pJSObj); + if (iter != sTouchDelegateMap.end()) + { + pRet = iter->second; + } + return pRet; +} + +void JSTouchDelegate::removeDelegateForJSObject(JSObject* pJSObj) +{ + TouchDelegateMap::iterator iter = sTouchDelegateMap.find(pJSObj); + CCAssert(iter != sTouchDelegateMap.end(), ""); + sTouchDelegateMap.erase(pJSObj); +} + +void JSTouchDelegate::setJSObject(JSObject *obj) { + _mObj = obj; +} + +void JSTouchDelegate::registerStandardDelegate() { + CCDirector* pDirector = CCDirector::sharedDirector(); + pDirector->getTouchDispatcher()->addStandardDelegate(this,0); +} + +void JSTouchDelegate::registerTargettedDelegate(int priority, bool swallowsTouches) { + CCDirector* pDirector = CCDirector::sharedDirector(); + pDirector->getTouchDispatcher()->addTargetedDelegate(this, + priority, + swallowsTouches); + +} + +void JSTouchDelegate::unregisterTouchDelegate() +{ + CCDirector* pDirector = CCDirector::sharedDirector(); + pDirector->getTouchDispatcher()->removeDelegate(this); +} + +bool JSTouchDelegate::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent) { + CC_UNUSED_PARAM(pEvent); + jsval retval; + bool bRet = false; + + js_proxy_t* p = NULL; + JS_GET_NATIVE_PROXY(p, _mObj); + CCAssert(p, "js object has been unrooted."); + + ScriptingCore::getInstance()->executeCustomTouchEvent(CCTOUCHBEGAN, + pTouch, _mObj, retval); + if(JSVAL_IS_BOOLEAN(retval)) { + bRet = JSVAL_TO_BOOLEAN(retval); + } + + return bRet; +}; +// optional + +void JSTouchDelegate::ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) { + CC_UNUSED_PARAM(pEvent); + + //jsval retval; + js_proxy_t* p = NULL; + JS_GET_NATIVE_PROXY(p, _mObj); + CCAssert(p, "js object has been unrooted."); + + ScriptingCore::getInstance()->executeCustomTouchEvent(CCTOUCHMOVED, + pTouch, _mObj); +} + +void JSTouchDelegate::ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) { + CC_UNUSED_PARAM(pEvent); + + js_proxy_t* p = NULL; + JS_GET_NATIVE_PROXY(p, _mObj); + CCAssert(p, "js object has been unrooted."); + + ScriptingCore::getInstance()->executeCustomTouchEvent(CCTOUCHENDED, + pTouch, _mObj); +} + +void JSTouchDelegate::ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent) { + CC_UNUSED_PARAM(pEvent); + js_proxy_t* p = NULL; + JS_GET_NATIVE_PROXY(p, _mObj); + CCAssert(p, "js object has been unrooted."); + + ScriptingCore::getInstance()->executeCustomTouchEvent(CCTOUCHCANCELLED, + pTouch, _mObj); +} + +// optional +void JSTouchDelegate::ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent) { + CC_UNUSED_PARAM(pEvent); + ScriptingCore::getInstance()->executeCustomTouchesEvent(CCTOUCHBEGAN, + pTouches, _mObj); +} + +void JSTouchDelegate::ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent) { + CC_UNUSED_PARAM(pEvent); + ScriptingCore::getInstance()->executeCustomTouchesEvent(CCTOUCHMOVED, + pTouches, _mObj); +} +void JSTouchDelegate::ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent) { + CC_UNUSED_PARAM(pEvent); + ScriptingCore::getInstance()->executeCustomTouchesEvent(CCTOUCHENDED, + pTouches, _mObj); +} +void JSTouchDelegate::ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent) { + CC_UNUSED_PARAM(pEvent); + ScriptingCore::getInstance()->executeCustomTouchesEvent(CCTOUCHCANCELLED, + pTouches, _mObj); +} + +static void addCallBackAndThis(JSObject *obj, jsval callback, jsval &thisObj) { + if(callback != JSVAL_VOID) { + ScriptingCore::getInstance()->setReservedSpot(0, obj, callback); + } + if(thisObj != JSVAL_VOID) { + ScriptingCore::getInstance()->setReservedSpot(1, obj, thisObj); + } +} + +template +JSObject* bind_menu_item(JSContext *cx, T* nativeObj, jsval callback, jsval thisObj) { + js_proxy_t *p; + JS_GET_PROXY(p, nativeObj); + if (p) { + addCallBackAndThis(p->obj, callback, thisObj); + return p->obj; + } else { + js_type_class_t *classType = js_get_type_from_native(nativeObj); + assert(classType); + JSObject *tmp = JS_NewObject(cx, classType->jsclass, classType->proto, classType->parentProto); + + // bind nativeObj <-> JSObject + js_proxy_t *proxy; + JS_NEW_PROXY(proxy, nativeObj, tmp); + JS_AddNamedObjectRoot(cx, &proxy->obj, typeid(*nativeObj).name()); + addCallBackAndThis(tmp, callback, thisObj); + + return tmp; + } +} + +JSBool js_cocos2dx_CCNode_getChildren(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *thisObj = JS_THIS_OBJECT(cx, vp); + if (thisObj) { + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, thisObj); + if (proxy) { + cocos2d::CCNode *node = (cocos2d::CCNode *)(proxy->ptr ? proxy->ptr : NULL); + cocos2d::CCArray *children = node->getChildren(); + unsigned int count = children ? children->count() : 0; + JSObject *jsarr = JS_NewArrayObject(cx, count, NULL); + + for (unsigned int i=0; i < count; i++) { + cocos2d::CCNode *child = (cocos2d::CCNode*)children->objectAtIndex(i); + js_proxy_t *childProxy = js_get_or_create_proxy(cx, child); + jsval childVal = OBJECT_TO_JSVAL(childProxy->obj); + JS_SetElement(cx, jsarr, i, &childVal); + } + + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(jsarr)); + return JS_TRUE; + } + } + JS_ReportError(cx, "Error in js_cocos2dx_CCNode_getChildren"); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCMenu_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + if (argc > 0) { + cocos2d::CCArray* array = cocos2d::CCArray::create(); + uint32_t i = 0; + while (i < argc) { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[i]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + cocos2d::CCObject *item = (cocos2d::CCObject*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, item) + array->addObject(item); + i++; + } + cocos2d::CCMenu* ret = cocos2d::CCMenu::createWithArray(array); + jsval jsret; + do { + if (ret) { + js_proxy_t *p; + JS_GET_PROXY(p, ret); + if (p) { + jsret = OBJECT_TO_JSVAL(p->obj); + } else { + // create a new js obj of that class + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + if (argc == 0) { + cocos2d::CCMenu* ret = cocos2d::CCMenu::create(); + jsval jsret; + do { + if (ret) { + js_proxy_t *p; + JS_GET_PROXY(p, ret); + if (p) { + jsret = OBJECT_TO_JSVAL(p->obj); + } else { + // create a new js obj of that class + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCSequence_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + if (argc > 0) { + cocos2d::CCArray* array = cocos2d::CCArray::create(); + uint32_t i = 0; + while (i < argc) { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[i]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + cocos2d::CCObject *item = (cocos2d::CCObject*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, item) + array->addObject(item); + i++; + } + cocos2d::CCFiniteTimeAction* ret = cocos2d::CCSequence::create(array); + jsval jsret; + do { + if (ret) { + js_proxy_t *p; + JS_GET_PROXY(p, ret); + if (p) { + jsret = OBJECT_TO_JSVAL(p->obj); + } else { + // create a new js obj of that class + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCSpawn_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + if (argc > 0) { + cocos2d::CCArray* array = cocos2d::CCArray::create(); + uint32_t i = 0; + while (i < argc) { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[i]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + cocos2d::CCObject *item = (cocos2d::CCObject*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, item) + array->addObject(item); + i++; + } + cocos2d::CCFiniteTimeAction* ret = cocos2d::CCSpawn::create(array); + jsval jsret; + do { + if (ret) { + js_proxy_t *p; + JS_GET_PROXY(p, ret); + if (p) { + jsret = OBJECT_TO_JSVAL(p->obj); + } else { + // create a new js obj of that class + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCMenuItem_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 1) { + jsval *argv = JS_ARGV(cx, vp); + cocos2d::CCMenuItem* ret = cocos2d::CCMenuItem::create(); + JSObject *obj = bind_menu_item(cx, ret, argv[0], argc == 2? argv[1] : JSVAL_VOID); + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +// "create" in JS +// cc.MenuItemSprite.create( normalSprite, selectedSprite, [disabledSprite], [callback_fn], [this] +JSBool js_cocos2dx_CCMenuItemSprite_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 2 && argc <= 5) { + jsval *argv = JS_ARGV(cx, vp); + js_proxy_t *proxy; + JSObject *tmpObj; + + tmpObj = JSVAL_TO_OBJECT(argv[0]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + cocos2d::CCNode* arg0 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, arg0); + + tmpObj = JSVAL_TO_OBJECT(argv[1]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + cocos2d::CCNode* arg1 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, arg1); + + int last = 2; + JSBool thirdArgIsCallback = JS_FALSE; + + jsval jsCallback = JSVAL_VOID; + jsval jsThis = JSVAL_VOID; + + cocos2d::CCNode* arg2 = NULL; + if (argc >= 3) { + tmpObj = JSVAL_TO_OBJECT(argv[2]); + thirdArgIsCallback = JS_ObjectIsFunction(cx, tmpObj); + if (!thirdArgIsCallback) { + JS_GET_NATIVE_PROXY(proxy, tmpObj); + arg2 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, arg2); + last = 3; + } + } + cocos2d::CCMenuItemSprite* ret = cocos2d::CCMenuItemSprite::create(arg0, arg1, arg2); + if (argc >= 3) { + if (thirdArgIsCallback) { + //cc.MenuItemSprite.create( normalSprite, selectedSprite, callback_fn, [this] ) + jsCallback = argv[last++]; + if (argc == 4) { + jsThis = argv[last]; + } + } + else { + //cc.MenuItemSprite.create( normalSprite, selectedSprite, disabledSprite, callback_fn, [this] ) + if (argc >= 4) { + jsCallback = argv[last++]; + if (argc == 5) { + jsThis = argv[last]; + } + } + } + } + + JSObject *obj = bind_menu_item(cx, ret, jsCallback, jsThis); + + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); + return JS_TRUE; + } + JS_ReportError(cx, "Invalid number of arguments. Expecting: 2 <= args <= 5"); + return JS_FALSE; +} + +// "create" in JS +// cc.MenuItemImage.create( normalImage, selectedImage, [disabledImage], callback_fn, [this] +JSBool js_cocos2dx_CCMenuItemImage_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 2 && argc <= 5) { + jsval *argv = JS_ARGV(cx, vp); + JSStringWrapper arg0(argv[0]); + JSStringWrapper arg1(argv[1]); + JSStringWrapper arg2; + + bool thirdArgIsString = true; + + jsval jsCallback = JSVAL_VOID; + jsval jsThis = JSVAL_VOID; + + int last = 2; + if (argc >= 3) { + thirdArgIsString = argv[2].isString(); + if (thirdArgIsString) { + arg2.set(argv[2], cx); + last = 3; + } + } + cocos2d::CCMenuItemImage* ret = cocos2d::CCMenuItemImage::create(arg0, arg1, arg2); + + if (argc >= 3) { + if (!thirdArgIsString) { + //cc.MenuItemImage.create( normalImage, selectedImage, callback_fn, [this] ) + jsCallback = argv[last++]; + if (argc == 4) { + jsThis = argv[last]; + } + } + else { + //cc.MenuItemImage.create( normalImage, selectedImage, disabledImage, callback_fn, [this] ) + if (argc >= 4) { + jsCallback = argv[last++]; + if (argc == 5) { + jsThis = argv[last]; + } + } + } + } + + JSObject *obj = bind_menu_item(cx, ret, jsCallback, jsThis); + + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); + return JS_TRUE; + } + JS_ReportError(cx, "Invalid number of arguments. Expecting: 2 <= args <= 5"); + return JS_FALSE; +} + +// "create" in JS: +// cc.MenuItemLabel.create( label, callback_fn, [this] ); +JSBool js_cocos2dx_CCMenuItemLabel_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 1 && argc <= 3) { + jsval *argv = JS_ARGV(cx, vp); + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + cocos2d::CCNode* arg0 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, arg0) + cocos2d::CCMenuItemLabel* ret = cocos2d::CCMenuItemLabel::create(arg0); + JSObject *obj = bind_menu_item(cx, ret, (argc >= 2 ? argv[1] : JSVAL_VOID), (argc == 3 ? argv[2] : JSVAL_VOID) ); + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d or %d or %d", argc, 1, 2, 3); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCMenuItemAtlasFont_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 5) { + JSBool ok = JS_TRUE; + jsval *argv = JS_ARGV(cx, vp); + JSStringWrapper arg0(argv[0]); + JSStringWrapper arg1(argv[1]); + int arg2; ok &= jsval_to_int32(cx, argv[2], &arg2); + int arg3; ok &= jsval_to_int32(cx, argv[3], &arg3); + int arg4; ok &= jsval_to_int32(cx, argv[4], &arg4); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + cocos2d::CCMenuItemAtlasFont* ret = cocos2d::CCMenuItemAtlasFont::create(arg0, arg1, arg2, arg3, arg4); + JSObject *obj = bind_menu_item(cx, ret, (argc >= 6 ? argv[5] : JSVAL_VOID), (argc == 7 ? argv[6] : JSVAL_VOID)); + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +// "create" in JS +// cc.MenuItemFont.create( string, callback_fn, [this] ); +JSBool js_cocos2dx_CCMenuItemFont_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 1 && argc <= 3) { + jsval *argv = JS_ARGV(cx, vp); + JSStringWrapper arg0(argv[0]); + cocos2d::CCMenuItemFont* ret = cocos2d::CCMenuItemFont::create(arg0); + JSObject *obj = bind_menu_item(cx, ret, (argc >= 2 ? argv[1] : JSVAL_VOID), (argc == 3 ? argv[2] : JSVAL_VOID)); + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d or %d or %d", argc, 1, 2, 3); + return JS_FALSE; +} + + +JSBool js_cocos2dx_CCMenuItemToggle_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 1) { + jsval *argv = JS_ARGV(cx, vp); + cocos2d::CCMenuItemToggle* ret = cocos2d::CCMenuItemToggle::create(); + + for (uint32_t i=0; i < argc; i++) { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[i]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + cocos2d::CCMenuItem* item = (cocos2d::CCMenuItem*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, item) + if(i == 0) ret->initWithItem(item); + else ret->addSubItem(item); + } + + jsval jsret; + if (ret) { + js_proxy_t *proxy; + JS_GET_PROXY(proxy, ret); + if (proxy) { + jsret = OBJECT_TO_JSVAL(proxy->obj); + } else { + // create a new js obj of that class + proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +// "setCallback" in JS +// item.setCallback( callback_fn, [this]); +template +JSBool js_cocos2dx_setCallback(JSContext *cx, uint32_t argc, jsval *vp) { + + if(argc == 1 || argc == 2) { + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj = JS_THIS_OBJECT(cx, vp); + jsval jsThis = JSVAL_VOID; + jsval jsFunc = argv[0]; + if (argc == 2) { + jsThis = argv[1]; + } + + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + T* item = (T*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, item) + bind_menu_item(cx, item, jsFunc, jsThis); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d or %d", argc, 1, 2); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCMenuItem_setCallback(JSContext *cx, uint32_t argc, jsval *vp) { + return js_cocos2dx_setCallback(cx, argc, vp); +} + + +JSBool js_cocos2dx_CCAnimation_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSBool ok = JS_TRUE; + jsval *argv = JS_ARGV(cx, vp); + if (argc <= 3) { + cocos2d::CCArray* arg0; + if (argc > 0) { + ok &= jsval_to_ccarray(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + } + cocos2d::CCAnimation* ret; + double arg1 = 0.0f; + if (argc > 0 && argc == 2) { + if (argc == 2) { + ok &= JS_ValueToNumber(cx, argv[1], &arg1); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + } + ret = cocos2d::CCAnimation::createWithSpriteFrames(arg0, arg1); + } else if (argc == 3) { + unsigned int loops; + ok &= JS_ValueToNumber(cx, argv[1], &arg1); + ok &= jsval_to_uint32(cx, argv[2], &loops); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + ret = cocos2d::CCAnimation::create(arg0, arg1, loops); + } else if (argc == 1) { + ret = cocos2d::CCAnimation::createWithSpriteFrames(arg0); + } else if (argc == 0) { + ret = cocos2d::CCAnimation::create(); + } + jsval jsret; + if (ret) { + js_proxy_t *proxy; + JS_GET_PROXY(proxy, ret); + if (proxy) { + jsret = OBJECT_TO_JSVAL(proxy->obj); + } else { + // create a new js obj of that class + proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCLayerMultiplex_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + cocos2d::CCArray* arg0; + JSBool ok = JS_TRUE; + ok &= jsvals_variadic_to_ccarray(cx, argv, argc, &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + cocos2d::CCLayerMultiplex* ret = cocos2d::CCLayerMultiplex::createWithArray(arg0); + jsval jsret; + do { + if (ret) { + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; +} + +JSBool js_cocos2dx_JSTouchDelegate_registerStandardDelegate(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 1) { + jsval *argv = JS_ARGV(cx, vp); + JSObject* jsobj = NULL; + + JSTouchDelegate *touch = new JSTouchDelegate(); + touch->autorelease(); + touch->registerStandardDelegate(); + jsobj = (argc == 1 ? JSVAL_TO_OBJECT(argv[0]) : JSVAL_TO_OBJECT(JSVAL_VOID)); + touch->setJSObject(jsobj); + JSTouchDelegate::setDelegateForJSObject(jsobj, touch); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting >= 1", argc); + return JS_FALSE; +} + +JSBool js_cocos2dx_JSTouchDelegate_registerTargettedDelegate(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 1) { + jsval *argv = JS_ARGV(cx, vp); + JSObject* jsobj = NULL; + + JSTouchDelegate *touch = new JSTouchDelegate(); + touch->autorelease(); + touch->registerTargettedDelegate((argc >= 1 ? JSVAL_TO_INT(argv[0]) : 0), (argc >= 2 ? JSVAL_TO_BOOLEAN(argv[1]) : true)); + + jsobj = (argc == 3 ? JSVAL_TO_OBJECT(argv[2]) : JSVAL_TO_OBJECT(JSVAL_VOID)); + touch->setJSObject(jsobj); + JSTouchDelegate::setDelegateForJSObject(jsobj, touch); + + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting >=1", argc); + return JS_FALSE; +} + +JSBool js_cocos2dx_JSTouchDelegate_unregisterTouchDelegate(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc == 1) { + jsval *argv = JS_ARGV(cx, vp); + JSObject* jsobj = JSVAL_TO_OBJECT(argv[0]); + JSTouchDelegate* pDelegate = JSTouchDelegate::getDelegateForJSObject(jsobj); + if (pDelegate) + { + pDelegate->unregisterTouchDelegate(); + JSTouchDelegate::removeDelegateForJSObject(jsobj); + } + + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_swap_native_object(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc == 2) { + // get the native object from the second object to the first object + jsval *argv = JS_ARGV(cx, vp); + JSObject *one = JSVAL_TO_OBJECT(argv[0]); + JSObject *two = JSVAL_TO_OBJECT(argv[1]); + js_proxy_t *nproxy; + JS_GET_NATIVE_PROXY(nproxy, two); + void *ptrTwo = (nproxy ? nproxy->ptr : NULL); + if (nproxy) { + js_proxy_t *jsproxy; + JS_GET_PROXY(jsproxy, ptrTwo); + if (jsproxy) { + JS_RemoveObjectRoot(cx, &nproxy->obj); + JS_REMOVE_PROXY(jsproxy, nproxy); + JS_NEW_PROXY(nproxy, ptrTwo, one); + JS_AddNamedObjectRoot(cx, &nproxy->obj, typeid(*((CCObject*)nproxy->ptr)).name()); + } + } + } + return JS_TRUE; +} + +JSBool js_cocos2dx_CCNode_copy(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc == 0) { + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCObject *node = (cocos2d::CCObject *)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, node) + cocos2d::CCObject *ret = node->copy(); + proxy = js_get_or_create_proxy(cx, ret); + if (ret && proxy) { + ret->autorelease(); + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(proxy->obj)); + return JS_TRUE; + } + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +JSObject* getObjectFromNamespace(JSContext* cx, JSObject *ns, const char *name) { + jsval out; + JSBool ok = JS_TRUE; + if (JS_GetProperty(cx, ns, name, &out) == JS_TRUE) { + JSObject *obj; + ok &= JS_ValueToObject(cx, out, &obj); + JSB_PRECONDITION2(ok, cx, NULL, "Error processing arguments"); + } + return NULL; +} + +jsval anonEvaluate(JSContext *cx, JSObject *thisObj, const char* string) { + jsval out; + if (JS_EvaluateScript(cx, thisObj, string, strlen(string), "(string)", 1, &out) == JS_TRUE) { + return out; + } + return JSVAL_VOID; +} + +JSBool js_platform(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSString *str = JS_NewStringCopyZ(cx, "mobile"); + jsval out = STRING_TO_JSVAL(str); + JS_SET_RVAL(cx, vp, out); + return JS_TRUE; +} + +JSCallbackWrapper::JSCallbackWrapper() +: jsCallback(JSVAL_VOID), jsThisObj(JSVAL_VOID), extraData(JSVAL_VOID) +{ + +} + +JSCallbackWrapper::~JSCallbackWrapper() +{ + JSContext* cx = ScriptingCore::getInstance()->getGlobalContext(); + JS_RemoveValueRoot(cx, &jsCallback); +} + +void JSCallbackWrapper::setJSCallbackFunc(jsval func) { + jsCallback = func; + JSContext* cx = ScriptingCore::getInstance()->getGlobalContext(); + // Root the callback function. + JS_AddNamedValueRoot(cx, &jsCallback, "JSCallbackWrapper_callback_func"); +} + +void JSCallbackWrapper::setJSCallbackThis(jsval thisObj) { + jsThisObj = thisObj; +} + +void JSCallbackWrapper::setJSExtraData(jsval data) { + extraData = data; +} + +const jsval& JSCallbackWrapper::getJSCallbackFunc() const +{ + return jsCallback; +} + +const jsval& JSCallbackWrapper::getJSCallbackThis() const +{ + return jsThisObj; +} + +const jsval& JSCallbackWrapper::getJSExtraData() const +{ + return extraData; +} + +void JSCallFuncWrapper::setTargetForNativeNode(CCNode *pNode, JSCallFuncWrapper *target) { + callfuncTarget_proxy_t *t; + HASH_FIND_PTR(_callfuncTarget_native_ht, &pNode, t); + + CCArray *arr; + if(!t) { + arr = new CCArray(); + } else { + arr = t->obj; + } + + arr->addObject(target); + + callfuncTarget_proxy_t *p = (callfuncTarget_proxy_t *)malloc(sizeof(callfuncTarget_proxy_t)); + assert(p); + p->ptr = (void *)pNode; + p->obj = arr; + HASH_ADD_PTR(_callfuncTarget_native_ht, ptr, p); +} + +CCArray * JSCallFuncWrapper::getTargetForNativeNode(CCNode *pNode) { + + callfuncTarget_proxy_t *t; + HASH_FIND_PTR(_callfuncTarget_native_ht, &pNode, t); + if(!t) { + return NULL; + } + return t->obj; + +} + +void JSCallFuncWrapper::callbackFunc(CCNode *node) const { + + bool hasExtraData = !JSVAL_IS_VOID(extraData); + JSObject* thisObj = JSVAL_IS_VOID(jsThisObj) ? NULL : JSVAL_TO_OBJECT(jsThisObj); + JSContext *cx = ScriptingCore::getInstance()->getGlobalContext(); + js_proxy_t *proxy = js_get_or_create_proxy(cx, node); + + jsval retval; + if(jsCallback != JSVAL_VOID) + { + if (hasExtraData) + { + jsval valArr[2]; + valArr[0] = OBJECT_TO_JSVAL(proxy->obj); + valArr[1] = extraData; + + JS_AddValueRoot(cx, valArr); + JS_CallFunctionValue(cx, thisObj, jsCallback, 2, valArr, &retval); + JS_RemoveValueRoot(cx, valArr); + } + else + { + jsval senderVal = OBJECT_TO_JSVAL(proxy->obj); + JS_AddValueRoot(cx, &senderVal); + JS_CallFunctionValue(cx, thisObj, jsCallback, 1, &senderVal, &retval); + JS_RemoveValueRoot(cx, &senderVal); + } + } + + // I think the JSCallFuncWrapper isn't needed. + // Since an action will be run by a cc.Node, it will be released at the CCNode::cleanup. + // By James Chen + // JSCallFuncWrapper::setTargetForNativeNode(node, (JSCallFuncWrapper *)this); +} + +// cc.CallFunc.create( func, this, [data]) +// cc.CallFunc.create( func ) +JSBool js_callFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + + if (argc >= 1 && argc <= 3) { + jsval *argv = JS_ARGV(cx, vp); + + JSCallFuncWrapper *tmpCobj = new JSCallFuncWrapper(); + tmpCobj->autorelease(); + + tmpCobj->setJSCallbackFunc(argv[0]); + if(argc >= 2) { + tmpCobj->setJSCallbackThis(argv[1]); + } if(argc == 3) { + tmpCobj->setJSExtraData(argv[2]); + } + + CCCallFunc *ret = (CCCallFunc *)CCCallFuncN::create((CCObject *)tmpCobj, + callfuncN_selector(JSCallFuncWrapper::callbackFunc)); + + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(proxy->obj)); + + JS_SetReservedSlot(proxy->obj, 0, argv[0]); + if(argc > 1) { + JS_SetReservedSlot(proxy->obj, 1, argv[1]); + } +// if(argc == 3) { +// JS_SetReservedSlot(proxy->obj, 2, argv[2]); +// } + + // test->execute(); + return JS_TRUE; + } + JS_ReportError(cx, "Invalid number of arguments"); + return JS_FALSE; +} + + + +void JSScheduleWrapper::setTargetForSchedule(jsval sched, JSScheduleWrapper *target) { + do { + JSObject* jsfunc = JSVAL_TO_OBJECT(sched); + CCArray* targetArray = getTargetForSchedule(sched); + if (NULL == targetArray) { + targetArray = new CCArray(); + schedFunc_proxy_t *p = (schedFunc_proxy_t *)malloc(sizeof(schedFunc_proxy_t)); + assert(p); + p->jsfuncObj = jsfunc; + p->targets = targetArray; + HASH_ADD_PTR(_schedFunc_target_ht, jsfuncObj, p); + } + + CCAssert(!targetArray->containsObject(target), "The target was already added."); + + targetArray->addObject(target); + } while(0); +} + +CCArray * JSScheduleWrapper::getTargetForSchedule(jsval sched) { + schedFunc_proxy_t *t = NULL; + JSObject *o = JSVAL_TO_OBJECT(sched); + HASH_FIND_PTR(_schedFunc_target_ht, &o, t); + return t != NULL ? t->targets : NULL; +} + + +void JSScheduleWrapper::setTargetForNativeNode(CCNode *pNode, JSScheduleWrapper *target) +{ + CCArray* targetArray = getTargetForNativeNode(pNode); + if (NULL == targetArray) { + targetArray = new CCArray(); + schedTarget_proxy_t *p = (schedTarget_proxy_t *)malloc(sizeof(schedTarget_proxy_t)); + assert(p); + p->nativeObj = pNode; + p->targets = targetArray; + HASH_ADD_PTR(_schedTarget_native_ht, nativeObj, p); + } + + CCAssert(!targetArray->containsObject(target), "The target was already added."); + targetArray->addObject(target); +} + +CCArray * JSScheduleWrapper::getTargetForNativeNode(CCNode *pNode) +{ + schedTarget_proxy_t *t = NULL; + HASH_FIND_PTR(_schedTarget_native_ht, &pNode, t); + return t != NULL ? t->targets : NULL; +} + +void JSScheduleWrapper::removeAllTargetsForNatiaveNode(CCNode* pNode) +{ + CCLOGINFO("removeAllTargetsForNatiaveNode begin"); + dump(); + CCArray* removeNativeTargets = NULL; + schedTarget_proxy_t *t = NULL; + HASH_FIND_PTR(_schedTarget_native_ht, &pNode, t); + if (t != NULL) { + removeNativeTargets = t->targets; + HASH_DEL(_schedTarget_native_ht, t); + } + + if (removeNativeTargets == NULL) return; + + schedFunc_proxy_t *current, *tmp; + HASH_ITER(hh, _schedFunc_target_ht, current, tmp) { + std::vector objectsNeedToBeReleased; + JSObject* key = current->jsfuncObj; + CCArray* targets = current->targets; + CCObject* pObj = NULL; + CCARRAY_FOREACH(targets, pObj) + { + if (removeNativeTargets->containsObject(pObj)) + { + objectsNeedToBeReleased.push_back(pObj); + } + } + + std::vector::iterator iter = objectsNeedToBeReleased.begin(); + for (; iter != objectsNeedToBeReleased.end(); ++iter) + { + targets->removeObject(*iter, true); + } + + if (targets->count() == 0) + { + HASH_DEL(_schedFunc_target_ht, current); + targets->release(); + free(current); + } + } + + removeNativeTargets->removeAllObjects(); + removeNativeTargets->release(); + free(t); + dump(); + CCLOGINFO("removeAllTargetsForNatiaveNode end"); +} + +void JSScheduleWrapper::removeTargetForNativeNode(CCNode* pNode, JSScheduleWrapper* target) +{ + schedTarget_proxy_t *t = NULL; + HASH_FIND_PTR(_schedTarget_native_ht, &pNode, t); + if (t != NULL) { + t->targets->removeObject(target); + if (t->targets->count() == 0) + { + t->targets->release(); + HASH_DEL(_schedTarget_native_ht, t); + free(t); + } + } + + schedFunc_proxy_t *current, *tmp, *removed=NULL; + + HASH_ITER(hh, _schedFunc_target_ht, current, tmp) { + CCArray* targets = current->targets; + CCObject* pObj = NULL; + + CCARRAY_FOREACH(targets, pObj) + { + JSScheduleWrapper* pOneTarget = (JSScheduleWrapper*)pObj; + if (pOneTarget == target) + { + removed = current; + break; + } + } + if (removed) break; + } + + if (removed) + { + removed->targets->removeObject(target); + if (removed->targets->count() == 0) + { + removed->targets->release(); + HASH_DEL(_schedFunc_target_ht, removed); + free(removed); + } + } + dump(); +} +void JSScheduleWrapper::dump() +{ +#if COCOS2D_DEBUG > 1 + CCLOG("\n---------JSScheduleWrapper dump begin--------------\n"); + schedTarget_proxy_t *current, *tmp; + int nativeTargetsCount = 0; + HASH_ITER(hh, _schedTarget_native_ht, current, tmp) { + CCObject* pObj = NULL; + CCARRAY_FOREACH(current->targets, pObj) + { + CCLOG("native %s ( %p ), target[%d]=( %p )", typeid(*current->nativeObj).name(), current->nativeObj, nativeTargetsCount, pObj); + nativeTargetsCount++; + } + } + + CCLOG("\n-----------------------------\n"); + + schedFunc_proxy_t *current_func, *tmp_func; + int jsfuncTargetCount = 0; + HASH_ITER(hh, _schedFunc_target_ht, current_func, tmp_func) { + CCObject* pObj = NULL; + CCARRAY_FOREACH(current_func->targets, pObj) + { + CCLOG("jsfunc ( %p ), target[%d]=( %p )", current_func->jsfuncObj, jsfuncTargetCount, pObj); + jsfuncTargetCount++; + } + } + CCAssert(nativeTargetsCount == jsfuncTargetCount, ""); + CCLOG("\n---------JSScheduleWrapper dump end--------------\n"); +#endif +} + +void JSScheduleWrapper::scheduleFunc(float dt) const +{ + jsval retval = JSVAL_NULL; + jsval data = DOUBLE_TO_JSVAL(dt); + + JSContext *cx = ScriptingCore::getInstance()->getGlobalContext(); + + JSBool ok = JS_AddValueRoot(cx, &data); + if (!ok) { + CCLOG("scheduleFunc: Root value fails."); + return; + } + + if(!jsCallback.isNullOrUndefined() || !jsThisObj.isNullOrUndefined()) { + JSAutoCompartment ac(cx, JSVAL_TO_OBJECT(jsThisObj)); + + JS_CallFunctionValue(cx, JSVAL_TO_OBJECT(jsThisObj), jsCallback, 1, &data, &retval); + } + + JS_RemoveValueRoot(cx, &data); +} + +CCObject* JSScheduleWrapper::getTarget() +{ + return m_pTarget; +} + +void JSScheduleWrapper::setTarget(CCObject* pTarget) +{ + m_pTarget = pTarget; +} + +JSBool js_CCNode_unschedule(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc == 1) { + jsval *argv = JS_ARGV(cx, vp); + + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCNode *node = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2(node, cx, JS_FALSE, "Invalid Native Object"); + + CCScheduler *sched = node->getScheduler(); + + CCArray* targetArray = JSScheduleWrapper::getTargetForSchedule(argv[0]); + CCLOGINFO("unschedule target number: %d", targetArray->count()); + CCObject* tmp = NULL; + CCARRAY_FOREACH(targetArray, tmp) + { + JSScheduleWrapper* target = (JSScheduleWrapper*)tmp; + if (node == target->getTarget()) + { + sched->unscheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), target); + JSScheduleWrapper::removeTargetForNativeNode(node, target); + break; + } + } + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + } + return JS_TRUE; +} + +JSBool js_cocos2dx_CCNode_unscheduleAllSelectors(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCNode* cobj = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + if (argc == 0) + { + cobj->unscheduleAllSelectors(); + + CCArray *arr = JSScheduleWrapper::getTargetForNativeNode(cobj); + // If there aren't any targets, just return true. + // Otherwise, the for loop will break immediately. + // It will lead to logic errors. + // For details to reproduce it, please refer to SchedulerTest/SchedulerUpdate. + if(! arr) return JS_TRUE; + for(unsigned int i = 0; i < arr->count(); ++i) { + if(arr->objectAtIndex(i)) { + cobj->getScheduler()->unscheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), arr->objectAtIndex(i)); + } + } + + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 0); + return JS_FALSE; +} + + + + +JSBool js_cocos2dx_CCScheduler_unscheduleAllSelectorsForTarget(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCScheduler* cobj = (cocos2d::CCScheduler *)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + if (argc == 1) { + cocos2d::CCNode* arg0; + do { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + arg0 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, arg0) + cobj->unscheduleAllForTarget(arg0); + + CCArray *arr = JSScheduleWrapper::getTargetForNativeNode(arg0); + // If there aren't any targets, just return true. + // Otherwise, the for loop will break immediately. + // It will lead to logic errors. + // For details to reproduce it, please refer to SchedulerTest/SchedulerUpdate. + if(! arr) return JS_TRUE; + for(unsigned int i = 0; i < arr->count(); ++i) { + if(arr->objectAtIndex(i)) { + arg0->getScheduler()->unscheduleAllForTarget(arr->objectAtIndex(i)); + } + } + JSScheduleWrapper::removeAllTargetsForNatiaveNode(arg0); + + } while (0); + + + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + + +JSBool js_CCNode_scheduleOnce(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 1) { + JSBool ok = JS_TRUE; + jsval *argv = JS_ARGV(cx, vp); + + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCNode *node = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); + + CCScheduler *sched = node->getScheduler(); + + JSScheduleWrapper *tmpCobj = NULL; + + // + // delay + // + double delay; + if( argc >= 2 ) { + ok &= JS_ValueToNumber(cx, argv[1], &delay ); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + } + + bool bFound = false; + CCArray* pTargetArr = JSScheduleWrapper::getTargetForNativeNode(node); + CCObject* pObj = NULL; + CCARRAY_FOREACH(pTargetArr, pObj) + { + JSScheduleWrapper* pTarget = (JSScheduleWrapper*)pObj; + if (argv[0] == pTarget->getJSCallbackFunc()) + { + tmpCobj = pTarget; + bFound = true; + break; + } + } + + if (!bFound) + { + tmpCobj = new JSScheduleWrapper(); + tmpCobj->autorelease(); + tmpCobj->setJSCallbackThis(OBJECT_TO_JSVAL(obj)); + tmpCobj->setJSCallbackFunc(argv[0]); + tmpCobj->setTarget(node); + + JSScheduleWrapper::setTargetForSchedule(argv[0], tmpCobj); + JSScheduleWrapper::setTargetForNativeNode(node, tmpCobj); + } + + if(argc == 1) { + sched->scheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), tmpCobj, 0, 0, 0.0f, !node->isRunning()); + } else { + sched->scheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), tmpCobj, 0, 0, delay, !node->isRunning()); + } + + /* We shouldn't set the js callback function to reserved slot, + since 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. + */ + //jsb_set_reserved_slot(proxy->obj, 0, argv[0]); + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + + + +JSBool js_CCNode_schedule(JSContext *cx, uint32_t argc, jsval *vp) +{ + if (argc >= 1) { + JSBool ok = JS_TRUE; + jsval *argv = JS_ARGV(cx, vp); + + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCNode *node = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); + CCScheduler *sched = node->getScheduler(); + + js_proxy_t *p = js_get_or_create_proxy(cx, sched); + + JSScheduleWrapper *tmpCobj = NULL; + + double interval = 0.0; + if( argc >= 2 ) { + ok &= JS_ValueToNumber(cx, argv[1], &interval ); + } + + // + // repeat + // + double repeat = 0.0; + if( argc >= 3 ) { + ok &= JS_ValueToNumber(cx, argv[2], &repeat ); + } + + // + // delay + // + double delay = 0.0; + if( argc >= 4 ) { + ok &= JS_ValueToNumber(cx, argv[3], &delay ); + } + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + bool bFound = false; + CCArray* pTargetArr = JSScheduleWrapper::getTargetForNativeNode(node); + CCObject* pObj = NULL; + CCARRAY_FOREACH(pTargetArr, pObj) + { + JSScheduleWrapper* pTarget = (JSScheduleWrapper*)pObj; + if (argv[0] == pTarget->getJSCallbackFunc()) + { + tmpCobj = pTarget; + bFound = true; + break; + } + } + + if (!bFound) + { + tmpCobj = new JSScheduleWrapper(); + tmpCobj->autorelease(); + tmpCobj->setJSCallbackThis(OBJECT_TO_JSVAL(obj)); + tmpCobj->setJSCallbackFunc(argv[0]); + tmpCobj->setTarget(node); + JSScheduleWrapper::setTargetForSchedule(argv[0], tmpCobj); + JSScheduleWrapper::setTargetForNativeNode(node, tmpCobj); + } + + if(argc == 1) { + sched->scheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), tmpCobj, 0, !node->isRunning()); + } if(argc == 2) { + sched->scheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), tmpCobj, interval, !node->isRunning()); + } if(argc == 3) { + sched->scheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), tmpCobj, interval, (unsigned int)repeat, 0, !node->isRunning()); + } if (argc == 4) { + sched->scheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), tmpCobj, interval, (unsigned int)repeat, delay, !node->isRunning()); + } + + // I comment next line with the same reason in the js_CCNode_scheduleOnce. + //jsb_set_reserved_slot(proxy->obj, 0, argv[0]); + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + + +JSBool js_CCScheduler_schedule(JSContext *cx, uint32_t argc, jsval *vp) +{ + + if (argc >= 2) { + JSBool ok = JS_TRUE; + jsval *argv = JS_ARGV(cx, vp); + + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCScheduler *sched = (cocos2d::CCScheduler *)(proxy ? proxy->ptr : NULL); + + JSScheduleWrapper *tmpCobj = NULL; + + cocos2d::CCNode* node; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + node = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, node) + + double interval = 0; + if( argc >= 3 ) { + ok &= JS_ValueToNumber(cx, argv[2], &interval ); + } + + // + // repeat + // + double repeat = -1; + if( argc >= 4 ) { + ok &= JS_ValueToNumber(cx, argv[3], &repeat ); + } + + // + // delay + // + double delay = 0; + if( argc >= 5 ) { + ok &= JS_ValueToNumber(cx, argv[4], &delay ); + } + + JSBool paused = !node->isRunning(); + + if( argc >= 6 ) { + ok &= JS_ValueToBoolean(cx, argv[4], &paused); + } + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + bool bFound = false; + CCArray* pTargetArr = JSScheduleWrapper::getTargetForNativeNode(node); + CCObject* pObj = NULL; + CCARRAY_FOREACH(pTargetArr, pObj) + { + JSScheduleWrapper* pTarget = (JSScheduleWrapper*)pObj; + if (argv[1] == pTarget->getJSCallbackFunc()) + { + tmpCobj = pTarget; + bFound = true; + break; + } + } + + if (!bFound) + { + tmpCobj = new JSScheduleWrapper(); + tmpCobj->autorelease(); + tmpCobj->setJSCallbackThis(OBJECT_TO_JSVAL(proxy->obj)); + tmpCobj->setJSCallbackFunc(argv[1]); + + JSScheduleWrapper::setTargetForSchedule(argv[1], tmpCobj); + JSScheduleWrapper::setTargetForNativeNode(node, tmpCobj); + } + + sched->scheduleSelector(schedule_selector(JSScheduleWrapper::scheduleFunc), tmpCobj, interval, repeat, delay, paused); + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + + + +JSBool js_cocos2dx_CCScheduler_pauseTarget(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + + if (argc == 1) { + cocos2d::CCNode* arg0; + do { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + arg0 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, arg0) + CCArray *arr = JSScheduleWrapper::getTargetForNativeNode(arg0); + if(! arr) return JS_TRUE; + for(unsigned int i = 0; i < arr->count(); ++i) { + if(arr->objectAtIndex(i)) { + arg0->getScheduler()->pauseTarget(arr->objectAtIndex(i)); + } + } + + } while (0); + //cobj->pauseTarget(arg0); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + + +JSBool js_cocos2dx_CCScheduler_resumeTarget(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + + if (argc == 1) { + cocos2d::CCNode* arg0; + do { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[0]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + arg0 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, arg0) + CCArray *arr = JSScheduleWrapper::getTargetForNativeNode(arg0); + if(! arr) return JS_TRUE; + for(unsigned int i = 0; i < arr->count(); ++i) { + if(arr->objectAtIndex(i)) { + arg0->getScheduler()->resumeTarget(arr->objectAtIndex(i)); + } + } + + } while (0); + //cobj->pauseTarget(arg0); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + + + +JSBool js_doNothing(JSContext *cx, uint32_t argc, jsval *vp) { + return JS_TRUE; +} + + + +JSBool js_forceGC(JSContext *cx, uint32_t argc, jsval *vp) { + JSRuntime *rt = JS_GetRuntime(cx); + JS_GC(rt); + return JS_TRUE; +} + +JSBool js_cocos2dx_retain(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *thisObj = JS_THIS_OBJECT(cx, vp); + if (thisObj) { + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, thisObj); + if (proxy) { + ((CCObject *)proxy->ptr)->retain(); + return JS_TRUE; + } + } + JS_ReportError(cx, "Invalid Native Object."); + return JS_FALSE; +} + +JSBool js_cocos2dx_release(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *thisObj = JS_THIS_OBJECT(cx, vp); + if (thisObj) { + js_proxy_t *proxy; + JS_GET_NATIVE_PROXY(proxy, thisObj); + if (proxy) { + ((CCObject *)proxy->ptr)->release(); + return JS_TRUE; + } + } + JS_ReportError(cx, "Invalid Native Object."); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCSet_constructor(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj; + cocos2d::CCSet* cobj; + + if (argc == 0) { + cobj = new cocos2d::CCSet(); + cobj->autorelease(); + TypeTest t; + js_type_class_t *typeClass; + uint32_t typeId = t.s_id(); + HASH_FIND_INT(_js_global_type_ht, &typeId, typeClass); + assert(typeClass); + obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto); + js_proxy_t *proxy; + JS_NEW_PROXY(proxy, cobj, obj); + JS_AddNamedObjectRoot(cx, &proxy->obj, typeid(cobj).name()); + } + if (cobj) { + JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(obj)); + return JS_TRUE; + } + + JS_ReportError(cx, "Error in js_cocos2dx_CCSet_constructor"); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCNode_setPosition(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj = JS_THIS_OBJECT(cx, vp); + JSBool ok = JS_TRUE; + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCNode* cobj = (cocos2d::CCNode *)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + cobj->setPosition(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } if (argc == 2) { + double x; + ok &= JS_ValueToNumber(cx, argv[0], &x ); + double y; + ok &= JS_ValueToNumber(cx, argv[1], &y ); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + cobj->setPosition(ccp(x,y)); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + + +JSBool js_cocos2dx_CCSprite_setPosition(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj = JS_THIS_OBJECT(cx, vp); + JSBool ok = JS_TRUE; + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCSprite* cobj = (cocos2d::CCSprite *)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + cobj->setPosition(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } if (argc == 2) { + double x; + ok &= JS_ValueToNumber(cx, argv[0], &x ); + double y; + ok &= JS_ValueToNumber(cx, argv[1], &y ); + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + cobj->setPosition(CCPoint(x,y)); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + + +JSBool js_cocos2dx_CCTMXLayer_tileFlagsAt(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj; + JSBool ok = JS_TRUE; + cocos2d::CCTMXLayer* cobj; + obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cobj = (cocos2d::CCTMXLayer *)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::ccTMXTileFlags flags; + unsigned int ret = cobj->tileGIDAt(arg0, &flags); + jsval jsret; + jsret = UINT_TO_JSVAL((uint32_t)flags); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +template +JSBool js_BezierActions_create(JSContext *cx, uint32_t argc, jsval *vp) { + jsval *argv = JS_ARGV(cx, vp); + + if (argc == 2) { + double t; + if( ! JS_ValueToNumber(cx, argv[0], &t) ) { + return JS_FALSE; + } + + int num; + CCPoint *arr; + jsval_to_ccarray_of_CCPoint(cx, argv[1], &arr, &num); + + ccBezierConfig config; + config.controlPoint_1 = arr[0]; + config.controlPoint_2 = arr[1]; + config.endPosition = arr[2]; + + T* ret = T::create(t, config); + + free(arr); + + jsval jsret; + do { + if (ret) { + js_proxy_t *p; + JS_GET_PROXY(p, ret); + if (p) { + jsret = OBJECT_TO_JSVAL(p->obj); + } else { + // create a new js obj of that class + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +template +JSBool js_CardinalSplineActions_create(JSContext *cx, uint32_t argc, jsval *vp) { + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + + if (argc == 3) { + double dur; + ok &= JS_ValueToNumber(cx, argv[0], &dur); + + int num; + CCPoint *arr; + ok &= jsval_to_ccarray_of_CCPoint(cx, argv[1], &arr, &num); + + double ten; + ok &= JS_ValueToNumber(cx, argv[2], &ten); + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPointArray *points = CCPointArray::create(num); + + for( int i=0; i < num;i++) { + points->addControlPoint(arr[i]); + } + + T *ret = T::create(dur, points, ten); + + free(arr); + + jsval jsret; + do { + if (ret) { + js_proxy_t *p; + JS_GET_PROXY(p, ret); + if (p) { + jsret = OBJECT_TO_JSVAL(p->obj); + } else { + // create a new js obj of that class + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +template +JSBool js_CatmullRomActions_create(JSContext *cx, uint32_t argc, jsval *vp) { + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + + if (argc == 2) { + double dur; + ok &= JS_ValueToNumber(cx, argv[0], &dur); + + int num; + CCPoint *arr; + ok &= jsval_to_ccarray_of_CCPoint(cx, argv[1], &arr, &num); + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPointArray *points = CCPointArray::create(num); + + for( int i=0; i < num;i++) { + points->addControlPoint(arr[i]); + } + + T *ret = T::create(dur, points); + + free(arr); + + jsval jsret; + do { + if (ret) { + js_proxy_t *p; + JS_GET_PROXY(p, ret); + if (p) { + jsret = OBJECT_TO_JSVAL(p->obj); + } else { + // create a new js obj of that class + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } + } else { + jsret = JSVAL_NULL; + } + } while (0); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + + +JSBool JSB_CCBezierBy_actionWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { + return js_BezierActions_create(cx, argc, vp); +} + +JSBool JSB_CCBezierTo_actionWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { + return js_BezierActions_create(cx, argc, vp); +} + + +JSBool JSB_CCCardinalSplineBy_actionWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { + return js_CardinalSplineActions_create(cx, argc, vp); +} + +JSBool JSB_CCCardinalSplineTo_actionWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { + return js_CardinalSplineActions_create(cx, argc, vp); +} + +JSBool JSB_CCCatmullRomBy_actionWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { + return js_CatmullRomActions_create(cx, argc, vp); +} + +JSBool JSB_CCCatmullRomTo_actionWithDuration(JSContext *cx, uint32_t argc, jsval *vp) { + return js_CatmullRomActions_create(cx, argc, vp); +} + +JSBool js_cocos2dx_ccpAdd(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSBool ok = JS_TRUE; + jsval *argv = JS_ARGV(cx, vp); + + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpAdd(arg0, arg1); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpDistance(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSBool ok = JS_TRUE; + jsval *argv = JS_ARGV(cx, vp); + + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + float ret = ccpDistance(arg0, arg1); + + jsval jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpClamp(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 3) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + cocos2d::CCPoint arg2; + ok &= jsval_to_ccpoint(cx, argv[2], &arg2); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpClamp(arg0, arg1, arg2); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpLengthSQ(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + float ret = ccpLengthSQ(arg0); + + jsval jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpLength(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + float ret = ccpLength(arg0); + + jsval jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpNeg(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpNeg(arg0); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpSub(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpSub(arg0, arg1); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpMult(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + + double arg1; + ok &= JS_ValueToNumber(cx, argv[1], &arg1); + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpMult(arg0, arg1); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpMidpoint(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpMidpoint(arg0, arg1); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); + return JS_FALSE; +} + + +JSBool js_cocos2dx_ccpDot(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + float ret = ccpDot(arg0, arg1); + + jsval jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpCross(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + float ret = ccpCross(arg0, arg1); + + jsval jsret = DOUBLE_TO_JSVAL(ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpPerp(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpPerp(arg0); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + + +JSBool js_cocos2dx_ccpRPerp(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpRPerp(arg0); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + + +JSBool js_cocos2dx_ccpProject(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpProject(arg0, arg1); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpRotate(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 2) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + cocos2d::CCPoint arg1; + ok &= jsval_to_ccpoint(cx, argv[1], &arg1); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpRotate(arg0, arg1); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); + return JS_FALSE; +} + +JSBool js_cocos2dx_ccpNormalize(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 1) { + cocos2d::CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + CCPoint ret = ccpNormalize(arg0); + + jsval jsret = ccpoint_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +// setBlendFunc +template +JSBool js_cocos2dx_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj; + T* cobj; + obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cobj = (T*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + if (argc == 2) + { + GLenum src, dst; + jsval_to_int32(cx, argv[0], (int32_t*)&src); + jsval_to_int32(cx, argv[1], (int32_t*)&dst); + ccBlendFunc blendFunc = {src, dst}; + cobj->setBlendFunc(blendFunc); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCSprite_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCSpriteBatchNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +// JSBool js_cocos2dx_CCMotionStreak_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +// { +// return js_cocos2dx_setBlendFunc(cx, argc, vp); +// } + +JSBool js_cocos2dx_CCAtlasNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCParticleBatchNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCLayerColor_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCParticleSystem_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCDrawNode_setBlendFunc(JSContext *cx, uint32_t argc, jsval *vp) +{ + return js_cocos2dx_setBlendFunc(cx, argc, vp); +} + +JSBool js_cocos2dx_CCTexture2D_setTexParameters(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject* obj = (JSObject *)JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + CCTexture2D* cobj = (CCTexture2D*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + if (argc == 4) + { + jsval *argvp = JS_ARGV(cx,vp); + JSBool ok = JS_TRUE; + + GLuint arg0, arg1, arg2, arg3; + + ok &= jsval_to_uint32(cx, *argvp++, &arg0); + ok &= jsval_to_uint32(cx, *argvp++, &arg1); + ok &= jsval_to_uint32(cx, *argvp++, &arg2); + ok &= jsval_to_uint32(cx, *argvp++, &arg3); + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + + ccTexParams param = { arg0, arg1, arg2, arg3 }; + + cobj->setTexParameters(¶m); + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 4); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCMenu_alignItemsInRows(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp); + JSBool ok = JS_TRUE; + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, jsthis); + CCMenu* cobj = (CCMenu*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + jsval *argvp = JS_ARGV(cx,vp); + + CCArray* pArray = NULL; + ok &= jsvals_variadic_to_ccarray(cx, argvp, argc, &pArray); + if (ok && pArray) + { + cobj->alignItemsInRowsWithArray(pArray); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "Error in js_cocos2dx_CCMenu_alignItemsInRows"); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCMenu_alignItemsInColumns(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject* jsthis = (JSObject *)JS_THIS_OBJECT(cx, vp); + JSBool ok = JS_TRUE; + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, jsthis); + CCMenu* cobj = (CCMenu*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + jsval *argvp = JS_ARGV(cx,vp); + CCArray* pArray = NULL; + ok &= jsvals_variadic_to_ccarray(cx, argvp, argc, &pArray); + if (ok && pArray) + { + cobj->alignItemsInColumnsWithArray(pArray); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "Error in js_cocos2dx_CCMenu_alignItemsInColumns"); + return JS_FALSE; +} + +// CCTMXLayer +JSBool js_cocos2dx_CCTMXLayer_getTileFlagsAt(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + JSObject *obj; + CCTMXLayer* cobj; + obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cobj = (CCTMXLayer*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + if (argc == 1) + { + ccTMXTileFlags flags; + CCPoint arg0; + ok &= jsval_to_ccpoint(cx, argv[0], &arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + cobj->tileGIDAt(arg0, &flags); + + JS_SET_RVAL(cx, vp, UINT_TO_JSVAL((uint32_t)flags)); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 2); + return JS_FALSE; +} + +//#pragma mark - CCDrawNode + +// Arguments: Array of points, fill color (ccc4f), width(float), border color (ccc4f) +// Ret value: void +JSBool js_cocos2dx_CCDrawNode_drawPolygon(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject* obj = (JSObject *)JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + CCDrawNode* cobj = (CCDrawNode*)(proxy ? proxy->ptr : NULL); + TEST_NATIVE_OBJECT(cx, cobj) + + if ( argc == 4) { + jsval *argvp = JS_ARGV(cx,vp); + JSBool ok = JS_TRUE; + JSObject *argArray = NULL; + ccColor4F argFillColor = ccc4f(0.0f, 0.0f, 0.0f, 0.0f); + double argWidth = 0.0; + ccColor4F argBorderColor = ccc4f(0.0f, 0.0f, 0.0f, 0.0f); + + // Points + ok &= JS_ValueToObject(cx, *argvp++, &argArray); + JSB_PRECONDITION2( (argArray && JS_IsArrayObject(cx, argArray)) , cx, JS_FALSE, "Vertex should be anArray object"); + + // Color 4F + ok &= jsval_to_cccolor4f(cx, *argvp++, &argFillColor); + + // Width + ok &= JS_ValueToNumber( cx, *argvp++, &argWidth ); + + // Color Border (4F) + ok &= jsval_to_cccolor4f(cx, *argvp++, &argBorderColor); + + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error parsing arguments"); + + { + uint32_t l; + if( ! JS_GetArrayLength(cx, argArray, &l) ) + return JS_FALSE; + + CCPoint* verts = new CCPoint[ l ]; + CCPoint p; + + for( uint32_t i=0; idrawPolygon(verts, l, argFillColor, argWidth, argBorderColor); + CC_SAFE_DELETE_ARRAY(verts); + } + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 4); + return JS_FALSE; +} + +static JSBool jsval_to_string_vector(JSContext* cx, jsval v, std::vector& ret) { + JSObject *jsobj; + JSBool ok = JS_ValueToObject( cx, v, &jsobj ); + JSB_PRECONDITION2( ok, cx, JS_FALSE, "Error converting value to object"); + JSB_PRECONDITION2( jsobj && JS_IsArrayObject( cx, jsobj), cx, JS_FALSE, "Object must be an array"); + + uint32_t len = 0; + JS_GetArrayLength(cx, jsobj, &len); + + for (uint32_t i=0; i < len; i++) { + jsval elt; + if (JS_GetElement(cx, jsobj, i, &elt)) { + + if (JSVAL_IS_STRING(elt)) + { + JSStringWrapper str(JSVAL_TO_STRING(elt)); + ret.push_back(str.get()); + } + } + } + + return JS_TRUE; +} + + +static jsval string_vector_to_jsval(JSContext* cx, const std::vector& arr) { + + JSObject *jsretArr = JS_NewArrayObject(cx, 0, NULL); + + int i = 0; + for(std::vector::const_iterator iter = arr.begin(); iter != arr.end(); ++iter, ++i) { + jsval arrElement = c_string_to_jsval(cx, iter->c_str()); + if(!JS_SetElement(cx, jsretArr, i, &arrElement)) { + break; + } + } + return OBJECT_TO_JSVAL(jsretArr); +} + +JSBool js_cocos2dx_CCFileUtils_setSearchResolutionsOrder(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCFileUtils* cobj = (cocos2d::CCFileUtils *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); + + if (argc == 1) { + std::vector arg0; + ok &= jsval_to_string_vector(cx, argv[0], arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + cobj->setSearchResolutionsOrder(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCFileUtils_setSearchPaths(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCFileUtils* cobj = (cocos2d::CCFileUtils *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); + + if (argc == 1) { + std::vector arg0; + ok &= jsval_to_string_vector(cx, argv[0], arg0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + cobj->setSearchPaths(arg0); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} +JSBool js_cocos2dx_CCFileUtils_getSearchPaths(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCFileUtils* cobj = (cocos2d::CCFileUtils *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); + + if (argc == 0) { + std::vector ret = cobj->getSearchPaths(); + jsval jsret; + jsret = string_vector_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 0); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCFileUtils_getStringFromFile(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCFileUtils* cobj = (cocos2d::CCFileUtils *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); + + if (argc == 1) { + const char* arg0; + std::string arg0_tmp; ok &= jsval_to_std_string(cx, argv[0], &arg0_tmp); arg0 = arg0_tmp.c_str(); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + unsigned long size = 0; + unsigned char* ret = cobj->getFileData(arg0, "rb", &size); + if (ret && size > 0) { + JSString* str = JS_NewStringCopyN(cx, (const char*)ret, (size_t)size); + if (str != NULL) { + JS_SET_RVAL(cx, vp, STRING_TO_JSVAL(str)); + } + else { + JS_SET_RVAL(cx, vp, JSVAL_NULL); + } + return JS_TRUE; + } + JS_ReportError(cx, "get file(%s) data fails", arg0); + return JS_FALSE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 3); + return JS_FALSE; +} + +JSBool js_cocos2dx_CCFileUtils_getSearchResolutionsOrder(JSContext *cx, uint32_t argc, jsval *vp) +{ + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::CCFileUtils* cobj = (cocos2d::CCFileUtils *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); + + if (argc == 0) { + std::vector ret = cobj->getSearchResolutionsOrder(); + jsval jsret; + jsret = string_vector_to_jsval(cx, ret); + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 0); + return JS_FALSE; +} + + +void register_cocos2dx_js_extensions(JSContext* cx, JSObject* global) +{ + // first, try to get the ns + jsval nsval; + JSObject *ns; + JS_GetProperty(cx, global, "cc", &nsval); + if (nsval == JSVAL_VOID) { + ns = JS_NewObject(cx, NULL, NULL, NULL); + nsval = OBJECT_TO_JSVAL(ns); + JS_SetProperty(cx, global, "cc", &nsval); + } else { + JS_ValueToObject(cx, nsval, &ns); + } + + JS_DefineFunction(cx, global, "__associateObjWithNative", js_cocos2dx_swap_native_object, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, global, "__getPlatform", js_platform, 0, JSPROP_READONLY | JSPROP_PERMANENT); + + JSObject *tmpObj; + JS_DefineFunction(cx, jsb_CCNode_prototype, "getChildren", js_cocos2dx_CCNode_getChildren, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "copy", js_cocos2dx_CCNode_copy, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "onExit", js_doNothing, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "onEnter", js_doNothing, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "onEnterTransitionDidFinish", js_doNothing, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "onExitTransitionDidStart", js_doNothing, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "init", js_doNothing, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCScheduler_prototype, "resumeTarget", js_cocos2dx_CCScheduler_resumeTarget, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCScheduler_prototype, "pauseTarget", js_cocos2dx_CCScheduler_pauseTarget, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCNode_prototype, "schedule", js_CCNode_schedule, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "scheduleOnce", js_CCNode_scheduleOnce, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "unschedule", js_CCNode_unschedule, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCScheduler_prototype, "scheduleCallbackForTarget", js_CCScheduler_schedule, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCScheduler_prototype, "unscheduleAllCallbacksForTarget", js_cocos2dx_CCScheduler_unscheduleAllSelectorsForTarget, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + + + JS_DefineFunction(cx, jsb_CCNode_prototype, "setPosition", js_cocos2dx_CCNode_setPosition, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCSprite_prototype, "setPosition", js_cocos2dx_CCSprite_setPosition, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCTMXLayer_prototype, "getTileFlagsAt", js_cocos2dx_CCTMXLayer_getTileFlagsAt, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCDrawNode_prototype, "drawPoly", js_cocos2dx_CCDrawNode_drawPolygon, 4, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCDrawNode_prototype, "setBlendFunc", js_cocos2dx_CCDrawNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCTexture2D_prototype, "setTexParameters", js_cocos2dx_CCTexture2D_setTexParameters, 4, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCMenu_prototype, "alignItemsInRows", js_cocos2dx_CCMenu_alignItemsInRows, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCMenu_prototype, "alignItemsInColumns", js_cocos2dx_CCMenu_alignItemsInColumns, 1, JSPROP_ENUMERATE | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCFileUtils_prototype, "setSearchResolutionsOrder", js_cocos2dx_CCFileUtils_setSearchResolutionsOrder, 1, JSPROP_PERMANENT ); + JS_DefineFunction(cx, jsb_CCFileUtils_prototype, "setSearchPaths", js_cocos2dx_CCFileUtils_setSearchPaths, 1, JSPROP_PERMANENT ); + JS_DefineFunction(cx, jsb_CCFileUtils_prototype, "getSearchPaths", js_cocos2dx_CCFileUtils_getSearchPaths, 0, JSPROP_PERMANENT ); + JS_DefineFunction(cx, jsb_CCFileUtils_prototype, "getSearchResolutionsOrder", js_cocos2dx_CCFileUtils_getSearchResolutionsOrder, 0, JSPROP_PERMANENT ); + JS_DefineFunction(cx, jsb_CCFileUtils_prototype, "getStringFromFile", js_cocos2dx_CCFileUtils_getStringFromFile, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.BezierBy; })()")); + JS_DefineFunction(cx, tmpObj, "create", JSB_CCBezierBy_actionWithDuration, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.BezierTo; })()")); + JS_DefineFunction(cx, tmpObj, "create", JSB_CCBezierTo_actionWithDuration, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.CardinalSplineBy; })()")); + JS_DefineFunction(cx, tmpObj, "create", JSB_CCCardinalSplineBy_actionWithDuration, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.CardinalSplineTo; })()")); + JS_DefineFunction(cx, tmpObj, "create", JSB_CCCardinalSplineTo_actionWithDuration, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.CatmullRomBy; })()")); + JS_DefineFunction(cx, tmpObj, "create", JSB_CCCatmullRomBy_actionWithDuration, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.CatmullRomTo; })()")); + JS_DefineFunction(cx, tmpObj, "create", JSB_CCCatmullRomTo_actionWithDuration, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCNode_prototype, "retain", js_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCNode_prototype, "release", js_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCSprite_prototype, "setBlendFunc", js_cocos2dx_CCSprite_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCSpriteBatchNode_prototype, "setBlendFunc", js_cocos2dx_CCSpriteBatchNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + //JS_DefineFunction(cx, jsb_CCMotionStreak_prototype, "setBlendFunc", js_cocos2dx_CCMotionStreak_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCAtlasNode_prototype, "setBlendFunc", js_cocos2dx_CCAtlasNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCParticleBatchNode_prototype, "setBlendFunc", js_cocos2dx_CCParticleBatchNode_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCLayerColor_prototype, "setBlendFunc", js_cocos2dx_CCLayerColor_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCParticleSystem_prototype, "setBlendFunc", js_cocos2dx_CCParticleSystem_setBlendFunc, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, jsb_CCAction_prototype, "copy", js_cocos2dx_CCNode_copy, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCAction_prototype, "retain", js_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCAction_prototype, "release", js_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCAnimation_prototype, "copy", js_cocos2dx_CCNode_copy, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCAnimation_prototype, "retain", js_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCAnimation_prototype, "release", js_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCSpriteFrame_prototype, "retain", js_cocos2dx_retain, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCSpriteFrame_prototype, "release", js_cocos2dx_release, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCMenuItem_prototype, "setCallback", js_cocos2dx_CCMenuItem_setCallback, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCTMXLayer_prototype, "getTileFlagsAt", js_cocos2dx_CCTMXLayer_tileFlagsAt, 2, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.Node.prototype; })()")); + JS_DefineFunction(cx, tmpObj, "unscheduleAllCallbacks", js_cocos2dx_CCNode_unscheduleAllSelectors, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, tmpObj, "copy", js_cocos2dx_CCNode_copy, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.Menu; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCMenu_create, 0, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.MenuItem; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCMenuItem_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.MenuItemSprite; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCMenuItemSprite_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.MenuItemImage; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCMenuItemImage_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.MenuItemLabel; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCMenuItemLabel_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.MenuItemAtlasFont; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCMenuItemAtlasFont_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.MenuItemFont; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCMenuItemFont_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.MenuItemToggle; })()")); + JS_DefineFunction(cx, tmpObj, "_create", js_cocos2dx_CCMenuItemToggle_create, 1, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.Sequence; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCSequence_create, 0, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.Spawn; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCSpawn_create, 0, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.Animation; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCAnimation_create, 0, JSPROP_READONLY | JSPROP_PERMANENT); + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.LayerMultiplex; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCLayerMultiplex_create, 0, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, ns, "registerTargettedDelegate", js_cocos2dx_JSTouchDelegate_registerTargettedDelegate, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "registerStandardDelegate", js_cocos2dx_JSTouchDelegate_registerStandardDelegate, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "unregisterTouchDelegate", js_cocos2dx_JSTouchDelegate_unregisterTouchDelegate, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.CallFunc; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_callFunc, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return this; })()")); + JS_DefineFunction(cx, tmpObj, "garbageCollect", js_forceGC, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JS_DefineFunction(cx, ns, "pAdd", js_cocos2dx_ccpAdd, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pDistance", js_cocos2dx_ccpDistance, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pSub", js_cocos2dx_ccpSub, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pNeg", js_cocos2dx_ccpNeg, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pMult", js_cocos2dx_ccpMult, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pMidpoint", js_cocos2dx_ccpMidpoint, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pDot", js_cocos2dx_ccpDot, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pCross", js_cocos2dx_ccpCross, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pPerp", js_cocos2dx_ccpPerp, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pRPerp", js_cocos2dx_ccpRPerp, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pProject", js_cocos2dx_ccpProject, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pRotate", js_cocos2dx_ccpRotate, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pNormalize", js_cocos2dx_ccpNormalize, 0, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pClamp", js_cocos2dx_ccpClamp, 2, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pLengthSQ", js_cocos2dx_ccpLengthSQ, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, ns, "pLength", js_cocos2dx_ccpLength, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + // add constructor for CCSet + JSFunction *ccSetConstructor = JS_NewFunction(cx, js_cocos2dx_CCSet_constructor, 0, JSPROP_READONLY | JSPROP_PERMANENT, NULL, "constructor"); + JSObject *ctor = JS_GetFunctionObject(ccSetConstructor); + JS_LinkConstructorAndPrototype(cx, ctor, jsb_CCSet_prototype); +} diff --git a/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id b/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id deleted file mode 100644 index b6f6c6d5c4..0000000000 --- a/scripting/javascript/bindings/cocos2d_specifics.cpp.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -732840b42077e8a3de8f8774bcaf60a69ef20c4e \ No newline at end of file diff --git a/scripting/javascript/bindings/js/jsb.js b/scripting/javascript/bindings/js/jsb.js index 5fabbaea88..79bc0c8e5b 100644 --- a/scripting/javascript/bindings/js/jsb.js +++ b/scripting/javascript/bindings/js/jsb.js @@ -4,6 +4,7 @@ // DO NOT ALTER THE ORDER require('jsb_cocos2d.js'); +require('jsb_cocos2d_extension.js'); require('jsb_chipmunk.js'); require('jsb_opengl.js'); require('jsb_cocosbuilder.js'); diff --git a/scripting/javascript/bindings/js/jsb_cocos2d.js b/scripting/javascript/bindings/js/jsb_cocos2d.js index 3f11f8e33f..6cdf5d96b1 100644 --- a/scripting/javascript/bindings/js/jsb_cocos2d.js +++ b/scripting/javascript/bindings/js/jsb_cocos2d.js @@ -76,13 +76,6 @@ cc.MENU_STATE_TRACKING_TOUCH = 1; cc.MENU_HANDLER_PRIORITY = -128; cc.DEFAULT_PADDING = 5; -cc.SCROLLVIEW_DIRECTION_NONE = -1; -cc.SCROLLVIEW_DIRECTION_HORIZONTAL = 0; -cc.SCROLLVIEW_DIRECTION_VERTICAL = 1; -cc.SCROLLVIEW_DIRECTION_BOTH = 2; -cc.TABLEVIEW_FILL_TOPDOWN = 0; -cc.TABLEVIEW_FILL_BOTTOMUP = 1; - // reusable objects cc._reuse_p = [ {x:0, y:0}, {x:0,y:0}, {x:0,y:0}, {x:0,y:0} ]; cc._reuse_p_index = 0; @@ -323,10 +316,13 @@ cc.dump = function(obj) }; // dump config info, but only in debug mode +var sys = sys || undefined; cc.dumpConfig = function() { - cc.dump(sys); - cc.dump(sys.capabilities); + if (sys) { + cc.dump(sys); + cc.dump(sys.capabilities); + } }; // @@ -373,28 +369,6 @@ cc.LabelAtlas.create = function( a,b,c,d,e ) { cc.LayerMultiplex.create = cc.LayerMultiplex.createWithArray; -// PhysicsDebugNode -cc.PhysicsDebugNode.create = function( space ) { - var s = space; - if( space.handle !== undefined ) - s = space.handle; - return cc.PhysicsDebugNode._create( s ); -}; -cc.PhysicsDebugNode.prototype.setSpace = function( space ) { - var s = space; - if( space.handle !== undefined ) - s = space.handle; - return this._setSpace( s ); -}; - -// PhysicsSprite -cc.PhysicsSprite.prototype.setBody = function( body ) { - var b = body; - if( body.handle !== undefined ) - b = body.handle; - return this._setCPBody( b ); -}; - /** * Associates a base class with a native superclass @@ -533,7 +507,4 @@ cc.Sprite.extend = cc.Class.extend; cc.MenuItemFont.extend = cc.Class.extend; cc.Scene.extend = cc.Class.extend; cc.DrawNode.extend = cc.Class.extend; -cc.ScrollView.extend = cc.Class.extend; -cc.TableView.extend = cc.Class.extend; -cc.TableViewCell.extend = cc.Class.extend; diff --git a/scripting/javascript/bindings/js/jsb_cocos2d_extension.js b/scripting/javascript/bindings/js/jsb_cocos2d_extension.js new file mode 100644 index 0000000000..5d6f9d9779 --- /dev/null +++ b/scripting/javascript/bindings/js/jsb_cocos2d_extension.js @@ -0,0 +1,41 @@ +// +// cocos2d constants +// +// This helper file should be required after jsb_cocos2d.js +// + +var cc = cc || {}; + +cc.SCROLLVIEW_DIRECTION_NONE = -1; +cc.SCROLLVIEW_DIRECTION_HORIZONTAL = 0; +cc.SCROLLVIEW_DIRECTION_VERTICAL = 1; +cc.SCROLLVIEW_DIRECTION_BOTH = 2; +cc.TABLEVIEW_FILL_TOPDOWN = 0; +cc.TABLEVIEW_FILL_BOTTOMUP = 1; + +// PhysicsDebugNode +cc.PhysicsDebugNode.create = function( space ) { + var s = space; + if( space.handle !== undefined ) + s = space.handle; + return cc.PhysicsDebugNode._create( s ); +}; +cc.PhysicsDebugNode.prototype.setSpace = function( space ) { + var s = space; + if( space.handle !== undefined ) + s = space.handle; + return this._setSpace( s ); +}; + +// PhysicsSprite +cc.PhysicsSprite.prototype.setBody = function( body ) { + var b = body; + if( body.handle !== undefined ) + b = body.handle; + return this._setCPBody( b ); +}; + +cc.ScrollView.extend = cc.Class.extend; +cc.TableView.extend = cc.Class.extend; +cc.TableViewCell.extend = cc.Class.extend; + diff --git a/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp b/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp new file mode 100644 index 0000000000..fb56c70008 --- /dev/null +++ b/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.cpp @@ -0,0 +1,383 @@ +// +// jsb_cocos2d_extension_manual.cpp +// MoonWarriors +// +// Created by James Chen on 3/11/13. +// +// + +#include "jsb_cocos2dx_extension_manual.h" +#include "cocos-ext.h" +#include "ScriptingCore.h" +#include "cocos2d_specifics.hpp" + +USING_NS_CC; +USING_NS_CC_EXT; + +class ScrollViewDelegate : public CCScrollViewDelegate +{ +public: + virtual void scrollViewDidScroll(CCScrollView* view) + { + js_proxy_t * p; + JS_GET_PROXY(p, view); + if (!p) return; + + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(m_pJSDelegate), "scrollViewDidScroll", OBJECT_TO_JSVAL(p->obj)); + } + + virtual void scrollViewDidZoom(CCScrollView* view) + { + js_proxy_t * p; + JS_GET_PROXY(p, view); + if (!p) return; + + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(m_pJSDelegate), "scrollViewDidZoom", OBJECT_TO_JSVAL(p->obj)); + } + + void setJSDelegate(JSObject* pJSDelegate) + { + m_pJSDelegate = pJSDelegate; + } +private: + JSObject* m_pJSDelegate; +}; + +static JSBool js_cocos2dx_CCScrollView_setDelegate(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::extension::CCScrollView* cobj = (cocos2d::extension::CCScrollView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); + + if (argc == 1) { + // save the delegate + JSObject *jsDelegate = JSVAL_TO_OBJECT(argv[0]); + ScrollViewDelegate* nativeDelegate = new ScrollViewDelegate(); + nativeDelegate->setJSDelegate(jsDelegate); + cobj->setDelegate(nativeDelegate); + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +class TableViewDelegate : public CCTableViewDelegate +{ +public: + virtual void scrollViewDidScroll(CCScrollView* view) + { + callJSDelegate(view, "scrollViewDidScroll"); + } + + virtual void scrollViewDidZoom(CCScrollView* view) + { + callJSDelegate(view, "scrollViewDidZoom"); + } + + + virtual void tableCellTouched(CCTableView* table, CCTableViewCell* cell) + { + callJSDelegate(table, cell, "tableCellTouched"); + } + + virtual void tableCellHighlight(CCTableView* table, CCTableViewCell* cell) + { + callJSDelegate(table, cell, "tableCellHighlight"); + } + + virtual void tableCellUnhighlight(CCTableView* table, CCTableViewCell* cell) + { + callJSDelegate(table, cell, "tableCellUnhighlight"); + } + + virtual void tableCellWillRecycle(CCTableView* table, CCTableViewCell* cell) + { + callJSDelegate(table, cell, "tableCellWillRecycle"); + } + + void setJSDelegate(JSObject* pJSDelegate) + { + m_pJSDelegate = pJSDelegate; + } + + +private: + void callJSDelegate(CCScrollView* view, std::string jsFunctionName) + { + js_proxy_t * p; + JS_GET_PROXY(p, view); + if (!p) return; + + ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(m_pJSDelegate), jsFunctionName.c_str(), OBJECT_TO_JSVAL(p->obj)); + } + + void callJSDelegate(CCTableView* table, CCTableViewCell* cell, std::string jsFunctionName) + { + js_proxy_t * p; + JS_GET_PROXY(p, table); + if (!p) return; + + js_proxy_t * pCellProxy; + JS_GET_PROXY(pCellProxy, cell); + if (!pCellProxy) return; + + + JSBool hasAction; + jsval retval; + jsval temp_retval; + jsval dataVal[2]; + dataVal[0] = OBJECT_TO_JSVAL(p->obj); + dataVal[1] = OBJECT_TO_JSVAL(pCellProxy->obj); + + JSContext* cx = ScriptingCore::getInstance()->getGlobalContext(); + JSObject* obj = m_pJSDelegate; + + if (JS_HasProperty(cx, obj, jsFunctionName.c_str(), &hasAction) && hasAction) { + if(!JS_GetProperty(cx, obj, jsFunctionName.c_str(), &temp_retval)) { + return; + } + if(temp_retval == JSVAL_VOID) { + return; + } + JSAutoCompartment ac(cx, obj); + JS_CallFunctionName(cx, obj, jsFunctionName.c_str(), + 2, dataVal, &retval); + } + } + + JSObject* m_pJSDelegate; +}; + +static JSBool js_cocos2dx_CCTableView_setDelegate(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::extension::CCTableView* cobj = (cocos2d::extension::CCTableView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); + + if (argc == 1) { + // save the delegate + JSObject *jsDelegate = JSVAL_TO_OBJECT(argv[0]); + TableViewDelegate* nativeDelegate = new TableViewDelegate(); + nativeDelegate->setJSDelegate(jsDelegate); + cobj->setDelegate(nativeDelegate); + + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + JS_ReportError(cx, "wrong number of arguments: %d, was expecting %d", argc, 1); + return JS_FALSE; +} + +class TableViewDataSource : public CCTableViewDataSource +{ +public: + virtual CCSize cellSizeForTable(CCTableView *table) + { + jsval ret; + bool ok = callJSDelegate(table, "cellSizeForTable", ret); + if (ok) + { + JSContext* cx = ScriptingCore::getInstance()->getGlobalContext(); + CCSize size; + JSBool isSucceed = jsval_to_ccsize(cx, ret, &size); + if (isSucceed) return size; + } + return CCSizeZero; + } + + virtual CCTableViewCell* tableCellAtIndex(CCTableView *table, unsigned int idx) + { + jsval ret; + bool ok = callJSDelegate(table, idx, "tableCellAtIndex", ret); + if (ok) + { + JSContext* cx = ScriptingCore::getInstance()->getGlobalContext(); + cocos2d::extension::CCTableViewCell* arg0; + do { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(ret); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + arg0 = (cocos2d::extension::CCTableViewCell*)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( arg0, cx, NULL, "Invalid Native Object"); + } while (0); + return arg0; + } + return NULL; + } + + virtual unsigned int numberOfCellsInTableView(CCTableView *table) + { + jsval ret; + bool ok = callJSDelegate(table, "numberOfCellsInTableView", ret); + if (ok) + { + JSContext* cx = ScriptingCore::getInstance()->getGlobalContext(); + uint32_t count = 0; + JSBool isSucceed = jsval_to_uint32(cx, ret, &count); + if (isSucceed) return count; + } + return 0; + } + + + void setTableViewDataSource(JSObject* pJSSource) + { + m_pJSTableViewDataSource = pJSSource; + } + +private: + bool callJSDelegate(CCTableView* table, std::string jsFunctionName, jsval& retVal) + { + js_proxy_t * p; + JS_GET_PROXY(p, table); + if (!p) return false; + + JSBool hasAction; + jsval temp_retval; + jsval dataVal = OBJECT_TO_JSVAL(p->obj); + + JSContext* cx = ScriptingCore::getInstance()->getGlobalContext(); + JSObject* obj = m_pJSTableViewDataSource; + + if (JS_HasProperty(cx, obj, jsFunctionName.c_str(), &hasAction) && hasAction) { + if(!JS_GetProperty(cx, obj, jsFunctionName.c_str(), &temp_retval)) { + return false; + } + if(temp_retval == JSVAL_VOID) { + return false; + } + JSAutoCompartment ac(cx, obj); + JS_CallFunctionName(cx, obj, jsFunctionName.c_str(), + 1, &dataVal, &retVal); + return true; + } + return false; + } + + bool callJSDelegate(CCTableView* table, int idx, std::string jsFunctionName, jsval& retVal) + { + js_proxy_t * p; + JS_GET_PROXY(p, table); + if (!p) return false; + + + JSBool hasAction; + jsval temp_retval; + jsval dataVal[2]; + dataVal[0] = OBJECT_TO_JSVAL(p->obj); + dataVal[1] = INT_TO_JSVAL(idx); + + JSContext* cx = ScriptingCore::getInstance()->getGlobalContext(); + JSObject* obj = m_pJSTableViewDataSource; + + if (JS_HasProperty(cx, obj, jsFunctionName.c_str(), &hasAction) && hasAction) { + if(!JS_GetProperty(cx, obj, jsFunctionName.c_str(), &temp_retval)) { + return false; + } + if(temp_retval == JSVAL_VOID) { + return false; + } + JSAutoCompartment ac(cx, obj); + JS_CallFunctionName(cx, obj, jsFunctionName.c_str(), + 2, dataVal, &retVal); + return true; + } + return false; + } + +private: + JSObject* m_pJSTableViewDataSource; +}; + +static JSBool js_cocos2dx_CCTableView_setDataSource(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSObject *obj = JS_THIS_OBJECT(cx, vp); + js_proxy_t *proxy; JS_GET_NATIVE_PROXY(proxy, obj); + cocos2d::extension::CCTableView* cobj = (cocos2d::extension::CCTableView *)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( cobj, cx, JS_FALSE, "Invalid Native Object"); + if (argc == 1) + { + CCTableViewDataSource* pOldDataSource = cobj->getDataSource(); + CC_SAFE_DELETE(pOldDataSource); + TableViewDataSource* pNativeSource = new TableViewDataSource(); + pNativeSource->setTableViewDataSource(JSVAL_TO_OBJECT(argv[0])); + cobj->setDataSource(pNativeSource); + JS_SET_RVAL(cx, vp, JSVAL_VOID); + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +static JSBool js_cocos2dx_CCTableView_create(JSContext *cx, uint32_t argc, jsval *vp) +{ + jsval *argv = JS_ARGV(cx, vp); + JSBool ok = JS_TRUE; + if (argc == 3 || argc == 2) { + + TableViewDataSource* pNativeSource = new TableViewDataSource(); + pNativeSource->setTableViewDataSource(JSVAL_TO_OBJECT(argv[0])); + + cocos2d::CCSize arg1; + ok &= jsval_to_ccsize(cx, argv[1], &arg1); + cocos2d::extension::CCTableView* ret = NULL; + ret = new CCTableView(); + ret->setDataSource(pNativeSource); + ret->autorelease(); + jsval jsret; + do { + if (ret) { + js_proxy_t *proxy = js_get_or_create_proxy(cx, ret); + jsret = OBJECT_TO_JSVAL(proxy->obj); + } else { + jsret = JSVAL_NULL; + } + } while (0); + + if (argc == 2) + { + ret->initWithViewSize(arg1); + } + else + { + cocos2d::CCNode* arg2; + do { + js_proxy_t *proxy; + JSObject *tmpObj = JSVAL_TO_OBJECT(argv[2]); + JS_GET_NATIVE_PROXY(proxy, tmpObj); + arg2 = (cocos2d::CCNode*)(proxy ? proxy->ptr : NULL); + JSB_PRECONDITION2( arg2, cx, JS_FALSE, "Invalid Native Object"); + } while (0); + JSB_PRECONDITION2(ok, cx, JS_FALSE, "Error processing arguments"); + ret->initWithViewSize(arg1, arg2); + } + ret->_updateContentSize(); + + JS_SET_RVAL(cx, vp, jsret); + return JS_TRUE; + } + + JS_ReportError(cx, "wrong number of arguments"); + return JS_FALSE; +} + +extern JSObject* jsb_CCScrollView_prototype; +extern JSObject* jsb_CCTableView_prototype; + +void register_all_cocos2dx_extension_manual(JSContext* cx, JSObject* global) +{ + JS_DefineFunction(cx, jsb_CCScrollView_prototype, "setDelegate", js_cocos2dx_CCScrollView_setDelegate, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCTableView_prototype, "setDelegate", js_cocos2dx_CCTableView_setDelegate, 1, JSPROP_READONLY | JSPROP_PERMANENT); + JS_DefineFunction(cx, jsb_CCTableView_prototype, "setDataSource", js_cocos2dx_CCTableView_setDataSource, 1, JSPROP_READONLY | JSPROP_PERMANENT); + + JSObject *tmpObj = JSVAL_TO_OBJECT(anonEvaluate(cx, global, "(function () { return cc.TableView; })()")); + JS_DefineFunction(cx, tmpObj, "create", js_cocos2dx_CCTableView_create, 3, JSPROP_READONLY | JSPROP_PERMANENT); +} \ No newline at end of file diff --git a/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.h b/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.h new file mode 100644 index 0000000000..6c8b0cc0c5 --- /dev/null +++ b/scripting/javascript/bindings/jsb_cocos2dx_extension_manual.h @@ -0,0 +1,17 @@ +// +// jsb_cocos2d_extension_manual.h +// MoonWarriors +// +// Created by James Chen on 3/11/13. +// +// + +#ifndef __jsb_cocos2dx_extension_manual__ +#define __jsb_cocos2dx_extension_manual__ + +#include "jsapi.h" +#include "jsfriendapi.h" + +void register_all_cocos2dx_extension_manual(JSContext* cx, JSObject* global); + +#endif /* defined(__jsb_cocos2dx_extension_manual__) */ diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index 2cd0c39072..8048505c97 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -13,7 +13,7 @@ android_flags = -D_SIZE_T_DEFINED_ clang_headers = -I%(clangllvmdir)s/lib/clang/3.1/include clang_flags = -nostdinc -x c++ -cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/extensions -I%(cocosdir)s/extensions/CCBReader +cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common @@ -22,11 +22,11 @@ cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s # what headers to parse -headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/CocosDenshion/include/SimpleAudioEngine.h %(cocosdir)s/extensions/cocos-ext.h +headers = %(cocosdir)s/cocos2dx/include/cocos2d.h %(cocosdir)s/CocosDenshion/include/SimpleAudioEngine.h # what classes to produce code for. You can use regular expressions here. When testing the regular # expression, it will be enclosed in "^$", like this: "^CCMenu*$". -classes = CCSprite.* CCScene CCNode.* CCDirector CCLayer.* CCMenu.* CCTouch CC.*Action.* CCMove.* CCRotate.* CCBlink.* CCTint.* CCSequence CCRepeat.* CCFade.* CCEase.* CCScale.* CCTransition.* CCSpawn CCSequence CCAnimat.* CCFlip.* CCDelay.* CCSkew.* CCJump.* CCPlace.* CCShow.* CCProgress.* CCPointArray CCToggleVisibility.* CCHide CCParticle.* CCLabel.* CCAtlas.* CCTextureCache.* CCTexture2D CCCardinal.* CCCatmullRom.* CCParallaxNode CCTileMap.* CCTMX.* CCCallFunc CCRenderTexture CCGridAction CCGrid3DAction CCGridBase$ CCShaky3D CCWaves3D CCFlipX3D CCFlipY3D CCSpeed CCActionManager CCBReader.* CCBAnimationManager.* CCSet SimpleAudioEngine CCScheduler CCTimer CCOrbit.* CCFollow.* CCBezier.* CCCardinalSpline.* CCControl$ CCControlButton.* CCCamera.* CCDrawNode CC.*3D$ CCLiquid$ CCWaves$ CCShuffleTiles$ CCTurnOffTiles$ CCSplit.* CCTwirl$ CCFileUtils$ CCScrollView$ CCTableView$ CCTableViewCell$ +classes = CCSprite.* CCScene CCNode.* CCDirector CCLayer.* CCMenu.* CCTouch CC.*Action.* CCMove.* CCRotate.* CCBlink.* CCTint.* CCSequence CCRepeat.* CCFade.* CCEase.* CCScale.* CCTransition.* CCSpawn CCAnimat.* CCFlip.* CCDelay.* CCSkew.* CCJump.* CCPlace.* CCShow.* CCProgress.* CCPointArray CCToggleVisibility.* CCHide CCParticle.* CCLabel.* CCAtlas.* CCTextureCache.* CCTexture2D CCCardinal.* CCCatmullRom.* CCParallaxNode CCTileMap.* CCTMX.* CCCallFunc CCRenderTexture CCGridAction CCGrid3DAction CCGridBase$ CCShaky3D CCWaves3D CCFlipX3D CCFlipY3D CCSpeed CCActionManager CCSet SimpleAudioEngine CCScheduler CCTimer CCOrbit.* CCFollow.* CCBezier.* CCCardinalSpline.* CCCamera.* CCDrawNode CC.*3D$ CCLiquid$ CCWaves$ CCShuffleTiles$ CCTurnOffTiles$ CCSplit.* CCTwirl$ CCFileUtils$ # what should we skip? in the format ClassName::[function function] # ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also @@ -79,7 +79,6 @@ skip = CCNode::[.*Transform convertToWindowSpace getChildren ^setPosition$ getGr CCArray::[*], CCRange::[*], CCNotificationObserver::[*], - CCListView.*::[*], CCImage::[initWithString initWithImageData], CCSequence::[create], CCSpawn::[create], @@ -91,18 +90,13 @@ skip = CCNode::[.*Transform convertToWindowSpace getChildren ^setPosition$ getGr CCLayerMultiplex::[create layerWith.* initWithLayers], CCCatmullRom.*::[create actionWithDuration], CCBezier.*::[create actionWithDuration], - CCBReader::[^CCBReader$ addOwnerCallbackName isJSControlled readByte getCCBMemberVariableAssigner readFloat getCCBSelectorResolver toLowerCase lastPathComponent deletePathExtension endsWith concat getResolutionScale getAnimatedProperties readBool readInt addOwnerCallbackNode addDocumentCallbackName readCachedString readNodeGraphFromData addDocumentCallbackNode getLoadedSpriteSheet initWithData readFileWithCleanUp getOwner$ readNodeGraphFromFile createSceneWithNodeGraphFromFile getAnimationManagers$ setAnimationManagers], - CCBAnimationManager::[setAnimationCompletedCallback], CCCardinalSpline.*::[create actionWithDuration setPoints], CCScheduler::[pause resume unscheduleAllSelectorsForTarget], CCTextureCache::[addPVRTCImage], CCTimer::[getSelector], - CC.*Loader.*::[*], *::[copyWith.* onEnter.* onExit.* description getObjectType .*RGB.* .*HSV.*], CCFileUtils::[(g|s)etSearchResolutionsOrder$ (g|s)etSearchPaths$ getClassTypeInfo], - SimpleAudioEngine::[getClassTypeInfo], - CCScrollView::[(g|s)etDelegate$], - CCTableView::[create (g|s)etDataSource$ (g|s)etDelegate] + SimpleAudioEngine::[getClassTypeInfo] rename_functions = CCDirector::[sharedDirector=getInstance], CCSpriteFrameCache::[sharedSpriteFrameCache=getInstance addSpriteFramesWithFile=addSpriteFrames spriteFrameByName=getSpriteFrame isFlipX=isFlippedX isFlipY=isFlippedY], @@ -122,15 +116,12 @@ rename_functions = CCDirector::[sharedDirector=getInstance], CCScheduler::[unscheduleAllSelectorsForTarget=unscheduleAllCallbacksForTarget unscheduleAll=unscheduleAllCallbacks], SimpleAudioEngine::[sharedEngine=getInstance preloadBackgroundMusic=preloadMusic setBackgroundMusicVolume=setMusicVolume getBackgroundMusicVolume=getMusicVolume playBackgroundMusic=playMusic stopBackgroundMusic=stopMusic pauseBackgroundMusic=pauseMusic resumeBackgroundMusic=resumeMusic rewindBackgroundMusic=rewindMusic isBackgroundMusicPlaying=isMusicPlaying willPlayBackgroundMusic=willPlayMusic], CCCamera.*::[setUpXYZ=setUp getUpXYZ=getUp setEyeXYZ=setEye getEyeXYZ=getEye setCenterXYZ=setCenter getCenterXYZ=getCenter], - CCBReader::[getAnimationManager=getActionManager setAnimationManager=setActionManager], CCTMXTiledMap::[layerNamed=getLayer objectGroupNamed=getObjectGroup propertyNamed=getProperty], CCTexture2D::[defaultAlphaPixelFormat=getDefaultAlphaPixelFormat], CCFileUtils::[sharedFileUtils=getInstance loadFilenameLookupDictionaryFromFile=loadFilenameLookup] rename_classes = CCParticleSystemQuad::CCParticleSystem, - SimpleAudioEngine::AudioEngine, - CCBReader::CC_Reader, - CCBAnimationManager::CCAnimationManager + SimpleAudioEngine::AudioEngine # for all class names, should we remove something when registering in the target VM? remove_prefix = CC diff --git a/tools/tojs/cocos2dx_extension.ini b/tools/tojs/cocos2dx_extension.ini new file mode 100644 index 0000000000..a68e277887 --- /dev/null +++ b/tools/tojs/cocos2dx_extension.ini @@ -0,0 +1,65 @@ +[cocos2dx_extension] +# the prefix to be added to the generated functions. You might or might not use this in your own +# templates +prefix = cocos2dx_extension + +# create a target namespace (in javascript, this would create some code like the equiv. to `ns = ns || {}`) +# all classes will be embedded in that namespace +target_namespace = cc + +android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/include +android_flags = -D_SIZE_T_DEFINED_ + +clang_headers = -I%(clangllvmdir)s/lib/clang/3.1/include +clang_flags = -nostdinc -x c++ + +cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/extensions +cocos_flags = -DANDROID -DCOCOS2D_JAVASCRIPT + +cxxgenerator_headers = -I%(cxxgeneratordir)s/targets/spidermonkey/common + +# extra arguments for clang +extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s + +# what headers to parse +headers = %(cocosdir)s/extensions/cocos-ext.h + +# what classes to produce code for. You can use regular expressions here. When testing the regular +# expression, it will be enclosed in "^$", like this: "^CCMenu*$". +classes = CCBReader.* CCBAnimationManager.* CCScale9Sprite CCControl$ CCControlButton.* CCScrollView$ CCTableView$ CCTableViewCell$ + +# what should we skip? in the format ClassName::[function function] +# ClassName is a regular expression, but will be used like this: "^ClassName$" functions are also +# regular expressions, they will not be surrounded by "^$". If you want to skip a whole class, just +# add a single "*" as functions. See bellow for several examples. A special class name is "*", which +# will apply to all class names. This is a convenience wildcard to be able to skip similar named +# functions from all classes. + +skip = CCBReader::[^CCBReader$ addOwnerCallbackName isJSControlled readByte getCCBMemberVariableAssigner readFloat getCCBSelectorResolver toLowerCase lastPathComponent deletePathExtension endsWith concat getResolutionScale getAnimatedProperties readBool readInt addOwnerCallbackNode addDocumentCallbackName readCachedString readNodeGraphFromData addDocumentCallbackNode getLoadedSpriteSheet initWithData readFileWithCleanUp getOwner$ readNodeGraphFromFile createSceneWithNodeGraphFromFile getAnimationManagers$ setAnimationManagers], + CCBAnimationManager::[setAnimationCompletedCallback], + CCScrollView::[(g|s)etDelegate$], + CC.*Delegate::[*], + CC.*Loader.*::[*], + CCTableView::[create (g|s)etDataSource$ (g|s)etDelegate] + +rename_functions = CCBReader::[getAnimationManager=getActionManager setAnimationManager=setActionManager] + +rename_classes = CCBReader::CC_Reader, + CCBAnimationManager::CCAnimationManager + +# for all class names, should we remove something when registering in the target VM? +remove_prefix = CC + +# classes for which there will be no "parent" lookup +classes_have_no_parents = + +# base classes which will be skipped when their sub-classes found them. +base_classes_to_skip = CCObject + +# classes that create no constructor +# CCSet is special and we will use a hand-written constructor +abstract_classes = + +# Determining whether to use script object(js object) to control the lifecycle of native(cpp) object or the other way around. Supported values are 'yes' or 'no'. +script_control_cpp = no + diff --git a/tools/tojs/genbindings.sh b/tools/tojs/genbindings.sh index 48885fcd7f..d4755aa359 100755 --- a/tools/tojs/genbindings.sh +++ b/tools/tojs/genbindings.sh @@ -78,4 +78,7 @@ echo --- # Generate bindings for cocos2dx echo "Generating bindings for cocos2dx..." set -x -LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx.ini -s cocos2d-x -o ${COCOS2DX_ROOT}/scripting/javascript/bindings/generated +LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx.ini -s cocos2d-x -o ${COCOS2DX_ROOT}/scripting/javascript/bindings/generated -n jsb_cocos2dx_auto + +echo "Generating bindings for cocos2dx_extension..." +LD_LIBRARY_PATH=${CLANG_ROOT}/lib $PYTHON_BIN ${CXX_GENERATOR_ROOT}/generator.py ${TO_JS_ROOT}/cocos2dx_extension.ini -s cocos2dx_extension -o ${COCOS2DX_ROOT}/scripting/javascript/bindings/generated -n jsb_cocos2dx_extension_auto \ No newline at end of file From a250d835135e5ecaf8e1265061d54fea719ca441 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 11 Mar 2013 17:13:35 +0800 Subject: [PATCH 2/4] Updating the submodule of cocos2d-js-tests. --- samples/Javascript/Shared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Javascript/Shared b/samples/Javascript/Shared index 0455fdce1e..46ec2d5643 160000 --- a/samples/Javascript/Shared +++ b/samples/Javascript/Shared @@ -1 +1 @@ -Subproject commit 0455fdce1ec89d6bf335e395b48882aaf875d38b +Subproject commit 46ec2d5643e70dfeea0245a1024bdbd75ea17c25 From 32f0cf599361432f293f62b7a1addd1bb1996ff5 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 11 Mar 2013 17:21:01 +0800 Subject: [PATCH 3/4] Updating the submodule reference of JS tests. --- samples/Javascript/Shared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Javascript/Shared b/samples/Javascript/Shared index 46ec2d5643..aebbb51742 160000 --- a/samples/Javascript/Shared +++ b/samples/Javascript/Shared @@ -1 +1 @@ -Subproject commit 46ec2d5643e70dfeea0245a1024bdbd75ea17c25 +Subproject commit aebbb51742c5f8f01af670aa89a12c54de296438 From 2a032bc6c9bde04f50397e7a8705e655ba7fa2d2 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 11 Mar 2013 17:24:33 +0800 Subject: [PATCH 4/4] fixed #1748: Updating win32 project setting. --- .../bindings/proj.win32/libJSBinding.vcxproj | 25 ++++++--- .../proj.win32/libJSBinding.vcxproj.filters | 51 ++++++++++++++----- 2 files changed, 56 insertions(+), 20 deletions(-) diff --git a/scripting/javascript/bindings/proj.win32/libJSBinding.vcxproj b/scripting/javascript/bindings/proj.win32/libJSBinding.vcxproj index f5acc7afc7..e0d07f6137 100644 --- a/scripting/javascript/bindings/proj.win32/libJSBinding.vcxproj +++ b/scripting/javascript/bindings/proj.win32/libJSBinding.vcxproj @@ -13,7 +13,9 @@ - + + + @@ -28,7 +30,9 @@ - + + + @@ -46,12 +50,17 @@ - - - - - - + + + + + + + + + + + {39379840-825A-45A0-B363-C09FFEF864BD} diff --git a/scripting/javascript/bindings/proj.win32/libJSBinding.vcxproj.filters b/scripting/javascript/bindings/proj.win32/libJSBinding.vcxproj.filters index 6f60b8a85f..17f920d148 100644 --- a/scripting/javascript/bindings/proj.win32/libJSBinding.vcxproj.filters +++ b/scripting/javascript/bindings/proj.win32/libJSBinding.vcxproj.filters @@ -14,9 +14,6 @@ - - generated - manual @@ -53,11 +50,17 @@ manual + + generated + + + generated + + + manual + - - generated - manual @@ -109,24 +112,48 @@ manual + + generated + + + generated + + + manual + - + generated - + + generated + + js - + js - + js - + js - + + js + + + js + + + js + + + js + + js