Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
63
Tools/ClientSetup/ClientSetup.cpp
Normal file
63
Tools/ClientSetup/ClientSetup.cpp
Normal file
@@ -0,0 +1,63 @@
|
||||
// ClientSetup.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ClientSetup.h"
|
||||
#include "ClientSetupDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CClientSetupApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CClientSetupApp, CWinApp)
|
||||
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CClientSetupApp <20><><EFBFBD><EFBFBD>
|
||||
|
||||
CClientSetupApp::CClientSetupApp()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
// InitInstance<63><65> <20><><EFBFBD><EFBFBD> <20>߿<EFBFBD><DFBF><EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CClientSetupApp <20><>ü<EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
CClientSetupApp theApp;
|
||||
|
||||
|
||||
// CClientSetupApp <20>ʱ<EFBFBD>ȭ
|
||||
|
||||
BOOL CClientSetupApp::InitInstance()
|
||||
{
|
||||
CWinApp::InitInstance();
|
||||
|
||||
// ǥ<><C7A5> <20>ʱ<EFBFBD>ȭ
|
||||
// <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<>⸦ <20><><EFBFBD>̷<EFBFBD><CCB7><EFBFBD>
|
||||
// <20>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> Ư<><C6AF> <20>ʱ<EFBFBD>ȭ <20><>ƾ<EFBFBD><C6BE> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
// <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> Ű<><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// TODO: <20><> <20><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> ȸ<><C8B8> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
CClientSetupDlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
INT_PTR nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> Ȯ<><C8AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
// <20>ڵ带 <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD>Ҹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
// <20>ڵ带 <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> FALSE<53><45> <20><>ȯ<EFBFBD>մϴ<D5B4>.
|
||||
return FALSE;
|
||||
}
|
||||
19
Tools/ClientSetup/ClientSetup.exe.manifest
Normal file
19
Tools/ClientSetup/ClientSetup.exe.manifest
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0"
|
||||
processorArchitecture="x86"
|
||||
name="ClientSetup"
|
||||
type="win32"
|
||||
/>
|
||||
<description>ClientSetup Program</description>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel
|
||||
level="requireAdministrator"
|
||||
uiAccess="false"
|
||||
/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
||||
31
Tools/ClientSetup/ClientSetup.h
Normal file
31
Tools/ClientSetup/ClientSetup.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// ClientSetup.h : PROJECT_NAME <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error PCH<43><48><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> 'stdafx.h'<27><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#include "resource.h" // <20><> <20><>ȣ
|
||||
|
||||
|
||||
// CClientSetupApp:
|
||||
// <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> ClientSetup.cpp<70><70> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
//
|
||||
|
||||
class CClientSetupApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CClientSetupApp();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
extern CClientSetupApp theApp;
|
||||
275
Tools/ClientSetup/ClientSetup.rc
Normal file
275
Tools/ClientSetup/ClientSetup.rc
Normal file
@@ -0,0 +1,275 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(949)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)\r\n"
|
||||
"#ifdef _WIN32\r\n"
|
||||
"LANGUAGE 18, 1\r\n"
|
||||
"#pragma code_page(949)\r\n"
|
||||
"#endif //_WIN32\r\n"
|
||||
"#include ""res\\ClientSetup.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#include ""l.kor\\afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 24
|
||||
//
|
||||
MANIFEST_RESOURCE_ID 24 MOVEABLE PURE "ClientSetup.exe.manifest"
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_CLIENTSETUP_DIALOG DIALOGEX 0, 0, 343, 214
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "ROW Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>ɼ<EFBFBD>"
|
||||
FONT 9, "<22><><EFBFBD><EFBFBD>", 0, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "",IDC_CONTROLTAB,"SysTabControl32",0x0,101,7,235,144
|
||||
CTEXT "<22><EFBFBD><D7B7><EFBFBD>ī<EFBFBD><C4AB>",IDC_STATIC_VIDEOCARD,103,27,50,15,
|
||||
SS_CENTERIMAGE
|
||||
COMBOBOX IDC_COMBO_VIDEOCARD,154,27,121,160,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "<22>ػ<EFBFBD><D8BB><EFBFBD>",IDC_STATIC_RES,103,47,50,15,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_COMBO_MODE,154,47,81,140,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "<22><><EFBFBD><EFBFBD>",IDC_STATIC_COLOR,103,67,50,15,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_COMBO_COLOR,154,67,39,95,CBS_DROPDOWN | CBS_SORT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "<22><><EFBFBD>ļ<EFBFBD>",IDC_STATIC_REFRESH,103,88,50,15,SS_CENTERIMAGE
|
||||
COMBOBOX IDC_COMBO_REFRESH,154,89,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "<22><EFBFBD><D7B7>ȿɼ<C8BF>",IDC_STATIC_OPTIONSIMPLE,103,108,50,15,
|
||||
SS_CENTERIMAGE | NOT WS_VISIBLE
|
||||
COMBOBOX IDC_COMBO_QUALITY,154,109,81,70,CBS_DROPDOWNLIST | NOT
|
||||
WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_CHARSHADOW,179,27,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_LIGHTMAP,179,45,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_RANGE,179,61,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_SCREENFILTER,179,27,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_ABLETEXTURE,179,79,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_GRASSRENDERING,179,95,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Ȯ<><C8AE>",IDOK,245,191,44,16
|
||||
CTEXT "ij<><C4B3><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD>",IDC_STATIC_CHARACTERSHADOW,104,27,75,15,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "<22><><EFBFBD><EFBFBD><D7B8><EFBFBD>",IDC_STATIC_HOUSESHADOW,104,45,75,15,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "<22>þ߹<C3BE><DFB9><EFBFBD>",IDC_STATIC_VIEWRANGE,104,61,75,15,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "ȭ<><C8AD> ȿ<><C8BF>",IDC_STATIC_SCREENFILTER,104,27,75,15,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "<22>ؽ<EFBFBD><D8BD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƽ",IDC_STATIC_TEXTURE,104,79,75,15,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "Ǯ",IDC_STATIC_GRASS,104,95,75,15,SS_CENTERIMAGE
|
||||
CTEXT "<22>ü<EEBFB5><C3BC>",IDC_STATIC_OS,107,27,63,12,SS_CENTERIMAGE
|
||||
CTEXT "",IDC_OS,176,27,150,11,SS_CENTERIMAGE | SS_SUNKEN
|
||||
CTEXT "<22><EFBFBD><DEB8><EFBFBD>",IDC_STATIC_MEMORY,107,45,63,12,SS_CENTERIMAGE
|
||||
CTEXT "",IDC_MEMORY,176,45,150,11,SS_CENTERIMAGE | SS_SUNKEN
|
||||
CTEXT "CPU <20>ӵ<EFBFBD>",IDC_STATIC_CPUSPEED,107,63,63,12,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "",IDC_CPUSPEED,176,63,150,11,SS_CENTERIMAGE | SS_SUNKEN
|
||||
CTEXT "HDD <20>뷮",IDC_STATIC_HDDCAP,107,81,63,12,SS_CENTERIMAGE
|
||||
CTEXT "",IDC_HDDCAP,176,81,150,11,SS_CENTERIMAGE | SS_SUNKEN
|
||||
CTEXT "<22><><EFBFBD>̷<EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>",IDC_STATIC_DIRECTVERSION,107,99,63,12,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "",IDC_DIRECTVERSION,176,99,150,11,SS_CENTERIMAGE |
|
||||
SS_SUNKEN
|
||||
CTEXT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ī<><C4AB>",IDC_STATIC_SOUNDCARD,107,117,63,12,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "",IDC_SOUNDCARD,176,117,150,11,SS_CENTERIMAGE |
|
||||
SS_SUNKEN
|
||||
EDITTEXT IDC_DESC,102,156,234,31,ES_MULTILINE | ES_READONLY | NOT
|
||||
WS_TABSTOP
|
||||
CTEXT "<22><> ȿ<><C8BF>",IDC_STATIC_WATEREFFECT,104,45,75,15,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "<22>۷ο<DBB7> ȿ<><C8BF>",IDC_STATIC_GLOWEFFECT,104,61,75,15,
|
||||
SS_CENTERIMAGE
|
||||
CTEXT "<22><><EFBFBD><EFBFBD> ȿ<><C8BF>",IDC_STATIC_WEATHEREFFECT,104,61,75,15,
|
||||
SS_CENTERIMAGE
|
||||
COMBOBOX IDC_COMBO_WATEREFFECT,179,45,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_GLOWEFFECT,179,61,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_COMBO_WEATHEREFFECT,179,61,39,135,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "<22><><EFBFBD><EFBFBD>",IDCANCEL,292,191,44,16
|
||||
LTEXT "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>",IDC_STATIC_WINDOWMODE,108,112,52,9,NOT
|
||||
WS_VISIBLE
|
||||
COMBOBOX IDC_COMBO_WINDOWMODE,154,109,78,135,CBS_DROPDOWNLIST |
|
||||
NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
||||
CTEXT "<22><><EFBFBD><EFBFBD> ",IDC_STATIC_LANGUAGE,102,112,48,8
|
||||
COMBOBOX IDC_COMBO_LANGUAGE,154,109,81,70,CBS_DROPDOWNLIST | NOT
|
||||
WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "<22><>Ƽ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>",IDC_MULTISUPPORT,"Button",
|
||||
BS_AUTOCHECKBOX | WS_TABSTOP,154,130,173,10
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Youxiland Co. Ltd."
|
||||
VALUE "FileDescription", "Client Setup Program"
|
||||
VALUE "FileVersion", "1, 0, 0, 1"
|
||||
VALUE "InternalName", "ClientSetup"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2004 Youxiland Co. Ltd. All rights reserved."
|
||||
VALUE "OriginalFilename", "ClientSetup.exe"
|
||||
VALUE "ProductName", "ClientSetup Setup Program"
|
||||
VALUE "ProductVersion", "1, 0, 0, 1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_CLIENTSETUP_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 336
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 207
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ICON1 ICON "icon1.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_MINDEPTHBITS "16"
|
||||
IDS_MINSTENCILBITS "0"
|
||||
END
|
||||
|
||||
#endif // <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE 18, 1
|
||||
#pragma code_page(949)
|
||||
#endif //_WIN32
|
||||
#include "res\ClientSetup.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#include "l.kor\afxres.rc" // Standard components
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
289
Tools/ClientSetup/ClientSetup.vcproj
Normal file
289
Tools/ClientSetup/ClientSetup.vcproj
Normal file
@@ -0,0 +1,289 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="ClientSetup"
|
||||
ProjectGUID="{9E58BB41-1B81-4CB3-934D-2613E15E5CFF}"
|
||||
SccProjectName=""
|
||||
SccLocalPath=""
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="./;../;"../../Engine/zalla3d base class";"../../Engine/zalla3d sceneclass";../../Engine/SoundLib;../../Engine/Effect;../../Engine/Caldron;../ScriptEngine;../GlobalScript;../CharacterActionControl;./RYLUI;./RYLClient;./EventHandler;../../MemoryManager;../../Engine/CrossM/Include"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib Version.lib dxguid.lib"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="./;../;"../../Engine/zalla3d base class";"../../Engine/zalla3d sceneclass";../../Engine/SoundLib;../../Engine/Effect;../../Engine/Caldron;../ScriptEngine;../GlobalScript;../CharacterActionControl;./RYLUI;./RYLClient;./EventHandler;../../MemoryManager;../../Engine/CrossM/Include"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;_RYL_LANGUAGE"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib Version.lib dxguid.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_MY|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="./;../;"../../Engine/zalla3d base class";"../../Engine/zalla3d sceneclass";../../Engine/SoundLib;../../Engine/Effect;../../Engine/Caldron;../ScriptEngine;../GlobalScript;../CharacterActionControl;./RYLUI;./RYLClient;./EventHandler;../../MemoryManager;../../Engine/CrossM/Include"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="winmm.lib Version.lib dxguid.lib"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\ClientSetup.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ClientSetupDlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\getdxver.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release_MY|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\SystemInfo.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\timer.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\bit_flags.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ClientSetup.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ClientSetupDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\data_types.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\debug.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\numeric_tools.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\SystemInfo.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\timer.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
<File
|
||||
RelativePath=".\res\ClientSetup.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ClientSetup.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\ClientSetup.rc2">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\icon1.ico">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ClientSetup.exe.manifest">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="ClientSetup.rc"/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
228
Tools/ClientSetup/ClientSetup.vcxproj
Normal file
228
Tools/ClientSetup/ClientSetup.vcxproj
Normal file
@@ -0,0 +1,228 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release_MY|Win32">
|
||||
<Configuration>Release_MY</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{9E58BB41-1B81-4CB3-934D-2613E15E5CFF}</ProjectGuid>
|
||||
<SccProjectName />
|
||||
<SccLocalPath />
|
||||
<Keyword>MFCProj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Static</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseOfMfc>Dynamic</UseOfMfc>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">false</LinkIncremental>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>./;../;../../Engine/zalla3d base class;../../Engine/zalla3d sceneclass;../../Engine/SoundLib;../../Engine/Effect;../../Engine/Caldron;../ScriptEngine;../GlobalScript;../CharacterActionControl;./RYLUI;./RYLClient;./EventHandler;../../MemoryManager;../../Engine/CrossM/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;Version.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>./;../;../../Engine/zalla3d base class;../../Engine/zalla3d sceneclass;../../Engine/SoundLib;../../Engine/Effect;../../Engine/Caldron;../ScriptEngine;../GlobalScript;../CharacterActionControl;./RYLUI;./RYLClient;./EventHandler;../../MemoryManager;../../Engine/CrossM/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;_RYL_LANGUAGE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;Version.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>./;../;../../Engine/zalla3d base class;../../Engine/zalla3d sceneclass;../../Engine/SoundLib;../../Engine/Effect;../../Engine/Caldron;../ScriptEngine;../GlobalScript;../CharacterActionControl;./RYLUI;./RYLClient;./EventHandler;../../MemoryManager;../../Engine/CrossM/Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>false</MinimalRebuild>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;Version.lib;dxguid.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<Midl>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MkTypLibCompatible>false</MkTypLibCompatible>
|
||||
</Midl>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Culture>0x0412</Culture>
|
||||
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ClientSetup.cpp" />
|
||||
<ClCompile Include="ClientSetupDlg.cpp" />
|
||||
<ClCompile Include="getdxver.cpp" />
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_MY|Win32'">Create</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SystemInfo.cpp" />
|
||||
<ClCompile Include="timer.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bit_flags.h" />
|
||||
<ClInclude Include="ClientSetup.h" />
|
||||
<ClInclude Include="ClientSetupDlg.h" />
|
||||
<ClInclude Include="data_types.h" />
|
||||
<ClInclude Include="debug.h" />
|
||||
<ClInclude Include="numeric_tools.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
<ClInclude Include="SystemInfo.h" />
|
||||
<ClInclude Include="timer.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\ClientSetup.ico" />
|
||||
<None Include="res\ClientSetup.rc2" />
|
||||
<None Include="icon1.ico" />
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ClientSetup.rc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="ClientSetup.exe.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Client\GlobalScript\GlobalScript.vcxproj">
|
||||
<Project>{fc216d91-d7ae-44c9-be1f-86544b1ad594}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Engine\zalla3d base class\Zalla3D Base Class.vcxproj">
|
||||
<Project>{663b3237-d6e2-4d71-8696-1425ebbedbad}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Engine\Zalla3D Scene Class\Zalla3D Scene Class.vcxproj">
|
||||
<Project>{48125d58-8048-48f4-97c6-967c72096625}</Project>
|
||||
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties RESOURCE_FILE="ClientSetup.rc" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
89
Tools/ClientSetup/ClientSetup.vcxproj.filters
Normal file
89
Tools/ClientSetup/ClientSetup.vcxproj.filters
Normal file
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="소스 파일">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="헤더 파일">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="리소스 파일">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ClientSetup.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ClientSetupDlg.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="getdxver.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="SystemInfo.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="timer.cpp">
|
||||
<Filter>소스 파일</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="bit_flags.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ClientSetup.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ClientSetupDlg.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="data_types.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="debug.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="numeric_tools.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="SystemInfo.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="timer.h">
|
||||
<Filter>헤더 파일</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="res\ClientSetup.ico">
|
||||
<Filter>리소스 파일</Filter>
|
||||
</None>
|
||||
<None Include="res\ClientSetup.rc2">
|
||||
<Filter>리소스 파일</Filter>
|
||||
</None>
|
||||
<None Include="icon1.ico">
|
||||
<Filter>리소스 파일</Filter>
|
||||
</None>
|
||||
<None Include="ReadMe.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ClientSetup.rc">
|
||||
<Filter>리소스 파일</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Manifest Include="ClientSetup.exe.manifest" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
1736
Tools/ClientSetup/ClientSetupDlg.cpp
Normal file
1736
Tools/ClientSetup/ClientSetupDlg.cpp
Normal file
File diff suppressed because it is too large
Load Diff
99
Tools/ClientSetup/ClientSetupDlg.h
Normal file
99
Tools/ClientSetup/ClientSetupDlg.h
Normal file
@@ -0,0 +1,99 @@
|
||||
// ClientSetupDlg.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include "afxwin.h"
|
||||
#include "afxcmn.h"
|
||||
#include <d3d8.h>
|
||||
|
||||
|
||||
namespace RYLMAINWINDOW
|
||||
{
|
||||
const DWORD QUICKSLOT_WINDOW = ( 1 << 0 ) ;
|
||||
const DWORD STATUS_WINDOW = ( 1 << 1 ) ;
|
||||
const DWORD MINIMAP_WINDOW = ( 1 << 2 ) ;
|
||||
const DWORD ENCHANT_WINDOW = ( 1 << 3 ) ;
|
||||
|
||||
const DWORD ALL_WINDOW = QUICKSLOT_WINDOW | STATUS_WINDOW | MINIMAP_WINDOW | ENCHANT_WINDOW ;
|
||||
};
|
||||
|
||||
// CClientSetupDlg <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
class CClientSetupDlg : public CDialog
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
public:
|
||||
CClientSetupDlg(CWnd* pParent = NULL); // ǥ<><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
enum { IDD = IDD_CLIENTSETUP_DIALOG };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
HINSTANCE m_hResource;
|
||||
char m_strRegRoot[MAX_PATH];
|
||||
BOOL m_bInitWindow;
|
||||
|
||||
// <20><EFBFBD><DEBD><EFBFBD> <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
public:
|
||||
afx_msg void OnDestroy();
|
||||
// afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
||||
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
||||
// afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
|
||||
BOOL SetGraphicCard(void);
|
||||
BOOL SetResolution(void);
|
||||
BOOL SetColor(void);
|
||||
BOOL SetRefresh(void);
|
||||
void SetPerformance(void);
|
||||
unsigned long m_dwOldWidth, m_dwOldHeight;
|
||||
|
||||
int m_iOldResolution;
|
||||
|
||||
void WriteError(unsigned long dwErrorCode);
|
||||
BOOL CreateReg(HKEY hReg);
|
||||
void AutoDetect(void);
|
||||
void SetTabControl(void);
|
||||
void InitString(void);
|
||||
unsigned long GetQualityBySetting(void);
|
||||
void SetSettingByQuality(unsigned long dwQuality);
|
||||
void MessageBox(UINT nID);
|
||||
|
||||
CComboBox m_cbVideoCard;
|
||||
CComboBox m_cbResolution;
|
||||
CComboBox m_cbRefresh;
|
||||
CComboBox m_cbColor;
|
||||
afx_msg void OnCbnSelchangeComboVideocard();
|
||||
afx_msg void OnCbnSelchangeComboMode();
|
||||
afx_msg void OnCbnSelchangeComboColor();
|
||||
CComboBox m_cbCharShadow;
|
||||
CComboBox m_cbScreenEffect;
|
||||
CComboBox m_cbHouseShadow;
|
||||
CComboBox m_cbTextureQuailty;
|
||||
CComboBox m_cbViewRange;
|
||||
CComboBox m_cbGrass;
|
||||
CComboBox m_cbQuality;
|
||||
afx_msg void OnBnClickedOk();
|
||||
// afx_msg void OnCbnSelchangeComboQuality();
|
||||
afx_msg void OnCbnSelchangeComboRefresh();
|
||||
CTabCtrl m_tcControlTab;
|
||||
afx_msg void OnTcnSelchangeControltab(NMHDR *pNMHDR, LRESULT *pResult);
|
||||
CComboBox m_cbWaterEffect;
|
||||
CComboBox m_cbGlowEffect;
|
||||
CComboBox m_cbWeatherEffect;
|
||||
afx_msg void OnCbnSelchangeComboAbletexture();
|
||||
CStatic m_ctrlImage;
|
||||
afx_msg void OnBnClickedCancel();
|
||||
CComboBox m_cbWindowMode;
|
||||
afx_msg void OnCbnSelchangeComboWindowmode();
|
||||
afx_msg void OnStnClickedStaticWindowmode();
|
||||
CComboBox m_cbLanguage;
|
||||
CButton m_btMultiSupport;
|
||||
};
|
||||
71
Tools/ClientSetup/ReadMe.txt
Normal file
71
Tools/ClientSetup/ReadMe.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
================================================================================
|
||||
MFC <20><><EFBFBD>̺귯<CCBA><EAB7AF> : ClientSetup <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
================================================================================
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> ClientSetup <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. <20><> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD>α<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⺻<EFBFBD><E2BABB><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>ۼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
<EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> ClientSetup <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>䰡 <20><><EFBFBD>ԵǾ<D4B5>
|
||||
<EFBFBD>ֽ<EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
ClientSetup.vcproj
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>,
|
||||
<20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
ClientSetup.h
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>õ<EFBFBD> Resource.h<><68> <20><><EFBFBD><EFBFBD>
|
||||
Ư<><C6AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǸ<D4B5> CClientSetupApp <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
ClientSetup.cpp
|
||||
CClientSetupApp <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
ClientSetup.rc
|
||||
<20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> Microsoft Windows <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> RES <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>Ʈ<EFBFBD><C6AE> <20><> Ŀ<><C4BF><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǸ<D4B5>
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
||||
<20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> 1042<34><32> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
res\ClientSetup.ico
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ClientSetup.rc<72><63> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
res\ClientSetup.rc2
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD>Ե<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>ԵǾ<D4B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȭ <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
ClientSetupDlg.h, ClientSetupDlg.cpp - <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
CClientSetupDlg Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD>
|
||||
<20><> <20><>ȭ <20><><EFBFBD>ڿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ǵ˴ϴ<CBB4>. <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD> ClientSetup.rc<72><63>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ ǥ<><C7A5> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
<20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(PCH) ClientSetup.pch <20><> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> StdAfx.obj<62><6A> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
Resource.h
|
||||
<20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD>ҽ<EFBFBD> ID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>а<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>մϴ<D5B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1><EFBFBD><EFBFBD> "TODO:"<22><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
|
||||
<EFBFBD>ҽ<EFBFBD> <20>ڵ带 <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> DLL<4C><4C> MFC<46><43> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD> <20> ü<><C3BC><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> Microsoft Visual C++ CD-ROM<4F><4D> Win\System <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD> <20>ִ<EFBFBD>
|
||||
<EFBFBD>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> MFC70XXX.DLL<4C><4C> <20><>ǻ<EFBFBD><C7BB><EFBFBD><EFBFBD> system <20>Ǵ<EFBFBD> system32 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> MFCLOC.DLL<4C><4C> <20≯<EFBFBD><CCB8><EFBFBD> <20>ٲپ<D9B2><D9BE><EFBFBD> <20>մϴ<D5B4>. "XXX"<22><> <20>ش<EFBFBD> <20><><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> MFC70DEU.DLL<4C><4C><EFBFBD><EFBFBD> <20><><EFBFBD>Ͼ<EFBFBD><CFBE><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
<EFBFBD>̷<EFBFBD> <20>۾<EFBFBD><DBBE><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>Ϻ<EFBFBD> UI <20><><EFBFBD>Ұ<EFBFBD> <20> ü<><C3BC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD> <20>˴ϴ<CBB4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
1265
Tools/ClientSetup/SystemInfo.cpp
Normal file
1265
Tools/ClientSetup/SystemInfo.cpp
Normal file
File diff suppressed because it is too large
Load Diff
207
Tools/ClientSetup/SystemInfo.h
Normal file
207
Tools/ClientSetup/SystemInfo.h
Normal file
@@ -0,0 +1,207 @@
|
||||
#pragma once
|
||||
#include <ddraw.h>
|
||||
#include <d3d8.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace SystemInfo
|
||||
{
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: struct D3DModeInfo
|
||||
// Desc: Structure for holding information about a display mode
|
||||
//-----------------------------------------------------------------------------
|
||||
struct D3DModeInfo
|
||||
{
|
||||
DWORD Width; // Screen width in this mode
|
||||
DWORD Height; // Screen height in this mode
|
||||
D3DFORMAT Format; // Pixel format in this mode
|
||||
DWORD dwBehavior; // Hardware / Software / Mixed vertex processing
|
||||
DWORD dwRefresh[50];
|
||||
D3DFORMAT DepthStencilFormat; // Which depth/stencil format to use with this mode
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: struct D3DDeviceInfo
|
||||
// Desc: Structure for holding information about a Direct3D device, including
|
||||
// a list of modes compatible with this device
|
||||
//-----------------------------------------------------------------------------
|
||||
struct D3DDeviceInfo
|
||||
{
|
||||
// Device data
|
||||
D3DDEVTYPE DeviceType; // Reference, HAL, etc.
|
||||
D3DCAPS8 d3dCaps; // Capabilities of this device
|
||||
const TCHAR* strDesc; // Name of this device
|
||||
BOOL bCanDoWindowed; // Whether this device can work in windowed mode
|
||||
|
||||
// Modes for this device
|
||||
DWORD dwNumModes;
|
||||
D3DModeInfo modes[150];
|
||||
|
||||
// Current state
|
||||
DWORD dwCurrentMode;
|
||||
BOOL bWindowed;
|
||||
D3DMULTISAMPLE_TYPE MultiSampleType;
|
||||
};
|
||||
|
||||
struct CusD3DModeInfo
|
||||
{
|
||||
DWORD Width; // Screen width in this mode
|
||||
DWORD Height; // Screen height in this mode
|
||||
DWORD m_dwNumFormat;
|
||||
D3DModeInfo Format[10];
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
struct CusD3DDeviceInfo
|
||||
{
|
||||
// Device data
|
||||
D3DDEVTYPE DeviceType; // Reference, HAL, etc.
|
||||
D3DCAPS8 d3dCaps; // Capabilities of this device
|
||||
const TCHAR* strDesc; // Name of this device
|
||||
BOOL bCanDoWindowed; // Whether this device can work in windowed mode
|
||||
|
||||
// Modes for this device
|
||||
DWORD dwNumModes;
|
||||
CusD3DModeInfo modes[150];
|
||||
|
||||
// Current state
|
||||
DWORD dwCurrentMode;
|
||||
BOOL bWindowed;
|
||||
D3DMULTISAMPLE_TYPE MultiSampleType;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: struct D3DAdapterInfo
|
||||
// Desc: Structure for holding information about an adapter, including a list
|
||||
// of devices available on this adapter
|
||||
//-----------------------------------------------------------------------------
|
||||
struct D3DAdapterInfo
|
||||
{
|
||||
// Adapter data
|
||||
D3DADAPTER_IDENTIFIER8 d3dAdapterIdentifier;
|
||||
D3DDISPLAYMODE d3ddmDesktop; // Desktop display mode for this adapter
|
||||
|
||||
// Devices for this adapter
|
||||
DWORD dwNumDevices;
|
||||
D3DDeviceInfo devices[5];
|
||||
|
||||
// Current state
|
||||
DWORD dwCurrentDevice;
|
||||
};
|
||||
|
||||
/* Display Modes */
|
||||
typedef struct _CusD3DDISPLAYMODE
|
||||
{
|
||||
UINT Width;
|
||||
UINT Height;
|
||||
UINT RefreshRate[50];
|
||||
D3DFORMAT Format;
|
||||
} CusD3DDISPLAYMODE;
|
||||
|
||||
typedef struct _sDiskInfo
|
||||
{
|
||||
char Letter[8];
|
||||
ULARGE_INTEGER m_lFreeBytesAvailableToCaller;
|
||||
ULARGE_INTEGER m_lTotalBytes;
|
||||
ULARGE_INTEGER m_lTotalFreeBytes;
|
||||
} sDiskInfo;
|
||||
|
||||
class CSystemInfo
|
||||
{
|
||||
protected:
|
||||
unsigned long m_dwMinDepthBits; // <20>ּ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE>
|
||||
unsigned long m_dwMinStencilBits; // <20>ּ<EFBFBD> <20><><EFBFBD>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ <20><>
|
||||
|
||||
HRESULT ConfirmDevice(D3DCAPS8*,DWORD,D3DFORMAT);
|
||||
BOOL FindDepthStencilFormat(UINT iAdapter, D3DDEVTYPE DeviceType, D3DFORMAT TargetFormat, D3DFORMAT *pDepthStencilFormat);
|
||||
|
||||
OSVERSIONINFOEX m_osvi;
|
||||
BOOL m_bOsVersionInfoEx;
|
||||
MEMORYSTATUS m_stat;
|
||||
char m_strCPUInfo[8][MAX_PATH];
|
||||
unsigned long m_dwCPUSpeed;
|
||||
sDiskInfo m_sDiskInfo[20];
|
||||
|
||||
char m_strWindowName[MAX_PATH];
|
||||
char m_strServiceVersion[MAX_PATH];
|
||||
|
||||
char m_strSoundCard[MAX_PATH];
|
||||
char m_strSoundCardVersion[MAX_PATH];
|
||||
|
||||
LPDIRECT3D8 m_lpD3D;
|
||||
|
||||
DDCAPS m_ddHALCaps, m_ddHELCaps;
|
||||
|
||||
public:
|
||||
unsigned long m_dwNumAdapters;
|
||||
D3DAdapterInfo m_Adapters[10];
|
||||
|
||||
CusD3DDeviceInfo m_d3dAvailableDevices[5];
|
||||
|
||||
unsigned long m_dwCurrentVideoCard;
|
||||
unsigned long m_dwCurrentDevice;
|
||||
unsigned long m_dwCurrentResolution;
|
||||
unsigned long m_dwCurrentColor;
|
||||
unsigned long m_dwCurrentRefresh;
|
||||
|
||||
CSystemInfo(void);
|
||||
~CSystemInfo(void);
|
||||
|
||||
void SetDepthBits(unsigned long dwMinDepthBits) { m_dwMinDepthBits = dwMinDepthBits; }
|
||||
void SetStencilBits(unsigned long dwMinStencilBits) { m_dwMinStencilBits = dwMinStencilBits; }
|
||||
|
||||
BOOL GetWindowInfo(void);
|
||||
BOOL GetMemoryInfo(void);
|
||||
BOOL GetCPUInfo(void);
|
||||
BOOL GetDiskInfo(void);
|
||||
BOOL GetSoundCardInfo(void);
|
||||
BOOL GetVideoCardInfo(void);
|
||||
|
||||
void ReadCPUCounter(UINT64 *pCounter);
|
||||
|
||||
HRESULT EnumulationD3D(void);
|
||||
void SetSetting(unsigned long dwWidth, unsigned long dwHeight, D3DFORMAT d3dFormat, unsigned long dwRefresh);
|
||||
|
||||
BOOL GetAvailableDevice(unsigned long dwMinWidth, unsigned long dwMinHeight);
|
||||
D3DFORMAT GetFormat(unsigned long dwDepth);
|
||||
|
||||
char *GetWindowName(void) { return m_strWindowName; }
|
||||
double GetTotalPhysMem(void) { return (double)(m_stat.dwTotalPhys / 1024 / 1024.0); }
|
||||
unsigned long GetAvailPhysMem(void) { return (unsigned long)(m_stat.dwAvailPhys / 1024 / 1024); }
|
||||
unsigned long GetAvailPages(void) { return (unsigned long)(m_stat.dwAvailPageFile / 1024 / 1024); }
|
||||
char *GetCPUInfo(unsigned long dwNum) { return m_strCPUInfo[dwNum]; }
|
||||
double GetHDDFreeSpace(void) { return ((double)(m_sDiskInfo->m_lTotalFreeBytes.QuadPart) / 1024 / 1024 / 1024); }
|
||||
char *GetSoundCardName(void) { return m_strSoundCard; }
|
||||
unsigned long GetNumAdapters(void) { return m_dwNumAdapters; }
|
||||
char *GetGraphicCardName(unsigned long dwNum) { return m_Adapters[dwNum].d3dAdapterIdentifier.Description; }
|
||||
void GetResolutionByString(char *strFormat, char *strString);
|
||||
void GetColorByString(char *strFormat, char *strString);
|
||||
void GetRefreshByString(char *strFormat, char *strString);
|
||||
unsigned long GetCurrentWidth(void) { return m_d3dAvailableDevices[m_dwCurrentDevice].modes[m_dwCurrentResolution].Width; }
|
||||
unsigned long GetCurrentHeight(void) { return m_d3dAvailableDevices[m_dwCurrentDevice].modes[m_dwCurrentResolution].Height; }
|
||||
unsigned long GetCurrentColor(void) { return m_d3dAvailableDevices[m_dwCurrentDevice].modes[m_dwCurrentResolution].Format[m_dwCurrentColor].Format; }
|
||||
unsigned long GetCurrentRefresh(void) { return m_d3dAvailableDevices[m_dwCurrentDevice].modes[m_dwCurrentResolution].Format[m_dwCurrentColor].dwRefresh[m_dwCurrentRefresh]; }
|
||||
|
||||
BOOL IsAblePages(unsigned long dwNeedPage) { return (((m_stat.dwAvailPageFile / 1024 / 1024) > dwNeedPage)? TRUE : FALSE); }
|
||||
BOOL IsTotalPhysMem(unsigned long dwNeedRam) { return ((ceil((double)(m_stat.dwTotalPhys / 1024 / 1024.0)) >= dwNeedRam)? TRUE : FALSE); }
|
||||
|
||||
unsigned long GetAvailableShader(unsigned long dwPSVersion, unsigned long dwVSVersion);
|
||||
BOOL GetAvailableHiResTexture(unsigned long dwMinWidth, unsigned long dwMinHeight);
|
||||
BOOL GetAvailableCompressTexture(D3DFORMAT d3dFormat);
|
||||
unsigned long GetAbleWindowVersion(void);
|
||||
|
||||
unsigned long GetPerformance(void);
|
||||
|
||||
BOOL IsMinimum(void);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
272
Tools/ClientSetup/bit_flags.h
Normal file
272
Tools/ClientSetup/bit_flags.h
Normal file
@@ -0,0 +1,272 @@
|
||||
#ifndef BITFLAGS_H
|
||||
#define BITFLAGS_H
|
||||
#pragma once
|
||||
/***************************************************************\
|
||||
|
||||
^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^^^^^^^ ^^ ^^^^^^^^
|
||||
^^ ^^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^ ^^
|
||||
|
||||
sample code from the book...
|
||||
Real Time 3D Terrain Engines Using C++ and DirectX
|
||||
|
||||
by Greg Snook
|
||||
greg@mightystudios.com
|
||||
|
||||
\***************************************************************/
|
||||
#include "data_types.h"
|
||||
|
||||
// disable the MSVC warning regarding
|
||||
// forcing values to true or false
|
||||
#pragma warning( disable : 4800 )
|
||||
|
||||
// Name Space declaration
|
||||
namespace gaia
|
||||
{
|
||||
|
||||
/* Bit Flag Macros
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Macros for simple bit and flag collection testing.
|
||||
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
#define FLAG(x) (1<<(x))
|
||||
#define TEST_BIT(flag, bit) (((flag.value) & FLAG((bit))) !=0)
|
||||
#define TEST_ALL(flag, set) (((flag.value) & (set)) == (set))
|
||||
#define TEST_ANY(flag, set) (((flag.value) & (set)) !=0)
|
||||
#define SET_BIT(flag, bit) ((flag.value) |= FLAG((bit)))
|
||||
#define CLEAR_BIT(flag, bit) ((flag.value) &= ~FLAG((bit)))
|
||||
#define SET_ALL(flag, set) ((flag.value) |= (set))
|
||||
#define CLEAR_ALL(flag, set) ((flag.value) &= ~(set))
|
||||
|
||||
/* cBitFlags
|
||||
-----------------------------------------------------------------
|
||||
|
||||
For more robust use, the cBitFlags template provides a
|
||||
generic flag testing interface for flags held in an
|
||||
arbitrary data type (T)
|
||||
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
template <class T>
|
||||
class cBitFlags
|
||||
{
|
||||
public:
|
||||
|
||||
T value;
|
||||
|
||||
// Creators...
|
||||
cBitFlags();
|
||||
cBitFlags(T data);
|
||||
cBitFlags(const cBitFlags& Src);
|
||||
~cBitFlags();
|
||||
|
||||
// Operators...
|
||||
cBitFlags& operator=( const cBitFlags& Src);
|
||||
cBitFlags& operator=( T Src);
|
||||
operator T()const {return(value);};
|
||||
bool operator==(const cBitFlags& Src)const;
|
||||
bool operator!=(const cBitFlags& Src)const;
|
||||
|
||||
// Mutators...
|
||||
void set(T settings);
|
||||
void clear();
|
||||
void setFlags(T settings);
|
||||
void clearFlags(T settings);
|
||||
void setBit(int bit);
|
||||
void clearBit(int bit);
|
||||
void setBit(int bit, bool setting);
|
||||
|
||||
// Accessors...
|
||||
bool isEmpty()const;
|
||||
bool testBit(int bit)const;
|
||||
bool testFlags(T test)const;
|
||||
bool testAny(T test)const;
|
||||
|
||||
int totalBits()const;
|
||||
int totalSet()const;
|
||||
};
|
||||
|
||||
// common flag typedefs
|
||||
typedef cBitFlags<uint8> u8Flags; // 8 bits of flags
|
||||
typedef cBitFlags<uint16> u16Flags; // 16 bits of flags
|
||||
typedef cBitFlags<uint32> u32Flags; // 32 bits of flags
|
||||
|
||||
//- Inline Functions --------------------------------------------
|
||||
|
||||
/* cBitFlags
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
Default Object Constructor
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
template <class T>
|
||||
inline cBitFlags<T>::cBitFlags()
|
||||
:value(0)
|
||||
{
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline cBitFlags<T>::cBitFlags(T settings)
|
||||
:value(settings)
|
||||
{
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline cBitFlags<T>::cBitFlags( const cBitFlags& Src)
|
||||
:value(Src.value)
|
||||
{
|
||||
}
|
||||
|
||||
/* ~cBitFlags
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
Default Object Destructor
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
template <class T>
|
||||
inline cBitFlags<T>::~cBitFlags()
|
||||
{
|
||||
}
|
||||
|
||||
//. Operators ............................................................................
|
||||
template <class T>
|
||||
inline cBitFlags<T>& cBitFlags<T>::operator=( const cBitFlags<T>& Src)
|
||||
{
|
||||
value = Src.value;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline cBitFlags<T>& cBitFlags<T>::operator=( T Src)
|
||||
{
|
||||
value = Src;
|
||||
return(*this);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool cBitFlags<T>::operator==( const cBitFlags& Src)const
|
||||
{
|
||||
return(value == Src.value);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool cBitFlags<T>::operator!=( const cBitFlags& Src)const
|
||||
{
|
||||
return(value != Src.value);
|
||||
}
|
||||
|
||||
//. Mutators .............................................................................
|
||||
template <class T>
|
||||
inline void cBitFlags<T>::set(T settings)
|
||||
{
|
||||
value = settings;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void cBitFlags<T>::clear()
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void cBitFlags<T>::setFlags(T settings)
|
||||
{
|
||||
value |= settings;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void cBitFlags<T>::clearFlags(T settings)
|
||||
{
|
||||
value &= ~settings;
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
inline void cBitFlags<T>::setBit(int bit)
|
||||
{
|
||||
value |= (1<<bit);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void cBitFlags<T>::setBit(int bit, bool setting)
|
||||
{
|
||||
if (setting)
|
||||
{
|
||||
value |= (1<<bit);
|
||||
}
|
||||
else
|
||||
{
|
||||
clearBit(bit);
|
||||
}
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline void cBitFlags<T>::clearBit(int bit)
|
||||
{
|
||||
value &= (~(1<<bit));
|
||||
}
|
||||
|
||||
//. Accessors ............................................................................
|
||||
template <class T>
|
||||
inline bool cBitFlags<T>::isEmpty()const
|
||||
{
|
||||
return(value == static_cast<T>(0));
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline bool cBitFlags<T>::testBit(int bit)const
|
||||
{
|
||||
return(value & (1<<bit));
|
||||
}
|
||||
|
||||
|
||||
template <class T>
|
||||
inline bool cBitFlags<T>::testFlags(T test)const
|
||||
{
|
||||
return((value & test) == test);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline bool cBitFlags<T>::testAny(T test)const
|
||||
{
|
||||
return(value & test);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline int cBitFlags<T>::totalBits()const
|
||||
{
|
||||
return(sizeof(T)<<3);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline int cBitFlags<T>::totalSet()const
|
||||
{
|
||||
int count=0;
|
||||
int total = totalBits();
|
||||
T TestValue = value;
|
||||
|
||||
for (int i=total;i;--i)
|
||||
{
|
||||
count += (TestValue & 1);
|
||||
TestValue >>= 1;
|
||||
}
|
||||
return(count);
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
|
||||
} //End NameSpace: gaia
|
||||
|
||||
#pragma warning( default : 4800 )
|
||||
|
||||
#endif // end of file ( cBitFlags.h )
|
||||
|
||||
//----------------------------------------------------------
|
||||
//$Log: $
|
||||
84
Tools/ClientSetup/data_types.h
Normal file
84
Tools/ClientSetup/data_types.h
Normal file
@@ -0,0 +1,84 @@
|
||||
#ifndef DATATYPES_H
|
||||
#define DATATYPES_H
|
||||
#pragma once
|
||||
/***************************************************************\
|
||||
|
||||
^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^^^^^^^ ^^ ^^^^^^^^
|
||||
^^ ^^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^ ^^
|
||||
|
||||
sample code from the book...
|
||||
Real Time 3D Terrain Engines Using C++ and DirectX
|
||||
|
||||
by Greg Snook
|
||||
greg@mightystudios.com
|
||||
|
||||
\***************************************************************/
|
||||
|
||||
|
||||
// Name Space declaration
|
||||
namespace gaia
|
||||
{
|
||||
#pragma warning(disable : 4786)
|
||||
|
||||
/* DataTypes
|
||||
-----------------------------------------------------------------
|
||||
|
||||
The basic data types and ranges used by Gaia
|
||||
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
|
||||
typedef signed long int32;
|
||||
typedef signed short int16;
|
||||
typedef signed char int8;
|
||||
typedef unsigned long uint32;
|
||||
typedef unsigned short uint16;
|
||||
typedef unsigned char uint8;
|
||||
|
||||
typedef __int64 int64;
|
||||
typedef unsigned __int64 uint64;
|
||||
|
||||
extern const int32 MIN_INT32;
|
||||
extern const int32 MAX_INT32;
|
||||
extern const int16 MIN_INT16;
|
||||
extern const int16 MAX_INT16;
|
||||
extern const int8 MIN_INT8;
|
||||
extern const int8 MAX_INT8;
|
||||
extern const uint32 MIN_UINT32;
|
||||
extern const uint32 MAX_UINT32;
|
||||
extern const uint16 MIN_UINT16;
|
||||
extern const uint16 MAX_UINT16;
|
||||
extern const uint8 MIN_UINT8;
|
||||
extern const uint8 MAX_UINT8;
|
||||
|
||||
extern const float MIN_REAL32;
|
||||
extern const float MAX_REAL32;
|
||||
extern const float TINY_REAL32;
|
||||
|
||||
// unicode vs. mbcs character types
|
||||
#ifdef _UNICODE
|
||||
// define tchar as a wide-character
|
||||
typedef wchar_t tchar;
|
||||
// create a macro to build string literals
|
||||
#define _text(a) L ## a
|
||||
#else
|
||||
// define tchar as a plain char
|
||||
typedef char tchar;
|
||||
// stub the macro to build string literals
|
||||
#define _text
|
||||
#endif
|
||||
|
||||
|
||||
} //End NameSpace: gaia
|
||||
|
||||
#endif // end of file ( DataTypes.h )
|
||||
|
||||
//----------------------------------------------------------
|
||||
//$Log: $
|
||||
|
||||
|
||||
|
||||
258
Tools/ClientSetup/debug.h
Normal file
258
Tools/ClientSetup/debug.h
Normal file
@@ -0,0 +1,258 @@
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
#pragma once
|
||||
/***************************************************************\
|
||||
|
||||
^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^^^^^^^ ^^ ^^^^^^^^
|
||||
^^ ^^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^ ^^
|
||||
|
||||
sample code from the book...
|
||||
Real Time 3D Terrain Engines Using C++ and DirectX
|
||||
|
||||
by Greg Snook
|
||||
greg@mightystudios.com
|
||||
|
||||
\***************************************************************/
|
||||
#ifndef DATATYPES_H
|
||||
#include "data_types.h"
|
||||
#endif
|
||||
|
||||
#ifndef BITFLAGS_H
|
||||
#include "bit_flags.h"
|
||||
#endif
|
||||
|
||||
#ifndef STRING_H
|
||||
#include "string.h"
|
||||
#endif
|
||||
|
||||
// Name Space declaration
|
||||
namespace gaia
|
||||
{
|
||||
|
||||
//
|
||||
// Undefine the common macros we wish to take over
|
||||
//
|
||||
#ifdef ASSERT
|
||||
#undef ASSERT
|
||||
#endif
|
||||
|
||||
#ifdef assert
|
||||
#undef assert
|
||||
#endif
|
||||
|
||||
#ifdef VERIFY
|
||||
#undef VERIFY
|
||||
#endif
|
||||
|
||||
#ifdef verify
|
||||
#undef verify
|
||||
#endif
|
||||
|
||||
#ifdef TRACE
|
||||
#undef TRACE
|
||||
#endif
|
||||
|
||||
// access to the cDebugMessageHandler singleton
|
||||
#define Debug g_Debug
|
||||
|
||||
/* Debug Output Macros
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
*/
|
||||
#ifdef _DEBUG_OUTPUT
|
||||
//
|
||||
// DEBUG OUTPUT ENABLED
|
||||
//
|
||||
#define debug_print Debug.output
|
||||
|
||||
#define debug_assert(x, comment) {\
|
||||
static bool _ignoreAssert = false;\
|
||||
if (!_ignoreAssert && !(x)) \
|
||||
{\
|
||||
ERROR_RESULT _err_result = notifyAssertion(_text(#x), _text(comment), __FILE__, __LINE__);\
|
||||
if (_err_result == VR_IGNORE)\
|
||||
{\
|
||||
_ignoreAssert = true;\
|
||||
}\
|
||||
else if (_err_result == VR_BREAKPOINT)\
|
||||
{\
|
||||
_asm{int 3};\
|
||||
}\
|
||||
}}
|
||||
|
||||
#define debug_error(x) {\
|
||||
static bool _ignoreError = false;\
|
||||
if (!_ignoreError) \
|
||||
{\
|
||||
ERROR_RESULT _err_result = notifyError((x), \
|
||||
__FILE__, __LINE__);\
|
||||
if (_err_result == VR_IGNORE)\
|
||||
{\
|
||||
_ignoreError = true;\
|
||||
}\
|
||||
else if (_err_result == VR_BREAKPOINT)\
|
||||
{\
|
||||
_asm{int 3};\
|
||||
}\
|
||||
}}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
// depending on the compiler version,
|
||||
// we either set unused function definitions
|
||||
// to (0) or __noop
|
||||
#ifndef NOP_FUNCTION
|
||||
#if (_MSC_VER >= 1210)
|
||||
#define NOP_FUNCTION __noop
|
||||
#else
|
||||
#define NOP_FUNCTION (void)(0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// DEBUG OUTPUT DISABLED
|
||||
//
|
||||
#define debug_print (void)NOP_FUNCTION
|
||||
#define debug_assert(x, comment)
|
||||
#define debug_error(x)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define compiler_assert(x) {\
|
||||
const int _value = (x) ? 1:0;\
|
||||
switch (x)\
|
||||
{\
|
||||
case 0: \
|
||||
case _value: \
|
||||
default: break;\
|
||||
};}
|
||||
|
||||
|
||||
//
|
||||
// Map our macros to the commonly used names
|
||||
//
|
||||
#define ASSERT(x) debug_assert(x,"")
|
||||
#define assert(x) debug_assert(x,"")
|
||||
#define error(x) debug_error(x)
|
||||
#define TRACE debug_print
|
||||
|
||||
// Assert function return values
|
||||
enum ERROR_RESULT
|
||||
{
|
||||
VR_IGNORE = 0,
|
||||
VR_CONTINUE,
|
||||
VR_BREAKPOINT,
|
||||
VR_ABORT
|
||||
};
|
||||
|
||||
extern ERROR_RESULT notifyError(uint32 errorCode, const tchar* fileName, int lineNumber);
|
||||
extern ERROR_RESULT notifyAssertion(const tchar* condition, const tchar* description, const tchar* fileName, int lineNumber);
|
||||
|
||||
// Private Functions...
|
||||
extern ERROR_RESULT displayError( const tchar* errorTitle,
|
||||
const tchar* errorText,
|
||||
const tchar* errorDescription,
|
||||
const tchar* fileName,
|
||||
int lineNumber);
|
||||
|
||||
|
||||
/* cDebugMessageHandler
|
||||
-----------------------------------------------------------------
|
||||
|
||||
cDebugMessageHandler is a singleton interface to handle the output of
|
||||
text messages for debugging purposes. A Total of 32 channels
|
||||
are available for output. Channel Zero is reserved for standard
|
||||
debug output. All other channels can be routed to files, etc.
|
||||
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
class cDebugMessageChannel;
|
||||
|
||||
class cDebugMessageHandler
|
||||
{
|
||||
public:
|
||||
|
||||
// Data Types & Constants...
|
||||
enum
|
||||
{
|
||||
nMaxOutputStringSize = 2048
|
||||
};
|
||||
|
||||
enum DEBUG_CHANNELS
|
||||
{
|
||||
nSystemChannelBit = 0,
|
||||
nMaxChannels = 32,
|
||||
};
|
||||
|
||||
enum MESSAGE_FLAGS
|
||||
{
|
||||
k_defaultMessageFlag = FLAG(0),
|
||||
};
|
||||
|
||||
|
||||
// Public Data...
|
||||
|
||||
// Creators...
|
||||
|
||||
cDebugMessageHandler();
|
||||
~cDebugMessageHandler();
|
||||
|
||||
// Mutators...
|
||||
bool setChannel(int index, cDebugMessageChannel* pChannel);
|
||||
void clearChannel(int index);
|
||||
bool openChannel(int index);
|
||||
void closeChannel(int index);
|
||||
void setChannelMessageFilter(int index, u32Flags flags);
|
||||
void addChannelMessageFilter(int index, u32Flags flags);
|
||||
void removeChannelMessageFilter(int index, u32Flags flags);
|
||||
|
||||
void output(const tchar* text, ...);
|
||||
void output(uint32 messageFlags, const tchar* text, ...);
|
||||
|
||||
// Accessors...
|
||||
bool isChannelSet(int index)const;
|
||||
bool isChannelOpen(int index)const;
|
||||
u32Flags channelFilter(int index)const;
|
||||
|
||||
private:
|
||||
|
||||
// Private Data...
|
||||
cDebugMessageChannel* m_channel[nMaxChannels];
|
||||
u32Flags m_openChannels;
|
||||
};
|
||||
extern cDebugMessageHandler g_Debug;
|
||||
|
||||
//- Inline Functions --------------------------------------------
|
||||
|
||||
//. Accessors ...................................................
|
||||
inline bool cDebugMessageHandler::isChannelSet(int index)const
|
||||
{
|
||||
debug_assert(index >= 0 && index<nMaxChannels, "invalid channel index");
|
||||
return m_channel[index] != 0;
|
||||
}
|
||||
|
||||
inline bool cDebugMessageHandler::isChannelOpen(int index)const
|
||||
{
|
||||
debug_assert(index >= 0 && index<nMaxChannels, "invalid channel index");
|
||||
return TEST_BIT(m_openChannels,index);
|
||||
}
|
||||
|
||||
//- End of cDebugMessageHandler ------------------------------------------------
|
||||
|
||||
|
||||
//***************************************************************
|
||||
|
||||
} //End NameSpace: gaia
|
||||
|
||||
#endif // end of file ( cDebugMessageHandler.h )
|
||||
|
||||
//----------------------------------------------------------
|
||||
//$Log: $
|
||||
559
Tools/ClientSetup/getdxver.cpp
Normal file
559
Tools/ClientSetup/getdxver.cpp
Normal file
@@ -0,0 +1,559 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// File: GetDXVer.cpp
|
||||
//
|
||||
// Desc: Demonstrates how applications can detect what version of DirectX
|
||||
// is installed.
|
||||
//
|
||||
// (C) Copyright Microsoft Corp. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
#define INITGUID
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <tchar.h>
|
||||
#include <dxdiag.h>
|
||||
|
||||
|
||||
static HRESULT GetDirectXVersionViaDxDiag( DWORD* pdwDirectXVersionMajor, DWORD* pdwDirectXVersionMinor, TCHAR* pcDirectXVersionLetter );
|
||||
static HRESULT GetDirectXVerionViaFileVersions( DWORD* pdwDirectXVersionMajor, DWORD* pdwDirectXVersionMinor, TCHAR* pcDirectXVersionLetter );
|
||||
HRESULT GetFileVersion( TCHAR* szPath, ULARGE_INTEGER* pllFileVersion );
|
||||
static ULARGE_INTEGER MakeInt64( WORD a, WORD b, WORD c, WORD d );
|
||||
static int CompareLargeInts( ULARGE_INTEGER ullParam1, ULARGE_INTEGER ullParam2 );
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: GetDXVersion()
|
||||
// Desc: This function returns the DirectX version.
|
||||
// Arguments:
|
||||
// pdwDirectXVersion - This can be NULL. If non-NULL, the return value is:
|
||||
// 0x00000000 = No DirectX installed
|
||||
// 0x00010000 = DirectX 1.0 installed
|
||||
// 0x00020000 = DirectX 2.0 installed
|
||||
// 0x00030000 = DirectX 3.0 installed
|
||||
// 0x00030001 = DirectX 3.0a installed
|
||||
// 0x00050000 = DirectX 5.0 installed
|
||||
// 0x00060000 = DirectX 6.0 installed
|
||||
// 0x00060100 = DirectX 6.1 installed
|
||||
// 0x00060101 = DirectX 6.1a installed
|
||||
// 0x00070000 = DirectX 7.0 installed
|
||||
// 0x00070001 = DirectX 7.0a installed
|
||||
// 0x00080000 = DirectX 8.0 installed
|
||||
// 0x00080100 = DirectX 8.1 installed
|
||||
// 0x00080101 = DirectX 8.1a installed
|
||||
// 0x00080102 = DirectX 8.1b installed
|
||||
// 0x00080200 = DirectX 8.2 installed
|
||||
// 0x00090000 = DirectX 9.0 installed
|
||||
// strDirectXVersion - Destination string to receive a string name of the DirectX Version. Can be NULL.
|
||||
// cchDirectXVersion - Size of destination buffer in characters. Length should be at least 10 chars.
|
||||
// Returns: S_OK if the function succeeds.
|
||||
// E_FAIL if the DirectX version info couldn't be determined.
|
||||
//
|
||||
// Please note that this code is intended as a general guideline. Your
|
||||
// app will probably be able to simply query for functionality (via
|
||||
// QueryInterface) for one or two components.
|
||||
//
|
||||
// Also please ensure your app will run on future releases of DirectX.
|
||||
// For example:
|
||||
// "if( dwDirectXVersion != 0x00080100 ) return false;" is VERY BAD.
|
||||
// "if( dwDirectXVersion < 0x00080100 ) return false;" is MUCH BETTER.
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT GetDXVersion( DWORD* pdwDirectXVersion, TCHAR* strDirectXVersion, int cchDirectXVersion )
|
||||
{
|
||||
bool bGotDirectXVersion = false;
|
||||
|
||||
// Init values to unknown
|
||||
if( pdwDirectXVersion )
|
||||
*pdwDirectXVersion = 0;
|
||||
if( strDirectXVersion && cchDirectXVersion > 0 )
|
||||
strDirectXVersion[0] = 0;
|
||||
|
||||
DWORD dwDirectXVersionMajor = 0;
|
||||
DWORD dwDirectXVersionMinor = 0;
|
||||
TCHAR cDirectXVersionLetter = ' ';
|
||||
|
||||
// First, try to use dxdiag's COM interface to get the DirectX version.
|
||||
// The only downside is this will only work on DX9 or later.
|
||||
if( SUCCEEDED( GetDirectXVersionViaDxDiag( &dwDirectXVersionMajor, &dwDirectXVersionMinor, &cDirectXVersionLetter ) ) )
|
||||
bGotDirectXVersion = true;
|
||||
|
||||
if( !bGotDirectXVersion )
|
||||
{
|
||||
// Getting the DirectX version info from DxDiag failed,
|
||||
// so most likely we are on DX8.x or earlier
|
||||
if( SUCCEEDED( GetDirectXVerionViaFileVersions( &dwDirectXVersionMajor, &dwDirectXVersionMinor, &cDirectXVersionLetter ) ) )
|
||||
bGotDirectXVersion = true;
|
||||
}
|
||||
|
||||
// If both techniques failed, then return E_FAIL
|
||||
if( !bGotDirectXVersion )
|
||||
return E_FAIL;
|
||||
|
||||
// Set the output values to what we got and return
|
||||
cDirectXVersionLetter = (char)tolower(cDirectXVersionLetter);
|
||||
|
||||
if( pdwDirectXVersion )
|
||||
{
|
||||
// If pdwDirectXVersion is non-NULL, then set it to something
|
||||
// like 0x00080102 which would represent DX8.1b
|
||||
DWORD dwDirectXVersion = dwDirectXVersionMajor;
|
||||
dwDirectXVersion <<= 8;
|
||||
dwDirectXVersion += dwDirectXVersionMinor;
|
||||
dwDirectXVersion <<= 8;
|
||||
if( cDirectXVersionLetter >= 'a' && cDirectXVersionLetter <= 'z' )
|
||||
dwDirectXVersion += (cDirectXVersionLetter - 'a') + 1;
|
||||
|
||||
*pdwDirectXVersion = dwDirectXVersion;
|
||||
}
|
||||
|
||||
if( strDirectXVersion && cchDirectXVersion > 0 )
|
||||
{
|
||||
// If strDirectXVersion is non-NULL, then set it to something
|
||||
// like "8.1b" which would represent DX8.1b
|
||||
if( cDirectXVersionLetter == ' ' )
|
||||
_sntprintf( strDirectXVersion, cchDirectXVersion, TEXT("%d.%d"), dwDirectXVersionMajor, dwDirectXVersionMinor );
|
||||
else
|
||||
_sntprintf( strDirectXVersion, cchDirectXVersion, TEXT("%d.%d%c"), dwDirectXVersionMajor, dwDirectXVersionMinor, cDirectXVersionLetter );
|
||||
strDirectXVersion[cchDirectXVersion-1] = 0;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: GetDirectXVersionViaDxDiag()
|
||||
// Desc: Tries to get the DirectX version from DxDiag's COM interface
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT GetDirectXVersionViaDxDiag( DWORD* pdwDirectXVersionMajor,
|
||||
DWORD* pdwDirectXVersionMinor,
|
||||
TCHAR* pcDirectXVersionLetter )
|
||||
{
|
||||
HRESULT hr;
|
||||
bool bCleanupCOM = false;
|
||||
|
||||
bool bSuccessGettingMajor = false;
|
||||
bool bSuccessGettingMinor = false;
|
||||
bool bSuccessGettingLetter = false;
|
||||
|
||||
// Init COM. COM may fail if its already been inited with a different
|
||||
// concurrency model. And if it fails you shouldn't release it.
|
||||
hr = CoInitialize(NULL);
|
||||
bCleanupCOM = SUCCEEDED(hr);
|
||||
|
||||
// Get an IDxDiagProvider
|
||||
bool bGotDirectXVersion = false;
|
||||
IDxDiagProvider* pDxDiagProvider = NULL;
|
||||
hr = CoCreateInstance( CLSID_DxDiagProvider,
|
||||
NULL,
|
||||
CLSCTX_INPROC_SERVER,
|
||||
IID_IDxDiagProvider,
|
||||
(LPVOID*) &pDxDiagProvider );
|
||||
if( SUCCEEDED(hr) )
|
||||
{
|
||||
// Fill out a DXDIAG_INIT_PARAMS struct
|
||||
DXDIAG_INIT_PARAMS dxDiagInitParam;
|
||||
ZeroMemory( &dxDiagInitParam, sizeof(DXDIAG_INIT_PARAMS) );
|
||||
dxDiagInitParam.dwSize = sizeof(DXDIAG_INIT_PARAMS);
|
||||
dxDiagInitParam.dwDxDiagHeaderVersion = DXDIAG_DX9_SDK_VERSION;
|
||||
dxDiagInitParam.bAllowWHQLChecks = false;
|
||||
dxDiagInitParam.pReserved = NULL;
|
||||
|
||||
// Init the m_pDxDiagProvider
|
||||
hr = pDxDiagProvider->Initialize( &dxDiagInitParam );
|
||||
if( SUCCEEDED(hr) )
|
||||
{
|
||||
IDxDiagContainer* pDxDiagRoot = NULL;
|
||||
IDxDiagContainer* pDxDiagSystemInfo = NULL;
|
||||
|
||||
// Get the DxDiag root container
|
||||
hr = pDxDiagProvider->GetRootContainer( &pDxDiagRoot );
|
||||
if( SUCCEEDED(hr) )
|
||||
{
|
||||
// Get the object called DxDiag_SystemInfo
|
||||
hr = pDxDiagRoot->GetChildContainer( L"DxDiag_SystemInfo", &pDxDiagSystemInfo );
|
||||
if( SUCCEEDED(hr) )
|
||||
{
|
||||
VARIANT var;
|
||||
VariantInit( &var );
|
||||
|
||||
// Get the "dwDirectXVersionMajor" property
|
||||
hr = pDxDiagSystemInfo->GetProp( L"dwDirectXVersionMajor", &var );
|
||||
if( SUCCEEDED(hr) && var.vt == VT_UI4 )
|
||||
{
|
||||
if( pdwDirectXVersionMajor )
|
||||
*pdwDirectXVersionMajor = var.ulVal;
|
||||
bSuccessGettingMajor = true;
|
||||
}
|
||||
VariantClear( &var );
|
||||
|
||||
// Get the "dwDirectXVersionMinor" property
|
||||
hr = pDxDiagSystemInfo->GetProp( L"dwDirectXVersionMinor", &var );
|
||||
if( SUCCEEDED(hr) && var.vt == VT_UI4 )
|
||||
{
|
||||
if( pdwDirectXVersionMinor )
|
||||
*pdwDirectXVersionMinor = var.ulVal;
|
||||
bSuccessGettingMinor = true;
|
||||
}
|
||||
VariantClear( &var );
|
||||
|
||||
// Get the "szDirectXVersionLetter" property
|
||||
hr = pDxDiagSystemInfo->GetProp( L"szDirectXVersionLetter", &var );
|
||||
if( SUCCEEDED(hr) && var.vt == VT_BSTR && var.bstrVal != NULL )
|
||||
{
|
||||
#ifdef UNICODE
|
||||
*pcDirectXVersionLetter = var.bstrVal[0];
|
||||
#else
|
||||
char strDestination[10];
|
||||
WideCharToMultiByte( CP_ACP, 0, var.bstrVal, -1, strDestination, 10*sizeof(CHAR), NULL, NULL );
|
||||
if( pcDirectXVersionLetter )
|
||||
*pcDirectXVersionLetter = strDestination[0];
|
||||
#endif
|
||||
bSuccessGettingLetter = true;
|
||||
}
|
||||
VariantClear( &var );
|
||||
|
||||
// If it all worked right, then mark it down
|
||||
if( bSuccessGettingMajor && bSuccessGettingMinor && bSuccessGettingLetter )
|
||||
bGotDirectXVersion = true;
|
||||
|
||||
pDxDiagSystemInfo->Release();
|
||||
}
|
||||
|
||||
pDxDiagRoot->Release();
|
||||
}
|
||||
}
|
||||
|
||||
pDxDiagProvider->Release();
|
||||
}
|
||||
|
||||
if( bCleanupCOM )
|
||||
CoUninitialize();
|
||||
|
||||
if( bGotDirectXVersion )
|
||||
return S_OK;
|
||||
else
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: GetDirectXVerionViaFileVersions()
|
||||
// Desc: Tries to get the DirectX version by looking at DirectX file versions
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT GetDirectXVerionViaFileVersions( DWORD* pdwDirectXVersionMajor,
|
||||
DWORD* pdwDirectXVersionMinor,
|
||||
TCHAR* pcDirectXVersionLetter )
|
||||
{
|
||||
ULARGE_INTEGER llFileVersion;
|
||||
TCHAR szPath[512];
|
||||
TCHAR szFile[512];
|
||||
BOOL bFound = false;
|
||||
|
||||
if( GetSystemDirectory( szPath, MAX_PATH ) != 0 )
|
||||
{
|
||||
szPath[MAX_PATH-1]=0;
|
||||
|
||||
// Switch off the ddraw version
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\ddraw.dll") );
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 2, 0, 95 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// flle is >= DX1.0 version, so we must be at least DX1.0
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 1;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 3, 0, 1096 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// flle is is >= DX2.0 version, so we must DX2.0 or DX2.0a (no redist change)
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 2;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 4, 0, 68 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// flle is is >= DX3.0 version, so we must be at least DX3.0
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 3;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Switch off the d3drg8x.dll version
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\d3drg8x.dll") );
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 4, 0, 70 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// d3drg8x.dll is the DX3.0a version, so we must be DX3.0a or DX3.0b (no redist change)
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 3;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT('a');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Switch off the ddraw version
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\ddraw.dll") );
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 5, 0, 155 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// ddraw.dll is the DX5.0 version, so we must be DX5.0 or DX5.2 (no redist change)
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 5;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 6, 0, 318 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// ddraw.dll is the DX6.0 version, so we must be at least DX6.0
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 6;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 6, 0, 436 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// ddraw.dll is the DX6.1 version, so we must be at least DX6.1
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 6;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 1;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Switch off the dplayx.dll version
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\dplayx.dll") );
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 6, 3, 518 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// ddraw.dll is the DX6.1 version, so we must be at least DX6.1a
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 6;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 1;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT('a');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Switch off the ddraw version
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\ddraw.dll") );
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 7, 0, 700 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// TODO: find win2k version
|
||||
|
||||
// ddraw.dll is the DX7.0 version, so we must be at least DX7.0
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 7;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Switch off the dinput version
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\dinput.dll") );
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 4, 7, 0, 716 ) ) >= 0 ) // Win9x version
|
||||
{
|
||||
// ddraw.dll is the DX7.0 version, so we must be at least DX7.0a
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 7;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT('a');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Switch off the ddraw version
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\ddraw.dll") );
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( (HIWORD(llFileVersion.HighPart) == 4 && CompareLargeInts( llFileVersion, MakeInt64( 4, 8, 0, 400 ) ) >= 0) || // Win9x version
|
||||
(HIWORD(llFileVersion.HighPart) == 5 && CompareLargeInts( llFileVersion, MakeInt64( 5, 1, 2258, 400 ) ) >= 0) ) // Win2k/WinXP version
|
||||
{
|
||||
// ddraw.dll is the DX8.0 version, so we must be at least DX8.0 or DX8.0a (no redist change)
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 8;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\d3d8.dll"));
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( (HIWORD(llFileVersion.HighPart) == 4 && CompareLargeInts( llFileVersion, MakeInt64( 4, 8, 1, 881 ) ) >= 0) || // Win9x version
|
||||
(HIWORD(llFileVersion.HighPart) == 5 && CompareLargeInts( llFileVersion, MakeInt64( 5, 1, 2600, 881 ) ) >= 0) ) // Win2k/WinXP version
|
||||
{
|
||||
// d3d8.dll is the DX8.1 version, so we must be at least DX8.1
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 8;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 1;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
|
||||
if( (HIWORD(llFileVersion.HighPart) == 4 && CompareLargeInts( llFileVersion, MakeInt64( 4, 8, 1, 901 ) ) >= 0) || // Win9x version
|
||||
(HIWORD(llFileVersion.HighPart) == 5 && CompareLargeInts( llFileVersion, MakeInt64( 5, 1, 2600, 901 ) ) >= 0) ) // Win2k/WinXP version
|
||||
{
|
||||
// d3d8.dll is the DX8.1a version, so we must be at least DX8.1a
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 8;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 1;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT('a');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\mpg2splt.ax"));
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( CompareLargeInts( llFileVersion, MakeInt64( 6, 3, 1, 885 ) ) >= 0 ) // Win9x/Win2k/WinXP version
|
||||
{
|
||||
// quartz.dll is the DX8.1b version, so we must be at least DX8.1b
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 8;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 1;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT('b');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\dpnet.dll"));
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
if( (HIWORD(llFileVersion.HighPart) == 4 && CompareLargeInts( llFileVersion, MakeInt64( 4, 9, 0, 134 ) ) >= 0) || // Win9x version
|
||||
(HIWORD(llFileVersion.HighPart) == 5 && CompareLargeInts( llFileVersion, MakeInt64( 5, 2, 3677, 134 ) ) >= 0) ) // Win2k/WinXP version
|
||||
{
|
||||
// dpnet.dll is the DX8.2 version, so we must be at least DX8.2
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 8;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 2;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
_tcscpy( szFile, szPath );
|
||||
_tcscat( szFile, TEXT("\\d3d9.dll"));
|
||||
if( SUCCEEDED( GetFileVersion( szFile, &llFileVersion ) ) )
|
||||
{
|
||||
// File exists, but be at least DX9
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 9;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
bFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
if( !bFound )
|
||||
{
|
||||
// No DirectX installed
|
||||
if( pdwDirectXVersionMajor ) *pdwDirectXVersionMajor = 0;
|
||||
if( pdwDirectXVersionMinor ) *pdwDirectXVersionMinor = 0;
|
||||
if( pcDirectXVersionLetter ) *pcDirectXVersionLetter = TEXT(' ');
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: GetFileVersion()
|
||||
// Desc: Returns ULARGE_INTEGER with a file version of a file, or a failure code.
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT GetFileVersion( TCHAR* szPath, ULARGE_INTEGER* pllFileVersion )
|
||||
{
|
||||
if( szPath == NULL || pllFileVersion == NULL )
|
||||
return E_INVALIDARG;
|
||||
|
||||
DWORD dwHandle;
|
||||
UINT cb;
|
||||
cb = GetFileVersionInfoSize( szPath, &dwHandle );
|
||||
if (cb > 0)
|
||||
{
|
||||
BYTE* pFileVersionBuffer = new BYTE[cb];
|
||||
if( pFileVersionBuffer == NULL )
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
if (GetFileVersionInfo( szPath, 0, cb, pFileVersionBuffer))
|
||||
{
|
||||
VS_FIXEDFILEINFO* pVersion = NULL;
|
||||
if (VerQueryValue(pFileVersionBuffer, TEXT("\\"), (VOID**)&pVersion, &cb) &&
|
||||
pVersion != NULL)
|
||||
{
|
||||
pllFileVersion->HighPart = pVersion->dwFileVersionMS;
|
||||
pllFileVersion->LowPart = pVersion->dwFileVersionLS;
|
||||
delete[] pFileVersionBuffer;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
delete[] pFileVersionBuffer;
|
||||
}
|
||||
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: MakeInt64()
|
||||
// Desc: Returns a ULARGE_INTEGER where a<<48|b<<32|c<<16|d<<0
|
||||
//-----------------------------------------------------------------------------
|
||||
ULARGE_INTEGER MakeInt64( WORD a, WORD b, WORD c, WORD d )
|
||||
{
|
||||
ULARGE_INTEGER ull;
|
||||
ull.HighPart = MAKELONG(b,a);
|
||||
ull.LowPart = MAKELONG(d,c);
|
||||
return ull;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: CompareLargeInts()
|
||||
// Desc: Returns 1 if ullParam1 > ullParam2
|
||||
// Returns 0 if ullParam1 = ullParam2
|
||||
// Returns -1 if ullParam1 < ullParam2
|
||||
//-----------------------------------------------------------------------------
|
||||
int CompareLargeInts( ULARGE_INTEGER ullParam1, ULARGE_INTEGER ullParam2 )
|
||||
{
|
||||
if( ullParam1.HighPart > ullParam2.HighPart )
|
||||
return 1;
|
||||
if( ullParam1.HighPart < ullParam2.HighPart )
|
||||
return -1;
|
||||
|
||||
if( ullParam1.LowPart > ullParam2.LowPart )
|
||||
return 1;
|
||||
if( ullParam1.LowPart < ullParam2.LowPart )
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
BIN
Tools/ClientSetup/icon1.ico
Normal file
BIN
Tools/ClientSetup/icon1.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
1019
Tools/ClientSetup/numeric_tools.h
Normal file
1019
Tools/ClientSetup/numeric_tools.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Tools/ClientSetup/res/ClientSetup.ico
Normal file
BIN
Tools/ClientSetup/res/ClientSetup.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
13
Tools/ClientSetup/res/ClientSetup.rc2
Normal file
13
Tools/ClientSetup/res/ClientSetup.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// CLIENTSETUP.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
172
Tools/ClientSetup/resource.h
Normal file
172
Tools/ClientSetup/resource.h
Normal file
@@ -0,0 +1,172 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ClientSetup.rc
|
||||
//
|
||||
|
||||
#define MANIFEST_RESOURCE_ID 1
|
||||
|
||||
|
||||
#define IDD_CLIENTSETUP_DIALOG 100
|
||||
#define IDR_MAINFRAME 101
|
||||
#define IDS_MINDEPTHBITS 102
|
||||
#define IDS_MINSTENCILBITS 103
|
||||
#define IDS_APP_TITLE 104
|
||||
#define IDS_OS_WIN98 105
|
||||
#define IDS_OS_WINME 106
|
||||
#define IDS_OS_WIN2000 107
|
||||
#define IDS_OS_WINXP 108
|
||||
#define IDS_OS_ERROR 109
|
||||
#define IDS_MEM_OK 110
|
||||
#define IDS_MEM_ERROR 111
|
||||
#define IDS_CPU_DESC 112
|
||||
#define IDS_HDD_OK 113
|
||||
#define IDS_HDD_ERROR 114
|
||||
#define IDS_DIRECTX_OK 115
|
||||
#define IDS_DIRECTX_ERROR 116
|
||||
#define IDS_SOUND_OK 117
|
||||
#define IDS_SOUND_ERROR 118
|
||||
#define IDS_GAMEPORT_DESC 119
|
||||
#define IDS_FREQ_DESC 120
|
||||
#define IDS_COLOR_DESC 121
|
||||
#define IDS_VIDEO_DESC 122
|
||||
#define IDS_RESOLUTION_DESC 123
|
||||
#define IDS_GRAPHICOPTION_DESC 124
|
||||
#define IDS_CHARSHADOW_DESC 125
|
||||
#define IDS_SCREENEFFECT_DESC 126
|
||||
#define IDS_SCREENEFFECT_ERROR 127
|
||||
#define IDS_HOUSESHADOW_DESC 128
|
||||
#define IDS_HOUSESHADOW_ERROR 129
|
||||
#define IDS_TEXTURE_DESC 130
|
||||
#define IDS_TEXTURE_ERROR 131
|
||||
#define IDS_VIEWRANGE_DESC 132
|
||||
#define IDS_GRASS_DESC 133
|
||||
#define IDS_WATEREFFECT_DESC 134
|
||||
#define IDS_WATEREFFECT_ERROR 135
|
||||
#define IDS_GLOWEFFECT_DESC 136
|
||||
#define IDS_WEATHEREFFECT_DESC 137
|
||||
#define IDS_SCREEN_DESC 138
|
||||
#define IDS_LANGUAGE_DESC 139
|
||||
#define IDS_ERR_UNKNOWNDX 200
|
||||
#define IDS_ERR_NOTDX 201
|
||||
#define IDS_ERR_NOTDX8 202
|
||||
#define IDS_ERR_NOHW 203
|
||||
#define IDS_ERR_HANDLE 204
|
||||
#define IDS_ERR_INITVALUE 205
|
||||
#define IDS_ERR_RENDEROPTION 206
|
||||
#define IDS_ERR_NOTINSTALL 207
|
||||
#define IDS_LOCAL_EXIST 300
|
||||
#define IDS_LOCAL_NOTEXIST 301
|
||||
#define IDS_LOCAL_NEAR 302
|
||||
#define IDS_LOCAL_FAR 303
|
||||
#define IDS_LOCAL_CUSTOMSETTING 304
|
||||
#define IDS_LOCAL_LOWSETTING 305
|
||||
#define IDS_LOCAL_MEDIUMSETTING 306
|
||||
#define IDS_LOCAL_HIGHSETTING 307
|
||||
#define IDS_LOCAL_LOW 308
|
||||
#define IDS_LOCAL_HIGH 309
|
||||
#define IDS_LOCAL_OS 310
|
||||
#define IDS_LOCAL_MEMORY 311
|
||||
#define IDS_LOCAL_CPU 312
|
||||
#define IDS_LOCAL_HDD 313
|
||||
#define IDS_LOCAL_DIRECTX 314
|
||||
#define IDS_LOCAL_SOUNDCARD 315
|
||||
#define IDS_LOCAL_VIDEOCARD 316
|
||||
#define IDS_LOCAL_RESOLUTION 317
|
||||
#define IDS_LOCAL_COLOR 318
|
||||
#define IDS_LOCAL_REFRESH 319
|
||||
#define IDS_LOCAL_QUALITY 320
|
||||
#define IDS_LOCAL_GAMEPORT 321
|
||||
#define IDS_LOCAL_CHARSHADOW 322
|
||||
#define IDS_LOCAL_HOUSESHADOW 323
|
||||
#define IDS_LOCAL_VIEWRANGE 324
|
||||
#define IDS_LOCAL_TEXQUALITY 325
|
||||
#define IDS_LOCAL_GRASS 326
|
||||
#define IDS_LOCAL_SCREENEFFECT 327
|
||||
#define IDS_LOCAL_WATEREFFECT 328
|
||||
#define IDS_LOCAL_GLOWEFFECT 329
|
||||
#define IDS_LOCAL_WEATHEREFFECT 330
|
||||
#define IDS_LOCAL_SYSTEM 331
|
||||
#define IDS_LOCAL_GENERAL 332
|
||||
#define IDS_LOCAL_ADVANCE 333
|
||||
#define IDS_LOCAL_SPECIAL 334
|
||||
#define IDS_LOCAL_OK 335
|
||||
#define IDS_LOCAL_CANCEL 336
|
||||
#define IDS_LOCAL_SCREENMODE 337
|
||||
#define IDS_LOCAL_FULLSCREEN 338
|
||||
#define IDS_LOCAL_WINDOWMODE 339
|
||||
#define IDS_LOCAL_MULTILANGUAGESUPPORT 400
|
||||
#define IDS_FOLDER 500
|
||||
#define IDS_LANGUAGE 501
|
||||
#define IDS_LOCAL_LANGUAGE 600
|
||||
#define IDS_LOCAL_LANGUAGE1 601
|
||||
#define IDS_LOCAL_LANGUAGE2 602
|
||||
#define IDS_LOCAL_LANGUAGE3 603
|
||||
#define IDS_LOCAL_LANGUAGE4 604
|
||||
#define IDS_LOCAL_LANGUAGE5 605
|
||||
#define IDS_LOCAL_LANGUAGE6 606
|
||||
#define IDC_OS 1000
|
||||
#define IDC_MEMORY 1001
|
||||
#define IDC_CPUSPEED 1002
|
||||
#define IDC_HDDCAP 1003
|
||||
#define IDC_DIRECTVERSION 1004
|
||||
#define IDC_SOUNDCARD 1005
|
||||
#define IDC_COMBO_VIDEOCARD 1006
|
||||
#define IDC_COMBO_MODE 1007
|
||||
#define IDC_COMBO_COLOR 1008
|
||||
#define IDC_COMBO_REFRESH 1009
|
||||
#define IDC_COMBO_QUALITY 1010
|
||||
#define IDC_GAME_PORT 1011
|
||||
#define IDC_COMBO_CHARSHADOW 1012
|
||||
#define IDC_COMBO_LIGHTMAP 1013
|
||||
#define IDC_COMBO_RANGE 1014
|
||||
#define IDC_COMBO_ABLETEXTURE 1015
|
||||
#define IDC_COMBO_GRASSRENDERING 1016
|
||||
#define IDC_COMBO_SCREENFILTER 1017
|
||||
#define IDC_COMBO_WATEREFFECT 1018
|
||||
#define IDC_COMBO_GLOWEFFECT 1019
|
||||
#define IDC_COMBO_WEATHEREFFECT 1020
|
||||
#define IDC_COMBO_WINDOWMODE 1021
|
||||
#define IDC_COMBO_LANGUAGE 1022
|
||||
#define IDC_STATIC_OS 1050
|
||||
#define IDC_STATIC_MEMORY 1051
|
||||
#define IDC_STATIC_CPUSPEED 1052
|
||||
#define IDC_STATIC_HDDCAP 1053
|
||||
#define IDC_STATIC_DIRECTVERSION 1054
|
||||
#define IDC_STATIC_SOUNDCARD 1055
|
||||
#define IDC_STATIC_VIDEOCARD 1056
|
||||
#define IDC_STATIC_RES 1057
|
||||
#define IDC_STATIC_COLOR 1058
|
||||
#define IDC_STATIC_REFRESH 1059
|
||||
#define IDC_STATIC_OPTIONSIMPLE 1060
|
||||
#define IDC_STATIC_GAME_PORT 1061
|
||||
#define IDC_STATIC_CHARACTERSHADOW 1062
|
||||
#define IDC_STATIC_HOUSESHADOW 1063
|
||||
#define IDC_STATIC_VIEWRANGE 1064
|
||||
#define IDC_STATIC_TEXTURE 1065
|
||||
#define IDC_STATIC_GRASS 1066
|
||||
#define IDC_STATIC_SCREENFILTER 1067
|
||||
#define IDC_STATIC_WATEREFFECT 1068
|
||||
#define IDC_STATIC_GLOWEFFECT 1069
|
||||
#define IDC_STATIC_WEATHEREFFECT 1070
|
||||
#define IDC_STATIC_WINDOWMODE 1071
|
||||
#define IDC_STATIC_LANGUAGE 1072
|
||||
#define IDC_CHECK1 1074
|
||||
#define IDC_MULTISUPPORT 1074
|
||||
#define IDC_DESC 1100
|
||||
#define IDC_CONTROLTAB 1101
|
||||
#define IDC_IMAGE01 1102
|
||||
#define IDB_IMAGE02 1103
|
||||
#define IDB_IMAGE03 1104
|
||||
#define IDB_IMAGE04 1105
|
||||
#define IDI_ICON1 2000
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 134
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1075
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
7
Tools/ClientSetup/stdafx.cpp
Normal file
7
Tools/ClientSetup/stdafx.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// ClientSetup.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
42
Tools/ClientSetup/stdafx.h
Normal file
42
Tools/ClientSetup/stdafx.h
Normal file
@@ -0,0 +1,42 @@
|
||||
// stdafx.h : <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>
|
||||
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Windows <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ܽ<EFBFBD>ŵ<EFBFBD>ϴ<EFBFBD>.
|
||||
#endif
|
||||
|
||||
// <20>Ʒ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>켱<EFBFBD>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ǹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// <20>ٸ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MSDN<44><4E> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#ifndef WINVER // Windows 95 <20><> Windows NT 4 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define WINVER 0x0400 // Windows 98<39><38> Windows 2000 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Windows NT 4 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINNT 0x0400 // Windows 98<39><38> Windows 2000 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Windows 98 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINDOWS 0x0410 // Windows Me <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // IE 4.0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_IE 0x0400 // IE 5.0 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // <20>Ϻ<EFBFBD> CString <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
// MFC<46><43> <20><><EFBFBD><EFBFBD> <20>κа<CEBA> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⸦ <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC <20>ٽ<EFBFBD> <20><> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
#include <afxext.h> // MFC <20>ͽ<EFBFBD><CDBD>ټ<EFBFBD>
|
||||
|
||||
#include <afxdtctl.h> // Internet Explorer 4 <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD>
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // Windows <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD>
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
#define STR_CLIENT_REGISTRY_SUBKEY "Software\\ROW\\MP-Client"
|
||||
55
Tools/ClientSetup/timer.cpp
Normal file
55
Tools/ClientSetup/timer.cpp
Normal file
@@ -0,0 +1,55 @@
|
||||
#define TIMER_CPP
|
||||
#define CORE_DLL
|
||||
/***************************************************************\
|
||||
|
||||
^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^^^^^^^ ^^ ^^^^^^^^
|
||||
^^ ^^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^ ^^
|
||||
|
||||
sample code from the book...
|
||||
Real Time 3D Terrain Engines Using C++ and DirectX
|
||||
|
||||
by Greg Snook
|
||||
greg@mightystudios.com
|
||||
|
||||
\***************************************************************/
|
||||
|
||||
#include "timer.h"
|
||||
#include "windows.h"
|
||||
#include "GMMemory.h"
|
||||
|
||||
using namespace gaia;
|
||||
|
||||
uint32 cTimer::s_secondsFrequency = 0;
|
||||
uint32 cTimer::s_millisecondsFrequency = 0;
|
||||
float cTimer::s_invSecFrequency = 0.0f;
|
||||
|
||||
void cTimer::setupTimerFrequency()
|
||||
{
|
||||
if (!s_secondsFrequency)
|
||||
{
|
||||
LARGE_INTEGER frequency;
|
||||
QueryPerformanceFrequency(&frequency);
|
||||
|
||||
s_secondsFrequency = frequency.LowPart;
|
||||
s_millisecondsFrequency = frequency.LowPart/1000;
|
||||
|
||||
s_invSecFrequency = 1.0f/(float)s_secondsFrequency;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 cTimer::samplePerformanceCounter()
|
||||
{
|
||||
LARGE_INTEGER sample;
|
||||
QueryPerformanceCounter(&sample);
|
||||
return sample.LowPart;
|
||||
}
|
||||
|
||||
//***************************************************************
|
||||
// end of file ( Timer.cpp )
|
||||
|
||||
//----------------------------------------------------------
|
||||
//$Log: $
|
||||
250
Tools/ClientSetup/timer.h
Normal file
250
Tools/ClientSetup/timer.h
Normal file
@@ -0,0 +1,250 @@
|
||||
#ifndef TIMER_H
|
||||
#define TIMER_H
|
||||
#pragma once
|
||||
/***************************************************************\
|
||||
|
||||
^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^^^^^^^ ^^ ^^^^^^^^
|
||||
^^ ^^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^ ^^ ^^ ^^ ^^ ^^ ^^
|
||||
^^^^^^^^ ^^ ^^ ^^^^^^^^ ^^ ^^
|
||||
|
||||
sample code from the book...
|
||||
Real Time 3D Terrain Engines Using C++ and DirectX
|
||||
|
||||
by Greg Snook
|
||||
greg@mightystudios.com
|
||||
|
||||
\***************************************************************/
|
||||
|
||||
#ifndef DATATYPES_H
|
||||
#include "data_types.h"
|
||||
#endif
|
||||
|
||||
#ifndef NUMERICTOOLS_H
|
||||
#include "numeric_tools.h"
|
||||
#endif
|
||||
|
||||
// Name Space declaration
|
||||
namespace gaia
|
||||
{
|
||||
|
||||
/* cTimer
|
||||
-----------------------------------------------------------------
|
||||
|
||||
A basic timer
|
||||
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class cTimer
|
||||
{
|
||||
public:
|
||||
|
||||
// Data Types & Constants...
|
||||
enum TIMER_STATE
|
||||
{
|
||||
OFF = 0,
|
||||
ON,
|
||||
HOLD,
|
||||
};
|
||||
|
||||
// Public Data...
|
||||
|
||||
// Creators...
|
||||
|
||||
cTimer();
|
||||
~cTimer();
|
||||
|
||||
// Operators...
|
||||
|
||||
|
||||
void start(); // start the timer
|
||||
void stop(); // stop the timer
|
||||
|
||||
void suspend(); // pause the timer
|
||||
void resume(); // resume the timer from when is was suspended
|
||||
|
||||
// Accessors...
|
||||
float elapsedTime();
|
||||
uint32 elapsedSeconds();
|
||||
uint32 elapsedMilliseconds();
|
||||
uint32 elapsedCount();
|
||||
|
||||
private:
|
||||
|
||||
// Private Data...
|
||||
static uint32 s_secondsFrequency;
|
||||
static uint32 s_millisecondsFrequency;
|
||||
static float s_invSecFrequency;
|
||||
|
||||
uint32 m_startTime;
|
||||
uint32 m_stopTime;
|
||||
uint32 m_timeDelta;
|
||||
uint32 m_elapsedCount;
|
||||
TIMER_STATE m_state;
|
||||
|
||||
// Private Functions...
|
||||
static void setupTimerFrequency();
|
||||
uint32 samplePerformanceCounter();
|
||||
|
||||
// non-existant functions
|
||||
cTimer(const cTimer& Src);
|
||||
cTimer& operator=(const cTimer& Src);
|
||||
|
||||
};
|
||||
|
||||
//- Inline Functions --------------------------------------------
|
||||
|
||||
//. Creators ....................................................
|
||||
|
||||
/* cTimer
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Default Constructor
|
||||
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
inline cTimer::cTimer()
|
||||
:m_state(OFF)
|
||||
,m_elapsedCount(0)
|
||||
{
|
||||
memset(&m_startTime, 0, sizeof(m_startTime));
|
||||
memset(&m_stopTime, 0, sizeof(m_stopTime));
|
||||
memset(&m_timeDelta, 0, sizeof(m_timeDelta));
|
||||
setupTimerFrequency();
|
||||
}
|
||||
|
||||
/* ~cTimer
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Default Destructor
|
||||
|
||||
-----------------------------------------------------------------
|
||||
*/
|
||||
inline cTimer::~cTimer()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline void cTimer::start() // start the timer
|
||||
{
|
||||
m_startTime = samplePerformanceCounter();
|
||||
m_elapsedCount = 0;
|
||||
m_state = ON;
|
||||
}
|
||||
|
||||
|
||||
inline void cTimer::stop() // stop the timer
|
||||
{
|
||||
m_elapsedCount = elapsedCount();
|
||||
m_state = OFF;
|
||||
}
|
||||
|
||||
|
||||
inline void cTimer::suspend() // resume the timer from when is was stopped
|
||||
{
|
||||
if (m_state == ON)
|
||||
{
|
||||
m_elapsedCount = elapsedCount();
|
||||
m_state = HOLD;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void cTimer::resume() // resume the timer from when is was stopped
|
||||
{
|
||||
if (m_state == HOLD)
|
||||
{
|
||||
// get the current time
|
||||
m_startTime = samplePerformanceCounter();
|
||||
|
||||
// roll the start time back by our previous delta
|
||||
m_startTime -= m_timeDelta;
|
||||
|
||||
m_elapsedCount = 0;
|
||||
m_state = ON;
|
||||
}
|
||||
}
|
||||
|
||||
//. Accessors ............................................................................
|
||||
|
||||
inline float cTimer::elapsedTime()
|
||||
{
|
||||
if (m_state != ON)
|
||||
{
|
||||
return (float)m_elapsedCount*s_invSecFrequency;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stopTime = samplePerformanceCounter();
|
||||
m_timeDelta = m_stopTime - m_startTime;
|
||||
|
||||
float ReportedTime = (float)m_timeDelta*s_invSecFrequency;
|
||||
|
||||
return(ReportedTime);
|
||||
}
|
||||
}
|
||||
|
||||
inline uint32 cTimer::elapsedSeconds()
|
||||
{
|
||||
if (m_state != ON)
|
||||
{
|
||||
return m_elapsedCount/s_secondsFrequency;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stopTime = samplePerformanceCounter();
|
||||
m_timeDelta = m_stopTime - m_startTime;
|
||||
|
||||
uint32 ReportedTime = m_timeDelta/s_secondsFrequency;
|
||||
|
||||
return(ReportedTime);
|
||||
}
|
||||
}
|
||||
|
||||
inline uint32 cTimer::elapsedMilliseconds()
|
||||
{
|
||||
if (m_state != ON)
|
||||
{
|
||||
return m_elapsedCount/s_millisecondsFrequency;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stopTime = samplePerformanceCounter();
|
||||
m_timeDelta = m_stopTime - m_startTime;
|
||||
|
||||
uint32 ReportedTime = m_timeDelta/s_millisecondsFrequency;
|
||||
|
||||
return(ReportedTime);
|
||||
}
|
||||
}
|
||||
|
||||
inline uint32 cTimer::elapsedCount()
|
||||
{
|
||||
if (m_state != ON)
|
||||
{
|
||||
return m_elapsedCount;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_stopTime = samplePerformanceCounter();
|
||||
m_timeDelta = m_stopTime - m_startTime;
|
||||
|
||||
uint32 ReportedTime = m_timeDelta;
|
||||
|
||||
return(ReportedTime);
|
||||
}
|
||||
}
|
||||
|
||||
//- End of cTimer ------------------------------------------------
|
||||
|
||||
//***************************************************************
|
||||
|
||||
} //End NameSpace: gaia
|
||||
|
||||
#endif // end of file ( cTimer.h )
|
||||
|
||||
//----------------------------------------------------------
|
||||
//$Log: $
|
||||
Reference in New Issue
Block a user