[Scummvm-git-logs] scummvm master -> fffcc7b8dd51fbd781f09dba6feaa1ed7d9f9364
dreammaster
dreammaster at scummvm.org
Sat Dec 31 08:55:22 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:
fffcc7b8dd TITANIC: Fix getting entered password in MissiveOMat
Commit: fffcc7b8dd51fbd781f09dba6feaa1ed7d9f9364
https://github.com/scummvm/scummvm/commit/fffcc7b8dd51fbd781f09dba6feaa1ed7d9f9364
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-12-31T02:55:10-05:00
Commit Message:
TITANIC: Fix getting entered password in MissiveOMat
Changed paths:
engines/titanic/game/missiveomat.cpp
diff --git a/engines/titanic/game/missiveomat.cpp b/engines/titanic/game/missiveomat.cpp
index c77e298..b11e602 100644
--- a/engines/titanic/game/missiveomat.cpp
+++ b/engines/titanic/game/missiveomat.cpp
@@ -97,12 +97,13 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
editMsg.execute(loginControl);
if (editMsg._param == 1000) {
+ // Get the username
editMsg._mode = 3;
editMsg.execute(loginControl);
-
_username = editMsg._text;
_username.toLowercase();
+ // Next ask for the password
if (!_username.empty()) {
loadFrame(2);
_mode = MMODE_PASSWORD;
@@ -126,9 +127,13 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
editMsg.execute(loginControl);
if (editMsg._param == 1000) {
+ // Get the password
+ editMsg._mode = 3;
+ editMsg.execute(loginControl);
_password = editMsg._text;
_password.toLowercase();
+ // Handle special variations of the names
if (_username == "droot scraliontis") {
_username = "scraliontis";
} else if (_username == "antar brobostigon") {
@@ -137,6 +142,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
_username = "leovinus";
}
+ // Check whether a valid username and password has been entered
bool validFlag = false;
if (_username == "leovinus" && _password == "other") {
validFlag = true;
@@ -150,6 +156,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
}
if (validFlag) {
+ // Credentials were valid, so log in
_mode = MMODE_LOGGED_IN;
loadFrame(4);
editMsg._mode = 1;
@@ -171,6 +178,7 @@ bool CMissiveOMat::KeyCharMsg(CKeyCharMsg *msg) {
editMsg.execute(welcome);
editMsg.execute(scrollUp);
} else {
+ // Credentials were invalid, so access denied
_mode = MMODE_DENIED;
loadFrame(3);
addTimer(1500);
More information about the Scummvm-git-logs
mailing list