diff options
author | Paul Gilbert | 2016-09-01 19:10:36 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-09-01 19:10:36 -0400 |
commit | 33737ea2dcd97026706dd75f8c2c27fa148c165a (patch) | |
tree | 29784cf3e7c9270b02a67f0fe02829d3bab9bbd2 /engines/titanic/game/maitred | |
parent | ac740c8e39113f0cd50def490dba1c6d51e07e99 (diff) | |
download | scummvm-rg350-33737ea2dcd97026706dd75f8c2c27fa148c165a.tar.gz scummvm-rg350-33737ea2dcd97026706dd75f8c2c27fa148c165a.tar.bz2 scummvm-rg350-33737ea2dcd97026706dd75f8c2c27fa148c165a.zip |
TITANIC: Convert many static_casts to dynamic_cast
Diffstat (limited to 'engines/titanic/game/maitred')
-rw-r--r-- | engines/titanic/game/maitred/maitred_prod_receptor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/titanic/game/maitred/maitred_prod_receptor.cpp b/engines/titanic/game/maitred/maitred_prod_receptor.cpp index 66533a542f..2977d417a2 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 && static_cast<CGameObject *>(getParent())->hasActiveMovie()) { + if (_fieldBC == 2 && dynamic_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 && static_cast<CGameObject *>(getParent())->hasActiveMovie()) + if (_fieldBC == 2 && dynamic_cast<CGameObject *>(getParent())->hasActiveMovie()) return false; else if (++_counter < 20) return true; @@ -80,7 +80,7 @@ bool CMaitreDProdReceptor::MouseMoveMsg(CMouseMoveMsg *msg) { else if (isEquals("Perch")) prodMsg._value = 125; - CMaitreD *maitreD = static_cast<CMaitreD *>(findRoomObject("MaitreD")); + CMaitreD *maitreD = dynamic_cast<CMaitreD *>(findRoomObject("MaitreD")); if (maitreD->_field100 <= 0) prodMsg.execute(this); @@ -89,7 +89,7 @@ bool CMaitreDProdReceptor::MouseMoveMsg(CMouseMoveMsg *msg) { bool CMaitreDProdReceptor::ProdMaitreDMsg(CProdMaitreDMsg *msg) { if (_fieldC4) { - CMaitreD *maitreD = static_cast<CMaitreD *>(findRoomObject("MaitreD")); + CMaitreD *maitreD = dynamic_cast<CMaitreD *>(findRoomObject("MaitreD")); if (maitreD->_field100 <= 0) { CViewItem *view = findView(); startTalking(maitreD, msg->_value, view); |