CloneRewrite

This commit is contained in:
Hanmac
2019-01-09 08:11:59 +01:00
parent 744a6a42e8
commit ba8a38c2f4
28 changed files with 675 additions and 411 deletions

View File

@@ -85,7 +85,7 @@ public class CardImageRenderer {
//determine colors for borders
final List<DetailColors> borderColors;
final boolean isFaceDown = card.getCurrentState().getState() == CardStateName.FaceDown;
final boolean isFaceDown = card.isFaceDown();
if (isFaceDown) {
borderColors = ImmutableList.of(DetailColors.FACE_DOWN);
}
@@ -371,7 +371,7 @@ public class CardImageRenderer {
//determine colors for borders
final List<DetailColors> borderColors;
final boolean isFaceDown = card.getCurrentState().getState() == CardStateName.FaceDown;
final boolean isFaceDown = card.isFaceDown();
if (isFaceDown) {
borderColors = ImmutableList.of(DetailColors.FACE_DOWN);
}

View File

@@ -213,7 +213,7 @@ public class CardRenderer {
return cardArt;
}
public static FImageComplex getAftermathSecondCardArt(String imageKey) {
public static FImageComplex getAftermathSecondCardArt(final String imageKey) {
FImageComplex cardArt = cardArtCache.get("Aftermath_second_"+imageKey);
if (cardArt == null) {
Texture image = new CachedCardImage(imageKey) {
@@ -439,7 +439,7 @@ public class CardRenderer {
// TODO: A hacky workaround is currently used to make the game not leak the color information for Morph cards.
final CardStateView details = card.getCurrentState();
final boolean isFaceDown = details.getState() == CardStateName.FaceDown;
final boolean isFaceDown = card.isFaceDown();
final DetailColors borderColor = isFaceDown ? CardDetailUtil.DetailColors.FACE_DOWN : CardDetailUtil.getBorderColor(details, canShow); // canShow doesn't work here for face down Morphs
Color color = FSkinColor.fromRGB(borderColor.r, borderColor.g, borderColor.b);
color = FSkinColor.tintColor(Color.WHITE, color, CardRenderer.PT_BOX_TINT);

View File

@@ -242,8 +242,7 @@ public class VStack extends FDropDown {
}
// TODO: A hacky workaround is currently used to make the game not leak the color information for Morph cards.
final CardStateView curState = card.getCurrentState();
final boolean isFaceDown = curState.getState() == CardStateName.FaceDown;
final boolean isFaceDown = card.isFaceDown();
final DetailColors color = isFaceDown ? CardDetailUtil.DetailColors.FACE_DOWN : CardDetailUtil.getBorderColor(card.getCurrentState(), true); // otherwise doesn't work correctly for face down Morphs
backColor = FSkinColor.fromRGB(color.r, color.g, color.b);
foreColor = FSkinColor.getHighContrastColor(backColor);