[Scummvm-cvs-logs] scummvm master -> 8b61fb168d03e045c0fec85e8ce4fbb93dd535b8

bluegr md5 at scummvm.org
Thu Dec 8 21:06:19 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:
8b61fb168d DREAMWEB: Port 'madmanrun' to C++


Commit: 8b61fb168d03e045c0fec85e8ce4fbb93dd535b8
    https://github.com/scummvm/scummvm/commit/8b61fb168d03e045c0fec85e8ce4fbb93dd535b8
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-08T12:05:32-08:00

Commit Message:
DREAMWEB: Port 'madmanrun' to C++

Changed paths:
    devtools/tasmrecover/tasm-recover
    engines/dreamweb/dreamgen.cpp
    engines/dreamweb/dreamgen.h
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index ecc6b92..1c30478 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -432,6 +432,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'louis',
 	'louischair',
 	'madman',
+	'madmanrun',
 	'madmanstelly',
 	'madmantext',
 	'madmode',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 65d8d4a..b29e04b 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -6600,37 +6600,6 @@ void DreamGenContext::clearChanges() {
 	_stosw(cx, true);
 }
 
-void DreamGenContext::madmanRun() {
-	STACK_CHECK;
-	_cmp(data.byte(kLocation), 14);
-	if (!flags.z())
-		{ identifyOb(); return; };
-	_cmp(data.byte(kMapx), 22);
-	if (!flags.z())
-		{ identifyOb(); return; };
-	_cmp(data.byte(kPointermode), 2);
-	if (!flags.z())
-		{ identifyOb(); return; };
-	_cmp(data.byte(kMadmanflag), 0);
-	if (!flags.z())
-		{ identifyOb(); return; };
-	_cmp(data.byte(kCommandtype), 211);
-	if (flags.z())
-		goto alreadyrun;
-	data.byte(kCommandtype) = 211;
-	al = 52;
-	commandOnly();
-alreadyrun:
-	_cmp(data.word(kMousebutton), 1);
-	if (!flags.z())
-		return /* (norun) */;
-	ax = data.word(kMousebutton);
-	_cmp(ax, data.word(kOldbutton));
-	if (flags.z())
-		return /* (norun) */;
-	data.byte(kLastweapon) = 8;
-}
-
 void DreamGenContext::identifyOb() {
 	STACK_CHECK;
 	_cmp(data.word(kWatchingtime), 0);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 5e0523d..0f4dcdb 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -679,7 +679,6 @@ public:
 	void clearChanges();
 	void searchForFiles();
 	void monkSpeaking();
-	void madmanRun();
 	void getExAd();
 	void initialMonCols();
 	void useButtonA();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 674ea21..35b0ae3 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3899,4 +3899,23 @@ void DreamGenContext::afterNewRoom() {
 	atmospheres();
 }
 
+void DreamGenContext::madmanRun() {
+	if (data.byte(kLocation)    != 14 ||
+		data.byte(kMapx)        != 22 ||
+		data.byte(kPointermode) !=  2 ||
+		data.byte(kMadmanflag)  !=  0) {
+		identifyOb();
+		return;
+	}
+
+	if (data.byte(kCommandtype) != 211) {
+		data.byte(kCommandtype) = 211;
+		commandOnly(52);
+	}
+
+	if (data.word(kMousebutton) == 1 &&
+		data.word(kMousebutton) != data.word(kOldbutton))
+		data.byte(kLastweapon) = 8;
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 582109f..f4bb1ec 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -549,5 +549,6 @@
 		DreamBase::removeFreeObject(index);
 	}
 	void afterNewRoom();
+	void madmanRun();
 
 #endif






More information about the Scummvm-git-logs mailing list