HDB: Add loadIcon() for TYPE_ICON32 loading

This commit is contained in:
Nipun Garg 2019-07-15 11:49:22 +05:30 committed by Eugene Sandulenko
parent a484fe4353
commit f158aadfd1
2 changed files with 10 additions and 0 deletions

View File

@ -379,6 +379,15 @@ Tile *Gfx::loadTile(const char *tileName) {
return tile;
}
Tile *Gfx::loadIcon(const char *tileName) {
Tile *tile = new Tile;
Common::SeekableReadStream *stream = g_hdb->_fileMan->findFirstData(tileName, TYPE_ICON32);
if (!stream)
return NULL;
tile->load(stream);
return tile;
}
Tile *Gfx::getTile(int index) {
if (index < 0 || index > _numTiles) {

View File

@ -115,6 +115,7 @@ public:
Picture *loadPic(const char *picName);
Tile *loadTile(const char *tileName);
Tile *loadIcon(const char *tileName);
Tile *getTile(int index);
void cacheTileSequence(int index, int count);