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

bluegr md5 at scummvm.org
Sun Dec 25 15:34:00 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:
e322d6257d DREAMWEB: Port 'locationpic', 'reexfrominv' to C++


Commit: e322d6257dae83761c86c9d5bfbc7d02c0a9988d
    https://github.com/scummvm/scummvm/commit/e322d6257dae83761c86c9d5bfbc7d02c0a9988d
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-25T06:33:30-08:00

Commit Message:
DREAMWEB: Port 'locationpic', 'reexfrominv' to C++

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index abb770c..e33fc7e 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -577,6 +577,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'loadtempcharset',
 	'loadtemptext',
 	'loadtraveltext',
+	'locationpic',
 	'lockeddoorway',
 	'locklightoff',
 	'locklighton',
@@ -727,6 +728,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'redes',
 	'redrawmainscrn',
 	'reelsonscreen',
+	'reexfrominv',
 	'reexfromopen',
 	'reminders',
 	'removeemm',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index bca2232..55ab375 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -284,16 +284,6 @@ findopen2a:
 		goto findopen1a;
 }
 
-void DreamGenContext::reExFromInv() {
-	STACK_CHECK;
-	findInvPos();
-	ax = es.word(bx);
-	data.byte(kCommandtype) = ah;
-	data.byte(kCommand) = al;
-	data.byte(kExamagain) = 1;
-	data.byte(kPointermode) = 0;
-}
-
 void DreamGenContext::swapWithInv() {
 	STACK_CHECK;
 	al = data.byte(kItemframe);
@@ -881,54 +871,6 @@ cantpurge2:
 		goto lookforpurge2;
 }
 
-void DreamGenContext::locationPic() {
-	STACK_CHECK;
-	getDestInfo();
-	al = es.byte(si);
-	push(es);
-	push(si);
-	di = 0;
-	_cmp(al, 6);
-	if (!flags.c())
-		goto secondlot;
-	ds = data.word(kTempgraphics);
-	_add(al, 4);
-	goto gotgraphic;
-secondlot:
-	_sub(al, 6);
-	ds = data.word(kTempgraphics2);
-gotgraphic:
-	_add(di, 104);
-	bx = 138+14;
-	ah = 0;
-	showFrame();
-	si = pop();
-	es = pop();
-	al = data.byte(kDestpos);
-	_cmp(al, data.byte(kReallocation));
-	if (!flags.z())
-		goto notinthisone;
-	al = 3;
-	di = 104;
-	bx = 140+14;
-	ds = data.word(kTempgraphics);
-	ah = 0;
-	showFrame();
-notinthisone:
-	bl = data.byte(kDestpos);
-	bh = 0;
-	_add(bx, bx);
-	es = data.word(kTraveltext);
-	si = es.word(bx);
-	_add(si, (66*2));
-	di = 50;
-	bx = 20;
-	dl = 241;
-	al = 0;
-	ah = 0;
-	printDirect();
-}
-
 void DreamGenContext::getDestInfo() {
 	STACK_CHECK;
 	al = data.byte(kDestpos);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index db9a8c2..ffefa0d 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -461,7 +461,6 @@ public:
 	void getFreeAd();
 	void dirFile();
 	void pickupConts();
-	void reExFromInv();
 	void transferMap();
 	void purgeAnItem();
 	void getSetAd();
@@ -471,7 +470,6 @@ public:
 	void fillOpen();
 	void getEitherAd();
 	void useOpened();
-	void locationPic();
 	void swapWithOpen();
 	void dreamweb();
 	void findPathOfPoint();
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp
index 69e4528..027d7c1 100644
--- a/engines/dreamweb/newplace.cpp
+++ b/engines/dreamweb/newplace.cpp
@@ -34,7 +34,7 @@ void DreamGenContext::newPlace() {
 	}
 }
 
-// TODO: Move to DreamBase once locationPic is moved
+// TODO: Move to DreamBase once getDestInfo is moved
 void DreamGenContext::selectLocation() {
 	data.byte(kInmaparea) = 0;
 	clearBeforeLoad();
@@ -270,6 +270,20 @@ void DreamBase::readCityPic() {
 	loadIntoTemp("DREAMWEB.G04");
 }
 
+void DreamGenContext::locationPic() {
+	getDestInfo();
+	byte destFlag = es.byte(si);
+	if (destFlag >= 6)
+		showFrame(tempGraphics2(), 104, 138 + 14, destFlag - 6, 0);	// Second slot
+	else
+		showFrame(tempGraphics(),  104, 138 + 14, destFlag + 4, 0);
+
+	if (data.byte(kDestpos) == data.byte(kReallocation))
+		showFrame(tempGraphics(), 104, 140 + 14, 3, 0);	// Currently in this location
 
+	uint16 offset = kTextstart + getSegment(data.word(kTraveltext)).word(data.byte(kDestpos) * 2);
+	const uint8 *string = getSegment(data.word(kTraveltext)).ptr(offset, 0);
+	DreamBase::printDirect(string, 50, 20, 241, 241 & 1);
+}
 
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index dff5805..9d81825 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -826,4 +826,12 @@ void DreamGenContext::selectOpenOb() {
 	delPointer();
 }
 
+void DreamGenContext::reExFromInv() {
+	uint16 objectId = getSegment(data.word(kBuffers)).word(findInvPosCPP());
+	data.byte(kCommandtype) = objectId >> 8;
+	data.byte(kCommand)     = objectId & 0x00FF;
+	data.byte(kExamagain) = 1;
+	data.byte(kPointermode) = 0;
+}
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 2ad4af8..3a0ca79 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3700,4 +3700,5 @@ void DreamBase::incRyanPage() {
 	delPointer();
 
 }
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0c764a4..a4fcbf7 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -193,5 +193,7 @@
 	void outOfInv();
 	void selectOpenOb();
 	void selectLocation();
+	void reExFromInv();
+	void locationPic();
 
 #endif
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index eeda277..41b338e 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -242,7 +242,7 @@ void DreamBase::playGuitar() {
 	putBackObStuff();
 }
 
-// TODO: Move to DreamBase once selectLocation (in reality, locationPic) is moved
+// TODO: Move to DreamBase once selectLocation (in reality, getDestInfo) is moved
 void DreamGenContext::useElevator1() {
 	showFirstUse();
 	selectLocation();






More information about the Scummvm-git-logs mailing list