diff options
Diffstat (limited to 'src/client/lua_api/scene')
| -rw-r--r-- | src/client/lua_api/scene/icamera.cpp | 35 | ||||
| -rw-r--r-- | src/client/lua_api/scene/igeneric.cpp | 11 | ||||
| -rw-r--r-- | src/client/lua_api/scene/ilight.cpp | 10 | ||||
| -rw-r--r-- | src/client/lua_api/scene/imesh.cpp | 27 |
4 files changed, 0 insertions, 83 deletions
diff --git a/src/client/lua_api/scene/icamera.cpp b/src/client/lua_api/scene/icamera.cpp index 0554ce1..482bf31 100644 --- a/src/client/lua_api/scene/icamera.cpp +++ b/src/client/lua_api/scene/icamera.cpp @@ -22,29 +22,6 @@ using namespace core; extern IrrlichtDevice* device; -//static LISceneNode* checkiscenecamera(lua_State* L, int index){ - //void* ud = luaL_checkudata(L,index,"scene.iscenecamera"); - //luaL_argcheck(L,ud != NULL, index, "'scene.iscenecamera' expected"); - //return (LISceneNode*) ud; -//} - -/* -static LISceneNode* checkiscenecamera(lua_State* L){ - return checkiscenecamera(L,1); -} -*/ - -//static LISceneNode* checkismayacamera(lua_State* L, int index){ - //void* ud = luaL_checkudata(L,index,"scene.iscenemayacamera"); - //luaL_argcheck(L,ud != NULL, index, "'scene.iscenemayacamera' expected"); - //return (LISceneNode*) ud; -//} -/* -static LISceneNode* checkismayacamera(lua_State* L){ - return checkismayacamera(L,1); -} -*/ - static int newiscenemayacamera(lua_State* L){ printf("createing maya camera!\n"); ISceneManager* smgr = device->getSceneManager(); @@ -53,23 +30,11 @@ static int newiscenemayacamera(lua_State* L){ lua_newtable(L);//{} lua_pushlightuserdata(L,cam); lua_setfield(L,-2,"node"); - //LISceneNode* lcam = (LISceneNode*)lua_newuserdata(L, sizeof(LISceneNode)); - //int tref = luaL_ref(L,LUA_REGISTRYINDEX); //Set it's metatable luaL_getmetatable(L, "scene.iscenemayacamera"); lua_setmetatable(L, -2); - //Create the struct - //lcam->n = cam; - //lcam->funcmap = hashmap_new(); - //lcam->type = "iscenemayacamera"; - - //Free up anything made in this function - //free(label); - - //Put it on top and return it - //lua_rawgeti(L,LUA_REGISTRYINDEX,tref); return 1; } diff --git a/src/client/lua_api/scene/igeneric.cpp b/src/client/lua_api/scene/igeneric.cpp index c60aa90..0383619 100644 --- a/src/client/lua_api/scene/igeneric.cpp +++ b/src/client/lua_api/scene/igeneric.cpp @@ -16,15 +16,6 @@ using namespace video; extern IrrlichtDevice* device; -/* -static LISceneNode* toiscenenode(lua_State* L, int index){ - LISceneNode* ret = (LISceneNode*)lua_touserdata(L,index); - if(ret == NULL) - luaL_typerror(L,index,"LISceneNode"); - return ret; -} -*/ - int iscenegetpos(lua_State* L){//{node=ud_IMeshSceneNode} lua_getfield(L,-1,"node");//{node=ud_IMeshSceneNode},ud_IMeshSceneNode ISceneNode* i = (ISceneNode*)lua_touserdata(L,-1);//{node=ud_IMeshSceneNode},ud_IMeshSceneNode @@ -42,8 +33,6 @@ int iscenesetpos(lua_State* L){//{node=ISceneNode},{x,y,z} ISceneNode* i = (ISceneNode*)lua_touserdata(L,-1);//{node=ud_ISceneNode},ud_ISceneNode i->setPosition(vector3df(x,y,z)); i->updateAbsolutePosition(); - //vector3df pos = i->getAbsolutePosition(); - //printf("After setting pos, new pos is %f %f %f",pos.X,pos.Y,pos.Z); lua_pop(L,2);// return 0; } diff --git a/src/client/lua_api/scene/ilight.cpp b/src/client/lua_api/scene/ilight.cpp index 7473bfa..972de83 100644 --- a/src/client/lua_api/scene/ilight.cpp +++ b/src/client/lua_api/scene/ilight.cpp @@ -22,16 +22,6 @@ using namespace core; extern IrrlichtDevice* device; -//static LISceneNode* checkiscenelight(lua_State* L, int index){ - //void* ud = luaL_checkudata(L,index,"scene.ilight"); - //luaL_argcheck(L,ud != NULL, index, "'scene.ilight' expected"); - //return (LISceneNode*) ud; -//} - -//static LISceneNode* checkilight(lua_State* L){ - //return checkiscenelight(L,1); -//} - //{} :: scene.newlight(radius, {v3 position}) static int newiscenelight(lua_State* L){ printf("Createing light!\n"); diff --git a/src/client/lua_api/scene/imesh.cpp b/src/client/lua_api/scene/imesh.cpp index b5c8939..f3b5bc8 100644 --- a/src/client/lua_api/scene/imesh.cpp +++ b/src/client/lua_api/scene/imesh.cpp @@ -23,18 +23,6 @@ using namespace video; extern IrrlichtDevice* device; -//static LISceneNode* checkismesh(lua_State* L, int index){ - //void* ud = luaL_checkudata(L,index,"scene.imesh"); - //luaL_argcheck(L,ud != NULL, index, "'scene.imesh' expected"); - //return (LISceneNode*) ud; -//} - -/* -static LISceneNode* checkismesh(lua_State* L){ - return checkismesh(L,1); -} -*/ - //{} :: scene.newmesh("/path/to/model") static int newiscenemesh(lua_State* L){//"path/to" @@ -90,21 +78,6 @@ int newiscenecube(lua_State* L){//{v3 size}, {v3 origin} return 1; } -// self:setMaterial("path/to/material") -//int iscenesetmaterial(lua_State* L){//self,"path/to" - //ISceneNode* node = (IMeshSceneNode*)lua_touserdata(L,-2); - //const char* s = lua_tostring(L,-1); - ////ISceneNode* i = toiscenenode(L,1)->n; - ////const char* s = luaL_optstring(L,2,"error.png"); - ////printf("Setting material to %s",s); - - //IVideoDriver* driver = device->getVideoDriver(); - //node->setMaterialTexture(0, driver->getTexture(s)); - - //lua_pop(L,2); - //return 0; -//} - static const luaL_reg imesh_m[] = { {"setMaterial", iscenesetmaterial}, {"getpos", iscenegetpos}, |
