[Scummvm-git-logs] scummvm master -> dd5ffe04fad264e233030e1727faab1c6ca176ae
dreammaster
dreammaster at scummvm.org
Sat Dec 31 08:44:43 CET 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dd5ffe04fa TITANIC: Fix resetting MissiveOMat after entering an invalid login
Commit: dd5ffe04fad264e233030e1727faab1c6ca176ae
https://github.com/scummvm/scummvm/commit/dd5ffe04fad264e233030e1727faab1c6ca176ae
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-12-31T02:44:31-05:00
Commit Message:
TITANIC: Fix resetting MissiveOMat after entering an invalid login
Changed paths:
engines/titanic/game/missiveomat.cpp
engines/titanic/game/missiveomat.h
diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp
index e920be7..c77e298 100644
--- a/engines/titanic/game/missiveomat.cpp
+++ b/engines/titanic/game/missiveomat.cpp
@@ -88,6 +88,9 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
switch (_mode) {
case MMODE_USERNAME:
+ if (!msg->_key)
+ return true;
+
playSound("z#228.wav");
editMsg._mode = 6;
editMsg._param = msg->_key;
@@ -114,6 +117,9 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
break;
case MMODE_PASSWORD:
+ if (!msg->_key)
+ return true;
+
playSound("z#228.wav");
editMsg._mode = 6;
editMsg._param = msg->_key;
@@ -144,7 +150,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
}
if (validFlag) {
- _mode = MMODE_4;
+ _mode = MMODE_LOGGED_IN;
loadFrame(4);
editMsg._mode = 1;
editMsg.execute(loginControl);
@@ -165,7 +171,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
editMsg.execute(welcome);
editMsg.execute(scrollUp);
} else {
- _mode = MMODE_3;
+ _mode = MMODE_DENIED;
loadFrame(3);
addTimer(1500);
@@ -185,7 +191,11 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
}
bool CMissiveOMat::TimerMsg(CTimerMsg *msg) {
- if (_mode == 3) {
+ if (_mode == MMODE_DENIED) {
+ // Reset back to asking for a login username
+ _mode = MMODE_USERNAME;
+ loadFrame(1);
+
CTreeItem *loginControl = findRoom()->findByName("MissiveOMat Login Control");
CEditControlMsg editMsg;
editMsg._mode = 10;
diff --git a/engines/titanic/game/missiveomat.h b/engines/titanic/game/missiveomat.h
index 907655b..1c8e94d 100644
--- a/engines/titanic/game/missiveomat.h
+++ b/engines/titanic/game/missiveomat.h
@@ -36,8 +36,8 @@ enum MissiveOMatAction {
enum MissiveOMatMode {
MMODE_USERNAME = 1,
MMODE_PASSWORD = 2,
- MMODE_3 = 3,
- MMODE_4 = 4,
+ MMODE_DENIED = 3,
+ MMODE_LOGGED_IN = 4,
MMODE_5 = 5
};
More information about the Scummvm-git-logs
mailing list