Optimize Card BG Texture loading

- this should be lightweight enough for devices with 4GB RAM on Android
This commit is contained in:
Anthony Calosa
2022-12-14 13:59:04 +08:00
parent c303222f6f
commit 9cf422784c
52 changed files with 156 additions and 149 deletions

View File

@@ -153,11 +153,8 @@ public class Forge implements ApplicationListener {
GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android); GuiBase.setIsAndroid(Gdx.app.getType() == Application.ApplicationType.Android);
if (!GuiBase.isAndroid() || (androidVersion > 28 && totalDeviceRAM > 7000)) { if (!GuiBase.isAndroid() || (androidVersion > 25 && totalDeviceRAM > 3400)) {
allowCardBG = true; allowCardBG = true;
} else {
// don't allow to read and process
ForgeConstants.SPRITE_CARDBG_FILE = "";
} }
assets = new Assets(); assets = new Assets();
graphics = new Graphics(); graphics = new Graphics();

View File

@@ -131,53 +131,6 @@ public enum FSkinImage implements FImage {
DRAFTRANK_A (FSkinProp.IMG_DRAFTRANK_A, SourceFile.DRAFTRANKS), DRAFTRANK_A (FSkinProp.IMG_DRAFTRANK_A, SourceFile.DRAFTRANKS),
DRAFTRANK_S (FSkinProp.IMG_DRAFTRANK_S, SourceFile.DRAFTRANKS), DRAFTRANK_S (FSkinProp.IMG_DRAFTRANK_S, SourceFile.DRAFTRANKS),
//CardBG
CARDBG_A (FSkinProp.IMG_CARDBG_A, SourceFile.CARDBG),
CARDBG_B (FSkinProp.IMG_CARDBG_B, SourceFile.CARDBG),
CARDBG_BG (FSkinProp.IMG_CARDBG_BG, SourceFile.CARDBG),
CARDBG_BR (FSkinProp.IMG_CARDBG_BR, SourceFile.CARDBG),
CARDBG_C (FSkinProp.IMG_CARDBG_C, SourceFile.CARDBG),
CARDBG_G (FSkinProp.IMG_CARDBG_G, SourceFile.CARDBG),
CARDBG_L (FSkinProp.IMG_CARDBG_L, SourceFile.CARDBG),
CARDBG_M (FSkinProp.IMG_CARDBG_M, SourceFile.CARDBG),
CARDBG_R (FSkinProp.IMG_CARDBG_R, SourceFile.CARDBG),
CARDBG_RG (FSkinProp.IMG_CARDBG_RG, SourceFile.CARDBG),
CARDBG_U (FSkinProp.IMG_CARDBG_U, SourceFile.CARDBG),
CARDBG_UB (FSkinProp.IMG_CARDBG_UB, SourceFile.CARDBG),
CARDBG_UG (FSkinProp.IMG_CARDBG_UG, SourceFile.CARDBG),
CARDBG_UR (FSkinProp.IMG_CARDBG_UR, SourceFile.CARDBG),
CARDBG_V (FSkinProp.IMG_CARDBG_V, SourceFile.CARDBG),
CARDBG_W (FSkinProp.IMG_CARDBG_W, SourceFile.CARDBG),
CARDBG_WB (FSkinProp.IMG_CARDBG_WB, SourceFile.CARDBG),
CARDBG_WG (FSkinProp.IMG_CARDBG_WG, SourceFile.CARDBG),
CARDBG_WR (FSkinProp.IMG_CARDBG_WR, SourceFile.CARDBG),
CARDBG_WU (FSkinProp.IMG_CARDBG_WU, SourceFile.CARDBG),
//PWBG
PWBG_B (FSkinProp.IMG_PWBG_B, SourceFile.CARDBG),
PWBG_BG (FSkinProp.IMG_PWBG_BG, SourceFile.CARDBG),
PWBG_BR (FSkinProp.IMG_PWBG_BR, SourceFile.CARDBG),
PWBG_C (FSkinProp.IMG_PWBG_C, SourceFile.CARDBG),
PWBG_G (FSkinProp.IMG_PWBG_G, SourceFile.CARDBG),
PWBG_M (FSkinProp.IMG_PWBG_M, SourceFile.CARDBG),
PWBG_R (FSkinProp.IMG_PWBG_R, SourceFile.CARDBG),
PWBG_RG (FSkinProp.IMG_PWBG_RG, SourceFile.CARDBG),
PWBG_U (FSkinProp.IMG_PWBG_U, SourceFile.CARDBG),
PWBG_UB (FSkinProp.IMG_PWBG_UB, SourceFile.CARDBG),
PWBG_UG (FSkinProp.IMG_PWBG_UG, SourceFile.CARDBG),
PWBG_UR (FSkinProp.IMG_PWBG_UR, SourceFile.CARDBG),
PWBG_W (FSkinProp.IMG_PWBG_W, SourceFile.CARDBG),
PWBG_WB (FSkinProp.IMG_PWBG_WB, SourceFile.CARDBG),
PWBG_WG (FSkinProp.IMG_PWBG_WG, SourceFile.CARDBG),
PWBG_WR (FSkinProp.IMG_PWBG_WR, SourceFile.CARDBG),
PWBG_WU (FSkinProp.IMG_PWBG_WU, SourceFile.CARDBG),
//NYX OVERLAY
NYX_B (FSkinProp.IMG_NYX_B, SourceFile.CARDBG),
NYX_G (FSkinProp.IMG_NYX_G, SourceFile.CARDBG),
NYX_M (FSkinProp.IMG_NYX_M, SourceFile.CARDBG),
NYX_R (FSkinProp.IMG_NYX_R, SourceFile.CARDBG),
NYX_U (FSkinProp.IMG_NYX_U, SourceFile.CARDBG),
NYX_W (FSkinProp.IMG_NYX_W, SourceFile.CARDBG),
//Gameplay //Gameplay
TAP (FSkinProp.IMG_TAP, SourceFile.MANAICONS), TAP (FSkinProp.IMG_TAP, SourceFile.MANAICONS),
UNTAP (FSkinProp.IMG_UNTAP, SourceFile.MANAICONS), UNTAP (FSkinProp.IMG_UNTAP, SourceFile.MANAICONS),
@@ -531,7 +484,6 @@ public enum FSkinImage implements FImage {
WATERMARKS(ForgeConstants.SPRITE_WATERMARK_FILE), WATERMARKS(ForgeConstants.SPRITE_WATERMARK_FILE),
DRAFTRANKS(ForgeConstants.SPRITE_DRAFTRANKS_FILE), DRAFTRANKS(ForgeConstants.SPRITE_DRAFTRANKS_FILE),
CRACKS(ForgeConstants.SPRITE_CRACKS_FILE), CRACKS(ForgeConstants.SPRITE_CRACKS_FILE),
CARDBG(ForgeConstants.SPRITE_CARDBG_FILE),
PLANAR_CONQUEST(ForgeConstants.SPRITE_PLANAR_CONQUEST_FILE); PLANAR_CONQUEST(ForgeConstants.SPRITE_PLANAR_CONQUEST_FILE);
private final String filename; private final String filename;

View File

@@ -34,6 +34,52 @@ public enum FSkinTexture implements FImage {
ADV_BG_CAVE(ForgeConstants.ADV_BG_CAVE_FILE, false, false), ADV_BG_CAVE(ForgeConstants.ADV_BG_CAVE_FILE, false, false),
ADV_BG_DUNGEON(ForgeConstants.ADV_BG_DUNGEON_FILE, false, false), ADV_BG_DUNGEON(ForgeConstants.ADV_BG_DUNGEON_FILE, false, false),
ADV_BG_CASTLE(ForgeConstants.ADV_BG_CASTLE_FILE, false, false), ADV_BG_CASTLE(ForgeConstants.ADV_BG_CASTLE_FILE, false, false),
//CARD BG
CARDBG_A (ForgeConstants.IMG_CARDBG_A, false, false),
CARDBG_B (ForgeConstants.IMG_CARDBG_B, false, false),
CARDBG_BG (ForgeConstants.IMG_CARDBG_BG, false, false),
CARDBG_BR (ForgeConstants.IMG_CARDBG_BR, false, false),
CARDBG_C (ForgeConstants.IMG_CARDBG_C, false, false),
CARDBG_G (ForgeConstants.IMG_CARDBG_G, false, false),
CARDBG_L (ForgeConstants.IMG_CARDBG_L, false, false),
CARDBG_M (ForgeConstants.IMG_CARDBG_M, false, false),
CARDBG_R (ForgeConstants.IMG_CARDBG_R, false, false),
CARDBG_RG (ForgeConstants.IMG_CARDBG_RG, false, false),
CARDBG_U (ForgeConstants.IMG_CARDBG_U, false, false),
CARDBG_UB (ForgeConstants.IMG_CARDBG_UB, false, false),
CARDBG_UG (ForgeConstants.IMG_CARDBG_UG, false, false),
CARDBG_UR (ForgeConstants.IMG_CARDBG_UR, false, false),
CARDBG_V (ForgeConstants.IMG_CARDBG_V, false, false),
CARDBG_W (ForgeConstants.IMG_CARDBG_W, false, false),
CARDBG_WB (ForgeConstants.IMG_CARDBG_WB, false, false),
CARDBG_WG (ForgeConstants.IMG_CARDBG_WG, false, false),
CARDBG_WR (ForgeConstants.IMG_CARDBG_WR, false, false),
CARDBG_WU (ForgeConstants.IMG_CARDBG_WU, false, false),
PWBG_B (ForgeConstants.IMG_PWBG_B, false, false),
PWBG_BG (ForgeConstants.IMG_PWBG_BG, false, false),
PWBG_BR (ForgeConstants.IMG_PWBG_BR, false, false),
PWBG_C (ForgeConstants.IMG_PWBG_C, false, false),
PWBG_G (ForgeConstants.IMG_PWBG_G, false, false),
PWBG_M (ForgeConstants.IMG_PWBG_M, false, false),
PWBG_R (ForgeConstants.IMG_PWBG_R, false, false),
PWBG_RG (ForgeConstants.IMG_PWBG_RG, false, false),
PWBG_U (ForgeConstants.IMG_PWBG_U, false, false),
PWBG_UB (ForgeConstants.IMG_PWBG_UB, false, false),
PWBG_UG (ForgeConstants.IMG_PWBG_UG, false, false),
PWBG_UR (ForgeConstants.IMG_PWBG_UR, false, false),
PWBG_W (ForgeConstants.IMG_PWBG_W, false, false),
PWBG_WB (ForgeConstants.IMG_PWBG_WB, false, false),
PWBG_WG (ForgeConstants.IMG_PWBG_WG, false, false),
PWBG_WR (ForgeConstants.IMG_PWBG_WR, false, false),
PWBG_WU (ForgeConstants.IMG_PWBG_WU, false, false),
NYX_B (ForgeConstants.IMG_NYX_B, false, false),
NYX_G (ForgeConstants.IMG_NYX_G, false, false),
NYX_M (ForgeConstants.IMG_NYX_M, false, false),
NYX_R (ForgeConstants.IMG_NYX_R, false, false),
NYX_U (ForgeConstants.IMG_NYX_U, false, false),
NYX_W (ForgeConstants.IMG_NYX_W, false, false),
NYX_C (ForgeConstants.IMG_NYX_C, false, false),
//Planechase //Planechase
Academy_at_Tolaria_West(ForgeConstants.BG_1, false, true), Academy_at_Tolaria_West(ForgeConstants.BG_1, false, true),
Agyrem(ForgeConstants.BG_2, false, true), Agyrem(ForgeConstants.BG_2, false, true),

View File

@@ -377,6 +377,10 @@ public class CardImageRenderer {
} }
private static void drawSplitCard(CardView card, FImageComplex cardArt, Graphics g, float x, float y, float w, float h, boolean altState, boolean isFaceDown) { private static void drawSplitCard(CardView card, FImageComplex cardArt, Graphics g, float x, float y, float w, float h, boolean altState, boolean isFaceDown) {
if (cardArt.getTexture() == forgeArt.getTexture()) {
g.drawImage(cardArt, x, y, w, h);
return;
}
CardView alt = card.getBackup(); CardView alt = card.getBackup();
if (alt == null) if (alt == null)
alt = card.getAlternateState().getCard(); alt = card.getAlternateState().getCard();
@@ -858,7 +862,7 @@ public class CardImageRenderer {
} else { } else {
borderColors = CardDetailUtil.getBorderColors(state, canShow); borderColors = CardDetailUtil.getBorderColors(state, canShow);
} }
Color[] colors = fillColorBackground(g, borderColors, x, y, w, h); Color[] colors = Forge.allowCardBG ? drawCardBackgroundTexture(state, g, !altState ? borderColors : CardDetailUtil.getBorderColors(state, canShow), x, y, w, h) : fillColorBackground(g, borderColors, x, y, w, h);
Color idForeColor = FSkinColor.getHighContrastColor(colors[0]); Color idForeColor = FSkinColor.getHighContrastColor(colors[0]);
@@ -907,79 +911,91 @@ public class CardImageRenderer {
switch (backColors.size()) { switch (backColors.size()) {
case 1: case 1:
if (backColors.get(0) == DetailColors.FACE_DOWN) { if (backColors.get(0) == DetailColors.FACE_DOWN) {
g.drawImage(FSkinImage.CARDBG_C, x, y, w, h); g.drawImage(FSkinTexture.CARDBG_C, x, y, w, h);
} else if (backColors.get(0) == DetailColors.LAND) { } else if (backColors.get(0) == DetailColors.LAND) {
g.drawImage(isPW ? FSkinImage.PWBG_C : FSkinImage.CARDBG_L, x, y, w, h); g.drawImage(isPW ? FSkinTexture.PWBG_C : FSkinTexture.CARDBG_L, x, y, w, h);
} else if (backColors.get(0) == DetailColors.MULTICOLOR) { } else if (backColors.get(0) == DetailColors.MULTICOLOR) {
g.drawImage(isPW ? FSkinImage.PWBG_M : FSkinImage.CARDBG_M, x, y, w, h);
if (isNyx) if (isNyx)
g.drawImage(FSkinImage.NYX_M, x, y, w, (h / 2) + (h / 5)); g.drawImage(FSkinTexture.NYX_M, x, y, w, h);
else
g.drawImage(isPW ? FSkinTexture.PWBG_M : FSkinTexture.CARDBG_M, x, y, w, h);
} else if (backColors.get(0) == DetailColors.COLORLESS) { } else if (backColors.get(0) == DetailColors.COLORLESS) {
if (isPW) if (isPW)
g.drawImage(FSkinImage.PWBG_C, x, y, w, h); g.drawImage(FSkinTexture.PWBG_C, x, y, w, h);
else if (state.isVehicle()) else if (state.isVehicle())
g.drawImage(FSkinImage.CARDBG_V, x, y, w, h); g.drawImage(FSkinTexture.CARDBG_V, x, y, w, h);
else if (state.isArtifact()) else if (state.isArtifact())
g.drawImage(FSkinImage.CARDBG_A, x, y, w, h); g.drawImage(FSkinTexture.CARDBG_A, x, y, w, h);
else else
g.drawImage(FSkinImage.CARDBG_C, x, y, w, h); g.drawImage(FSkinTexture.CARDBG_C, x, y, w, h);
//todo add NYX for colorless? //todo add NYX for colorless?
} else if (backColors.get(0) == DetailColors.GREEN) { } else if (backColors.get(0) == DetailColors.GREEN) {
g.drawImage(isPW ? FSkinImage.PWBG_G : FSkinImage.CARDBG_G, x, y, w, h);
if (isNyx) if (isNyx)
g.drawImage(FSkinImage.NYX_G, x, y, w, (h / 2) + (h / 5)); g.drawImage(FSkinTexture.NYX_G, x, y, w, h);
else
g.drawImage(isPW ? FSkinTexture.PWBG_G : FSkinTexture.CARDBG_G, x, y, w, h);
} else if (backColors.get(0) == DetailColors.RED) { } else if (backColors.get(0) == DetailColors.RED) {
g.drawImage(isPW ? FSkinImage.PWBG_R : FSkinImage.CARDBG_R, x, y, w, h);
if (isNyx) if (isNyx)
g.drawImage(FSkinImage.NYX_R, x, y, w, (h / 2) + (h / 5)); g.drawImage(FSkinTexture.NYX_R, x, y, w, h);
else
g.drawImage(isPW ? FSkinTexture.PWBG_R : FSkinTexture.CARDBG_R, x, y, w, h);
} else if (backColors.get(0) == DetailColors.BLACK) { } else if (backColors.get(0) == DetailColors.BLACK) {
g.drawImage(isPW ? FSkinImage.PWBG_B : FSkinImage.CARDBG_B, x, y, w, h);
if (isNyx) if (isNyx)
g.drawImage(FSkinImage.NYX_B, x, y, w, (h / 2) + (h / 5)); g.drawImage(FSkinTexture.NYX_B, x, y, w, h);
else
g.drawImage(isPW ? FSkinTexture.PWBG_B : FSkinTexture.CARDBG_B, x, y, w, h);
} else if (backColors.get(0) == DetailColors.BLUE) { } else if (backColors.get(0) == DetailColors.BLUE) {
g.drawImage(isPW ? FSkinImage.PWBG_U : FSkinImage.CARDBG_U, x, y, w, h);
if (isNyx) if (isNyx)
g.drawImage(FSkinImage.NYX_U, x, y, w, (h / 2) + (h / 5)); g.drawImage(FSkinTexture.NYX_U, x, y, w, h);
else
g.drawImage(isPW ? FSkinTexture.PWBG_U : FSkinTexture.CARDBG_U, x, y, w, h);
} else if (backColors.get(0) == DetailColors.WHITE) { } else if (backColors.get(0) == DetailColors.WHITE) {
g.drawImage(isPW ? FSkinImage.PWBG_W : FSkinImage.CARDBG_W, x, y, w, h);
if (isNyx) if (isNyx)
g.drawImage(FSkinImage.NYX_W, x, y, w, (h / 2) + (h / 5)); g.drawImage(FSkinTexture.NYX_W, x, y, w, h);
else
g.drawImage(isPW ? FSkinTexture.PWBG_W : FSkinTexture.CARDBG_W, x, y, w, h);
} }
break; break;
case 2: case 2:
if (!isHybrid) {
g.drawImage(isPW ? FSkinImage.PWBG_M : FSkinImage.CARDBG_M, x, y, w, h);
} else if (backColors.contains(DetailColors.WHITE) && backColors.contains(DetailColors.BLUE)) {
g.drawImage(isPW ? FSkinImage.PWBG_WU : FSkinImage.CARDBG_WU, x, y, w, h);
} else if (backColors.contains(DetailColors.WHITE) && backColors.contains(DetailColors.BLACK)) {
g.drawImage(isPW ? FSkinImage.PWBG_WB : FSkinImage.CARDBG_WB, x, y, w, h);
} else if (backColors.contains(DetailColors.WHITE) && backColors.contains(DetailColors.RED)) {
g.drawImage(isPW ? FSkinImage.PWBG_WR : FSkinImage.CARDBG_WR, x, y, w, h);
} else if (backColors.contains(DetailColors.WHITE) && backColors.contains(DetailColors.GREEN)) {
g.drawImage(isPW ? FSkinImage.PWBG_WG : FSkinImage.CARDBG_WG, x, y, w, h);
} else if (backColors.contains(DetailColors.BLUE) && backColors.contains(DetailColors.BLACK)) {
g.drawImage(isPW ? FSkinImage.PWBG_UB : FSkinImage.CARDBG_UB, x, y, w, h);
} else if (backColors.contains(DetailColors.BLUE) && backColors.contains(DetailColors.RED)) {
g.drawImage(isPW ? FSkinImage.PWBG_UR : FSkinImage.CARDBG_UR, x, y, w, h);
} else if (backColors.contains(DetailColors.BLUE) && backColors.contains(DetailColors.GREEN)) {
g.drawImage(isPW ? FSkinImage.PWBG_UG : FSkinImage.CARDBG_UG, x, y, w, h);
} else if (backColors.contains(DetailColors.BLACK) && backColors.contains(DetailColors.RED)) {
g.drawImage(isPW ? FSkinImage.PWBG_BR : FSkinImage.CARDBG_BR, x, y, w, h);
} else if (backColors.contains(DetailColors.BLACK) && backColors.contains(DetailColors.GREEN)) {
g.drawImage(isPW ? FSkinImage.PWBG_BG : FSkinImage.CARDBG_BG, x, y, w, h);
} else if (backColors.contains(DetailColors.RED) && backColors.contains(DetailColors.GREEN)) {
g.drawImage(isPW ? FSkinImage.PWBG_RG : FSkinImage.CARDBG_RG, x, y, w, h);
}
if (isNyx) if (isNyx)
g.drawImage(FSkinImage.NYX_M, x, y, w, (h / 2) + (h / 5)); g.drawImage(FSkinTexture.NYX_M, x, y, w, h);
else {
if (!isHybrid) {
g.drawImage(isPW ? FSkinTexture.PWBG_M : FSkinTexture.CARDBG_M, x, y, w, h);
} else if (backColors.contains(DetailColors.WHITE) && backColors.contains(DetailColors.BLUE)) {
g.drawImage(isPW ? FSkinTexture.PWBG_WU : FSkinTexture.CARDBG_WU, x, y, w, h);
} else if (backColors.contains(DetailColors.WHITE) && backColors.contains(DetailColors.BLACK)) {
g.drawImage(isPW ? FSkinTexture.PWBG_WB : FSkinTexture.CARDBG_WB, x, y, w, h);
} else if (backColors.contains(DetailColors.WHITE) && backColors.contains(DetailColors.RED)) {
g.drawImage(isPW ? FSkinTexture.PWBG_WR : FSkinTexture.CARDBG_WR, x, y, w, h);
} else if (backColors.contains(DetailColors.WHITE) && backColors.contains(DetailColors.GREEN)) {
g.drawImage(isPW ? FSkinTexture.PWBG_WG : FSkinTexture.CARDBG_WG, x, y, w, h);
} else if (backColors.contains(DetailColors.BLUE) && backColors.contains(DetailColors.BLACK)) {
g.drawImage(isPW ? FSkinTexture.PWBG_UB : FSkinTexture.CARDBG_UB, x, y, w, h);
} else if (backColors.contains(DetailColors.BLUE) && backColors.contains(DetailColors.RED)) {
g.drawImage(isPW ? FSkinTexture.PWBG_UR : FSkinTexture.CARDBG_UR, x, y, w, h);
} else if (backColors.contains(DetailColors.BLUE) && backColors.contains(DetailColors.GREEN)) {
g.drawImage(isPW ? FSkinTexture.PWBG_UG : FSkinTexture.CARDBG_UG, x, y, w, h);
} else if (backColors.contains(DetailColors.BLACK) && backColors.contains(DetailColors.RED)) {
g.drawImage(isPW ? FSkinTexture.PWBG_BR : FSkinTexture.CARDBG_BR, x, y, w, h);
} else if (backColors.contains(DetailColors.BLACK) && backColors.contains(DetailColors.GREEN)) {
g.drawImage(isPW ? FSkinTexture.PWBG_BG : FSkinTexture.CARDBG_BG, x, y, w, h);
} else if (backColors.contains(DetailColors.RED) && backColors.contains(DetailColors.GREEN)) {
g.drawImage(isPW ? FSkinTexture.PWBG_RG : FSkinTexture.CARDBG_RG, x, y, w, h);
}
}
break; break;
case 3: case 3:
g.drawImage(isPW ? FSkinImage.PWBG_M : FSkinImage.CARDBG_M, x, y, w, h);
if (isNyx) if (isNyx)
g.drawImage(FSkinImage.NYX_M, x, y, w, (h / 2) + (h / 5)); g.drawImage(FSkinTexture.NYX_M, x, y, w, h);
else
g.drawImage(isPW ? FSkinTexture.PWBG_M : FSkinTexture.CARDBG_M, x, y, w, h);
break; break;
default: default:
g.drawImage(isPW ? FSkinImage.PWBG_C : FSkinImage.CARDBG_C, x, y, w, h); if (isNyx)
g.drawImage(FSkinTexture.NYX_C, x, y, w, h);
else
g.drawImage(isPW ? FSkinTexture.PWBG_C : FSkinTexture.CARDBG_C, x, y, w, h);
break; break;
} }
return colors; return colors;

View File

@@ -594,7 +594,7 @@ public class CardRenderer {
} }
} else { } else {
//if card has invalid or no texture due to sudden changes in ImageCache, draw CardImageRenderer instead and wait for it to refresh automatically //if card has invalid or no texture due to sudden changes in ImageCache, draw CardImageRenderer instead and wait for it to refresh automatically
CardImageRenderer.drawCardImage(g, CardView.getCardForUi(pc), false, x, y, w, h, pos, Forge.enableUIMask.equals("Art"), true); CardImageRenderer.drawCardImage(g, CardView.getCardForUi(pc), false, x, y, w, h, pos, true, true);
} }
} }
@@ -662,7 +662,7 @@ public class CardRenderer {
drawFoilEffect(g, card, x, y, w, h, false); drawFoilEffect(g, card, x, y, w, h, false);
} else { } else {
//if card has invalid or no texture due to sudden changes in ImageCache, draw CardImageRenderer instead and wait for it to refresh automatically //if card has invalid or no texture due to sudden changes in ImageCache, draw CardImageRenderer instead and wait for it to refresh automatically
CardImageRenderer.drawCardImage(g, card, showAltState, x, y, w, h, pos, Forge.enableUIMask.equals("Art"), false, isChoiceList, !showCardIdOverlay(card)); CardImageRenderer.drawCardImage(g, card, showAltState, x, y, w, h, pos, true, false, isChoiceList, !showCardIdOverlay(card));
} }
g.setAlphaComposite(oldAlpha); g.setAlphaComposite(oldAlpha);
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

View File

@@ -130,7 +130,6 @@ public final class ForgeConstants {
public static final String SPRITE_SETLOGO_FILE = "sprite_setlogo.png"; public static final String SPRITE_SETLOGO_FILE = "sprite_setlogo.png";
public static final String SPRITE_WATERMARK_FILE = "sprite_watermark.png"; public static final String SPRITE_WATERMARK_FILE = "sprite_watermark.png";
public static final String SPRITE_DRAFTRANKS_FILE = "sprite_draftranks.png"; public static final String SPRITE_DRAFTRANKS_FILE = "sprite_draftranks.png";
public static String SPRITE_CARDBG_FILE = "sprite_cardbg.png";
public static final String FONT_FILE = "font1.ttf"; public static final String FONT_FILE = "font1.ttf";
public static final String SPLASH_BG_FILE = "bg_splash.png"; public static final String SPLASH_BG_FILE = "bg_splash.png";
public static final String MATCH_BG_FILE = "bg_match.jpg"; public static final String MATCH_BG_FILE = "bg_match.jpg";
@@ -243,6 +242,51 @@ public final class ForgeConstants {
public static final String BG_84 = "Morphic_Tide.jpg"; public static final String BG_84 = "Morphic_Tide.jpg";
public static final String BG_85 = "Mutual_Epiphany.jpg"; public static final String BG_85 = "Mutual_Epiphany.jpg";
public static final String BG_86 = "Time_Distortion.jpg"; public static final String BG_86 = "Time_Distortion.jpg";
//CARD BG
public static final String IMG_CARDBG_A = "IMG_CARDBG_A.png";
public static final String IMG_CARDBG_B = "IMG_CARDBG_B.png";
public static final String IMG_CARDBG_BG = "IMG_CARDBG_BG.png";
public static final String IMG_CARDBG_BR = "IMG_CARDBG_BR.png";
public static final String IMG_CARDBG_C = "IMG_CARDBG_C.png";
public static final String IMG_CARDBG_G = "IMG_CARDBG_G.png";
public static final String IMG_CARDBG_L = "IMG_CARDBG_L.png";
public static final String IMG_CARDBG_M = "IMG_CARDBG_M.png";
public static final String IMG_CARDBG_R = "IMG_CARDBG_R.png";
public static final String IMG_CARDBG_RG = "IMG_CARDBG_RG.png";
public static final String IMG_CARDBG_U = "IMG_CARDBG_U.png";
public static final String IMG_CARDBG_UB = "IMG_CARDBG_UB.png";
public static final String IMG_CARDBG_UG = "IMG_CARDBG_UG.png";
public static final String IMG_CARDBG_UR = "IMG_CARDBG_UR.png";
public static final String IMG_CARDBG_V = "IMG_CARDBG_V.png";
public static final String IMG_CARDBG_W = "IMG_CARDBG_W.png";
public static final String IMG_CARDBG_WB = "IMG_CARDBG_WB.png";
public static final String IMG_CARDBG_WG = "IMG_CARDBG_WG.png";
public static final String IMG_CARDBG_WR = "IMG_CARDBG_WR.png";
public static final String IMG_CARDBG_WU = "IMG_CARDBG_WU.png";
public static final String IMG_PWBG_B = "IMG_PWBG_B.png";
public static final String IMG_PWBG_BG = "IMG_PWBG_BG.png";
public static final String IMG_PWBG_BR = "IMG_PWBG_BR.png";
public static final String IMG_PWBG_C = "IMG_PWBG_C.png";
public static final String IMG_PWBG_G = "IMG_PWBG_G.png";
public static final String IMG_PWBG_M = "IMG_PWBG_M.png";
public static final String IMG_PWBG_R = "IMG_PWBG_R.png";
public static final String IMG_PWBG_RG = "IMG_PWBG_RG.png";
public static final String IMG_PWBG_U = "IMG_PWBG_U.png";
public static final String IMG_PWBG_UB = "IMG_PWBG_UB.png";
public static final String IMG_PWBG_UG = "IMG_PWBG_UG.png";
public static final String IMG_PWBG_UR = "IMG_PWBG_UR.png";
public static final String IMG_PWBG_W = "IMG_PWBG_W.png";
public static final String IMG_PWBG_WB = "IMG_PWBG_WB.png";
public static final String IMG_PWBG_WG = "IMG_PWBG_WG.png";
public static final String IMG_PWBG_WR = "IMG_PWBG_WR.png";
public static final String IMG_PWBG_WU = "IMG_PWBG_WU.png";
public static final String IMG_NYX_B = "IMG_NYX_B.png";
public static final String IMG_NYX_G = "IMG_NYX_G.png";
public static final String IMG_NYX_M = "IMG_NYX_M.png";
public static final String IMG_NYX_R = "IMG_NYX_R.png";
public static final String IMG_NYX_U = "IMG_NYX_U.png";
public static final String IMG_NYX_W = "IMG_NYX_W.png";
public static final String IMG_NYX_C = "IMG_NYX_C.png";
// data tree roots // data tree roots
public static final String USER_DIR; public static final String USER_DIR;

View File

@@ -472,53 +472,6 @@ public enum FSkinProp {
IMG_DRAFTRANK_A (new int[] {244, 244, 240, 240}, PropType.DRAFTRANKS), IMG_DRAFTRANK_A (new int[] {244, 244, 240, 240}, PropType.DRAFTRANKS),
IMG_DRAFTRANK_S (new int[] {2, 486, 240, 240}, PropType.DRAFTRANKS), IMG_DRAFTRANK_S (new int[] {2, 486, 240, 240}, PropType.DRAFTRANKS),
//FOR CARDBG
IMG_CARDBG_A (new int[] {2, 2, 339, 496}, PropType.CARDBG),
IMG_CARDBG_B (new int[] {343, 2, 339, 496}, PropType.CARDBG),
IMG_CARDBG_BG (new int[] {684, 2, 339, 496}, PropType.CARDBG),
IMG_CARDBG_BR (new int[] {1025, 2, 339, 496}, PropType.CARDBG),
IMG_CARDBG_C (new int[] {1366, 2, 339, 496}, PropType.CARDBG),
IMG_CARDBG_G (new int[] {2, 500, 339, 496}, PropType.CARDBG),
IMG_CARDBG_L (new int[] {343, 500, 339, 496}, PropType.CARDBG),
IMG_CARDBG_M (new int[] {684, 500, 339, 496}, PropType.CARDBG),
IMG_CARDBG_R (new int[] {1025, 500, 339, 496}, PropType.CARDBG),
IMG_CARDBG_RG (new int[] {1366, 500, 339, 496}, PropType.CARDBG),
IMG_CARDBG_U (new int[] {2, 998, 339, 496}, PropType.CARDBG),
IMG_CARDBG_UB (new int[] {343, 998, 339, 496}, PropType.CARDBG),
IMG_CARDBG_UG (new int[] {684, 998, 339, 496}, PropType.CARDBG),
IMG_CARDBG_UR (new int[] {1025, 998, 339, 496}, PropType.CARDBG),
IMG_CARDBG_V (new int[] {1366, 998, 339, 496}, PropType.CARDBG),
IMG_CARDBG_W (new int[] {2, 1496, 339, 496}, PropType.CARDBG),
IMG_CARDBG_WB (new int[] {343, 1496, 339, 496}, PropType.CARDBG),
IMG_CARDBG_WG (new int[] {684, 1496, 339, 496}, PropType.CARDBG),
IMG_CARDBG_WR (new int[] {1025, 1496, 339, 496}, PropType.CARDBG),
IMG_CARDBG_WU (new int[] {1366, 1496, 339, 496}, PropType.CARDBG),
//FOR PW BG
IMG_PWBG_B (new int[] {2, 1994, 339, 496}, PropType.CARDBG),
IMG_PWBG_BG (new int[] {343, 1994, 339, 496}, PropType.CARDBG),
IMG_PWBG_BR (new int[] {684, 1994, 339, 496}, PropType.CARDBG),
IMG_PWBG_C (new int[] {1025, 1994, 339, 496}, PropType.CARDBG),
IMG_PWBG_G (new int[] {1366, 1994, 339, 496}, PropType.CARDBG),
IMG_PWBG_M (new int[] {2, 2492, 339, 496}, PropType.CARDBG),
IMG_PWBG_R (new int[] {343, 2492, 339, 496}, PropType.CARDBG),
IMG_PWBG_RG (new int[] {684, 2492, 339, 496}, PropType.CARDBG),
IMG_PWBG_U (new int[] {1025, 2492, 339, 496}, PropType.CARDBG),
IMG_PWBG_UB (new int[] {1366, 2492, 339, 496}, PropType.CARDBG),
IMG_PWBG_UG (new int[] {2, 2990, 339, 496}, PropType.CARDBG),
IMG_PWBG_UR (new int[] {343, 2990, 339, 496}, PropType.CARDBG),
IMG_PWBG_W (new int[] {684, 2990, 339, 496}, PropType.CARDBG),
IMG_PWBG_WB (new int[] {1025, 2990, 339, 496}, PropType.CARDBG),
IMG_PWBG_WG (new int[] {1366, 2990, 339, 496}, PropType.CARDBG),
IMG_PWBG_WR (new int[] {2, 3488, 339, 496}, PropType.CARDBG),
IMG_PWBG_WU (new int[] {343, 3488, 339, 496}, PropType.CARDBG),
//NYX OVERLAY
IMG_NYX_B (new int[] {684, 3488, 339, 248}, PropType.CARDBG),
IMG_NYX_G (new int[] {1025, 3488, 339, 248}, PropType.CARDBG),
IMG_NYX_M (new int[] {1366, 3488, 339, 248}, PropType.CARDBG),
IMG_NYX_R (new int[] {684, 3736, 339, 248}, PropType.CARDBG),
IMG_NYX_U (new int[] {1025, 3736, 339, 248}, PropType.CARDBG),
IMG_NYX_W (new int[] {1366, 3736, 339, 248}, PropType.CARDBG),
IMG_FAV1 (new int[] {0, 0, 100, 100}, PropType.FAVICON), IMG_FAV1 (new int[] {0, 0, 100, 100}, PropType.FAVICON),
IMG_FAV2 (new int[] {100, 0, 100, 100}, PropType.FAVICON), IMG_FAV2 (new int[] {100, 0, 100, 100}, PropType.FAVICON),
IMG_FAV3 (new int[] {200, 0, 100, 100}, PropType.FAVICON), IMG_FAV3 (new int[] {200, 0, 100, 100}, PropType.FAVICON),
@@ -626,7 +579,6 @@ public enum FSkinProp {
SETLOGO, SETLOGO,
WATERMARKS, WATERMARKS,
DRAFTRANKS, DRAFTRANKS,
CARDBG,
FAVICON FAVICON
} }
} }