public static String [] getTilesetList(File directory)
	{
		File [] list = directory.listFiles();
		ArrayList<String> tilesetNames = new ArrayList<String>();

		if (list == null)
		{
			return null;
		}

		for (File entry : list)
		{
			if (entry.getName().toLowerCase().contains("0.bmp"))
			{
				boolean addEntry = true;

				String toStore = entry.getName().substring(0, entry.getName().length() - 5);
				for (String name : tilesetNames)
				{
					if (name.equals(toStore))
					{
						addEntry = false;
						break;
					}
				}

				if (addEntry)
					tilesetNames.add(toStore);
			}
		}

		return tilesetNames.toArray(new String[tilesetNames.size()]);
	}