diff options
author | Walter van Niftrik | 2016-03-26 22:48:04 +0100 |
---|---|---|
committer | Walter van Niftrik | 2016-06-06 20:35:49 +0200 |
commit | 760d5ac733ce41a5d4a3f861234850dcc4e96c38 (patch) | |
tree | 7d6b72b72562944f465095b39979beb94b37f68e /engines/adl | |
parent | d0f33851bc7d6256aed051eb5a3287d24969f681 (diff) | |
download | scummvm-rg350-760d5ac733ce41a5d4a3f861234850dcc4e96c38.tar.gz scummvm-rg350-760d5ac733ce41a5d4a3f861234850dcc4e96c38.tar.bz2 scummvm-rg350-760d5ac733ce41a5d4a3f861234850dcc4e96c38.zip |
ADL: Move drawPic() into base class
Diffstat (limited to 'engines/adl')
-rw-r--r-- | engines/adl/adl.cpp | 7 | ||||
-rw-r--r-- | engines/adl/adl.h | 1 | ||||
-rw-r--r-- | engines/adl/hires1.cpp | 4 | ||||
-rw-r--r-- | engines/adl/hires1.h | 1 | ||||
-rw-r--r-- | engines/adl/hires2.cpp | 7 | ||||
-rw-r--r-- | engines/adl/hires2.h | 1 |
6 files changed, 8 insertions, 13 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp index e77755986a..db2d9d69c5 100644 --- a/engines/adl/adl.cpp +++ b/engines/adl/adl.cpp @@ -356,6 +356,13 @@ void AdlEngine::clearScreen() const { _display->clear(0x00); } +void AdlEngine::drawPic(byte pic, Common::Point pos) const { + if (_roomData.pictures.contains(pic)) + _graphics->drawPic(*_roomData.pictures[pic]->createReadStream(), pos); + else + _graphics->drawPic(*_pictures[pic]->createReadStream(), pos); +} + void AdlEngine::drawItems() const { Common::Array<Item>::const_iterator item; diff --git a/engines/adl/adl.h b/engines/adl/adl.h index d8ee5d930c..4751ed6e91 100644 --- a/engines/adl/adl.h +++ b/engines/adl/adl.h @@ -234,6 +234,7 @@ protected: // Graphics void clearScreen() const; + void drawPic(byte pic, Common::Point pos = Common::Point()) const; void drawItems() const; // Sound diff --git a/engines/adl/hires1.cpp b/engines/adl/hires1.cpp index c1a43b8c0d..9e24d4fc65 100644 --- a/engines/adl/hires1.cpp +++ b/engines/adl/hires1.cpp @@ -262,10 +262,6 @@ void HiRes1Engine::restartGame() { _display->printAsciiString("\r\r\r\r\r"); } -void HiRes1Engine::drawPic(byte pic, Common::Point pos) const { - _graphics->drawPic(*_pictures[pic]->createReadStream(), pos); -} - void HiRes1Engine::printString(const Common::String &str) { Common::String wrap = str; wordWrap(wrap); diff --git a/engines/adl/hires1.h b/engines/adl/hires1.h index 29cdd5a3c2..02eb75aa19 100644 --- a/engines/adl/hires1.h +++ b/engines/adl/hires1.h @@ -103,7 +103,6 @@ private: void init(); void initState(); void restartGame(); - void drawPic(byte pic, Common::Point pos = Common::Point()) const; void printString(const Common::String &str); void printMessage(uint idx); void drawItem(const Item &item, const Common::Point &pos) const; diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp index 30114d6ce4..8be868193a 100644 --- a/engines/adl/hires2.cpp +++ b/engines/adl/hires2.cpp @@ -196,13 +196,6 @@ void HiRes2Engine::restartGame() { initState(); } -void HiRes2Engine::drawPic(byte pic, Common::Point pos) const { - if (_roomData.pictures.contains(pic)) - _graphics->drawPic(*_roomData.pictures[pic]->createReadStream(), pos); - else - _graphics->drawPic(*_pictures[pic]->createReadStream(), pos); -} - void HiRes2Engine::drawItem(const Item &item, const Common::Point &pos) const { StreamPtr stream(_itemPics[item.picture - 1]->createReadStream()); stream->readByte(); // Skip clear opcode diff --git a/engines/adl/hires2.h b/engines/adl/hires2.h index 17687b5359..c99c0b0458 100644 --- a/engines/adl/hires2.h +++ b/engines/adl/hires2.h @@ -60,7 +60,6 @@ private: void init(); void initState(); void restartGame(); - void drawPic(byte pic, Common::Point pos) const; void drawItem(const Item &item, const Common::Point &pos) const; void loadRoom(byte roomNr); void showRoom(); |