Commit 90e3e062 authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/Fluorohydride/ygopro

parents c15f7146 06153523
...@@ -250,7 +250,7 @@ const wchar_t* DataManager::FormatRace(int race) { ...@@ -250,7 +250,7 @@ const wchar_t* DataManager::FormatRace(int race) {
wchar_t* p = racBuffer; wchar_t* p = racBuffer;
unsigned filter = 1; unsigned filter = 1;
int i = 1020; int i = 1020;
for(; filter != 0x1000000; filter <<= 1, ++i) { for(; filter != 0x2000000; filter <<= 1, ++i) {
if(race & filter) { if(race & filter) {
BufferIO::CopyWStrRef(GetSysString(i), p, 16); BufferIO::CopyWStrRef(GetSysString(i), p, 16);
*p = L'|'; *p = L'|';
...@@ -267,7 +267,7 @@ const wchar_t* DataManager::FormatType(int type) { ...@@ -267,7 +267,7 @@ const wchar_t* DataManager::FormatType(int type) {
wchar_t* p = tpBuffer; wchar_t* p = tpBuffer;
unsigned filter = 1; unsigned filter = 1;
int i = 1050; int i = 1050;
for(; filter != 0x2000000; filter <<= 1, ++i) { for(; filter != 0x4000000; filter <<= 1, ++i) {
if(type & filter) { if(type & filter) {
BufferIO::CopyWStrRef(GetSysString(i), p, 16); BufferIO::CopyWStrRef(GetSysString(i), p, 16);
*p = L'|'; *p = L'|';
......
...@@ -319,6 +319,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -319,6 +319,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->cbCardType2->addItem(dataManager.GetSysString(1063), TYPE_MONSTER + TYPE_SYNCHRO); mainGame->cbCardType2->addItem(dataManager.GetSysString(1063), TYPE_MONSTER + TYPE_SYNCHRO);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1073), TYPE_MONSTER + TYPE_XYZ); mainGame->cbCardType2->addItem(dataManager.GetSysString(1073), TYPE_MONSTER + TYPE_XYZ);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1074), TYPE_MONSTER + TYPE_PENDULUM); mainGame->cbCardType2->addItem(dataManager.GetSysString(1074), TYPE_MONSTER + TYPE_PENDULUM);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1075), TYPE_MONSTER + TYPE_SPSUMMON);
myswprintf(normaltuner, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1062)); myswprintf(normaltuner, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1062));
mainGame->cbCardType2->addItem(normaltuner, TYPE_MONSTER + TYPE_NORMAL + TYPE_TUNER); mainGame->cbCardType2->addItem(normaltuner, TYPE_MONSTER + TYPE_NORMAL + TYPE_TUNER);
myswprintf(normalpen, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1074)); myswprintf(normalpen, L"%ls|%ls", dataManager.GetSysString(1054), dataManager.GetSysString(1074));
......
...@@ -2906,7 +2906,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2906,7 +2906,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
/*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf)); /*int player = */mainGame->LocalPlayer(BufferIO::ReadInt8(pbuf));
mainGame->dField.announce_count = BufferIO::ReadInt8(pbuf); mainGame->dField.announce_count = BufferIO::ReadInt8(pbuf);
int available = BufferIO::ReadInt32(pbuf); int available = BufferIO::ReadInt32(pbuf);
for(int i = 0, filter = 0x1; i < 24; ++i, filter <<= 1) { for(int i = 0, filter = 0x1; i < 25; ++i, filter <<= 1) {
mainGame->chkRace[i]->setChecked(false); mainGame->chkRace[i]->setChecked(false);
if(filter & available) if(filter & available)
mainGame->chkRace[i]->setVisible(true); mainGame->chkRace[i]->setVisible(true);
...@@ -3221,7 +3221,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3221,7 +3221,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
ClientCard* ccard = mainGame->dField.hand[p][seq]; ClientCard* ccard = mainGame->dField.hand[p][seq];
mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true); mainGame->dField.GetCardLocation(ccard, &ccard->curPos, &ccard->curRot, true);
} }
val = BufferIO::ReadInt8(pbuf); val = BufferIO::ReadInt8(pbuf);
for(int seq = 0; seq < val; ++seq) { for(int seq = 0; seq < val; ++seq) {
ClientCard* ccard = new ClientCard; ClientCard* ccard = new ClientCard;
......
...@@ -869,7 +869,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -869,7 +869,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
case CHECK_RACE: { case CHECK_RACE: {
int rac = 0, filter = 0x1, count = 0; int rac = 0, filter = 0x1, count = 0;
for(int i = 0; i < 24; ++i, filter <<= 1) { for(int i = 0; i < 25; ++i, filter <<= 1) {
if(mainGame->chkRace[i]->isChecked()) { if(mainGame->chkRace[i]->isChecked()) {
rac |= filter; rac |= filter;
count++; count++;
...@@ -959,7 +959,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -959,7 +959,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->stCardPos[i]->setBackgroundColor(0xffffff00); mainGame->stCardPos[i]->setBackgroundColor(0xffffff00);
else if(selectable_cards[i + pos]->overlayTarget->controler) else if(selectable_cards[i + pos]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} else if(selectable_cards[i + pos]->location == LOCATION_DECK || selectable_cards[i + pos]->location == LOCATION_EXTRA || selectable_cards[i + pos]->location == LOCATION_REMOVED) { } else if(selectable_cards[i + pos]->location == LOCATION_DECK || selectable_cards[i + pos]->location == LOCATION_EXTRA || selectable_cards[i + pos]->location == LOCATION_REMOVED) {
if(selectable_cards[i + pos]->position & POS_FACEDOWN) if(selectable_cards[i + pos]->position & POS_FACEDOWN)
...@@ -968,14 +968,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -968,14 +968,14 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->stCardPos[i]->setBackgroundColor(0xffffff00); mainGame->stCardPos[i]->setBackgroundColor(0xffffff00);
else if(selectable_cards[i + pos]->controler) else if(selectable_cards[i + pos]->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} else { } else {
if(selectable_cards[i + pos]->is_selected) if(selectable_cards[i + pos]->is_selected)
mainGame->stCardPos[i]->setBackgroundColor(0xffffff00); mainGame->stCardPos[i]->setBackgroundColor(0xffffff00);
else if(selectable_cards[i + pos]->controler) else if(selectable_cards[i + pos]->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0); mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} }
} }
...@@ -1006,19 +1006,19 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1006,19 +1006,19 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
// BackgroundColor: controller of the xyz monster // BackgroundColor: controller of the xyz monster
if(display_cards[i + pos]->overlayTarget->controler) if(display_cards[i + pos]->overlayTarget->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else else
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
} else if(display_cards[i + pos]->location == LOCATION_EXTRA || display_cards[i + pos]->location == LOCATION_REMOVED) { } else if(display_cards[i + pos]->location == LOCATION_EXTRA || display_cards[i + pos]->location == LOCATION_REMOVED) {
if(display_cards[i + pos]->position & POS_FACEDOWN) if(display_cards[i + pos]->position & POS_FACEDOWN)
mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff); mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff);
if(display_cards[i + pos]->controler) if(display_cards[i + pos]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else else
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
} else { } else {
if(display_cards[i + pos]->controler) if(display_cards[i + pos]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0); mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else else
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
} }
} }
...@@ -1859,7 +1859,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1859,7 +1859,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->chain_when_avail = false; mainGame->chain_when_avail = false;
UpdateChainButtons(); UpdateChainButtons();
} }
break; break;
} }
default: default:
break; break;
......
...@@ -365,11 +365,11 @@ bool Game::Initialize() { ...@@ -365,11 +365,11 @@ bool Game::Initialize() {
for(int filter = 0x1, i = 0; i < 7; filter <<= 1, ++i) for(int filter = 0x1, i = 0; i < 7; filter <<= 1, ++i)
chkAttribute[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 80, 25 + (i / 4) * 25, 90 + (i % 4) * 80, 50 + (i / 4) * 25), chkAttribute[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 80, 25 + (i / 4) * 25, 90 + (i % 4) * 80, 50 + (i / 4) * 25),
wANAttribute, CHECK_ATTRIBUTE, dataManager.FormatAttribute(filter)); wANAttribute, CHECK_ATTRIBUTE, dataManager.FormatAttribute(filter));
//announce attribute //announce race
wANRace = env->addWindow(rect<s32>(480, 200, 850, 385), false, dataManager.GetSysString(563)); wANRace = env->addWindow(rect<s32>(480, 200, 850, 410), false, dataManager.GetSysString(563));
wANRace->getCloseButton()->setVisible(false); wANRace->getCloseButton()->setVisible(false);
wANRace->setVisible(false); wANRace->setVisible(false);
for(int filter = 0x1, i = 0; i < 24; filter <<= 1, ++i) for(int filter = 0x1, i = 0; i < 25; filter <<= 1, ++i)
chkRace[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25), chkRace[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25),
wANRace, CHECK_RACE, dataManager.FormatRace(filter)); wANRace, CHECK_RACE, dataManager.FormatRace(filter));
//selection hint //selection hint
...@@ -458,7 +458,7 @@ bool Game::Initialize() { ...@@ -458,7 +458,7 @@ bool Game::Initialize() {
cbRace = env->addComboBox(rect<s32>(60, 40 + 75 / 6, 190, 60 + 75 / 6), wFilter, -1); cbRace = env->addComboBox(rect<s32>(60, 40 + 75 / 6, 190, 60 + 75 / 6), wFilter, -1);
cbRace->setMaxSelectionRows(10); cbRace->setMaxSelectionRows(10);
cbRace->addItem(dataManager.GetSysString(1310), 0); cbRace->addItem(dataManager.GetSysString(1310), 0);
for(int filter = 0x1; filter != 0x1000000; filter <<= 1) for(int filter = 0x1; filter != 0x2000000; filter <<= 1)
cbRace->addItem(dataManager.FormatRace(filter), filter); cbRace->addItem(dataManager.FormatRace(filter), filter);
env->addStaticText(dataManager.GetSysString(1322), rect<s32>(205, 22 + 50 / 6, 280, 42 + 50 / 6), false, false, wFilter); env->addStaticText(dataManager.GetSysString(1322), rect<s32>(205, 22 + 50 / 6, 280, 42 + 50 / 6), false, false, wFilter);
ebAttack = env->addEditBox(L"", rect<s32>(260, 20 + 50 / 6, 340, 40 + 50 / 6), true, wFilter); ebAttack = env->addEditBox(L"", rect<s32>(260, 20 + 50 / 6, 340, 40 + 50 / 6), true, wFilter);
......
...@@ -322,7 +322,7 @@ public: ...@@ -322,7 +322,7 @@ public:
irr::gui::IGUICheckBox* chkAttribute[7]; irr::gui::IGUICheckBox* chkAttribute[7];
//announce race //announce race
irr::gui::IGUIWindow* wANRace; irr::gui::IGUIWindow* wANRace;
irr::gui::IGUICheckBox* chkRace[24]; irr::gui::IGUICheckBox* chkRace[25];
//cmd menu //cmd menu
irr::gui::IGUIWindow* wCmdMenu; irr::gui::IGUIWindow* wCmdMenu;
irr::gui::IGUIButton* btnActivate; irr::gui::IGUIButton* btnActivate;
......
Subproject commit 43b6c09c6cee315593bf81980c8bd4dc816d08a8 Subproject commit 3c1db2fc6f1427bb560ce8ac6858da509ac7f832
Subproject commit 2e9a71e3eca5862ae379287e497d5c4c6ca5d9af Subproject commit f809dfae2533fcbd65679982d09fabc5275033ba
...@@ -157,6 +157,7 @@ ...@@ -157,6 +157,7 @@
!system 1041 幻神兽 !system 1041 幻神兽
!system 1042 创造神 !system 1042 创造神
!system 1043 幻龙 !system 1043 幻龙
!system 1044 电子世界
!system 1050 怪兽 !system 1050 怪兽
!system 1051 魔法 !system 1051 魔法
!system 1052 陷阱 !system 1052 陷阱
...@@ -182,6 +183,7 @@ ...@@ -182,6 +183,7 @@
!system 1072 卡通 !system 1072 卡通
!system 1073 超量 !system 1073 超量
!system 1074 灵摆 !system 1074 灵摆
!system 1075 特殊召唤
!system 1080 (N/A) !system 1080 (N/A)
#GUI #GUI
!system 1100 魔陷破坏 !system 1100 魔陷破坏
......
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