mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Update land watermarks
This commit is contained in:
@@ -25,6 +25,7 @@ public class CardFaceSymbols {
|
|||||||
/** Constant <code>manaImages</code>. */
|
/** Constant <code>manaImages</code>. */
|
||||||
private static final Map<String, SkinImage> MANA_IMAGES = new HashMap<>();
|
private static final Map<String, SkinImage> MANA_IMAGES = new HashMap<>();
|
||||||
private static final Map<String, SkinImage> DECK_COLORSET = new HashMap<>();
|
private static final Map<String, SkinImage> DECK_COLORSET = new HashMap<>();
|
||||||
|
private static final Map<String, SkinImage> WATERMARKS = new HashMap<>();
|
||||||
|
|
||||||
private static final int manaImageSize = 13;
|
private static final int manaImageSize = 13;
|
||||||
|
|
||||||
@@ -34,6 +35,13 @@ public class CardFaceSymbols {
|
|||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
public static void loadImages() {
|
public static void loadImages() {
|
||||||
|
WATERMARKS.put("C", FSkin.getImage(FSkinProp.IMG_WATERMARK_C));
|
||||||
|
WATERMARKS.put("R", FSkin.getImage(FSkinProp.IMG_WATERMARK_R));
|
||||||
|
WATERMARKS.put("G", FSkin.getImage(FSkinProp.IMG_WATERMARK_G));
|
||||||
|
WATERMARKS.put("B", FSkin.getImage(FSkinProp.IMG_WATERMARK_B));
|
||||||
|
WATERMARKS.put("U", FSkin.getImage(FSkinProp.IMG_WATERMARK_U));
|
||||||
|
WATERMARKS.put("W", FSkin.getImage(FSkinProp.IMG_WATERMARK_W));
|
||||||
|
|
||||||
DECK_COLORSET.put("C", FSkin.getImage(FSkinProp.IMG_MANA_COLORLESS));
|
DECK_COLORSET.put("C", FSkin.getImage(FSkinProp.IMG_MANA_COLORLESS));
|
||||||
DECK_COLORSET.put("R", FSkin.getImage(FSkinProp.IMG_MANA_R));
|
DECK_COLORSET.put("R", FSkin.getImage(FSkinProp.IMG_MANA_R));
|
||||||
DECK_COLORSET.put("G", FSkin.getImage(FSkinProp.IMG_MANA_G));
|
DECK_COLORSET.put("G", FSkin.getImage(FSkinProp.IMG_MANA_G));
|
||||||
@@ -282,6 +290,9 @@ public class CardFaceSymbols {
|
|||||||
public static void drawSymbol(final String imageName, final Graphics g, final int x, final int y, final int size) {
|
public static void drawSymbol(final String imageName, final Graphics g, final int x, final int y, final int size) {
|
||||||
FSkin.drawImage(g, MANA_IMAGES.get(imageName).resize(size, size), x, y);
|
FSkin.drawImage(g, MANA_IMAGES.get(imageName).resize(size, size), x, y);
|
||||||
}
|
}
|
||||||
|
public static void drawWatermark(final String imageName, final Graphics g, final int x, final int y, final int size) {
|
||||||
|
FSkin.drawImage(g, WATERMARKS.get(imageName).resize(size, size), x, y);
|
||||||
|
}
|
||||||
public static void drawAbilitySymbol(final String imageName, final Graphics g, final int x, final int y, final int w, final int h) {
|
public static void drawAbilitySymbol(final String imageName, final Graphics g, final int x, final int y, final int w, final int h) {
|
||||||
FSkin.drawImage(g, MANA_IMAGES.get(imageName), x, y, w, h);
|
FSkin.drawImage(g, MANA_IMAGES.get(imageName), x, y, w, h);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1108,7 +1108,7 @@ public class FSkin {
|
|||||||
private static String preferredDir;
|
private static String preferredDir;
|
||||||
private static String preferredName;
|
private static String preferredName;
|
||||||
private static BufferedImage bimDefaultSprite, bimFavIcon, bimPreferredSprite, bimFoils, bimQuestDraftDeck, bimOldFoils,
|
private static BufferedImage bimDefaultSprite, bimFavIcon, bimPreferredSprite, bimFoils, bimQuestDraftDeck, bimOldFoils,
|
||||||
bimDefaultAvatars, bimPreferredAvatars, bimTrophies, bimAbilities, bimManaIcons, bimDefaultSleeve, bimDefaultSleeve2, bimDefaultDeckbox, bimPrefferedSetLogo;
|
bimDefaultAvatars, bimPreferredAvatars, bimTrophies, bimAbilities, bimManaIcons, bimDefaultSleeve, bimDefaultSleeve2, bimDefaultDeckbox, bimPrefferedSetLogo, bimDefaultWatermark;
|
||||||
private static int x0, y0, w0, h0, newW, newH, preferredW, preferredH;
|
private static int x0, y0, w0, h0, newW, newH, preferredW, preferredH;
|
||||||
private static int[] tempCoords;
|
private static int[] tempCoords;
|
||||||
private static int defaultFontSize = 12;
|
private static int defaultFontSize = 12;
|
||||||
@@ -1248,6 +1248,7 @@ public class FSkin {
|
|||||||
final File f14 = new File(defaultDir + ForgeConstants.SPRITE_DECKBOX_FILE);
|
final File f14 = new File(defaultDir + ForgeConstants.SPRITE_DECKBOX_FILE);
|
||||||
final File f15 = new File(defaultDir + ForgeConstants.SPRITE_SETLOGO_FILE);
|
final File f15 = new File(defaultDir + ForgeConstants.SPRITE_SETLOGO_FILE);
|
||||||
final File f16 = new File(preferredDir + ForgeConstants.SPRITE_SETLOGO_FILE);
|
final File f16 = new File(preferredDir + ForgeConstants.SPRITE_SETLOGO_FILE);
|
||||||
|
final File f17 = new File(defaultDir + ForgeConstants.SPRITE_WATERMARK_FILE);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
int p = 0;
|
int p = 0;
|
||||||
@@ -1273,6 +1274,8 @@ public class FSkin {
|
|||||||
FView.SINGLETON_INSTANCE.incrementSplashProgessBar(++p);
|
FView.SINGLETON_INSTANCE.incrementSplashProgessBar(++p);
|
||||||
bimPrefferedSetLogo = f16.exists() ? ImageIO.read(f16) : ImageIO.read(f15);
|
bimPrefferedSetLogo = f16.exists() ? ImageIO.read(f16) : ImageIO.read(f15);
|
||||||
FView.SINGLETON_INSTANCE.incrementSplashProgessBar(++p);
|
FView.SINGLETON_INSTANCE.incrementSplashProgessBar(++p);
|
||||||
|
bimDefaultWatermark = ImageIO.read(f17);
|
||||||
|
FView.SINGLETON_INSTANCE.incrementSplashProgessBar(++p);
|
||||||
bimTrophies = ImageIO.read(f7);
|
bimTrophies = ImageIO.read(f7);
|
||||||
FView.SINGLETON_INSTANCE.incrementSplashProgessBar(++p);
|
FView.SINGLETON_INSTANCE.incrementSplashProgessBar(++p);
|
||||||
bimQuestDraftDeck = ImageIO.read(f8);
|
bimQuestDraftDeck = ImageIO.read(f8);
|
||||||
@@ -1337,6 +1340,9 @@ public class FSkin {
|
|||||||
case SETLOGO:
|
case SETLOGO:
|
||||||
setImage(prop, bimPrefferedSetLogo);
|
setImage(prop, bimPrefferedSetLogo);
|
||||||
break;
|
break;
|
||||||
|
case WATERMARKS:
|
||||||
|
setImage(prop, bimDefaultWatermark);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1361,6 +1367,7 @@ public class FSkin {
|
|||||||
bimDefaultSleeve2.flush();
|
bimDefaultSleeve2.flush();
|
||||||
bimDefaultDeckbox.flush();
|
bimDefaultDeckbox.flush();
|
||||||
bimPrefferedSetLogo.flush();
|
bimPrefferedSetLogo.flush();
|
||||||
|
bimDefaultWatermark.flush();
|
||||||
bimQuestDraftDeck.flush();
|
bimQuestDraftDeck.flush();
|
||||||
bimTrophies.flush();
|
bimTrophies.flush();
|
||||||
bimAbilities.flush();
|
bimAbilities.flush();
|
||||||
@@ -1377,6 +1384,7 @@ public class FSkin {
|
|||||||
bimDefaultSleeve2 = null;
|
bimDefaultSleeve2 = null;
|
||||||
bimDefaultDeckbox = null;
|
bimDefaultDeckbox = null;
|
||||||
bimPrefferedSetLogo = null;
|
bimPrefferedSetLogo = null;
|
||||||
|
bimDefaultWatermark = null;
|
||||||
bimPreferredAvatars = null;
|
bimPreferredAvatars = null;
|
||||||
bimQuestDraftDeck = null;
|
bimQuestDraftDeck = null;
|
||||||
bimTrophies = null;
|
bimTrophies = null;
|
||||||
|
|||||||
@@ -777,7 +777,7 @@ public class FCardImageRenderer {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
int iconSize = Math.round(h * 0.75f);
|
int iconSize = Math.round(h * 0.75f);
|
||||||
CardFaceSymbols.drawSymbol(imageKey, g, x + (w - iconSize) / 2, y + (h - iconSize) / 2, iconSize);
|
CardFaceSymbols.drawWatermark(imageKey, g, x + (w - iconSize) / 2, y + (h - iconSize) / 2, iconSize);
|
||||||
} else {
|
} else {
|
||||||
if (StringUtils.isEmpty(text))
|
if (StringUtils.isEmpty(text))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ public class FSkin {
|
|||||||
private static final Map<Integer, TextureRegion> borders = new HashMap<>();
|
private static final Map<Integer, TextureRegion> borders = new HashMap<>();
|
||||||
private static final Map<Integer, TextureRegion> deckbox = new HashMap<>();
|
private static final Map<Integer, TextureRegion> deckbox = new HashMap<>();
|
||||||
private static final Map<Integer, TextureRegion> setlogo = new HashMap<>();
|
private static final Map<Integer, TextureRegion> setlogo = new HashMap<>();
|
||||||
|
private static final Map<Integer, TextureRegion> watermarks = new HashMap<>();
|
||||||
|
|
||||||
private static Array<String> allSkins;
|
private static Array<String> allSkins;
|
||||||
private static FileHandle preferredDir;
|
private static FileHandle preferredDir;
|
||||||
@@ -220,6 +221,7 @@ public class FSkin {
|
|||||||
final FileHandle f13 = getDefaultSkinFile(ForgeConstants.SPRITE_DECKBOX_FILE);
|
final FileHandle f13 = getDefaultSkinFile(ForgeConstants.SPRITE_DECKBOX_FILE);
|
||||||
final FileHandle f14 = getDefaultSkinFile(ForgeConstants.SPRITE_SETLOGO_FILE);
|
final FileHandle f14 = getDefaultSkinFile(ForgeConstants.SPRITE_SETLOGO_FILE);
|
||||||
final FileHandle f15 = getSkinFile(ForgeConstants.SPRITE_SETLOGO_FILE);
|
final FileHandle f15 = getSkinFile(ForgeConstants.SPRITE_SETLOGO_FILE);
|
||||||
|
final FileHandle f16 = getDefaultSkinFile(ForgeConstants.SPRITE_WATERMARK_FILE);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
textures.put(f1.path(), new Texture(f1));
|
textures.put(f1.path(), new Texture(f1));
|
||||||
@@ -391,20 +393,6 @@ public class FSkin {
|
|||||||
FSkin.deckbox.put(1, new TextureRegion(deckboxes, 492, 2, 488, 680));
|
FSkin.deckbox.put(1, new TextureRegion(deckboxes, 492, 2, 488, 680));
|
||||||
//generic deck box
|
//generic deck box
|
||||||
FSkin.deckbox.put(2, new TextureRegion(deckboxes, 982, 2, 488, 680));
|
FSkin.deckbox.put(2, new TextureRegion(deckboxes, 982, 2, 488, 680));
|
||||||
//setlogo
|
|
||||||
Texture setlogos = f15.exists() ? new Texture(f15, textureFilter) : new Texture(f14, textureFilter);
|
|
||||||
if (textureFilter)
|
|
||||||
setlogos.setFilter(Texture.TextureFilter.MipMapLinearLinear, Texture.TextureFilter.Linear);
|
|
||||||
//common logo
|
|
||||||
FSkin.setlogo.put(0, new TextureRegion(setlogos, 2, 2, 520, 451));
|
|
||||||
//uncommon logo
|
|
||||||
FSkin.setlogo.put(1, new TextureRegion(setlogos, 2, 455, 520, 451));
|
|
||||||
//rare logo
|
|
||||||
FSkin.setlogo.put(2, new TextureRegion(setlogos, 2, 908, 520, 451));
|
|
||||||
//mythic logo
|
|
||||||
FSkin.setlogo.put(3, new TextureRegion(setlogos, 2, 1361, 520, 451));
|
|
||||||
//special logo
|
|
||||||
FSkin.setlogo.put(4, new TextureRegion(setlogos, 2, 1814, 520, 451));
|
|
||||||
|
|
||||||
preferredIcons.dispose();
|
preferredIcons.dispose();
|
||||||
pxDefaultAvatars.dispose();
|
pxDefaultAvatars.dispose();
|
||||||
|
|||||||
@@ -107,6 +107,14 @@ public enum FSkinImage implements FImage {
|
|||||||
SET_MYTHIC (FSkinProp.IMG_SETLOGO_MYTHIC, SourceFile.SETLOGOS),
|
SET_MYTHIC (FSkinProp.IMG_SETLOGO_MYTHIC, SourceFile.SETLOGOS),
|
||||||
SET_SPECIAL (FSkinProp.IMG_SETLOGO_SPECIAL, SourceFile.SETLOGOS),
|
SET_SPECIAL (FSkinProp.IMG_SETLOGO_SPECIAL, SourceFile.SETLOGOS),
|
||||||
|
|
||||||
|
//Watermarks
|
||||||
|
WATERMARK_G (FSkinProp.IMG_WATERMARK_G, SourceFile.WATERMARKS),
|
||||||
|
WATERMARK_R (FSkinProp.IMG_WATERMARK_R, SourceFile.WATERMARKS),
|
||||||
|
WATERMARK_B (FSkinProp.IMG_WATERMARK_B, SourceFile.WATERMARKS),
|
||||||
|
WATERMARK_U (FSkinProp.IMG_WATERMARK_U, SourceFile.WATERMARKS),
|
||||||
|
WATERMARK_W (FSkinProp.IMG_WATERMARK_W, SourceFile.WATERMARKS),
|
||||||
|
WATERMARK_C (FSkinProp.IMG_WATERMARK_C, SourceFile.WATERMARKS),
|
||||||
|
|
||||||
//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),
|
||||||
@@ -430,6 +438,7 @@ public enum FSkinImage implements FImage {
|
|||||||
BTNSTART(ForgeConstants.SPRITE_START_FILE),
|
BTNSTART(ForgeConstants.SPRITE_START_FILE),
|
||||||
MANAICONS(ForgeConstants.SPRITE_MANAICONS_FILE),
|
MANAICONS(ForgeConstants.SPRITE_MANAICONS_FILE),
|
||||||
SETLOGOS(ForgeConstants.SPRITE_SETLOGO_FILE),
|
SETLOGOS(ForgeConstants.SPRITE_SETLOGO_FILE),
|
||||||
|
WATERMARKS(ForgeConstants.SPRITE_WATERMARK_FILE),
|
||||||
PLANAR_CONQUEST(ForgeConstants.SPRITE_PLANAR_CONQUEST_FILE);
|
PLANAR_CONQUEST(ForgeConstants.SPRITE_PLANAR_CONQUEST_FILE);
|
||||||
|
|
||||||
private final String filename;
|
private final String filename;
|
||||||
|
|||||||
@@ -270,22 +270,22 @@ public class CardImageRenderer {
|
|||||||
FSkinImage image;
|
FSkinImage image;
|
||||||
switch (state.getName().replaceFirst("^Snow-Covered ", "")) {
|
switch (state.getName().replaceFirst("^Snow-Covered ", "")) {
|
||||||
case "Plains":
|
case "Plains":
|
||||||
image = FSkinImage.MANA_W;
|
image = FSkinImage.WATERMARK_W;
|
||||||
break;
|
break;
|
||||||
case "Island":
|
case "Island":
|
||||||
image = FSkinImage.MANA_U;
|
image = FSkinImage.WATERMARK_U;
|
||||||
break;
|
break;
|
||||||
case "Swamp":
|
case "Swamp":
|
||||||
image = FSkinImage.MANA_B;
|
image = FSkinImage.WATERMARK_B;
|
||||||
break;
|
break;
|
||||||
case "Mountain":
|
case "Mountain":
|
||||||
image = FSkinImage.MANA_R;
|
image = FSkinImage.WATERMARK_R;
|
||||||
break;
|
break;
|
||||||
case "Forest":
|
case "Forest":
|
||||||
image = FSkinImage.MANA_G;
|
image = FSkinImage.WATERMARK_G;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
image = FSkinImage.MANA_COLORLESS;
|
image = FSkinImage.WATERMARK_C;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
float iconSize = h * 0.75f;
|
float iconSize = h * 0.75f;
|
||||||
|
|||||||
BIN
forge-gui/res/skins/default/sprite_watermark.png
Normal file
BIN
forge-gui/res/skins/default/sprite_watermark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 354 KiB |
@@ -121,6 +121,7 @@ public final class ForgeConstants {
|
|||||||
public static final String SPRITE_FAVICONS_FILE = "sprite_favicons.png";
|
public static final String SPRITE_FAVICONS_FILE = "sprite_favicons.png";
|
||||||
public static final String SPRITE_PLANAR_CONQUEST_FILE = "sprite_planar_conquest.png";
|
public static final String SPRITE_PLANAR_CONQUEST_FILE = "sprite_planar_conquest.png";
|
||||||
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 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";
|
||||||
|
|||||||
@@ -402,6 +402,14 @@ public enum FSkinProp {
|
|||||||
IMG_SETLOGO_MYTHIC (new int[] {2, 1361, 520, 451}, PropType.SETLOGO),
|
IMG_SETLOGO_MYTHIC (new int[] {2, 1361, 520, 451}, PropType.SETLOGO),
|
||||||
IMG_SETLOGO_SPECIAL (new int[] {2, 1814, 520, 451}, PropType.SETLOGO),
|
IMG_SETLOGO_SPECIAL (new int[] {2, 1814, 520, 451}, PropType.SETLOGO),
|
||||||
|
|
||||||
|
//FOR WATERMARK
|
||||||
|
IMG_WATERMARK_G (new int[] {2, 2, 500, 500}, PropType.WATERMARKS),
|
||||||
|
IMG_WATERMARK_R (new int[] {504, 2, 500, 500}, PropType.WATERMARKS),
|
||||||
|
IMG_WATERMARK_B (new int[] {2, 504, 500, 500}, PropType.WATERMARKS),
|
||||||
|
IMG_WATERMARK_U (new int[] {504, 504, 500, 500}, PropType.WATERMARKS),
|
||||||
|
IMG_WATERMARK_W (new int[] {2, 1006, 500, 500}, PropType.WATERMARKS),
|
||||||
|
IMG_WATERMARK_C (new int[] {504, 1006, 500, 500}, PropType.WATERMARKS),
|
||||||
|
|
||||||
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),
|
||||||
@@ -505,6 +513,7 @@ public enum FSkinProp {
|
|||||||
PLANAR_CONQUEST,
|
PLANAR_CONQUEST,
|
||||||
DECKBOX,
|
DECKBOX,
|
||||||
SETLOGO,
|
SETLOGO,
|
||||||
|
WATERMARKS,
|
||||||
FAVICON
|
FAVICON
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user