Exemplo n.º 1
0
	void Output(Directory PathOut)
	{
		Directory Sn = Song->SongName;
		Sn.Normalize(true);

		GString name = Utility::Format("%s/ %s (%s) - %s.bms", PathOut.c_path(), Sn.c_path(), Parent->Name, Parent->Author);

#ifndef _WIN32
		std::ofstream out(name.c_str());
#else
		std::ofstream out(Utility::Widen(name).c_str());
#endif

			
		try {
			if (!out.is_open())
				throw std::exception( (Utility::Format("failed to open file %S", name).c_str() ) );
			if (BPS.size() == 0) 
				throw std::exception("There are no timing points!");
			WriteBMSOutput();
			out << OutFile.str();
		} catch (std::exception &e)
		{
			Log::Printf("Error while converting: %s\n", e.what());
		}
	}
Exemplo n.º 2
0
void ImageList::AddToList(const GString Filename, const GString Prefix)
{
	Directory ResFilename = Directory(Prefix) / Filename;
	ResFilename.Normalize(true);

	if (Images.find(ResFilename) == Images.end())
	{
		ImageLoader::AddToPending(ResFilename.c_path());
		Images[ResFilename] = nullptr;
	}
}
Exemplo n.º 3
0
void ImageList::AddToListIndex(const GString Filename, const GString Prefix, int Index)
{
	Directory ResFilename = Directory(Prefix) / Filename;

	ResFilename.Normalize(true);

	if (ImagesIndex.find(Index) == ImagesIndex.end())
	{
		ImageLoader::AddToPending(ResFilename.c_path());
		Images[ResFilename] = nullptr;
		ImagesIndex[Index] = nullptr;
		ImagesIndexPending[Index] = ResFilename;
	}

}
Exemplo n.º 4
0
void ConvertToNPSGraph(VSRG::Song *Sng, Directory PathOut)
{
	for (auto i = 0; i < Sng->Difficulties.size(); i++)
	{
		std::ofstream out;
		auto Diff = Sng->GetDifficulty(i);
		Directory Sn = Sng->SongName;
		Sn.Normalize(true);

		GString name = Utility::Format("%s/ %s (%s) - %s.svg", PathOut.c_path(), Sn.c_path(), Diff->Name, Diff->Author);

		out.open(name.c_str());

		double interv = CfgValNPS("IntervalTime", 1);
		double margin = CfgValNPS("PeakMargin", 1.2f);

		out << NPSGraph(Sng).GetSVGText(i, interv, margin);
	}
}