Commit 8d90911f authored by nanahira's avatar nanahira

Merge branch 'master' into server

parents f4c5b196 922be010
No preview for this file type
...@@ -286,7 +286,7 @@ bool Game::Initialize() { ...@@ -286,7 +286,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 Crystal", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU); myswprintf(strbuf, L"KoishiPro %X.0%X.%X Moon", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU);
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));
......
...@@ -337,6 +337,13 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) { ...@@ -337,6 +337,13 @@ bool ReplayMode::ReplayAnalyze(unsigned char* msg, unsigned int len) {
pbuf += 3; pbuf += 3;
break; break;
} }
case MSG_UPDATE_CARD: {
pbuf += 3;
const int clen = BufferIO::ReadInt32(pbuf);
pbuf += (clen - 4);
DuelClient::ClientAnalyze(offset, pbuf - offset);
break;
}
case MSG_RETRY: { case MSG_RETRY: {
if(mainGame->dInfo.isReplaySkiping) { if(mainGame->dInfo.isReplaySkiping) {
mainGame->dInfo.isReplaySkiping = false; mainGame->dInfo.isReplaySkiping = false;
......
...@@ -768,6 +768,16 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) { ...@@ -768,6 +768,16 @@ int SingleDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
} }
break; break;
} }
case MSG_UPDATE_CARD: {
auto controller = BufferIO::ReadUInt8(pbuf);
auto location = BufferIO::ReadUInt8(pbuf);
auto sequence = BufferIO::ReadUInt8(pbuf);
auto clen = BufferIO::ReadInt32(pbuf);
auto query_flag = BufferIO::ReadUInt32(pbuf);
pbuf += (clen - 8);
RefreshSingle(controller, location, sequence, query_flag);
break;
}
case MSG_RETRY: { case MSG_RETRY: {
WaitforResponse(last_response); WaitforResponse(last_response);
NetServer::SendBufferToPlayer(players[last_response], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(players[last_response], STOC_GAME_MSG, offset, pbuf - offset);
......
...@@ -194,6 +194,13 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) { ...@@ -194,6 +194,13 @@ bool SingleMode::SinglePlayAnalyze(unsigned char* msg, unsigned int len) {
pbuf += 3; pbuf += 3;
break; break;
} }
case MSG_UPDATE_CARD: {
pbuf += 3;
const int clen = BufferIO::ReadInt32(pbuf);
pbuf += (clen - 4);
DuelClient::ClientAnalyze(offset, pbuf - offset);
break;
}
case MSG_RETRY: { case MSG_RETRY: {
if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) { if(!DuelClient::ClientAnalyze(offset, pbuf - offset)) {
mainGame->singleSignal.Reset(); mainGame->singleSignal.Reset();
......
...@@ -724,6 +724,16 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) { ...@@ -724,6 +724,16 @@ int TagDuel::Analyze(unsigned char* msgbuffer, unsigned int len) {
} }
break; break;
} }
case MSG_UPDATE_CARD: {
auto controller = BufferIO::ReadUInt8(pbuf);
auto location = BufferIO::ReadUInt8(pbuf);
auto sequence = BufferIO::ReadUInt8(pbuf);
auto clen = BufferIO::ReadInt32(pbuf);
auto query_flag = BufferIO::ReadUInt32(pbuf);
pbuf += (clen - 8);
RefreshSingle(controller, location, sequence, query_flag);
break;
}
case MSG_RETRY: { case MSG_RETRY: {
WaitforResponse(last_response); WaitforResponse(last_response);
NetServer::SendBufferToPlayer(cur_player[last_response], STOC_GAME_MSG, offset, pbuf - offset); NetServer::SendBufferToPlayer(cur_player[last_response], STOC_GAME_MSG, offset, pbuf - offset);
......
Subproject commit 2a688aeb72bced1dffa60db1e3c802041f8c59e2 Subproject commit 00e330d80aac73768664956f477a1b13d1d78a81
Subproject commit 3c12554320ef1a2d867fcc6b6b7e6e5d5237a7ae Subproject commit ab24c9c72fe789c67aaf2fa87629eb8cfe4170cd
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