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:
179
Tools/PatchMaker/SettingPatchInfo.cpp
Normal file
179
Tools/PatchMaker/SettingPatchInfo.cpp
Normal file
@@ -0,0 +1,179 @@
|
||||
// SettingPatchInfo.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "PatchMaker.h"
|
||||
#include "SettingPatchInfo.h"
|
||||
#include "SingleInputDlg.h"
|
||||
|
||||
#include "UtilityFunc.h"
|
||||
#include "PMSetting.h"
|
||||
|
||||
// CSettingPatchInfo <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
IMPLEMENT_DYNAMIC(CSettingPatchInfo, CDialog)
|
||||
CSettingPatchInfo::CSettingPatchInfo(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CSettingPatchInfo::IDD, pParent)
|
||||
, m_dwPatchVersion(100)
|
||||
, m_bSelectedNewFile(false)
|
||||
, m_szSetupFileName(_T(""))
|
||||
, m_szSetupName(_T(""))
|
||||
{
|
||||
}
|
||||
|
||||
CSettingPatchInfo::~CSettingPatchInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void CSettingPatchInfo::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_CB_SEL_OPTION, m_cbSettingOptFile);
|
||||
DDX_Text(pDX, IDC_ED_PATCHVER, m_dwPatchVersion);
|
||||
DDV_MinMaxUInt(pDX, m_dwPatchVersion, 100, 10000);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CSettingPatchInfo, CDialog)
|
||||
ON_CBN_SELCHANGE(IDC_CB_SEL_OPTION, OnCbnSelchangeCbSelOption)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CSettingPatchInfo <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>¾<EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȿ<EFBFBD>Ѱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
bool CSettingPatchInfo::CheckPatchInfo()
|
||||
{
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
BOOL CSettingPatchInfo::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// TODO: <20><><EFBFBD> <20>߰<EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
m_cbSettingOptFile.InsertString(0, _T("< new >"));
|
||||
m_cbSettingOptFile.SetCurSel(0);
|
||||
|
||||
CString szFilePathName;
|
||||
PMUtil::GetCurrentFolderName(szFilePathName);
|
||||
szFilePathName.AppendFormat(_T("*%s"), GetExtension());
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˻<EFBFBD><CBBB>ؼ<EFBFBD> ȭ<>鿡 <20>ѷ<EFBFBD><D1B7>ش<EFBFBD>.
|
||||
CFileFind fileFind;
|
||||
BOOL bWorking = fileFind.FindFile(szFilePathName);
|
||||
for (int nIndex = 1; bWorking; ++nIndex)
|
||||
{
|
||||
bWorking = fileFind.FindNextFile();
|
||||
m_cbSettingOptFile.InsertString(nIndex, fileFind.GetFileTitle());
|
||||
}
|
||||
fileFind.Close();
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
// <20><><EFBFBD><EFBFBD>: OCX <20>Ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FALSE<53><45> <20><>ȯ<EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
void CSettingPatchInfo::OnOK()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> Ư<><C6AF>ȭ<EFBFBD><C8AD> <20>ڵ带 <20>߰<EFBFBD> <20><>/<2F>Ǵ<EFBFBD> <20>⺻ Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
// <20><><EFBFBD>õ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>о<EFBFBD><D0BE>ɴϴ<C9B4>.
|
||||
UpdateData(TRUE);
|
||||
|
||||
int nSel = m_cbSettingOptFile.GetCurSel();
|
||||
m_szSetupFileName.SetString("");
|
||||
m_bSelectedNewFile = false;
|
||||
|
||||
if (0 == nSel)
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE><EFBFBD>Ѵ<EFBFBD>.
|
||||
CSingleInputDlg singleInput(
|
||||
_T("<EFBFBD><EFBFBD> <20><>ġ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20>Է<EFBFBD><D4B7>ϼ<EFBFBD><CFBC><EFBFBD>"),
|
||||
_T("<EFBFBD><EFBFBD>ġ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD> : "));
|
||||
|
||||
CFile file;
|
||||
|
||||
TCHAR szTempPath[MAX_PATH];
|
||||
GetTempPath(MAX_PATH - 1, szTempPath);
|
||||
szTempPath[MAX_PATH - 1] = 0;
|
||||
|
||||
CString szFullPathName;
|
||||
|
||||
while(!m_bSelectedNewFile)
|
||||
{
|
||||
if (IDOK == singleInput.DoModal())
|
||||
{
|
||||
szFullPathName.Format("%s%s%s", szTempPath,
|
||||
singleInput.GetSingleInput(), GetExtension());
|
||||
|
||||
if (file.Open(szFullPathName, CFile::modeCreate))
|
||||
{
|
||||
m_szSetupFileName.SetString(singleInput.GetSingleInput());
|
||||
m_bSelectedNewFile = true;
|
||||
|
||||
file.Close();
|
||||
DeleteFile(szFullPathName);
|
||||
}
|
||||
else
|
||||
{
|
||||
AfxMessageBox(_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8>Դϴ<D4B4>.\n<EFBFBD>ٽ<EFBFBD> <20>Է<EFBFBD><D4B7><EFBFBD> <20>ֽʽÿ<CABD>"),
|
||||
MB_OK | MB_ICONEXCLAMATION);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_szSetupFileName.SetString("");
|
||||
m_bSelectedNewFile = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_cbSettingOptFile.GetLBText(nSel, m_szSetupFileName);
|
||||
}
|
||||
|
||||
if (0 < m_szSetupFileName.GetLength())
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
m_szSetupName.SetString(m_szSetupFileName.GetString());
|
||||
m_szSetupFileName.Append(GetExtension());
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
CString szKey;
|
||||
CString szValue;
|
||||
|
||||
szKey.SetString(m_szSetupName);
|
||||
szKey.Replace(_T("="), _T("_"));
|
||||
|
||||
szValue.Format(_T("%u"), m_dwPatchVersion);
|
||||
|
||||
CPMSetting& pmSetting = CPMDefaultSetting::GetInstance();
|
||||
pmSetting.SetSettingData(szKey, szValue);
|
||||
pmSetting.SaveSetting();
|
||||
|
||||
CDialog::OnOK();
|
||||
}
|
||||
}
|
||||
|
||||
void CSettingPatchInfo::OnCbnSelchangeCbSelOption()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
CString szKey;
|
||||
CString szValue;
|
||||
|
||||
int nCurSel = m_cbSettingOptFile.GetCurSel();
|
||||
if (CB_ERR != nCurSel)
|
||||
{
|
||||
m_cbSettingOptFile.GetLBText(nCurSel, szKey);
|
||||
szKey.Replace(_T("="), _T("_"));
|
||||
|
||||
if (CPMDefaultSetting::GetInstance().GetSettingData(szKey, szValue))
|
||||
{
|
||||
m_dwPatchVersion = atol(szValue);
|
||||
UpdateData(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user