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

bluegr md5 at scummvm.org
Sun Dec 25 20:01:24 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:
e27a5931c8 DREAMWEB: Remove getdestinfo() and access the roomPics array directly in locationPic()


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

Commit Message:
DREAMWEB: Remove getdestinfo() and access the roomPics array directly in locationPic()

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 7ae43e4..120e5ad 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -50,6 +50,7 @@ p = parser(skip_binary_data = [
 	'volumetabname',
 	'commandline',
 	'openchangesize',
+	'roompics',
 	# keypad.asm
 	'keypadlist',
 	'symbollist',
@@ -474,6 +475,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'getbackfromops',
 	'getbacktoops',
 	'getblockofpixel',
+	'getdestinfo',
 	'getdimension',
 	'getexpos',
 	'getflagunderp',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 3ab3a66..f71ced9 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -475,25 +475,6 @@ void DreamGenContext::transferConToEx() {
 	ds.byte(si+2) = 255;
 }
 
-void DreamGenContext::getDestInfo() {
-	STACK_CHECK;
-	al = data.byte(kDestpos);
-	ah = 0;
-	push(ax);
-	dx = data;
-	es = dx;
-	si = 537;
-	_add(si, ax);
-	cl = es.byte(si);
-	ax = pop();
-	push(cx);
-	dx = data;
-	es = dx;
-	si = 553;
-	_add(si, ax);
-	ax = pop();
-}
-
 void DreamGenContext::dirCom() {
 	STACK_CHECK;
 	cx = 30;
@@ -767,7 +748,7 @@ void DreamGenContext::parser() {
 	al = '=';
 	_stosb();
 	ds = cs;
-	si = 571;
+	si = 556;
 notspace1:
 	_lodsw();
 	_cmp(al, 32);
@@ -952,9 +933,9 @@ void DreamGenContext::__start() {
 		//0x0200: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 
 		//0x0210: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0220: .... .... .... ....
-		0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0230: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0240: .... .... .... ....
@@ -968,11 +949,9 @@ void DreamGenContext::__start() {
 		//0x0280: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0290: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
 		//0x02a0: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 
-		//0x02b0: .... .... .... ....
-		0xff, 0x00, 0x00, 0x00, };
+		0xff, 0xff, 0x00, 0x00, 0x00, };
 	ds.assign(src, src + sizeof(src));
 	dreamweb(); 
 }
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index cd65c72..7247bed 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -346,13 +346,12 @@ static const uint16 kRoomssample = 420;
 static const uint16 kBasicsample = 421;
 static const uint16 kCurrentfile = 462;
 static const uint16 kRoomscango = 537;
-static const uint16 kRoompics = 553;
-static const uint16 kOplist = 568;
-static const uint16 kInputline = 571;
-static const uint16 kPresslist = 699;
-static const uint16 kQuitrequested = 705;
-static const uint16 kSubtitles = 706;
-static const uint16 kForeignrelease = 707;
+static const uint16 kOplist = 553;
+static const uint16 kInputline = 556;
+static const uint16 kPresslist = 684;
+static const uint16 kQuitrequested = 690;
+static const uint16 kSubtitles = 691;
+static const uint16 kForeignrelease = 692;
 static const uint16 kBlocktextdat = (0);
 static const uint16 kPersonframes = (0);
 static const uint16 kDebuglevel1 = (0);
@@ -469,7 +468,6 @@ public:
 	void getEitherAd();
 	void dreamweb();
 	void findPathOfPoint();
-	void getDestInfo();
 	void read();
 	void searchForString();
 	void searchForFiles();
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp
index b2456ad..e311f44 100644
--- a/engines/dreamweb/newplace.cpp
+++ b/engines/dreamweb/newplace.cpp
@@ -142,11 +142,13 @@ void DreamBase::putUnderCentre() {
 }
 
 void DreamBase::locationPic() {
-	byte destFlag = data.byte(553 + data.byte(kDestpos));
-	if (destFlag >= 6)
-		showFrame(tempGraphics2(), 104, 138 + 14, destFlag - 6, 0);	// Second slot
+	const int roomPics[] = { 5, 0, 3, 2, 4, 1, 10, 9, 8, 6, 11, 4, 7, 7, 0 };
+	byte picture = roomPics[data.byte(kDestpos)];
+
+	if (picture >= 6)
+		showFrame(tempGraphics2(), 104, 138 + 14, picture - 6, 0);	// Second slot
 	else
-		showFrame(tempGraphics(),  104, 138 + 14, destFlag + 4, 0);
+		showFrame(tempGraphics(),  104, 138 + 14, picture + 4, 0);
 
 	if (data.byte(kDestpos) == data.byte(kReallocation))
 		showFrame(tempGraphics(), 104, 140 + 14, 3, 0);	// Currently in this location
@@ -156,8 +158,6 @@ void DreamBase::locationPic() {
 	DreamBase::printDirect(string, 50, 20, 241, 241 & 1);
 }
 
-// TODO: put Getdestinfo here
-
 void DreamBase::showArrows() {
 	showFrame(tempGraphics(), 116 - 12, 16, 0, 0);
 	showFrame(tempGraphics(), 226 + 12, 16, 1, 0);
@@ -177,9 +177,7 @@ void DreamGenContext::nextDest() {
 		data.byte(kDestpos)++;
 		if (data.byte(kDestpos) == 15)
 			data.byte(kDestpos) = 0;	// last destination
-
-		getDestInfo();
-	} while (al == 0);
+	} while (!data.byte(kRoomscango + data.byte(kDestpos)));
 
 	data.byte(kNewtextline) = 1;
 	delTextLine();
@@ -208,9 +206,7 @@ void DreamGenContext::lastDest() {
 		data.byte(kDestpos)--;
 		if (data.byte(kDestpos) == 0xFF)
 			data.byte(kDestpos) = 15;	// first destination
-
-		getDestInfo();
-	} while (al == 0);
+	} while (!data.byte(kRoomscango + data.byte(kDestpos)));
 
 	data.byte(kNewtextline) = 1;
 	delTextLine();
@@ -235,7 +231,6 @@ void DreamGenContext::destSelect() {
 	if (!(data.word(kMousebutton) & 1) || data.word(kOldbutton) == 1)
 		return;	// notrav
 
-	getDestInfo();
 	data.byte(kNewlocation) = data.byte(kDestpos);
 }
 






More information about the Scummvm-git-logs mailing list