Commit 51647ebb authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents 897e766b 234e2f05
No preview for this file type
...@@ -63,7 +63,8 @@ public: ...@@ -63,7 +63,8 @@ public:
int announce_count; int announce_count;
int select_counter_count; int select_counter_count;
int select_counter_type; int select_counter_type;
std::vector<ClientCard*> selectable_cards; int current_mset_param;
std::vector<ClientCard *> selectable_cards;
std::vector<ClientCard*> selected_cards; std::vector<ClientCard*> selected_cards;
std::set<ClientCard*> selectsum_cards; std::set<ClientCard*> selectsum_cards;
std::vector<ClientCard*> selectsum_all; std::vector<ClientCard*> selectsum_all;
......
...@@ -219,6 +219,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -219,6 +219,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
break; break;
} }
case MSG_SELECT_IDLECMD: {
mainGame->HideElement(mainGame->wQuery);
if(current_mset_param) {
DuelClient::SetResponseI(current_mset_param);
DuelClient::SendResponse();
}
}
default: { default: {
mainGame->HideElement(mainGame->wQuery); mainGame->HideElement(mainGame->wQuery);
break; break;
...@@ -504,8 +511,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -504,8 +511,16 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break; break;
for(size_t i = 0; i < msetable_cards.size(); ++i) { for(size_t i = 0; i < msetable_cards.size(); ++i) {
if(msetable_cards[i] == clicked_card) { if(msetable_cards[i] == clicked_card) {
DuelClient::SetResponseI((i << 16) + 3); current_mset_param = (i << 16) + 3;
DuelClient::SendResponse(); if(mainGame->gameConf.ask_mset) {
wchar_t wbuf[256];
myswprintf(wbuf, dataManager.GetSysString(1355), dataManager.GetName(clicked_card->code));
mainGame->stQMessage->setText(wbuf);
mainGame->PopupElement(mainGame->wQuery);
} else {
DuelClient::SetResponseI(current_mset_param);
DuelClient::SendResponse();
}
break; break;
} }
} }
...@@ -1914,6 +1929,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1914,6 +1929,11 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
return true; return true;
break; break;
} }
case CHECKBOX_ASK_MSET: {
mainGame->gameConf.ask_mset = mainGame->chkAskMSet->isChecked() ? 1 : 0;
return true;
break;
}
} }
break; break;
} }
......
...@@ -348,6 +348,9 @@ bool Game::Initialize() { ...@@ -348,6 +348,9 @@ bool Game::Initialize() {
chkDrawSingleChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_DRAW_SINGLE_CHAIN, dataManager.GetSysString(1287)); chkDrawSingleChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_DRAW_SINGLE_CHAIN, dataManager.GetSysString(1287));
chkDrawSingleChain->setChecked(gameConf.draw_single_chain != 0); chkDrawSingleChain->setChecked(gameConf.draw_single_chain != 0);
posY += 30; posY += 30;
chkAskMSet = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_ASK_MSET, dataManager.GetSysString(1268));
chkAskMSet->setChecked(gameConf.ask_mset != 0);
posY += 30;
chkAutoSaveReplay = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1366)); chkAutoSaveReplay = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1366));
chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0); chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0);
elmTabHelperLast = chkAutoSaveReplay; elmTabHelperLast = chkAutoSaveReplay;
...@@ -1353,6 +1356,8 @@ bool Game::LoadConfigFromFile(const char* file) { ...@@ -1353,6 +1356,8 @@ bool Game::LoadConfigFromFile(const char* file) {
gameConf.draw_single_chain = atoi(valbuf); gameConf.draw_single_chain = atoi(valbuf);
} else if(!strcmp(strbuf, "prefer_expansion_script")) { } else if(!strcmp(strbuf, "prefer_expansion_script")) {
gameConf.prefer_expansion_script = atoi(valbuf); gameConf.prefer_expansion_script = atoi(valbuf);
} else if(!strcmp(strbuf, "ask_mset")) {
gameConf.ask_mset = atoi(valbuf);
} else if(!strcmp(strbuf, "window_maximized")) { } else if(!strcmp(strbuf, "window_maximized")) {
gameConf.window_maximized = atoi(valbuf) > 0; gameConf.window_maximized = atoi(valbuf) > 0;
} else if(!strcmp(strbuf, "window_width")) { } else if(!strcmp(strbuf, "window_width")) {
...@@ -1443,6 +1448,7 @@ void Game::LoadConfig() { ...@@ -1443,6 +1448,7 @@ void Game::LoadConfig() {
gameConf.auto_save_replay = 0; gameConf.auto_save_replay = 0;
gameConf.draw_single_chain = 0; gameConf.draw_single_chain = 0;
gameConf.prefer_expansion_script = 0; gameConf.prefer_expansion_script = 0;
gameConf.ask_mset = 0;
gameConf.enable_sound = true; gameConf.enable_sound = true;
gameConf.sound_volume = 0.5; gameConf.sound_volume = 0.5;
gameConf.enable_music = true; gameConf.enable_music = true;
...@@ -1579,6 +1585,7 @@ void Game::SaveConfig() { ...@@ -1579,6 +1585,7 @@ void Game::SaveConfig() {
fprintf(fp, "auto_save_replay = %d\n", (chkAutoSaveReplay->isChecked() ? 1 : 0)); fprintf(fp, "auto_save_replay = %d\n", (chkAutoSaveReplay->isChecked() ? 1 : 0));
fprintf(fp, "draw_single_chain = %d\n", gameConf.draw_single_chain); fprintf(fp, "draw_single_chain = %d\n", gameConf.draw_single_chain);
fprintf(fp, "prefer_expansion_script = %d\n", gameConf.prefer_expansion_script); fprintf(fp, "prefer_expansion_script = %d\n", gameConf.prefer_expansion_script);
fprintf(fp, "ask_mset = %d\n", gameConf.ask_mset);
fprintf(fp, "window_maximized = %d\n", (gameConf.window_maximized ? 1 : 0)); fprintf(fp, "window_maximized = %d\n", (gameConf.window_maximized ? 1 : 0));
fprintf(fp, "window_width = %d\n", gameConf.window_width); fprintf(fp, "window_width = %d\n", gameConf.window_width);
fprintf(fp, "window_height = %d\n", gameConf.window_height); fprintf(fp, "window_height = %d\n", gameConf.window_height);
......
...@@ -62,6 +62,7 @@ struct Config { ...@@ -62,6 +62,7 @@ struct Config {
int auto_save_replay; int auto_save_replay;
int draw_single_chain; int draw_single_chain;
int prefer_expansion_script; int prefer_expansion_script;
int ask_mset;
bool enable_sound; bool enable_sound;
bool enable_music; bool enable_music;
double sound_volume; double sound_volume;
...@@ -332,6 +333,7 @@ public: ...@@ -332,6 +333,7 @@ public:
irr::gui::IGUICheckBox* chkQuickAnimation; irr::gui::IGUICheckBox* chkQuickAnimation;
irr::gui::IGUICheckBox* chkAutoSaveReplay; irr::gui::IGUICheckBox* chkAutoSaveReplay;
irr::gui::IGUICheckBox* chkDrawSingleChain; irr::gui::IGUICheckBox* chkDrawSingleChain;
irr::gui::IGUICheckBox* chkAskMSet;
irr::gui::IGUIWindow* tabSystem; irr::gui::IGUIWindow* tabSystem;
irr::gui::IGUIElement* elmTabSystemLast; irr::gui::IGUIElement* elmTabSystemLast;
irr::gui::IGUIScrollBar* scrTabSystem; irr::gui::IGUIScrollBar* scrTabSystem;
...@@ -846,6 +848,7 @@ extern time_t pre_seed[3]; ...@@ -846,6 +848,7 @@ extern time_t pre_seed[3];
#define CHECKBOX_DRAW_SINGLE_CHAIN 374 #define CHECKBOX_DRAW_SINGLE_CHAIN 374
#define CHECKBOX_REGEX 375 #define CHECKBOX_REGEX 375
#define COMBOBOX_LOCALE 376 #define COMBOBOX_LOCALE 376
#define CHECKBOX_ASK_MSET 377
#define BUTTON_BIG_CARD_CLOSE 380 #define BUTTON_BIG_CARD_CLOSE 380
#define BUTTON_BIG_CARD_ZOOM_IN 381 #define BUTTON_BIG_CARD_ZOOM_IN 381
......
Subproject commit f718950d0326b127ee75db48e4a3f93342a5d48c Subproject commit 9895a5da2ee82f17ac898d8c495bde4f777e1484
Subproject commit bf2c74c256281add690f1e9f488b84acde5c74e4 Subproject commit 7cbcd346ace1c116d1e90e2d1d1e1e68e25ec98e
...@@ -317,6 +317,7 @@ ...@@ -317,6 +317,7 @@
!system 1262 大师规则3 !system 1262 大师规则3
!system 1263 新大师规则 !system 1263 新大师规则
!system 1264 大师规则2020 !system 1264 大师规则2020
!system 1268 盖放怪兽前询问
!system 1269 数字灵摆图片 !system 1269 数字灵摆图片
!system 1270 卡片信息 !system 1270 卡片信息
!system 1271 消息记录 !system 1271 消息记录
...@@ -401,6 +402,7 @@ ...@@ -401,6 +402,7 @@
!system 1351 投降 !system 1351 投降
!system 1352 主要信息: !system 1352 主要信息:
!system 1353 播放起始于回合: !system 1353 播放起始于回合:
!system 1355 是否确定盖放[%ls]?
!system 1356 是否要放弃对卡组的修改? !system 1356 是否要放弃对卡组的修改?
!system 1357 不提示保留对卡组的修改 !system 1357 不提示保留对卡组的修改
!system 1358 键入关键字后自动进行搜索 !system 1358 键入关键字后自动进行搜索
...@@ -629,6 +631,7 @@ ...@@ -629,6 +631,7 @@
!counter 0x55 指示物(隐居者的大釜) !counter 0x55 指示物(隐居者的大釜)
!counter 0x56 炎星指示物 !counter 0x56 炎星指示物
!counter 0x57 幻魔指示物 !counter 0x57 幻魔指示物
!counter 0x58 指示物(祢须三破鸣比)
#setnames, using tab for comment #setnames, using tab for comment
!setname 0x1 正义盟军 AOJ !setname 0x1 正义盟军 AOJ
!setname 0x2 次世代 ジェネクス !setname 0x2 次世代 ジェネクス
...@@ -1055,8 +1058,12 @@ ...@@ -1055,8 +1058,12 @@
!setname 0x14b 机块 機塊 !setname 0x14b 机块 機塊
#setname 0x14c 灵术 霊術 #setname 0x14c 灵术 霊術
!setname 0x314c 地灵术 地霊術 !setname 0x314c 地灵术 地霊術
#setname 0x514c 水灵术 水霊術 !setname 0x514c 水灵术 水霊術
!setname 0x614c 火灵术 火霊術 !setname 0x614c 火灵术 火霊術
#setname 0x914c 风灵术 風霊術 !setname 0x914c 风灵术 風霊術
#setname 0xa14c 光灵术 光霊術 #setname 0xa14c 光灵术 光霊術
#setname 0xc14c 暗灵术 闇霊術 #setname 0xc14c 暗灵术 闇霊術
!setname 0x14d 铁兽 トライブリゲード
!setname 0x14e 电脑堺 電脳堺
!setname 0x114e 电脑堺门 電脳堺門
!setname 0x14f 双天
...@@ -39,6 +39,8 @@ bot_deck_path = ./windbot/Decks ...@@ -39,6 +39,8 @@ bot_deck_path = ./windbot/Decks
quick_animation = 1 quick_animation = 1
auto_save_replay = 1 auto_save_replay = 1
draw_single_chain = 0 draw_single_chain = 0
prefer_expansion_script = 1
ask_mset = 0
window_maximized = 0 window_maximized = 0
window_width = 1024 window_width = 1024
window_height = 640 window_height = 640
......
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