EgtGraphics 1.6c4 :
- aggiunta gestione codici di protezione (con opzioni).
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
|
||||
|
||||
#include "/EgtDev/Include/EgtILogger.h"
|
||||
#include <string>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
ILogger* GetEGrLogger( void) ;
|
||||
const std::string& GetEGrKey( void) ;
|
||||
|
||||
+25
-12
@@ -19,18 +19,14 @@
|
||||
#include "/EgtDev/Include/EgtTrace.h"
|
||||
|
||||
//--------------------------- Costanti ----------------------------------------
|
||||
#if defined( _WIN64)
|
||||
#if defined( _DEBUG)
|
||||
const char* EGR_STR = "EgtGraphicsD64.dll ver. " ;
|
||||
#else
|
||||
const char* EGR_STR = "EgtGraphicsR64.dll ver. " ;
|
||||
#endif
|
||||
#elif defined( _WIN32)
|
||||
#if defined( _DEBUG)
|
||||
const char* EGR_STR = "EgtGraphicsD32.dll ver. " ;
|
||||
#else
|
||||
const char* EGR_STR = "EgtGraphicsR32.dll ver. " ;
|
||||
#endif
|
||||
#if defined( _WIN64) && defined( _DEBUG)
|
||||
const char* EGR_STR = "EgtGraphicsD64.dll ver. " ;
|
||||
#elif defined( _WIN64)
|
||||
const char* EGR_STR = "EgtGraphicsR64.dll ver. " ;
|
||||
#elif defined( _WIN32) && defined( _DEBUG)
|
||||
const char* EGR_STR = "EgtGraphicsD32.dll ver. " ;
|
||||
#else
|
||||
const char* EGR_STR = "EgtGraphicsR32.dll ver. " ;
|
||||
#endif
|
||||
const int STR_DIM = 40 ;
|
||||
|
||||
@@ -90,3 +86,20 @@ GetEGrLogger( void)
|
||||
{
|
||||
return s_pLogger ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static std::string s_sKey ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void
|
||||
SetEGrKey( const std::string& sKey)
|
||||
{
|
||||
s_sKey = sKey ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
const std::string&
|
||||
GetEGrKey( void)
|
||||
{
|
||||
return s_sKey ;
|
||||
}
|
||||
|
||||
Binary file not shown.
+25
-22
@@ -13,6 +13,9 @@
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="File di intestazione\Include">
|
||||
<UniqueIdentifier>{8f14972c-68c0-465e-8939-e4ee1eeef53a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="stdafx.h">
|
||||
@@ -21,56 +24,56 @@
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGrDllMain.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Scene.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGrScene.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GraphObjs.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="OpenGL.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EgkObjGraphics.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkGdbIterator.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ObjOldGraphics.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ObjNewGraphics.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkPolyLine.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ObjEGrGraphics.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="DllMain.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGrSceExecutor.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SceExecutor.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkColor.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkTriangle3d.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
<ClInclude Include="..\Include\EGkGdbIterator.h">
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkMaterial.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EgkObjGraphics.h">
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkPolyLine.h">
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkTriangle3d.h">
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGrDllMain.h">
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGrSceExecutor.h">
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGrScene.h">
|
||||
<Filter>File di intestazione\Include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="EGrUtils.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
#include "/EgtDev/Include/EGkFrame3d.h"
|
||||
#include "/EgtDev/Include/EGkGdbConst.h"
|
||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||
#include "/EgtDev/Include/SELkKeyProc.h"
|
||||
#include "/EgtDev/Include/EgtKeyCodes.h"
|
||||
|
||||
using namespace std ;
|
||||
|
||||
@@ -34,6 +36,22 @@ static const double MIN_ZCLIP_EXT = 5000 ;
|
||||
IEGrScene*
|
||||
CreateEGrScene( void)
|
||||
{
|
||||
// verifico la chiave e le opzioni
|
||||
unsigned int nOpt1, nOpt2 ;
|
||||
int nOptExpDays ;
|
||||
int nRet = GetKeyOptions( GetEGrKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||
nOpt1, nOpt2, nOptExpDays) ;
|
||||
if ( nRet != KEY_OK) {
|
||||
string sErr = "Error on Key (GRC/" + ToString( nRet) + ")" ;
|
||||
LOG_ERROR( GetEGrLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
if ( (nOpt1 & KEYOPT_EGR_BASE) == 0 || nOptExpDays < GetCurrDay()) {
|
||||
string sErr = "Error on Key (GRC/OPT)" ;
|
||||
LOG_ERROR( GetEGrLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
// creo l'oggetto
|
||||
return static_cast<IEGrScene*> ( new(nothrow) Scene) ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user