Commit 655b919d authored by Dark Zane's avatar Dark Zane Committed by GitHub

Merge branch 'fallenstardust:master' into master

parents c103703a fea1f4d0
......@@ -220,23 +220,26 @@ bool ClientCard::client_card_sort(ClientCard* c1, ClientCard* c2) {
return cp1 < cp2;
if(c1->location != c2->location)
return c1->location < c2->location;
if(c1->location & LOCATION_OVERLAY)
if(c1->overlayTarget != c2->overlayTarget)
if (c1->location & LOCATION_OVERLAY) {
if (c1->overlayTarget != c2->overlayTarget)
return c1->overlayTarget->sequence < c2->overlayTarget->sequence;
else return c1->sequence < c2->sequence;
else
return c1->sequence < c2->sequence;
}
else {
if(c1->location & (LOCATION_DECK | LOCATION_GRAVE | LOCATION_REMOVED | LOCATION_EXTRA)) {
auto it1 = std::find_if(mainGame->dField.chains.rbegin(), mainGame->dField.chains.rend(), [c1](const auto& ch) {
auto it1 = std::find_if(mainGame->dField.chains.rbegin(), mainGame->dField.chains.rend(), [c1](const ChainInfo& ch) {
return c1 == ch.chain_card || ch.target.find(c1) != ch.target.end();
});
auto it2 = std::find_if(mainGame->dField.chains.rbegin(), mainGame->dField.chains.rend(), [c2](const auto& ch) {
auto it2 = std::find_if(mainGame->dField.chains.rbegin(), mainGame->dField.chains.rend(), [c2](const ChainInfo& ch) {
return c2 == ch.chain_card || ch.target.find(c2) != ch.target.end();
});
if(it1 != mainGame->dField.chains.rend() || it2 != mainGame->dField.chains.rend()) {
return it1 < it2;
}
return c1->sequence > c2->sequence;
} else
}
else
return c1->sequence < c2->sequence;
}
}
......
......@@ -13,7 +13,7 @@ LOCAL_MODULE := YGOMobile
LOCAL_CFLAGS := -D_IRR_ANDROID_PLATFORM_ -pipe -fno-rtti -fno-exceptions -fstrict-aliasing -D_ANDROID -fPIC
TARGET_FORMAT_STRING_CFLAGS :=
LOCAL_CPPFLAGS := -std=c++14
LOCAL_CPPFLAGS := -std=c++11
ifndef NDEBUG
LOCAL_CFLAGS += -g -D_DEBUG
......
package cn.garymb.ygomobile.loader;
import static cn.garymb.ygomobile.Constants.newIDsArray;
import static cn.garymb.ygomobile.Constants.oldIDsArray;
import static cn.garymb.ygomobile.ui.home.HomeActivity.pre_code_list;
import static cn.garymb.ygomobile.ui.home.HomeActivity.released_code_list;
import static cn.garymb.ygomobile.utils.ComparisonTableUtil.newIDsArray;
import static cn.garymb.ygomobile.utils.ComparisonTableUtil.oldIDsArray;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import android.util.SparseArray;
......@@ -23,7 +22,6 @@ import cn.garymb.ygomobile.bean.Deck;
import cn.garymb.ygomobile.bean.DeckInfo;
import cn.garymb.ygomobile.ui.cards.deck.DeckItemType;
import cn.garymb.ygomobile.ui.cards.deck.DeckUtils;
import cn.garymb.ygomobile.ui.home.HomeActivity;
import cn.garymb.ygomobile.utils.IOUtils;
import cn.hutool.core.util.ArrayUtil;
import ocgcore.data.Card;
......@@ -179,7 +177,7 @@ public class DeckLoader {
}
deckInfo.addSideCards(tmp.get(id));
}
Log.w("deck.source",deckInfo.toLongString());
Log.w("deck.source", deckInfo.toLongString());
return deckInfo;
}
}
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