[Scummvm-cvs-logs] scummvm master -> 0ade2240d01760b45e133412af9c8315c79fe812

bluegr md5 at scummvm.org
Mon Dec 12 16:50:18 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:
0ade2240d0 DREAMWEB: Port 'autoappear' to C++


Commit: 0ade2240d01760b45e133412af9c8315c79fe812
    https://github.com/scummvm/scummvm/commit/0ade2240d01760b45e133412af9c8315c79fe812
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-12T07:49:34-08:00

Commit Message:
DREAMWEB: Port 'autoappear' 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 8ddfed4..d7490a6 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -222,6 +222,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'animpointer',
 	'atmospheres',
 	'attendant',
+	'autoappear',
 	'autolook',
 	'autosetwalk',
 	'backobject',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 7276445..9ce8c03 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -4580,76 +4580,6 @@ void DreamGenContext::removeFreeObject() {
 	es = pop();
 }
 
-void DreamGenContext::autoAppear() {
-	STACK_CHECK;
-	_cmp(data.byte(kLocation), 32);
-	if (!flags.z())
-		goto notinalley;
-	al = 5;
-	resetLocation();
-	al = 10;
-	setLocation();
-	data.byte(kDestpos) = 10;
-	return;
-notinalley:
-	_cmp(data.byte(kReallocation), 24);
-	if (!flags.z())
-		goto notinedens;
-	_cmp(data.byte(kGeneraldead), 1);
-	if (!flags.z())
-		goto edenspart2;
-	_inc(data.byte(kGeneraldead));
-	al = 44;
-	placeSetObject();
-	al = 18;
-	placeSetObject();
-	al = 93;
-	placeSetObject();
-	al = 92;
-	removeSetObject();
-	al = 55;
-	removeSetObject();
-	al = 75;
-	removeSetObject();
-	al = 84;
-	removeSetObject();
-	al = 85;
-	removeSetObject();
-	return;
-edenspart2:
-	_cmp(data.byte(kSartaindead), 1);
-	if (!flags.z())
-		return /* (notedens2) */;
-	al = 44;
-	removeSetObject();
-	al = 93;
-	removeSetObject();
-	al = 55;
-	placeSetObject();
-	_inc(data.byte(kSartaindead));
-	return;
-notinedens:
-	_cmp(data.byte(kReallocation), 25);
-	if (!flags.z())
-		goto notonsartroof;
-	data.byte(kNewsitem) = 3;
-	al = 6;
-	resetLocation();
-	al = 11;
-	setLocation();
-	data.byte(kDestpos) = 11;
-	return;
-notonsartroof:
-	_cmp(data.byte(kReallocation), 2);
-	if (!flags.z())
-		return /* (notinlouiss) */;
-	_cmp(data.byte(kRockstardead), 0);
-	if (flags.z())
-		return /* (notinlouiss) */;
-	al = 23;
-	placeSetObject();
-}
-
 void DreamGenContext::setupTimedUse() {
 	STACK_CHECK;
 	_cmp(data.word(kTimecount), 0);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 3da8d8e..811af2f 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -589,7 +589,6 @@ public:
 	void searchForString();
 	void selectOpenOb();
 	void useGun();
-	void autoAppear();
 	void useHandle();
 	void incRyanPage();
 	void findExObject();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 71a6834..90aca9c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4262,4 +4262,49 @@ void DreamGenContext::useButtonA() {
 	}
 }
 
+void DreamGenContext::autoAppear() {
+	if (data.byte(kLocation) == 32) {
+		// In alley
+		al = 5;
+		resetLocation();
+		setLocation(10);
+		data.byte(kDestpos) = 10;
+		return;
+	}
+
+	if (data.byte(kReallocation) == 24) {
+		// In Eden's apartment
+		if (data.byte(kGeneraldead) == 1) {
+			data.byte(kGeneraldead)++;
+			placeSetObject(44);
+			placeSetObject(18);
+			placeSetObject(93);
+			removeSetObject(92);
+			removeSetObject(55);
+			removeSetObject(75);
+			removeSetObject(84);
+			removeSetObject(85);
+		} else if (data.byte(kSartaindead) == 1) {
+			// Eden's part 2
+			removeSetObject(44);
+			removeSetObject(93);
+			placeSetObject(55);
+			data.byte(kSartaindead)++;
+		}
+	} else {
+		// Not in Eden's
+		if (data.byte(kReallocation) == 25) {
+			// Sart roof
+			data.byte(kNewsitem) = 3;
+			al = 6;
+			resetLocation();
+			setLocation(11);
+			data.byte(kDestpos) = 11;
+		} else {
+			if (data.byte(kReallocation) == 2 && data.byte(kRockstardead) != 0)
+				placeSetObject(23);
+		}
+	}
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 4efcc3c..0447a89 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -565,5 +565,6 @@
 	void monkSpeaking();
 	void rollEndCredits2();
 	void useButtonA();
+	void autoAppear();
 
 #endif






More information about the Scummvm-git-logs mailing list