From a4fa1edce941ae7251a52b9836a78c5627596c1d Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 2 Nov 2014 01:33:10 +0100 Subject: [PATCH] =?UTF-8?q?Kompatibilit=C3=A4t:=20Pfadangaben=20werden=20d?= =?UTF-8?q?er=20Plattform=20angepasst.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Intern fahren wir weiterhin Angaben wie "images/background.png", im Loader werden diese aber entsprechend in Plattformpfade übersetzt. --- src/de/teamteamteam/spacescooter/utility/Loader.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/de/teamteamteam/spacescooter/utility/Loader.java b/src/de/teamteamteam/spacescooter/utility/Loader.java index 8dc00e3..09bc442 100644 --- a/src/de/teamteamteam/spacescooter/utility/Loader.java +++ b/src/de/teamteamteam/spacescooter/utility/Loader.java @@ -1,8 +1,10 @@ package de.teamteamteam.spacescooter.utility; import java.awt.image.BufferedImage; +import java.io.File; import java.io.IOException; import java.util.Hashtable; + import javax.imageio.ImageIO; import de.teamteamteam.spacescooter.screen.LoadingScreen; @@ -20,7 +22,7 @@ public class Loader { * Return the loaded BufferedImage by its filename. */ public static BufferedImage getBufferedImageByFilename(String filename) { - return Loader.images.get(filename); + return Loader.images.get(filename.replace("/", File.separator)); } /**