Commit 951fe837 authored by salix5's avatar salix5

Merge branch 'Tianchenglipu-patch-win'

parents e3283e01 b6eaae2f
...@@ -259,13 +259,19 @@ bool Game::Initialize() { ...@@ -259,13 +259,19 @@ bool Game::Initialize() {
//system //system
irr::gui::IGUITab* tabSystem = wInfos->addTab(dataManager.GetSysString(1273)); irr::gui::IGUITab* tabSystem = wInfos->addTab(dataManager.GetSysString(1273));
chkAutoPos = env->addCheckBox(false, rect<s32>(20, 20, 280, 45), tabSystem, -1, dataManager.GetSysString(1274)); chkAutoPos = env->addCheckBox(false, rect<s32>(20, 20, 280, 45), tabSystem, -1, dataManager.GetSysString(1274));
chkAutoPos->setChecked(true); chkAutoPos->setChecked(gameConf.chkAutoPos);
chkRandomPos = env->addCheckBox(false, rect<s32>(40, 50, 300, 75), tabSystem, -1, dataManager.GetSysString(1275)); chkRandomPos = env->addCheckBox(false, rect<s32>(40, 50, 300, 75), tabSystem, -1, dataManager.GetSysString(1275));
chkRandomPos->setChecked(gameConf.chkRandomPos);
chkAutoChain = env->addCheckBox(false, rect<s32>(20, 80, 280, 105), tabSystem, -1, dataManager.GetSysString(1276)); chkAutoChain = env->addCheckBox(false, rect<s32>(20, 80, 280, 105), tabSystem, -1, dataManager.GetSysString(1276));
chkAutoChain->setChecked(gameConf.chkAutoChain);
chkWaitChain = env->addCheckBox(false, rect<s32>(20, 110, 280, 135), tabSystem, -1, dataManager.GetSysString(1277)); chkWaitChain = env->addCheckBox(false, rect<s32>(20, 110, 280, 135), tabSystem, -1, dataManager.GetSysString(1277));
chkWaitChain->setChecked(gameConf.chkWaitChain);
chkIgnore1 = env->addCheckBox(false, rect<s32>(20, 170, 280, 195), tabSystem, -1, dataManager.GetSysString(1290)); chkIgnore1 = env->addCheckBox(false, rect<s32>(20, 170, 280, 195), tabSystem, -1, dataManager.GetSysString(1290));
chkIgnore1->setChecked(gameConf.chkIgnore1);
chkIgnore2 = env->addCheckBox(false, rect<s32>(20, 200, 280, 225), tabSystem, -1, dataManager.GetSysString(1291)); chkIgnore2 = env->addCheckBox(false, rect<s32>(20, 200, 280, 225), tabSystem, -1, dataManager.GetSysString(1291));
chkIgnore2->setChecked(false); chkIgnore2->setChecked(gameConf.chkIgnore2);
chkHideSetname = env->addCheckBox(false, rect<s32>(20, 200, 280, 285), tabSystem, -1, dataManager.GetSysString(1354));
chkHideSetname->setChecked(gameConf.chkHideSetname);
// //
wHand = env->addWindow(rect<s32>(500, 450, 825, 605), false, L""); wHand = env->addWindow(rect<s32>(500, 450, 825, 605), false, L"");
wHand->getCloseButton()->setVisible(false); wHand->getCloseButton()->setVisible(false);
...@@ -800,6 +806,14 @@ void Game::LoadConfig() { ...@@ -800,6 +806,14 @@ void Game::LoadConfig() {
gameConf.lastip[0] = 0; gameConf.lastip[0] = 0;
gameConf.lastport[0] = 0; gameConf.lastport[0] = 0;
gameConf.roompass[0] = 0; gameConf.roompass[0] = 0;
//settings
gameConf.chkAutoPos = 1;
gameConf.chkRandomPos = 0;
gameConf.chkAutoChain = 0;
gameConf.chkWaitChain = 0;
gameConf.chkIgnore1 = 0;
gameConf.chkIgnore2 = 0;
gameConf.chkHideSetname = 0;
fseek(fp, 0, SEEK_END); fseek(fp, 0, SEEK_END);
int fsize = ftell(fp); int fsize = ftell(fp);
fseek(fp, 0, SEEK_SET); fseek(fp, 0, SEEK_SET);
...@@ -832,6 +846,20 @@ void Game::LoadConfig() { ...@@ -832,6 +846,20 @@ void Game::LoadConfig() {
} else if(!strcmp(strbuf, "roompass")) { } else if(!strcmp(strbuf, "roompass")) {
BufferIO::DecodeUTF8(valbuf, wstr); BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.roompass, 20); BufferIO::CopyWStr(wstr, gameConf.roompass, 20);
} else if(!strcmp(strbuf, "chkAutoPos")) {
gameConf.chkAutoPos = atoi(valbuf);
} else if(!strcmp(strbuf, "chkRandomPos")) {
gameConf.chkRandomPos = atoi(valbuf);
} else if(!strcmp(strbuf, "chkAutoChain")) {
gameConf.chkAutoChain = atoi(valbuf);
} else if(!strcmp(strbuf, "chkWaitChain")) {
gameConf.chkWaitChain = atoi(valbuf);
} else if(!strcmp(strbuf, "chkIgnore1")) {
gameConf.chkIgnore1 = atoi(valbuf);
} else if(!strcmp(strbuf, "chkIgnore2")) {
gameConf.chkIgnore2 = atoi(valbuf);
} else if(!strcmp(strbuf, "chkHideSetname")) {
gameConf.chkHideSetname = atoi(valbuf);
} else { } else {
// options allowing multiple words // options allowing multiple words
sscanf(linebuf, "%s = %240[^\n]", strbuf, valbuf); sscanf(linebuf, "%s = %240[^\n]", strbuf, valbuf);
...@@ -874,6 +902,14 @@ void Game::SaveConfig() { ...@@ -874,6 +902,14 @@ void Game::SaveConfig() {
fprintf(fp, "lastip = %s\n", linebuf); fprintf(fp, "lastip = %s\n", linebuf);
BufferIO::EncodeUTF8(gameConf.lastport, linebuf); BufferIO::EncodeUTF8(gameConf.lastport, linebuf);
fprintf(fp, "lastport = %s\n", linebuf); fprintf(fp, "lastport = %s\n", linebuf);
//settings
fprintf(fp, "chkAutoPos = %d\n", ((mainGame->chkAutoPos->isChecked()) ? 1 : 0));
fprintf(fp, "chkRandomPos = %d\n", ((mainGame->chkRandomPos->isChecked()) ? 1 : 0));
fprintf(fp, "chkAutoChain = %d\n", ((mainGame->chkAutoChain->isChecked()) ? 1 : 0));
fprintf(fp, "chkWaitChain = %d\n", ((mainGame->chkWaitChain->isChecked()) ? 1 : 0));
fprintf(fp, "chkIgnore1 = %d\n", ((mainGame->chkIgnore1->isChecked()) ? 1 : 0));
fprintf(fp, "chkIgnore2 = %d\n", ((mainGame->chkIgnore2->isChecked()) ? 1 : 0));
fprintf(fp, "chkHideSetname = %d\n", ((mainGame->chkHideSetname->isChecked()) ? 1 : 0));
fclose(fp); fclose(fp);
} }
void Game::ShowCardInfo(int code) { void Game::ShowCardInfo(int code) {
...@@ -888,18 +924,22 @@ void Game::ShowCardInfo(int code) { ...@@ -888,18 +924,22 @@ void Game::ShowCardInfo(int code) {
else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code); else myswprintf(formatBuffer, L"%ls[%08d]", dataManager.GetName(code), code);
stName->setText(formatBuffer); stName->setText(formatBuffer);
int offset = 0; int offset = 0;
unsigned long long sc = cd.setcode; if(!mainGame->chkHideSetname->isChecked()) {
if(cd.alias) { unsigned long long sc = cd.setcode;
auto aptr = dataManager._datas.find(cd.alias); if(cd.alias) {
if(aptr != dataManager._datas.end()) auto aptr = dataManager._datas.find(cd.alias);
sc = aptr->second.setcode; if(aptr != dataManager._datas.end())
} sc = aptr->second.setcode;
if(sc) { }
offset = 23; if(sc) {
myswprintf(formatBuffer, L"%ls%ls", dataManager.GetSysString(1329), dataManager.FormatSetName(sc)); offset = 23;
stSetName->setText(formatBuffer); myswprintf(formatBuffer, L"%ls%ls", dataManager.GetSysString(1329), dataManager.FormatSetName(sc));
} else stSetName->setText(formatBuffer);
} else
stSetName->setText(L"");
} else {
stSetName->setText(L""); stSetName->setText(L"");
}
if(cd.type & TYPE_MONSTER) { if(cd.type & TYPE_MONSTER) {
myswprintf(formatBuffer, L"[%ls] %ls/%ls", dataManager.FormatType(cd.type), dataManager.FormatRace(cd.race), dataManager.FormatAttribute(cd.attribute)); myswprintf(formatBuffer, L"[%ls] %ls/%ls", dataManager.FormatType(cd.type), dataManager.FormatRace(cd.race), dataManager.FormatAttribute(cd.attribute));
stInfo->setText(formatBuffer); stInfo->setText(formatBuffer);
......
...@@ -24,6 +24,14 @@ struct Config { ...@@ -24,6 +24,14 @@ struct Config {
wchar_t textfont[256]; wchar_t textfont[256];
wchar_t numfont[256]; wchar_t numfont[256];
wchar_t roompass[20]; wchar_t roompass[20];
//settings
int chkAutoPos;
int chkRandomPos;
int chkAutoChain;
int chkWaitChain;
int chkIgnore1;
int chkIgnore2;
int chkHideSetname;
}; };
struct DuelInfo { struct DuelInfo {
...@@ -179,6 +187,7 @@ public: ...@@ -179,6 +187,7 @@ public:
irr::gui::IGUICheckBox* chkRandomPos; irr::gui::IGUICheckBox* chkRandomPos;
irr::gui::IGUICheckBox* chkAutoChain; irr::gui::IGUICheckBox* chkAutoChain;
irr::gui::IGUICheckBox* chkWaitChain; irr::gui::IGUICheckBox* chkWaitChain;
irr::gui::IGUICheckBox* chkHideSetname;
irr::gui::IGUIListBox* lstLog; irr::gui::IGUIListBox* lstLog;
irr::gui::IGUIButton* btnClearLog; irr::gui::IGUIButton* btnClearLog;
irr::gui::IGUIButton* btnSaveLog; irr::gui::IGUIButton* btnSaveLog;
......
Subproject commit eb6f61dfe4dfa23871dcb6e731165390d228a0c6 Subproject commit 4e0295fab88326b216e54b6da644676b42a609c4
...@@ -325,6 +325,7 @@ ...@@ -325,6 +325,7 @@
!system 1351 投降 !system 1351 投降
!system 1352 主要信息: !system 1352 主要信息:
!system 1353 播放起始于回合: !system 1353 播放起始于回合:
!system 1354 不显示卡片系列
!system 1390 等待行动中... !system 1390 等待行动中...
!system 1391 等待行动中.... !system 1391 等待行动中....
!system 1392 等待行动中..... !system 1392 等待行动中.....
......
...@@ -11,3 +11,10 @@ numfont = c:/windows/fonts/arialbd.ttf ...@@ -11,3 +11,10 @@ numfont = c:/windows/fonts/arialbd.ttf
serverport = 7911 serverport = 7911
lastip = 127.0.0.1 lastip = 127.0.0.1
lastport = 7911 lastport = 7911
chkAutoPos = 1
chkRandomPos = 0
chkAutoChain = 0
chkWaitChain = 0
chkIgnore1 = 0
chkIgnore2 = 0
chkHideSetname = 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment