mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Removed unused debug data in CAnimation.
This commit is contained in:
		| @@ -1065,7 +1065,6 @@ CAnimation::CAnimation(std::string Name, bool Compressed): | |||||||
| 	CDefFile * file = getFile(); | 	CDefFile * file = getFile(); | ||||||
| 	init(file); | 	init(file); | ||||||
| 	delete file; | 	delete file; | ||||||
| 	loadedAnims.insert(this); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| CAnimation::CAnimation(): | CAnimation::CAnimation(): | ||||||
| @@ -1073,19 +1072,17 @@ CAnimation::CAnimation(): | |||||||
| 	compressed(false) | 	compressed(false) | ||||||
| { | { | ||||||
| 	init(nullptr); | 	init(nullptr); | ||||||
| 	loadedAnims.insert(this); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| CAnimation::~CAnimation() | CAnimation::~CAnimation() | ||||||
| { | { | ||||||
| 	if (!images.empty()) | 	if (!images.empty()) | ||||||
| 	{ | 	{ | ||||||
| 		logGlobal->warnStream()<<"Warning: not all frames were unloaded from "<<name; | 		//logGlobal->warnStream()<<"Warning: not all frames were unloaded from "<<name; | ||||||
| 		for (auto & elem : images) | 		for (auto & elem : images) | ||||||
| 			for (auto & _image : elem.second) | 			for (auto & _image : elem.second) | ||||||
| 				delete _image.second; | 				delete _image.second; | ||||||
| 	} | 	} | ||||||
| 	loadedAnims.erase(this); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| void CAnimation::setCustom(std::string filename, size_t frame, size_t group) | void CAnimation::setCustom(std::string filename, size_t frame, size_t group) | ||||||
| @@ -1167,20 +1164,6 @@ size_t CAnimation::size(size_t group) const | |||||||
| 	return 0; | 	return 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| std::set<CAnimation*> CAnimation::loadedAnims; |  | ||||||
|  |  | ||||||
| void CAnimation::getAnimInfo() |  | ||||||
| { |  | ||||||
| 	logGlobal->errorStream() << "Animation stats: Loaded " << loadedAnims.size() << " total"; |  | ||||||
| 	for(auto anim : loadedAnims) |  | ||||||
| 	{ |  | ||||||
| 		logGlobal->errorStream() << "Name: " << anim->name << " Groups: " << anim->images.size(); |  | ||||||
| 		if(!anim->images.empty()) |  | ||||||
| 			logGlobal->errorStream() << ", " << anim->images.begin()->second.size() << " image loaded in group " << anim->images.begin()->first; |  | ||||||
| 	} |  | ||||||
| } |  | ||||||
|  |  | ||||||
|  |  | ||||||
| float CFadeAnimation::initialCounter() const | float CFadeAnimation::initialCounter() const | ||||||
| { | { | ||||||
| 	if (fadingMode == EMode::OUT) | 	if (fadingMode == EMode::OUT) | ||||||
|   | |||||||
| @@ -195,10 +195,6 @@ public: | |||||||
| 	CAnimation(); | 	CAnimation(); | ||||||
| 	~CAnimation(); | 	~CAnimation(); | ||||||
|  |  | ||||||
|     //static method for debugging - print info about loaded animations |  | ||||||
| 	static void getAnimInfo(); |  | ||||||
| 	static std::set<CAnimation*> loadedAnims; |  | ||||||
|  |  | ||||||
| 	//add custom surface to the selected position. | 	//add custom surface to the selected position. | ||||||
| 	void setCustom(std::string filename, size_t frame, size_t group=0); | 	void setCustom(std::string filename, size_t frame, size_t group=0); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user