diff options
| author | Alexander Pickering <alex@cogarr.net> | 2018-06-28 16:05:26 -0600 |
|---|---|---|
| committer | Alexander Pickering <alex@cogarr.net> | 2018-06-28 16:05:26 -0600 |
| commit | ef25a513437196a3ea9ee45e6e03565eb86067d2 (patch) | |
| tree | acd43d214f9a7ec96e7fcd66097fd13593dd8f38 /src/client/lua_api/scene/icube.cpp | |
| parent | 2260a1dda8693664c77a03781ae07fbb5f0ea8a0 (diff) | |
| download | brokengine-ef25a513437196a3ea9ee45e6e03565eb86067d2.tar.gz brokengine-ef25a513437196a3ea9ee45e6e03565eb86067d2.tar.bz2 brokengine-ef25a513437196a3ea9ee45e6e03565eb86067d2.zip | |
Simplified makefile
Made makefile much simpiler, added option to build dynamically with
DEBUG=true
Diffstat (limited to 'src/client/lua_api/scene/icube.cpp')
| -rw-r--r-- | src/client/lua_api/scene/icube.cpp | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/src/client/lua_api/scene/icube.cpp b/src/client/lua_api/scene/icube.cpp deleted file mode 100644 index 8f4c9d8..0000000 --- a/src/client/lua_api/scene/icube.cpp +++ /dev/null @@ -1,68 +0,0 @@ - -extern "C" { - #include <lua.h> - #include <lauxlib.h> - #include <lualib.h> -} -#include <irrlicht.h> - -extern IrrlichtDevice* device; - -using namespace irr; - -// {} :: scene.newcube(num_size, {v3 pos}) -int newiscenecube(lua_StatE* L){//num_size, {v3 pos} - double x,y,z; - popvector3d(L,&x, &y, &z);//num_size - double size = lua_tonumber(L,-1);//num_size - lua_pop(L,1);// - IMeshSceneNode* n = device->getSceneManager()->addCubeSceneNode(size,0,-1,core::vector3df(x,y,z)); - - lua_newtable(L);//{} - lua_pushlightuserdata(L,n);//{},ud_node - lua_setfield(L,-2,"node");//{} - - luaL_getmetatable(L,"scene.inode");//{},sene.inode - lua_setmetatable(L,-2); - - return 1; -} - -static const luaL_reg iscenenode_m[] = { - {"getpos", iscenegetpos}, - {"setpos", iscenesetpos}, -// {"remove", removeiguielement}, - {0, 0}, -}; - -void icube_register(lua_State* L){ - - luaL_newmetatable(L, "scene.icamera");//scene.icamera - lua_newtable(L);//scene.icamera, {} - luaL_register(L,NULL,icamera_m);//scene.icamera, {} - lua_setfield(L,-2,"__index");//scene.icamera - lua_pop(L,1);// - - luaL_newmetatable(L, "scene.imayacamera");//scene.imayacamera - lua_newtable(L);//scene.imayascamera,{} - luaL_register(L,NULL,imayacamera_m);//scene.imayascamera,{} - lua_setfield(L,-2,"__index");//scene.imayascamera - lua_pop(L,1);// - - luaL_newmetatable(L,"scene.ifpscamera");//scene.ifpscamera - lua_newtable(L);//scene.ifpscamera, {} - luaL_register(L,NULL,ifpscamera_m);//scene.ifpscamera,{} - luaL_register(L,NULL,icamera_m);//scene.ifpscamera,{} - lua_setfield(L,-2,"__index");//scene.ifpscamera - lua_pop(L,1);// - - lua_getglobal(L,"scene");//{} - lua_pushcfunction(L,newiscenecamera);//{},newiscenecamera() - lua_setfield(L,-2,"newcamera");//{} - lua_pushcfunction(L,newiscenefpscamera);//{},newiscenefpscamera() - lua_setfield(L,-2,"newfpscamera");//{} - lua_pushcfunction(L,newiscenemayacamera);//{},newiscenemayacamera() - lua_setfield(L,-2,"newmayacamera");//{} - //printf("\"scene\" was set!\n"); - //lua_pop(L,1); -} |
