diff options
author | Paul Gilbert | 2017-07-27 22:31:24 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-07-27 22:31:24 -0400 |
commit | c1ed17ce861d7434f5b1aabb70a54cef250b6378 (patch) | |
tree | ffeac588df7ee41ea3c2dc2eab97f88c54680c7b /engines/titanic/pet_control/pet_inventory_glyphs.cpp | |
parent | 27f51565c3046015110fa5ca4ff16036972348dc (diff) | |
download | scummvm-rg350-c1ed17ce861d7434f5b1aabb70a54cef250b6378.tar.gz scummvm-rg350-c1ed17ce861d7434f5b1aabb70a54cef250b6378.tar.bz2 scummvm-rg350-c1ed17ce861d7434f5b1aabb70a54cef250b6378.zip |
TITANIC: Cleanup/renaming of inventory glyph animatin code
Diffstat (limited to 'engines/titanic/pet_control/pet_inventory_glyphs.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_inventory_glyphs.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.cpp b/engines/titanic/pet_control/pet_inventory_glyphs.cpp index bda88baf44..9422eb6f3b 100644 --- a/engines/titanic/pet_control/pet_inventory_glyphs.cpp +++ b/engines/titanic/pet_control/pet_inventory_glyphs.cpp @@ -36,7 +36,7 @@ const uint ITEM_MODES[40] = { }; void CPetInventoryGlyph::enter() { - startBackgroundMovie(); + startRepeatedMovie(); } void CPetInventoryGlyph::leave() { @@ -59,7 +59,7 @@ void CPetInventoryGlyph::drawAt(CScreenManager *screenManager, const Point &pt, _image = nullptr; if (_background && isHighlighted_) { _background->setPosition(pt); - startBackgroundMovie(); + startRepeatedMovie(); } } @@ -302,19 +302,19 @@ int CPetInventoryGlyph::getItemIndex(CGameObject *item, bool isLoading) { return movieFrame; } -void CPetInventoryGlyph::startBackgroundMovie() { +void CPetInventoryGlyph::startRepeatedMovie() { if (_owner) { CPetInventory *section = dynamic_cast<CPetInventory *>(_owner->getOwner()); if (section) - section->playMovie(_background, MOVIE_REPEAT); + section->playMovie(_background, true); } } -void CPetInventoryGlyph::startForegroundMovie() { +void CPetInventoryGlyph::startSingularMovie() { if (_owner) { CPetInventory *section = dynamic_cast<CPetInventory *>(_owner->getOwner()); if (section) - section->playMovie(_image, MOVIE_REPEAT); + section->playMovie(_image, false); } } @@ -322,17 +322,19 @@ void CPetInventoryGlyph::stopMovie() { if (_owner) { CPetInventory *section = dynamic_cast<CPetInventory *>(_owner->getOwner()); if (section) - section->playMovie(nullptr, MOVIE_REPEAT); + section->playMovie(nullptr); } } void CPetInventoryGlyph::reposition(const Point &pt) { if (_image) { + // Special transformation of item to piece of Titania _image->setPosition(pt); - startForegroundMovie(); + startSingularMovie(); } else if (_background) { + // Standard repeating animation _background->setPosition(pt); - startBackgroundMovie(); + startRepeatedMovie(); } } |