private static Bitmap[][] cut(String res, int w, int h, Object game){
		try {
			InputStream input = game.getClass().getResourceAsStream(res);
			BufferedImage image = ImageIO.read(input);
		
			int xt = image.getWidth() / w;
			int yt = image.getHeight() / h;
			
			Bitmap[][] result = new Bitmap[xt][yt];
			BufferedImage sub = null;
			for(int i = 0; i < xt; i++) {
				for(int j = 0; j < yt; j++){
					result[i][j] = new Bitmap(w, h);
					sub = image.getSubimage(i * w, j * h, w, h);
					sub.getRGB(0, 0, w, h, result[i][j].pixels, 0, w);
				}
			}
			
			
			input.close();
			image.flush();
			sub.flush();
		
			return result;
		} catch(IOException e) {
			System.exit(1);
			e.printStackTrace();
		}
		
		return null;
	}