Commit 9635e729 authored by nanahira's avatar nanahira

mg

parents 20dd62c2 777acaf7
No preview for this file type
...@@ -1088,7 +1088,7 @@ bool ClientField::ShowSelectSum(bool panelmode) { ...@@ -1088,7 +1088,7 @@ bool ClientField::ShowSelectSum(bool panelmode) {
select_ready = false; select_ready = false;
} }
if (select_ready) { if (select_ready) {
ShowCancelOrFinishButton(1); ShowCancelOrFinishButton(2);
} else { } else {
ShowCancelOrFinishButton(0); ShowCancelOrFinishButton(0);
} }
......
...@@ -55,8 +55,8 @@ public: ...@@ -55,8 +55,8 @@ public:
int select_max; int select_max;
int must_select_count; int must_select_count;
int select_sumval; int select_sumval;
int select_cancelable;
int select_mode; int select_mode;
bool select_cancelable;
bool select_panalmode; bool select_panalmode;
bool select_ready; bool select_ready;
int announce_count; int announce_count;
......
...@@ -501,7 +501,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -501,7 +501,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
else if(mainGame->wSinglePlay->isVisible()) else if(mainGame->wSinglePlay->isVisible())
mainGame->HideElement(mainGame->wSinglePlay); mainGame->HideElement(mainGame->wSinglePlay);
mainGame->ShowElement(mainGame->wHostPrepare); mainGame->ShowElement(mainGame->wHostPrepare);
mainGame->wChat->setVisible(true); //if(!mainGame->chkIgnore1->isChecked())
mainGame->wChat->setVisible(true);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->dInfo.duel_rule = pkt->info.duel_rule; mainGame->dInfo.duel_rule = pkt->info.duel_rule;
watching = 0; watching = 0;
...@@ -614,7 +615,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -614,7 +615,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
mainGame->btnEP->setVisible(false); mainGame->btnEP->setVisible(false);
mainGame->btnShuffle->setVisible(false); mainGame->btnShuffle->setVisible(false);
mainGame->scrFilter->setVisible(false); mainGame->scrFilter->setVisible(false);
mainGame->wChat->setVisible(true); //if(!mainGame->chkIgnore1->isChecked())
mainGame->wChat->setVisible(true);
mainGame->device->setEventReceiver(&mainGame->dField); mainGame->device->setEventReceiver(&mainGame->dField);
if(!mainGame->dInfo.isTag) { if(!mainGame->dInfo.isTag) {
if(selftype > 1) { if(selftype > 1) {
...@@ -774,11 +776,12 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -774,11 +776,12 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
STOC_Chat* pkt = (STOC_Chat*)pdata; STOC_Chat* pkt = (STOC_Chat*)pdata;
int player = pkt->player; int player = pkt->player;
if(player < 4) { if(player < 4) {
if(mainGame->chkIgnore1->isChecked())
break;
if(!mainGame->dInfo.isTag) { if(!mainGame->dInfo.isTag) {
if(mainGame->dInfo.isStarted) if(mainGame->dInfo.isStarted) {
player = mainGame->LocalPlayer(player); player = mainGame->LocalPlayer(player);
if(player == 1 && mainGame->chkIgnore1->isChecked())
break;
}
} else { } else {
if(mainGame->dInfo.isStarted && !mainGame->dInfo.isFirst) if(mainGame->dInfo.isStarted && !mainGame->dInfo.isFirst)
player ^= 2; player ^= 2;
...@@ -792,6 +795,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) { ...@@ -792,6 +795,8 @@ void DuelClient::HandleSTOCPacketLan(char* data, unsigned int len) {
player = 3; player = 3;
else else
player = 10; player = 10;
if(mainGame->dInfo.isStarted && (player == 1 || player == 3) && mainGame->chkIgnore1->isChecked())
break;
} }
} else { } else {
if(player == 8) { //system custom message. if(player == 8) { //system custom message.
...@@ -1448,7 +1453,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1448,7 +1453,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} }
case MSG_SELECT_CARD: { case MSG_SELECT_CARD: {
/*int selecting_player = */BufferIO::ReadInt8(pbuf); /*int selecting_player = */BufferIO::ReadInt8(pbuf);
mainGame->dField.select_cancelable = BufferIO::ReadInt8(pbuf); mainGame->dField.select_cancelable = BufferIO::ReadInt8(pbuf) != 0;
mainGame->dField.select_min = BufferIO::ReadInt8(pbuf); mainGame->dField.select_min = BufferIO::ReadInt8(pbuf);
mainGame->dField.select_max = BufferIO::ReadInt8(pbuf); mainGame->dField.select_max = BufferIO::ReadInt8(pbuf);
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
...@@ -1509,8 +1514,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1509,8 +1514,9 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} }
case MSG_SELECT_UNSELECT_CARD: { case MSG_SELECT_UNSELECT_CARD: {
/*int selecting_player = */BufferIO::ReadInt8(pbuf); /*int selecting_player = */BufferIO::ReadInt8(pbuf);
bool buttonok = !!BufferIO::ReadInt8(pbuf); bool finishable = BufferIO::ReadInt8(pbuf) != 0;
mainGame->dField.select_cancelable = BufferIO::ReadInt8(pbuf); bool cancelable = BufferIO::ReadInt8(pbuf) != 0;
mainGame->dField.select_cancelable = finishable || cancelable;
mainGame->dField.select_min = BufferIO::ReadInt8(pbuf); mainGame->dField.select_min = BufferIO::ReadInt8(pbuf);
mainGame->dField.select_max = BufferIO::ReadInt8(pbuf); mainGame->dField.select_max = BufferIO::ReadInt8(pbuf);
int count1 = BufferIO::ReadInt8(pbuf); int count1 = BufferIO::ReadInt8(pbuf);
...@@ -1577,19 +1583,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1577,19 +1583,20 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if (panelmode) { if (panelmode) {
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->wCardSelect->setText(textBuffer); mainGame->wCardSelect->setText(textBuffer);
mainGame->dField.ShowSelectCard(buttonok); mainGame->dField.ShowSelectCard(mainGame->dField.select_cancelable);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
} else { } else {
mainGame->stHintMsg->setText(textBuffer); mainGame->stHintMsg->setText(textBuffer);
mainGame->stHintMsg->setVisible(true); mainGame->stHintMsg->setVisible(true);
} }
if (mainGame->dField.select_cancelable) { if (mainGame->dField.select_cancelable) {
if (count2 == 0) if(finishable) {
mainGame->dField.ShowCancelOrFinishButton(1);
else {
mainGame->dField.select_ready = true; mainGame->dField.select_ready = true;
mainGame->dField.ShowCancelOrFinishButton(2); mainGame->dField.ShowCancelOrFinishButton(2);
} }
else {
mainGame->dField.ShowCancelOrFinishButton(1);
}
} }
else else
mainGame->dField.ShowCancelOrFinishButton(0); mainGame->dField.ShowCancelOrFinishButton(0);
...@@ -1807,7 +1814,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1807,7 +1814,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} }
case MSG_SELECT_TRIBUTE: { case MSG_SELECT_TRIBUTE: {
/*int selecting_player = */BufferIO::ReadInt8(pbuf); /*int selecting_player = */BufferIO::ReadInt8(pbuf);
mainGame->dField.select_cancelable = BufferIO::ReadInt8(pbuf) ? true : false; mainGame->dField.select_cancelable = BufferIO::ReadInt8(pbuf) != 0;
mainGame->dField.select_min = BufferIO::ReadInt8(pbuf); mainGame->dField.select_min = BufferIO::ReadInt8(pbuf);
mainGame->dField.select_max = BufferIO::ReadInt8(pbuf); mainGame->dField.select_max = BufferIO::ReadInt8(pbuf);
int count = BufferIO::ReadInt8(pbuf); int count = BufferIO::ReadInt8(pbuf);
......
...@@ -464,6 +464,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -464,6 +464,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
list_command = COMMAND_SPSUMMON; list_command = COMMAND_SPSUMMON;
mainGame->wCardSelect->setText(dataManager.GetSysString(509)); mainGame->wCardSelect->setText(dataManager.GetSysString(509));
ShowSelectCard(); ShowSelectCard();
select_ready = false;
ShowCancelOrFinishButton(1); ShowCancelOrFinishButton(1);
} }
break; break;
...@@ -1810,6 +1811,16 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1810,6 +1811,16 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break; break;
} }
#endif #endif
case CHECKBOX_DISABLE_CHAT: {
bool show = !mainGame->is_building;
mainGame->wChat->setVisible(show);
/*
if(!show)
mainGame->ClearChatMsg();
*/
return true;
break;
}
} }
break; break;
} }
......
...@@ -47,7 +47,7 @@ bool Game::Initialize() { ...@@ -47,7 +47,7 @@ bool Game::Initialize() {
if(gameConf.skin_index < 0) if(gameConf.skin_index < 0)
index = rand() % count; index = rand() % count;
else if((size_t)gameConf.skin_index <= skins.size()) else if((size_t)gameConf.skin_index <= skins.size())
index = gameConf.skin_index - 1; index = skins.size() - gameConf.skin_index; // reverse index
if(index >= 0) if(index >= 0)
skinSystem->applySkin(skins[index].c_str()); skinSystem->applySkin(skins[index].c_str());
} }
...@@ -289,7 +289,7 @@ bool Game::Initialize() { ...@@ -289,7 +289,7 @@ bool Game::Initialize() {
//system //system
irr::gui::IGUITab* tabSystem = wInfos->addTab(dataManager.GetSysString(1273)); irr::gui::IGUITab* tabSystem = wInfos->addTab(dataManager.GetSysString(1273));
posY = 20; posY = 20;
chkIgnore1 = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1290)); chkIgnore1 = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_DISABLE_CHAT, dataManager.GetSysString(1290));
chkIgnore1->setChecked(gameConf.chkIgnore1 != 0); chkIgnore1->setChecked(gameConf.chkIgnore1 != 0);
posY += 30; posY += 30;
chkIgnore2 = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1291)); chkIgnore2 = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1291));
...@@ -1540,6 +1540,11 @@ void Game::AddChatMsg(wchar_t* msg, int player) { ...@@ -1540,6 +1540,11 @@ void Game::AddChatMsg(wchar_t* msg, int player) {
} }
chatMsg[0].append(msg); chatMsg[0].append(msg);
} }
void Game::ClearChatMsg() {
for(int i = 7; i >= 0; --i) {
chatTiming[i] = 0;
}
}
void Game::AddDebugMsg(char* msg) void Game::AddDebugMsg(char* msg)
{ {
if (enable_log & 0x1) { if (enable_log & 0x1) {
......
...@@ -145,6 +145,7 @@ public: ...@@ -145,6 +145,7 @@ public:
void SaveConfig(); void SaveConfig();
void ShowCardInfo(int code, bool resize = false); void ShowCardInfo(int code, bool resize = false);
void AddChatMsg(wchar_t* msg, int player); void AddChatMsg(wchar_t* msg, int player);
void ClearChatMsg();
void AddDebugMsg(char* msgbuf); void AddDebugMsg(char* msgbuf);
void ClearTextures(); void ClearTextures();
void CloseDuelWindow(); void CloseDuelWindow();
...@@ -666,6 +667,7 @@ extern Game* mainGame; ...@@ -666,6 +667,7 @@ extern Game* mainGame;
#define CHECKBOX_ENABLE_SOUND 361 #define CHECKBOX_ENABLE_SOUND 361
#define CHECKBOX_ENABLE_MUSIC 362 #define CHECKBOX_ENABLE_MUSIC 362
#define SCROLL_VOLUME 363 #define SCROLL_VOLUME 363
#define CHECKBOX_DISABLE_CHAT 364
#define COMBOBOX_SORTTYPE 370 #define COMBOBOX_SORTTYPE 370
#define COMBOBOX_LIMIT 371 #define COMBOBOX_LIMIT 371
......
Subproject commit b38256f356997ff8dc2f361f357d5193f7acf46b Subproject commit 482e002181d7a007ffe04d4bb8cb4a8b5e4d2e28
Subproject commit 57e5a9c68d9abc95fda4b0fdb60b69a5d5aacce2 Subproject commit 63aa6c77dae13e742d43f92528ca7a84ec80b7d8
Open [Your ygopro folder]\system.conf with a text editor.
Change the following settings:
use_d3d = 1
use_skin = 1
To make your own skin just replace the images in this skin folder.
\ No newline at end of file
<?xml version="1.0"?>
<!--r-->
<Skin>
<Properties>
<Name data="Win8" />
<Author data="247321453" />
<Version data="1.0" />
<Date data="13-Jan-2010"/>
<Desc data="A skin that looks like Windows 8"/>
<Fallback skin="EGST_WINDOWS_CLASSIC" />
<Font texture="fontTahoma.png" />
</Properties>
<Global guialpha="255">
<!--<EGDC_3D_DARK_SHADOW a="255" r="255" g="255" b="255" /> --> <!-- Dark shadow for three-dimensional display elements. -->
<!--<EGDC_3D_SHADOW a="255" r="255" g="255" b="255" /> --> <!-- Shadow color for three-dimensional display elements (for edges facing away from the light source). -->
<EGDC_3D_FACE a="255" r="215" g="225" b="235" /> <!-- 界面,按钮颜色-->
<!--<EGDC_3D_HIGH_LIGHT a="255" r="255" g="255" b="255" /> --> <!-- Highlight color for three-dimensional display elements (for edges facing the light source.). -->
<!--<EGDC_3D_LIGHT a="255" r="255" g="255" b="255" /> --> <!-- Light color for three-dimensional display elements (for edges facing the light source.). -->
<!--<EGDC_ACTIVE_BORDER a="255" r="255" g="0" b="0" />--> <!-- Active window border. -->
<EGDC_ACTIVE_CAPTION a="255" r="255" g="255" b="0" /> <!-- 标题颜色 -->
<!--<EGDC_APP_WORKSPACE a="255" r="255" g="255" b="255" />--> <!-- Background color of multiple document interface (MDI) applications. -->
<!--<EGDC_BUTTON_TEXT a="255" r="255" g="255" b="255" /> --> <!-- Text on a button. -->
<EGDC_GRAY_TEXT a="255" r="0" g="0" b="0" /> <!-- 不能点的选项颜色 -->
<!--<EGDC_HIGH_LIGHT a="255" r="255" g="255" b="255" /> --> <!-- Item(s) selected in a control. -->
<EGDC_HIGH_LIGHT_TEXT a="255" r="255" g="255" b="0" /> <!-- 选项的选中颜色 -->
<!--<EGDC_INACTIVE_BORDER a="150" r="255" g="255" b="255" /> --> <!-- Inactive window border. -->
<!--<EGDC_INACTIVE_CAPTION a="150" r="255" g="255" b="255" /> --> <!-- Inactive window caption. -->
<!--<EGDC_TOOLTIP a="150" r="255" g="255" b="255" /> --> <!-- Tool tip text color. -->
<!--<EGDC_TOOLTIP_BACKGROUND a="150" r="255" g="255" b="255" /> --> <!-- Tool tip background color. -->
<!--<EGDC_SCROLLBAR a="150" r="255" g="255" b="255" /> --> <!-- Scrollbar gray area. This ONLY applies to the default scrollbar, if you want to change the colors of the graphical one, change the color attributes in the section near the bottom -->
<EGDC_WINDOW a="240" r="255" g="255" b="255" /> <!-- 输入框颜色 -->
<EGDC_WINDOW_SYMBOL a="255" r="0" g="0" b="0" /> <!-- 关闭按钮,选项按钮颜色-->
<!--<EGDC_ICON a="255" r="255" g="255" b="255" /> --> <!-- Icons in a list or tree. -->
<!--<EGDC_ICON_HIGH_LIGHT a="255" r="255" g="255" b="255" /> --> <!-- Selected icons in a list or tree. -->
<Caption tbardistancex="2" tbardistancey="9" />
<WindowButton width="24" />
<CheckBoxColor a="255" r="33" g="161" b="33" />
</Global>
<Button texture="button.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Pressed texture="ButtonPressed.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color a="250" r="255" g="255" b="255" />
</Pressed>
<ButtonDisabled texture="ButtonDisabled.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
</ButtonDisabled>
</Button>
<MenuBar texture="MenuBar.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<MenuPane texture="MenuPane.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</MenuPane>
<MenuPressed texture="MenuPressed.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color r="255" g="255" b="255" a="255" />
</MenuPressed>
</MenuBar>
<CheckBox texture="CheckBox.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
<CheckBoxDisabled texture="CheckBoxDisabled.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
</CheckBoxDisabled>
</CheckBox>
<ComboBox texture="sunkenpane.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
<ComboBoxDisabled texture="CheckBoxDisabled.png">
<SrcBorder tlx="1" tly="1" brx="1" bry="1" />
<DstBorder tlx="1" tly="1" brx="1" bry="1" />
</ComboBoxDisabled>
</ComboBox>
<SunkenPane texture="sunkenpane.png">
<SrcBorder tlx="10" tly="10" brx="10" bry="10" />
<DstBorder tlx="10" tly="10" brx="10" bry="10" />
</SunkenPane>
<TabControl texture="TabControl.png">
<SrcBorder tlx="10" tly="10" brx="10" bry="10" />
<DstBorder tlx="10" tly="10" brx="10" bry="10" />
<TabButton texture="TabButton.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
<Color a="200" r="255" g="255" b="255" />
</TabButton>
<TabButtonPressed texture="TabButtonPressed.png">
<SrcBorder tlx="3" tly="3" brx="3" bry="3" />
<DstBorder tlx="3" tly="3" brx="3" bry="3" />
</TabButtonPressed>
</TabControl>
<Window texture="windowbg.png">
<SrcBorder tlx="25" tly="10" brx="10" bry="10" />
<DstBorder tlx="25" tly="10" brx="10" bry="10" />
</Window>
<ProgressBar texture="gauge1.png">
<SrcBorder tlx="16" tly="16" brx="16" bry="16" />
<DstBorder tlx="16" tly="16" brx="16" bry="16" />
<Color a="150" r="255" g="255" b="255"/>
<Filled texture="gauge2.png">
<SrcBorder tlx="16" tly="16" brx="16" bry="16" />
<DstBorder tlx="16" tly="16" brx="16" bry="16" />
<Color a="255" r="255" g="255" b="255" />
</Filled>
</ProgressBar>
</Skin>
...@@ -535,6 +535,7 @@ ...@@ -535,6 +535,7 @@
!counter 0x1045 鳞粉指示物 !counter 0x1045 鳞粉指示物
!counter 0x46 指示物(刚鬼死斗) !counter 0x46 指示物(刚鬼死斗)
!counter 0x47 指示物(限制代码) !counter 0x47 指示物(限制代码)
!counter 0x48 指示物(连接死亡炮塔)
#setnames, using tab for comment #setnames, using tab for comment
!setname 0x1 正义盟军 AOJ !setname 0x1 正义盟军 AOJ
!setname 0x2 次世代 ジェネクス !setname 0x2 次世代 ジェネクス
...@@ -897,4 +898,3 @@ ...@@ -897,4 +898,3 @@
!setname 0x1115 闪刀姬 閃刀姫 !setname 0x1115 闪刀姬 閃刀姫
!setname 0x116 圣像骑士 パラディオン !setname 0x116 圣像骑士 パラディオン
!setname 0x117 魔神仪 魔神儀 !setname 0x117 魔神仪 魔神儀
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