forked from External/mage
Refactor cards and token images code (#10139):
- removed outdated token store format (example: BIRD.W.BIRD.CREATURE.1.1.full.jpg) - removed duplicated cache images code; - removed duplicated set code fields; - removed outdated auto-generated thumb files (also all *.thumb.zip files will be deleted on startup);
This commit is contained in:
parent
d93e533c75
commit
66d0ef4b35
25 changed files with 333 additions and 634 deletions
|
|
@ -293,7 +293,11 @@ public class CardIconsPanel extends JPanel {
|
|||
//BufferedImage iconImage = ImageManagerImpl.instance.getCardIcon(icon.getIconType().getResourceName(), this.halfSize * 2);
|
||||
|
||||
// cached call
|
||||
BufferedImage iconImageCached = ImageCache.getCardIconImage(icon.getIconType().getResourceName(), this.halfSize * 2, color.toString());
|
||||
BufferedImage iconImageCached = ImageCache.getCardIconImage(
|
||||
icon.getIconType().getResourceName(),
|
||||
this.halfSize * 2,
|
||||
color.toString()
|
||||
).getImage();
|
||||
|
||||
if (iconImageCached != null && this.font != null) {
|
||||
BufferedImage iconImageWithText = ImageManagerImpl.deepCopy(iconImageCached); // must copy cached value before modify
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ public final class Constants {
|
|||
|
||||
// cards render
|
||||
public static final Rectangle CARD_SIZE_FULL = new Rectangle(101, 149);
|
||||
public static final Rectangle THUMBNAIL_SIZE_FULL = new Rectangle(102, 146);
|
||||
|
||||
// resources - default images
|
||||
public static final String RESOURCE_PATH_DEFAULT_IMAGES = File.separator + "default";
|
||||
|
|
|
|||
|
|
@ -677,7 +677,7 @@ public class MageActionCallback implements ActionCallback {
|
|||
switch (enlargeMode) {
|
||||
case COPY:
|
||||
if (cardView instanceof PermanentView) {
|
||||
image = ImageCache.getImageOriginal(((PermanentView) cardView).getOriginal());
|
||||
image = ImageCache.getImageOriginal(((PermanentView) cardView).getOriginal()).getImage();
|
||||
}
|
||||
break;
|
||||
case ALTERNATE:
|
||||
|
|
@ -686,9 +686,9 @@ public class MageActionCallback implements ActionCallback {
|
|||
&& !cardView.isFlipCard()
|
||||
&& !cardView.canTransform()
|
||||
&& ((PermanentView) cardView).isCopy()) {
|
||||
image = ImageCache.getImageOriginal(((PermanentView) cardView).getOriginal());
|
||||
image = ImageCache.getImageOriginal(((PermanentView) cardView).getOriginal()).getImage();
|
||||
} else {
|
||||
image = ImageCache.getImageOriginalAlternateName(cardView);
|
||||
image = ImageCache.getImageOriginalAlternateName(cardView).getImage();
|
||||
displayCard = displayCard.getSecondCardFace();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue