static void extendParticleSystem3D(lua_State* tolua_S) { lua_pushstring(tolua_S, "cc.ParticleSystem3D"); lua_rawget(tolua_S, LUA_REGISTRYINDEX); if (lua_istable(tolua_S,-1)) { tolua_function(tolua_S, "getParticlePool", lua_cocos2dx_extension_ParticleSystem3D_getParticlePool); } lua_pop(tolua_S, 1); }
void extendPhysics3DComponent(lua_State* L) { lua_pushstring(L, "cc.Physics3DComponent"); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_istable(L,-1)) { tolua_function(L, "create", lua_cocos2dx_physics3d_Physics3DComponent_create); } lua_pop(L, 1); }
void extendPhysics3DWorld(lua_State* L) { lua_pushstring(L, "cc.Physics3DWorld"); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_istable(L,-1)) { tolua_function(L, "rayCast", lua_cocos2dx_physics3d_Physics3DWorld_rayCast); } lua_pop(L, 1); }
int tolua_ftk_popup_menu_init(lua_State* L) { tolua_open(L); tolua_reg_types(L); tolua_module(L, NULL, 0); tolua_beginmodule(L, NULL); tolua_cclass(L,"FtkPopupMenu", "FtkPopupMenu", "FtkWidget", NULL); tolua_beginmodule(L, "FtkPopupMenu"); tolua_function(L, "Create", lua_ftk_popup_menu_create); tolua_function(L, "Add", lua_ftk_popup_menu_add); tolua_function(L, "GetSelected", lua_ftk_popup_menu_get_selected); tolua_function(L, "CalcHeight", lua_ftk_popup_menu_calc_height); tolua_function(L, "SetClickedListener", lua_ftk_popup_menu_set_clicked_listener); tolua_endmodule(L); tolua_endmodule(L); return 1; }
static void extendController(lua_State* L) { lua_pushstring(L, "cc.Controller"); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_istable(L,-1)) { tolua_function(L, "getKeyStatus", tolua_cocos2dx_Controller_getKeyStatus); } lua_pop(L, 1); }
int tolua_ftk_file_browser_init(lua_State* L) { tolua_open(L); tolua_reg_types(L); tolua_module(L, NULL, 0); tolua_beginmodule(L, NULL); tolua_cclass(L,"FtkFileBrowser", "FtkFileBrowser", "FtkWidget", NULL); tolua_beginmodule(L, "FtkFileBrowser"); tolua_function(L, "Create", lua_ftk_file_browser_create); tolua_function(L, "SetPath", lua_ftk_file_browser_set_path); tolua_function(L, "SetFilter", lua_ftk_file_browser_set_filter); tolua_function(L, "SetChoosedHandler", lua_ftk_file_browser_set_choosed_handler); tolua_function(L, "Load", lua_ftk_file_browser_load); tolua_endmodule(L); tolua_endmodule(L); return 1; }
int register_cocos2dx_extension_CCBProxy(lua_State* tolua_S) { tolua_module(tolua_S,"cc",0); tolua_beginmodule(tolua_S,"cc"); tolua_usertype(tolua_S,"cc.CCBProxy"); tolua_cclass(tolua_S,"CCBProxy","cc.CCBProxy","cc.Layer",NULL); tolua_beginmodule(tolua_S,"CCBProxy"); tolua_function(tolua_S, "create", tolua_cocos2d_CCBProxy_create); tolua_function(tolua_S, "createCCBReader", tolua_cocos2d_CCBProxy_createCCBReader); tolua_function(tolua_S, "readCCBFromFile", tolua_cocos2d_CCBProxy_readCCBFromFile); tolua_function(tolua_S, "getNodeTypeName", tolua_cocos2d_CCBProxy_getNodeTypeName); tolua_function(tolua_S, "setCallback", tolua_cocos2d_CCBProxy_setCallback); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); std::string typeName = typeid(CCBProxy).name(); g_luaType[typeName] = "cc.CCBProxy"; return 1; }
int tolua_ftk_entry_init(lua_State* L) { tolua_open(L); tolua_reg_types(L); tolua_module(L, NULL, 0); tolua_beginmodule(L, NULL); tolua_cclass(L,"FtkEntry", "FtkEntry", "FtkWidget", NULL); tolua_beginmodule(L, "FtkEntry"); tolua_function(L, "Create", lua_ftk_entry_create); tolua_function(L, "GetText", lua_ftk_entry_get_text); tolua_function(L, "SetText", lua_ftk_entry_set_text); tolua_function(L, "SetInputType", lua_ftk_entry_set_input_type); tolua_function(L, "InsertText", lua_ftk_entry_insert_text); tolua_endmodule(L); tolua_endmodule(L); return 1; }
static void extendNavMeshAgent(lua_State* L) { lua_pushstring(L, "cc.NavMeshAgent"); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_istable(L,-1)) { tolua_function(L, "move", lua_cocos2dx_navmesh_NavMeshAgent_move); } lua_pop(L, 1); }
void tolua_dict_open(lua_State * L) { /* register user types */ tolua_usertype(L, USERTYPE_DICT); tolua_module(L, NULL, 0); tolua_beginmodule(L, NULL); { tolua_cclass(L, USERTYPE_DICT, USERTYPE_DICT, TOLUA_CAST "", NULL); tolua_beginmodule(L, USERTYPE_DICT); { tolua_function(L, TOLUA_CAST "get", tolua_dict_get); tolua_function(L, TOLUA_CAST "set", tolua_dict_set); } tolua_endmodule(L); } tolua_endmodule(L); }
static void extendEventListenerAssetsManagerEx(lua_State* L) { lua_pushstring(L, "cc.EventListenerAssetsManagerEx"); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_istable(L,-1)) { tolua_function(L, "create", lua_cocos2dx_Extension_EventListenerAssetsManagerEx_create); } lua_pop(L, 1); }
static void extendParticlePool(lua_State* tolua_S) { lua_pushstring(tolua_S, "cc.ParticlePool"); lua_rawget(tolua_S, LUA_REGISTRYINDEX); if (lua_istable(tolua_S,-1)) { tolua_function(tolua_S, "getActiveDataList", lua_cocos2dx_extension_ParticlePool_getActiveDataList); } lua_pop(tolua_S, 1); }
static void extendAssetsManager(lua_State* L) { lua_pushstring(L, "cc.AssetsManager"); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_istable(L,-1)) { tolua_function(L, "setDelegate", lua_cocos2dx_AssetsManager_setDelegate); } lua_pop(L, 1); }
void extendPhysics3DObject(lua_State* L) { lua_pushstring(L, "cc.Physics3DObject"); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_istable(L,-1)) { tolua_function(L, "setCollisionCallback", lua_cocos2dx_physics3d_Physics3DObject_setCollisionCallback); } lua_pop(L, 1); }
TOLUA_API void tolua_open (lua_State* L) { int top = lua_gettop(L); lua_pushstring(L,"tolua_opened"); lua_rawget(L,LUA_REGISTRYINDEX); if (!lua_isboolean(L,-1)) { lua_pushstring(L,"tolua_opened"); lua_pushboolean(L,1); lua_rawset(L,LUA_REGISTRYINDEX); /* create peer object table */ lua_pushstring(L, "tolua_peers"); lua_newtable(L); /* make weak key metatable for peers indexed by userdata object */ lua_newtable(L); lua_pushliteral(L, "__mode"); lua_pushliteral(L, "k"); lua_rawset(L, -3); /* stack: string peers mt */ lua_setmetatable(L, -2); /* stack: string peers */ lua_rawset(L,LUA_REGISTRYINDEX); /* create object ptr -> udata mapping table */ lua_pushstring(L,"tolua_ubox"); lua_newtable(L); /* make weak value metatable for ubox table to allow userdata to be garbage-collected */ lua_newtable(L); lua_pushliteral(L, "__mode"); lua_pushliteral(L, "v"); lua_rawset(L, -3); /* stack: string ubox mt */ lua_setmetatable(L, -2); /* stack: string ubox */ lua_rawset(L,LUA_REGISTRYINDEX); lua_pushstring(L,"tolua_super"); lua_newtable(L); lua_rawset(L,LUA_REGISTRYINDEX); lua_pushstring(L,"tolua_gc"); lua_newtable(L);lua_rawset(L,LUA_REGISTRYINDEX); tolua_newmetatable(L,"tolua_commonclass"); tolua_module(L,NULL,0); tolua_beginmodule(L,NULL); tolua_module(L,"tolua",0); tolua_beginmodule(L,"tolua"); tolua_function(L,"type",tolua_bnd_type); tolua_function(L,"takeownership",tolua_bnd_takeownership); tolua_function(L,"releaseownership",tolua_bnd_releaseownership); tolua_function(L,"cast",tolua_bnd_cast); tolua_endmodule(L); tolua_endmodule(L); } lua_settop(L,top); }
/* Open lib function */ LUALIB_API int luaopen_game (lua_State* tolua_S) { tolua_open(tolua_S); tolua_reg_types(tolua_S); tolua_module(tolua_S,NULL,0); tolua_beginmodule(tolua_S,NULL); tolua_module(tolua_S,"eressea",0); tolua_beginmodule(tolua_S,"eressea"); tolua_module(tolua_S,"game",0); tolua_beginmodule(tolua_S,"game"); tolua_function(tolua_S,"reset",tolua_game_eressea_game_reset00); tolua_function(tolua_S,"read",tolua_game_eressea_game_read00); tolua_function(tolua_S,"write",tolua_game_eressea_game_write00); tolua_function(tolua_S,"export",tolua_game_eressea_game_export00); tolua_function(tolua_S,"import",tolua_game_eressea_game_import00); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); return 1; }
int lua_register_sls_world(lua_State* tolua_S) { tolua_usertype(tolua_S,"sls.World"); tolua_cclass(tolua_S,"World","sls.World","",nullptr); tolua_beginmodule(tolua_S,"World"); tolua_function(tolua_S,"getInstance",lua_register_sls_world_getInstance); tolua_function(tolua_S,"start",lua_register_sls_world_start); tolua_function(tolua_S,"step",lua_register_sls_world_step); tolua_function(tolua_S,"getWidthMax",lua_register_sls_world_getWidthMax); tolua_function(tolua_S,"getHeightMax",lua_register_sls_world_getHeightMax); tolua_function(tolua_S,"getAllSlothNum",lua_register_sls_world_getAllSlothNum); tolua_function(tolua_S,"getGeo",lua_register_sls_world_getGeo); tolua_function(tolua_S,"getSloth",lua_register_sls_world_getSloth); tolua_function(tolua_S,"getSlothNewComerNum",lua_register_sls_world_getSlothNewComerNum); tolua_endmodule(tolua_S); return 1; }
void DeprecatedBindings::Bind(lua_State * tolua_S) { tolua_beginmodule(tolua_S, nullptr); tolua_array(tolua_S, "g_BlockLightValue", tolua_get_AllToLua_g_BlockLightValue, nullptr); tolua_array(tolua_S, "g_BlockSpreadLightFalloff", tolua_get_AllToLua_g_BlockSpreadLightFalloff, nullptr); tolua_array(tolua_S, "g_BlockTransparent", tolua_get_AllToLua_g_BlockTransparent, nullptr); tolua_array(tolua_S, "g_BlockOneHitDig", tolua_get_AllToLua_g_BlockOneHitDig, nullptr); tolua_array(tolua_S, "g_BlockPistonBreakable", tolua_get_AllToLua_g_BlockPistonBreakable, nullptr); tolua_array(tolua_S, "g_BlockIsSnowable", tolua_get_AllToLua_g_BlockIsSnowable, nullptr); tolua_array(tolua_S, "g_BlockIsSolid", tolua_get_AllToLua_g_BlockIsSolid, nullptr); tolua_array(tolua_S, "g_BlockFullyOccupiesVoxel", tolua_get_AllToLua_g_BlockFullyOccupiesVoxel, nullptr); tolua_function(tolua_S, "StringToMobType", tolua_AllToLua_StringToMobType00); tolua_beginmodule(tolua_S, "cWorld"); tolua_function(tolua_S, "UpdateSign", tolua_cWorld_SetSignLines); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); }
/* Open function */ TOLUA_API int tolua_lok_open (lua_State* tolua_S) { tolua_open(tolua_S); tolua_reg_types(tolua_S); tolua_module(tolua_S,NULL,0); tolua_beginmodule(tolua_S,NULL); #ifdef __cplusplus tolua_cclass(tolua_S,"ok","ok","",tolua_collect_ok); #else tolua_cclass(tolua_S,"ok","ok","",NULL); #endif tolua_beginmodule(tolua_S,"ok"); tolua_function(tolua_S,"show",tolua_lok_ok_show00); tolua_function(tolua_S,"new",tolua_lok_ok_new00); tolua_function(tolua_S,"new_local",tolua_lok_ok_new00_local); tolua_function(tolua_S,".call",tolua_lok_ok_new00_local); tolua_function(tolua_S,"delete",tolua_lok_ok_delete00); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); return 1; }
/* Open function */ TOLUA_API int tolua_Level_open (lua_State* tolua_S) { tolua_open(tolua_S); tolua_reg_types(tolua_S); tolua_module(tolua_S,NULL,0); tolua_beginmodule(tolua_S,NULL); #ifdef __cplusplus tolua_cclass(tolua_S,"Level","Level","",tolua_collect_Level); #else tolua_cclass(tolua_S,"Level","Level","",NULL); #endif tolua_beginmodule(tolua_S,"Level"); tolua_function(tolua_S,"new",tolua_Level_Level_new00); tolua_function(tolua_S,"new_local",tolua_Level_Level_new00_local); tolua_function(tolua_S,".call",tolua_Level_Level_new00_local); tolua_function(tolua_S,"addActor",tolua_Level_Level_addActor00); tolua_function(tolua_S,"addActor",tolua_Level_Level_addActor01); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); return 1; }
/* Open function */ TOLUA_API int tolua_ClassTest_open (lua_State* tolua_S) { tolua_open(tolua_S); tolua_reg_types(tolua_S); tolua_module(tolua_S,NULL,0); tolua_beginmodule(tolua_S,NULL); #ifdef __cplusplus tolua_cclass(tolua_S,"CClassTest","CClassTest","",tolua_collect_CClassTest); #else tolua_cclass(tolua_S,"CClassTest","CClassTest","",NULL); #endif tolua_beginmodule(tolua_S,"CClassTest"); tolua_function(tolua_S,"new",tolua_ClassTest_CClassTest_new00); tolua_function(tolua_S,"new_local",tolua_ClassTest_CClassTest_new00_local); tolua_function(tolua_S,".call",tolua_ClassTest_CClassTest_new00_local); tolua_function(tolua_S,"delete",tolua_ClassTest_CClassTest_delete00); tolua_function(tolua_S,"sum",tolua_ClassTest_CClassTest_sum00); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); return 1; }
int register_all_cocos2dx_csloader_manual(lua_State* L) { lua_pushstring(L, "cc.CSLoader"); lua_rawget(L, LUA_REGISTRYINDEX); if (lua_istable(L,-1)) { tolua_function(L, "createTimeline", lua_cocos2dx_csloader_CSLoader_createTimeline); } lua_pop(L, 1); return 0; }
void tolua_building_open(lua_State * L) { /* register user types */ tolua_usertype(L, TOLUA_CAST "building"); tolua_module(L, NULL, 0); tolua_beginmodule(L, NULL); { tolua_cclass(L, TOLUA_CAST "building", TOLUA_CAST "building", TOLUA_CAST "", NULL); tolua_beginmodule(L, TOLUA_CAST "building"); { tolua_function(L, TOLUA_CAST "create", tolua_building_create); tolua_function(L, TOLUA_CAST "destroy", tolua_building_destroy); tolua_function(L, TOLUA_CAST "__tostring", tolua_building_tostring); tolua_variable(L, TOLUA_CAST "id", tolua_building_get_id, NULL); tolua_variable(L, TOLUA_CAST "owner", tolua_building_get_owner, tolua_building_set_owner); tolua_variable(L, TOLUA_CAST "type", tolua_building_get_type, NULL); tolua_variable(L, TOLUA_CAST "name", tolua_building_get_name, tolua_building_set_name); tolua_variable(L, TOLUA_CAST "info", tolua_building_get_info, tolua_building_set_info); tolua_variable(L, TOLUA_CAST "units", tolua_building_get_units, NULL); tolua_variable(L, TOLUA_CAST "region", tolua_building_get_region, tolua_building_set_region); tolua_variable(L, TOLUA_CAST "size", tolua_building_get_size, tolua_building_set_size); tolua_function(L, TOLUA_CAST "get_typename", tolua_building_get_typename); #ifdef TODO .property("type", &building_gettype) .def_readwrite("size", &building::size) #endif tolua_variable(L, TOLUA_CAST "objects", tolua_building_get_objects, 0); tolua_variable(L, TOLUA_CAST "working", tolua_building_get_working, tolua_building_set_working); } tolua_endmodule(L); }
/* Open function */ TOLUA_API int tolua_Label_open (lua_State* tolua_S) { tolua_open(tolua_S); tolua_reg_types(tolua_S); tolua_module(tolua_S,NULL,0); tolua_beginmodule(tolua_S,NULL); tolua_constant(tolua_S,"SMALL",SMALL); tolua_constant(tolua_S,"MEDIUM",MEDIUM); tolua_constant(tolua_S,"BIG",BIG); #ifdef __cplusplus tolua_cclass(tolua_S,"Label","Label","CCLabelTTF",tolua_collect_Label); #else tolua_cclass(tolua_S,"Label","Label","CCLabelTTF",NULL); #endif tolua_beginmodule(tolua_S,"Label"); tolua_function(tolua_S,"new",tolua_Label_Label_new00); tolua_function(tolua_S,"new_local",tolua_Label_Label_new00_local); tolua_function(tolua_S,".call",tolua_Label_Label_new00_local); tolua_function(tolua_S,"delete",tolua_Label_Label_delete00); tolua_function(tolua_S,"create",tolua_Label_Label_create00); tolua_function(tolua_S,"setPosition",tolua_Label_Label_setPosition00); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); return 1; }
int lua_register_cocos2dx_audioengine_AudioProfile(lua_State* tolua_S) { tolua_usertype(tolua_S,"ccexp.AudioProfile"); tolua_cclass(tolua_S,"AudioProfile","ccexp.AudioProfile","",nullptr); tolua_beginmodule(tolua_S,"AudioProfile"); tolua_function(tolua_S,"new",lua_cocos2dx_audioengine_AudioProfile_constructor); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::experimental::AudioProfile).name(); g_luaType[typeName] = "ccexp.AudioProfile"; g_typeCast["AudioProfile"] = "ccexp.AudioProfile"; return 1; }
int lua_register_cocos2dx_controller_EventListenerController(lua_State* tolua_S) { tolua_usertype(tolua_S,"cc.EventListenerController"); tolua_cclass(tolua_S,"EventListenerController","cc.EventListenerController","cc.EventListener",nullptr); tolua_beginmodule(tolua_S,"EventListenerController"); tolua_function(tolua_S,"create", lua_cocos2dx_controller_EventListenerController_create); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::EventListenerController).name(); g_luaType[typeName] = "cc.EventListenerController"; g_typeCast["EventListenerController"] = "cc.EventListenerController"; return 1; }
int lua_register_test_SimpleNativeClass(lua_State* tolua_S) { tolua_usertype(tolua_S, "SimpleNativeClass"); tolua_cclass(tolua_S, "SimpleNativeClass", "SimpleNativeClass", "", nullptr); // register module tolua_beginmodule(tolua_S, "SimpleNativeClass"); tolua_function(tolua_S, "createTestR10e", lua_test_SimpleNativeClass_createTestR10e); tolua_endmodule(tolua_S); std::string typeName = typeid(cocos2d::SimpleNativeClass).name(); g_luaType[typeName] = "SimpleNativeClass"; g_typeCast["SimpleNativeClass"] = "SimpleNativeClass"; return 1; }
/* Open function */ TOLUA_API int tolua_AIObjectScript_open (lua_State* tolua_S) { tolua_open(tolua_S); tolua_reg_types(tolua_S); tolua_module(tolua_S,NULL,0); tolua_beginmodule(tolua_S,NULL); #ifdef __cplusplus tolua_cclass(tolua_S,"COMMANDSEQUENCEPARAMS","COMMANDSEQUENCEPARAMS","",tolua_collect_COMMANDSEQUENCEPARAMS); #else tolua_cclass(tolua_S,"COMMANDSEQUENCEPARAMS","COMMANDSEQUENCEPARAMS","",NULL); #endif tolua_beginmodule(tolua_S,"COMMANDSEQUENCEPARAMS"); tolua_variable(tolua_S,"targetName",tolua_get_COMMANDSEQUENCEPARAMS_targetName_ptr,tolua_set_COMMANDSEQUENCEPARAMS_targetName_ptr); tolua_function(tolua_S,"new",tolua_AIObjectScript_COMMANDSEQUENCEPARAMS_new00); tolua_function(tolua_S,"new_local",tolua_AIObjectScript_COMMANDSEQUENCEPARAMS_new00_local); tolua_function(tolua_S,".call",tolua_AIObjectScript_COMMANDSEQUENCEPARAMS_new00_local); tolua_function(tolua_S,"delete",tolua_AIObjectScript_COMMANDSEQUENCEPARAMS_delete00); tolua_function(tolua_S,"SIZEOF",tolua_AIObjectScript_COMMANDSEQUENCEPARAMS_SIZEOF00); tolua_endmodule(tolua_S); tolua_endmodule(tolua_S); return 1; }
int lua_register_UserCoinInfoBoard_UserCoinInfoBoard(lua_State* tolua_S) { tolua_usertype(tolua_S,"bs.UserCoinInfoBoard"); tolua_cclass(tolua_S,"UserCoinInfoBoard","bs.UserCoinInfoBoard","cc.Node",nullptr); tolua_beginmodule(tolua_S,"UserCoinInfoBoard"); tolua_function(tolua_S,"create", lua_UserCoinInfoBoard_UserCoinInfoBoard_create); tolua_endmodule(tolua_S); std::string typeName = typeid(bubble_second::UserCoinInfoBoard).name(); g_luaType[typeName] = "bs.UserCoinInfoBoard"; g_typeCast["UserCoinInfoBoard"] = "bs.UserCoinInfoBoard"; return 1; }
int lua_register_cocos2dx_ValueTypeJudgeInTable(lua_State* L) { tolua_usertype(L,"cc.ValueTypeJudgeInTable"); tolua_cclass(L,"ValueTypeJudgeInTable","cc.ValueTypeJudgeInTable","cc.Node",nullptr); tolua_beginmodule(L,"ValueTypeJudgeInTable"); tolua_function(L,"create", lua_cocos2dx_ValueTypeJudgeInTable_create); tolua_endmodule(L); std::string typeName = typeid(cocos2d::ValueTypeJudgeInTable).name(); g_luaType[typeName] = "cc.ValueTypeJudgeInTable"; g_typeCast["ValueTypeJudgeInTable"] = "cc.ValueTypeJudgeInTable"; return 1; }