aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/pet_control/pet_inventory_glyphs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/pet_control/pet_inventory_glyphs.cpp')
-rw-r--r--engines/titanic/pet_control/pet_inventory_glyphs.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.cpp b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
index ae306649a2..783a8a9717 100644
--- a/engines/titanic/pet_control/pet_inventory_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
@@ -165,7 +165,7 @@ void CPetInventoryGlyph::getTooltip(CPetText *text) {
bool CPetInventoryGlyph::doAction(CGlyphAction *action) {
CInventoryGlyphAction *invAction = static_cast<CInventoryGlyphAction *>(action);
- CPetInventoryGlyphs *owner = static_cast<CPetInventoryGlyphs *>(_owner);
+ CPetInventoryGlyphs *owner = dynamic_cast<CPetInventoryGlyphs *>(_owner);
if (!invAction)
return false;
@@ -203,8 +203,8 @@ void CPetInventoryGlyph::setItem(CGameObject *item, int val) {
if (_owner && item) {
int v1 = populateItem(item, val);
- _background = static_cast<CPetInventoryGlyphs *>(_owner)->getBackground(v1);
- _image = static_cast<CPetInventory *>(getPetSection())->getImage(v1);
+ _background = dynamic_cast<CPetInventoryGlyphs *>(_owner)->getBackground(v1);
+ _image = dynamic_cast<CPetInventory *>(getPetSection())->getImage(v1);
}
}
@@ -293,7 +293,7 @@ int CPetInventoryGlyph::subMode(CGameObject *item, int val) {
void CPetInventoryGlyph::startBackgroundMovie() {
if (_owner) {
- CPetInventory *section = static_cast<CPetInventory *>(_owner->getOwner());
+ CPetInventory *section = dynamic_cast<CPetInventory *>(_owner->getOwner());
if (section)
section->playMovie(_background, 1);
}
@@ -301,7 +301,7 @@ void CPetInventoryGlyph::startBackgroundMovie() {
void CPetInventoryGlyph::startForegroundMovie() {
if (_owner) {
- CPetInventory *section = static_cast<CPetInventory *>(_owner->getOwner());
+ CPetInventory *section = dynamic_cast<CPetInventory *>(_owner->getOwner());
if (section)
section->playMovie(_image, 1);
}
@@ -309,7 +309,7 @@ void CPetInventoryGlyph::startForegroundMovie() {
void CPetInventoryGlyph::stopMovie() {
if (_owner) {
- CPetInventory *section = static_cast<CPetInventory *>(_owner->getOwner());
+ CPetInventory *section = dynamic_cast<CPetInventory *>(_owner->getOwner());
if (section)
section->playMovie(nullptr, 1);
}