public static BufferedImage[] load(String s, int x, int y, int subImages) {
		BufferedImage[] ret;
		try {
			final BufferedImage spritesheet = ImageIO.read(Images.class
					.getResourceAsStream(s));

			ret = new BufferedImage[subImages];

			for (int i = 0; i < subImages; i++) {
				ret[i] = spritesheet.getSubimage(i * x, y, x, x);
			}
			return ret;
		} catch (final Exception e) {
			e.printStackTrace();
			System.out.println("Error loading graphics.");
			System.exit(0);
		}
		return null;
	}