forked from metin2/client
Added configuration utility, consolidated language config
This commit is contained in:
parent
c4236ba185
commit
a7eac9dedf
@ -34,6 +34,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ScriptLib", "src\ScriptLib\
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EterLocale", "src\EterLocale\EterLocale.vcxproj", "{05207E97-C83A-49C6-8E08-403679963A7B}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EterLocale", "src\EterLocale\EterLocale.vcxproj", "{05207E97-C83A-49C6-8E08-403679963A7B}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Config", "src\Config\Metin2Config.vcxproj", "{879A444C-3A51-4B63-8888-DC0AAD578B03}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
@ -137,6 +139,12 @@ Global
|
|||||||
{05207E97-C83A-49C6-8E08-403679963A7B}.Distribute|Win32.Build.0 = Distribute|Win32
|
{05207E97-C83A-49C6-8E08-403679963A7B}.Distribute|Win32.Build.0 = Distribute|Win32
|
||||||
{05207E97-C83A-49C6-8E08-403679963A7B}.Release|Win32.ActiveCfg = Release|Win32
|
{05207E97-C83A-49C6-8E08-403679963A7B}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{05207E97-C83A-49C6-8E08-403679963A7B}.Release|Win32.Build.0 = Release|Win32
|
{05207E97-C83A-49C6-8E08-403679963A7B}.Release|Win32.Build.0 = Release|Win32
|
||||||
|
{879A444C-3A51-4B63-8888-DC0AAD578B03}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
|
{879A444C-3A51-4B63-8888-DC0AAD578B03}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
|
{879A444C-3A51-4B63-8888-DC0AAD578B03}.Distribute|Win32.ActiveCfg = Distribute|Win32
|
||||||
|
{879A444C-3A51-4B63-8888-DC0AAD578B03}.Distribute|Win32.Build.0 = Distribute|Win32
|
||||||
|
{879A444C-3A51-4B63-8888-DC0AAD578B03}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
|
{879A444C-3A51-4B63-8888-DC0AAD578B03}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
|
4
bin/.gitignore
vendored
4
bin/.gitignore
vendored
@ -1,8 +1,12 @@
|
|||||||
# Game executable
|
# Game executable
|
||||||
metin2client.exe
|
metin2client.exe
|
||||||
|
|
||||||
|
# Configuration executable
|
||||||
|
config.exe
|
||||||
|
|
||||||
# User configuration files
|
# User configuration files
|
||||||
channel.inf
|
channel.inf
|
||||||
|
locale.cfg
|
||||||
metin2.cfg
|
metin2.cfg
|
||||||
BGM/lastplay.inf
|
BGM/lastplay.inf
|
||||||
|
|
||||||
|
BIN
bin/config.exe
BIN
bin/config.exe
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
10002 1252 en
|
|
@ -1 +0,0 @@
|
|||||||
10019 1250 cz
|
|
@ -1 +0,0 @@
|
|||||||
10000 1252 de
|
|
@ -1 +0,0 @@
|
|||||||
10013 1252 dk
|
|
@ -1 +0,0 @@
|
|||||||
10002 1252 en
|
|
@ -1 +0,0 @@
|
|||||||
10004 1252 es
|
|
@ -1 +0,0 @@
|
|||||||
10000 1252 fr
|
|
@ -1 +0,0 @@
|
|||||||
0 1253 gr
|
|
@ -1 +0,0 @@
|
|||||||
10021 1250 hu
|
|
@ -1 +0,0 @@
|
|||||||
10006 1252 it
|
|
@ -1 +0,0 @@
|
|||||||
10018 1252 nl
|
|
@ -1 +0,0 @@
|
|||||||
10012 1250 pl
|
|
@ -1 +0,0 @@
|
|||||||
10010 1252 pt
|
|
@ -1 +0,0 @@
|
|||||||
10022 1250 ro
|
|
@ -1 +0,0 @@
|
|||||||
10020 1251 ru
|
|
@ -1 +0,0 @@
|
|||||||
10012 1254 tr
|
|
@ -32,6 +32,7 @@ rem Start assembling the client package
|
|||||||
RMDIR /S /Q dist
|
RMDIR /S /Q dist
|
||||||
MKDIR dist\
|
MKDIR dist\
|
||||||
COPY /Y build\bin\Distribute\UserInterface.exe dist\metin2.exe
|
COPY /Y build\bin\Distribute\UserInterface.exe dist\metin2.exe
|
||||||
|
COPY /Y build\bin\Distribute\Config.exe dist\config.exe
|
||||||
|
|
||||||
rem Copy over the data from the bin directory
|
rem Copy over the data from the bin directory
|
||||||
xcopy bin\ dist\ /Y /Q
|
xcopy bin\ dist\ /Y /Q
|
||||||
|
491
src/Config/MainDialog.cpp
Normal file
491
src/Config/MainDialog.cpp
Normal file
@ -0,0 +1,491 @@
|
|||||||
|
#include "MainDialog.h"
|
||||||
|
|
||||||
|
#include <d3d9.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#define APP_NAME _T("Metin2 Config")
|
||||||
|
#define FILENAME_CONFIG "metin2.cfg"
|
||||||
|
#define LOCALE_CONFIG "locale.cfg"
|
||||||
|
|
||||||
|
static const unsigned int kVisibilityNames[CMainDialog::VISIBILITY_MAX_NUM] = {
|
||||||
|
IDS_FOG_NEAR, IDS_FOG_MID, IDS_FOG_FAR
|
||||||
|
};
|
||||||
|
|
||||||
|
static const unsigned int kTilingNames[CMainDialog::TILING_MAX_NUM] = {
|
||||||
|
IDS_TILE_AUTO, IDS_TILE_CPU, IDS_TILE_GPU
|
||||||
|
};
|
||||||
|
|
||||||
|
static const unsigned int kShadowNames[CMainDialog::SHADOW_MAX_NUM] = {
|
||||||
|
IDS_SHADOW_NONE, IDS_SHADOW_LV1, IDS_SHADOW_LV2, IDS_SHADOW_ALL
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Language
|
||||||
|
{
|
||||||
|
kLanguageCzech,
|
||||||
|
kLanguageDanish,
|
||||||
|
kLanguageDutch,
|
||||||
|
kLanguageEnglish,
|
||||||
|
kLanguageFrench,
|
||||||
|
kLanguageGerman,
|
||||||
|
kLanguageGreek,
|
||||||
|
kLanguageHungarian,
|
||||||
|
kLanguageItalian,
|
||||||
|
kLanguagePolish,
|
||||||
|
kLanguagePortuguese,
|
||||||
|
kLanguageRomanian,
|
||||||
|
kLanguageRussian,
|
||||||
|
kLanguageSpanish,
|
||||||
|
kLanguageTurkish,
|
||||||
|
|
||||||
|
kLanguageMax
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LanguageConfig
|
||||||
|
{
|
||||||
|
int stringId;
|
||||||
|
int charset;
|
||||||
|
const char* name;
|
||||||
|
} kLanguageConfig[] = {
|
||||||
|
{IDS_LANGUAGE_CZECH, 1250, "cz"},
|
||||||
|
{IDS_LANGUAGE_DANISH, 1252, "dk"},
|
||||||
|
{IDS_LANGUAGE_DUTCH, 1252, "nl"},
|
||||||
|
{IDS_LANGUAGE_ENGLISH, 1252, "en"},
|
||||||
|
{IDS_LANGUAGE_FRENCH, 1252, "fr"},
|
||||||
|
{IDS_LANGUAGE_GERMAN, 1252, "de"},
|
||||||
|
{IDS_LANGUAGE_GREEK, 1253, "gr"},
|
||||||
|
{IDS_LANGUAGE_HUNGARIAN, 1250, "hu"},
|
||||||
|
{IDS_LANGUAGE_ITALIAN, 1252, "it"},
|
||||||
|
{IDS_LANGUAGE_POLISH, 1250, "pl"},
|
||||||
|
{IDS_LANGUAGE_PORTUGUESE, 1252, "pt"},
|
||||||
|
{IDS_LANGUAGE_ROMANIAN, 1250, "ro"},
|
||||||
|
{IDS_LANGUAGE_RUSSIAN, 1251, "ru"},
|
||||||
|
{IDS_LANGUAGE_SPANISH, 1252, "es"},
|
||||||
|
{IDS_LANGUAGE_TURKISH, 1254, "tr"},
|
||||||
|
};
|
||||||
|
|
||||||
|
CMainDialog::CMainDialog()
|
||||||
|
{
|
||||||
|
InitDefaultConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
BOOL CMainDialog::OnInitDialog(CWindow wndFocus, LPARAM lInitParam)
|
||||||
|
{
|
||||||
|
CenterWindow();
|
||||||
|
|
||||||
|
HICON hIcon = AtlLoadIconImage(IDR_MAINFRAME, LR_DEFAULTCOLOR,
|
||||||
|
::GetSystemMetrics(SM_CXICON), ::GetSystemMetrics(SM_CYICON));
|
||||||
|
SetIcon(hIcon, TRUE);
|
||||||
|
|
||||||
|
HICON hIconSmall = AtlLoadIconImage(IDR_MAINFRAME, LR_DEFAULTCOLOR, ::GetSystemMetrics(SM_CXSMICON), ::GetSystemMetrics(SM_CYSMICON));
|
||||||
|
SetIcon(hIconSmall, FALSE);
|
||||||
|
|
||||||
|
GetResolutionList();
|
||||||
|
|
||||||
|
LoadConfig();
|
||||||
|
|
||||||
|
DoDataExchange(FALSE);
|
||||||
|
|
||||||
|
// Screen Resolution
|
||||||
|
ATL::CString strResolutionName;
|
||||||
|
for (int i=0; i < m_nResolutionCount; i++) {
|
||||||
|
strResolutionName.Format(_T("%dx%d %dbpp"), m_ResolutionList[i].width, m_ResolutionList[i].height, m_ResolutionList[i].bpp);
|
||||||
|
m_comboResolution.InsertString( i, strResolutionName );
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolution Selection
|
||||||
|
strResolutionName.Format(_T("%dx%d %dbpp"), m_stConfig.width, m_stConfig.height, m_stConfig.bpp);
|
||||||
|
int iResolutionSel = m_comboResolution.FindString(0, strResolutionName);
|
||||||
|
|
||||||
|
if (iResolutionSel < 0)
|
||||||
|
m_comboResolution.SetCurSel(0);
|
||||||
|
else
|
||||||
|
m_comboResolution.SetCurSel(iResolutionSel);
|
||||||
|
|
||||||
|
// Frequency
|
||||||
|
UpdateFrequencyComboBox();
|
||||||
|
|
||||||
|
ATL::CString strFrequency;
|
||||||
|
strFrequency.Format(_T("%d"), m_stConfig.frequency);
|
||||||
|
|
||||||
|
int iFrequencySel = m_comboFrequency.FindString(0, strFrequency);
|
||||||
|
if (iFrequencySel < 0)
|
||||||
|
m_comboFrequency.SetCurSel(0);
|
||||||
|
else
|
||||||
|
m_comboFrequency.SetCurSel(iFrequencySel);
|
||||||
|
|
||||||
|
// Gamma
|
||||||
|
ATL::CString strGammaName;
|
||||||
|
for (int i=0; i < GAMMA_MAX_NUM; i++) {
|
||||||
|
strGammaName.Format(_T("%d"), i + 1);
|
||||||
|
m_comboGamma.InsertString(i, strGammaName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gamma Selection
|
||||||
|
if (m_stConfig.gamma > 0 && m_stConfig.gamma <= GAMMA_MAX_NUM)
|
||||||
|
m_comboGamma.SetCurSel(m_stConfig.gamma - 1);
|
||||||
|
else
|
||||||
|
m_comboGamma.SetCurSel(0);
|
||||||
|
|
||||||
|
// Visibility
|
||||||
|
ATL::CString strVisibility;
|
||||||
|
for (int i = 0; i < VISIBILITY_MAX_NUM; i++) {
|
||||||
|
strVisibility.LoadString(kVisibilityNames[i]);
|
||||||
|
m_comboVisibility.InsertString(i, strVisibility);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_stConfig.iDistance > 0 && m_stConfig.iDistance <= VISIBILITY_MAX_NUM)
|
||||||
|
m_comboVisibility.SetCurSel(m_stConfig.iDistance - 1);
|
||||||
|
else
|
||||||
|
m_comboVisibility.SetCurSel(0);
|
||||||
|
|
||||||
|
// Tiling
|
||||||
|
ATL::CString strTiling;
|
||||||
|
for (int i=0; i < TILING_MAX_NUM; i++) {
|
||||||
|
strTiling.LoadString(kTilingNames[i]);
|
||||||
|
m_comboTiling.InsertString(i, strTiling);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_stConfig.iTiling = std::max<int>(m_stConfig.iTiling, 0);
|
||||||
|
m_stConfig.iTiling = std::min<int>(m_stConfig.iTiling, TILING_MAX_NUM - 1);
|
||||||
|
|
||||||
|
m_comboTiling.SetCurSel(m_stConfig.iTiling);
|
||||||
|
|
||||||
|
// Shadow
|
||||||
|
ATL::CString strShadow;
|
||||||
|
for (int i=0; i < SHADOW_MAX_NUM; i++) {
|
||||||
|
strShadow.LoadString(kShadowNames[i]);
|
||||||
|
m_comboShadow.InsertString(i, strShadow);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_stConfig.iShadowLevel = std::max<int>(m_stConfig.iShadowLevel, 0);
|
||||||
|
m_stConfig.iShadowLevel = std::min<int>(m_stConfig.iShadowLevel, SHADOW_MAX_NUM-1);
|
||||||
|
m_comboShadow.SetCurSel(m_stConfig.iShadowLevel);
|
||||||
|
|
||||||
|
// Language
|
||||||
|
ATL::CString language;
|
||||||
|
for (int i = 0; i < kLanguageMax; ++i) {
|
||||||
|
language.LoadString(kLanguageConfig[i].stringId);
|
||||||
|
m_comboLanguage.InsertString(i, language);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_stConfig.language = std::clamp((int) m_stConfig.language, 0, kLanguageMax - 1);
|
||||||
|
|
||||||
|
m_comboLanguage.SetCurSel(m_stConfig.language);
|
||||||
|
|
||||||
|
// Sound
|
||||||
|
m_sliderBGMVolume.SetRange(0, 1000, true);
|
||||||
|
m_sliderSoundVolume.SetRange(0, 1000, true);
|
||||||
|
|
||||||
|
if (m_stConfig.music_volume >= 0.0f &&
|
||||||
|
m_stConfig.music_volume <= MUSIC_VOLUME_MAX_NUM)
|
||||||
|
m_sliderBGMVolume.SetPos(int(m_stConfig.music_volume * 1000.0f));
|
||||||
|
|
||||||
|
if (m_stConfig.voice_volume >= 0 &&
|
||||||
|
m_stConfig.voice_volume <= SOUND_VOLUME_MAX_NUM)
|
||||||
|
m_sliderSoundVolume.SetPos(m_stConfig.voice_volume * 200);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::OnOK(UINT uNotifyCode, int nID, CWindow wndCtl)
|
||||||
|
{
|
||||||
|
if (DoDataExchange(TRUE) == FALSE) {
|
||||||
|
//MessageBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplyConfig();
|
||||||
|
SaveConfig();
|
||||||
|
|
||||||
|
EndDialog(nID);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl)
|
||||||
|
{
|
||||||
|
EndDialog(nID);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Utility functions
|
||||||
|
void CMainDialog::InitDefaultConfig()
|
||||||
|
{
|
||||||
|
memset(&m_stConfig, 0, sizeof(m_stConfig));
|
||||||
|
|
||||||
|
m_stConfig.width = 800;
|
||||||
|
m_stConfig.height = 600;
|
||||||
|
m_stConfig.frequency = 60;
|
||||||
|
m_stConfig.bpp = 16;
|
||||||
|
|
||||||
|
m_stConfig.bUseSoftwareCursor = false;
|
||||||
|
m_stConfig.iDistance = 3;
|
||||||
|
m_stConfig.iTiling = 0;
|
||||||
|
m_stConfig.iShadowLevel = 3;
|
||||||
|
|
||||||
|
m_stConfig.gamma = 3;
|
||||||
|
m_stConfig.music_volume = 1.0f;
|
||||||
|
m_stConfig.voice_volume = 5;
|
||||||
|
|
||||||
|
m_stConfig.bFullscreen = true;
|
||||||
|
|
||||||
|
auto lang = PRIMARYLANGID(LANGIDFROMLCID(GetUserDefaultLCID()));
|
||||||
|
switch (lang) {
|
||||||
|
case LANG_GERMAN:
|
||||||
|
m_stConfig.language = kLanguageGerman;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
m_stConfig.language = kLanguageEnglish;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::LoadConfig()
|
||||||
|
{
|
||||||
|
char buf[256];
|
||||||
|
char command[256];
|
||||||
|
char value[256];
|
||||||
|
|
||||||
|
FILE * fp = fopen(FILENAME_CONFIG, "rt");
|
||||||
|
if (fp == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
while (fgets(buf, 256, fp)) {
|
||||||
|
if (sscanf(buf, " %s %s \n", command, value) == EOF)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (!_stricmp(command, "WIDTH"))
|
||||||
|
m_stConfig.width = atoi(value);
|
||||||
|
else if (!_stricmp(command, "HEIGHT"))
|
||||||
|
m_stConfig.height = atoi(value);
|
||||||
|
else if (!_stricmp(command, "BPP"))
|
||||||
|
m_stConfig.bpp = atoi(value);
|
||||||
|
else if (!_stricmp(command, "FREQUENCY"))
|
||||||
|
m_stConfig.frequency = atoi(value);
|
||||||
|
else if (!_stricmp(command, "SOFTWARE_CURSOR"))
|
||||||
|
m_stConfig.bUseSoftwareCursor = atoi(value) ? true : false;
|
||||||
|
else if (!_stricmp(command, "VISIBILITY"))
|
||||||
|
m_stConfig.iDistance = atoi(value);
|
||||||
|
else if (!_stricmp(command, "SOFTWARE_TILING"))
|
||||||
|
m_stConfig.iTiling = atoi(value);
|
||||||
|
else if (!_stricmp(command, "SHADOW_LEVEL"))
|
||||||
|
m_stConfig.iShadowLevel = atoi(value);
|
||||||
|
else if (!_stricmp(command, "MUSIC_VOLUME"))
|
||||||
|
m_stConfig.music_volume = (float) atof(value);
|
||||||
|
else if (!_stricmp(command, "VOICE_VOLUME"))
|
||||||
|
m_stConfig.voice_volume = (char) atoi(value);
|
||||||
|
else if (!_stricmp(command, "GAMMA"))
|
||||||
|
m_stConfig.gamma = std::max<int>(1, std::min<int>(GAMMA_MAX_NUM, atoi(value)));
|
||||||
|
else if (!_stricmp(command, "WINDOWED"))
|
||||||
|
m_stConfig.bFullscreen = atoi(value) == 1 ? false : true;
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
|
||||||
|
int charset;
|
||||||
|
char lang[256];
|
||||||
|
|
||||||
|
fp = fopen(LOCALE_CONFIG, "rt");
|
||||||
|
if (!fp)
|
||||||
|
return;
|
||||||
|
|
||||||
|
fgets(buf, 256, fp);
|
||||||
|
sscanf(buf, "%d %s", &charset, lang);
|
||||||
|
|
||||||
|
for (int i = 0; i < kLanguageMax; ++i) {
|
||||||
|
const auto& cfg = kLanguageConfig[i];
|
||||||
|
if (0 == std::strcmp(lang, cfg.name))
|
||||||
|
m_stConfig.language = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::SaveConfig()
|
||||||
|
{
|
||||||
|
FILE* fp = fopen(FILENAME_CONFIG, "wt");
|
||||||
|
if (fp == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
fprintf(fp, "WIDTH %d\n", m_stConfig.width);
|
||||||
|
fprintf(fp, "HEIGHT %d\n", m_stConfig.height);
|
||||||
|
fprintf(fp, "BPP %d\n", m_stConfig.bpp);
|
||||||
|
fprintf(fp, "FREQUENCY %d\n", m_stConfig.frequency);
|
||||||
|
fprintf(fp, "SOFTWARE_CURSOR %d\n", m_stConfig.bUseSoftwareCursor);
|
||||||
|
fprintf(fp, "VISIBILITY %d\n", m_stConfig.iDistance);
|
||||||
|
fprintf(fp, "SOFTWARE_TILING %d\n", m_stConfig.iTiling);
|
||||||
|
fprintf(fp, "SHADOW_LEVEL %d\n", m_stConfig.iShadowLevel);
|
||||||
|
fprintf(fp, "MUSIC_VOLUME %.3f\n", m_stConfig.music_volume);
|
||||||
|
fprintf(fp, "VOICE_VOLUME %d\n", m_stConfig.voice_volume);
|
||||||
|
fprintf(fp, "GAMMA %d\n", m_stConfig.gamma);
|
||||||
|
fprintf(fp, "WINDOWED %d\n", !m_stConfig.bFullscreen);
|
||||||
|
fprintf(fp, "\n");
|
||||||
|
fclose(fp);
|
||||||
|
|
||||||
|
fp = fopen(LOCALE_CONFIG, "wt");
|
||||||
|
if (!fp)
|
||||||
|
return;
|
||||||
|
|
||||||
|
fprintf(fp, "%d %s", kLanguageConfig[m_stConfig.language].charset, kLanguageConfig[m_stConfig.language].name);
|
||||||
|
fclose(fp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::UpdateFrequencyComboBox()
|
||||||
|
{
|
||||||
|
int iScreenCurrentSelection = m_comboResolution.GetCurSel();
|
||||||
|
|
||||||
|
m_comboFrequency.ResetContent();
|
||||||
|
|
||||||
|
ATL::CString strFrequencyName;
|
||||||
|
for (int i=0; i < m_ResolutionList[iScreenCurrentSelection].frequency_count; i++) {
|
||||||
|
strFrequencyName.Format(_T("%d"), m_ResolutionList[iScreenCurrentSelection].frequency[i]);
|
||||||
|
m_comboFrequency.InsertString(i, strFrequencyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
m_comboFrequency.SetCurSel(m_ResolutionList[iScreenCurrentSelection].frequency_count - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::GetResolutionList()
|
||||||
|
{
|
||||||
|
m_nResolutionCount = 0;
|
||||||
|
|
||||||
|
auto lpd3d = Direct3DCreate9(D3D_SDK_VERSION);
|
||||||
|
if (!lpd3d) {
|
||||||
|
m_ResolutionList[m_nResolutionCount].width = 800;
|
||||||
|
m_ResolutionList[m_nResolutionCount].height = 600;
|
||||||
|
m_ResolutionList[m_nResolutionCount].bpp = 16;
|
||||||
|
m_ResolutionList[m_nResolutionCount].frequency[0] = 60;
|
||||||
|
m_ResolutionList[m_nResolutionCount].frequency_count = 1;
|
||||||
|
|
||||||
|
++m_nResolutionCount;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const D3DFORMAT allowedFormats[] = {
|
||||||
|
D3DFMT_X8R8G8B8,
|
||||||
|
D3DFMT_R5G6B5,
|
||||||
|
};
|
||||||
|
|
||||||
|
for (int i = 0; i < sizeof(allowedFormats) / sizeof(D3DFORMAT); ++i) {
|
||||||
|
// 이 어뎁터가 가지고 있는 디스플래이 모드갯수를 나열한다..
|
||||||
|
DWORD dwNumAdapterModes = lpd3d->GetAdapterModeCount(0, allowedFormats[i]);
|
||||||
|
if (dwNumAdapterModes == 0) {
|
||||||
|
m_ResolutionList[m_nResolutionCount].width = 800;
|
||||||
|
m_ResolutionList[m_nResolutionCount].height = 600;
|
||||||
|
m_ResolutionList[m_nResolutionCount].bpp = 16;
|
||||||
|
m_ResolutionList[m_nResolutionCount].frequency[0] = 60;
|
||||||
|
m_ResolutionList[m_nResolutionCount].frequency_count = 1;
|
||||||
|
|
||||||
|
++m_nResolutionCount;
|
||||||
|
lpd3d->Release();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (UINT iMode = 0; iMode < dwNumAdapterModes; iMode++) {
|
||||||
|
D3DDISPLAYMODE displayMode;
|
||||||
|
lpd3d->EnumAdapterModes(0, allowedFormats[i], iMode, &displayMode);
|
||||||
|
|
||||||
|
if (displayMode.Width < 800 || displayMode.Height < 600)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int bpp = 0;
|
||||||
|
if (allowedFormats[i] == D3DFMT_R5G6B5)
|
||||||
|
bpp = 16;
|
||||||
|
else if (allowedFormats[i] == D3DFMT_X8R8G8B8)
|
||||||
|
bpp = 32;
|
||||||
|
|
||||||
|
int check_res = false;
|
||||||
|
for (int i = 0; !check_res && i < m_nResolutionCount; ++i) {
|
||||||
|
if (m_ResolutionList[i].bpp != bpp ||
|
||||||
|
m_ResolutionList[i].width != displayMode.Width ||
|
||||||
|
m_ResolutionList[i].height != displayMode.Height)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
int check_fre = false;
|
||||||
|
|
||||||
|
for (int j = 0; j < m_ResolutionList[i].frequency_count; ++j) {
|
||||||
|
if (m_ResolutionList[i].frequency[j] == displayMode.RefreshRate) {
|
||||||
|
check_fre = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!check_fre )
|
||||||
|
if (m_ResolutionList[i].frequency_count < FREQUENCY_MAX_NUM)
|
||||||
|
m_ResolutionList[i].frequency[m_ResolutionList[i].frequency_count++] = displayMode.RefreshRate;
|
||||||
|
|
||||||
|
check_res = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!check_res) {
|
||||||
|
if (m_nResolutionCount < RESOLUTION_MAX_NUM) {
|
||||||
|
m_ResolutionList[m_nResolutionCount].width = displayMode.Width;
|
||||||
|
m_ResolutionList[m_nResolutionCount].height = displayMode.Height;
|
||||||
|
m_ResolutionList[m_nResolutionCount].bpp = bpp;
|
||||||
|
m_ResolutionList[m_nResolutionCount].frequency[0] = displayMode.RefreshRate;
|
||||||
|
m_ResolutionList[m_nResolutionCount].frequency_count = 1;
|
||||||
|
|
||||||
|
++m_nResolutionCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
lpd3d->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::ApplyConfig()
|
||||||
|
{
|
||||||
|
int iResolutionSel = m_comboResolution.GetCurSel();
|
||||||
|
if ((iResolutionSel >= 0) && (iResolutionSel < m_nResolutionCount)) {
|
||||||
|
m_stConfig.width = m_ResolutionList[iResolutionSel].width;
|
||||||
|
m_stConfig.height = m_ResolutionList[iResolutionSel].height;
|
||||||
|
m_stConfig.bpp = m_ResolutionList[iResolutionSel].bpp;
|
||||||
|
|
||||||
|
int iFrequencySel = m_comboFrequency.GetCurSel();
|
||||||
|
if ((iFrequencySel >= 0) && (iFrequencySel < m_ResolutionList[iResolutionSel].frequency_count))
|
||||||
|
m_stConfig.frequency = m_ResolutionList[iResolutionSel].frequency[iFrequencySel];
|
||||||
|
else
|
||||||
|
m_stConfig.frequency = 60;
|
||||||
|
} else {
|
||||||
|
m_stConfig.width = 800;
|
||||||
|
m_stConfig.height = 600;
|
||||||
|
m_stConfig.bpp = 16;
|
||||||
|
m_stConfig.frequency = 60;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_stConfig.gamma = m_comboGamma.GetCurSel() + 1;
|
||||||
|
m_stConfig.music_volume = float(m_sliderBGMVolume.GetPos()) / 1000.0f;
|
||||||
|
m_stConfig.voice_volume = m_sliderSoundVolume.GetPos() / 200;
|
||||||
|
|
||||||
|
m_stConfig.iDistance = m_comboVisibility.GetCurSel() + 1;
|
||||||
|
m_stConfig.iTiling = m_comboTiling.GetCurSel();
|
||||||
|
m_stConfig.iShadowLevel = m_comboShadow.GetCurSel();
|
||||||
|
m_stConfig.language = m_comboLanguage.GetCurSel();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::OnResolutionSelChange(UINT uNotifyCode, int nID, CWindow wndCtl)
|
||||||
|
{
|
||||||
|
UpdateFrequencyComboBox();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMainDialog::OnTilingSelChange(UINT uNotifyCode, int nID, CWindow wndCtl)
|
||||||
|
{
|
||||||
|
switch (m_comboTiling.GetCurSel()) {
|
||||||
|
case 0:
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 1: {
|
||||||
|
ATL::CString strCaption((LPCTSTR) IDS_NOTIFY);
|
||||||
|
ATL::CString strDescription((LPCTSTR) IDS_TILING_CPU);
|
||||||
|
MessageBox(strDescription, strCaption);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: {
|
||||||
|
ATL::CString strCaption((LPCTSTR) IDS_NOTIFY);
|
||||||
|
ATL::CString strDescription((LPCTSTR) IDS_TILING_GPU);
|
||||||
|
MessageBox(strDescription, strCaption);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
134
src/Config/MainDialog.h
Normal file
134
src/Config/MainDialog.h
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
#ifndef METIN2_CLIENT_CONFIG_MAINDIALOG_HPP
|
||||||
|
#define METIN2_CLIENT_CONFIG_MAINDIALOG_HPP
|
||||||
|
|
||||||
|
#if VSTD_HAS_PRAGMA_ONCE
|
||||||
|
#pragma once
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <atlbase.h>
|
||||||
|
#include <wtl/atlapp.h>
|
||||||
|
#include <atlwin.h>
|
||||||
|
#include <wtl/atlcrack.h>
|
||||||
|
#include <wtl/atlmisc.h>
|
||||||
|
#include <wtl/atlctrls.h>
|
||||||
|
#include <wtl/atlddx.h>
|
||||||
|
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#define MUSIC_VOLUME_MAX_NUM 1.0f
|
||||||
|
|
||||||
|
class CMainDialog : public CDialogImpl<CMainDialog>, public CWinDataExchange<CMainDialog>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum { IDD = IDR_MAINFRAME };
|
||||||
|
|
||||||
|
typedef struct SResolution
|
||||||
|
{
|
||||||
|
DWORD width;
|
||||||
|
DWORD height;
|
||||||
|
DWORD bpp; // bits per pixel (high-color = 16bpp, true-color = 32bpp)
|
||||||
|
|
||||||
|
DWORD frequency[20];
|
||||||
|
BYTE frequency_count;
|
||||||
|
} TResolution;
|
||||||
|
|
||||||
|
typedef struct SConfig
|
||||||
|
{
|
||||||
|
DWORD width;
|
||||||
|
DWORD height;
|
||||||
|
DWORD bpp;
|
||||||
|
DWORD frequency;
|
||||||
|
|
||||||
|
bool is_object_culling;
|
||||||
|
int iDistance;
|
||||||
|
int iTiling;
|
||||||
|
int iShadowLevel;
|
||||||
|
|
||||||
|
FLOAT music_volume;
|
||||||
|
int voice_volume;
|
||||||
|
|
||||||
|
int gamma;
|
||||||
|
|
||||||
|
BOOL bUseSoftwareCursor;
|
||||||
|
BOOL bFullscreen;
|
||||||
|
|
||||||
|
unsigned int language;
|
||||||
|
} TConfig;
|
||||||
|
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
FREQUENCY_MAX_NUM = 30,
|
||||||
|
RESOLUTION_MAX_NUM = 64,
|
||||||
|
|
||||||
|
SOUND_VOLUME_MAX_NUM = 5,
|
||||||
|
|
||||||
|
GAMMA_MAX_NUM = 5,
|
||||||
|
|
||||||
|
VISIBILITY_MAX_NUM = 3,
|
||||||
|
TILING_MAX_NUM = 3,
|
||||||
|
SHADOW_MAX_NUM = 4,
|
||||||
|
};
|
||||||
|
|
||||||
|
CMainDialog();
|
||||||
|
|
||||||
|
BEGIN_MSG_MAP(CMainDialog)
|
||||||
|
MSG_WM_INITDIALOG(OnInitDialog)
|
||||||
|
COMMAND_HANDLER_EX(IDC_VIDEO_RESOLUTION, CBN_SELCHANGE, OnResolutionSelChange)
|
||||||
|
COMMAND_HANDLER_EX(IDC_OPTIMIZE_TILING, CBN_SELCHANGE, OnTilingSelChange)
|
||||||
|
COMMAND_ID_HANDLER_EX(IDOK, OnOK)
|
||||||
|
COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
|
||||||
|
END_MSG_MAP()
|
||||||
|
|
||||||
|
BEGIN_DDX_MAP(CMainDialog)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_VIDEO_RESOLUTION, m_comboResolution)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_VIDEO_FREQUENCY, m_comboFrequency)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_VIDEO_GAMMA, m_comboGamma)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_SOUND_BGM, m_sliderBGMVolume)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_SOUND_SOUND, m_sliderSoundVolume)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_OPTIMIZE_VISIBILITY, m_comboVisibility)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_OPTIMIZE_TILING, m_comboTiling)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_OPTIMIZE_SHADOW, m_comboShadow)
|
||||||
|
DDX_CONTROL_HANDLE(IDC_LANGUAGE_COMBO, m_comboLanguage)
|
||||||
|
|
||||||
|
DDX_RADIO(IDC_GRAPHIC_WINDOW_MODE, m_stConfig.bFullscreen)
|
||||||
|
DDX_CHECK(IDC_GRAPHIC_SOFTWARE_CURSOR, m_stConfig.bUseSoftwareCursor)
|
||||||
|
END_DDX_MAP()
|
||||||
|
|
||||||
|
BOOL OnInitDialog(CWindow wndFocus, LPARAM lInitParam);
|
||||||
|
|
||||||
|
void OnOK(UINT uNotifyCode, int nID, CWindow wndCtl);
|
||||||
|
void OnCancel(UINT uNotifyCode, int nID, CWindow wndCtl);
|
||||||
|
void OnResolutionSelChange(UINT uNotifyCode, int nID, CWindow wndCtl);
|
||||||
|
void OnTilingSelChange(UINT uNotifyCode, int nID, CWindow wndCtl);
|
||||||
|
|
||||||
|
void GetResolutionList();
|
||||||
|
void InitDefaultConfig();
|
||||||
|
void LoadConfig();
|
||||||
|
void SaveConfig();
|
||||||
|
void ApplyConfig();
|
||||||
|
void UpdateFrequencyComboBox();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
typedef ATL::CSimpleArray<ATL::CString> TStringVector;
|
||||||
|
|
||||||
|
WTL::CComboBox m_comboResolution;
|
||||||
|
WTL::CComboBox m_comboFrequency;
|
||||||
|
WTL::CComboBox m_comboGamma;
|
||||||
|
|
||||||
|
WTL::CTrackBarCtrl m_sliderBGMVolume;
|
||||||
|
WTL::CTrackBarCtrl m_sliderSoundVolume;
|
||||||
|
|
||||||
|
WTL::CComboBox m_comboVisibility;
|
||||||
|
WTL::CComboBox m_comboTiling;
|
||||||
|
WTL::CComboBox m_comboShadow;
|
||||||
|
WTL::CComboBox m_comboLanguage;
|
||||||
|
|
||||||
|
TStringVector m_ShadowNameVector;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TConfig m_stConfig;
|
||||||
|
TResolution m_ResolutionList[RESOLUTION_MAX_NUM];
|
||||||
|
int m_nResolutionCount;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
26
src/Config/Metin2Config.cpp
Normal file
26
src/Config/Metin2Config.cpp
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#include "MainDialog.h"
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#include <wtl/atlapp.h>
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
#pragma comment(lib, "d3d9.lib")
|
||||||
|
|
||||||
|
CAppModule _Module;
|
||||||
|
|
||||||
|
int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
|
||||||
|
{
|
||||||
|
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||||
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
|
|
||||||
|
::InitCommonControls();
|
||||||
|
|
||||||
|
_Module.Init(NULL, hInstance);
|
||||||
|
|
||||||
|
CMainDialog cDialog;
|
||||||
|
int nRet = (int) cDialog.DoModal();
|
||||||
|
|
||||||
|
_Module.Term();
|
||||||
|
return nRet;
|
||||||
|
}
|
19
src/Config/Metin2Config.rc
Normal file
19
src/Config/Metin2Config.rc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#include <wtl/atlres.h>
|
||||||
|
|
||||||
|
#include "ui.rc"
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Icon
|
||||||
|
//
|
||||||
|
|
||||||
|
// Icon with lowest ID value placed first to ensure application icon
|
||||||
|
// remains consistent on all systems.
|
||||||
|
IDR_MAINFRAME ICON "metin2.ico"
|
||||||
|
|
||||||
|
#define METIN2_COMPONENT_DESCRIPTION "Metin2 Client Configuration Utility"
|
||||||
|
#define METIN2_COMPONENT_INTERNALNAME "Config"
|
||||||
|
#define METIN2_COMPONENT_FILENAME "config.exe"
|
||||||
|
#define METIN2_COMPONENT_TYPE VFT_APP
|
||||||
|
|
||||||
|
#include <version_info.rc>
|
198
src/Config/Metin2Config.vcxproj
Normal file
198
src/Config/Metin2Config.vcxproj
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="15.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="Distribute|Win32">
|
||||||
|
<Configuration>Distribute</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<VCProjectVersion>17.0</VCProjectVersion>
|
||||||
|
<ProjectName>Config</ProjectName>
|
||||||
|
<ProjectGuid>{879A444C-3A51-4B63-8888-DC0AAD578B03}</ProjectGuid>
|
||||||
|
<RootNamespace>Metin2Config</RootNamespace>
|
||||||
|
<SccProjectName>SAK</SccProjectName>
|
||||||
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
<SccProvider>SAK</SccProvider>
|
||||||
|
<Keyword>MFCProj</Keyword>
|
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseOfMfc>false</UseOfMfc>
|
||||||
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</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>
|
||||||
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Distribute|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>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<_ProjectFileVersion>17.0.32203.90</_ProjectFileVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<OutDir>$(SolutionDir)build\bin\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>$(SolutionDir)build\obj\$(ProjectName)\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">
|
||||||
|
<OutDir>$(SolutionDir)build\bin\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>$(SolutionDir)build\obj\$(ProjectName)\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<OutDir>$(SolutionDir)build\bin\$(Configuration)\</OutDir>
|
||||||
|
<IntDir>$(SolutionDir)build\obj\$(ProjectName)\$(Configuration)\</IntDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<VcpkgUseStatic>true</VcpkgUseStatic>
|
||||||
|
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
|
||||||
|
<VcpkgInstalledDir>$(SolutionDir)build\vcpkg\</VcpkgInstalledDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">
|
||||||
|
<VcpkgUseStatic>true</VcpkgUseStatic>
|
||||||
|
<VcpkgConfiguration>Release</VcpkgConfiguration>
|
||||||
|
<VcpkgInstalledDir>$(SolutionDir)build\vcpkg\</VcpkgInstalledDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<VcpkgUseStatic>true</VcpkgUseStatic>
|
||||||
|
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
|
||||||
|
<VcpkgInstalledDir>$(SolutionDir)build\vcpkg\</VcpkgInstalledDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Label="Vcpkg">
|
||||||
|
<VcpkgEnableManifest>true</VcpkgEnableManifest>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<FloatingPointModel>Strict</FloatingPointModel>
|
||||||
|
<BrowseInformation />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0009</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Lib>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
</Lib>
|
||||||
|
<Link>
|
||||||
|
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Distribute|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||||
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<StringPooling>true</StringPooling>
|
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<FloatingPointModel>Strict</FloatingPointModel>
|
||||||
|
<AssemblerOutput>All</AssemblerOutput>
|
||||||
|
<BrowseInformation />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0009</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Lib>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
</Lib>
|
||||||
|
<Link />
|
||||||
|
<Link>
|
||||||
|
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
|
<FloatingPointModel>Strict</FloatingPointModel>
|
||||||
|
<BrowseInformation />
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
|
<CompileAs>Default</CompileAs>
|
||||||
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
||||||
|
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||||
|
</ClCompile>
|
||||||
|
<ResourceCompile>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<Culture>0x0009</Culture>
|
||||||
|
</ResourceCompile>
|
||||||
|
<Lib>
|
||||||
|
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||||
|
</Lib>
|
||||||
|
<Link />
|
||||||
|
<Link>
|
||||||
|
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="MainDialog.cpp" />
|
||||||
|
<ClCompile Include="Metin2Config.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="MainDialog.h" />
|
||||||
|
<ClInclude Include="resource.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Image Include="metin2.ico" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="Metin2Config.rc" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
43
src/Config/Metin2Config.vcxproj.filters
Normal file
43
src/Config/Metin2Config.vcxproj.filters
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{62c8d2c1-c25e-4a7e-ab94-f76adb8b3c53}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{2c236430-8de1-4024-be66-ae2c7469e916}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hpp;hxx;hm;inl</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<UniqueIdentifier>{a9554394-acc3-46ba-a041-6122aabc25db}</UniqueIdentifier>
|
||||||
|
<Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="MainDialog.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Metin2Config.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="MainDialog.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="resource.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ResourceCompile Include="Metin2Config.rc">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</ResourceCompile>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Image Include="metin2.ico">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</Image>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
BIN
src/Config/metin2.ico
Normal file
BIN
src/Config/metin2.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.2 KiB |
63
src/Config/resource.h
Normal file
63
src/Config/resource.h
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#include <wtl/atlres.h>
|
||||||
|
|
||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by ui.rc
|
||||||
|
//
|
||||||
|
#define IDS_NOTIFY 1
|
||||||
|
#define IDS_MAY_SLOW 2
|
||||||
|
#define IDS_TILING_CPU 3
|
||||||
|
#define IDS_TILING_GPU 4
|
||||||
|
#define IDS_FOG_NEAR 5
|
||||||
|
#define IDS_FOG_MID 6
|
||||||
|
#define IDS_FOG_FAR 7
|
||||||
|
#define IDS_TILE_AUTO 8
|
||||||
|
#define IDS_TILE_CPU 9
|
||||||
|
#define IDS_TILE_GPU 10
|
||||||
|
#define IDS_SHADOW_NONE 11
|
||||||
|
#define IDS_SHADOW_LV1 12
|
||||||
|
#define IDS_SHADOW_LV2 13
|
||||||
|
#define IDS_SHADOW_ALL 14
|
||||||
|
#define IDS_LANGUAGE_CZECH 15
|
||||||
|
#define IDS_LANGUAGE_DANISH 16
|
||||||
|
#define IDS_LANGUAGE_DUTCH 17
|
||||||
|
#define IDS_LANGUAGE_ENGLISH 18
|
||||||
|
#define IDS_LANGUAGE_FRENCH 19
|
||||||
|
#define IDS_LANGUAGE_GERMAN 20
|
||||||
|
#define IDS_LANGUAGE_GREEK 21
|
||||||
|
#define IDS_LANGUAGE_HUNGARIAN 22
|
||||||
|
#define IDS_LANGUAGE_ITALIAN 23
|
||||||
|
#define IDS_LANGUAGE_POLISH 24
|
||||||
|
#define IDS_LANGUAGE_PORTUGUESE 25
|
||||||
|
#define IDS_LANGUAGE_ROMANIAN 26
|
||||||
|
#define IDS_LANGUAGE_RUSSIAN 27
|
||||||
|
#define IDS_LANGUAGE_SPANISH 28
|
||||||
|
#define IDS_LANGUAGE_TURKISH 29
|
||||||
|
#define IDD_CONFIG_DIALOG 102
|
||||||
|
#define IDR_MAINFRAME 128
|
||||||
|
#define IDC_VIDEO_RESOLUTION 1001
|
||||||
|
#define IDC_VIDEO_FREQUENCY 1002
|
||||||
|
#define IDC_VIDEO_GAMMA 1003
|
||||||
|
#define IDC_GRAPHIC_SOFTWARE_CURSOR 1004
|
||||||
|
#define IDC_SOUND_BGM 1006
|
||||||
|
#define IDC_SOUND_SOUND 1007
|
||||||
|
#define IDC_OPTIMIZE_SHADOW 1010
|
||||||
|
#define IDC_OPTIMIZE_OPAQUE 1011
|
||||||
|
#define IDC_OPTIMIZE_VISIBILITY 1012
|
||||||
|
#define IDC_OPTIMIZE_DECOMPRESSED_TEXTURE 1013
|
||||||
|
#define IDC_OPTIMIZE_USE_COMPRESSED_TEXTURE 1013
|
||||||
|
#define IDC_OPTIMIZE_TILING 1013
|
||||||
|
#define IDC_GRAPHIC_WINDOW_MODE 1014
|
||||||
|
#define IDC_GRAPHIC_FULLSCREEN_MODE 1015
|
||||||
|
#define IDC_LANGUAGE_COMBO 1016
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 135
|
||||||
|
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1017
|
||||||
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
#endif
|
||||||
|
#endif
|
283
src/Config/ui.rc
Normal file
283
src/Config/ui.rc
Normal file
@ -0,0 +1,283 @@
|
|||||||
|
// Microsoft Visual C++ generated resource script.
|
||||||
|
//
|
||||||
|
#include <windows.h>
|
||||||
|
#include "resource.h"
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// English resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
||||||
|
#pragma code_page(1252)
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog
|
||||||
|
//
|
||||||
|
|
||||||
|
IDR_MAINFRAME DIALOGEX 0, 0, 286, 167
|
||||||
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||||
|
EXSTYLE WS_EX_APPWINDOW
|
||||||
|
CAPTION "Configuration"
|
||||||
|
FONT 9, "Arial", 0, 0, 0x1
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,84,150,50,14
|
||||||
|
PUSHBUTTON "Cancel",IDCANCEL,139,150,50,14
|
||||||
|
GROUPBOX "Display",IDC_STATIC,7,7,127,66
|
||||||
|
LTEXT "Resolution",IDC_STATIC,15,20,36,8
|
||||||
|
COMBOBOX IDC_VIDEO_RESOLUTION,61,20,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
LTEXT "Frequency",IDC_STATIC,15,38,36,8
|
||||||
|
COMBOBOX IDC_VIDEO_FREQUENCY,61,36,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
GROUPBOX "Sound",IDC_STATIC,7,77,127,44
|
||||||
|
CONTROL "Slider1",IDC_SOUND_BGM,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,61,88,68,12
|
||||||
|
LTEXT "BGM",IDC_STATIC,13,90,43,8
|
||||||
|
CONTROL "Slider1",IDC_SOUND_SOUND,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,61,104,68,12
|
||||||
|
LTEXT "SFX",IDC_STATIC,13,106,47,8
|
||||||
|
LTEXT "Gamma",IDC_STATIC,15,55,34,8
|
||||||
|
COMBOBOX IDC_VIDEO_GAMMA,61,54,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
LTEXT "FOG",IDC_STATIC,145,88,53,8
|
||||||
|
COMBOBOX IDC_OPTIMIZE_VISIBILITY,204,88,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
GROUPBOX "GFX",IDC_STATIC,139,77,140,66
|
||||||
|
GROUPBOX "Window Mode",IDC_STATIC,139,7,140,30
|
||||||
|
CONTROL "Windowed",IDC_GRAPHIC_WINDOW_MODE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,145,20,58,10
|
||||||
|
CONTROL "Fullscreen",IDC_GRAPHIC_FULLSCREEN_MODE,"Button",BS_AUTORADIOBUTTON,204,20,66,10
|
||||||
|
LTEXT "TNL",IDC_STATIC,145,106,55,8
|
||||||
|
COMBOBOX IDC_OPTIMIZE_TILING,204,106,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
LTEXT "Shadow",IDC_STATIC,145,123,53,8
|
||||||
|
COMBOBOX IDC_OPTIMIZE_SHADOW,204,123,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
CONTROL "Use software mouse cursor",IDC_GRAPHIC_SOFTWARE_CURSOR,
|
||||||
|
"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,13,130,110,10
|
||||||
|
GROUPBOX "Language",IDC_STATIC,139,41,139,33
|
||||||
|
COMBOBOX IDC_LANGUAGE_COMBO,144,55,127,91,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// DESIGNINFO
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
GUIDELINES DESIGNINFO
|
||||||
|
BEGIN
|
||||||
|
IDR_MAINFRAME, DIALOG
|
||||||
|
BEGIN
|
||||||
|
END
|
||||||
|
END
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// AFX_DIALOG_LAYOUT
|
||||||
|
//
|
||||||
|
|
||||||
|
IDR_MAINFRAME AFX_DIALOG_LAYOUT
|
||||||
|
BEGIN
|
||||||
|
0
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// String Table
|
||||||
|
//
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_NOTIFY "Notify\n"
|
||||||
|
IDS_MAY_SLOW "This may slow the game"
|
||||||
|
IDS_TILING_CPU "CPU tilling mode accelates by low system requirements.\nPlease set to GPU mode if error occurs.\n"
|
||||||
|
IDS_TILING_GPU "GPU tilling mode slows down by low system requirements.\nPlease set to CPU if error occurs."
|
||||||
|
IDS_FOG_NEAR "Near"
|
||||||
|
IDS_FOG_MID "Mid"
|
||||||
|
IDS_FOG_FAR "Far"
|
||||||
|
IDS_TILE_AUTO "Auto"
|
||||||
|
IDS_TILE_CPU "CPU"
|
||||||
|
IDS_TILE_GPU "GPU"
|
||||||
|
IDS_SHADOW_NONE "None"
|
||||||
|
IDS_SHADOW_LV1 "Background"
|
||||||
|
IDS_SHADOW_LV2 "Background+Player"
|
||||||
|
IDS_SHADOW_ALL "All"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_LANGUAGE_CZECH "Czech"
|
||||||
|
IDS_LANGUAGE_DANISH "Danish"
|
||||||
|
IDS_LANGUAGE_DUTCH "Dutch"
|
||||||
|
IDS_LANGUAGE_ENGLISH "English"
|
||||||
|
IDS_LANGUAGE_FRENCH "French"
|
||||||
|
IDS_LANGUAGE_GERMAN "German"
|
||||||
|
IDS_LANGUAGE_GREEK "Greek"
|
||||||
|
IDS_LANGUAGE_HUNGARIAN "Hungarian"
|
||||||
|
IDS_LANGUAGE_ITALIAN "Italian"
|
||||||
|
IDS_LANGUAGE_POLISH "Polish"
|
||||||
|
IDS_LANGUAGE_PORTUGUESE "Portuguese"
|
||||||
|
IDS_LANGUAGE_ROMANIAN "Romanian"
|
||||||
|
IDS_LANGUAGE_RUSSIAN "Russian"
|
||||||
|
IDS_LANGUAGE_SPANISH "Spanish"
|
||||||
|
IDS_LANGUAGE_TURKISH "Turkish"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // English resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
// German (Germany) resources
|
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||||
|
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||||
|
#pragma code_page(1252)
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Dialog
|
||||||
|
//
|
||||||
|
|
||||||
|
IDR_MAINFRAME DIALOGEX 0, 0, 286, 167
|
||||||
|
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||||
|
EXSTYLE WS_EX_APPWINDOW
|
||||||
|
CAPTION "Einstellungen"
|
||||||
|
FONT 9, "Arial", 0, 0, 0x1
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "Übernehmen",1,84,150,50,14
|
||||||
|
PUSHBUTTON "Abbrechen",2,139,150,50,14
|
||||||
|
GROUPBOX "Display",IDC_STATIC,7,7,127,66
|
||||||
|
LTEXT "Auflösung",IDC_STATIC,15,21,32,8
|
||||||
|
COMBOBOX 1001,61,21,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
LTEXT "Frequenz",IDC_STATIC,15,39,33,8
|
||||||
|
COMBOBOX 1002,61,36,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
GROUPBOX "Sound",IDC_STATIC,7,77,127,44
|
||||||
|
CONTROL "Slider1",1006,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,61,88,68,12
|
||||||
|
LTEXT "Musik",IDC_STATIC,13,90,44,8
|
||||||
|
CONTROL "Slider1",1007,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | WS_TABSTOP,61,104,68,12
|
||||||
|
LTEXT "SFX",IDC_STATIC,13,106,45,8
|
||||||
|
LTEXT "Gamma",IDC_STATIC,15,55,38,8
|
||||||
|
COMBOBOX 1003,61,54,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
LTEXT "Nebel",IDC_STATIC,145,88,51,8
|
||||||
|
COMBOBOX IDC_OPTIMIZE_VISIBILITY,204,88,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
GROUPBOX "GFX",IDC_STATIC,139,77,140,66
|
||||||
|
GROUPBOX "Window Mode",IDC_STATIC,139,7,140,30
|
||||||
|
CONTROL "Fenstermodus",IDC_GRAPHIC_WINDOW_MODE,"Button",BS_AUTORADIOBUTTON | WS_GROUP,145,20,58,10
|
||||||
|
CONTROL "Vollbildmodus",IDC_GRAPHIC_FULLSCREEN_MODE,"Button",BS_AUTORADIOBUTTON,204,20,66,10
|
||||||
|
LTEXT "TNL",IDC_STATIC,145,106,52,8
|
||||||
|
COMBOBOX IDC_OPTIMIZE_TILING,204,106,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
LTEXT "Schatten",IDC_STATIC,145,123,48,8
|
||||||
|
COMBOBOX IDC_OPTIMIZE_SHADOW,204,123,59,402,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL
|
||||||
|
CONTROL "Software-Mauszeiger",1004,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,7,130,103,10
|
||||||
|
GROUPBOX "Sprache",IDC_STATIC,139,41,139,33
|
||||||
|
COMBOBOX IDC_LANGUAGE_COMBO,144,55,127,90,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// DESIGNINFO
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
GUIDELINES DESIGNINFO
|
||||||
|
BEGIN
|
||||||
|
IDR_MAINFRAME, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
TOPMARGIN, 7
|
||||||
|
END
|
||||||
|
END
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// TEXTINCLUDE
|
||||||
|
//
|
||||||
|
|
||||||
|
1 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// AFX_DIALOG_LAYOUT
|
||||||
|
//
|
||||||
|
|
||||||
|
IDR_MAINFRAME AFX_DIALOG_LAYOUT
|
||||||
|
BEGIN
|
||||||
|
0
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// String Table
|
||||||
|
//
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_NOTIFY "ACHTUNG"
|
||||||
|
IDS_MAY_SLOW "Das |könnte| das Spiel verlangsamen"
|
||||||
|
IDS_TILING_CPU "CPU Tiling wird lediglich für sehr alte PCs empfohlen."
|
||||||
|
IDS_TILING_GPU "GPU Tiling ist eine gute Entscheidung!"
|
||||||
|
IDS_FOG_NEAR "Nah"
|
||||||
|
IDS_FOG_MID "Mittel"
|
||||||
|
IDS_FOG_FAR "Fern"
|
||||||
|
IDS_TILE_AUTO "Auto"
|
||||||
|
IDS_TILE_CPU "CPU"
|
||||||
|
IDS_TILE_GPU "GPU"
|
||||||
|
IDS_SHADOW_NONE "Deaktiviert"
|
||||||
|
IDS_SHADOW_LV1 "Hintergrund"
|
||||||
|
IDS_SHADOW_LV2 "Hintergrund+Spieler"
|
||||||
|
IDS_SHADOW_ALL "Alles"
|
||||||
|
END
|
||||||
|
|
||||||
|
STRINGTABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_LANGUAGE_CZECH "Tschechisch"
|
||||||
|
IDS_LANGUAGE_DANISH "Dänisch"
|
||||||
|
IDS_LANGUAGE_DUTCH "Niederländisch"
|
||||||
|
IDS_LANGUAGE_ENGLISH "Englisch"
|
||||||
|
IDS_LANGUAGE_FRENCH "Französisch"
|
||||||
|
IDS_LANGUAGE_GERMAN "Deutsch"
|
||||||
|
IDS_LANGUAGE_GREEK "Griechisch"
|
||||||
|
IDS_LANGUAGE_HUNGARIAN "Ungarisch"
|
||||||
|
IDS_LANGUAGE_ITALIAN "Italienisch"
|
||||||
|
IDS_LANGUAGE_POLISH "Polnisch"
|
||||||
|
IDS_LANGUAGE_PORTUGUESE "Portugiesisch"
|
||||||
|
IDS_LANGUAGE_ROMANIAN "Rumänisch"
|
||||||
|
IDS_LANGUAGE_RUSSIAN "Russisch"
|
||||||
|
IDS_LANGUAGE_SPANISH "Spanisch"
|
||||||
|
IDS_LANGUAGE_TURKISH "Türkisch"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif // German (Germany) resources
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Generated from the TEXTINCLUDE 3 resource.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
#endif // not APSTUDIO_INVOKED
|
||||||
|
|
47
src/Config/version_info.rc
Normal file
47
src/Config/version_info.rc
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#include <winver.h>
|
||||||
|
|
||||||
|
//
|
||||||
|
// The following macros have to be set before including this file:
|
||||||
|
// METIN2_COMPONENT_TYPE - Type of this PE (i.e. VFT_DLL or VFT_APP)
|
||||||
|
// METIN2_COMPONENT_DESCRIPTION - Description of this PE
|
||||||
|
// METIN2_COMPONENT_INTERNALNAME - Internal name of this PE
|
||||||
|
// METIN2_COMPONENT_FILENAME - Expected filename of this PE
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef DEBUG
|
||||||
|
#define METIN2_DEBUG 0
|
||||||
|
#else
|
||||||
|
#define METIN2_DEBUG VS_FF_DEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO
|
||||||
|
FILEVERSION 0, 3, 1, 0
|
||||||
|
PRODUCTVERSION 0, 3, 1, 0
|
||||||
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
|
FILEFLAGS METIN2_DEBUG
|
||||||
|
FILEOS VOS__WINDOWS32
|
||||||
|
FILETYPE METIN2_COMPONENT_TYPE // VFT_DLL
|
||||||
|
FILESUBTYPE VFT2_UNKNOWN
|
||||||
|
BEGIN
|
||||||
|
BLOCK "StringFileInfo"
|
||||||
|
BEGIN
|
||||||
|
BLOCK "040904E4"
|
||||||
|
BEGIN
|
||||||
|
VALUE "CompanyName", "The Old Metin2 Project"
|
||||||
|
VALUE "FileDescription", METIN2_COMPONENT_DESCRIPTION
|
||||||
|
VALUE "FileVersion", "0.3.1.0"
|
||||||
|
VALUE "InternalName", METIN2_COMPONENT_INTERNALNAME
|
||||||
|
VALUE "LegalCopyright", "Copyright (C) 2024"
|
||||||
|
VALUE "OriginalFilename", METIN2_COMPONENT_FILENAME
|
||||||
|
VALUE "ProductName", "Metin2Config"
|
||||||
|
VALUE "ProductVersion", "0.3.1.0"
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
BLOCK "VarFileInfo"
|
||||||
|
BEGIN
|
||||||
|
VALUE "Translation", 0x409, 1252
|
||||||
|
END
|
||||||
|
END
|
||||||
|
|
||||||
|
#undef METIN2_DEBUG
|
@ -18,11 +18,10 @@ const char* LSS_GLOBAL = "GLOBAL";
|
|||||||
|
|
||||||
static bool IS_CHEONMA = false;
|
static bool IS_CHEONMA = false;
|
||||||
|
|
||||||
char MULTI_LOCALE_SERVICE[256] = "YMIR";
|
char MULTI_LOCALE_SERVICE[256] = "EUROPE";
|
||||||
char MULTI_LOCALE_PATH[256] = "locale/ymir";
|
char MULTI_LOCALE_PATH[256] = "locale/en";
|
||||||
char MULTI_LOCALE_NAME[256] = "ymir";
|
char MULTI_LOCALE_NAME[256] = "en";
|
||||||
int MULTI_LOCALE_CODE = 949;
|
int MULTI_LOCALE_CODE = 1252;
|
||||||
int MULTI_LOCALE_REPORT_PORT = 10000;
|
|
||||||
|
|
||||||
void LocaleService_LoadConfig(const char* fileName)
|
void LocaleService_LoadConfig(const char* fileName)
|
||||||
{
|
{
|
||||||
@ -34,13 +33,11 @@ void LocaleService_LoadConfig(const char* fileName)
|
|||||||
char line[256];
|
char line[256];
|
||||||
char name[256];
|
char name[256];
|
||||||
int code;
|
int code;
|
||||||
int id;
|
|
||||||
if (fgets(line, sizeof(line)-1, fp))
|
if (fgets(line, sizeof(line)-1, fp))
|
||||||
{
|
{
|
||||||
line[sizeof(line)-1] = '\0';
|
line[sizeof(line)-1] = '\0';
|
||||||
sscanf(line, "%d %d %s", &id, &code, name);
|
sscanf(line, "%d %s", &code, name);
|
||||||
|
|
||||||
MULTI_LOCALE_REPORT_PORT = id;
|
|
||||||
MULTI_LOCALE_CODE = code;
|
MULTI_LOCALE_CODE = code;
|
||||||
strcpy(MULTI_LOCALE_NAME, name);
|
strcpy(MULTI_LOCALE_NAME, name);
|
||||||
sprintf(MULTI_LOCALE_PATH, "locale/%s", MULTI_LOCALE_NAME);
|
sprintf(MULTI_LOCALE_PATH, "locale/%s", MULTI_LOCALE_NAME);
|
||||||
|
@ -126,8 +126,8 @@ IDI_METIN2 ICON "metin2.ico"
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,3,0,0
|
FILEVERSION 0,3,1,0
|
||||||
PRODUCTVERSION 0,3,0,0
|
PRODUCTVERSION 0,3,1,0
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@ -144,12 +144,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "The Old Metin2 Project"
|
VALUE "CompanyName", "The Old Metin2 Project"
|
||||||
VALUE "FileDescription", "The Metin2 Client"
|
VALUE "FileDescription", "The Metin2 Client"
|
||||||
VALUE "FileVersion", "0.3.0.0"
|
VALUE "FileVersion", "0.3.1.0"
|
||||||
VALUE "InternalName", "Metin2Client"
|
VALUE "InternalName", "Metin2Client"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2024"
|
VALUE "LegalCopyright", "Copyright (C) 2024"
|
||||||
VALUE "OriginalFilename", "Metin2.exe"
|
VALUE "OriginalFilename", "Metin2.exe"
|
||||||
VALUE "ProductName", "Metin2Client"
|
VALUE "ProductName", "Metin2Client"
|
||||||
VALUE "ProductVersion", "0.3.0.0"
|
VALUE "ProductVersion", "0.3.1.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
@ -11,6 +11,10 @@
|
|||||||
"name": "devil",
|
"name": "devil",
|
||||||
"version>=": "1.8.0#8"
|
"version>=": "1.8.0#8"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "directxsdk",
|
||||||
|
"version>=": "jun10"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "lzo",
|
"name": "lzo",
|
||||||
"version>=": "2.10#7"
|
"version>=": "2.10#7"
|
||||||
@ -20,8 +24,8 @@
|
|||||||
"version>=": "2.7.18#3"
|
"version>=": "2.7.18#3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "directxsdk",
|
"name": "wtl",
|
||||||
"version>=": "jun10"
|
"version>=": "10.0.10320#2"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user