diff --git a/src/de/teamteamteam/spacescooter/Main.java b/src/de/teamteamteam/spacescooter/Main.java index 00be404..f8e32f2 100644 --- a/src/de/teamteamteam/spacescooter/Main.java +++ b/src/de/teamteamteam/spacescooter/Main.java @@ -25,7 +25,7 @@ public class Main { * @param args Command line arguments. */ public static void main(String[] args) { - final GraphicsSettings gs = GraphicsSettings.instance; // Get settings + final GraphicsSettings gs = GraphicsSettings.getInstance(); // Get settings // Initialize SuperScreen and add to GameFrame, so we can call doPaint() // on it. diff --git a/src/de/teamteamteam/spacescooter/utility/GraphicsSettings.java b/src/de/teamteamteam/spacescooter/utility/GraphicsSettings.java index 143377e..1df4f45 100644 --- a/src/de/teamteamteam/spacescooter/utility/GraphicsSettings.java +++ b/src/de/teamteamteam/spacescooter/utility/GraphicsSettings.java @@ -44,7 +44,7 @@ public class GraphicsSettings { /** * Instance holder for GraphicsSettings. */ - public static GraphicsSettings instance; + private static GraphicsSettings instance; /** @@ -124,4 +124,10 @@ public class GraphicsSettings { return compatibleImage; } + /** + * Get the instance of GraphicsSettings + */ + public static GraphicsSettings getInstance() { + return GraphicsSettings.instance; + } } diff --git a/src/de/teamteamteam/spacescooter/utility/Loader.java b/src/de/teamteamteam/spacescooter/utility/Loader.java index 52e6bbd..e9c9c44 100644 --- a/src/de/teamteamteam/spacescooter/utility/Loader.java +++ b/src/de/teamteamteam/spacescooter/utility/Loader.java @@ -185,10 +185,10 @@ public class Loader { * current ScreenDevice. */ private static BufferedImage createCompatibleImage(BufferedImage storedImage) { - if(GraphicsSettings.instance.getColorModel().equals(storedImage.getColorModel())) { + if(GraphicsSettings.getInstance().getColorModel().equals(storedImage.getColorModel())) { return storedImage; } else { - return GraphicsSettings.instance.createCompatibleBufferedImage(storedImage); + return GraphicsSettings.getInstance().createCompatibleBufferedImage(storedImage); } }