Commit ec176599 authored by salix5's avatar salix5

DEFENCE->DEFENSE

parent e4b8fe8c
......@@ -100,7 +100,7 @@ void ClientCard::UpdateInfo(char* buf) {
} else
myswprintf(atkstring, L"%d", attack);
}
if(flag & QUERY_DEFENCE) {
if(flag & QUERY_DEFENSE) {
defense = BufferIO::ReadInt32(buf);
if(defense < 0) {
defstring[0] = '?';
......@@ -110,7 +110,7 @@ void ClientCard::UpdateInfo(char* buf) {
}
if(flag & QUERY_BASE_ATTACK)
base_attack = BufferIO::ReadInt32(buf);
if(flag & QUERY_BASE_DEFENCE)
if(flag & QUERY_BASE_DEFENSE)
base_defense = BufferIO::ReadInt32(buf);
if(flag & QUERY_REASON)
reason = BufferIO::ReadInt32(buf);
......
......@@ -91,7 +91,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
pcard->controler = player;
pcard->location = 0x40;
pcard->sequence = i;
pcard->position = POS_FACEDOWN_DEFENCE;
pcard->position = POS_FACEDOWN_DEFENSE;
GetCardLocation(pcard, &pcard->curPos, &pcard->curRot);
pcard->mTransform.setTranslation(pcard->curPos);
pcard->mTransform.setRotationRadians(pcard->curRot);
......@@ -878,7 +878,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
t->X = (matManager.vFields[16].Pos.X + matManager.vFields[17].Pos.X) / 2 + 1.1f * sequence;
t->Y = (matManager.vFields[16].Pos.Y + matManager.vFields[18].Pos.Y) / 2;
t->Z = 0.01f;
if (pcard->position & POS_DEFENCE) {
if (pcard->position & POS_DEFENSE) {
r->X = 0.0f;
r->Z = -3.1415926f / 2.0f;
if (pcard->position & POS_FACEDOWN)
......@@ -895,7 +895,7 @@ void ClientField::GetCardLocation(ClientCard* pcard, irr::core::vector3df* t, ir
t->X = (matManager.vFields[84].Pos.X + matManager.vFields[85].Pos.X) / 2 - 1.1f * sequence;
t->Y = (matManager.vFields[84].Pos.Y + matManager.vFields[86].Pos.Y) / 2;
t->Z = 0.01f;
if (pcard->position & POS_DEFENCE) {
if (pcard->position & POS_DEFENSE) {
r->X = 0.0f;
r->Z = 3.1415926f / 2.0f;
if (pcard->position & POS_FACEDOWN)
......
......@@ -198,12 +198,12 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
break;
}
case BUTTON_POS_DU: {
DuelClient::SetResponseI(POS_FACEUP_DEFENCE);
DuelClient::SetResponseI(POS_FACEUP_DEFENSE);
mainGame->HideElement(mainGame->wPosSelect, true);
break;
}
case BUTTON_POS_DD: {
DuelClient::SetResponseI(POS_FACEDOWN_DEFENCE);
DuelClient::SetResponseI(POS_FACEDOWN_DEFENSE);
mainGame->HideElement(mainGame->wPosSelect, true);
break;
}
......
......@@ -87,25 +87,25 @@ int ReplayMode::ReplayThread(void* param) {
if(!(opt & DUEL_TAG_MODE)) {
int main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
int extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
mainGame->dField.Initial(0, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
mainGame->dField.Initial(1, main, extra);
} else {
int main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
int extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
mainGame->dField.Initial(0, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
......@@ -115,10 +115,10 @@ int ReplayMode::ReplayThread(void* param) {
new_tag_card(pduel, cur_replay.ReadInt32(), 0, LOCATION_EXTRA);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
mainGame->dField.Initial(1, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
......@@ -226,25 +226,25 @@ void ReplayMode::Restart(bool refresh) {
if(!(opt & DUEL_TAG_MODE)) {
int main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
int extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
mainGame->dField.Initial(0, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
mainGame->dField.Initial(1, main, extra);
} else {
int main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
int extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
mainGame->dField.Initial(0, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
......@@ -254,10 +254,10 @@ void ReplayMode::Restart(bool refresh) {
new_tag_card(pduel, cur_replay.ReadInt32(), 0, LOCATION_EXTRA);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
extra = cur_replay.ReadInt32();
for(int i = 0; i < extra; ++i)
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, cur_replay.ReadInt32(), 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
mainGame->dField.Initial(1, main, extra);
main = cur_replay.ReadInt32();
for(int i = 0; i < main; ++i)
......
......@@ -421,22 +421,22 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
last_replay.Flush();
last_replay.WriteInt32(pdeck[0].main.size(), false);
for(int32 i = (int32)pdeck[0].main.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(pdeck[0].main[i]->first, false);
}
last_replay.WriteInt32(pdeck[0].extra.size(), false);
for(int32 i = (int32)pdeck[0].extra.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(pdeck[0].extra[i]->first, false);
}
last_replay.WriteInt32(pdeck[1].main.size(), false);
for(int32 i = (int32)pdeck[1].main.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[1].main[i]->first, 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, pdeck[1].main[i]->first, 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(pdeck[1].main[i]->first, false);
}
last_replay.WriteInt32(pdeck[1].extra.size(), false);
for(int32 i = (int32)pdeck[1].extra.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[1].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, pdeck[1].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(pdeck[1].extra[i]->first, false);
}
last_replay.Flush();
......
......@@ -393,12 +393,12 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
//
last_replay.WriteInt32(pdeck[0].main.size(), false);
for(int32 i = (int32)pdeck[0].main.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, pdeck[0].main[i]->first, 0, 0, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(pdeck[0].main[i]->first, false);
}
last_replay.WriteInt32(pdeck[0].extra.size(), false);
for(int32 i = (int32)pdeck[0].extra.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, pdeck[0].extra[i]->first, 0, 0, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(pdeck[0].extra[i]->first, false);
}
//
......@@ -415,12 +415,12 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
//
last_replay.WriteInt32(pdeck[3].main.size(), false);
for(int32 i = (int32)pdeck[3].main.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[3].main[i]->first, 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, pdeck[3].main[i]->first, 1, 1, LOCATION_DECK, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(pdeck[3].main[i]->first, false);
}
last_replay.WriteInt32(pdeck[3].extra.size(), false);
for(int32 i = (int32)pdeck[3].extra.size() - 1; i >= 0; --i) {
new_card(pduel, pdeck[3].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENCE);
new_card(pduel, pdeck[3].extra[i]->first, 1, 1, LOCATION_EXTRA, 0, POS_FACEDOWN_DEFENSE);
last_replay.WriteInt32(pdeck[3].extra[i]->first, false);
}
//
......
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