[Scummvm-cvs-logs] scummvm master -> 9d5a831c10e4f7f006ea65d03db2615d47f1be25

tramboi bertrand_augereau at yahoo.fr
Mon Nov 28 16:46:33 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:
9d5a831c10 DREAMWEB: 'showrightpage' ported to C++


Commit: 9d5a831c10e4f7f006ea65d03db2615d47f1be25
    https://github.com/scummvm/scummvm/commit/9d5a831c10e4f7f006ea65d03db2615d47f1be25
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-28T07:45:47-08:00

Commit Message:
DREAMWEB: 'showrightpage' ported to C++

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 8e54272..a9963d2 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -304,6 +304,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'viewfolder',
 	'showfolder',
 	'showleftpage',
+	'showrightpage',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 6c63e0f..78d3098 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -9905,63 +9905,6 @@ void DreamGenContext::folderexit() {
 	showframe();
 }
 
-void DreamGenContext::showrightpage() {
-	STACK_CHECK;
-	ds = data.word(kTempgraphics2);
-	di = 143;
-	bx = 12;
-	al = 0;
-	ah = 0;
-	showframe();
-	bx = 12+37;
-	cx = 7;
-rightpageloop:
-	push(cx);
-	push(bx);
-	ds = data.word(kTempgraphics2);
-	di = 143;
-	al = 1;
-	ah = 0;
-	showframe();
-	bx = pop();
-	cx = pop();
-	_add(bx, 16);
-	if (--cx)
-		goto rightpageloop;
-	ds = data.word(kTempgraphics2);
-	di = 143;
-	al = 2;
-	ah = 0;
-	showframe();
-	data.word(kLinespacing) = 8;
-	data.byte(kKerning) = 1;
-	bl = data.byte(kFolderpage);
-	_dec(bl);
-	_add(bl, bl);
-	bh = 0;
-	_add(bx, bx);
-	es = data.word(kTextfile1);
-	si = es.word(bx);
-	_add(si, 66*2);
-	di = 152;
-	bx = 48;
-	dl = 140;
-	cx = 2;
-twolotsright:
-	push(cx);
-contrightpage:
-	printdirect();
-	_add(bx, data.word(kLinespacing));
-	_cmp(al, 0);
-	if (!flags.z())
-		goto contrightpage;
-	cx = pop();
-	if (--cx)
-		goto twolotsright;
-	data.byte(kKerning) = 0;
-	data.word(kLinespacing) = 10;
-}
-
 void DreamGenContext::entersymbol() {
 	STACK_CHECK;
 	data.byte(kManisoffscreen) = 1;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index eef7a35..e638e04 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -176,7 +176,6 @@ public:
 	static const uint16 addr_settopleft = 0xc7e0;
 	static const uint16 addr_quitsymbol = 0xc7dc;
 	static const uint16 addr_entersymbol = 0xc7d8;
-	static const uint16 addr_showrightpage = 0xc7d4;
 	static const uint16 addr_folderexit = 0xc7cc;
 	static const uint16 addr_loadfolder = 0xc7c4;
 	static const uint16 addr_lastfolder = 0xc7c0;
@@ -1383,7 +1382,7 @@ public:
 	//void loadposition();
 	//void wornerror();
 	void entersymbol();
-	//void showword();
+	//void showrightpage();
 	void dirfile();
 	//void bresenhams();
 	//void savefilewrite();
@@ -1672,7 +1671,7 @@ public:
 	void signon();
 	void deleteextext();
 	void foghornsound();
-	void showrightpage();
+	//void showword();
 	void showloadops();
 	void examicon();
 	void showgun();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 0973e9e..7808927 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2376,5 +2376,31 @@ void DreamGenContext::showleftpage() {
 	}
 }
 
+void DreamGenContext::showrightpage() {
+	showframe(tempGraphics2(), 143, 12, 0, 0);
+	uint16 y = 12+37;
+	for (size_t i = 0; i < 7; ++i) {
+		showframe(tempGraphics2(), 143, y, 1, 0);
+		y += 16;
+	}
+
+	showframe(tempGraphics2(), 143, y, 2, 0);
+	data.word(kLinespacing) = 8;
+	data.byte(kKerning) = 1;
+	uint8 pageIndex = data.byte(kFolderpage) - 1;
+	uint16 offset = segRef(data.word(kTextfile1)).word(pageIndex * 4) + 66*2;
+	const uint8 *string = segRef(data.word(kTextfile1)).ptr(offset, 0);
+	y = 48;
+	for (size_t i = 0; i < 2; ++i) {
+		uint8 lastChar;
+		do {
+			lastChar = printdirect(&string, 152, &y, 140, false);
+			y += data.word(kLinespacing);
+		} while (lastChar != '\0');
+	}
+	data.byte(kKerning) = 0;
+	data.word(kLinespacing) = 10;
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 129d906..c544253 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -357,4 +357,5 @@
 	void viewfolder();
 	void showfolder();
 	void showleftpage();
+	void showrightpage();
 






More information about the Scummvm-git-logs mailing list