mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
Add config for dragonbones jsbinding.
This commit is contained in:
@@ -151,51 +151,66 @@ TextureAtlasData* CCFactory::loadTextureAtlasData(const std::string& filePath, c
|
||||
textureAtlasData->imagePath = basePath + textureAtlasData->imagePath;
|
||||
}
|
||||
|
||||
_initTextureAtlasData(textureAtlasData);
|
||||
|
||||
return textureAtlasData;
|
||||
}
|
||||
|
||||
TextureAtlasData* CCFactory::parseTextueAtlasData(const std::string& atlasData, const std::string& texturePath, const std::string& dragonBonesName, float scale)
|
||||
{
|
||||
const auto textureAtlasData = static_cast<CCTextureAtlasData*>(parseTextureAtlasData(atlasData.c_str(), nullptr, dragonBonesName, scale));
|
||||
textureAtlasData->imagePath = texturePath;
|
||||
_initTextureAtlasData(textureAtlasData);
|
||||
|
||||
return textureAtlasData;
|
||||
|
||||
}
|
||||
|
||||
void CCFactory::_initTextureAtlasData(TextureAtlasData* atlasData)
|
||||
{
|
||||
const auto textureCache = cocos2d::Director::getInstance()->getTextureCache();
|
||||
auto texture = textureCache->getTextureForKey(textureAtlasData->imagePath);
|
||||
auto texture = textureCache->getTextureForKey(atlasData->imagePath);
|
||||
if (!texture)
|
||||
{
|
||||
const auto defaultPixelFormat = cocos2d::Texture2D::getDefaultAlphaPixelFormat();
|
||||
auto pixelFormat = defaultPixelFormat;
|
||||
switch (textureAtlasData->format)
|
||||
switch (atlasData->format)
|
||||
{
|
||||
case TextureFormat::RGBA8888:
|
||||
pixelFormat = cocos2d::Texture2D::PixelFormat::RGBA8888;
|
||||
break;
|
||||
|
||||
|
||||
case TextureFormat::BGRA8888:
|
||||
pixelFormat = cocos2d::Texture2D::PixelFormat::BGRA8888;
|
||||
break;
|
||||
|
||||
|
||||
case TextureFormat::RGBA4444:
|
||||
pixelFormat = cocos2d::Texture2D::PixelFormat::RGBA4444;
|
||||
break;
|
||||
|
||||
|
||||
case TextureFormat::RGB888:
|
||||
pixelFormat = cocos2d::Texture2D::PixelFormat::RGB888;
|
||||
break;
|
||||
|
||||
|
||||
case TextureFormat::RGB565:
|
||||
pixelFormat = cocos2d::Texture2D::PixelFormat::RGB565;
|
||||
break;
|
||||
|
||||
|
||||
case TextureFormat::RGBA5551:
|
||||
pixelFormat = cocos2d::Texture2D::PixelFormat::RGB5A1;
|
||||
break;
|
||||
|
||||
|
||||
case TextureFormat::DEFAULT:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
cocos2d::Texture2D::setDefaultAlphaPixelFormat(pixelFormat);
|
||||
texture = textureCache->addImage(textureAtlasData->imagePath);
|
||||
texture = textureCache->addImage(atlasData->imagePath);
|
||||
cocos2d::Texture2D::setDefaultAlphaPixelFormat(defaultPixelFormat);
|
||||
}
|
||||
|
||||
textureAtlasData->texture = texture;
|
||||
|
||||
return textureAtlasData;
|
||||
|
||||
static_cast<CCTextureAtlasData*>(atlasData)->texture = texture;
|
||||
}
|
||||
|
||||
CCArmatureDisplay * CCFactory::buildArmatureDisplay(const std::string& armatureName, const std::string& dragonBonesName, const std::string& skinName) const
|
||||
|
||||
@@ -24,7 +24,11 @@ protected:
|
||||
public:
|
||||
virtual DragonBonesData* loadDragonBonesData(const std::string& filePath, const std::string& dragonBonesName = "");
|
||||
virtual TextureAtlasData* loadTextureAtlasData(const std::string& filePath, const std::string& dragonBonesName = "", float scale = 0.f);
|
||||
virtual TextureAtlasData* parseTextueAtlasData(const std::string& atlasData, const std::string& texturePath, const std::string& dragonBonesName = "", float scale = 0.f);
|
||||
virtual CCArmatureDisplay* buildArmatureDisplay(const std::string& armatureName, const std::string& dragonBonesName = "", const std::string& skinName = "") const;
|
||||
|
||||
private:
|
||||
void _initTextureAtlasData(TextureAtlasData* atlasData);
|
||||
};
|
||||
|
||||
DRAGONBONES_NAMESPACE_END
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Chukong Technologies Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "scripting/js-bindings/manual/dragonbones/jsb_cocos2dx_dragonbones_manual.h"
|
||||
#include "scripting/js-bindings/manual/ScriptingCore.h"
|
||||
#include "scripting/js-bindings/manual/cocos2d_specifics.hpp"
|
||||
#include "editor-support/dragonbones/cocos2dx/CCDragonBonesHeaders.h"
|
||||
|
||||
using namespace dragonBones;
|
||||
|
||||
bool js_cocos2dx_dragonbones_Armature_getAnimation(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
|
||||
js_proxy_t *proxy = jsb_get_js_proxy(obj);
|
||||
dragonBones::Armature* cobj = (dragonBones::Armature *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_dragonbones_Armature_getAnimation : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
dragonBones::Animation& ret = cobj->getAnimation();
|
||||
jsval jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<dragonBones::Animation>(cx, (dragonBones::Animation*)&ret));
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_dragonbones_Armature_getAnimation : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
|
||||
extern JSObject *jsb_dragonBones_Armature_prototype;
|
||||
|
||||
void register_all_cocos2dx_dragonbones_manual(JSContext* cx, JS::HandleObject global)
|
||||
{
|
||||
JS::RootedObject armature(cx, jsb_dragonBones_Armature_prototype);
|
||||
JS_DefineFunction(cx, armature, "getAnimation", js_cocos2dx_dragonbones_Armature_getAnimation, 0, JSPROP_ENUMERATE | JSPROP_PERMANENT);
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2016 Chukong Technologies Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __jsb_cocos2dx_dragonbones_manual__
|
||||
#define __jsb_cocos2dx_dragonbones_manual__
|
||||
|
||||
#include "jsapi.h"
|
||||
|
||||
void register_all_cocos2dx_dragonbones_manual(JSContext* cx, JS::HandleObject global);
|
||||
|
||||
bool js_cocos2dx_dragonbones_Armature_getAnimation(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
#endif /* defined(__jsb_cocos2dx_dragonbones_manual__) */
|
||||
@@ -5,12 +5,14 @@
|
||||
#include "scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.hpp"
|
||||
#include "scripting/js-bindings/auto/jsb_cocos2dx_builder_auto.hpp"
|
||||
#include "scripting/js-bindings/auto/jsb_cocos2dx_spine_auto.hpp"
|
||||
#include "scripting/js-bindings/auto/jsb_cocos2dx_dragonbones_auto.hpp"
|
||||
#include "jsb_creator_auto.hpp"
|
||||
#include "scripting/js-bindings/auto/jsb_cocos2dx_extension_auto.hpp"
|
||||
#include "scripting/js-bindings/manual/ui/jsb_cocos2dx_ui_manual.h"
|
||||
#include "scripting/js-bindings/manual/cocostudio/jsb_cocos2dx_studio_manual.h"
|
||||
#include "scripting/js-bindings/manual/cocosbuilder/js_bindings_ccbreader.h"
|
||||
#include "scripting/js-bindings/manual/spine/jsb_cocos2dx_spine_manual.h"
|
||||
#include "scripting/js-bindings/manual/dragonbones/jsb_cocos2dx_dragonbones_manual.h"
|
||||
#include "scripting/js-bindings/manual/extension/jsb_cocos2dx_extension_manual.h"
|
||||
#include "scripting/js-bindings/manual/localstorage/js_bindings_system_registration.h"
|
||||
#include "scripting/js-bindings/manual/chipmunk/js_bindings_chipmunk_registration.h"
|
||||
@@ -69,6 +71,10 @@ int js_module_register()
|
||||
sc->addRegisterCallback(register_all_cocos2dx_spine);
|
||||
sc->addRegisterCallback(register_all_cocos2dx_spine_manual);
|
||||
|
||||
// dragonbones can be commented out to reduce the package
|
||||
sc->addRegisterCallback(register_all_cocos2dx_dragonbones);
|
||||
sc->addRegisterCallback(register_all_cocos2dx_dragonbones_manual);
|
||||
|
||||
// register creator
|
||||
sc->addRegisterCallback(register_all_creator);
|
||||
|
||||
|
||||
+32
@@ -184,6 +184,14 @@
|
||||
BAFF7DF21D6196D40051B92F /* js_bindings_chipmunk_functions.h in Headers */ = {isa = PBXBuildFile; fileRef = BAFF7DE71D6196D40051B92F /* js_bindings_chipmunk_functions.h */; };
|
||||
BAFF7DF31D6196D40051B92F /* js_bindings_chipmunk_functions.h in Headers */ = {isa = PBXBuildFile; fileRef = BAFF7DE71D6196D40051B92F /* js_bindings_chipmunk_functions.h */; };
|
||||
ED3057C71BEC7C8C0083C3ED /* libjs_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ED3057C61BEC7C8C0083C3ED /* libjs_static.a */; };
|
||||
FA6F1BB31D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6F1BB11D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.cpp */; };
|
||||
FA6F1BB41D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6F1BB11D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.cpp */; };
|
||||
FA6F1BB51D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA6F1BB21D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.hpp */; };
|
||||
FA6F1BB61D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.hpp in Headers */ = {isa = PBXBuildFile; fileRef = FA6F1BB21D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.hpp */; };
|
||||
FA6F1BBA1D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6F1BB81D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.cpp */; };
|
||||
FA6F1BBB1D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FA6F1BB81D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.cpp */; };
|
||||
FA6F1BBC1D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6F1BB91D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.h */; };
|
||||
FA6F1BBD1D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.h in Headers */ = {isa = PBXBuildFile; fileRef = FA6F1BB91D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@@ -285,6 +293,10 @@
|
||||
BAFF7DE71D6196D40051B92F /* js_bindings_chipmunk_functions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = js_bindings_chipmunk_functions.h; sourceTree = "<group>"; };
|
||||
ED0F39451BEC3E8E00E70AD4 /* libjs_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjs_static.a; path = ../../../../external/ios/libs/libjs_static.a; sourceTree = "<group>"; };
|
||||
ED3057C61BEC7C8C0083C3ED /* libjs_static.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjs_static.a; path = ../../../../external/mac/libs/libjs_static.a; sourceTree = "<group>"; };
|
||||
FA6F1BB11D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_dragonbones_auto.cpp; sourceTree = "<group>"; };
|
||||
FA6F1BB21D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = jsb_cocos2dx_dragonbones_auto.hpp; sourceTree = "<group>"; };
|
||||
FA6F1BB81D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jsb_cocos2dx_dragonbones_manual.cpp; sourceTree = "<group>"; };
|
||||
FA6F1BB91D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = jsb_cocos2dx_dragonbones_manual.h; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@@ -332,6 +344,8 @@
|
||||
1A119E2E18BDF19200352BAA /* auto */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA6F1BB11D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.cpp */,
|
||||
FA6F1BB21D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.hpp */,
|
||||
BA127E611D791E21002C5B50 /* js_bindings_chipmunk_auto_classes_registration.h */,
|
||||
BA127E621D791E21002C5B50 /* js_bindings_chipmunk_auto_classes.cpp */,
|
||||
BA127E631D791E21002C5B50 /* js_bindings_chipmunk_auto_classes.h */,
|
||||
@@ -372,6 +386,7 @@
|
||||
1A119E4118BDF19200352BAA /* manual */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA6F1BB71D816265007DD223 /* dragonbones */,
|
||||
4DFA4BFE1CBCBC4E00E3B736 /* js_module_register.cpp */,
|
||||
4DFA4BFF1CBCBC4E00E3B736 /* js_module_register.h */,
|
||||
4DFA4C001CBCBC4E00E3B736 /* js-BindingsExport.h */,
|
||||
@@ -517,6 +532,15 @@
|
||||
name = component;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FA6F1BB71D816265007DD223 /* dragonbones */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA6F1BB81D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.cpp */,
|
||||
FA6F1BB91D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.h */,
|
||||
);
|
||||
path = dragonbones;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
@@ -560,8 +584,10 @@
|
||||
0541A74F1973876100E45470 /* JavaScriptObjCBridge.h in Headers */,
|
||||
BA127E671D791E21002C5B50 /* js_bindings_chipmunk_auto_classes_registration.h in Headers */,
|
||||
BAFF7DEE1D6196D40051B92F /* js_bindings_chipmunk_functions_registration.h in Headers */,
|
||||
FA6F1BBC1D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.h in Headers */,
|
||||
1AB5E62D18D05BC80088DAA4 /* jsb_cocos2dx_ui_auto.hpp in Headers */,
|
||||
1A119ED918BDF19200352BAA /* js_bindings_opengl.h in Headers */,
|
||||
FA6F1BB51D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.hpp in Headers */,
|
||||
BA4095C41A6F730A005E53F6 /* jsb_cocos2dx_studio_conversions.h in Headers */,
|
||||
1A119EC718BDF19200352BAA /* jsb_cocos2dx_studio_manual.h in Headers */,
|
||||
4DFA4C051CBCBC4E00E3B736 /* js-BindingsExport.h in Headers */,
|
||||
@@ -580,6 +606,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1A119EA418BDF19200352BAA /* jsb_cocos2dx_studio_auto.hpp in Headers */,
|
||||
FA6F1BB61D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.hpp in Headers */,
|
||||
B38AD56B1B1D384A0057DD7F /* jsb_cocos2dx_experimental_video_manual.h in Headers */,
|
||||
1A119F0218BDF19200352BAA /* ScriptingCore.h in Headers */,
|
||||
4DFA4C061CBCBC4E00E3B736 /* js-BindingsExport.h in Headers */,
|
||||
@@ -605,6 +632,7 @@
|
||||
1A119ED618BDF19200352BAA /* js_bindings_core.h in Headers */,
|
||||
1A119EC418BDF19200352BAA /* js_bindings_ccbreader.h in Headers */,
|
||||
1A119EE018BDF19200352BAA /* jsb_helper.h in Headers */,
|
||||
FA6F1BBD1D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.h in Headers */,
|
||||
1A119ECC18BDF19200352BAA /* jsb_cocos2dx_extension_manual.h in Headers */,
|
||||
BAFF7DE91D6196D40051B92F /* js_bindings_chipmunk_auto_classes_registration.h in Headers */,
|
||||
1A119EF018BDF19200352BAA /* js_bindings_system_functions.h in Headers */,
|
||||
@@ -712,6 +740,7 @@
|
||||
A60A9D4C1C2008F60070800A /* js_bindings_chipmunk_registration.cpp in Sources */,
|
||||
BAFF7DEA1D6196D40051B92F /* js_bindings_chipmunk_auto_classes.cpp in Sources */,
|
||||
1A119EC518BDF19200352BAA /* jsb_cocos2dx_studio_manual.cpp in Sources */,
|
||||
FA6F1BB31D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.cpp in Sources */,
|
||||
1A119E8F18BDF19200352BAA /* jsb_cocos2dx_extension_auto.cpp in Sources */,
|
||||
1A119ED718BDF19200352BAA /* js_bindings_opengl.cpp in Sources */,
|
||||
1AB5E62B18D05BC80088DAA4 /* jsb_cocos2dx_ui_auto.cpp in Sources */,
|
||||
@@ -722,6 +751,7 @@
|
||||
1A119EE518BDF19200352BAA /* jsb_opengl_manual.cpp in Sources */,
|
||||
1A119F0518BDF19200352BAA /* jsb_cocos2dx_spine_manual.cpp in Sources */,
|
||||
BA4095C21A6F730A005E53F6 /* jsb_cocos2dx_studio_conversions.cpp in Sources */,
|
||||
FA6F1BBA1D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.cpp in Sources */,
|
||||
4DFA4C011CBCBC4E00E3B736 /* js_module_register.cpp in Sources */,
|
||||
1A119E8318BDF19200352BAA /* jsb_cocos2dx_auto.cpp in Sources */,
|
||||
4DFA4C101CBCC49000E3B736 /* jsb_creator_auto.cpp in Sources */,
|
||||
@@ -750,6 +780,7 @@
|
||||
4DFA4C021CBCBC4E00E3B736 /* js_module_register.cpp in Sources */,
|
||||
1A119EEA18BDF19200352BAA /* jsb_opengl_registration.cpp in Sources */,
|
||||
1A119EF818BDF19200352BAA /* jsb_websocket.cpp in Sources */,
|
||||
FA6F1BB41D815C2C007DD223 /* jsb_cocos2dx_dragonbones_auto.cpp in Sources */,
|
||||
1A119ED418BDF19200352BAA /* js_bindings_core.cpp in Sources */,
|
||||
1A119EC218BDF19200352BAA /* js_bindings_ccbreader.cpp in Sources */,
|
||||
A60A9D571C200D550070800A /* js_bindings_chipmunk_registration.cpp in Sources */,
|
||||
@@ -776,6 +807,7 @@
|
||||
1A119ECA18BDF19200352BAA /* jsb_cocos2dx_extension_manual.cpp in Sources */,
|
||||
4B22F4AA1B159A7A0044C14E /* jsb_cocos2dx_experimental_webView_manual.cpp in Sources */,
|
||||
1A119EA218BDF19200352BAA /* jsb_cocos2dx_studio_auto.cpp in Sources */,
|
||||
FA6F1BBB1D816265007DD223 /* jsb_cocos2dx_dragonbones_manual.cpp in Sources */,
|
||||
1A119EDC18BDF19200352BAA /* js_manual_conversions.cpp in Sources */,
|
||||
83A5661A18DA878400FC31A0 /* jsb_socketio.cpp in Sources */,
|
||||
1A119EE218BDF19200352BAA /* jsb_opengl_functions.cpp in Sources */,
|
||||
|
||||
Submodule native/tools/bindings-generator updated: d73c478763...f60f8bc559
@@ -0,0 +1,43 @@
|
||||
[cocos2dx_dragonbones]
|
||||
prefix = cocos2dx_dragonbones
|
||||
|
||||
target_namespace = dragonBones
|
||||
|
||||
android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.8/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.9/include
|
||||
android_flags = -D_SIZE_T_DEFINED_
|
||||
|
||||
clang_headers = -I%(clangllvmdir)s/%(clang_include)s
|
||||
clang_flags = -nostdinc -x c++ -std=c++11 -U __SSE__ -DNO_JS_ASSERT -DUINT32_MAX=0xffffffff
|
||||
|
||||
cocos_headers = -I%(cocosdir)s/cocos -I%(cocosdir)s/cocos/editor-support -I%(cocosdir)s/cocos/platform/android -I%(cocosdir)s/external/android/include -I%(cocosdir)s/external/sources -I%(cocosdir)s/external/android/armeabi-v7a/include -I%(cocosdir)s/external/android/armeabi-v7a/include/spidermonkey
|
||||
|
||||
cocos_flags = -DANDROID
|
||||
|
||||
cxxgenerator_headers =
|
||||
|
||||
# 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 %(extra_flags)s
|
||||
|
||||
headers = %(cocosdir)s/cocos/editor-support/dragonbones/cocos2dx/CCDragonBonesHeaders.h
|
||||
|
||||
classes = DragonBonesData CCFactory CCArmatureDisplay Armature CCSlot WorldClock Animation Slot BaseFactory BaseObject IAnimateble IArmatureDisplay
|
||||
|
||||
abstract_classes = Slot BaseFactory BaseObject IAnimateble IArmatureDisplay
|
||||
|
||||
skip = CCFactory::[loadDragonBonesData loadTextureAtlasData],
|
||||
BaseFactory::[parseTextueAtlasData replaceSlotDisplayList getTextureAtlasData copyAnimationsToArmature replaceSlotDisplay],
|
||||
Armature::[getArmatureData getAnimation getBones getSlots],
|
||||
Animation::[setAnimations getAnimations],
|
||||
Slot::[setDisplayList getDisplayList _setColor _setDisplayList]
|
||||
|
||||
remove_prefix =
|
||||
|
||||
classes_have_no_parents =
|
||||
|
||||
base_classes_to_skip =
|
||||
|
||||
script_control_cpp =
|
||||
|
||||
rename_functions =
|
||||
|
||||
rename_classes =
|
||||
@@ -157,6 +157,7 @@ def main():
|
||||
'cocos2dx_ui.ini' : ('cocos2dx_ui', 'jsb_cocos2dx_ui_auto'), \
|
||||
'cocos2dx_studio.ini' : ('cocos2dx_studio', 'jsb_cocos2dx_studio_auto'), \
|
||||
'cocos2dx_spine.ini' : ('cocos2dx_spine', 'jsb_cocos2dx_spine_auto'), \
|
||||
'cocos2dx_dragonbones.ini' : ('cocos2dx_dragonbones', 'jsb_cocos2dx_dragonbones_auto'), \
|
||||
'cocos2dx_experimental_webView.ini' : ('cocos2dx_experimental_webView', 'jsb_cocos2dx_experimental_webView_auto'), \
|
||||
'cocos2dx_experimental_video.ini' : ('cocos2dx_experimental_video', 'jsb_cocos2dx_experimental_video_auto'), \
|
||||
'creator.ini': ('creator', 'jsb_creator_auto'),
|
||||
|
||||
Reference in New Issue
Block a user