mirror of https://github.com/axmolengine/axmol.git
Merge pull request #13533 from CocosRobot/update_lua_bindings_1440396546
[ci skip][AUTO]: updating luabinding & jsbinding automatically
This commit is contained in:
commit
5f56d1f696
|
@ -285,6 +285,54 @@ Animate3D : function (
|
|||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class TextureCube
|
||||
*/
|
||||
jsb.TextureCube = {
|
||||
|
||||
/**
|
||||
* @method reloadTexture
|
||||
* @return {bool}
|
||||
*/
|
||||
reloadTexture : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method create
|
||||
* @param {String} arg0
|
||||
* @param {String} arg1
|
||||
* @param {String} arg2
|
||||
* @param {String} arg3
|
||||
* @param {String} arg4
|
||||
* @param {String} arg5
|
||||
* @return {cc.TextureCube}
|
||||
*/
|
||||
create : function (
|
||||
str,
|
||||
str,
|
||||
str,
|
||||
str,
|
||||
str,
|
||||
str
|
||||
)
|
||||
{
|
||||
return cc.TextureCube;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method TextureCube
|
||||
* @constructor
|
||||
*/
|
||||
TextureCube : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class AttachNode
|
||||
*/
|
||||
|
@ -1550,54 +1598,6 @@ Terrain : function (
|
|||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class TextureCube
|
||||
*/
|
||||
jsb.TextureCube = {
|
||||
|
||||
/**
|
||||
* @method reloadTexture
|
||||
* @return {bool}
|
||||
*/
|
||||
reloadTexture : function (
|
||||
)
|
||||
{
|
||||
return false;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method create
|
||||
* @param {String} arg0
|
||||
* @param {String} arg1
|
||||
* @param {String} arg2
|
||||
* @param {String} arg3
|
||||
* @param {String} arg4
|
||||
* @param {String} arg5
|
||||
* @return {cc.TextureCube}
|
||||
*/
|
||||
create : function (
|
||||
str,
|
||||
str,
|
||||
str,
|
||||
str,
|
||||
str,
|
||||
str
|
||||
)
|
||||
{
|
||||
return cc.TextureCube;
|
||||
},
|
||||
|
||||
/**
|
||||
* @method TextureCube
|
||||
* @constructor
|
||||
*/
|
||||
TextureCube : function (
|
||||
)
|
||||
{
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @class Bundle3D
|
||||
*/
|
||||
|
|
|
@ -837,6 +837,152 @@ void js_register_cocos2dx_3d_Animate3D(JSContext *cx, JS::HandleObject global) {
|
|||
}
|
||||
}
|
||||
|
||||
JSClass *jsb_cocos2d_TextureCube_class;
|
||||
JSObject *jsb_cocos2d_TextureCube_prototype;
|
||||
|
||||
bool js_cocos2dx_3d_TextureCube_reloadTexture(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);
|
||||
cocos2d::TextureCube* cobj = (cocos2d::TextureCube *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_TextureCube_reloadTexture : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
bool ret = cobj->reloadTexture();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_3d_TextureCube_reloadTexture : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_3d_TextureCube_create(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
if (argc == 6) {
|
||||
std::string arg0;
|
||||
std::string arg1;
|
||||
std::string arg2;
|
||||
std::string arg3;
|
||||
std::string arg4;
|
||||
std::string arg5;
|
||||
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
||||
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
||||
ok &= jsval_to_std_string(cx, args.get(2), &arg2);
|
||||
ok &= jsval_to_std_string(cx, args.get(3), &arg3);
|
||||
ok &= jsval_to_std_string(cx, args.get(4), &arg4);
|
||||
ok &= jsval_to_std_string(cx, args.get(5), &arg5);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_TextureCube_create : Error processing arguments");
|
||||
cocos2d::TextureCube* ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::TextureCube>(cx, (cocos2d::TextureCube*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_cocos2dx_3d_TextureCube_create : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
cocos2d::TextureCube* cobj = new (std::nothrow) cocos2d::TextureCube();
|
||||
cocos2d::Ref *_ccobj = dynamic_cast<cocos2d::Ref *>(cobj);
|
||||
if (_ccobj) {
|
||||
_ccobj->autorelease();
|
||||
}
|
||||
TypeTest<cocos2d::TextureCube> t;
|
||||
js_type_class_t *typeClass = nullptr;
|
||||
std::string typeName = t.s_name();
|
||||
auto typeMapIter = _js_global_type_map.find(typeName);
|
||||
CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!");
|
||||
typeClass = typeMapIter->second;
|
||||
CCASSERT(typeClass, "The value is null.");
|
||||
// JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto);
|
||||
JS::RootedObject proto(cx, typeClass->proto.get());
|
||||
JS::RootedObject parent(cx, typeClass->parentProto.get());
|
||||
JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent));
|
||||
args.rval().set(OBJECT_TO_JSVAL(obj));
|
||||
// link the native object with the javascript object
|
||||
js_proxy_t* p = jsb_new_proxy(cobj, obj);
|
||||
AddNamedObjectRoot(cx, &p->obj, "cocos2d::TextureCube");
|
||||
if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok)
|
||||
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args);
|
||||
return true;
|
||||
}
|
||||
|
||||
extern JSObject *jsb_cocos2d_Texture2D_prototype;
|
||||
|
||||
void js_cocos2d_TextureCube_finalize(JSFreeOp *fop, JSObject *obj) {
|
||||
CCLOGINFO("jsbindings: finalizing JS object %p (TextureCube)", obj);
|
||||
}
|
||||
void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global) {
|
||||
jsb_cocos2d_TextureCube_class = (JSClass *)calloc(1, sizeof(JSClass));
|
||||
jsb_cocos2d_TextureCube_class->name = "TextureCube";
|
||||
jsb_cocos2d_TextureCube_class->addProperty = JS_PropertyStub;
|
||||
jsb_cocos2d_TextureCube_class->delProperty = JS_DeletePropertyStub;
|
||||
jsb_cocos2d_TextureCube_class->getProperty = JS_PropertyStub;
|
||||
jsb_cocos2d_TextureCube_class->setProperty = JS_StrictPropertyStub;
|
||||
jsb_cocos2d_TextureCube_class->enumerate = JS_EnumerateStub;
|
||||
jsb_cocos2d_TextureCube_class->resolve = JS_ResolveStub;
|
||||
jsb_cocos2d_TextureCube_class->convert = JS_ConvertStub;
|
||||
jsb_cocos2d_TextureCube_class->finalize = js_cocos2d_TextureCube_finalize;
|
||||
jsb_cocos2d_TextureCube_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2);
|
||||
|
||||
static JSPropertySpec properties[] = {
|
||||
JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("reloadTexture", js_cocos2dx_3d_TextureCube_reloadTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec st_funcs[] = {
|
||||
JS_FN("create", js_cocos2dx_3d_TextureCube_create, 6, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
jsb_cocos2d_TextureCube_prototype = JS_InitClass(
|
||||
cx, global,
|
||||
JS::RootedObject(cx, jsb_cocos2d_Texture2D_prototype),
|
||||
jsb_cocos2d_TextureCube_class,
|
||||
js_cocos2dx_3d_TextureCube_constructor, 0, // constructor
|
||||
properties,
|
||||
funcs,
|
||||
NULL, // no static properties
|
||||
st_funcs);
|
||||
// make the class enumerable in the registered namespace
|
||||
// bool found;
|
||||
//FIXME: Removed in Firefox v27
|
||||
// JS_SetPropertyAttributes(cx, global, "TextureCube", JSPROP_ENUMERATE | JSPROP_READONLY, &found);
|
||||
|
||||
// add the proto and JSClass to the type->js info hash table
|
||||
TypeTest<cocos2d::TextureCube> t;
|
||||
js_type_class_t *p;
|
||||
std::string typeName = t.s_name();
|
||||
if (_js_global_type_map.find(typeName) == _js_global_type_map.end())
|
||||
{
|
||||
p = (js_type_class_t *)malloc(sizeof(js_type_class_t));
|
||||
p->jsclass = jsb_cocos2d_TextureCube_class;
|
||||
p->proto = jsb_cocos2d_TextureCube_prototype;
|
||||
p->parentProto = jsb_cocos2d_Texture2D_prototype;
|
||||
_js_global_type_map.insert(std::make_pair(typeName, p));
|
||||
}
|
||||
}
|
||||
|
||||
JSClass *jsb_cocos2d_AttachNode_class;
|
||||
JSObject *jsb_cocos2d_AttachNode_prototype;
|
||||
|
||||
|
@ -4360,152 +4506,6 @@ void js_register_cocos2dx_3d_Terrain(JSContext *cx, JS::HandleObject global) {
|
|||
}
|
||||
}
|
||||
|
||||
JSClass *jsb_cocos2d_TextureCube_class;
|
||||
JSObject *jsb_cocos2d_TextureCube_prototype;
|
||||
|
||||
bool js_cocos2dx_3d_TextureCube_reloadTexture(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);
|
||||
cocos2d::TextureCube* cobj = (cocos2d::TextureCube *)(proxy ? proxy->ptr : NULL);
|
||||
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_3d_TextureCube_reloadTexture : Invalid Native Object");
|
||||
if (argc == 0) {
|
||||
bool ret = cobj->reloadTexture();
|
||||
jsval jsret = JSVAL_NULL;
|
||||
jsret = BOOLEAN_TO_JSVAL(ret);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_ReportError(cx, "js_cocos2dx_3d_TextureCube_reloadTexture : wrong number of arguments: %d, was expecting %d", argc, 0);
|
||||
return false;
|
||||
}
|
||||
bool js_cocos2dx_3d_TextureCube_create(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
if (argc == 6) {
|
||||
std::string arg0;
|
||||
std::string arg1;
|
||||
std::string arg2;
|
||||
std::string arg3;
|
||||
std::string arg4;
|
||||
std::string arg5;
|
||||
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
|
||||
ok &= jsval_to_std_string(cx, args.get(1), &arg1);
|
||||
ok &= jsval_to_std_string(cx, args.get(2), &arg2);
|
||||
ok &= jsval_to_std_string(cx, args.get(3), &arg3);
|
||||
ok &= jsval_to_std_string(cx, args.get(4), &arg4);
|
||||
ok &= jsval_to_std_string(cx, args.get(5), &arg5);
|
||||
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_3d_TextureCube_create : Error processing arguments");
|
||||
cocos2d::TextureCube* ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5);
|
||||
jsval jsret = JSVAL_NULL;
|
||||
do {
|
||||
if (ret) {
|
||||
js_proxy_t *jsProxy = js_get_or_create_proxy<cocos2d::TextureCube>(cx, (cocos2d::TextureCube*)ret);
|
||||
jsret = OBJECT_TO_JSVAL(jsProxy->obj);
|
||||
} else {
|
||||
jsret = JSVAL_NULL;
|
||||
}
|
||||
} while (0);
|
||||
args.rval().set(jsret);
|
||||
return true;
|
||||
}
|
||||
JS_ReportError(cx, "js_cocos2dx_3d_TextureCube_create : wrong number of arguments");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval *vp)
|
||||
{
|
||||
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
|
||||
bool ok = true;
|
||||
cocos2d::TextureCube* cobj = new (std::nothrow) cocos2d::TextureCube();
|
||||
cocos2d::Ref *_ccobj = dynamic_cast<cocos2d::Ref *>(cobj);
|
||||
if (_ccobj) {
|
||||
_ccobj->autorelease();
|
||||
}
|
||||
TypeTest<cocos2d::TextureCube> t;
|
||||
js_type_class_t *typeClass = nullptr;
|
||||
std::string typeName = t.s_name();
|
||||
auto typeMapIter = _js_global_type_map.find(typeName);
|
||||
CCASSERT(typeMapIter != _js_global_type_map.end(), "Can't find the class type!");
|
||||
typeClass = typeMapIter->second;
|
||||
CCASSERT(typeClass, "The value is null.");
|
||||
// JSObject *obj = JS_NewObject(cx, typeClass->jsclass, typeClass->proto, typeClass->parentProto);
|
||||
JS::RootedObject proto(cx, typeClass->proto.get());
|
||||
JS::RootedObject parent(cx, typeClass->parentProto.get());
|
||||
JS::RootedObject obj(cx, JS_NewObject(cx, typeClass->jsclass, proto, parent));
|
||||
args.rval().set(OBJECT_TO_JSVAL(obj));
|
||||
// link the native object with the javascript object
|
||||
js_proxy_t* p = jsb_new_proxy(cobj, obj);
|
||||
AddNamedObjectRoot(cx, &p->obj, "cocos2d::TextureCube");
|
||||
if (JS_HasProperty(cx, obj, "_ctor", &ok) && ok)
|
||||
ScriptingCore::getInstance()->executeFunctionWithOwner(OBJECT_TO_JSVAL(obj), "_ctor", args);
|
||||
return true;
|
||||
}
|
||||
|
||||
extern JSObject *jsb_cocos2d_Texture2D_prototype;
|
||||
|
||||
void js_cocos2d_TextureCube_finalize(JSFreeOp *fop, JSObject *obj) {
|
||||
CCLOGINFO("jsbindings: finalizing JS object %p (TextureCube)", obj);
|
||||
}
|
||||
void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global) {
|
||||
jsb_cocos2d_TextureCube_class = (JSClass *)calloc(1, sizeof(JSClass));
|
||||
jsb_cocos2d_TextureCube_class->name = "TextureCube";
|
||||
jsb_cocos2d_TextureCube_class->addProperty = JS_PropertyStub;
|
||||
jsb_cocos2d_TextureCube_class->delProperty = JS_DeletePropertyStub;
|
||||
jsb_cocos2d_TextureCube_class->getProperty = JS_PropertyStub;
|
||||
jsb_cocos2d_TextureCube_class->setProperty = JS_StrictPropertyStub;
|
||||
jsb_cocos2d_TextureCube_class->enumerate = JS_EnumerateStub;
|
||||
jsb_cocos2d_TextureCube_class->resolve = JS_ResolveStub;
|
||||
jsb_cocos2d_TextureCube_class->convert = JS_ConvertStub;
|
||||
jsb_cocos2d_TextureCube_class->finalize = js_cocos2d_TextureCube_finalize;
|
||||
jsb_cocos2d_TextureCube_class->flags = JSCLASS_HAS_RESERVED_SLOTS(2);
|
||||
|
||||
static JSPropertySpec properties[] = {
|
||||
JS_PSG("__nativeObj", js_is_native_obj, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_PS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec funcs[] = {
|
||||
JS_FN("reloadTexture", js_cocos2dx_3d_TextureCube_reloadTexture, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
static JSFunctionSpec st_funcs[] = {
|
||||
JS_FN("create", js_cocos2dx_3d_TextureCube_create, 6, JSPROP_PERMANENT | JSPROP_ENUMERATE),
|
||||
JS_FS_END
|
||||
};
|
||||
|
||||
jsb_cocos2d_TextureCube_prototype = JS_InitClass(
|
||||
cx, global,
|
||||
JS::RootedObject(cx, jsb_cocos2d_Texture2D_prototype),
|
||||
jsb_cocos2d_TextureCube_class,
|
||||
js_cocos2dx_3d_TextureCube_constructor, 0, // constructor
|
||||
properties,
|
||||
funcs,
|
||||
NULL, // no static properties
|
||||
st_funcs);
|
||||
// make the class enumerable in the registered namespace
|
||||
// bool found;
|
||||
//FIXME: Removed in Firefox v27
|
||||
// JS_SetPropertyAttributes(cx, global, "TextureCube", JSPROP_ENUMERATE | JSPROP_READONLY, &found);
|
||||
|
||||
// add the proto and JSClass to the type->js info hash table
|
||||
TypeTest<cocos2d::TextureCube> t;
|
||||
js_type_class_t *p;
|
||||
std::string typeName = t.s_name();
|
||||
if (_js_global_type_map.find(typeName) == _js_global_type_map.end())
|
||||
{
|
||||
p = (js_type_class_t *)malloc(sizeof(js_type_class_t));
|
||||
p->jsclass = jsb_cocos2d_TextureCube_class;
|
||||
p->proto = jsb_cocos2d_TextureCube_prototype;
|
||||
p->parentProto = jsb_cocos2d_Texture2D_prototype;
|
||||
_js_global_type_map.insert(std::make_pair(typeName, p));
|
||||
}
|
||||
}
|
||||
|
||||
JSClass *jsb_cocos2d_Bundle3D_class;
|
||||
JSObject *jsb_cocos2d_Bundle3D_prototype;
|
||||
|
||||
|
|
|
@ -44,6 +44,17 @@ bool js_cocos2dx_3d_Animate3D_createWithFrames(JSContext *cx, uint32_t argc, jsv
|
|||
bool js_cocos2dx_3d_Animate3D_setTransitionTime(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_3d_Animate3D_Animate3D(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_TextureCube_class;
|
||||
extern JSObject *jsb_cocos2d_TextureCube_prototype;
|
||||
|
||||
bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void js_cocos2dx_3d_TextureCube_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_3d_TextureCube_reloadTexture(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_3d_TextureCube_create(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_3d_TextureCube_TextureCube(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_AttachNode_class;
|
||||
extern JSObject *jsb_cocos2d_AttachNode_prototype;
|
||||
|
||||
|
@ -219,17 +230,6 @@ bool js_cocos2dx_3d_Terrain_getMinHeight(JSContext *cx, uint32_t argc, jsval *vp
|
|||
bool js_cocos2dx_3d_Terrain_getMaxHeight(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_3d_Terrain_Terrain(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_TextureCube_class;
|
||||
extern JSObject *jsb_cocos2d_TextureCube_prototype;
|
||||
|
||||
bool js_cocos2dx_3d_TextureCube_constructor(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
void js_cocos2dx_3d_TextureCube_finalize(JSContext *cx, JSObject *obj);
|
||||
void js_register_cocos2dx_3d_TextureCube(JSContext *cx, JS::HandleObject global);
|
||||
void register_all_cocos2dx_3d(JSContext* cx, JS::HandleObject obj);
|
||||
bool js_cocos2dx_3d_TextureCube_reloadTexture(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_3d_TextureCube_create(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
bool js_cocos2dx_3d_TextureCube_TextureCube(JSContext *cx, uint32_t argc, jsval *vp);
|
||||
|
||||
extern JSClass *jsb_cocos2d_Bundle3D_class;
|
||||
extern JSObject *jsb_cocos2d_Bundle3D_prototype;
|
||||
|
||||
|
|
|
@ -11,6 +11,11 @@
|
|||
-- @field [parent=#cc] Animate3D#Animate3D Animate3D preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc TextureCube
|
||||
-- @field [parent=#cc] TextureCube#TextureCube TextureCube preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc AttachNode
|
||||
-- @field [parent=#cc] AttachNode#AttachNode AttachNode preloaded module
|
||||
|
@ -51,11 +56,6 @@
|
|||
-- @field [parent=#cc] Terrain#Terrain Terrain preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc TextureCube
|
||||
-- @field [parent=#cc] TextureCube#TextureCube TextureCube preloaded module
|
||||
|
||||
|
||||
--------------------------------------------------------
|
||||
-- the cc Bundle3D
|
||||
-- @field [parent=#cc] Bundle3D#Bundle3D Bundle3D preloaded module
|
||||
|
|
|
@ -1134,6 +1134,209 @@ int lua_register_cocos2dx_3d_Animate3D(lua_State* tolua_S)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_TextureCube_reloadTexture(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::TextureCube* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::TextureCube*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->reloadTexture();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:reloadTexture",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_TextureCube_setTexParameters(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::TextureCube* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::TextureCube*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Texture2D::TexParams arg0;
|
||||
|
||||
ok &= luaval_to_texparams(tolua_S, 2, &arg0, "cc.TextureCube:setTexParameters");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setTexParameters(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:setTexParameters",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_TextureCube_create(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 6)
|
||||
{
|
||||
std::string arg0;
|
||||
std::string arg1;
|
||||
std::string arg2;
|
||||
std::string arg3;
|
||||
std::string arg4;
|
||||
std::string arg5;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 6,&arg4, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 7,&arg5, "cc.TextureCube:create");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::TextureCube* ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5);
|
||||
object_to_luaval<cocos2d::TextureCube>(tolua_S, "cc.TextureCube",(cocos2d::TextureCube*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TextureCube:create",argc, 6);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_TextureCube_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::TextureCube* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_constructor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj = new cocos2d::TextureCube();
|
||||
cobj->autorelease();
|
||||
int ID = (int)cobj->_ID ;
|
||||
int* luaID = &cobj->_luaID ;
|
||||
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TextureCube");
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:TextureCube",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_constructor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_3d_TextureCube_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (TextureCube)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_3d_TextureCube(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.TextureCube");
|
||||
tolua_cclass(tolua_S,"TextureCube","cc.TextureCube","cc.Texture2D",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"TextureCube");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_3d_TextureCube_constructor);
|
||||
tolua_function(tolua_S,"reloadTexture",lua_cocos2dx_3d_TextureCube_reloadTexture);
|
||||
tolua_function(tolua_S,"setTexParameters",lua_cocos2dx_3d_TextureCube_setTexParameters);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_3d_TextureCube_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::TextureCube).name();
|
||||
g_luaType[typeName] = "cc.TextureCube";
|
||||
g_typeCast["TextureCube"] = "cc.TextureCube";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_AttachNode_create(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -5854,209 +6057,6 @@ int lua_register_cocos2dx_3d_Terrain(lua_State* tolua_S)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_TextureCube_reloadTexture(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::TextureCube* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::TextureCube*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->reloadTexture();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:reloadTexture",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_reloadTexture'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_TextureCube_setTexParameters(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::TextureCube* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::TextureCube*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Texture2D::TexParams arg0;
|
||||
|
||||
ok &= luaval_to_texparams(tolua_S, 2, &arg0, "cc.TextureCube:setTexParameters");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setTexParameters(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:setTexParameters",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_setTexParameters'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_TextureCube_create(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.TextureCube",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 6)
|
||||
{
|
||||
std::string arg0;
|
||||
std::string arg1;
|
||||
std::string arg2;
|
||||
std::string arg3;
|
||||
std::string arg4;
|
||||
std::string arg5;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 4,&arg2, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 5,&arg3, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 6,&arg4, "cc.TextureCube:create");
|
||||
ok &= luaval_to_std_string(tolua_S, 7,&arg5, "cc.TextureCube:create");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::TextureCube* ret = cocos2d::TextureCube::create(arg0, arg1, arg2, arg3, arg4, arg5);
|
||||
object_to_luaval<cocos2d::TextureCube>(tolua_S, "cc.TextureCube",(cocos2d::TextureCube*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TextureCube:create",argc, 6);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_3d_TextureCube_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::TextureCube* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_3d_TextureCube_constructor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj = new cocos2d::TextureCube();
|
||||
cobj->autorelease();
|
||||
int ID = (int)cobj->_ID ;
|
||||
int* luaID = &cobj->_luaID ;
|
||||
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"cc.TextureCube");
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.TextureCube:TextureCube",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_3d_TextureCube_constructor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_3d_TextureCube_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (TextureCube)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_3d_TextureCube(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"cc.TextureCube");
|
||||
tolua_cclass(tolua_S,"TextureCube","cc.TextureCube","cc.Texture2D",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"TextureCube");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_3d_TextureCube_constructor);
|
||||
tolua_function(tolua_S,"reloadTexture",lua_cocos2dx_3d_TextureCube_reloadTexture);
|
||||
tolua_function(tolua_S,"setTexParameters",lua_cocos2dx_3d_TextureCube_setTexParameters);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_3d_TextureCube_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::TextureCube).name();
|
||||
g_luaType[typeName] = "cc.TextureCube";
|
||||
g_typeCast["TextureCube"] = "cc.TextureCube";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_3d_Bundle3D_load(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
|
Loading…
Reference in New Issue