EgtInterface 1.6d3 :

- costanti stringa sostituite con costanti numeriche
- modificate funzioni API e LUA per scansione pezzi e layer
- aggiunta pulizia memoria al caricamento messaggi (necessario al cambio lingua)
- migliorie varie a funzioni Lua.
This commit is contained in:
Dario Sassi
2015-04-20 08:43:10 +00:00
parent fd718143e6
commit 9d3dc5e537
38 changed files with 810 additions and 824 deletions
+8 -14
View File
@@ -16,10 +16,10 @@
#include "API.h"
#include "LUA.h"
#include "LUA_Base.h"
#include "LUA_Aux.h"
#include "/EgtDev/Include/EInAPI.h"
#include "/EgtDev/Include/EInConst.h"
#include "/EgtDev/Include/EgnStringUtils.h"
#include "/EgtDev/Include/EGkLuaAux.h"
#include "/EgtDev/Include/EGnStringUtils.h"
using namespace std ;
@@ -27,13 +27,13 @@ using namespace std ;
static int
LuaChangeGroupFrame( lua_State* L)
{
// 2 o 3 parametri : Id, frNewRef [, sRefType]
// 2 o 3 parametri : Id, frNewRef [, nRefType]
int nId ;
LuaCheckParam( L, 1, nId)
Frame3d frNewRef ;
LuaCheckParam( L, 2, frNewRef)
int nRefType = RTY_DEFAULT ;
LuaGetRefType( L, 3, nRefType) ;
LuaGetParam( L, 3, nRefType) ;
LuaClearStack( L) ;
// modifica del riferimento
bool bOk = ( EgtChangeGroupFrame( nId, frNewRef, nRefType) != FALSE) ;
@@ -45,13 +45,13 @@ LuaChangeGroupFrame( lua_State* L)
static int
LuaChangeVectorBase( lua_State* L)
{
// 2 o 3 parametri : Id, ptBase [, sRefType]
// 2 o 3 parametri : Id, ptBase [, nRefType]
int nId ;
LuaCheckParam( L, 1, nId)
Point3d ptBase ;
LuaCheckParam( L, 2, ptBase)
int nRefType = RTY_DEFAULT ;
LuaGetRefType( L, 3, nRefType) ;
LuaGetParam( L, 3, nRefType) ;
LuaClearStack( L) ;
// modifica del punto base
bool bOk = ( EgtChangeVectorBase( nId, ptBase.v, nRefType) != FALSE) ;
@@ -109,17 +109,11 @@ LuaFlipText( lua_State* L)
static int
LuaMirrorText( lua_State* L)
{
// 1 o 2 parametri : Id [, sOnL]
// 1 o 2 parametri : Id [, bOnL]
int nId ;
LuaCheckParam( L, 1, nId)
bool bOnL = true ;
if ( lua_gettop( L) >= 2) {
string sLorH ;
LuaCheckParam( L, 2, sLorH) ;
ToUpper( sLorH) ;
if ( sLorH == "H")
bOnL = false ;
}
LuaGetParam( L, 2, bOnL) ;
LuaClearStack( L) ;
// flip del testo
bool bOk = ( EgtMirrorText( nId, bOnL) != FALSE) ;