[Scummvm-cvs-logs] scummvm master -> 16c9620dbad66d7c1f2bc5f4d172393c34b92371

bluegr md5 at scummvm.org
Tue Dec 6 19:18:48 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:
16c9620dba DREAMWEB: 'grafittidoor', 'hotelcontrol', 'openhoteldoor', 'openhoteldoor2', 'opentomb' ported to C++


Commit: 16c9620dbad66d7c1f2bc5f4d172393c34b92371
    https://github.com/scummvm/scummvm/commit/16c9620dbad66d7c1f2bc5f4d172393c34b92371
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-06T10:17:19-08:00

Commit Message:
DREAMWEB: 'grafittidoor', 'hotelcontrol', 'openhoteldoor', 'openhoteldoor2', 'opentomb' ported to C++

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 197909c..eee658f 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -330,6 +330,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'getundertimed',
 	'getxad',
 	'getyad',
+	'grafittidoor',
 	'handclap',
 	'hangon',
 	'hangoncurs',
@@ -337,6 +338,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'hangonp',
 	'hangonw',
 	'hotelbell',
+	'hotelcontrol',
 	'initialinv',
 	'initman',
 	'initrain',
@@ -425,11 +427,14 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'openeden',
 	'openfile',
 	'openforsave',
+	'openhoteldoor',
+	'openhoteldoor2',
 	'openinv',
 	'openlouis',
 	'openpoolboss',
 	'openryan'
 	'opensarters',
+	'opentomb',
 	'opentvdoor',
 	'openyourneighbour',
 	'othersmoker',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 3e63d18..33f1939 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -5075,34 +5075,6 @@ cupfromtapfull:
 	putBackObStuff();
 }
 
-void DreamGenContext::hotelControl() {
-	STACK_CHECK;
-	_cmp(data.byte(kReallocation), 21);
-	if (!flags.z())
-		goto notrightcont;
-	_cmp(data.byte(kMapx), 33);
-	if (!flags.z())
-		goto notrightcont;
-	showFirstUse();
-	putBackObStuff();
-	return;
-notrightcont:
-	showSecondUse();
-	putBackObStuff();
-}
-
-void DreamGenContext::openTomb() {
-	STACK_CHECK;
-	_inc(data.byte(kProgresspoints));
-	showFirstUse();
-	data.word(kWatchingtime) = 35*2;
-	data.word(kReeltowatch) = 1;
-	data.word(kEndwatchreel) = 33;
-	data.byte(kWatchspeed) = 1;
-	data.byte(kSpeedcount) = 1;
-	data.byte(kGetback) = 1;
-}
-
 void DreamGenContext::notHeldError() {
 	STACK_CHECK;
 	createPanel();
@@ -5336,92 +5308,6 @@ void DreamGenContext::drawItAll() {
 	showIcon();
 }
 
-void DreamGenContext::openHotelDoor() {
-	STACK_CHECK;
-	_cmp(data.byte(kWithobject), 255);
-	if (!flags.z())
-		goto hoteldoorwith;
-	withWhat();
-	return;
-hoteldoorwith:
-	al = data.byte(kWithobject);
-	ah = data.byte(kWithtype);
-	cl = 'K';
-	ch = 'E';
-	dl = 'Y';
-	dh = 'A';
-	compare();
-	if (flags.z())
-		goto keyonhotel1;
-	cx = 300;
-	al = 14;
-	showPuzText();
-	putBackObStuff();
-	return;
-keyonhotel1:
-	al = 16;
-	playChannel1();
-	showFirstUse();
-	data.byte(kLockstatus) = 0;
-	data.byte(kGetback) = 1;
-}
-
-void DreamGenContext::openHotelDoor2() {
-	STACK_CHECK;
-	_cmp(data.byte(kWithobject), 255);
-	if (!flags.z())
-		goto hoteldoorwith2;
-	withWhat();
-	return;
-hoteldoorwith2:
-	al = data.byte(kWithobject);
-	ah = data.byte(kWithtype);
-	cl = 'K';
-	ch = 'E';
-	dl = 'Y';
-	dh = 'A';
-	compare();
-	if (flags.z())
-		goto keyonhotel2;
-	cx = 300;
-	al = 14;
-	showPuzText();
-	putBackObStuff();
-	return;
-keyonhotel2:
-	al = 16;
-	playChannel1();
-	showFirstUse();
-	putBackObStuff();
-}
-
-void DreamGenContext::grafittiDoor() {
-	STACK_CHECK;
-	_cmp(data.byte(kWithobject), 255);
-	if (!flags.z())
-		goto grafwith;
-	withWhat();
-	return;
-grafwith:
-	al = data.byte(kWithobject);
-	ah = data.byte(kWithtype);
-	cl = 'A';
-	ch = 'P';
-	dl = 'E';
-	dh = 'N';
-	compare();
-	if (flags.z())
-		goto dograf;
-	cx = 300;
-	al = 14;
-	showPuzText();
-	putBackObStuff();
-	return;
-dograf:
-	showFirstUse();
-	putBackObStuff();
-}
-
 void DreamGenContext::usePoolReader() {
 	STACK_CHECK;
 	_cmp(data.byte(kWithobject), 255);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 93f6269..faad3a0 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -564,7 +564,6 @@ public:
 	void isRyanHolding();
 	void showSlots();
 	void useCashCard();
-	void openTomb();
 	void doSomeTalk();
 	void showSaveOps();
 	void introMonks1();
@@ -625,7 +624,6 @@ public:
 	void attendant();
 	void cantDrop();
 	void copper();
-	void openHotelDoor();
 	void drinker();
 	void nextColon();
 	void placeFreeObject();
@@ -727,11 +725,9 @@ public:
 	void isSetObOnMap();
 	void getDestInfo();
 	void setupTimedUse();
-	void grafittiDoor();
 	void makeCaps();
 	void read();
 	void additionalText();
-	void hotelControl();
 	void mugger();
 	void searchForString();
 	void selectOpenOb();
@@ -771,7 +767,6 @@ public:
 	void inToInv();
 	void parser();
 	void setMouse();
-	void openHotelDoor2();
 	void selectLocation();
 	void underTextLine();
 	void showNames();
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index e275d1d..4724ae2 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -547,6 +547,11 @@
 	void sLabDoorE();
 	void sLabDoorD();
 	void sLabDoorF();
+	void openHotelDoor();
+	void openHotelDoor2();
+	void grafittiDoor();
+	void openTomb();
+	void hotelControl();
 	void obsThatDoThings();
 	void makeMainScreen();
 	void openInv();
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index f8a3054..c70c625 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -1025,4 +1025,84 @@ void DreamGenContext::useHole() {
 	}
 }
 
+void DreamGenContext::openHotelDoor() {
+	if (data.byte(kWithobject) == 255) {
+		withWhat();
+		return;
+	}
+
+	char id[4] = { 'K', 'E', 'Y', 'A' };	// TODO: convert to string with trailing zero
+	if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) {
+		// Wrong item
+		cx = 300;
+		al = 14;
+		showPuzText();
+		putBackObStuff();
+	} else {
+		playChannel1(16);
+		showFirstUse();
+		data.byte(kLockstatus) = 0;
+		data.byte(kGetback) = 1;
+	}
+}
+
+void DreamGenContext::openHotelDoor2() {
+	if (data.byte(kWithobject) == 255) {
+		withWhat();
+		return;
+	}
+
+	char id[4] = { 'K', 'E', 'Y', 'A' };	// TODO: convert to string with trailing zero
+	if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) {
+		// Wrong item
+		cx = 300;
+		al = 14;
+		showPuzText();
+		putBackObStuff();
+	} else {
+		playChannel1(16);
+		showFirstUse();
+		putBackObStuff();
+	}
+}
+
+void DreamGenContext::grafittiDoor() {
+	if (data.byte(kWithobject) == 255) {
+		withWhat();
+		return;
+	}
+
+	char id[4] = { 'A', 'P', 'E', 'N' };	// TODO: convert to string with trailing zero
+	if (!compare(data.byte(kWithobject), data.byte(kWithtype), id)) {
+		// Wrong item
+		cx = 300;
+		al = 14;
+		showPuzText();
+		putBackObStuff();
+	} else {
+		showFirstUse();
+		putBackObStuff();
+	}
+}
+
+void DreamGenContext::openTomb() {
+	data.byte(kProgresspoints)++;
+	showFirstUse();
+	data.word(kWatchingtime) = 35 * 2;
+	data.word(kReeltowatch) = 1;
+	data.word(kEndwatchreel) = 33;
+	data.byte(kWatchspeed) = 1;
+	data.byte(kSpeedcount) = 1;
+	data.byte(kGetback) = 1;
+}
+
+void DreamGenContext::hotelControl() {
+	if (data.byte(kReallocation) != 21 || data.byte(kMapx) != 33)
+		showSecondUse();	// Not right control
+	else
+		showFirstUse();
+
+	putBackObStuff();
+}
+
 } /*namespace dreamgen */






More information about the Scummvm-git-logs mailing list