merge latest trunk

This commit is contained in:
myk
2013-03-09 07:53:47 +00:00
3 changed files with 11 additions and 4 deletions

View File

@@ -42,6 +42,11 @@ final class ImageLoader extends CacheLoader<String, BufferedImage> {
BufferedImage ret = _findFile(key, path, filename); BufferedImage ret = _findFile(key, path, filename);
// some S00/S2K cards are really part of 6ED/6E
if (null == ret && filename.startsWith("S2K") ) {
ret = _findFile(key, path, filename.replace("S2K", "6E"));
}
// try without set prefix // try without set prefix
if (null == ret && filename.contains("/")) { if (null == ret && filename.contains("/")) {
ret = _findFile(key, path, filename.substring(filename.indexOf('/') + 1)); ret = _findFile(key, path, filename.substring(filename.indexOf('/') + 1));
@@ -61,6 +66,7 @@ final class ImageLoader extends CacheLoader<String, BufferedImage> {
} catch (IOException ex) { } catch (IOException ex) {
BugReporter.reportException(ex, "Could not read image file " + file.getAbsolutePath() + " "); BugReporter.reportException(ex, "Could not read image file " + file.getAbsolutePath() + " ");
} }
return image; return image;
} }
@@ -75,6 +81,5 @@ final class ImageLoader extends CacheLoader<String, BufferedImage> {
} }
return null; return null;
} }
} }

View File

@@ -83,7 +83,6 @@ public class GameNew {
* their decks and other special starting conditions. * their decks and other special starting conditions.
*/ */
public static void newGame(final MatchController match, final Map<Player, PlayerStartConditions> playersConditions, final GameState game, final boolean canRandomFoil) { public static void newGame(final MatchController match, final Map<Player, PlayerStartConditions> playersConditions, final GameState game, final boolean canRandomFoil) {
match.getInput().clearInput();
Card.resetUniqueNumber(); Card.resetUniqueNumber();
// need this code here, otherwise observables fail // need this code here, otherwise observables fail

View File

@@ -156,7 +156,10 @@ public class MatchController {
final boolean canRandomFoil = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_FOIL) && gameType == GameType.Constructed; final boolean canRandomFoil = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_FOIL) && gameType == GameType.Constructed;
GameNew.newGame(this, startConditions, currentGame, canRandomFoil); GameNew.newGame(this, startConditions, currentGame, canRandomFoil);
getInput().clearInput();
getInput().resetInput();
Thread thGame = new GameInputUpdatesThread(this, currentGame); Thread thGame = new GameInputUpdatesThread(this, currentGame);
thGame.setName("Game input updater"); thGame.setName("Game input updater");
thGame.start(); thGame.start();