[Scummvm-cvs-logs] scummvm master -> 5d5249e1d997035db8c98f8b5d76b50f0a3f5676

tramboi bertrand_augereau at yahoo.fr
Wed Nov 23 21:26:42 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:
5d5249e1d9 DREAMWEB: 'dolook' ported to C++


Commit: 5d5249e1d997035db8c98f8b5d76b50f0a3f5676
    https://github.com/scummvm/scummvm/commit/5d5249e1d997035db8c98f8b5d76b50f0a3f5676
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-11-23T14:23:37-08:00

Commit Message:
DREAMWEB: 'dolook' 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 c4946db..e1b8b51 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -274,6 +274,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'findroominloc',
 	'look',
 	'autolook',
+	'dolook',
 	'reelsonscreen',
 	'reconstruct',
 	], skip_output = [
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 0a69411..59b0537 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -4894,44 +4894,6 @@ void DreamGenContext::drawfloor() {
 	es = pop();
 }
 
-void DreamGenContext::dolook() {
-	STACK_CHECK;
-	createpanel();
-	showicon();
-	undertextline();
-	worktoscreenm();
-	data.byte(kCommandtype) = 255;
-	dumptextline();
-	bl = data.byte(kRoomnum);
-	_and(bl, 31);
-	bh = 0;
-	_add(bx, bx);
-	es = data.word(kRoomdesc);
-	_add(bx, (0));
-	si = es.word(bx);
-	_add(si, (0+(38*2)));
-	findnextcolon();
-	di = 66;
-	_cmp(data.byte(kReallocation), 50);
-	if (flags.c())
-		goto notdream3;
-	di = 40;
-notdream3:
-	bx = 80;
-	dl = 241;
-	printslow();
-	_cmp(al, 1);
-	if (flags.z())
-		goto afterlook;
-	cx = 400;
-	hangonp();
-afterlook:
-	data.byte(kPointermode) = 0;
-	data.byte(kCommandtype) = 0;
-	redrawmainscrn();
-	worktoscreenm();
-}
-
 void DreamGenContext::redrawmainscrn() {
 	STACK_CHECK;
 	data.word(kTimecount) = 0;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 462a2b0..fb80fd4 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -376,7 +376,6 @@ public:
 	static const uint16 addr_talk = 0xc480;
 	static const uint16 addr_getback1 = 0xc47c;
 	static const uint16 addr_redrawmainscrn = 0xc478;
-	static const uint16 addr_dolook = 0xc474;
 	static const uint16 addr_drawfloor = 0xc428;
 	static const uint16 addr_deleteextext = 0xc420;
 	static const uint16 addr_deleteexframe = 0xc41c;
@@ -1709,7 +1708,7 @@ public:
 	void saveems();
 	void locationpic();
 	//void getflagunderp();
-	void dolook();
+	//void dolook();
 	void opentvdoor();
 	void triggermessage();
 	void smallcandle();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 60fdf5d..db71579 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2287,5 +2287,30 @@ void DreamGenContext::look() {
 		dolook();
 }
 
+void DreamGenContext::dolook() {
+	createpanel();
+	showicon();
+	undertextline();
+	worktoscreenm();
+	data.byte(kCommandtype) = 255;
+	dumptextline();
+	uint8 index = data.byte(kRoomnum) & 31;
+	uint16 offset = segRef(data.word(kRoomdesc)).word(kIntextdat + index * 2);
+	uint8 *string = segRef(data.word(kRoomdesc)).ptr(kIntext, 0) + offset;
+	findnextcolon(&string);
+	uint16 x;
+	if (data.byte(kReallocation) < 50)
+		x = 66;
+	else
+		x = 40;
+	if (printslow(string, x, 80, 241, true) != 1)
+		hangonp(400);
+
+	data.byte(kPointermode) = 0;
+	data.byte(kCommandtype) = 0;
+	redrawmainscrn();
+	worktoscreenm();
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 42acc88..a53f1bb 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -334,4 +334,5 @@
 	void reconstruct();
 	void look();
 	void autolook();
+	void dolook();
 






More information about the Scummvm-git-logs mailing list