diff options
author | D G Turner | 2011-12-26 23:06:49 +0000 |
---|---|---|
committer | D G Turner | 2011-12-26 23:06:49 +0000 |
commit | 72800fac9dab26d1a774a7a76ddc3b7c3c870ccf (patch) | |
tree | ca202e590864b965cf9025046b0fff5bdb920b23 /engines | |
parent | 6a7e798f465afb0f188b85664dee5ae2cda93a4a (diff) | |
download | scummvm-rg350-72800fac9dab26d1a774a7a76ddc3b7c3c870ccf.tar.gz scummvm-rg350-72800fac9dab26d1a774a7a76ddc3b7c3c870ccf.tar.bz2 scummvm-rg350-72800fac9dab26d1a774a7a76ddc3b7c3c870ccf.zip |
DREAMWEB: Improved 'getKeyAndLogo' function signature.
This removes a remaining al usage.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/dreamweb/monitor.cpp | 12 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp index 7e88838a7d..72cb4a3735 100644 --- a/engines/dreamweb/monitor.cpp +++ b/engines/dreamweb/monitor.cpp @@ -436,7 +436,7 @@ void DreamBase::showKeys() { scrollMonitor(); } -void DreamGenContext::getKeyAndLogo() { +bool DreamGenContext::getKeyAndLogo() { byte newLogo = es.byte(bx + 1) - 48; byte keyNum = es.byte(bx + 1 + 2) - 48; bx += 1 + 2 + 1; @@ -444,12 +444,12 @@ void DreamGenContext::getKeyAndLogo() { if (monitorKeyEntries[keyNum].keyAssigned == 1) { // Key OK data.byte(kLogonum) = newLogo; - al = 0; + return false; } else { monMessage(12); // "Access denied, key required -" monPrint(monitorKeyEntries[keyNum].username); scrollMonitor(); - al = 1; + return true; } } @@ -484,8 +484,7 @@ void DreamGenContext::dirFile() { } // "foundfile" - getKeyAndLogo(); - if (al != 0) + if (getKeyAndLogo()) return; // "keyok2" @@ -572,8 +571,7 @@ void DreamGenContext::read() { } // "foundfile2" - getKeyAndLogo(); - if (al != 0) + if (getKeyAndLogo()) return; // "keyok1" diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index 9cbb286022..ce2fefb615 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -90,7 +90,7 @@ bool execCommand(); void identifyOb(); void selectOb(); - void getKeyAndLogo(); + bool getKeyAndLogo(); void read(); void dirCom(); void searchForString(); |