diff options
Diffstat (limited to 'engines/titanic/pet_control/pet_inventory.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_inventory.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/engines/titanic/pet_control/pet_inventory.cpp b/engines/titanic/pet_control/pet_inventory.cpp index c7c6dfdf7c..1ea78062d5 100644 --- a/engines/titanic/pet_control/pet_inventory.cpp +++ b/engines/titanic/pet_control/pet_inventory.cpp @@ -28,7 +28,7 @@ namespace Titanic { CPetInventory::CPetInventory() : CPetSection(), - _field28C(0), _field290(0), _field294(0), _field298(0) { + _movie(nullptr), _field290(false), _field294(0), _field298(0) { for (int idx = 0; idx < TOTAL_ITEMS; ++idx) { _itemBackgrounds[idx] = _itemGlyphs[idx] = nullptr; } @@ -53,8 +53,7 @@ void CPetInventory::draw(CScreenManager *screenManager) { } Rect CPetInventory::getBounds() { - // TODO - return Rect(); + return _movie ? _movie->getBounds() : Rect(); } CGameObject *CPetInventory::dragEnd(const Point &pt) const { @@ -200,4 +199,17 @@ CGameObject *CPetInventory::getImage(int index) { return nullptr; } +void CPetInventory::setMovie(CGameObject *movie, int flag) { + if (_movie) + _movie->stopMovie(); + _movie = movie; + + if (_movie) { + if (flag) + _movie->playMovie(0, 14, 1); + else + _movie->playMovie(0); + } +} + } // End of namespace Titanic |