From 7ff53dc0d792bf3da5911467778555a7610b00ca Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 15 Sep 2014 07:05:15 +0000 Subject: [PATCH] EgtInterface 1.5i3 : - modifiche per controllo chiave di protezione. --- API_General.cpp | 8 ++++++++ API_GeomDB.cpp | 7 +++---- API_Macro.h | 3 +++ API_Scene.cpp | 2 +- EgtInterface.rc | Bin 11526 -> 11526 bytes 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/API_General.cpp b/API_General.cpp index 6d0ddf4..4aaa2e9 100644 --- a/API_General.cpp +++ b/API_General.cpp @@ -85,6 +85,14 @@ __stdcall EgtExit( void) return TRUE ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtSetKey( const wchar_t* sKey) +{ + SetEGkKey( LPSTR( WtoA( sKey))) ; + return TRUE ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtSetFont( const wchar_t* sNfeFontDir, const wchar_t* sDefaultFont) diff --git a/API_GeomDB.cpp b/API_GeomDB.cpp index 51e23e6..4cbe9e1 100644 --- a/API_GeomDB.cpp +++ b/API_GeomDB.cpp @@ -30,9 +30,6 @@ using namespace std ; int __stdcall EgtInitGeomDB( void) { - // inizializzazioni DB geometrico - PtrOwner pGeomDB( CreateGeomDB()) ; - VERIFY_NULL( Get( pGeomDB), "Error in CreateGeomDB", 0) // creo e recupero un contesto libero int nGseCtx = CreateGseContext() ; if ( nGseCtx == 0) { @@ -40,11 +37,13 @@ __stdcall EgtInitGeomDB( void) return 0 ; } GseContext* pGseCtx = GetGseContext( nGseCtx) ; + // inizializzazioni DB geometrico + PtrOwner pGeomDB( CreateGeomDB()) ; + VERIFY_NULL( Get( pGeomDB), "Error in CreateGeomDB", nGseCtx) // inserisco il GeomDB nel contesto pGseCtx->m_pGeomDB = Release( pGeomDB) ; pGseCtx->m_pGeomDB->Init() ; pGseCtx->m_pGeomDB->SetDefaultMaterial( pGseCtx->m_colDef) ; - // log avvio DB geometrico string sLog = "GeomDB started " + ToString( nGseCtx) ; LOG_INFO( GetLogger(), sLog.c_str()) diff --git a/API_Macro.h b/API_Macro.h index 512d2be..5ca1865 100644 --- a/API_Macro.h +++ b/API_Macro.h @@ -26,6 +26,9 @@ return Ret ; \ } +//----------------------------------------------------------------------------- +#define VERIFY_CTX( pC, Ret) VERIFY_NULL( pC, "Context invalid", Ret) + //----------------------------------------------------------------------------- #define VERIFY_GEOMDB( pG, Ret) VERIFY_NULL( pG, "GeomDB invalid", Ret) diff --git a/API_Scene.cpp b/API_Scene.cpp index e59cd47..3e48355 100644 --- a/API_Scene.cpp +++ b/API_Scene.cpp @@ -26,7 +26,7 @@ BOOL __stdcall EgtInitScene( int nGseCtx, HWND hWnd, int nDriver, int b2Buff, int nColorBits, int nDepthBits) { GseContext* pGseCtx = GetGseContext( nGseCtx) ; - VERIFY_CTX_GEOMDB( pGseCtx, FALSE) + VERIFY_CTX( pGseCtx, FALSE) // inizializzazione scena OpenGL PtrOwner pScene( CreateEGrScene()) ; VERIFY_NULL( Get( pScene), "Error in CreateEGrScene", FALSE) diff --git a/EgtInterface.rc b/EgtInterface.rc index e35264d942c1f9153e9490799d8bc11178a15709..195907126423a05cb1cb72870e2845198a5f2fe7 100644 GIT binary patch delta 79 zcmZpRYKz+Njg8TG^IpD_Op_0A)-f7SW)w=@yo5`F1uW{!45S!^N+CR;8V5<38Wkz9 N8e2KAnnuM|ZU7f27ry`i delta 79 zcmZpRYKz+Njg8T0^IpD_Op_0A)-f7QW)w=@yo5`F1uW{!45S!^N+CR;8V5<38Wkz9 N8e2KAnnuM|ZU7bg7q