Commit b4e7d035 authored by mercury233's avatar mercury233

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

parents f93645ba 4580cf55
...@@ -633,10 +633,9 @@ void ClientField::ReplaySwap() { ...@@ -633,10 +633,9 @@ void ClientField::ReplaySwap() {
} }
mainGame->dInfo.isFirst = !mainGame->dInfo.isFirst; mainGame->dInfo.isFirst = !mainGame->dInfo.isFirst;
std::swap(mainGame->dInfo.lp[0], mainGame->dInfo.lp[1]); std::swap(mainGame->dInfo.lp[0], mainGame->dInfo.lp[1]);
for(int i = 0; i < 16; ++i) std::swap(mainGame->dInfo.strLP[0], mainGame->dInfo.strLP[1]);
std::swap(mainGame->dInfo.strLP[0][i], mainGame->dInfo.strLP[1][i]); std::swap(mainGame->dInfo.hostname, mainGame->dInfo.clientname);
for(int i = 0; i < 20; ++i) std::swap(mainGame->dInfo.hostname_tag, mainGame->dInfo.clientname_tag);
std::swap(mainGame->dInfo.hostname[i], mainGame->dInfo.clientname[i]);
for(auto chit = chains.begin(); chit != chains.end(); ++chit) { for(auto chit = chains.begin(); chit != chains.end(); ++chit) {
chit->controler = 1 - chit->controler; chit->controler = 1 - chit->controler;
GetChainLocation(chit->controler, chit->location, chit->sequence, &chit->chain_pos); GetChainLocation(chit->controler, chit->location, chit->sequence, &chit->chain_pos);
......
...@@ -1037,6 +1037,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1037,6 +1037,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
ClientCard* pcard; ClientCard* pcard;
mainGame->dField.activatable_cards.clear(); mainGame->dField.activatable_cards.clear();
mainGame->dField.activatable_descs.clear(); mainGame->dField.activatable_descs.clear();
mainGame->dField.conti_cards.clear();
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadInt8(pbuf);
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
code = BufferIO::ReadInt32(pbuf); code = BufferIO::ReadInt32(pbuf);
...@@ -1166,6 +1167,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1166,6 +1167,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
} }
mainGame->dField.activatable_cards.clear(); mainGame->dField.activatable_cards.clear();
mainGame->dField.activatable_descs.clear(); mainGame->dField.activatable_descs.clear();
mainGame->dField.conti_cards.clear();
count = BufferIO::ReadInt8(pbuf); count = BufferIO::ReadInt8(pbuf);
for (int i = 0; i < count; ++i) { for (int i = 0; i < count; ++i) {
code = BufferIO::ReadInt32(pbuf); code = BufferIO::ReadInt32(pbuf);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <dirent.h> #include <dirent.h>
#endif #endif
const unsigned short PRO_VERSION = 0x1340; const unsigned short PRO_VERSION = 0x1341;
namespace ygo { namespace ygo {
......
This diff is collapsed.
...@@ -33,6 +33,8 @@ public: ...@@ -33,6 +33,8 @@ public:
static void Pause(bool is_pause, bool is_step); static void Pause(bool is_pause, bool is_step);
static bool ReadReplayResponse(); static bool ReadReplayResponse();
static int ReplayThread(void* param); static int ReplayThread(void* param);
static bool StartDuel();
static void EndDuel();
static void Restart(bool refresh); static void Restart(bool refresh);
static void Undo(); static void Undo();
static bool ReplayAnalyze(char* msg, unsigned int len); static bool ReplayAnalyze(char* msg, unsigned int len);
......
...@@ -109,8 +109,11 @@ int SingleMode::SinglePlayThread(void* param) { ...@@ -109,8 +109,11 @@ int SingleMode::SinglePlayThread(void* param) {
is_continuing = SinglePlayAnalyze(engineBuffer, len); is_continuing = SinglePlayAnalyze(engineBuffer, len);
last_replay.BeginRecord(); last_replay.BeginRecord();
last_replay.WriteHeader(rh); last_replay.WriteHeader(rh);
last_replay.WriteData(mainGame->dInfo.hostname, 40, false); unsigned short buffer[20];
last_replay.WriteData(mainGame->dInfo.clientname, 40, false); BufferIO::CopyWStr(mainGame->dInfo.hostname, buffer, 20);
last_replay.WriteData(buffer, 40, false);
BufferIO::CopyWStr(mainGame->dInfo.clientname, buffer, 20);
last_replay.WriteData(buffer, 40, false);
last_replay.WriteInt32(start_lp, false); last_replay.WriteInt32(start_lp, false);
last_replay.WriteInt32(start_hand, false); last_replay.WriteInt32(start_hand, false);
last_replay.WriteInt32(draw_count, false); last_replay.WriteInt32(draw_count, false);
......
Subproject commit b12628811d5f449ab5e0b2242bfc6d474ceb5211 Subproject commit 18bfd81912b020e799832a6068481756929e51a8
Subproject commit 5672ac76978214f48d297bb5c49ab9fa5b00f2ef Subproject commit 0da9693357cd309e5539f853566b1ba3921866e0
...@@ -515,6 +515,8 @@ ...@@ -515,6 +515,8 @@
!counter 0x1041 捕食指示物 !counter 0x1041 捕食指示物
!counter 0x42 指示物(爆竹鬼) !counter 0x42 指示物(爆竹鬼)
!counter 0x43 缺陷指示物 !counter 0x43 缺陷指示物
!counter 0x44 指示物(弹带城壁龙)
!counter 0x1045 鳞粉指示物
#setnames, using tab for comment #setnames, using tab for comment
!setname 0x1 正义盟军 AOJ !setname 0x1 正义盟军 AOJ
!setname 0x2 次世代 ジェネクス !setname 0x2 次世代 ジェネクス
...@@ -862,3 +864,10 @@ ...@@ -862,3 +864,10 @@
!setname 0x108 魔弹 魔弾 !setname 0x108 魔弹 魔弾
!setname 0x109 天气 天気 !setname 0x109 天气 天気
!setname 0x10a 珀耳修斯 パーシアス !setname 0x10a 珀耳修斯 パーシアス
!setname 0x10b 廷达魔三角 ティンダングル
!setname 0x10c 机界骑士 ジャックナイツ
!setname 0x10d 魔导兽 魔導獣
!setname 0x10e 进化药 進化薬
!setname 0x10f 枪管 ヴァレル
!setname 0x110 眼纳祭神 アイズ・サクリファイス
!setname 0x111 武装龙 アームド・ドラゴン
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