mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 14:50:17 +00:00
HDB: Add loadIcon() for TYPE_ICON32 loading
This commit is contained in:
parent
a484fe4353
commit
f158aadfd1
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user