Commit 9a1f83d4 authored by DailyShana's avatar DailyShana

format

parent e005135b
......@@ -389,8 +389,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
if(selectable_cards[i]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
}
else {
} else {
if(selectable_cards[i]->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
......@@ -412,8 +411,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
}
mainGame->scrCardList->setPos(0);
mainGame->scrCardList->setVisible(false);
}
else {
} else {
mainGame->scrCardList->setVisible(true);
mainGame->scrCardList->setMin(0);
mainGame->scrCardList->setMax((selectable_cards.size() - 5) * 10 + 9);
......@@ -451,8 +449,7 @@ void ClientField::ShowChainCard() {
if(selectable_cards[i]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
}
else {
} else {
if(selectable_cards[i]->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
......@@ -467,8 +464,7 @@ void ClientField::ShowChainCard() {
}
mainGame->scrCardList->setPos(0);
mainGame->scrCardList->setVisible(false);
}
else {
} else {
mainGame->scrCardList->setVisible(true);
mainGame->scrCardList->setMin(0);
mainGame->scrCardList->setMax((selectable_cards.size() - 5) * 10 + 9);
......@@ -512,8 +508,7 @@ void ClientField::ShowLocationCard() {
if(display_cards[i]->overlayTarget->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
}
else {
} else {
if(display_cards[i]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
......@@ -528,8 +523,7 @@ void ClientField::ShowLocationCard() {
}
mainGame->scrDisplayList->setPos(0);
mainGame->scrDisplayList->setVisible(false);
}
else {
} else {
mainGame->scrDisplayList->setVisible(true);
mainGame->scrDisplayList->setMin(0);
mainGame->scrDisplayList->setMax((display_cards.size() - 5) * 10 + 9);
......
......@@ -990,8 +990,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if (pcard->location == LOCATION_DECK) {
pcard->SetCode(code);
mainGame->dField.deck_act = true;
}
else if (pcard->location == LOCATION_GRAVE)
} else if (pcard->location == LOCATION_GRAVE)
mainGame->dField.grave_act = true;
else if (pcard->location == LOCATION_REMOVED)
mainGame->dField.remove_act = true;
......@@ -1063,8 +1062,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
if (BufferIO::ReadInt8(pbuf)) {
mainGame->btnShuffle->setVisible(true);
}
else {
} else {
mainGame->btnShuffle->setVisible(false);
}
return false;
......@@ -1202,8 +1200,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
pcard->chain_code = code % 1000000000;
mainGame->dField.conti_cards.push_back(pcard);
mainGame->dField.remove_act = true;
}
else {
} else {
pcard->chain_code = code;
pcard->is_selectable = true;
pcard->cmdFlag |= COMMAND_ACTIVATE;
......
......@@ -738,8 +738,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else if(selectable_cards[i + pos]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
}
else {
} else {
if(selectable_cards[i + pos]->is_selected)
mainGame->stCardPos[i]->setBackgroundColor(0xffffff00);
else if(selectable_cards[i + pos]->controler)
......@@ -762,8 +761,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
myswprintf(formatBuffer, L"%ls[%d](%d)",
dataManager.FormatLocation(display_cards[i + pos]->overlayTarget->location, display_cards[i + pos]->overlayTarget->sequence),
display_cards[i + pos]->overlayTarget->sequence + 1, display_cards[i + pos]->sequence + 1);
}
else
} else
myswprintf(formatBuffer, L"%ls[%d]", dataManager.FormatLocation(display_cards[i + pos]->location, display_cards[i + pos]->sequence),
display_cards[i + pos]->sequence + 1);
mainGame->stDisplayPos[i]->setText(formatBuffer);
......@@ -773,8 +771,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if(display_cards[i + pos]->overlayTarget->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
}
else {
} else {
if(display_cards[i + pos]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
......
......@@ -878,12 +878,10 @@ void Game::LoadConfig() {
if (!strcmp(strbuf, "nickname")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.nickname, 20);
}
else if (!strcmp(strbuf, "gamename")) {
} else if (!strcmp(strbuf, "gamename")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.gamename, 20);
}
else if (!strcmp(strbuf, "lastdeck")) {
} else if (!strcmp(strbuf, "lastdeck")) {
BufferIO::DecodeUTF8(valbuf, wstr);
BufferIO::CopyWStr(wstr, gameConf.lastdeck, 64);
}
......
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