Commit 90a07a09 authored by DailyShana's avatar DailyShana

remove sort chain

parent ddd92752
......@@ -192,8 +192,6 @@ struct processor {
event_list sub_solving_event;
chain_array select_chains;
chain_array current_chain;
chain_list tpchain;
chain_list ntpchain;
chain_list continuous_chain;
chain_list desrep_chain;
chain_list new_fchain;
......@@ -498,7 +496,6 @@ public:
int32 process_turn(uint16 step, uint8 turn_player);
int32 add_chain(uint16 step);
int32 sort_chain(uint16 step, uint8 tp);
int32 solve_continuous(uint16 step, effect* peffect, uint8 triggering_player);
int32 solve_chain(uint16 step, uint32 chainend_arg1, uint32 chainend_arg2);
int32 break_effect();
......@@ -687,7 +684,7 @@ public:
#define PROCESSOR_SELECT_PLACE 18
#define PROCESSOR_SELECT_POSITION 19
#define PROCESSOR_SELECT_TRIBUTE_P 20
#define PROCESSOR_SORT_CHAIN 21
//#define PROCESSOR_SORT_CHAIN 21
#define PROCESSOR_SELECT_COUNTER 22
#define PROCESSOR_SELECT_SUM 23
#define PROCESSOR_SELECT_DISFIELD 24
......
......@@ -161,14 +161,6 @@ int32 field::process() {
return PROCESSOR_WAITING + pduel->bufferlen;
}
}
case PROCESSOR_SORT_CHAIN: {
if (sort_chain(it->step, it->arg1)) {
core.units.pop_front();
} else {
it->step++;
}
return pduel->bufferlen;
}
case PROCESSOR_SELECT_COUNTER: {
if (select_counter(it->step, it->arg1, it->arg2, it->arg3, it->arg4 >> 8, it->arg4 & 0xff)) {
core.units.pop_front();
......@@ -1674,8 +1666,6 @@ int32 field::process_point_event(int16 step, int32 skip_trigger, int32 skip_free
}
core.new_fchain_s.splice(core.new_fchain_s.begin(), core.new_fchain);
core.new_ochain_s.splice(core.new_ochain_s.begin(), core.new_ochain);
core.tpchain.clear();
core.ntpchain.clear();
core.delayed_quick.clear();
core.delayed_quick_break.swap(core.delayed_quick);
core.current_player = infos.turn_player;
......@@ -4516,46 +4506,6 @@ int32 field::add_chain(uint16 step) {
}
return TRUE;
}
int32 field::sort_chain(uint16 step, uint8 tp) {
switch(step) {
case 0: {
core.select_cards.clear();
if(tp)
for(auto clit = core.tpchain.begin(); clit != core.tpchain.end(); ++clit)
core.select_cards.push_back(clit->triggering_effect->get_handler());
else
for(auto clit = core.ntpchain.begin(); clit != core.ntpchain.end(); ++clit)
core.select_cards.push_back(clit->triggering_effect->get_handler());
add_process(PROCESSOR_SORT_CARD, 0, 0, 0, tp ? infos.turn_player : (1 - infos.turn_player), 1);
return FALSE;
}
case 1: {
if(returns.bvalue[0] == -1)
return TRUE;
chain_list::iterator clit;
int32 i = 0, count;
if(tp) {
count = core.tpchain.size();
chain_array ch(count);
for(i = 0, clit = core.tpchain.begin(); i < count; ++clit, ++i)
ch[returns.bvalue[i]] = *clit;
core.tpchain.clear();
for(i = 0; i < count; ++i)
core.tpchain.push_back(ch[i]);
} else {
count = core.ntpchain.size();
chain_array ch(count);
for(i = 0, clit = core.ntpchain.begin(); i < count; ++clit, ++i)
ch[returns.bvalue[i]] = *clit;
core.ntpchain.clear();
for(i = 0; i < count; ++i)
core.ntpchain.push_back(ch[i]);
}
return TRUE;
}
}
return TRUE;
}
int32 field::solve_continuous(uint16 step, effect * peffect, uint8 triggering_player) {
switch(step) {
case 0: {
......
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