[ci skip][AUTO]: updating luabinding & jsbinding automatically

This commit is contained in:
CocosRobot 2016-07-25 09:39:34 +00:00
parent acddbf1284
commit e0abb981d5
8 changed files with 345 additions and 38 deletions

View File

@ -28,6 +28,16 @@ getMaxT : function (
return 0;
},
/**
* @method setAlphaTexture
* @param {cc.Texture2D} arg0
*/
setAlphaTexture : function (
texture2d
)
{
},
/**
* @method getStringForFormat
* @return {char}
@ -120,6 +130,16 @@ getPixelsHigh : function (
return 0;
},
/**
* @method getAlphaTextureName
* @return {unsigned int}
*/
getAlphaTextureName : function (
)
{
return 0;
},
/**
* @method getBitsPerPixelForFormat
* @param {cc.Texture2D::PixelFormat} pixelformat
@ -4248,11 +4268,13 @@ glprogram
/**
* @method getOrCreateWithGLProgramName
* @param {String} arg0
* @return {cc.GLProgramState}
*/
getOrCreateWithGLProgramName : function (
str
* @param {String|String} str
* @param {cc.Texture2D} texture2d
* @return {cc.GLProgramState|cc.GLProgramState}
*/
getOrCreateWithGLProgramName : function(
str,
texture2d
)
{
return cc.GLProgramState;
@ -21435,6 +21457,16 @@ waitForQuit : function (
{
},
/**
* @method setETC1AlphaFileSuffix
* @param {String} arg0
*/
setETC1AlphaFileSuffix : function (
str
)
{
},
/**
* @method TextureCache
* @constructor

View File

@ -66,6 +66,34 @@ bool js_cocos2dx_Texture2D_getMaxT(JSContext *cx, uint32_t argc, jsval *vp)
JS_ReportError(cx, "js_cocos2dx_Texture2D_getMaxT : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_Texture2D_setAlphaTexture(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
JS::RootedObject obj(cx, args.thisv().toObjectOrNull());
js_proxy_t *proxy = jsb_get_js_proxy(obj);
cocos2d::Texture2D* cobj = (cocos2d::Texture2D *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Texture2D_setAlphaTexture : Invalid Native Object");
if (argc == 1) {
cocos2d::Texture2D* arg0 = nullptr;
do {
if (args.get(0).isNull()) { arg0 = nullptr; break; }
if (!args.get(0).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JS::RootedObject tmpObj(cx, args.get(0).toObjectOrNull());
jsProxy = jsb_get_js_proxy(tmpObj);
arg0 = (cocos2d::Texture2D*)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg0, cx, false, "Invalid Native Object");
} while (0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_Texture2D_setAlphaTexture : Error processing arguments");
cobj->setAlphaTexture(arg0);
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_Texture2D_setAlphaTexture : wrong number of arguments: %d, was expecting %d", argc, 1);
return false;
}
bool js_cocos2dx_Texture2D_getStringForFormat(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -272,6 +300,24 @@ bool js_cocos2dx_Texture2D_getPixelsHigh(JSContext *cx, uint32_t argc, jsval *vp
JS_ReportError(cx, "js_cocos2dx_Texture2D_getPixelsHigh : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_Texture2D_getAlphaTextureName(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::Texture2D* cobj = (cocos2d::Texture2D *)(proxy ? proxy->ptr : NULL);
JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_Texture2D_getAlphaTextureName : Invalid Native Object");
if (argc == 0) {
unsigned int ret = cobj->getAlphaTextureName();
jsval jsret = JSVAL_NULL;
jsret = uint32_to_jsval(cx, ret);
args.rval().set(jsret);
return true;
}
JS_ReportError(cx, "js_cocos2dx_Texture2D_getAlphaTextureName : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_Texture2D_getBitsPerPixelForFormat(JSContext *cx, uint32_t argc, jsval *vp)
{
bool ok = true;
@ -835,6 +881,7 @@ void js_register_cocos2dx_Texture2D(JSContext *cx, JS::HandleObject global) {
static JSFunctionSpec funcs[] = {
JS_FN("getShaderProgram", js_cocos2dx_Texture2D_getGLProgram, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getMaxT", js_cocos2dx_Texture2D_getMaxT, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setAlphaTexture", js_cocos2dx_Texture2D_setAlphaTexture, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getStringForFormat", js_cocos2dx_Texture2D_getStringForFormat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("initWithImage", js_cocos2dx_Texture2D_initWithImage, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("setShaderProgram", js_cocos2dx_Texture2D_setGLProgram, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
@ -843,6 +890,7 @@ void js_register_cocos2dx_Texture2D(JSContext *cx, JS::HandleObject global) {
JS_FN("hasPremultipliedAlpha", js_cocos2dx_Texture2D_hasPremultipliedAlpha, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("initWithMipmaps", js_cocos2dx_Texture2D_initWithMipmaps, 5, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getPixelsHigh", js_cocos2dx_Texture2D_getPixelsHigh, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getAlphaTextureName", js_cocos2dx_Texture2D_getAlphaTextureName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getBitsPerPixelForFormat", js_cocos2dx_Texture2D_getBitsPerPixelForFormat, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("getName", js_cocos2dx_Texture2D_getName, 0, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FN("initWithString", js_cocos2dx_Texture2D_initWithString, 2, JSPROP_PERMANENT | JSPROP_ENUMERATE),
@ -10651,25 +10699,54 @@ bool js_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(JSContext *cx, uint
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
if (argc == 1) {
std::string arg0;
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_GLProgramState_getOrCreateWithGLProgramName : Error processing arguments");
cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0);
jsval jsret = JSVAL_NULL;
if (ret) {
jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<cocos2d::GLProgramState>(cx, (cocos2d::GLProgramState*)ret));
} else {
jsret = JSVAL_NULL;
};
args.rval().set(jsret);
return true;
}
do {
if (argc == 2) {
std::string arg0;
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
if (!ok) { ok = true; break; }
cocos2d::Texture2D* arg1 = nullptr;
do {
if (args.get(1).isNull()) { arg1 = nullptr; break; }
if (!args.get(1).isObject()) { ok = false; break; }
js_proxy_t *jsProxy;
JS::RootedObject tmpObj(cx, args.get(1).toObjectOrNull());
jsProxy = jsb_get_js_proxy(tmpObj);
arg1 = (cocos2d::Texture2D*)(jsProxy ? jsProxy->ptr : NULL);
JSB_PRECONDITION2( arg1, cx, false, "Invalid Native Object");
} while (0);
if (!ok) { ok = true; break; }
cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0, arg1);
jsval jsret = JSVAL_NULL;
if (ret) {
jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<cocos2d::GLProgramState>(cx, (cocos2d::GLProgramState*)ret));
} else {
jsret = JSVAL_NULL;
};
args.rval().set(jsret);
return true;
}
} while (0);
do {
if (argc == 1) {
std::string arg0;
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
if (!ok) { ok = true; break; }
cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0);
jsval jsret = JSVAL_NULL;
if (ret) {
jsret = OBJECT_TO_JSVAL(js_get_or_create_jsobject<cocos2d::GLProgramState>(cx, (cocos2d::GLProgramState*)ret));
} else {
jsret = JSVAL_NULL;
};
args.rval().set(jsret);
return true;
}
} while (0);
JS_ReportError(cx, "js_cocos2dx_GLProgramState_getOrCreateWithGLProgramName : wrong number of arguments");
return false;
}
bool js_cocos2dx_GLProgramState_getOrCreateWithGLProgram(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -58914,6 +58991,22 @@ bool js_cocos2dx_TextureCache_waitForQuit(JSContext *cx, uint32_t argc, jsval *v
JS_ReportError(cx, "js_cocos2dx_TextureCache_waitForQuit : wrong number of arguments: %d, was expecting %d", argc, 0);
return false;
}
bool js_cocos2dx_TextureCache_setETC1AlphaFileSuffix(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
bool ok = true;
if (argc == 1) {
std::string arg0;
ok &= jsval_to_std_string(cx, args.get(0), &arg0);
JSB_PRECONDITION2(ok, cx, false, "js_cocos2dx_TextureCache_setETC1AlphaFileSuffix : Error processing arguments");
cocos2d::TextureCache::setETC1AlphaFileSuffix(arg0);
args.rval().setUndefined();
return true;
}
JS_ReportError(cx, "js_cocos2dx_TextureCache_setETC1AlphaFileSuffix : wrong number of arguments");
return false;
}
bool js_cocos2dx_TextureCache_constructor(JSContext *cx, uint32_t argc, jsval *vp)
{
JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
@ -58966,7 +59059,10 @@ void js_register_cocos2dx_TextureCache(JSContext *cx, JS::HandleObject global) {
JS_FS_END
};
JSFunctionSpec *st_funcs = NULL;
static JSFunctionSpec st_funcs[] = {
JS_FN("setETC1AlphaFileSuffix", js_cocos2dx_TextureCache_setETC1AlphaFileSuffix, 1, JSPROP_PERMANENT | JSPROP_ENUMERATE),
JS_FS_END
};
jsb_cocos2d_TextureCache_prototype = JS_InitClass(
cx, global,

View File

@ -14,6 +14,7 @@ void js_register_cocos2dx_Texture2D(JSContext *cx, JS::HandleObject global);
void register_all_cocos2dx(JSContext* cx, JS::HandleObject obj);
bool js_cocos2dx_Texture2D_getGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_getMaxT(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_setAlphaTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_getStringForFormat(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_initWithImage(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_setGLProgram(JSContext *cx, uint32_t argc, jsval *vp);
@ -22,6 +23,7 @@ bool js_cocos2dx_Texture2D_releaseGLTexture(JSContext *cx, uint32_t argc, jsval
bool js_cocos2dx_Texture2D_hasPremultipliedAlpha(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_initWithMipmaps(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_getPixelsHigh(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_getAlphaTextureName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_getBitsPerPixelForFormat(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_getName(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_Texture2D_initWithString(JSContext *cx, uint32_t argc, jsval *vp);
@ -3787,6 +3789,7 @@ bool js_cocos2dx_TextureCache_renameTextureWithKey(JSContext *cx, uint32_t argc,
bool js_cocos2dx_TextureCache_removeUnusedTextures(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TextureCache_removeTexture(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TextureCache_waitForQuit(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TextureCache_setETC1AlphaFileSuffix(JSContext *cx, uint32_t argc, jsval *vp);
bool js_cocos2dx_TextureCache_TextureCache(JSContext *cx, uint32_t argc, jsval *vp);
extern JSClass *jsb_cocos2d_Device_class;

View File

@ -224,12 +224,14 @@
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
--------------------------------
-- gets-or-creates an instance of GLProgramState for a given GLProgramName
-- @function [parent=#GLProgramState] getOrCreateWithGLProgramName
-- @overload self, string, cc.Texture2D
-- @overload self, string
-- @function [parent=#GLProgramState] getOrCreateWithGLProgramName
-- @param self
-- @param #string glProgramName
-- @param #cc.Texture2D texture
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
--------------------------------
-- gets-or-creates an instance of GLProgramState for a given GLProgram
-- @function [parent=#GLProgramState] getOrCreateWithGLProgram

View File

@ -10,6 +10,13 @@
-- @param self
-- @return float#float ret (return value: float)
--------------------------------
--
-- @function [parent=#Texture2D] setAlphaTexture
-- @param self
-- @param #cc.Texture2D alphaTexture
-- @return Texture2D#Texture2D self (return value: cc.Texture2D)
--------------------------------
-- Returns the pixel format.<br>
-- since v2.0
@ -52,6 +59,12 @@
-- @param self
-- @return int#int ret (return value: int)
--------------------------------
--
-- @function [parent=#Texture2D] getAlphaTextureName
-- @param self
-- @return unsigned int#unsigned int ret (return value: unsigned int)
--------------------------------
-- @overload self, int
-- @overload self

View File

@ -128,6 +128,13 @@
-- @param self
-- @return TextureCache#TextureCache self (return value: cc.TextureCache)
--------------------------------
--
-- @function [parent=#TextureCache] setETC1AlphaFileSuffix
-- @param self
-- @param #string suffix
-- @return TextureCache#TextureCache self (return value: cc.TextureCache)
--------------------------------
-- js ctor
-- @function [parent=#TextureCache] TextureCache

View File

@ -786,6 +786,56 @@ int lua_cocos2dx_Texture2D_getMaxT(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Texture2D_setAlphaTexture(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_setAlphaTexture'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::Texture2D* arg0;
ok &= luaval_to_object<cocos2d::Texture2D>(tolua_S, 2, "cc.Texture2D",&arg0, "cc.Texture2D:setAlphaTexture");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_Texture2D_setAlphaTexture'", nullptr);
return 0;
}
cobj->setAlphaTexture(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:setAlphaTexture",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_setAlphaTexture'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Texture2D_getStringForFormat(lua_State* tolua_S)
{
int argc = 0;
@ -1080,6 +1130,53 @@ int lua_cocos2dx_Texture2D_getPixelsHigh(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Texture2D_getAlphaTextureName(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Texture2D* 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.Texture2D",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Texture2D*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Texture2D_getAlphaTextureName'", 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_Texture2D_getAlphaTextureName'", nullptr);
return 0;
}
unsigned int ret = cobj->getAlphaTextureName();
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.Texture2D:getAlphaTextureName",argc, 0);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Texture2D_getAlphaTextureName'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Texture2D_getBitsPerPixelForFormat(lua_State* tolua_S)
{
int argc = 0;
@ -2293,12 +2390,14 @@ int lua_register_cocos2dx_Texture2D(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"Texture2D");
tolua_function(tolua_S,"new",lua_cocos2dx_Texture2D_constructor);
tolua_function(tolua_S,"getMaxT",lua_cocos2dx_Texture2D_getMaxT);
tolua_function(tolua_S,"setAlphaTexture",lua_cocos2dx_Texture2D_setAlphaTexture);
tolua_function(tolua_S,"getStringForFormat",lua_cocos2dx_Texture2D_getStringForFormat);
tolua_function(tolua_S,"initWithImage",lua_cocos2dx_Texture2D_initWithImage);
tolua_function(tolua_S,"getMaxS",lua_cocos2dx_Texture2D_getMaxS);
tolua_function(tolua_S,"releaseGLTexture",lua_cocos2dx_Texture2D_releaseGLTexture);
tolua_function(tolua_S,"hasPremultipliedAlpha",lua_cocos2dx_Texture2D_hasPremultipliedAlpha);
tolua_function(tolua_S,"getPixelsHigh",lua_cocos2dx_Texture2D_getPixelsHigh);
tolua_function(tolua_S,"getAlphaTextureName",lua_cocos2dx_Texture2D_getAlphaTextureName);
tolua_function(tolua_S,"getBitsPerPixelForFormat",lua_cocos2dx_Texture2D_getBitsPerPixelForFormat);
tolua_function(tolua_S,"getName",lua_cocos2dx_Texture2D_getName);
tolua_function(tolua_S,"initWithString",lua_cocos2dx_Texture2D_initWithString);
@ -20890,7 +20989,6 @@ int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;
#if COCOS2D_DEBUG >= 1
tolua_Error tolua_err;
#endif
@ -20899,22 +20997,38 @@ int lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName(lua_State* tolua_S)
if (!tolua_isusertable(tolua_S,1,"cc.GLProgramState",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
do
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName");
if(!ok)
if (argc == 2)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_GLProgramState_getOrCreateWithGLProgramName'", nullptr);
return 0;
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName");
if (!ok) { break; }
cocos2d::Texture2D* arg1;
ok &= luaval_to_object<cocos2d::Texture2D>(tolua_S, 3, "cc.Texture2D",&arg1, "cc.GLProgramState:getOrCreateWithGLProgramName");
if (!ok) { break; }
cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0, arg1);
object_to_luaval<cocos2d::GLProgramState>(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret);
return 1;
}
cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0);
object_to_luaval<cocos2d::GLProgramState>(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.GLProgramState:getOrCreateWithGLProgramName",argc, 1);
} while (0);
ok = true;
do
{
if (argc == 1)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.GLProgramState:getOrCreateWithGLProgramName");
if (!ok) { break; }
cocos2d::GLProgramState* ret = cocos2d::GLProgramState::getOrCreateWithGLProgramName(arg0);
object_to_luaval<cocos2d::GLProgramState>(tolua_S, "cc.GLProgramState",(cocos2d::GLProgramState*)ret);
return 1;
}
} while (0);
ok = true;
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.GLProgramState:getOrCreateWithGLProgramName",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
@ -90106,6 +90220,42 @@ int lua_cocos2dx_TextureCache_waitForQuit(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_TextureCache_setETC1AlphaFileSuffix(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.TextureCache",0,&tolua_err)) goto tolua_lerror;
#endif
argc = lua_gettop(tolua_S) - 1;
if (argc == 1)
{
std::string arg0;
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.TextureCache:setETC1AlphaFileSuffix");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_TextureCache_setETC1AlphaFileSuffix'", nullptr);
return 0;
}
cocos2d::TextureCache::setETC1AlphaFileSuffix(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.TextureCache:setETC1AlphaFileSuffix",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_TextureCache_setETC1AlphaFileSuffix'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_TextureCache_constructor(lua_State* tolua_S)
{
int argc = 0;
@ -90170,6 +90320,7 @@ int lua_register_cocos2dx_TextureCache(lua_State* tolua_S)
tolua_function(tolua_S,"removeUnusedTextures",lua_cocos2dx_TextureCache_removeUnusedTextures);
tolua_function(tolua_S,"removeTexture",lua_cocos2dx_TextureCache_removeTexture);
tolua_function(tolua_S,"waitForQuit",lua_cocos2dx_TextureCache_waitForQuit);
tolua_function(tolua_S,"setETC1AlphaFileSuffix", lua_cocos2dx_TextureCache_setETC1AlphaFileSuffix);
tolua_endmodule(tolua_S);
std::string typeName = typeid(cocos2d::TextureCache).name();
g_luaType[typeName] = "cc.TextureCache";

View File

@ -2206,6 +2206,9 @@ int register_all_cocos2dx(lua_State* tolua_S);