diff options
author | Paul Gilbert | 2016-09-05 10:06:21 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-05 10:06:21 -0400 |
commit | 610aab1c635f170348179ac5a2ecccc6971874f8 (patch) | |
tree | 08f4e5a698c1666ba171fdf61a20717460f16610 /engines/titanic/game | |
parent | f5ce9c167cd6e16b26e0510dd0d1b19881d86a73 (diff) | |
download | scummvm-rg350-610aab1c635f170348179ac5a2ecccc6971874f8.tar.gz scummvm-rg350-610aab1c635f170348179ac5a2ecccc6971874f8.tar.bz2 scummvm-rg350-610aab1c635f170348179ac5a2ecccc6971874f8.zip |
TITANIC: Convert some dynamic_casts back to static_cast as appropriate
Diffstat (limited to 'engines/titanic/game')
-rw-r--r-- | engines/titanic/game/maitred/maitred_prod_receptor.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/game/sauce_dispensor.cpp | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/engines/titanic/game/maitred/maitred_prod_receptor.cpp b/engines/titanic/game/maitred/maitred_prod_receptor.cpp index 2977d417a2..95e029af44 100644 --- a/engines/titanic/game/maitred/maitred_prod_receptor.cpp +++ b/engines/titanic/game/maitred/maitred_prod_receptor.cpp @@ -51,7 +51,7 @@ void CMaitreDProdReceptor::load(SimpleFile *file) { } bool CMaitreDProdReceptor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { - if (_fieldBC == 2 && dynamic_cast<CGameObject *>(getParent())->hasActiveMovie()) { + if (_fieldBC == 2 && static_cast<CGameObject *>(getParent())->hasActiveMovie()) { return false; } else { CProdMaitreDMsg prodMsg(126); @@ -61,7 +61,7 @@ bool CMaitreDProdReceptor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { } bool CMaitreDProdReceptor::MouseMoveMsg(CMouseMoveMsg *msg) { - if (_fieldBC == 2 && dynamic_cast<CGameObject *>(getParent())->hasActiveMovie()) + if (_fieldBC == 2 && static_cast<CGameObject *>(getParent())->hasActiveMovie()) return false; else if (++_counter < 20) return true; @@ -81,7 +81,7 @@ bool CMaitreDProdReceptor::MouseMoveMsg(CMouseMoveMsg *msg) { prodMsg._value = 125; CMaitreD *maitreD = dynamic_cast<CMaitreD *>(findRoomObject("MaitreD")); - if (maitreD->_field100 <= 0) + if (maitreD && maitreD->_field100 <= 0) prodMsg.execute(this); return true; @@ -89,7 +89,7 @@ bool CMaitreDProdReceptor::MouseMoveMsg(CMouseMoveMsg *msg) { bool CMaitreDProdReceptor::ProdMaitreDMsg(CProdMaitreDMsg *msg) { if (_fieldC4) { - CMaitreD *maitreD = dynamic_cast<CMaitreD *>(findRoomObject("MaitreD")); + CMaitreD *maitreD = static_cast<CMaitreD *>(findRoomObject("MaitreD")); if (maitreD->_field100 <= 0) { CViewItem *view = findView(); startTalking(maitreD, msg->_value, view); diff --git a/engines/titanic/game/sauce_dispensor.cpp b/engines/titanic/game/sauce_dispensor.cpp index adc0b828a2..fda7082ba6 100644 --- a/engines/titanic/game/sauce_dispensor.cpp +++ b/engines/titanic/game/sauce_dispensor.cpp @@ -69,7 +69,7 @@ bool CSauceDispensor::Use(CUse *msg) { CVisibleMsg visibleMsg(true); if (msg->_item->isEquals("Chicken")) { - CChicken *chicken = dynamic_cast<CChicken *>(msg->_item); + CChicken *chicken = static_cast<CChicken *>(msg->_item); _field104 = true; if (_fieldF0) { playSound("b#15.wav", 50); |