osuBackgroundAnimation::osuBackgroundAnimation(VSRG::Song* song, shared_ptr<osb::SpriteList> existing_sprites)
{
	initializeTransforms();
	for (auto sp : *existing_sprites)
	{
		mSprites.push_back(sp);
		AddImageToList(sp->GetImageFilename());
	}

	// Read the osb file from the song's directory.
	vector<GString> candidates;
	song->SongDirectory.ListDirectory(candidates, Directory::FS_REG, "osb");

	if (candidates.size())
	{
		GString head;
		std::fstream s(candidates.at(0), std::ios::in);

		if (std::getline(s, head) && head == "[Events]")
		{
			auto sprite_list = ReadOSBEvents(s);
			for (auto sp : *sprite_list)
			{
				AddImageToList(sp->GetImageFilename());
				mSprites.push_back(sp);
			}
		}
	}
}
Exemple #2
0
BOOL KProcessInfo::OnLoadImage(ULONGLONG nLoadTime, KModuleInfo* pModule)
{
	kis::KLocker	_locker(m_lock);
	KProcImage* pImage = new KProcImage(pModule, nLoadTime);
	AddImageToList(pImage, nLoadTime);
	return TRUE;
}