public void loadMapFile(String filename) {
		BufferedReader reader;
		try {
			reader = new BufferedReader(new FileReader(filename));

			String line = null;
			String[] parts = null;

			tileSet = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_chouk_down = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_chouk_up = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_chouk_left = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_chouk_right = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_chouk_down_blad = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_chouk_up_blad = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_chouk_left_blad = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_chouk_right_blad = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			img_door = ImageIO.read(this.getClass().getClassLoader().getResource("img/"
					+ reader.readLine()));
			parts = reader.readLine().split(" ");
			this.nbTilesX = Integer.valueOf(parts[0]);
			this.nbTilesY = Integer.valueOf(parts[1]);
			parts = reader.readLine().split(" ");
			this.canonCorX = Integer.valueOf(parts[0]);
			this.canonCorY = Integer.valueOf(parts[1]);
			
			map = new int[nbTilesY][nbTilesX];
			int i = 0;
			while ((line = reader.readLine()) != null) {
				parts = line.split(" ");
				for (int j = 0; j < nbTilesX; j++)
					map[i][j] = Integer.valueOf(parts[j]);
				i++;

			}
			reader.close();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}