EgtExecutor 1.8c3 :

- aggiunte funzioni Exe e Lua GetFirstGhostPart e GetNextGhostPart.
This commit is contained in:
Dario Sassi
2017-03-06 18:55:40 +00:00
parent 358915d2e7
commit dfb706d40f
4 changed files with 96 additions and 0 deletions
+36
View File
@@ -277,6 +277,40 @@ LuaGetPrevLayer( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaGetFirstGhostPart( lua_State* L)
{
// nessuno parametro
LuaClearStack( L) ;
// cerco primo pezzo messo in grezzo
int nId = ExeGetFirstGhostPart() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetParam( L, nId) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaGetNextGhostPart( lua_State* L)
{
// 1 parametro : nGhostPartId
int nGhostPartId ;
LuaCheckParam( L, 1, nGhostPartId)
LuaClearStack( L) ;
// cerco pezzo successivo messo in grezzo
int nId = ExeGetNextGhostPart( nGhostPartId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetParam( L, nId) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaEraseEmptyParts( lua_State* L)
@@ -387,6 +421,8 @@ LuaInstallGdbPartLayer( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtGetNextLayer", LuaGetNextLayer) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetLastLayer", LuaGetLastLayer) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetPrevLayer", LuaGetPrevLayer) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetFirstGhostPart", LuaGetFirstGhostPart) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetNextGhostPart", LuaGetNextGhostPart) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtEraseEmptyParts", LuaEraseEmptyParts) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSelectPartObjs", LuaSelectPartObjs) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtDeselectPartObjs", LuaDeselectPartObjs) ;