diff options
| author | Paul Gilbert | 2016-12-31 02:44:31 -0500 | 
|---|---|---|
| committer | Paul Gilbert | 2016-12-31 02:44:31 -0500 | 
| commit | dd5ffe04fad264e233030e1727faab1c6ca176ae (patch) | |
| tree | 89a68b07af57f6fd441847d690d07f4c5a6cbc42 | |
| parent | 1fb69e99bd8d88d458f151af4008b9a7419b0060 (diff) | |
| download | scummvm-rg350-dd5ffe04fad264e233030e1727faab1c6ca176ae.tar.gz scummvm-rg350-dd5ffe04fad264e233030e1727faab1c6ca176ae.tar.bz2 scummvm-rg350-dd5ffe04fad264e233030e1727faab1c6ca176ae.zip  | |
TITANIC: Fix resetting MissiveOMat after entering an invalid login
| -rw-r--r-- | engines/titanic/game/missiveomat.cpp | 16 | ||||
| -rw-r--r-- | engines/titanic/game/missiveomat.h | 4 | 
2 files changed, 15 insertions, 5 deletions
diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp index e920be7c5d..c77e298969 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 907655b8cd..1c8e94d59c 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  };  | 
