Commit f05d5bd4 authored by edo9300's avatar edo9300

Cleanup

parent 3516ba98
This diff is collapsed.
......@@ -44,11 +44,8 @@ public:
static bool ReplayAnalyze(ReplayPacket p);
static bool ReplayAnalyze(char* msg, unsigned int len);
static void ReplayRefresh(int player, int location, int flag = 0xf81fff);
static void ReplayRefresh(int flag = 0xf81fff);
static void ReplayRefreshHand(int player, int flag = 0x781fff);
static void ReplayRefreshGrave(int player, int flag = 0x181fff);
static void ReplayRefreshDeck(int player, int flag = 0x181fff);
static void ReplayRefreshExtra(int player, int flag = 0x181fff);
static void ReplayRefreshSingle(int player, int location, int sequence, int flag = 0xf81fff);
static void ReplayReload();
......
......@@ -775,6 +775,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
int rule = BufferIO::ReadInt8(pbuf);
mainGame->dInfo.duel_field = rule & 0xf;
mainGame->dInfo.extraval = rule >> 4;
mainGame->SetPhaseButtons();
int val = 0;
for(int p = 0; p < 2; ++p) {
mainGame->dInfo.lp[p] = BufferIO::ReadInt32(pbuf);
......@@ -903,29 +904,14 @@ void SingleMode::SinglePlayRefreshSingle(int player, int location, int sequence,
replay_stream.push_back(p);
}
void SingleMode::SinglePlayRefresh(int flag) {
SinglePlayRefresh(0, LOCATION_MZONE, flag);
SinglePlayRefresh(1, LOCATION_MZONE, flag);
SinglePlayRefresh(0, LOCATION_SZONE, flag);
SinglePlayRefresh(1, LOCATION_SZONE, flag);
SinglePlayRefresh(0, LOCATION_HAND, flag);
SinglePlayRefresh(1, LOCATION_HAND, flag);
for(int p = 0; p < 2; p++)
for(int loc = LOCATION_HAND; loc != LOCATION_GRAVE; loc *= 2)
SinglePlayRefresh(p, loc, flag);
}
void SingleMode::SinglePlayReload() {
unsigned int flag = 0xffdfff;
SinglePlayRefresh(0, LOCATION_MZONE, flag);
SinglePlayRefresh(1, LOCATION_MZONE, flag);
SinglePlayRefresh(0, LOCATION_SZONE, flag);
SinglePlayRefresh(1, LOCATION_SZONE, flag);
SinglePlayRefresh(0, LOCATION_HAND, flag);
SinglePlayRefresh(1, LOCATION_HAND, flag);
SinglePlayRefresh(0, LOCATION_DECK, flag);
SinglePlayRefresh(1, LOCATION_DECK, flag);
SinglePlayRefresh(0, LOCATION_EXTRA, flag);
SinglePlayRefresh(1, LOCATION_EXTRA, flag);
SinglePlayRefresh(0, LOCATION_GRAVE, flag);
SinglePlayRefresh(1, LOCATION_GRAVE, flag);
SinglePlayRefresh(0, LOCATION_REMOVED, flag);
SinglePlayRefresh(1, LOCATION_REMOVED, flag);
for(int p = 0; p < 2; p++)
for(int loc = LOCATION_DECK; loc != LOCATION_OVERLAY; loc *= 2)
SinglePlayRefresh(p, loc, 0xffdfff);
}
byte* SingleMode::ScriptReader(const char* script_name, int* slen) {
FILE *fp;
......
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