aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-23 02:43:22 +0530
committerEugene Sandulenko2019-09-03 17:16:56 +0200
commita990792f9af52f4d7d66c22995f77edd33995af1 (patch)
tree32526eef648c51a7112fec36e857d1cb602f058e
parent6e9647eab5fdc5b7b996149159952489721a0459 (diff)
downloadscummvm-rg350-a990792f9af52f4d7d66c22995f77edd33995af1.tar.gz
scummvm-rg350-a990792f9af52f4d7d66c22995f77edd33995af1.tar.bz2
scummvm-rg350-a990792f9af52f4d7d66c22995f77edd33995af1.zip
HDB: Add the loadPic() helper
-rw-r--r--engines/hdb/draw-manager.cpp9
-rw-r--r--engines/hdb/draw-manager.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp
index 8be1e8bcc3..4a74e3de40 100644
--- a/engines/hdb/draw-manager.cpp
+++ b/engines/hdb/draw-manager.cpp
@@ -130,6 +130,15 @@ void DrawMan::updateFade() {
debug(9, "STUB: DrawMan::updateFade incomplete");
}
+Picture *DrawMan::loadPic(const char *picName) {
+ Picture *pic = new Picture;
+ Common::SeekableReadStream *stream = g_hdb->_fileMan->findFirstData(picName, TYPE_PIC);
+ if (!stream)
+ return NULL;
+ pic->load(stream);
+ return pic;
+}
+
Tile *DrawMan::getTile(int index) {
if (index < 0 || index > _numTiles) {
diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h
index ceae35784d..ee53df47c9 100644
--- a/engines/hdb/draw-manager.h
+++ b/engines/hdb/draw-manager.h
@@ -78,6 +78,8 @@ public:
bool isFadeStaying() { return _fadeInfo.stayFaded; }
void turnOffFade() { _fadeInfo.active = _fadeInfo.stayFaded = false; }
+ Picture *loadPic(const char *picName);
+
Tile *getTile(int index);
void cacheTileSequence(int index, int count);
int getTileIndex(const char *name);