|
From: <par...@us...> - 2003-05-30 01:49:33
|
Update of /cvsroot/decaldev/source/Inject
In directory sc8-pr-cvs1:/tmp/cvs-serv18904
Modified Files:
StdAfx.h RootLayer.h Panel.cpp Manager.cpp Inject.cpp
BarLayer.cpp
Log Message:
more registry updates
Index: StdAfx.h
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/StdAfx.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** StdAfx.h 23 May 2003 02:20:48 -0000 1.10
--- StdAfx.h 30 May 2003 01:49:29 -0000 1.11
***************
*** 39,43 ****
#include <string>
#import <msxml.dll>
!
#include "../Include/VSBridge.h"
#define MakePtr( cast, ptr, AddValue ) (cast)( (DWORD)(ptr)+(DWORD)(AddValue))
--- 39,43 ----
#include <string>
#import <msxml.dll>
! #include "../Include/Helpers.h"
#include "../Include/VSBridge.h"
#define MakePtr( cast, ptr, AddValue ) (cast)( (DWORD)(ptr)+(DWORD)(AddValue))
Index: RootLayer.h
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/RootLayer.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** RootLayer.h 23 May 2003 02:20:48 -0000 1.5
--- RootLayer.h 30 May 2003 01:49:29 -0000 1.6
***************
*** 26,30 ****
cRootLayer() : m_nNextViewID( 1000 ), m_nViewMode( 0 )
{
! CRegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
if( key.QueryDWORDValue( _T("ViewMode"), m_nViewMode ) != ERROR_SUCCESS)
--- 26,30 ----
cRootLayer() : m_nNextViewID( 1000 ), m_nViewMode( 0 )
{
! RegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
if( key.QueryDWORDValue( _T("ViewMode"), m_nViewMode ) != ERROR_SUCCESS)
Index: Panel.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/Panel.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Panel.cpp 23 May 2003 02:20:48 -0000 1.12
--- Panel.cpp 30 May 2003 01:49:29 -0000 1.13
***************
*** 110,114 ****
m_pSite->put_Transparent( VARIANT_FALSE );
! CRegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
--- 110,114 ----
m_pSite->put_Transparent( VARIANT_FALSE );
! RegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
Index: Manager.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/Manager.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** Manager.cpp 23 May 2003 02:20:48 -0000 1.70
--- Manager.cpp 30 May 2003 01:49:30 -0000 1.71
***************
*** 158,162 ****
// Set the blending Mode from the Registry
{
! CRegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
--- 158,162 ----
// Set the blending Mode from the Registry
{
! RegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
***************
*** 1260,1264 ****
USES_CONVERSION;
! CRegKey key;
HANDLE hFile;
--- 1260,1264 ----
USES_CONVERSION;
! RegKey key;
HANDLE hFile;
***************
*** 1285,1289 ****
ZeroMemory(tempbuf, sizeof(tempbuf));
! if (key.QueryValue (tempbuf, _T("Path"), &dwLengthPath) != ERROR_SUCCESS)
{
return E_FAIL;
--- 1285,1289 ----
ZeroMemory(tempbuf, sizeof(tempbuf));
! if (key.QueryStringValue (_T("Path"), tempbuf, &dwLengthPath) != ERROR_SUCCESS)
{
return E_FAIL;
***************
*** 1292,1296 ****
dwLengthMap = MAX_PATH-dwLengthPath;
! if (key.QueryValue (tempbuf, _T("CurrentInputMap"), &dwLengthMap) != ERROR_SUCCESS)
{
// This seems to be what AC does
--- 1292,1296 ----
dwLengthMap = MAX_PATH-dwLengthPath;
! if (key.QueryStringValue (_T("CurrentInputMap"), tempbuf, &dwLengthMap) != ERROR_SUCCESS)
{
// This seems to be what AC does
***************
*** 1422,1426 ****
if (!g_bDecalFontRead)
{
! CRegKey key;
// Open the main Decal Key
--- 1422,1426 ----
if (!g_bDecalFontRead)
{
! RegKey key;
// Open the main Decal Key
***************
*** 1429,1433 ****
// Get font type
DWORD dwFontType;
! if (key.QueryValue(dwFontType, "FontType") == ERROR_SUCCESS)
{
// Act on type
--- 1429,1433 ----
// Get font type
DWORD dwFontType;
! if (key.QueryDWORDValue("FontType", dwFontType) == ERROR_SUCCESS)
{
// Act on type
***************
*** 1442,1446 ****
case 1: // Current AC Client Font
{
! CRegKey k;
TCHAR szFontName[512];
DWORD dwCount = 512;
--- 1442,1446 ----
case 1: // Current AC Client Font
{
! RegKey k;
TCHAR szFontName[512];
DWORD dwCount = 512;
***************
*** 1448,1452 ****
// Get the AC Client font
k.Create(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Microsoft Games\\Asheron's Call\\1.00"));
! if (k.QueryValue(szFontName, "Font", &dwCount) == ERROR_SUCCESS)
{
g_bstrDecalFontName = _bstr_t(szFontName);
--- 1448,1452 ----
// Get the AC Client font
k.Create(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Microsoft Games\\Asheron's Call\\1.00"));
! if (k.QueryStringValue("Font", szFontName, &dwCount) == ERROR_SUCCESS)
{
g_bstrDecalFontName = _bstr_t(szFontName);
***************
*** 1463,1467 ****
// Get the custom font
! if (key.QueryValue(szFontName, "FontName", &dwCount) == ERROR_SUCCESS)
{
g_bstrDecalFontName = _bstr_t(szFontName);
--- 1463,1467 ----
// Get the custom font
! if (key.QueryStringValue("FontName", szFontName, &dwCount) == ERROR_SUCCESS)
{
g_bstrDecalFontName = _bstr_t(szFontName);
Index: Inject.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/Inject.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Inject.cpp 13 May 2003 07:16:12 -0000 1.20
--- Inject.cpp 30 May 2003 01:49:30 -0000 1.21
***************
*** 181,187 ****
} else {
DWORD dwCount = MAX_PATH;
! CRegKey key;
key.Open( HKEY_LOCAL_MACHINE, _paths[ pathType ].szKey );
! key.QueryValue( szBuffer, _paths[ pathType ].szValue, &dwCount );
::_tcscat( szBuffer, _T( "\\" ) );
::_tcscat( szBuffer, szFilename );
--- 181,187 ----
} else {
DWORD dwCount = MAX_PATH;
! RegKey key;
key.Open( HKEY_LOCAL_MACHINE, _paths[ pathType ].szKey );
! key.QueryStringValue( _paths[ pathType ].szValue, szBuffer, &dwCount );
::_tcscat( szBuffer, _T( "\\" ) );
::_tcscat( szBuffer, szFilename );
***************
*** 193,197 ****
bool CheckForHardwareMode ()
{
! CRegKey key;
if (key.Open (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Microsoft Games\\Asheron's Call\\1.00", KEY_READ) != ERROR_SUCCESS)
--- 193,197 ----
bool CheckForHardwareMode ()
{
! RegKey key;
if (key.Open (HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Microsoft Games\\Asheron's Call\\1.00", KEY_READ) != ERROR_SUCCESS)
***************
*** 202,206 ****
DWORD dwValue = 0;
! if (key.QueryValue (dwValue, "UseHardware") != ERROR_SUCCESS)
{
return false;
--- 202,206 ----
DWORD dwValue = 0;
! if (key.QueryDWORDValue ("UseHardware", dwValue) != ERROR_SUCCESS)
{
return false;
Index: BarLayer.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/Inject/BarLayer.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** BarLayer.cpp 17 Mar 2003 09:23:15 -0000 1.13
--- BarLayer.cpp 30 May 2003 01:49:30 -0000 1.14
***************
*** 107,111 ****
m_pSite->put_Transparent( VARIANT_FALSE );
! CRegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
--- 107,111 ----
m_pSite->put_Transparent( VARIANT_FALSE );
! RegKey key;
key.Create( HKEY_LOCAL_MACHINE, _T( "SOFTWARE\\Decal" ) );
***************
*** 113,126 ****
m_bRadarDraw = true;
! if( key.QueryValue( dwAlpha, "BarAlpha" ) == ERROR_SUCCESS )
m_pSite->put_Alpha( dwAlpha );
! if( key.QueryValue( dwRadarDraw, "BarRadarDraw" ) == ERROR_SUCCESS )
m_bRadarDraw = dwRadarDraw ? true : false;
! if( key.QueryValue( m_nMinMax, "BarState" ) != ERROR_SUCCESS )
m_nMinMax = eStateMax;
! if( key.QueryValue( (DWORD &) m_TotalDelta, "BarDelta" ) != ERROR_SUCCESS )
m_TotalDelta = 0;
--- 113,126 ----
m_bRadarDraw = true;
! if( key.QueryDWORDValue( "BarAlpha", dwAlpha ) == ERROR_SUCCESS )
m_pSite->put_Alpha( dwAlpha );
! if( key.QueryDWORDValue( "BarRadarDraw", dwRadarDraw ) == ERROR_SUCCESS )
m_bRadarDraw = dwRadarDraw ? true : false;
! if( key.QueryDWORDValue( "BarState", m_nMinMax ) != ERROR_SUCCESS )
m_nMinMax = eStateMax;
! if( key.QueryDWORDValue( "BarDelta", (DWORD &)m_TotalDelta ) != ERROR_SUCCESS )
m_TotalDelta = 0;
***************
*** 404,408 ****
void __stdcall cBarLayer::onMinMaxHit(long nID) {
! CRegKey key;
if (m_nMinMax == eStateMax) {
--- 404,408 ----
void __stdcall cBarLayer::onMinMaxHit(long nID) {
! RegKey key;
if (m_nMinMax == eStateMax) {
***************
*** 415,419 ****
key.Create(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Decal"));
! key.SetValue(m_nMinMax, "BarState");
Reformat();
--- 415,419 ----
key.Create(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Decal"));
! key.SetDWORDValue("BarState", m_nMinMax);
Reformat();
***************
*** 446,452 ****
m_bDragging = false;
! CRegKey key;
key.Create(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Decal"));
! key.SetValue(m_TotalDelta, "BarDelta");
}
break;
--- 446,452 ----
m_bDragging = false;
! RegKey key;
key.Create(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Decal"));
! key.SetDWORDValue("BarDelta", (DWORD)m_TotalDelta);
}
break;
|