aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game
diff options
context:
space:
mode:
authorPaul Gilbert2017-08-21 21:09:53 -0400
committerPaul Gilbert2017-08-21 21:09:53 -0400
commit3596fa9a12e14b408954bdfa49cc7f2bedb44d44 (patch)
treef04e3c0e856a9c9201875997c9362fa518245d0d /engines/titanic/game
parent05616ca2ee71a0b2d2258dfed5cd3ce614bb7259 (diff)
downloadscummvm-rg350-3596fa9a12e14b408954bdfa49cc7f2bedb44d44.tar.gz
scummvm-rg350-3596fa9a12e14b408954bdfa49cc7f2bedb44d44.tar.bz2
scummvm-rg350-3596fa9a12e14b408954bdfa49cc7f2bedb44d44.zip
TITANIC: Renamings for CMaitreDProdReceptor
Diffstat (limited to 'engines/titanic/game')
-rw-r--r--engines/titanic/game/maitred/maitred_prod_receptor.cpp24
-rw-r--r--engines/titanic/game/maitred/maitred_prod_receptor.h8
2 files changed, 17 insertions, 15 deletions
diff --git a/engines/titanic/game/maitred/maitred_prod_receptor.cpp b/engines/titanic/game/maitred/maitred_prod_receptor.cpp
index c727366993..f8e540dde2 100644
--- a/engines/titanic/game/maitred/maitred_prod_receptor.cpp
+++ b/engines/titanic/game/maitred/maitred_prod_receptor.cpp
@@ -34,24 +34,24 @@ END_MESSAGE_MAP()
void CMaitreDProdReceptor::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeNumberLine(_fieldBC, indent);
+ file->writeNumberLine(_prodSource, indent);
file->writeNumberLine(_counter, indent);
- file->writeNumberLine(_fieldC4, indent);
+ file->writeNumberLine(_proddable, indent);
CGameObject::save(file, indent);
}
void CMaitreDProdReceptor::load(SimpleFile *file) {
file->readNumber();
- _fieldBC = file->readNumber();
+ _prodSource = (ProdSource)file->readNumber();
_counter = file->readNumber();
- _fieldC4 = file->readNumber();
+ _proddable = file->readNumber();
CGameObject::load(file);
}
bool CMaitreDProdReceptor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
- if (_fieldBC == 2 && static_cast<CGameObject *>(getParent())->hasActiveMovie()) {
+ if (_prodSource == MAITRED_BUTTOCKS && static_cast<CGameObject *>(getParent())->hasActiveMovie()) {
return false;
} else {
CProdMaitreDMsg prodMsg(126);
@@ -63,7 +63,7 @@ bool CMaitreDProdReceptor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
bool CMaitreDProdReceptor::MouseMoveMsg(CMouseMoveMsg *msg) {
if (!getDraggingObject())
return true;
- if (_fieldBC == 2 && static_cast<CGameObject *>(getParent())->hasActiveMovie())
+ if (_prodSource == MAITRED_BUTTOCKS && static_cast<CGameObject *>(getParent())->hasActiveMovie())
return false;
else if (++_counter < 20)
return true;
@@ -90,20 +90,20 @@ bool CMaitreDProdReceptor::MouseMoveMsg(CMouseMoveMsg *msg) {
}
bool CMaitreDProdReceptor::ProdMaitreDMsg(CProdMaitreDMsg *msg) {
- if (_fieldC4) {
+ if (_proddable) {
CMaitreD *maitreD = static_cast<CMaitreD *>(findRoomObject("MaitreD"));
if (maitreD->_speechCounter == 0) {
CViewItem *view = findView();
startTalking(maitreD, msg->_value, view);
- switch (_fieldBC) {
- case 1:
+ switch (_prodSource) {
+ case MAITRED_LEGS:
startTalking(maitreD, 128, view);
break;
- case 2:
+ case MAITRED_BUTTOCKS:
startTalking(maitreD, 129, view);
break;
- case 3:
+ case MAITRED_GENERAL:
startTalking(maitreD, 127, view);
break;
default:
@@ -117,7 +117,7 @@ bool CMaitreDProdReceptor::ProdMaitreDMsg(CProdMaitreDMsg *msg) {
}
bool CMaitreDProdReceptor::DisableMaitreDProdReceptor(CDisableMaitreDProdReceptor *msg) {
- _fieldC4 = 0;
+ _proddable = false;
return true;
}
diff --git a/engines/titanic/game/maitred/maitred_prod_receptor.h b/engines/titanic/game/maitred/maitred_prod_receptor.h
index 0b00ce0014..e862668d00 100644
--- a/engines/titanic/game/maitred/maitred_prod_receptor.h
+++ b/engines/titanic/game/maitred/maitred_prod_receptor.h
@@ -27,6 +27,8 @@
namespace Titanic {
+enum ProdSource { MAITRED_BODY = 0, MAITRED_LEGS = 1, MAITRED_BUTTOCKS = 2, MAITRED_GENERAL = 3 };
+
class CMaitreDProdReceptor : public CGameObject {
DECLARE_MESSAGE_MAP;
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
@@ -34,13 +36,13 @@ class CMaitreDProdReceptor : public CGameObject {
bool ProdMaitreDMsg(CProdMaitreDMsg *msg);
bool DisableMaitreDProdReceptor(CDisableMaitreDProdReceptor *msg);
protected:
- int _fieldBC;
+ ProdSource _prodSource;
int _counter;
- int _fieldC4;
+ bool _proddable;
public:
CLASSDEF;
CMaitreDProdReceptor() : CGameObject(),
- _fieldBC(0), _counter(0), _fieldC4(1) {}
+ _prodSource(MAITRED_BODY), _counter(0), _proddable(true) {}
/**
* Save the data for the class to file