1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Cleanup CDefHandler

This commit is contained in:
AlexVinS 2015-09-02 18:27:56 +03:00
parent 2012d53dd6
commit e80c8d16a6
2 changed files with 4 additions and 10 deletions

View File

@ -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;

View File

@ -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);