[Scummvm-cvs-logs] scummvm master -> 60f9b91ced244fd7bdb822cc4471a937d38d6179

bluegr md5 at scummvm.org
Thu Dec 15 22:46:09 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:
60f9b91ced DREAMWEB: Port 'mugger' to C++, remove the unused 'findpuztext' function and fix tasm-recover


Commit: 60f9b91ced244fd7bdb822cc4471a937d38d6179
    https://github.com/scummvm/scummvm/commit/60f9b91ced244fd7bdb822cc4471a937d38d6179
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-15T13:45:09-08:00

Commit Message:
DREAMWEB: Port 'mugger' to C++, remove the unused 'findpuztext' function and fix tasm-recover

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 d902e38..bb350fc 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -157,6 +157,11 @@ p = parser(skip_binary_data = [
 	'increment2',
 	'keypadax',
 	'keypadcx',
+	'soundbuffer',
+	'cursloc',
+	'liftsoundcount',
+	'playblock',
+	'gotfrom',
 	# vgagrafx.asm
 	'cityname',
 	'extragraphics1',
@@ -405,6 +410,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'findnextcolon',
 	'findobname',
 	'findormake',
+	'findpuztext',
 	'findroominloc',
 	'findsetobject',
 	'findsource',
@@ -468,6 +474,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'hangonpq',
 	'hangonw',
 	'heavy',
+	'helicopter',
 	'hotelbell',
 	'hotelcontrol',
 	'initialinv',
@@ -563,6 +570,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'moretalk',
 	'mousecall',
 	'movemap',
+	'mugger',
 	'multidump',
 	'multiget',
 	'multiput',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 92bb062..8892c84 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -26,81 +26,6 @@
 
 namespace DreamGen {
 
-void DreamGenContext::mugger() {
-	STACK_CHECK;
-	ax = es.word(bx+3);
-	_cmp(ax, 138);
-	if (flags.z())
-		goto endmugger1;
-	_cmp(ax, 176);
-	if (flags.z())
-		return /* (endmugger2) */;
-	_cmp(ax, 2);
-	if (!flags.z())
-		goto havesetwatch;
-	data.word(kWatchingtime) = 175*2;
-havesetwatch:
-	checkSpeed();
-	if (!flags.z())
-		goto notmugger;
-	_inc(es.word(bx+3));
-notmugger:
-	showGameReel();
-	al = data.byte(kMapx);
-	es.byte(bx+1) = al;
-	return;
-endmugger1:
-	push(es);
-	push(bx);
-	createPanel2();
-	showIcon();
-	al = 41;
-	findPuzText();
-	di = 33+20;
-	bx = 104;
-	dl = 241;
-	ah = 0;
-	printDirect();
-	workToScreen();
-	cx = 300;
-	hangOn();
-	bx = pop();
-	es = pop();
-	push(es);
-	push(bx);
-	es.word(bx+3) = 140;
-	data.byte(kManspath) = 2;
-	data.byte(kFinaldest) = 2;
-	findXYFromPath();
-	data.byte(kResetmanxy) = 1;
-	al = 'W';
-	ah = 'E';
-	cl = 'T';
-	ch = 'A';
-	findExObject();
-	data.byte(kCommand) = al;
-	data.byte(kObjecttype) = 4;
-	removeObFromInv();
-	al = 'W';
-	ah = 'E';
-	cl = 'T';
-	ch = 'B';
-	findExObject();
-	data.byte(kCommand) = al;
-	data.byte(kObjecttype) = 4;
-	removeObFromInv();
-	makeMainScreen();
-	al = 48;
-	bl = 68-32;
-	bh = 54+64;
-	cx = 70;
-	dx = 10;
-	setupTimedUse();
-	data.byte(kBeenmugged) = 1;
-	bx = pop();
-	es = pop();
-}
-
 void DreamGenContext::businessMan() {
 	STACK_CHECK;
 	data.byte(kPointermode) = 0;
@@ -3358,17 +3283,6 @@ notfoundinside:
 		goto insideloop;
 }
 
-void DreamGenContext::findPuzText() {
-	STACK_CHECK;
-	ah = 0;
-	si = ax;
-	_add(si, si);
-	es = data.word(kPuzzletext);
-	ax = es.word(si);
-	_add(ax, (66*2));
-	si = ax;
-}
-
 void DreamGenContext::useGun() {
 	STACK_CHECK;
 	_cmp(data.byte(kObjecttype), 4);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index fbefd91..5a61fcb 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -540,7 +540,6 @@ public:
 	void findPathOfPoint();
 	void getDestInfo();
 	void read();
-	void mugger();
 	void searchForString();
 	void selectOpenOb();
 	void useGun();
@@ -549,7 +548,6 @@ public:
 	void searchForFiles();
 	void getExAd();
 	void initialMonCols();
-	void findPuzText();
 	void swapWithInv();
 	void adjustRight();
 	void transferToEx();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 8b68c52..e4e3682 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -42,7 +42,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
 	NULL, &DreamGenContext::poolGuard,
 	NULL, &DreamGenContext::businessMan,
 	NULL, NULL,
-	&DreamGenContext::mugger, NULL,
+	NULL, NULL,
 	NULL, NULL,
 	NULL, NULL,
 	NULL, NULL,
@@ -74,7 +74,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
 	&DreamGenContext::copper, /*&DreamGenContext::poolGuard*/NULL,
 	&DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL,
 	&DreamGenContext::train, &DreamGenContext::genericPerson /*aide*/,
-	/*&DreamGenContext::mugger*/NULL, &DreamGenContext::helicopter,
+	&DreamGenContext::mugger, &DreamGenContext::helicopter,
 	&DreamGenContext::introMagic1, &DreamGenContext::introMusic,
 	&DreamGenContext::introMagic2, &DreamGenContext::candles2,
 	&DreamGenContext::gates, &DreamGenContext::introMagic3,
@@ -908,4 +908,44 @@ void DreamGenContext::helicopter(ReelRoutine &routine) {
 	}
 }
 
+void DreamGenContext::mugger(ReelRoutine &routine) {
+	if (routine.reelPointer() != 138) {
+		if (routine.reelPointer() == 176)
+			return; // endmugger2
+
+		if (routine.reelPointer() == 2)
+			data.word(kWatchingtime) = 175 * 2;	// set watch
+
+		if (checkSpeed(routine))
+			routine.incReelPointer();
+
+		showGameReel(&routine);
+		routine.mapX = data.byte(kMapx);
+	} else {
+		createPanel2();
+		showIcon();
+
+		uint16 offset = kTextstart + getSegment(data.word(kPuzzletext)).word(41 * 2);
+		const uint8 *string = getSegment(data.word(kPuzzletext)).ptr(offset, 0);
+		uint16 y = 104;
+		printDirect(&string, 33 + 20, &y, 241, 241 & 1);
+		workToScreenCPP();
+		hangOn(300);
+		routine.setReelPointer(140);
+		data.byte(kManspath) = 2;
+		data.byte(kFinaldest) = 2;
+		findXYFromPath();
+		data.byte(kResetmanxy) = 1;
+		data.byte(kCommand) = findExObject("WETA");
+		data.byte(kObjecttype) = 4;
+		removeObFromInv();
+		data.byte(kCommand) = findExObject("WETB");
+		data.byte(kObjecttype) = 4;
+		removeObFromInv();
+		makeMainScreen();
+		DreamBase::setupTimedUse(48, 70, 10, 68 - 32, 54 + 64);
+		data.byte(kBeenmugged) = 1;
+	}
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0f5a5ca..33e43eb 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -382,6 +382,7 @@
 	void bartender(ReelRoutine &routine);
 	void heavy(ReelRoutine &routine);
 	void helicopter(ReelRoutine &routine);
+	void mugger(ReelRoutine &routine);
 	void singleKey(uint8 key, uint16 x, uint16 y);
 	void loadSaveBox();
 	uint8 nextSymbol(uint8 symbol);






More information about the Scummvm-git-logs mailing list