コード例 #1
0
	bool ResourceCompilerImpl::compile(const char* fileName, std::map<std::string, std::string>& options) {
		std::cout << "Compiling " << fileName << std::endl;

		engine::Hashed id(fileName);

		if(resourcesCompiled.count(id) > 0) {
			std::cout << fileName << " already compiled" << std::endl;
			return true;
		}

		ResourceLoader* loader = findLoader(engine::file::getExtension(fileName).c_str());

		resourcesCompiled.insert(id);
		loader->compileResource(fileName, options);

		std::cout << "Compiled " << fileName << std::endl;
		return true;
	}