[Scummvm-cvs-logs] scummvm master -> 72800fac9dab26d1a774a7a76ddc3b7c3c870ccf

digitall digitall at scummvm.org
Tue Dec 27 00:07:53 CET 2011


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:
72800fac9d DREAMWEB: Improved 'getKeyAndLogo' function signature.


Commit: 72800fac9dab26d1a774a7a76ddc3b7c3c870ccf
    https://github.com/scummvm/scummvm/commit/72800fac9dab26d1a774a7a76ddc3b7c3c870ccf
Author: D G Turner (digitall at scummvm.org)
Date: 2011-12-26T15:06:49-08:00

Commit Message:
DREAMWEB: Improved 'getKeyAndLogo' function signature.

This removes a remaining al usage.

Changed paths:
    engines/dreamweb/monitor.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/monitor.cpp b/engines/dreamweb/monitor.cpp
index 7e88838..72cb4a3 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 9cbb286..ce2fefb 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();






More information about the Scummvm-git-logs mailing list