diff options
| -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  };  | 
