diff --git a/API_Lua.cpp b/API_Lua.cpp index 1ea5bda..e45a8a2 100644 --- a/API_Lua.cpp +++ b/API_Lua.cpp @@ -55,6 +55,24 @@ __stdcall EgtLuaSetGlobStringVar( const wchar_t* wsVar, const wchar_t* wsVal) return ( ExeLuaSetGlobStringVar( wstrztoA( wsVar), wstrztoA( wsVal)) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtLuaSetGlobVectorVar( const wchar_t* wsVar, const double vtVal[3]) +{ + if ( vtVal == nullptr) + return FALSE ; + return ( ExeLuaSetGlobVectorVar( wstrztoA( wsVar), vtVal) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtLuaSetGlobPointVar( const wchar_t* wsVar, const double ptVal[3]) +{ + if ( ptVal == nullptr) + return FALSE ; + return ( ExeLuaSetGlobPointVar( wstrztoA( wsVar), ptVal) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtLuaGetGlobBoolVar( const wchar_t* wsVar, BOOL* pbVal) @@ -97,6 +115,36 @@ __stdcall EgtLuaGetGlobStringVar( const wchar_t* wsVar, wchar_t*& wsVal) return (( wsVal == nullptr) ? FALSE : TRUE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtLuaGetGlobVectorVar( const wchar_t* wsVar, double vtVal[3]) +{ + // verifico parametro di ritorno + if ( &vtVal == nullptr) + return FALSE ; + // recupero il valore della variabile + Vector3d vtTmp ; + if ( ! ExeLuaGetGlobVectorVar( wstrztoA( wsVar), vtTmp)) + return FALSE ; + VEC_FROM_3D( vtVal, vtTmp) + return TRUE ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtLuaGetGlobPointVar( const wchar_t* wsVar, double ptVal[3]) +{ + // verifico parametro di ritorno + if ( &ptVal == nullptr) + return FALSE ; + // recupero il valore della variabile + Point3d ptTmp ; + if ( ! ExeLuaGetGlobPointVar( wstrztoA( wsVar), ptTmp)) + return FALSE ; + VEC_FROM_3D( ptVal, ptTmp) + return TRUE ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtLuaResetGlobVar( const wchar_t* wsVar) diff --git a/EgtInterface.rc b/EgtInterface.rc index 268f208..bb9a46b 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ