aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/maitred
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-05 10:06:21 -0400
committerPaul Gilbert2016-09-05 10:06:21 -0400
commit610aab1c635f170348179ac5a2ecccc6971874f8 (patch)
tree08f4e5a698c1666ba171fdf61a20717460f16610 /engines/titanic/game/maitred
parentf5ce9c167cd6e16b26e0510dd0d1b19881d86a73 (diff)
downloadscummvm-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/maitred')
-rw-r--r--engines/titanic/game/maitred/maitred_prod_receptor.cpp8
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 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);