[Scummvm-cvs-logs] scummvm master -> 911cb1ea5852839bbaed3732ba60ce8561ba15d1

tramboi bertrand_augereau at yahoo.fr
Mon Aug 22 16:49:29 CEST 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:
911cb1ea58 DREAMWEB: 'finishedwalking' ported to C++


Commit: 911cb1ea5852839bbaed3732ba60ce8561ba15d1
    https://github.com/scummvm/scummvm/commit/911cb1ea5852839bbaed3732ba60ce8561ba15d1
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-22T07:46:14-07:00

Commit Message:
DREAMWEB: 'finishedwalking' ported 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 9ca2d89..84859b1 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -143,6 +143,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'removesetobject',
 	'showallfree',
 	'adjustlen',
+	'finishedwalking',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 4ba1324..54428c6 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -15954,15 +15954,6 @@ toofaraway:
 	walktotext();
 }
 
-void DreamGenContext::finishedwalking() {
-	STACK_CHECK;
-	_cmp(data.byte(kLinepointer), 254);
-	if (!flags.z())
-		return /* (iswalking) */;
-	al = data.byte(kFacing);
-	_cmp(al, data.byte(kTurntoface));
-}
-
 void DreamGenContext::examineobtext() {
 	STACK_CHECK;
 	bl = data.byte(kCommand);
@@ -18624,7 +18615,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_walkintoroom: walkintoroom(); break;
 		case addr_afterintroroom: afterintroroom(); break;
 		case addr_obname: obname(); break;
-		case addr_finishedwalking: finishedwalking(); break;
 		case addr_examineobtext: examineobtext(); break;
 		case addr_printmessage: printmessage(); break;
 		case addr_printmessage2: printmessage2(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 5c4d016..a20d251 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -119,7 +119,6 @@ public:
 	static const uint16 addr_printmessage2 = 0xca30;
 	static const uint16 addr_printmessage = 0xca2c;
 	static const uint16 addr_examineobtext = 0xca20;
-	static const uint16 addr_finishedwalking = 0xca1c;
 	static const uint16 addr_obname = 0xca18;
 	static const uint16 addr_afterintroroom = 0xca14;
 	static const uint16 addr_walkintoroom = 0xca10;
@@ -1588,7 +1587,7 @@ public:
 	void adjustright();
 	void putunderzoom();
 	void vsync();
-	void turnpathoff();
+	//void finishedwalking();
 	void findinvpos();
 	void usetext();
 	void hangonpq();
@@ -1974,7 +1973,7 @@ public:
 	void usecontrol();
 	void buttonseven();
 	void redrawmainscrn();
-	void finishedwalking();
+	void turnpathoff();
 	void findallryan();
 	//void channel0tran();
 	void buttonpress();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e77b188..f0938ea 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1155,6 +1155,14 @@ void DreamGenContext::removesetobject(uint8 index) {
 	getsetad(index)->b58[0] = 0xff;
 }
 
+void DreamGenContext::finishedwalking() {
+	flags._z = finishedwalkingCPP();
+}
+
+bool DreamGenContext::finishedwalkingCPP() {
+	return (data.byte(kLinepointer) == 254) && (data.byte(kFacing) == data.byte(kTurntoface));
+}
+
 bool DreamGenContext::isCD() {
 	// The original sources has two codepaths depending if the game is 'if cd' or not
 	// This is a hack to guess which version to use with the assumption that if we have a cd version
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 6b0ed59..5443ee5 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -167,4 +167,7 @@
 	void removesetobject();
 	void removesetobject(uint8 index);
 	void showallfree();
+	bool finishedwalkingCPP();
+	void finishedwalking();
+
 






More information about the Scummvm-git-logs mailing list