[Scummvm-cvs-logs] scummvm master -> 823ff7549681a430b3c73d6925fc3f72bae09024

bluegr md5 at scummvm.org
Tue Dec 6 02:50:17 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:
823ff75496 DREAMWEB: 'getbackfromops', 'getbacktoops', 'newgame' ported to C++


Commit: 823ff7549681a430b3c73d6925fc3f72bae09024
    https://github.com/scummvm/scummvm/commit/823ff7549681a430b3c73d6925fc3f72bae09024
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-05T17:49:32-08:00

Commit Message:
DREAMWEB: 'getbackfromops', 'getbacktoops', 'newgame' 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 74af58f..6d15c15 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -289,6 +289,8 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'gates',
 	'generalerror',
 	'getbackfromob',
+	'getbackfromops',
+	'getbacktoops',
 	'getblockofpixel',
 	'getdimension',
 	'getexpos',
@@ -387,6 +389,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'multiput',
 	'namestoold',
 	'neterror',
+	'newgame',
 	'nextfolder',
 	'nextsymbol',
 	'obicons',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 8279a8d..ad0bd18 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -8456,39 +8456,6 @@ justret:
 	data.byte(kManisoffscreen) = 0;
 }
 
-void DreamGenContext::getBackFromOps() {
-	STACK_CHECK;
-	_cmp(data.byte(kMandead), 2);
-	if (flags.z())
-		goto opsblock1;
-	getBack1();
-	return;
-opsblock1:
-	blank();
-}
-
-void DreamGenContext::getBackToOps() {
-	STACK_CHECK;
-	_cmp(data.byte(kCommandtype), 201);
-	if (flags.z())
-		goto alreadygetops;
-	data.byte(kCommandtype) = 201;
-	al = 42;
-	commandOnly();
-alreadygetops:
-	ax = data.word(kMousebutton);
-	_cmp(ax, data.word(kOldbutton));
-	if (flags.z())
-		return /* (nogetbackops) */;
-	_and(ax, 1);
-	if (!flags.z())
-		goto dogetbackops;
-	return;
-dogetbackops:
-	oldToNames();
-	data.byte(kGetback) = 2;
-}
-
 void DreamGenContext::discOps() {
 	STACK_CHECK;
 	_cmp(data.byte(kCommandtype), 249);
@@ -8873,22 +8840,6 @@ void DreamGenContext::showDecisions() {
 	underTextLine();
 }
 
-void DreamGenContext::newGame() {
-	STACK_CHECK;
-	_cmp(data.byte(kCommandtype), 251);
-	if (flags.z())
-		goto alreadynewgame;
-	data.byte(kCommandtype) = 251;
-	al = 47;
-	commandOnly();
-alreadynewgame:
-	ax = data.word(kMousebutton);
-	_cmp(ax, 1);
-	if (!flags.z())
-		return /* (nonewgame) */;
-	data.byte(kGetback) = 3;
-}
-
 void DreamGenContext::createName() {
 	STACK_CHECK;
 	push(ax);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 2b26b3d..56a2d90 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -552,7 +552,6 @@ public:
 	void decide();
 	void entryTexts();
 	void checkInput();
-	void getBackFromOps();
 	void openSarters();
 	void putUnderCentre();
 	void checkObjectSize();
@@ -678,7 +677,6 @@ public:
 	void introMagic2();
 	void introMagic3();
 	void showDiaryPage();
-	void getBackToOps();
 	void dumpSymbol();
 	void intro1Text();
 	void transferToEx();
@@ -769,7 +767,6 @@ public:
 	void dreamweb();
 	void dropError();
 	void checkInside();
-	void newGame();
 	void setWalk();
 	void findPathOfPoint();
 	void isSetObOnMap();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index ca1f3c1..44f4d82 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3444,5 +3444,36 @@ void DreamGenContext::setBotRight() {
 		data.byte(kSymbolbotdir) = 1;
 }
 
+void DreamGenContext::newGame() {
+	if (data.byte(kCommandtype) != 251) {
+		data.byte(kCommandtype) = 251;
+		commandOnly(47);
+	}
+
+	if (data.word(kMousebutton) == 1)
+		data.byte(kGetback) = 3;
+}
+
+void DreamGenContext::getBackFromOps() {
+	if (data.byte(kMandead) == 2)
+		blank();
+	else
+		getBack1();
+}
+
+void DreamGenContext::getBackToOps() {
+	if (data.byte(kCommandtype) != 201) {
+		data.byte(kCommandtype) = 201;
+		commandOnly(42);
+	}
+
+	if (data.word(kMousebutton) != data.word(kOldbutton)) {
+		if (!(data.word(kMousebutton) & 1)) {
+			oldToNames();
+			data.byte(kGetback) = 2;
+		}
+	}
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ce799d7..0139584 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -500,5 +500,8 @@
 	void setTopRight();
 	void setBotLeft();
 	void setBotRight();
+	void newGame();
+	void getBackFromOps();
+	void getBackToOps();
 
 #endif






More information about the Scummvm-git-logs mailing list