Commit 3311a167 authored by nanahira's avatar nanahira

Merge branch 'master' into raw-video

parents 5f5b15cd 00c0eb7c
No preview for this file type
...@@ -132,7 +132,7 @@ void ClientField::Initial(int player, int deckc, int extrac) { ...@@ -132,7 +132,7 @@ void ClientField::Initial(int player, int deckc, int extrac) {
} }
ClientCard* ClientField::GetCard(int controler, int location, int sequence, int sub_seq) { ClientCard* ClientField::GetCard(int controler, int location, int sequence, int sub_seq) {
std::vector<ClientCard*>* lst = 0; std::vector<ClientCard*>* lst = 0;
bool is_xyz = (location & 0x80) != 0; bool is_xyz = (location & LOCATION_OVERLAY) != 0;
location &= 0x7f; location &= 0x7f;
switch(location) { switch(location) {
case LOCATION_DECK: case LOCATION_DECK:
......
...@@ -2794,7 +2794,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2794,7 +2794,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dField.RemoveCard(pc, pl, ps); mainGame->dField.RemoveCard(pc, pl, ps);
delete pcard; delete pcard;
} else { } else {
if (!(pl & 0x80) && !(cl & 0x80)) { if (!(pl & LOCATION_OVERLAY) && !(cl & LOCATION_OVERLAY)) {
ClientCard* pcard = mainGame->dField.GetCard(pc, pl, ps); ClientCard* pcard = mainGame->dField.GetCard(pc, pl, ps);
if (pcard->code != code && (code != 0 || cl == 0x40)) if (pcard->code != code && (code != 0 || cl == 0x40))
pcard->SetCode(code); pcard->SetCode(code);
...@@ -2857,7 +2857,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2857,7 +2857,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->WaitFrameSignal(5); mainGame->WaitFrameSignal(5);
} }
} }
} else if (!(pl & 0x80)) { } else if (!(pl & LOCATION_OVERLAY)) {
ClientCard* pcard = mainGame->dField.GetCard(pc, pl, ps); ClientCard* pcard = mainGame->dField.GetCard(pc, pl, ps);
if (code != 0 && pcard->code != code) if (code != 0 && pcard->code != code)
pcard->SetCode(code); pcard->SetCode(code);
...@@ -2877,7 +2877,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2877,7 +2877,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
olcard->overlayed.push_back(pcard); olcard->overlayed.push_back(pcard);
mainGame->dField.overlay_cards.insert(pcard); mainGame->dField.overlay_cards.insert(pcard);
pcard->overlayTarget = olcard; pcard->overlayTarget = olcard;
pcard->location = 0x80; pcard->location = LOCATION_OVERLAY;
pcard->sequence = olcard->overlayed.size() - 1; pcard->sequence = olcard->overlayed.size() - 1;
} else { } else {
mainGame->gMutex.lock(); mainGame->gMutex.lock();
...@@ -2886,7 +2886,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2886,7 +2886,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->dField.overlay_cards.insert(pcard); mainGame->dField.overlay_cards.insert(pcard);
mainGame->gMutex.unlock(); mainGame->gMutex.unlock();
pcard->overlayTarget = olcard; pcard->overlayTarget = olcard;
pcard->location = 0x80; pcard->location = LOCATION_OVERLAY;
pcard->sequence = olcard->overlayed.size() - 1; pcard->sequence = olcard->overlayed.size() - 1;
if (olcard->location & 0x0c) { if (olcard->location & 0x0c) {
mainGame->gMutex.lock(); mainGame->gMutex.lock();
...@@ -2898,7 +2898,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2898,7 +2898,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->WaitFrameSignal(5); mainGame->WaitFrameSignal(5);
} }
} }
} else if (!(cl & 0x80)) { } else if (!(cl & LOCATION_OVERLAY)) {
ClientCard* olcard = mainGame->dField.GetCard(pc, pl & 0x7f, ps); ClientCard* olcard = mainGame->dField.GetCard(pc, pl & 0x7f, ps);
ClientCard* pcard = olcard->overlayed[pp]; ClientCard* pcard = olcard->overlayed[pp];
if(mainGame->dInfo.isReplaySkiping) { if(mainGame->dInfo.isReplaySkiping) {
...@@ -2935,7 +2935,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2935,7 +2935,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
olcard1->overlayed.erase(olcard1->overlayed.begin() + pcard->sequence); olcard1->overlayed.erase(olcard1->overlayed.begin() + pcard->sequence);
olcard2->overlayed.push_back(pcard); olcard2->overlayed.push_back(pcard);
pcard->sequence = olcard2->overlayed.size() - 1; pcard->sequence = olcard2->overlayed.size() - 1;
pcard->location = 0x80; pcard->location = LOCATION_OVERLAY;
pcard->overlayTarget = olcard2; pcard->overlayTarget = olcard2;
for (size_t i = 0; i < olcard1->overlayed.size(); ++i) { for (size_t i = 0; i < olcard1->overlayed.size(); ++i) {
olcard1->overlayed[i]->sequence = i; olcard1->overlayed[i]->sequence = i;
...@@ -2945,7 +2945,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -2945,7 +2945,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
olcard1->overlayed.erase(olcard1->overlayed.begin() + pcard->sequence); olcard1->overlayed.erase(olcard1->overlayed.begin() + pcard->sequence);
olcard2->overlayed.push_back(pcard); olcard2->overlayed.push_back(pcard);
pcard->sequence = olcard2->overlayed.size() - 1; pcard->sequence = olcard2->overlayed.size() - 1;
pcard->location = 0x80; pcard->location = LOCATION_OVERLAY;
pcard->overlayTarget = olcard2; pcard->overlayTarget = olcard2;
for (size_t i = 0; i < olcard1->overlayed.size(); ++i) { for (size_t i = 0; i < olcard1->overlayed.size(); ++i) {
olcard1->overlayed[i]->sequence = i; olcard1->overlayed[i]->sequence = i;
...@@ -3259,7 +3259,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -3259,7 +3259,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int l = BufferIO::ReadInt8(pbuf); int l = BufferIO::ReadInt8(pbuf);
int s = BufferIO::ReadInt8(pbuf); int s = BufferIO::ReadInt8(pbuf);
int ss = BufferIO::ReadInt8(pbuf); int ss = BufferIO::ReadInt8(pbuf);
if ((l & 0x80) > 0) if ((l & LOCATION_OVERLAY) > 0)
pcards[i] = mainGame->dField.GetCard(c, l & 0x7f, s)->overlayed[ss]; pcards[i] = mainGame->dField.GetCard(c, l & 0x7f, s)->overlayed[ss];
else else
pcards[i] = mainGame->dField.GetCard(c, l, s); pcards[i] = mainGame->dField.GetCard(c, l, s);
...@@ -4111,7 +4111,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -4111,7 +4111,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
ccard->overlayed.push_back(xcard); ccard->overlayed.push_back(xcard);
mainGame->dField.overlay_cards.insert(xcard); mainGame->dField.overlay_cards.insert(xcard);
xcard->overlayTarget = ccard; xcard->overlayTarget = ccard;
xcard->location = 0x80; xcard->location = LOCATION_OVERLAY;
xcard->sequence = ccard->overlayed.size() - 1; xcard->sequence = ccard->overlayed.size() - 1;
xcard->owner = p; xcard->owner = p;
xcard->controler = p; xcard->controler = p;
......
...@@ -1684,6 +1684,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1684,6 +1684,13 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
myswprintf(formatBuffer, L"\n*%ls", dataManager.GetDesc(iter->first)); myswprintf(formatBuffer, L"\n*%ls", dataManager.GetDesc(iter->first));
str.append(formatBuffer); str.append(formatBuffer);
} }
if(mainGame->dInfo.turn == 1) {
if(mplayer == 0 && mainGame->dInfo.isFirst || mplayer != 0 && !mainGame->dInfo.isFirst)
myswprintf(formatBuffer, L"\n*%ls", dataManager.GetSysString(100));
else
myswprintf(formatBuffer, L"\n*%ls", dataManager.GetSysString(101));
str.append(formatBuffer);
}
should_show_tip = true; should_show_tip = true;
irr::core::dimension2d<unsigned int> dtip = mainGame->guiFont->getDimension(str.c_str()) + irr::core::dimension2d<unsigned int>(10, 10); irr::core::dimension2d<unsigned int> dtip = mainGame->guiFont->getDimension(str.c_str()) + irr::core::dimension2d<unsigned int>(10, 10);
mainGame->stTip->setRelativePosition(recti(mousepos.X - 10 - dtip.Width, mousepos.Y + 10, mousepos.X - 10, mousepos.Y + 10 + dtip.Height)); mainGame->stTip->setRelativePosition(recti(mousepos.X - 10 - dtip.Width, mousepos.Y + 10, mousepos.X - 10, mousepos.Y + 10 + dtip.Height));
......
...@@ -181,7 +181,7 @@ bool Game::Initialize() { ...@@ -181,7 +181,7 @@ bool Game::Initialize() {
SetWindowsIcon(); SetWindowsIcon();
//main menu //main menu
wchar_t strbuf[256]; wchar_t strbuf[256];
myswprintf(strbuf, L"KoishiPro %X.0%X.%X SUPERNOVA", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf); myswprintf(strbuf, L"KoishiPro %X.0%X.%X CHIMIMORYO", PRO_VERSION >> 12, (PRO_VERSION >> 4) & 0xff, PRO_VERSION & 0xf);
wMainMenu = env->addWindow(rect<s32>(370, 200, 650, 415), false, strbuf); wMainMenu = env->addWindow(rect<s32>(370, 200, 650, 415), false, strbuf);
wMainMenu->getCloseButton()->setVisible(false); wMainMenu->getCloseButton()->setVisible(false);
btnLanMode = env->addButton(rect<s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200)); btnLanMode = env->addButton(rect<s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200));
......
...@@ -584,7 +584,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) { ...@@ -584,7 +584,7 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
/*int cp = pbuf[11];*/ /*int cp = pbuf[11];*/
pbuf += 16; pbuf += 16;
DuelClient::ClientAnalyze(offset, pbuf - offset); DuelClient::ClientAnalyze(offset, pbuf - offset);
if(cl && !(cl & 0x80) && (pl != cl || pc != cc)) if(cl && !(cl & LOCATION_OVERLAY) && (pl != cl || pc != cc))
ReplayRefreshSingle(cc, cl, cs); ReplayRefreshSingle(cc, cl, cs);
else if(pl == cl && cl == LOCATION_DECK) else if(pl == cl && cl == LOCATION_DECK)
ReplayRefreshDeck(cc); ReplayRefreshDeck(cc);
......
...@@ -983,7 +983,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) { ...@@ -983,7 +983,7 @@ int SingleDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer::SendBufferToPlayer(players[1 - cc], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(players[1 - cc], STOC_GAME_MSG, offset, pbuf - offset);
for(auto oit = observers.begin(); oit != observers.end(); ++oit) for(auto oit = observers.begin(); oit != observers.end(); ++oit)
NetServer::ReSendToPlayer(*oit); NetServer::ReSendToPlayer(*oit);
if (cl != 0 && (cl & 0x80) == 0 && (cl != pl || pc != cc)) if (cl != 0 && (cl & LOCATION_OVERLAY) == 0 && (cl != pl || pc != cc))
RefreshSingle(cc, cl, cs); RefreshSingle(cc, cl, cs);
break; break;
} }
......
...@@ -452,7 +452,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { ...@@ -452,7 +452,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
/*int cp = pbuf[11];*/ /*int cp = pbuf[11];*/
pbuf += 16; pbuf += 16;
DuelClient::ClientAnalyze(offset, pbuf - offset); DuelClient::ClientAnalyze(offset, pbuf - offset);
if(cl && !(cl & 0x80) && (pl != cl || pc != cc)) if(cl && !(cl & LOCATION_OVERLAY) && (pl != cl || pc != cc))
SinglePlayRefreshSingle(cc, cl, cs); SinglePlayRefreshSingle(cc, cl, cs);
break; break;
} }
......
...@@ -972,7 +972,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) { ...@@ -972,7 +972,7 @@ int TagDuel::Analyze(char* msgbuffer, unsigned int len) {
NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(players[i], STOC_GAME_MSG, offset, pbuf - offset);
for(auto oit = observers.begin(); oit != observers.end(); ++oit) for(auto oit = observers.begin(); oit != observers.end(); ++oit)
NetServer::ReSendToPlayer(*oit); NetServer::ReSendToPlayer(*oit);
if (cl != 0 && (cl & 0x80) == 0 && (cl != pl || pc != cc)) if (cl != 0 && (cl & LOCATION_OVERLAY) == 0 && (cl != pl || pc != cc))
RefreshSingle(cc, cl, cs); RefreshSingle(cc, cl, cs);
break; break;
} }
......
Subproject commit f9cd0df0186dcf4ae75b37179e9c835f11061a16 Subproject commit b014f89b632dcb3a25e84afcf8b555a2709eeebe
...@@ -16,8 +16,8 @@ VALUE "InternalName", "KoishiPro" ...@@ -16,8 +16,8 @@ VALUE "InternalName", "KoishiPro"
VALUE "LegalCopyright", "Copyright (C) 2022 Nanahira" VALUE "LegalCopyright", "Copyright (C) 2022 Nanahira"
VALUE "OriginalFilename", "ygopro.exe" VALUE "OriginalFilename", "ygopro.exe"
VALUE "ProductName", "KoishiPro" VALUE "ProductName", "KoishiPro"
VALUE "FileVersion", "SUPERNOVA" VALUE "FileVersion", "CHIMIMORYO"
VALUE "ProductVersion", "SUPERNOVA" VALUE "ProductVersion", "CHIMIMORYO"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"
......
Subproject commit 861310196d509332bc25e20d12e492d48e4fa116 Subproject commit 986735bde47cbb557cc24ccb0c83237d8f6114bc
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