[Scummvm-cvs-logs] scummvm master -> 6507853b87023ef4b5bab2519b5764fa2ac57bca

bluegr md5 at scummvm.org
Mon Dec 12 20:53: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:
6507853b87 DREAMWEB: Port 'entryanims' to C++


Commit: 6507853b87023ef4b5bab2519b5764fa2ac57bca
    https://github.com/scummvm/scummvm/commit/6507853b87023ef4b5bab2519b5764fa2ac57bca
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-12T11:52:00-08:00

Commit Message:
DREAMWEB: Port 'entryanims' 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 c182ca5..526a010 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -357,6 +357,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'endpaltostart',
 	'entercode',
 	'entersymbol',
+	'entryanims',
 	'entrytexts',
 	'eraseoldobs',
 	'error',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 76fbf92..f449b8f 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -5029,137 +5029,6 @@ nomatchslot:
 		goto slotloop;
 }
 
-void DreamGenContext::entryAnims() {
-	STACK_CHECK;
-	data.word(kReeltowatch) = -1;
-	data.byte(kWatchmode) = -1;
-	_cmp(data.byte(kLocation), 33);
-	if (!flags.z())
-		goto notinthebeach;
-	switchRyanOff();
-	data.word(kWatchingtime) = 76*2;
-	data.word(kReeltowatch) = 0;
-	data.word(kEndwatchreel) = 76;
-	data.byte(kWatchspeed) = 1;
-	data.byte(kSpeedcount) = 1;
-	return;
-notinthebeach:
-	_cmp(data.byte(kLocation), 44);
-	if (!flags.z())
-		goto notsparkys;
-	al = 8;
-	resetLocation();
-	data.word(kWatchingtime) = 50*2;
-	data.word(kReeltowatch) = 247;
-	data.word(kEndwatchreel) = 297;
-	data.byte(kWatchspeed) = 1;
-	data.byte(kSpeedcount) = 1;
-	switchRyanOff();
-	return;
-notsparkys:
-	_cmp(data.byte(kLocation), 22);
-	if (!flags.z())
-		goto notinthelift;
-	data.word(kWatchingtime) = 31*2;
-	data.word(kReeltowatch) = 0;
-	data.word(kEndwatchreel) = 30;
-	data.byte(kWatchspeed) = 1;
-	data.byte(kSpeedcount) = 1;
-	switchRyanOff();
-	return;
-notinthelift:
-	_cmp(data.byte(kLocation), 26);
-	if (!flags.z())
-		goto notunderchurch;
-	data.byte(kSymboltopnum) = 2;
-	data.byte(kSymbolbotnum) = 1;
-	return;
-notunderchurch:
-	_cmp(data.byte(kLocation), 45);
-	if (!flags.z())
-		goto notenterdream;
-	data.byte(kKeeperflag) = 0;
-	data.word(kWatchingtime) = 296;
-	data.word(kReeltowatch) = 45;
-	data.word(kEndwatchreel) = 198;
-	data.byte(kWatchspeed) = 1;
-	data.byte(kSpeedcount) = 1;
-	switchRyanOff();
-	return;
-notenterdream:
-	_cmp(data.byte(kReallocation), 46);
-	if (!flags.z())
-		goto notcrystal;
-	_cmp(data.byte(kSartaindead), 1);
-	if (!flags.z())
-		goto notcrystal;
-	al = 0;
-	removeFreeObject();
-	return;
-notcrystal:
-	_cmp(data.byte(kLocation), 9);
-	if (!flags.z())
-		goto nottopchurch;
-	al = 2;
-	checkIfPathIsOn();
-	if (flags.z())
-		goto nottopchurch;
-	_cmp(data.byte(kAidedead), 0);
-	if (flags.z())
-		goto nottopchurch;
-	al = 3;
-	checkIfPathIsOn();
-	if (!flags.z())
-		goto makedoorsopen;
-	al = 2;
-	turnPathOn();
-makedoorsopen:
-	al = 4;
-	removeSetObject();
-	al = 5;
-	placeSetObject();
-	return;
-nottopchurch:
-	_cmp(data.byte(kLocation), 47);
-	if (!flags.z())
-		goto notdreamcentre;
-	al = 4;
-	placeSetObject();
-	al = 5;
-	placeSetObject();
-	return;
-notdreamcentre:
-	_cmp(data.byte(kLocation), 38);
-	if (!flags.z())
-		goto notcarpark;
-	data.word(kWatchingtime) = 57*2;
-	data.word(kReeltowatch) = 4;
-	data.word(kEndwatchreel) = 57;
-	data.byte(kWatchspeed) = 1;
-	data.byte(kSpeedcount) = 1;
-	switchRyanOff();
-	return;
-notcarpark:
-	_cmp(data.byte(kLocation), 32);
-	if (!flags.z())
-		goto notalley;
-	data.word(kWatchingtime) = 66*2;
-	data.word(kReeltowatch) = 0;
-	data.word(kEndwatchreel) = 66;
-	data.byte(kWatchspeed) = 1;
-	data.byte(kSpeedcount) = 1;
-	switchRyanOff();
-	return;
-notalley:
-	_cmp(data.byte(kLocation), 24);
-	if (!flags.z())
-		return /* (notedensagain) */;
-	al = 2;
-	ah = data.byte(kRoomnum);
-	_dec(ah);
-	turnAnyPathOn();
-}
-
 void DreamGenContext::clearBuffers() {
 	STACK_CHECK;
 	es = data.word(kBuffers);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index c0c7407..337a331 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -522,7 +522,6 @@ public:
 	void inToInv();
 	void adjustLeft();
 	void deleteExText();
-	void entryAnims();
 	void getFreeAd();
 	void removeObFromInv();
 	void heavy();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e4c9a75..20d2b64 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4349,13 +4349,13 @@ void DreamBase::entryTexts() {
 	case 31:
 		setupTimedUse(30, 60, 11, 68, 64);
 		break;
-	case 20:
+	case 20:	// Sarter's 2
 		setupTimedUse(31, 60, 11, 68, 64);
 		break;
-	case 24:
+	case 24:	// Eden's lobby
 		setupTimedUse(32, 60, 3, 68, 64);
 		break;
-	case 34:
+	case 34:	// Eden 2
 		setupTimedUse(33, 60, 3, 68, 64);
 		break;
 	default:
@@ -4363,4 +4363,82 @@ void DreamBase::entryTexts() {
 	}
 }
 
+void DreamGenContext::entryAnims() {
+	data.word(kReeltowatch) = 0xFFFF;
+	data.byte(kWatchmode) = (byte)-1;
+
+	switch (data.byte(kLocation)) {
+	case 33:	// beach
+		switchRyanOff();
+		data.word(kWatchingtime) = 76 * 2;
+		data.word(kReeltowatch) = 0;
+		data.word(kEndwatchreel) = 76;
+		data.byte(kWatchspeed) = 1;
+		data.byte(kSpeedcount) = 1;
+		break;
+	case 44:	// Sparky's
+		al = 8;
+		resetLocation();
+		data.word(kWatchingtime) = 50*2;
+		data.word(kReeltowatch) = 247;
+		data.word(kEndwatchreel) = 297;
+		data.byte(kWatchspeed) = 1;
+		data.byte(kSpeedcount) = 1;
+		switchRyanOff();
+		break;
+	case 22:	// lift
+		data.word(kWatchingtime) = 31 * 2;
+		data.word(kReeltowatch) = 0;
+		data.word(kEndwatchreel) = 30;
+		data.byte(kWatchspeed) = 1;
+		data.byte(kSpeedcount) = 1;
+		switchRyanOff();
+		break;
+	case 26:	// under church
+		data.byte(kSymboltopnum) = 2;
+		data.byte(kSymbolbotnum) = 1;
+		break;
+	case 45:	// entered Dreamweb
+		data.byte(kKeeperflag) = 0;
+		data.word(kWatchingtime) = 296;
+		data.word(kReeltowatch) = 45;
+		data.word(kEndwatchreel) = 198;
+		data.byte(kWatchspeed) = 1;
+		data.byte(kSpeedcount) = 1;
+		switchRyanOff();
+		break;
+	default:
+		if (data.byte(kReallocation) == 46 && data.byte(kSartaindead) == 1) {	// Crystal
+			removeFreeObject(0);
+		} else if (data.byte(kLocation) == 9 && checkIfPathIsOn(2) && data.byte(kAidedead) == 0) {
+			// Top of church
+			if (checkIfPathIsOn(3))
+				turnPathOn(2);
+
+			// Make doors open
+			removeSetObject(4);
+			placeSetObject(5);
+		} else if (data.byte(kLocation) == 47) {	// Dream centre
+			placeSetObject(4);
+			placeSetObject(5);
+		} else if (data.byte(kLocation) == 38) {	// Car park
+			data.word(kWatchingtime) = 57 * 2;
+			data.word(kReeltowatch) = 4;
+			data.word(kEndwatchreel) = 57;
+			data.byte(kWatchspeed) = 1;
+			data.byte(kSpeedcount) = 1;
+			switchRyanOff();
+		} else if (data.byte(kLocation) == 32) {	// Alley
+			data.word(kWatchingtime) = 66 * 2;
+			data.word(kReeltowatch) = 0;
+			data.word(kEndwatchreel) = 66;
+			data.byte(kWatchspeed) = 1;
+			data.byte(kSpeedcount) = 1;
+			switchRyanOff();
+		} else if (data.byte(kLocation) == 24) {	// Eden's again
+			turnAnyPathOn(2, data.byte(kRoomnum) - 1);
+		}
+	}
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 661eba3..ca1b68f 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -568,5 +568,6 @@
 	void autoAppear();
 	void quitKey();
 	void setupTimedUse();
+	void entryAnims();
 
 #endif






More information about the Scummvm-git-logs mailing list