[Scummvm-cvs-logs] scummvm master -> d48bcc93625baf9ad68db12c23b31f8dc2ae6bbc

bluegr md5 at scummvm.org
Wed Dec 7 22:03:15 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:
d48bcc9362 DREAMWEB: 'louischair' ported to C++


Commit: d48bcc93625baf9ad68db12c23b31f8dc2ae6bbc
    https://github.com/scummvm/scummvm/commit/d48bcc93625baf9ad68db12c23b31f8dc2ae6bbc
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-07T13:01:32-08:00

Commit Message:
DREAMWEB: 'louischair' ported to C++

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 74109ab..5cc7ca9 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -416,6 +416,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'look',
 	'loopchannel0',
 	'louis',
+	'louischair',
 	'madman',
 	'madmanstelly',
 	'madmantext',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 2cc69f4..fe00db1 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -75,38 +75,6 @@ gotrecep:
 	data.byte(kTalkedtorecep) = 1;
 }
 
-void DreamGenContext::louisChair() {
-	STACK_CHECK;
-	_cmp(data.byte(kRockstardead), 0);
-	if (flags.z())
-		return /* (notlouis2) */;
-	checkSpeed();
-	if (!flags.z())
-		goto notlouisanim;
-	ax = es.word(bx+3);
-	_inc(ax);
-	_cmp(ax, 191);
-	if (flags.z())
-		goto restartlouis;
-	_cmp(ax, 185);
-	if (flags.z())
-		goto randomlouis;
-	es.word(bx+3) = ax;
-	goto notlouisanim;
-randomlouis:
-	es.word(bx+3) = ax;
-	randomNumber();
-	_cmp(al, 245);
-	if (!flags.c())
-		goto notlouisanim;
-restartlouis:
-	ax = 182;
-	es.word(bx+3) = ax;
-notlouisanim:
-	showGameReel();
-	addToPeopleList();
-}
-
 void DreamGenContext::bartender() {
 	STACK_CHECK;
 	checkSpeed();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 376302e..f5f6800 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -677,7 +677,6 @@ public:
 	void fillOpen();
 	void signOn();
 	void showGun();
-	void louisChair();
 	void locationPic();
 	void triggerMessage();
 	void swapWithOpen();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 31020cd..d68e036 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -31,7 +31,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 	NULL, NULL,
 	&DreamGenContext::receptionist, NULL,
 	NULL, NULL,
-	&DreamGenContext::louisChair, &DreamGenContext::soldier1,
+	NULL, &DreamGenContext::soldier1,
 	&DreamGenContext::bossMan, NULL,
 	&DreamGenContext::heavy, NULL,
 	NULL, NULL,
@@ -63,7 +63,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	&DreamGenContext::manAsleep, &DreamGenContext::drunk,
 	/*&DreamGenContext::receptionist*/NULL, &DreamGenContext::genericPerson /*maleFan*/,
 	&DreamGenContext::genericPerson /*femaleFan*/, &DreamGenContext::louis,
-	/*&DreamGenContext::louisChair*/NULL, /*&DreamGenContext::soldier1*/NULL,
+	&DreamGenContext::louisChair, /*&DreamGenContext::soldier1*/NULL,
 	/*&DreamGenContext::bossMan*/NULL, &DreamGenContext::interviewer,
 	/*&DreamGenContext::heavy*/NULL, &DreamGenContext::manAsleep /*manAsleep2*/,
 	&DreamGenContext::genericPerson /*manSatStill*/, &DreamGenContext::drinker,
@@ -571,4 +571,22 @@ void DreamGenContext::foghornSound(ReelRoutine &routine) {
 void DreamGenContext::train(ReelRoutine &routine) {
 }
 
+void DreamGenContext::louisChair(ReelRoutine &routine) {
+	if (data.byte(kRockstardead) == 0)
+		return; // notlouis2
+
+	if (checkSpeed(routine)) {
+		uint16 nextReelPointer = routine.reelPointer() + 1;
+		if (nextReelPointer == 191)
+			routine.setReelPointer(182);	// Restart Louis
+		else if (nextReelPointer != 185)
+			routine.setReelPointer(nextReelPointer);
+		else if (engine->randomNumber() < 245)
+			routine.setReelPointer(182);	// Restart Louis
+	}
+
+	showGameReel(&routine);
+	addToPeopleList(&routine);
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index e6f73be..f374c87 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -450,6 +450,7 @@
 	void interviewer(ReelRoutine &routine);
 	void drinker(ReelRoutine &routine);
 	void alleyBarkSound(ReelRoutine &routine);
+	void louisChair(ReelRoutine &routine);
 	void singleKey(uint8 key, uint16 x, uint16 y);
 	void loadSaveBox();
 	void loadKeypad();






More information about the Scummvm-git-logs mailing list