aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
authorNipun Garg2019-07-15 11:49:22 +0530
committerEugene Sandulenko2019-09-03 17:17:20 +0200
commitf158aadfd1ac0db28cd759506690f523c77f1d3e (patch)
tree9e7dfce90ee7149ff3a66b0679c99606f2276b36 /engines/hdb
parenta484fe4353c96c6e0c27333c5d4ac932baf660a0 (diff)
downloadscummvm-rg350-f158aadfd1ac0db28cd759506690f523c77f1d3e.tar.gz
scummvm-rg350-f158aadfd1ac0db28cd759506690f523c77f1d3e.tar.bz2
scummvm-rg350-f158aadfd1ac0db28cd759506690f523c77f1d3e.zip
HDB: Add loadIcon() for TYPE_ICON32 loading
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/gfx.cpp9
-rw-r--r--engines/hdb/gfx.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index e841381d9d..4ff2e9d0a4 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -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) {
diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h
index 59d44fb39a..410b2f1599 100644
--- a/engines/hdb/gfx.h
+++ b/engines/hdb/gfx.h
@@ -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);