EgtExecutor 2.6l2 :

- aggiunta funzione Exe e Lua GetClEntAxesStatus.
This commit is contained in:
Dario Sassi
2024-12-04 15:06:25 +01:00
parent 0c70756a0f
commit a55fe51fde
3 changed files with 32 additions and 2 deletions
+11 -1
View File
@@ -3039,13 +3039,23 @@ ExeGetClEntIndex( int nEntId, int& nIndex)
return pMachMgr->GetClEntIndex( nEntId, nIndex) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetClEntAxesStatus( int nEntId, int& nStatus)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// recupero lo stato del movimento assi
return pMachMgr->GetClEntAxesStatus( nEntId, nStatus) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetClEntAxesMask( int nEntId, int& nMask)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// recupero la mascheratura del movimento assi
// recupero la mascheratura del movimento assi (valida solo in rapido)
return pMachMgr->GetClEntAxesMask( nEntId, nMask) ;
}
BIN
View File
Binary file not shown.
+21 -1
View File
@@ -3155,6 +3155,25 @@ LuaGetClEntIndex( lua_State* L)
return 1 ;
}
//-----------------------------------------------------------------------------
static int
LuaGetClEntAxesStatus( lua_State* L)
{
// 1 parametro : nEntId
int nEntId ;
LuaGetParam( L, 1, nEntId) ;
LuaClearStack( L) ;
// recupero lo stato del movimento assi
int nStatus ;
bool bOk = ExeGetClEntAxesStatus( nEntId, nStatus) ;
// restituisco il risultato
if ( bOk)
LuaSetParam( L, nStatus) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-----------------------------------------------------------------------------
static int
LuaGetClEntAxesMask( lua_State* L)
@@ -3163,7 +3182,7 @@ LuaGetClEntAxesMask( lua_State* L)
int nEntId ;
LuaGetParam( L, 1, nEntId) ;
LuaClearStack( L) ;
// recupero la mascheratura del movimento assi
// recupero la mascheratura del movimento assi (valida solo in rapido)
int nMask ;
bool bOk = ExeGetClEntAxesMask( nEntId, nMask) ;
// restituisco il risultato
@@ -4446,6 +4465,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntMove", LuaGetClEntMove) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntFlag", LuaGetClEntFlag) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntIndex", LuaGetClEntIndex) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntAxesStatus", LuaGetClEntAxesStatus) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntAxesMask", LuaGetClEntAxesMask) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntAxesVal", LuaGetClEntAxesVal) ;
// Simulation