aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/game/missiveomat.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-12-31 03:15:38 -0500
committerPaul Gilbert2016-12-31 03:15:38 -0500
commit4029f328337f50a7d017ccd4979e414f490de942 (patch)
tree261fcdc8471f0c847e661c65b9c6fbde4e858460 /engines/titanic/game/missiveomat.cpp
parentfffcc7b8dd51fbd781f09dba6feaa1ed7d9f9364 (diff)
downloadscummvm-rg350-4029f328337f50a7d017ccd4979e414f490de942.tar.gz
scummvm-rg350-4029f328337f50a7d017ccd4979e414f490de942.tar.bz2
scummvm-rg350-4029f328337f50a7d017ccd4979e414f490de942.zip
TITANIC: Convert CEditControlMsg _mode to an enum
Diffstat (limited to 'engines/titanic/game/missiveomat.cpp')
-rw-r--r--engines/titanic/game/missiveomat.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp
index b11e602f27..da9c82b456 100644
--- a/engines/titanic/game/missiveomat.cpp
+++ b/engines/titanic/game/missiveomat.cpp
@@ -92,13 +92,13 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
return true;
playSound("z#228.wav");
- editMsg._mode = 6;
+ editMsg._mode = EDIT_6;
editMsg._param = msg->_key;
editMsg.execute(loginControl);
if (editMsg._param == 1000) {
// Get the username
- editMsg._mode = 3;
+ editMsg._mode = EDIT_3;
editMsg.execute(loginControl);
_username = editMsg._text;
_username.toLowercase();
@@ -108,9 +108,9 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
loadFrame(2);
_mode = MMODE_PASSWORD;
- editMsg._mode = 1;
+ editMsg._mode = EDIT_CLEAR;
editMsg.execute(loginControl);
- editMsg._mode = 10;
+ editMsg._mode = EDIT_10;
editMsg._param = 24;
editMsg.execute(loginControl);
}
@@ -122,13 +122,13 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
return true;
playSound("z#228.wav");
- editMsg._mode = 6;
+ editMsg._mode = EDIT_6;
editMsg._param = msg->_key;
editMsg.execute(loginControl);
if (editMsg._param == 1000) {
// Get the password
- editMsg._mode = 3;
+ editMsg._mode = EDIT_3;
editMsg.execute(loginControl);
_password = editMsg._text;
_password.toLowercase();
@@ -159,21 +159,21 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
// Credentials were valid, so log in
_mode = MMODE_LOGGED_IN;
loadFrame(4);
- editMsg._mode = 1;
+ editMsg._mode = EDIT_CLEAR;
editMsg.execute(loginControl);
getTextCursor()->hide();
- editMsg._mode = 13;
+ editMsg._mode = EDIT_13;
editMsg.execute(loginControl);
- editMsg._mode = 12;
+ editMsg._mode = EDIT_12;
editMsg.execute(welcome);
- editMsg._mode = 2;
+ editMsg._mode = EDIT_SET_TEXT;
editMsg._text = _welcomeMessages[_account];
editMsg.execute(welcome);
- editMsg._mode = 12;
+ editMsg._mode = EDIT_12;
editMsg._text = "MissiveOMat OK Button";
editMsg.execute(welcome);
editMsg.execute(scrollUp);
@@ -183,7 +183,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
loadFrame(3);
addTimer(1500);
- editMsg._mode = 1;
+ editMsg._mode = EDIT_CLEAR;
editMsg.execute(loginControl);
getTextCursor()->hide();
@@ -206,7 +206,7 @@ bool CMissiveOMat::TimerMsg(CTimerMsg *msg) {
CTreeItem *loginControl = findRoom()->findByName("MissiveOMat Login Control");
CEditControlMsg editMsg;
- editMsg._mode = 10;
+ editMsg._mode = EDIT_10;
editMsg._param = 8;
editMsg.execute(loginControl);
}
@@ -305,21 +305,21 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
CEditControlMsg editMsg;
for (int idx = 0; idx < 7; ++idx) {
- editMsg._mode = 0;
+ editMsg._mode = EDIT_INIT;
editMsg._param = 12;
editMsg.execute(WIDGETS[idx]);
- editMsg._mode = 1;
+ editMsg._mode = EDIT_CLEAR;
editMsg.execute(WIDGETS[idx]);
- editMsg._mode = 13;
+ editMsg._mode = EDIT_13;
editMsg.execute(WIDGETS[idx]);
}
- editMsg._mode = 12;
+ editMsg._mode = EDIT_12;
editMsg.execute("MissiveOMat Login Control");
- editMsg._mode = 10;
+ editMsg._mode = EDIT_10;
editMsg._param = 8;
editMsg.execute("MissiveOMat Login Control");
- editMsg._mode = 8;
+ editMsg._mode = EDIT_8;
editMsg.execute("MissiveOMat Login Control");
_username.clear();
@@ -336,7 +336,7 @@ bool CMissiveOMat::MissiveOMatActionMsg(CMissiveOMatActionMsg *msg) {
bool CMissiveOMat::LeaveViewMsg(CLeaveViewMsg *msg) {
CEditControlMsg editMsg;
- editMsg._mode = 9;
+ editMsg._mode = EDIT_9;
editMsg.execute("MissiveOMat Login Control");
petShowCursor();