[Scummvm-cvs-logs] scummvm master -> 024fe9ced52a1081a743646ef4459cfd34093e8e

tramboi bertrand_augereau at yahoo.fr
Sun Dec 4 14:25:06 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:
024fe9ced5 DREAMWEB: 'security' ported to C++


Commit: 024fe9ced52a1081a743646ef4459cfd34093e8e
    https://github.com/scummvm/scummvm/commit/024fe9ced52a1081a743646ef4459cfd34093e8e
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-12-04T07:16:31-08:00

Commit Message:
DREAMWEB: 'security' 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 3622ba6..fbd6b13 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -392,6 +392,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'scanfornames',
 	'screenupdate',
 	'scrollmonitor',
+	'security',
 	'seecommandtail',
 	'setallchanges',
 	'setlocation',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 39c5d0f..aa2c3b9 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -650,40 +650,6 @@ combatover2:
 	data.byte(kMandead) = 2;
 }
 
-void DreamGenContext::security() {
-	STACK_CHECK;
-	_cmp(es.word(bx+3), 32);
-	if (flags.z())
-		goto securwait;
-	_cmp(es.word(bx+3), 69);
-	if (!flags.z())
-		goto notaftersec;
-	return;
-notaftersec:
-	data.word(kWatchingtime) = 10;
-	checkSpeed();
-	if (!flags.z())
-		goto gotsecurframe;
-	_inc(es.word(bx+3));
-	goto gotsecurframe;
-securwait:
-	_cmp(data.byte(kLastweapon), 1);
-	if (!flags.z())
-		goto gotsecurframe;
-	data.word(kWatchingtime) = 10;
-	_cmp(data.byte(kManspath), 9);
-	if (!flags.z())
-		goto gotsecurframe;
-	_cmp(data.byte(kFacing), 0);
-	if (!flags.z())
-		goto gotsecurframe;
-	data.byte(kLastweapon) = -1;
-	_inc(es.word(bx+3));
-gotsecurframe:
-	showGameReel();
-	addToPeopleList();
-}
-
 void DreamGenContext::heavy() {
 	STACK_CHECK;
 	al = es.byte(bx+7);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 1264eb8..952ebfc 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -862,7 +862,6 @@ public:
 	void setTopLeft();
 	void searchForString();
 	void selectOpenOb();
-	void security();
 	void showSlots();
 	void useGun();
 	void autoAppear();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 4ab30c6..04b5db1 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -38,7 +38,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 	&DreamGenContext::bartender, NULL,
 	&DreamGenContext::tattooMan, &DreamGenContext::attendant,
 	&DreamGenContext::keeper, &DreamGenContext::candles1,
-	&DreamGenContext::smallCandle, &DreamGenContext::security,
+	&DreamGenContext::smallCandle, NULL,
 	&DreamGenContext::copper, &DreamGenContext::poolGuard,
 	NULL, &DreamGenContext::businessMan,
 	&DreamGenContext::train, &DreamGenContext::aide,
@@ -70,7 +70,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	/*&DreamGenContext::bartender*/NULL, &DreamGenContext::otherSmoker,
 	/*&DreamGenContext::tattooMan*/NULL, /*&DreamGenContext::attendant*/NULL,
 	/*&DreamGenContext::keeper*/NULL, /*&DreamGenContext::candles1*/NULL,
-	/*&DreamGenContext::smallcandle*/NULL, /*&DreamGenContext::security*/NULL,
+	/*&DreamGenContext::smallcandle*/NULL, &DreamGenContext::security,
 	/*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL,
 	&DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL,
 	/*&DreamGenContext::train*/NULL, /*&DreamGenContext::aide*/NULL,
@@ -364,5 +364,25 @@ void DreamGenContext::drunk(ReelRoutine &routine) {
 	addToPeopleList(&routine);
 }
 
+void DreamGenContext::security(ReelRoutine &routine) {
+	if (routine.reelPointer() == 32) {
+		if (data.byte(kLastweapon) == 1) {
+			data.word(kWatchingtime) = 10;
+			if ((data.byte(kManspath) == 9) && (data.byte(kFacing) == 0)) {
+				data.byte(kLastweapon) = -1;
+				routine.incReelPointer();
+			}
+		}
+	} else if (routine.reelPointer() == 69)
+		return;
+	else {
+		data.word(kWatchingtime) = 10;
+		if (checkSpeed(routine))
+			routine.incReelPointer();
+	}
+	showGameReel(&routine);
+	addToPeopleList(&routine);
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index cc168d4..d540279 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -400,6 +400,7 @@
 	void smokeBloke(ReelRoutine &routine);
 	void manAsleep(ReelRoutine &routine);
 	void drunk(ReelRoutine &routine);
+	void security(ReelRoutine &routine);
 	void singleKey(uint8 key, uint16 x, uint16 y);
 	void showKeypad();
 	void showOuterPad();






More information about the Scummvm-git-logs mailing list