mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Cleanup CDefHandler
This commit is contained in:
		| @@ -122,12 +122,6 @@ void CDefHandler::openFromMemory(ui8 *table, const std::string & name) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| void CDefHandler::expand(ui8 N,ui8 & BL, ui8 & BR) | ||||
| { | ||||
| 	BL = (N & 0xE0) >> 5; | ||||
| 	BR = N & 0x1F; | ||||
| } | ||||
|  | ||||
| SDL_Surface * CDefHandler::getSprite (int SIndex, const ui8 * FDef, const SDL_Color * palette) const | ||||
| { | ||||
| 	SDL_Surface * ret=nullptr; | ||||
|   | ||||
| @@ -85,7 +85,9 @@ private: | ||||
| 		int group; | ||||
| 	} ; | ||||
| 	std::vector<SEntry> SEntries ; | ||||
|  | ||||
| 	 | ||||
| 	void openFromMemory(ui8 * table, const std::string & name);	 | ||||
| 	SDL_Surface * getSprite (int SIndex, const ui8 * FDef, const SDL_Color * palette) const; | ||||
| public: | ||||
| 	int width, height; //width and height | ||||
| 	std::string defName; | ||||
| @@ -94,9 +96,7 @@ public: | ||||
|  | ||||
| 	CDefHandler(); //c-tor | ||||
| 	~CDefHandler(); //d-tor | ||||
| 	SDL_Surface * getSprite (int SIndex, const ui8 * FDef, const SDL_Color * palette) const; //saves picture with given number to "testtt.bmp" | ||||
| 	static void expand(ui8 N,ui8 & BL, ui8 & BR); | ||||
| 	void openFromMemory(ui8 * table, const std::string & name); | ||||
| 	 | ||||
| 	CDefEssential * essentialize(); | ||||
|  | ||||
| 	static CDefHandler * giveDef(const std::string & defName); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user