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

tramboi bertrand_augereau at yahoo.fr
Tue Nov 15 12:08:12 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:
bc509e9e08 DREAMWEB: 'roomname' ported to C++


Commit: bc509e9e086a5d0025e904b0a0e14fbbd23c6786
    https://github.com/scummvm/scummvm/commit/bc509e9e086a5d0025e904b0a0e14fbbd23c6786
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-14T11:57:11-08:00

Commit Message:
DREAMWEB: 'roomname' 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 145c4bb..adaf05a 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -207,6 +207,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'convicons',
 	'examineob',
 	'showwatch',
+	'roomname',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 86ef9c4..407e2fc 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -14550,42 +14550,6 @@ void DreamGenContext::showman() {
 	showframe();
 }
 
-void DreamGenContext::roomname() {
-	STACK_CHECK;
-	di = 88;
-	bx = 18;
-	al = 53;
-	dl = 240;
-	printmessage();
-	bl = data.byte(kRoomnum);
-	_cmp(bl, 32);
-	if (flags.c())
-		goto notover32;
-	_sub(bl, 32);
-notover32:
-	bh = 0;
-	_add(bx, bx);
-	es = data.word(kRoomdesc);
-	_add(bx, (0));
-	ax = es.word(bx);
-	_add(ax, (0+(38*2)));
-	si = ax;
-	data.word(kLinespacing) = 7;
-	di = 88;
-	bx = 25;
-	dl = 120;
-	_cmp(data.byte(kWatchon), 1);
-	if (flags.z())
-		goto gotpl;
-	dl = 160;
-gotpl:
-	al = 0;
-	ah = 0;
-	printdirect();
-	data.word(kLinespacing) = 10;
-	usecharset1();
-}
-
 void DreamGenContext::usecharset1() {
 	STACK_CHECK;
 	ax = data.word(kCharset1);
@@ -16856,7 +16820,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_workoutframes: workoutframes(); break;
 		case addr_middlepanel: middlepanel(); break;
 		case addr_showman: showman(); break;
-		case addr_roomname: roomname(); break;
 		case addr_usecharset1: usecharset1(); break;
 		case addr_usetempcharset: usetempcharset(); break;
 		case addr_showexit: showexit(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 1368a53..8429913 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -93,7 +93,6 @@ public:
 	static const uint16 addr_showexit = 0xca80;
 	static const uint16 addr_usetempcharset = 0xca7c;
 	static const uint16 addr_usecharset1 = 0xca78;
-	static const uint16 addr_roomname = 0xca74;
 	static const uint16 addr_showman = 0xca6c;
 	static const uint16 addr_middlepanel = 0xca68;
 	static const uint16 addr_workoutframes = 0xca54;
@@ -1873,7 +1872,7 @@ public:
 	void clearrest();
 	//void getreelframeax();
 	void barwoman();
-	void roomname();
+	//void roomname();
 	void credits();
 	void madmanrun();
 	void randomnum1();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 85f620b..97d0f08 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1959,5 +1959,19 @@ void DreamGenContext::showwatch() {
 	}
 }
 
+void DreamGenContext::roomname() {
+	printmessage(88, 18, 53, 240, false);
+	uint16 textIndex = data.byte(kRoomnum);
+	if (textIndex >= 32)
+		textIndex -= 32;
+	data.word(kLinespacing) = 7;
+	uint8 maxWidth = (data.byte(kWatchon) == 1) ? 120 : 160;
+	uint16 descOffset = segRef(data.word(kRoomdesc)).word(kIntextdat + textIndex * 2);
+	const uint8 *string = segRef(data.word(kRoomdesc)).ptr(kIntext + descOffset, 0);
+	printdirect(string, 88, 25, maxWidth, false);
+	data.word(kLinespacing) = 10;
+	usecharset1();
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 510cc3d..0faccc5 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -251,4 +251,5 @@
 	void convicons();
 	void examineob(bool examineAgain = true);
 	void showwatch();
+	void roomname();
 






More information about the Scummvm-git-logs mailing list