refactor: move LoaderContext to graphics package

This commit is contained in:
Jason Long 2014-08-10 10:15:22 -04:00
parent 21f983d4be
commit 02ee143ce9
2 changed files with 7 additions and 6 deletions

View file

@ -87,4 +87,10 @@ public abstract class TileImage
null); null);
} }
} }
public interface LoaderContext
{
BufferedImage getDefaultImage();
BufferedImage getImage(String name);
}
} }

View file

@ -21,6 +21,7 @@ import micropolisj.engine.*;
import micropolisj.graphics.TileImage; import micropolisj.graphics.TileImage;
import static micropolisj.engine.TileConstants.*; import static micropolisj.engine.TileConstants.*;
import static micropolisj.XML_Helper.*; import static micropolisj.XML_Helper.*;
import static micropolisj.graphics.TileImage.LoaderContext;
public class TileImages public class TileImages
{ {
@ -70,12 +71,6 @@ public class TileImages
return "/" + name + "/tiles.png"; return "/" + name + "/tiles.png";
} }
interface LoaderContext
{
BufferedImage getDefaultImage();
BufferedImage getImage(String name);
}
static SimpleTileImage readSimpleImage(XMLStreamReader in, LoaderContext ctx) static SimpleTileImage readSimpleImage(XMLStreamReader in, LoaderContext ctx)
throws XMLStreamException throws XMLStreamException
{ {