Exemplo n.º 1
0
Common::String Inter_v7::findFile(const Common::String &mask) {
	Common::ArchiveMemberList files;

	SearchMan.listMatchingMembers(files, mask);

	if (files.empty())
		return "";

	return files.front()->getName();
}
Exemplo n.º 2
0
ResourceLoader::ResourceLoader() {
	int lab_counter = 0;
	_cacheDirty = false;
	_cacheMemorySize = 0;

	Lab *l;
	Common::ArchiveMemberList files;

	SearchMan.listMatchingMembers(files, "*.lab");
	SearchMan.listMatchingMembers(files, "*.m4b");

	if (files.empty())
		error("Cannot find game data - check configuration file");

	for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
		const Common::String filename = (*x)->getName();
		l = new Lab();

		if (l->open(filename)) {
			if (filename.equalsIgnoreCase("data005.lab"))
				_labs.push_front(l);
			else
				_labs.push_back(l);
			lab_counter++;
		} else {
			delete l;
		}
	}

	files.clear();

	if (g_grim->getGameFlags() & GF_DEMO) {
		SearchMan.listMatchingMembers(files, "*.mus");

		for (Common::ArchiveMemberList::const_iterator x = files.begin(); x != files.end(); ++x) {
			const Common::String filename = (*x)->getName();
			l = new Lab();

			if (l->open(filename)) {
				_labs.push_back(l);
				lab_counter++;
			} else {
				delete l;
			}
		}
	}
}