[AUTO]: updating luabinding automatically

This commit is contained in:
CocosRobot 2014-09-26 15:37:17 +00:00
parent 99064b091f
commit 021d21a2a7
5 changed files with 58 additions and 0 deletions

View File

@ -10,6 +10,12 @@
-- @param self
-- @return PhysicsWorld#PhysicsWorld ret (return value: cc.PhysicsWorld)
--------------------------------
-- render the scene
-- @function [parent=#Scene] render
-- @param self
-- @param #cc.Renderer renderer
--------------------------------
-- creates a new Scene object with a predefined Size
-- @function [parent=#Scene] createWithSize

View File

@ -1,4 +1,5 @@
#include "lua_cocos2dx_audioengine_auto.hpp"
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
#include "AudioEngine.h"
#include "tolua_fix.h"
#include "LuaBasicConversions.h"
@ -907,3 +908,4 @@ TOLUA_API int register_all_cocos2dx_audioengine(lua_State* tolua_S)
return 1;
}
#endif

View File

@ -1,4 +1,5 @@
#include "base/ccConfig.h"
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
#ifndef __cocos2dx_audioengine_h__
#define __cocos2dx_audioengine_h__
@ -39,3 +40,4 @@ int register_all_cocos2dx_audioengine(lua_State* tolua_S);
#endif // __cocos2dx_audioengine_h__
#endif //#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC

View File

@ -9039,6 +9039,52 @@ int lua_cocos2dx_Scene_getPhysicsWorld(lua_State* tolua_S)
return 0;
}
int lua_cocos2dx_Scene_render(lua_State* tolua_S)
{
int argc = 0;
cocos2d::Scene* 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.Scene",0,&tolua_err)) goto tolua_lerror;
#endif
cobj = (cocos2d::Scene*)tolua_tousertype(tolua_S,1,0);
#if COCOS2D_DEBUG >= 1
if (!cobj)
{
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_Scene_render'", nullptr);
return 0;
}
#endif
argc = lua_gettop(tolua_S)-1;
if (argc == 1)
{
cocos2d::Renderer* arg0;
ok &= luaval_to_object<cocos2d::Renderer>(tolua_S, 2, "cc.Renderer",&arg0);
if(!ok)
return 0;
cobj->render(arg0);
return 0;
}
CCLOG("%s has wrong number of arguments: %d, was expecting %d \n", "cc.Scene:render",argc, 1);
return 0;
#if COCOS2D_DEBUG >= 1
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_Scene_render'.",&tolua_err);
#endif
return 0;
}
int lua_cocos2dx_Scene_createWithSize(lua_State* tolua_S)
{
int argc = 0;
@ -9147,6 +9193,7 @@ int lua_register_cocos2dx_Scene(lua_State* tolua_S)
tolua_beginmodule(tolua_S,"Scene");
tolua_function(tolua_S,"getPhysicsWorld",lua_cocos2dx_Scene_getPhysicsWorld);
tolua_function(tolua_S,"render",lua_cocos2dx_Scene_render);
tolua_function(tolua_S,"createWithSize", lua_cocos2dx_Scene_createWithSize);
tolua_function(tolua_S,"create", lua_cocos2dx_Scene_create);
tolua_function(tolua_S,"createWithPhysics", lua_cocos2dx_Scene_createWithPhysics);

View File

@ -1579,6 +1579,7 @@ int register_all_cocos2dx(lua_State* tolua_S);
#endif // __cocos2dx_h__