[Scummvm-cvs-logs] scummvm master -> 3956046e50630e711dc705dbb3d8dedcac870ad5

tramboi bertrand_augereau at yahoo.fr
Sun Dec 4 12:40:55 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:
3956046e50 DREAMWEB: 'smokeBloke' ported to C++


Commit: 3956046e50630e711dc705dbb3d8dedcac870ad5
    https://github.com/scummvm/scummvm/commit/3956046e50630e711dc705dbb3d8dedcac870ad5
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-04T05:39:29-08:00

Commit Message:
DREAMWEB: 'smokeBloke' 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 3592edb..cc8e944 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -426,6 +426,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'showwatch',
 	'showword',
 	'singlekey',
+	'smokebloke',
 	'sortoutmap',
 	'soundonreels',
 	'sparky',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 2ae5cc5..bd861ca 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -107,47 +107,6 @@ gotrecep:
 	data.byte(kTalkedtorecep) = 1;
 }
 
-void DreamGenContext::smokeBloke() {
-	STACK_CHECK;
-	_cmp(data.byte(kRockstardead), 0);
-	if (!flags.z())
-		goto notspokento;
-	al = es.byte(bx+7);
-	_and(al, 128);
-	if (flags.z())
-		goto notspokento;
-	push(es);
-	push(bx);
-	al = 5;
-	setLocation();
-	bx = pop();
-	es = pop();
-notspokento:
-	checkSpeed();
-	if (!flags.z())
-		goto gotsmokeb;
-	_cmp(es.word(bx+3), 100);
-	if (!flags.z())
-		goto notsmokeb1;
-	randomNumber();
-	_cmp(al, 30);
-	if (flags.c())
-		goto notsmokeb2;
-	es.word(bx+3) = 96;
-	goto gotsmokeb;
-notsmokeb1:
-	_cmp(es.word(bx+3), 117);
-	if (!flags.z())
-		goto notsmokeb2;
-	es.word(bx+3) = 96;
-	goto gotsmokeb;
-notsmokeb2:
-	_inc(es.word(bx+3));
-gotsmokeb:
-	showGameReel();
-	addToPeopleList();
-}
-
 void DreamGenContext::attendant() {
 	STACK_CHECK;
 	showGameReel();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 8fa0c25..f7aa6c6 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -789,7 +789,6 @@ public:
 	void useLadder();
 	void realCredits();
 	void handClap();
-	void smokeBloke();
 	void afterIntroRoom();
 	void findAllOpen();
 	void readFromFile();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 6479d29..a05d892 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -27,7 +27,7 @@ namespace DreamGen {
 static void (DreamGenContext::*reelCallbacks[57])() = {
 	NULL, NULL,
 	NULL, &DreamGenContext::edenInBath,
-	NULL, &DreamGenContext::smokeBloke,
+	NULL, NULL,
 	&DreamGenContext::manAsleep, &DreamGenContext::drunk,
 	&DreamGenContext::receptionist, NULL,
 	NULL, &DreamGenContext::louis,
@@ -59,7 +59,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	&DreamGenContext::gamer, &DreamGenContext::sparkyDrip,
 	&DreamGenContext::eden, /*&DreamGenContext::edenInBath*/NULL,
-	&DreamGenContext::sparky, /*&DreamGenContext::smokeBloke*/NULL,
+	&DreamGenContext::sparky, &DreamGenContext::smokeBloke,
 	/*&DreamGenContext::manAsleep*/NULL, /*&DreamGenContext::drunk*/NULL,
 	/*&DreamGenContext::receptionist*/NULL, &DreamGenContext::maleFan,
 	&DreamGenContext::femaleFan, /*&DreamGenContext::louis*/NULL,
@@ -327,5 +327,26 @@ void DreamGenContext::madmansTelly(ReelRoutine &routine) {
 	showGameReel(&routine);
 }
 
+
+void DreamGenContext::smokeBloke(ReelRoutine &routine) {
+	if (data.byte(kRockstardead) == 0) {
+		if (routine.b7 & 128)
+			setLocation(5);
+	}
+	if (checkSpeed(&routine)) {
+		if (routine.reelPointer() == 100) {
+			if (engine->randomNumber() < 30)
+				routine.incReelPointer();
+			else
+				routine.setReelPointer(96);
+		} else if (routine.reelPointer() == 117)
+			routine.setReelPointer(96);
+		else
+			routine.incReelPointer();
+	}
+	showGameReel(&routine);
+	addToPeopleList(&routine);
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 6414a4e..7339f93 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -397,6 +397,7 @@
 	void maleFan(ReelRoutine &routine);
 	void rockstar(ReelRoutine &routine);
 	void madmansTelly(ReelRoutine &routine);
+	void smokeBloke(ReelRoutine &routine);
 	void singleKey(uint8 key, uint16 x, uint16 y);
 	void showKeypad();
 	void showOuterPad();






More information about the Scummvm-git-logs mailing list