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:
+23
-24
@@ -16,12 +16,12 @@
|
||||
#include "API.h"
|
||||
#include "LUA.h"
|
||||
#include "LUA_Base.h"
|
||||
#include "LUA_Aux.h"
|
||||
#include "AuxTools.h"
|
||||
#include "/EgtDev/Include/EInAPI.h"
|
||||
#include "/EgtDev/Include/EInConst.h"
|
||||
#include "/EgtDev/Include/EGkExtText.h"
|
||||
#include "/EgtDev/Include/EgnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGkLuaAux.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -30,15 +30,15 @@ using namespace std ;
|
||||
static int
|
||||
LuaCreateGroup( lua_State* L)
|
||||
{
|
||||
// 1 o 2 o 3 parametri : ParentId [, Frame] [, sRefType]
|
||||
// 1 o 2 o 3 parametri : ParentId [, Frame] [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Frame3d frFrame ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
if ( LuaGetParam( L, 2, frFrame))
|
||||
LuaGetRefType( L, 3, nRefType) ;
|
||||
LuaGetParam( L, 3, nRefType) ;
|
||||
else
|
||||
LuaGetRefType( L, 2, nRefType) ;
|
||||
LuaGetParam( L, 2, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il gruppo
|
||||
int nId = EgtCreateGroup( nParentId, frFrame.Orig().v,
|
||||
@@ -55,13 +55,13 @@ LuaCreateGroup( lua_State* L)
|
||||
static int
|
||||
LuaCreateGeoPoint( lua_State* L)
|
||||
{
|
||||
// 2 o 3 parametri : ParentId, PtP [, sRefType]
|
||||
// 2 o 3 parametri : ParentId, PtP [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Point3d ptP ;
|
||||
LuaCheckParam( L, 2, ptP)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetRefType( L, 3, nRefType) ;
|
||||
LuaGetParam( L, 3, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il punto
|
||||
int nId = EgtCreateGeoPoint( nParentId, ptP.v, nRefType) ;
|
||||
@@ -77,7 +77,7 @@ LuaCreateGeoPoint( lua_State* L)
|
||||
static int
|
||||
LuaCreateGeoVector( lua_State* L)
|
||||
{
|
||||
// 2 o 3 o 4 parametri : ParentId, VtV [, PtB] [, sRefType]
|
||||
// 2 o 3 o 4 parametri : ParentId, VtV [, PtB] [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Vector3d vtV ;
|
||||
@@ -85,9 +85,9 @@ LuaCreateGeoVector( lua_State* L)
|
||||
Point3d ptB ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
if ( LuaGetParam( L, 3, ptB))
|
||||
LuaGetRefType( L, 4, nRefType) ;
|
||||
LuaGetParam( L, 4, nRefType) ;
|
||||
else
|
||||
LuaGetRefType( L, 3, nRefType) ;
|
||||
LuaGetParam( L, 3, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il vettore
|
||||
int nId = EgtCreateGeoVector( nParentId, vtV.v, ptB.v, nRefType) ;
|
||||
@@ -103,13 +103,13 @@ LuaCreateGeoVector( lua_State* L)
|
||||
static int
|
||||
LuaCreateGeoFrame( lua_State* L)
|
||||
{
|
||||
// 2 o 3 parametri : ParentId, Frame [, sRefType]
|
||||
// 2 o 3 parametri : ParentId, Frame [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Frame3d frFrame ;
|
||||
LuaCheckParam( L, 2, frFrame) ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetRefType( L, 3, nRefType) ;
|
||||
LuaGetParam( L, 3, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il gruppo
|
||||
int nId = EgtCreateGeoFrame( nParentId, frFrame.Orig().v,
|
||||
@@ -126,7 +126,7 @@ LuaCreateGeoFrame( lua_State* L)
|
||||
static int
|
||||
LuaCreateText( lua_State* L)
|
||||
{
|
||||
// 5 o 6 parametri : ParentId, ptP, AngRotDeg, Text, H [, sRefType]
|
||||
// 5 o 6 parametri : ParentId, ptP, AngRotDeg, Text, H [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Point3d ptP ;
|
||||
@@ -138,7 +138,7 @@ LuaCreateText( lua_State* L)
|
||||
double dH ;
|
||||
LuaCheckParam( L, 5, dH) ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetRefType( L, 6, nRefType) ;
|
||||
LuaGetParam( L, 6, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il testo
|
||||
int nId = EgtCreateText( nParentId, ptP, dAngRotDeg, sText, dH, nRefType) ;
|
||||
@@ -154,7 +154,7 @@ LuaCreateText( lua_State* L)
|
||||
static int
|
||||
LuaCreateTextEx( lua_State* L)
|
||||
{
|
||||
// 8 o 9 parametri : ParentId, ptP, vtN, vtD, Text, Font, bItalic, H [, sRefType]
|
||||
// 8 o 9 parametri : ParentId, ptP, vtN, vtD, Text, Font, bItalic, H [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Point3d ptP ;
|
||||
@@ -174,7 +174,7 @@ LuaCreateTextEx( lua_State* L)
|
||||
double dH ;
|
||||
LuaCheckParam( L, 8, dH) ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetRefType( L, 9, nRefType) ;
|
||||
LuaGetParam( L, 9, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il testo in modo esteso
|
||||
int nId = EgtCreateTextEx( nParentId, ptP, vtN, vtD, sText, sFont, bItalic, dH, nRefType) ;
|
||||
@@ -190,7 +190,7 @@ LuaCreateTextEx( lua_State* L)
|
||||
static int
|
||||
LuaCreateTextAdv( lua_State* L)
|
||||
{
|
||||
// 12 o 13 parametri : ParentId, ptP, vtN, vtD, Text, Font, W, sItalic, H, Rat, AddAdv, InsPos [, sRefType]
|
||||
// 12 o 13 parametri : ParentId, ptP, vtN, vtD, Text, Font, W, sItalic, H, Rat, AddAdv, InsPos [, nRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
Point3d ptP ;
|
||||
@@ -210,16 +210,15 @@ LuaCreateTextAdv( lua_State* L)
|
||||
ToUpper( sItalic) ;
|
||||
bool bItalic = ( sItalic == "I") ;
|
||||
double dH ;
|
||||
LuaCheckParam( L, 9, dH) ;
|
||||
LuaCheckParam( L, 9, dH)
|
||||
double dRat ;
|
||||
LuaCheckParam( L, 10, dRat) ;
|
||||
LuaCheckParam( L, 10, dRat)
|
||||
double dAddAdv ;
|
||||
LuaCheckParam( L, 11, dAddAdv) ;
|
||||
string sInsPos ;
|
||||
LuaCheckParam( L, 12, sInsPos) ;
|
||||
int nInsPos = ETxtInsPosToString( sInsPos) ;
|
||||
LuaCheckParam( L, 11, dAddAdv)
|
||||
int nInsPos ;
|
||||
LuaCheckParam( L, 12, nInsPos)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetRefType( L, 13, nRefType) ;
|
||||
LuaGetParam( L, 13, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo il testo in modo avanzato
|
||||
int nId = EgtCreateTextAdv( nParentId, ptP, vtN, vtD,
|
||||
|
||||
Reference in New Issue
Block a user