Skip to content

Commit

Permalink
Update luabindings for commit 7838d7f (#1641)
Browse files Browse the repository at this point in the history
Co-authored-by: axmol-bot <[email protected]>
  • Loading branch information
axmol-bot and axmol-bot authored Jan 30, 2024
1 parent 7838d7f commit 09c38b0
Show file tree
Hide file tree
Showing 7 changed files with 228 additions and 114 deletions.
37 changes: 36 additions & 1 deletion extensions/scripting/lua-bindings/auto/axlua_backend_auto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3518,6 +3518,40 @@ int lua_ax_backend_DriverBase_getInstance(lua_State* tolua_S)
#endif
return 0;
}
int lua_ax_backend_DriverBase_destroyInstance(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;

#if _AX_DEBUG >= 1
tolua_Error tolua_err;
#endif

#if _AX_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"axb.DriverBase",0,&tolua_err)) goto tolua_lerror;
#endif

argc = lua_gettop(tolua_S) - 1;

if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_backend_DriverBase_destroyInstance'", nullptr);
return 0;
}
ax::backend::DriverBase::destroyInstance();
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "axb.DriverBase:destroyInstance",argc, 0);
return 0;
#if _AX_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_backend_DriverBase_destroyInstance'.",&tolua_err);
#endif
return 0;
}
static int lua_ax_backend_DriverBase_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (DriverBase)");
Expand All @@ -3527,7 +3561,7 @@ static int lua_ax_backend_DriverBase_finalize(lua_State* tolua_S)
int lua_register_ax_backend_DriverBase(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"axb.DriverBase");
tolua_cclass(tolua_S,"DriverBase","axb.DriverBase","ax.Ref",nullptr);
tolua_cclass(tolua_S,"DriverBase","axb.DriverBase","",nullptr);

tolua_beginmodule(tolua_S,"DriverBase");
tolua_function(tolua_S,"newDefaultRenderTarget",lua_ax_backend_DriverBase_newDefaultRenderTarget);
Expand All @@ -3547,6 +3581,7 @@ int lua_register_ax_backend_DriverBase(lua_State* tolua_S)
tolua_function(tolua_S,"getMaxTextureUnits",lua_ax_backend_DriverBase_getMaxTextureUnits);
tolua_function(tolua_S,"getMaxSamplesAllowed",lua_ax_backend_DriverBase_getMaxSamplesAllowed);
tolua_function(tolua_S,"getInstance", lua_ax_backend_DriverBase_getInstance);
tolua_function(tolua_S,"destroyInstance", lua_ax_backend_DriverBase_destroyInstance);
tolua_endmodule(tolua_S);
auto typeName = typeid(ax::backend::DriverBase).name(); // rtti is literal storage
g_luaType[reinterpret_cast<uintptr_t>(typeName)] = "axb.DriverBase";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ int register_all_ax_backend(lua_State* tolua_S);






#endif // __ax_backend_h__
137 changes: 128 additions & 9 deletions extensions/scripting/lua-bindings/auto/axlua_base_auto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,40 @@ int lua_ax_base_ShaderCache_getInstance(lua_State* tolua_S)
#endif
return 0;
}
int lua_ax_base_ShaderCache_destroyInstance(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;

#if _AX_DEBUG >= 1
tolua_Error tolua_err;
#endif

#if _AX_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"axb.ShaderCache",0,&tolua_err)) goto tolua_lerror;
#endif

argc = lua_gettop(tolua_S) - 1;

if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_base_ShaderCache_destroyInstance'", nullptr);
return 0;
}
ax::backend::ShaderCache::destroyInstance();
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "axb.ShaderCache:destroyInstance",argc, 0);
return 0;
#if _AX_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_base_ShaderCache_destroyInstance'.",&tolua_err);
#endif
return 0;
}
static int lua_ax_base_ShaderCache_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (ShaderCache)");
Expand All @@ -1101,14 +1135,15 @@ static int lua_ax_base_ShaderCache_finalize(lua_State* tolua_S)
int lua_register_ax_base_ShaderCache(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"axb.ShaderCache");
tolua_cclass(tolua_S,"ShaderCache","axb.ShaderCache","ax.Ref",nullptr);
tolua_cclass(tolua_S,"ShaderCache","axb.ShaderCache","",nullptr);

tolua_beginmodule(tolua_S,"ShaderCache");
tolua_function(tolua_S,"purge",lua_ax_base_ShaderCache_purge);
tolua_function(tolua_S,"newVertexShaderModule",lua_ax_base_ShaderCache_newVertexShaderModule);
tolua_function(tolua_S,"newFragmentShaderModule",lua_ax_base_ShaderCache_newFragmentShaderModule);
tolua_function(tolua_S,"removeUnusedShader",lua_ax_base_ShaderCache_removeUnusedShader);
tolua_function(tolua_S,"getInstance", lua_ax_base_ShaderCache_getInstance);
tolua_function(tolua_S,"destroyInstance", lua_ax_base_ShaderCache_destroyInstance);
tolua_endmodule(tolua_S);
auto typeName = typeid(ax::backend::ShaderCache).name(); // rtti is literal storage
g_luaType[reinterpret_cast<uintptr_t>(typeName)] = "axb.ShaderCache";
Expand Down Expand Up @@ -4768,6 +4803,56 @@ int lua_ax_base_Node_getDescription(lua_State* tolua_S)

return 0;
}
int lua_ax_base_Node_setLocalZOrder(lua_State* tolua_S)
{
int argc = 0;
ax::Node* cobj = nullptr;
bool ok = true;

#if _AX_DEBUG >= 1
tolua_Error tolua_err;
#endif


#if _AX_DEBUG >= 1
if (!tolua_isusertype(tolua_S,1,"ax.Node",0,&tolua_err)) goto tolua_lerror;
#endif

cobj = (ax::Node*)tolua_tousertype(tolua_S,1,0);

#if _AX_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_base_Node_setLocalZOrder'", nullptr);
return 0;
}
#endif

argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
int arg0;

ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ax.Node:setLocalZOrder");
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_base_Node_setLocalZOrder'", nullptr);
return 0;
}
cobj->setLocalZOrder(arg0);
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.Node:setLocalZOrder",argc, 1);
return 0;

#if _AX_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_base_Node_setLocalZOrder'.",&tolua_err);
#endif

return 0;
}
int lua_ax_base_Node_updateOrderOfArrival(lua_State* tolua_S)
{
int argc = 0;
Expand Down Expand Up @@ -4849,7 +4934,7 @@ int lua_ax_base_Node_getLocalZOrder(lua_State* tolua_S)
return 0;
}
auto&& ret = cobj->getLocalZOrder();
#pragma warning NO CONVERSION FROM NATIVE FOR ??;
tolua_pushnumber(tolua_S,(lua_Number)ret);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.Node:getLocalZOrder",argc, 0);
Expand Down Expand Up @@ -12054,6 +12139,7 @@ int lua_register_ax_base_Node(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"Node");
tolua_function(tolua_S,"new",lua_ax_base_Node_constructor);
tolua_function(tolua_S,"getDescription",lua_ax_base_Node_getDescription);
tolua_function(tolua_S,"setLocalZOrder",lua_ax_base_Node_setLocalZOrder);
tolua_function(tolua_S,"updateOrderOfArrival",lua_ax_base_Node_updateOrderOfArrival);
tolua_function(tolua_S,"getLocalZOrder",lua_ax_base_Node_getLocalZOrder);
tolua_function(tolua_S,"setGlobalZOrder",lua_ax_base_Node_setGlobalZOrder);
Expand Down Expand Up @@ -18100,6 +18186,40 @@ int lua_ax_base_Director_getInstance(lua_State* tolua_S)
#endif
return 0;
}
int lua_ax_base_Director_destroyInstance(lua_State* tolua_S)
{
int argc = 0;
bool ok = true;

#if _AX_DEBUG >= 1
tolua_Error tolua_err;
#endif

#if _AX_DEBUG >= 1
if (!tolua_isusertable(tolua_S,1,"ax.Director",0,&tolua_err)) goto tolua_lerror;
#endif

argc = lua_gettop(tolua_S) - 1;

if (argc == 0)
{
if(!ok)
{
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_base_Director_destroyInstance'", nullptr);
return 0;
}
ax::Director::destroyInstance();
lua_settop(tolua_S, 1);
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ax.Director:destroyInstance",argc, 0);
return 0;
#if _AX_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_ax_base_Director_destroyInstance'.",&tolua_err);
#endif
return 0;
}
static int lua_ax_base_Director_finalize(lua_State* tolua_S)
{
printf("luabindings: finalizing LUA object (Director)");
Expand Down Expand Up @@ -18183,6 +18303,7 @@ int lua_register_ax_base_Director(lua_State* tolua_S)
tolua_function(tolua_S,"isChildrenIndexerEnabled",lua_ax_base_Director_isChildrenIndexerEnabled);
tolua_function(tolua_S,"isValid",lua_ax_base_Director_isValid);
tolua_function(tolua_S,"getInstance", lua_ax_base_Director_getInstance);
tolua_function(tolua_S,"destroyInstance", lua_ax_base_Director_destroyInstance);
tolua_endmodule(tolua_S);
auto typeName = typeid(ax::Director).name(); // rtti is literal storage
g_luaType[reinterpret_cast<uintptr_t>(typeName)] = "ax.Director";
Expand Down Expand Up @@ -69161,7 +69282,7 @@ static int lua_ax_base_SpriteFrameCache_finalize(lua_State* tolua_S)
int lua_register_ax_base_SpriteFrameCache(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ax.SpriteFrameCache");
tolua_cclass(tolua_S,"SpriteFrameCache","ax.SpriteFrameCache","ax.Ref",nullptr);
tolua_cclass(tolua_S,"SpriteFrameCache","ax.SpriteFrameCache","",nullptr);

tolua_beginmodule(tolua_S,"SpriteFrameCache");
tolua_function(tolua_S,"init",lua_ax_base_SpriteFrameCache_init);
Expand Down Expand Up @@ -69848,7 +69969,7 @@ static int lua_ax_base_ParticleEmissionMaskCache_finalize(lua_State* tolua_S)
int lua_register_ax_base_ParticleEmissionMaskCache(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ax.ParticleEmissionMaskCache");
tolua_cclass(tolua_S,"ParticleEmissionMaskCache","ax.ParticleEmissionMaskCache","ax.Ref",nullptr);
tolua_cclass(tolua_S,"ParticleEmissionMaskCache","ax.ParticleEmissionMaskCache","",nullptr);

tolua_beginmodule(tolua_S,"ParticleEmissionMaskCache");
tolua_function(tolua_S,"bakeEmissionMask",lua_ax_base_ParticleEmissionMaskCache_bakeEmissionMask);
Expand Down Expand Up @@ -103709,10 +103830,8 @@ int lua_ax_base_AnimationCache_constructor(lua_State* tolua_S)
return 0;
}
cobj = new ax::AnimationCache();
cobj->autorelease();
int ID = (int)cobj->_ID ;
int* luaID = &cobj->_luaID ;
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ax.AnimationCache");
tolua_pushusertype(tolua_S,(void*)cobj,"ax.AnimationCache");
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
return 1;
}
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.AnimationCache:AnimationCache",argc, 0);
Expand All @@ -103734,7 +103853,7 @@ static int lua_ax_base_AnimationCache_finalize(lua_State* tolua_S)
int lua_register_ax_base_AnimationCache(lua_State* tolua_S)
{
tolua_usertype(tolua_S,"ax.AnimationCache");
tolua_cclass(tolua_S,"AnimationCache","ax.AnimationCache","ax.Ref",nullptr);
tolua_cclass(tolua_S,"AnimationCache","ax.AnimationCache","",nullptr);

tolua_beginmodule(tolua_S,"AnimationCache");
tolua_function(tolua_S,"new",lua_ax_base_AnimationCache_constructor);
Expand Down
3 changes: 3 additions & 0 deletions extensions/scripting/lua-bindings/auto/axlua_base_auto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,9 @@ int register_all_ax_base(lua_State* tolua_S);









Expand Down
60 changes: 60 additions & 0 deletions extensions/scripting/lua-bindings/auto/axlua_extension_auto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,66 @@ int register_all_ax_extension(lua_State* tolua_S);


































































Expand Down
Loading

0 comments on commit 09c38b0

Please sign in to comment.