[Scummvm-cvs-logs] scummvm master -> 73d7ff3523712fee4f4121507f63dd70deb03b58

tramboi bertrand_augereau at yahoo.fr
Mon Aug 15 20:36:37 CEST 2011


This automated email contains information about 8 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c8d8056777 DREAMWEB: 'showgamereel' ported to C++
01ccadf7c1 DREAMWEB: 'getreelframeax' ported to C++
e78a5a2b08 DREAMWEB: 'checkifperson' ported to C++
2dadf6ba19 DREAMWEB: 'getreelstart' is now only called from C++
8cb9ff31cf DREAMWEB: 'findobname' ported to C++
b0f5e4dfb0 DREAMWEB: 'copyname' ported to C++
03e222f37f DREAMWEB: 'commandwithob' ported to C++
73d7ff3523 DREAMWEB: 'showpanel' ported to C++


Commit: c8d8056777e61f1ee3e56fcf00679c16aa3ebd6d
    https://github.com/scummvm/scummvm/commit/c8d8056777e61f1ee3e56fcf00679c16aa3ebd6d
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-15T13:30:16-07:00

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

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 3a9d4f4..f2dbd1d 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -74,6 +74,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'getroomdata',
 	'startloading',
 	'showreelframe',
+	'showgamereel',
 	'findsource',
 	'walking',
 	'autosetwalk',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 12bfcb4..72f7069 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2160,22 +2160,6 @@ void DreamGenContext::addtopeoplelist() {
 	_add(data.word(kListpos), 5);
 }
 
-void DreamGenContext::showgamereel() {
-	STACK_CHECK;
-	ax = es.word(bx+3);
-	_cmp(ax, 512);
-	if (!flags.c())
-		return /* (noshow) */;
-	data.word(kReelpointer) = ax;
-	push(es);
-	push(bx);
-	plotreel();
-	bx = pop();
-	es = pop();
-	ax = data.word(kReelpointer);
-	es.word(bx+3) = ax;
-}
-
 void DreamGenContext::checkspeed() {
 	STACK_CHECK;
 	_cmp(data.byte(kLastweapon), -1);
@@ -19478,7 +19462,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_sparky: sparky(); break;
 		case addr_train: train(); break;
 		case addr_addtopeoplelist: addtopeoplelist(); break;
-		case addr_showgamereel: showgamereel(); break;
 		case addr_checkspeed: checkspeed(); break;
 		case addr_delsprite: delsprite(); break;
 		case addr_checkone: checkone(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 42d135f..b08732c 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -653,7 +653,6 @@ public:
 	static const uint16 addr_checkone = 0xc12c;
 	static const uint16 addr_delsprite = 0xc11c;
 	static const uint16 addr_checkspeed = 0xc110;
-	static const uint16 addr_showgamereel = 0xc10c;
 	static const uint16 addr_addtopeoplelist = 0xc108;
 	static const uint16 addr_train = 0xc104;
 	static const uint16 addr_sparky = 0xc100;
@@ -1297,7 +1296,7 @@ public:
 	void loadtemptext();
 	void clearstartpal();
 	void femalefan();
-	void showgamereel();
+	//void showgamereel();
 	void identifyob();
 	void trysoundalloc();
 	void uselighter();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 53c9720..a970af9 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -557,6 +557,19 @@ void DreamGenContext::showreelframe(Reel *reel) {
 	showframe(source, x, y, frame, 8, &width, &height);
 }
 
+void DreamGenContext::showgamereel() {
+	uint16 reelpointer = es.word(bx+3);
+	if (reelpointer >= 512)
+		return;
+	data.word(kReelpointer) = reelpointer;
+	push(es);
+	push(bx);
+	plotreel();
+	bx = pop();
+	es = pop();
+	es.word(bx+3) = data.word(kReelpointer);
+}
+
 void DreamGenContext::showrain() {
 	ds = data.word(kMainsprites);
 	si = 6*58;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5886630..d360250 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -98,6 +98,7 @@
 	void liftsprite(Sprite *sprite, ObjData *objData);
 	void findsource();
 	Frame *findsourceCPP();
+	void showgamereel();
 	void showreelframe();
 	void showreelframe(Reel *reel);
 	void turnpathonCPP(uint8 param);


Commit: 01ccadf7c12a2675ced62ec6f89873bf821b4c6a
    https://github.com/scummvm/scummvm/commit/01ccadf7c12a2675ced62ec6f89873bf821b4c6a
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-15T13:30:16-07:00

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

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index f2dbd1d..209ae38 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -75,6 +75,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'startloading',
 	'showreelframe',
 	'showgamereel',
+	'getreelframeax',
 	'findsource',
 	'walking',
 	'autosetwalk',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 72f7069..2964d6f 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2688,22 +2688,6 @@ notinthisroom:
 	goto updateloop;
 }
 
-void DreamGenContext::getreelframeax() {
-	STACK_CHECK;
-	push(ds);
-	data.word(kCurrentframe) = ax;
-	findsource();
-	es = ds;
-	ds = pop();
-	ax = data.word(kCurrentframe);
-	_sub(ax, data.word(kTakeoff));
-	_add(ax, ax);
-	cx = ax;
-	_add(ax, ax);
-	_add(ax, cx);
-	bx = ax;
-}
-
 void DreamGenContext::reelsonscreen() {
 	STACK_CHECK;
 	reconstruct();
@@ -19483,7 +19467,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_doorway: doorway(); break;
 		case addr_widedoor: widedoor(); break;
 		case addr_updatepeople: updatepeople(); break;
-		case addr_getreelframeax: getreelframeax(); break;
 		case addr_reelsonscreen: reelsonscreen(); break;
 		case addr_soundonreels: soundonreels(); break;
 		case addr_reconstruct: reconstruct(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index b08732c..b5f6a5f 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -631,7 +631,6 @@ public:
 	static const uint16 addr_reconstruct = 0xc1ac;
 	static const uint16 addr_soundonreels = 0xc1a8;
 	static const uint16 addr_reelsonscreen = 0xc1a0;
-	static const uint16 addr_getreelframeax = 0xc19c;
 	static const uint16 addr_updatepeople = 0xc198;
 	static const uint16 addr_widedoor = 0xc18c;
 	static const uint16 addr_doorway = 0xc188;
@@ -1928,7 +1927,7 @@ public:
 	void fadecalculation();
 	void waitframes();
 	void clearrest();
-	void getreelframeax();
+	//void getreelframeax();
 	void barwoman();
 	void roomname();
 	void credits();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index a970af9..be74be6 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -570,6 +570,16 @@ void DreamGenContext::showgamereel() {
 	es.word(bx+3) = data.word(kReelpointer);
 }
 
+void DreamGenContext::getreelframeax() {
+	push(ds);
+	data.word(kCurrentframe) = ax;
+	findsource();
+	es = ds;
+	ds = pop();
+	cx = (data.word(kCurrentframe) - data.word(kTakeoff)) * 2;
+	bx = (data.word(kCurrentframe) - data.word(kTakeoff)) * 6;
+}
+
 void DreamGenContext::showrain() {
 	ds = data.word(kMainsprites);
 	si = 6*58;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index d360250..79f71ba 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -101,6 +101,7 @@
 	void showgamereel();
 	void showreelframe();
 	void showreelframe(Reel *reel);
+	void getreelframeax();
 	void turnpathonCPP(uint8 param);
 	void turnpathoffCPP(uint8 param);
 	void getroomspaths();


Commit: e78a5a2b08012dfe786da6d77abcc052436ace9c
    https://github.com/scummvm/scummvm/commit/e78a5a2b08012dfe786da6d77abcc052436ace9c
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-15T13:30:16-07:00

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

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 209ae38..b151c31 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -105,6 +105,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'parseblaster',
 	'deltextline',
 	'doblocks',
+	'checkifperson',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 2964d6f..0fdc75b 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -16339,69 +16339,6 @@ nothingund:
 	blank();
 }
 
-void DreamGenContext::checkifperson() {
-	STACK_CHECK;
-	es = data.word(kBuffers);
-	bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5));
-	cx = 12;
-identifyreel:
-	push(cx);
-	_cmp(es.byte(bx+4), 255);
-	if (flags.z())
-		goto notareelid;
-	push(es);
-	push(bx);
-	push(ax);
-	ax = es.word(bx+0);
-	data.word(kReelpointer) = ax;
-	getreelstart();
-	_cmp(es.word(si+2), 0x0ffff);
-	if (!flags.z())
-		goto notblankpers;
-	_add(si, 5);
-notblankpers:
-	cx = es.word(si+2);
-	ax = es.word(si+0);
-	push(cx);
-	getreelframeax();
-	cx = pop();
-	_add(cl, es.byte(bx+4));
-	_add(ch, es.byte(bx+5));
-	dx = cx;
-	_add(dl, es.byte(bx+0));
-	_add(dh, es.byte(bx+1));
-	ax = pop();
-	bx = pop();
-	es = pop();
-	_cmp(al, cl);
-	if (flags.c())
-		goto notareelid;
-	_cmp(ah, ch);
-	if (flags.c())
-		goto notareelid;
-	_cmp(al, dl);
-	if (!flags.c())
-		goto notareelid;
-	_cmp(ah, dh);
-	if (!flags.c())
-		goto notareelid;
-	cx = pop();
-	ax = es.word(bx+2);
-	data.word(kPersondata) = ax;
-	al = es.byte(bx+4);
-	ah = 5;
-	obname();
-	al = 0;
-	_cmp(al, 1);
-	return;
-notareelid:
-	cx = pop();
-	_add(bx, 5);
-	_dec(cx);
-	if (!flags.z())
-		goto identifyreel;
-}
-
 void DreamGenContext::checkifset() {
 	STACK_CHECK;
 	es = data.word(kBuffers);
@@ -19949,7 +19886,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_madmanrun: madmanrun(); break;
 		case addr_checkcoords: checkcoords(); break;
 		case addr_identifyob: identifyob(); break;
-		case addr_checkifperson: checkifperson(); break;
 		case addr_checkifset: checkifset(); break;
 		case addr_checkifex: checkifex(); break;
 		case addr_checkiffree: checkiffree(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index b5f6a5f..f3a2a30 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -146,7 +146,6 @@ public:
 	static const uint16 addr_checkiffree = 0xc9e4;
 	static const uint16 addr_checkifex = 0xc9e0;
 	static const uint16 addr_checkifset = 0xc9dc;
-	static const uint16 addr_checkifperson = 0xc9d8;
 	static const uint16 addr_identifyob = 0xc9d4;
 	static const uint16 addr_checkcoords = 0xc9d0;
 	static const uint16 addr_madmanrun = 0xc9cc;
@@ -1362,7 +1361,7 @@ public:
 	void clearendpal();
 	void findtext1();
 	void isryanholding();
-	void interupttest();
+	void showslots();
 	void usecashcard();
 	void usewall();
 	void opentomb();
@@ -1494,9 +1493,10 @@ public:
 	void isitdescribed();
 	void hotelbell();
 	void loadspeech();
+	void interupttest();
 	//void cls();
 	//void printsprites();
-	//void dumptimedtext();
+	//void checkifperson();
 	void showallobs();
 	//void getnumber();
 	void adjustleft();
@@ -1564,7 +1564,7 @@ public:
 	void folderhints();
 	void openhoteldoor();
 	void removesetobject();
-	void checkifperson();
+	//void dumptimedtext();
 	//void frameoutfx();
 	void blank();
 	void drinker();
@@ -1749,10 +1749,9 @@ public:
 	void loadintotemp2();
 	void gamer();
 	void personnametext();
-	void quitsymbol();
 	void readfromfile();
 	void initialinv();
-	void showslots();
+	void quitsymbol();
 	//void modifychar();
 	void hangon();
 	void settopright();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index be74be6..0e69607 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -570,14 +570,10 @@ void DreamGenContext::showgamereel() {
 	es.word(bx+3) = data.word(kReelpointer);
 }
 
-void DreamGenContext::getreelframeax() {
-	push(ds);
-	data.word(kCurrentframe) = ax;
-	findsource();
-	es = ds;
-	ds = pop();
-	cx = (data.word(kCurrentframe) - data.word(kTakeoff)) * 2;
-	bx = (data.word(kCurrentframe) - data.word(kTakeoff)) * 6;
+const Frame *DreamGenContext::getreelframeax(uint16 frame) {
+	data.word(kCurrentframe) = frame;
+	uint16 offset = data.word(kCurrentframe) - data.word(kTakeoff);
+	return findsourceCPP() + offset;
 }
 
 void DreamGenContext::showrain() {
diff --git a/engines/dreamweb/structs.h b/engines/dreamweb/structs.h
index 48b3f91..775466a 100644
--- a/engines/dreamweb/structs.h
+++ b/engines/dreamweb/structs.h
@@ -96,6 +96,19 @@ struct Reel {
 	uint8 b4;
 };
 
+struct People {
+	uint8 b0;
+	uint8 b1;
+	uint16 w0() const { return READ_LE_UINT16(&b0); }
+	void setW0(uint16 v) { WRITE_LE_UINT16(&b0, v); }
+	uint8 b2;
+	uint8 b3;
+	uint16 w2() const { return READ_LE_UINT16(&b2); }
+	void setW2(uint16 v) { WRITE_LE_UINT16(&b2, v); }
+	uint8 b4;
+
+};
+
 struct Room {
 	uint8 name[10];
 	uint8 b10;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 0a28073..5f0ed98 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -964,4 +964,40 @@ void DreamGenContext::checkdest(const uint8 *roomsPaths) {
 	data.byte(kDestination) = destination;
 }
 
+void DreamGenContext::checkifperson() {
+	flags._z = not checkifperson(al, ah);
+}
+
+bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
+	People *people = (People *)segRef(data.word(kBuffers)).ptr(kPeoplelist, 0);
+
+	for (size_t i = 0; i < 12; ++i, ++people) {
+		if (people->b4 == 255)
+			continue;
+		data.word(kReelpointer) = people->w0();
+		Reel *reel = getreelstartCPP();
+		if (reel->frame() == 0xffff)
+			++reel;
+		const Frame *frame = getreelframeax(reel->frame());
+		uint8 xmin = reel->x + frame->x;
+		uint8 ymin = reel->y + frame->y;
+		uint8 xmax = xmin + frame->width;
+		uint8 ymax = ymin + frame->height;
+		if (x < xmin)
+			continue;
+		if (y < ymin)
+			continue;
+		if (x >= xmax)
+			continue;
+		if (y >= ymax)
+			continue;
+		data.word(kPersondata) = people->w2();
+		al = people->b4;
+		ah = 5;
+		obname();
+		return true;
+	}
+	return false;
+}
+
 } /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 79f71ba..395eac6 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -101,7 +101,7 @@
 	void showgamereel();
 	void showreelframe();
 	void showreelframe(Reel *reel);
-	void getreelframeax();
+	const Frame *getreelframeax(uint16 frame);
 	void turnpathonCPP(uint8 param);
 	void turnpathoffCPP(uint8 param);
 	void getroomspaths();
@@ -119,4 +119,6 @@
 	void showrain();
 	void deltextline();
 	void doblocks();
+	void checkifperson();
+	bool checkifperson(uint8 x, uint8 y);
 


Commit: 2dadf6ba19b61c4af20da31a81cdf31bd5d3e79c
    https://github.com/scummvm/scummvm/commit/2dadf6ba19b61c4af20da31a81cdf31bd5d3e79c
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-15T13:30:16-07:00

Commit Message:
DREAMWEB: 'getreelstart' is now only called from C++

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index b151c31..d256e44 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -106,6 +106,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'deltextline',
 	'doblocks',
 	'checkifperson',
+	'getreelstart',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 0fdc75b..75fdad7 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2796,16 +2796,6 @@ notmaprightspec:
 	data.byte(kNowinnewroom) = 1;
 }
 
-void DreamGenContext::getreelstart() {
-	STACK_CHECK;
-	ax = data.word(kReelpointer);
-	cx = 40;
-	_mul(cx);
-	es = data.word(kReels);
-	si = ax;
-	_add(si, (0+(36*144)));
-}
-
 void DreamGenContext::deleverything() {
 	STACK_CHECK;
 	al = data.byte(kMapysize);
@@ -19408,7 +19398,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_soundonreels: soundonreels(); break;
 		case addr_reconstruct: reconstruct(); break;
 		case addr_movemap: movemap(); break;
-		case addr_getreelstart: getreelstart(); break;
 		case addr_deleverything: deleverything(); break;
 		case addr_dumpeverything: dumpeverything(); break;
 		case addr_showpcx: showpcx(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index f3a2a30..9a0e9e9 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -625,7 +625,6 @@ public:
 	static const uint16 addr_showpcx = 0xc1cc;
 	static const uint16 addr_dumpeverything = 0xc1c4;
 	static const uint16 addr_deleverything = 0xc1c0;
-	static const uint16 addr_getreelstart = 0xc1b8;
 	static const uint16 addr_movemap = 0xc1b4;
 	static const uint16 addr_reconstruct = 0xc1ac;
 	static const uint16 addr_soundonreels = 0xc1a8;
@@ -1324,7 +1323,7 @@ public:
 	void readkey();
 	void louis();
 	void entrytexts();
-	void getreelstart();
+	//void getreelstart();
 	void buttonenter();
 	void checkinput();
 	//void crosshair();
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index 0e69607..9735ad0 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -537,7 +537,7 @@ Frame *DreamGenContext::findsourceCPP() {
 	return result;
 }
 
-Reel *DreamGenContext::getreelstartCPP() {
+Reel *DreamGenContext::getreelstart() {
 	Reel *reel = (Reel *)segRef(data.word(kReels)).ptr(kReellist + data.word(kReelpointer) * sizeof(Reel) * 8, sizeof(Reel));
 	return reel;
 }
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 5f0ed98..ede63e0 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -884,7 +884,7 @@ void DreamGenContext::dealwithspecial(uint8 firstParam, uint8 secondParam) {
 }
 
 void DreamGenContext::plotreel() {
-	Reel *reel = getreelstartCPP();
+	Reel *reel = getreelstart();
 	while (true) {
 		if (reel->x < 220)
 			break;
@@ -975,7 +975,7 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
 		if (people->b4 == 255)
 			continue;
 		data.word(kReelpointer) = people->w0();
-		Reel *reel = getreelstartCPP();
+		Reel *reel = getreelstart();
 		if (reel->frame() == 0xffff)
 			++reel;
 		const Frame *frame = getreelframeax(reel->frame());
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 395eac6..9f39b37 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -112,7 +112,7 @@
 	void cancelch0();
 	void cancelch1();
 	void plotreel();
-	Reel *getreelstartCPP();
+	Reel *getreelstart();
 	void dealwithspecial(uint8 firstParam, uint8 secondParam);
 	void zoom();
 	void crosshair();


Commit: 8cb9ff31cf67c3161c9513e36cdba48db55f4ed9
    https://github.com/scummvm/scummvm/commit/8cb9ff31cf67c3161c9513e36cdba48db55f4ed9
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-15T13:30:16-07:00

Commit Message:
DREAMWEB: 'findobname' 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 d256e44..d0cbae8 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -107,6 +107,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'doblocks',
 	'checkifperson',
 	'getreelstart',
+	'findobname',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 75fdad7..b72c83b 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -17422,68 +17422,6 @@ finishmakename:
 	_stosb(cx, true);
 }
 
-void DreamGenContext::findobname() {
-	STACK_CHECK;
-	push(ax);
-	ah = 0;
-	_add(ax, ax);
-	bx = ax;
-	ax = pop();
-	_cmp(ah, 5);
-	if (!flags.z())
-		goto notpersonname;
-	push(ax);
-	_and(al, 127);
-	ah = 0;
-	bx = 64*2;
-	_mul(bx);
-	si = ax;
-	ds = data.word(kPeople);
-	_add(si, (0+24));
-	cx = (0+24+(1026*2));
-	ax = ds.word(si);
-	_add(ax, cx);
-	si = ax;
-	ax = pop();
-	return;
-notpersonname:
-	_cmp(ah, 4);
-	if (!flags.z())
-		goto notextraname;
-	ds = data.word(kExtras);
-	_add(bx, (0+2080+30000+(16*114)));
-	ax = ds.word(bx);
-	_add(ax, (0+2080+30000+(16*114)+((114+2)*2)));
-	si = ax;
-	return;
-notextraname:
-	_cmp(ah, 2);
-	if (!flags.z())
-		goto notfreename;
-	ds = data.word(kFreedesc);
-	_add(bx, (0));
-	ax = ds.word(bx);
-	_add(ax, (0+(82*2)));
-	si = ax;
-	return;
-notfreename:
-	_cmp(ah, 1);
-	if (!flags.z())
-		goto notsetname;
-	ds = data.word(kSetdesc);
-	_add(bx, (0));
-	ax = ds.word(bx);
-	_add(ax, (0+(130*2)));
-	si = ax;
-	return;
-notsetname:
-	ds = data.word(kBlockdesc);
-	_add(bx, (0));
-	ax = ds.word(bx);
-	_add(ax, (0+(98*2)));
-	si = ax;
-}
-
 void DreamGenContext::showicon() {
 	STACK_CHECK;
 	_cmp(data.byte(kReallocation), 50);
@@ -19905,7 +19843,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_bresenhams: bresenhams(); break;
 		case addr_workoutframes: workoutframes(); break;
 		case addr_copyname: copyname(); break;
-		case addr_findobname: findobname(); break;
 		case addr_showicon: showicon(); break;
 		case addr_middlepanel: middlepanel(); break;
 		case addr_showman: showman(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9a0e9e9..4a8bcbd 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -115,7 +115,6 @@ public:
 	static const uint16 addr_showman = 0xca6c;
 	static const uint16 addr_middlepanel = 0xca68;
 	static const uint16 addr_showicon = 0xca64;
-	static const uint16 addr_findobname = 0xca60;
 	static const uint16 addr_copyname = 0xca5c;
 	static const uint16 addr_workoutframes = 0xca54;
 	static const uint16 addr_bresenhams = 0xca50;
@@ -1330,7 +1329,7 @@ public:
 	void bresenhams();
 	void getbackfromops();
 	//void frameoutv();
-	void restoreall();
+	void opensarters();
 	void screenupdate();
 	void addlength();
 	void wornerror();
@@ -1339,7 +1338,7 @@ public:
 	void commandonly();
 	void adjustlen();
 	void deallocatemem();
-	void mainscreen();
+	void checkforemm();
 	void watchreel();
 	void showfolder();
 	void turnanypathoff();
@@ -1364,6 +1363,7 @@ public:
 	void usecashcard();
 	void usewall();
 	void opentomb();
+	//void findobname();
 	void buttonfour();
 	void animpointer();
 	//void lockmon();
@@ -1443,7 +1443,6 @@ public:
 	void loadtempcharset();
 	void showbyte();
 	void useslab();
-	//void aboutturn();
 	void usealtar();
 	void createpanel2();
 	void turnonpower();
@@ -1548,7 +1547,7 @@ public:
 	void wearwatch();
 	void runintroseq();
 	//void doblocks();
-	void opensarters();
+	void restoreall();
 	void allpalette();
 	void findormake();
 	void nextsymbol();
@@ -1605,7 +1604,7 @@ public:
 	void showpointer();
 	void usecooker();
 	void loadmenu();
-	void checkforemm();
+	//void aboutturn();
 	void checkifpathison();
 	void smallcandle();
 	void receptionist();
@@ -1626,7 +1625,7 @@ public:
 	void putundermenu();
 	void checkifex();
 	void intromagic2();
-	void findobname();
+	void mainscreen();
 	void edeninbath();
 	void intromagic1();
 	void showdiarypage();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index ede63e0..4fcc1e4 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1000,4 +1000,28 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
 	return false;
 }
 
+void DreamGenContext::findobname() {
+	findobname(ah, al);
+}
+
+void DreamGenContext::findobname(uint8 type, uint8 index) {
+	if (type == 5) {
+		uint16 offset = 64 * 2 * (index & 127);
+		ds = data.word(kPeople);
+		si = ds.word(kPersontxtdat + offset) + kPersontext;
+	} else if (type == 4) {
+		ds = data.word(kExtras);
+		si = ds.word(kExtextdat + index * 2) + kExtext;
+	} else if (type == 2) {
+		ds = data.word(kFreedesc);
+		si = ds.word(kFreetextdat + index * 2) + kFreetext;
+	} else if (type == 1) {
+		ds = data.word(kSetdesc);
+		si = ds.word(kSettextdat + index * 2) + kSettext;
+	} else {
+		ds = data.word(kBlockdesc);
+		si = ds.word(kBlocktextdat + index * 2) + kBlocktext;
+	}
+}
+
 } /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 9f39b37..b9d22c2 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -121,4 +121,6 @@
 	void doblocks();
 	void checkifperson();
 	bool checkifperson(uint8 x, uint8 y);
+	void findobname();
+	void findobname(uint8 type, uint8 index);
 


Commit: b0f5e4dfb07062002a52ded364eb02d8fc7f1dc6
    https://github.com/scummvm/scummvm/commit/b0f5e4dfb07062002a52ded364eb02d8fc7f1dc6
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-15T13:30:16-07:00

Commit Message:
DREAMWEB: 'copyname' 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 d0cbae8..f75a4aa 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -108,6 +108,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'checkifperson',
 	'getreelstart',
 	'findobname',
+	'copyname',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index b72c83b..42a6a64 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -17395,33 +17395,6 @@ success:
 	data.byte(kTurndirection) = 0;
 }
 
-void DreamGenContext::copyname() {
-	STACK_CHECK;
-	push(di);
-	findobname();
-	di = pop();
-	es = cs;
-	cx = 28;
-make:
-	_lodsb();
-	_cmp(al, ':');
-	if (flags.z())
-		goto finishmakename;
-	_cmp(al, 0);
-	if (flags.z())
-		goto finishmakename;
-	_stosb();
-	if (--cx)
-		goto make;
-finishmakename:
-	_inc(cx);
-	al = 0;
-	_stosb();
-	return;
-	al = 255;
-	_stosb(cx, true);
-}
-
 void DreamGenContext::showicon() {
 	STACK_CHECK;
 	_cmp(data.byte(kReallocation), 50);
@@ -19842,7 +19815,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_setwalk: setwalk(); break;
 		case addr_bresenhams: bresenhams(); break;
 		case addr_workoutframes: workoutframes(); break;
-		case addr_copyname: copyname(); break;
 		case addr_showicon: showicon(); break;
 		case addr_middlepanel: middlepanel(); break;
 		case addr_showman: showman(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 4a8bcbd..9c08a33 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -115,7 +115,6 @@ public:
 	static const uint16 addr_showman = 0xca6c;
 	static const uint16 addr_middlepanel = 0xca68;
 	static const uint16 addr_showicon = 0xca64;
-	static const uint16 addr_copyname = 0xca5c;
 	static const uint16 addr_workoutframes = 0xca54;
 	static const uint16 addr_bresenhams = 0xca50;
 	static const uint16 addr_setwalk = 0xca44;
@@ -1784,7 +1783,7 @@ public:
 	void drawitall();
 	void usestereo();
 	void showcurrentfile();
-	void copyname();
+	//void copyname();
 	void look();
 	void setmouse();
 	void checkone();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 4fcc1e4..e15bc2a 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1000,28 +1000,42 @@ bool DreamGenContext::checkifperson(uint8 x, uint8 y) {
 	return false;
 }
 
-void DreamGenContext::findobname() {
-	findobname(ah, al);
-}
-
-void DreamGenContext::findobname(uint8 type, uint8 index) {
+const uint8 *DreamGenContext::findobname(uint8 type, uint8 index) {
 	if (type == 5) {
-		uint16 offset = 64 * 2 * (index & 127);
-		ds = data.word(kPeople);
-		si = ds.word(kPersontxtdat + offset) + kPersontext;
+		uint16 i = 64 * 2 * (index & 127);
+		uint16 offset = segRef(data.word(kPeople)).word(kPersontxtdat + i) + kPersontext;
+		return segRef(data.word(kPeople)).ptr(offset, 0);
 	} else if (type == 4) {
-		ds = data.word(kExtras);
-		si = ds.word(kExtextdat + index * 2) + kExtext;
+		uint16 offset = segRef(data.word(kExtras)).word(kExtextdat + index * 2) + kExtext;
+		return segRef(data.word(kExtras)).ptr(offset, 0);
 	} else if (type == 2) {
-		ds = data.word(kFreedesc);
-		si = ds.word(kFreetextdat + index * 2) + kFreetext;
+		uint16 offset = segRef(data.word(kFreedesc)).word(kFreetextdat + index * 2) + kFreetext;
+		return segRef(data.word(kFreedesc)).ptr(offset, 0);
 	} else if (type == 1) {
-		ds = data.word(kSetdesc);
-		si = ds.word(kSettextdat + index * 2) + kSettext;
+		uint16 offset = segRef(data.word(kSetdesc)).word(kSettextdat + index * 2) + kSettext;
+		return segRef(data.word(kSetdesc)).ptr(offset, 0);
 	} else {
-		ds = data.word(kBlockdesc);
-		si = ds.word(kBlocktextdat + index * 2) + kBlocktext;
+		uint16 offset = segRef(data.word(kBlockdesc)).word(kBlocktextdat + index * 2) + kBlocktext;
+		return segRef(data.word(kBlockdesc)).ptr(offset, 0);
+	}
+}
+
+void DreamGenContext::copyname() {
+	copyname(ah, al, cs.ptr(di, 0));
+}
+
+void DreamGenContext::copyname(uint8 type, uint8 index, uint8 *dst) {
+	const uint8 *src = findobname(type, index);
+	size_t i;
+	for (i = 0; i < 28; ++i) { 
+		char c = src[i];
+		if (c == ':')
+			break;
+		if (c == 0)
+			break;
+		dst[i] = c;
 	}
+	dst[i] = 0;
 }
 
 } /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index b9d22c2..27250b7 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -121,6 +121,7 @@
 	void doblocks();
 	void checkifperson();
 	bool checkifperson(uint8 x, uint8 y);
-	void findobname();
-	void findobname(uint8 type, uint8 index);
+	const uint8 *findobname(uint8 type, uint8 index);
+	void copyname();
+	void copyname(uint8 type, uint8 index, uint8 *dst);
 


Commit: 03e222f37f917d8491e96bbbc17a73151ee11478
    https://github.com/scummvm/scummvm/commit/03e222f37f917d8491e96bbbc17a73151ee11478
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-15T13:30:16-07:00

Commit Message:
DREAMWEB: 'commandwithob' 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 f75a4aa..2763ec5 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -109,6 +109,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'getreelstart',
 	'findobname',
 	'copyname',
+	'commandwithob',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 42a6a64..4dfdb7f 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -16962,60 +16962,6 @@ void DreamGenContext::examineobtext() {
 	commandwithob();
 }
 
-void DreamGenContext::commandwithob() {
-	STACK_CHECK;
-	push(ax);
-	push(ax);
-	push(bx);
-	push(cx);
-	push(dx);
-	push(es);
-	push(ds);
-	push(si);
-	push(di);
-	deltextline();
-	di = pop();
-	si = pop();
-	ds = pop();
-	es = pop();
-	dx = pop();
-	cx = pop();
-	bx = pop();
-	ax = pop();
-	push(bx);
-	ah = 0;
-	_add(ax, ax);
-	bx = ax;
-	es = data.word(kCommandtext);
-	ax = es.word(bx);
-	_add(ax, (66*2));
-	si = ax;
-	di = data.word(kTextaddressx);
-	bx = data.word(kTextaddressy);
-	dl = data.byte(kTextlen);
-	al = 0;
-	ah = 0;
-	printdirect();
-	ax = pop();
-	di = 5847;
-	copyname();
-	ax = pop();
-	di = data.word(kLastxpos);
-	_cmp(al, 0);
-	if (flags.z())
-		goto noadd;
-	_add(di, 5);
-noadd:
-	bx = data.word(kTextaddressy);
-	es = cs;
-	si = 5847;
-	dl = data.byte(kTextlen);
-	al = 0;
-	ah = 0;
-	printdirect();
-	data.byte(kNewtextline) = 1;
-}
-
 void DreamGenContext::commandonly() {
 	STACK_CHECK;
 	push(ax);
@@ -19804,7 +19750,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_obname: obname(); break;
 		case addr_finishedwalking: finishedwalking(); break;
 		case addr_examineobtext: examineobtext(); break;
-		case addr_commandwithob: commandwithob(); break;
 		case addr_commandonly: commandonly(); break;
 		case addr_printmessage: printmessage(); break;
 		case addr_printmessage2: printmessage2(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 9c08a33..8580224 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -125,7 +125,6 @@ public:
 	static const uint16 addr_printmessage2 = 0xca30;
 	static const uint16 addr_printmessage = 0xca2c;
 	static const uint16 addr_commandonly = 0xca28;
-	static const uint16 addr_commandwithob = 0xca24;
 	static const uint16 addr_examineobtext = 0xca20;
 	static const uint16 addr_finishedwalking = 0xca1c;
 	static const uint16 addr_obname = 0xca18;
@@ -2028,7 +2027,7 @@ public:
 	void isitright();
 	void businessman();
 	void switchryanoff();
-	void commandwithob();
+	//void commandwithob();
 	void panelicons1();
 	void adjustdown();
 	void withwhat();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e15bc2a..a605bbd 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1038,4 +1038,31 @@ void DreamGenContext::copyname(uint8 type, uint8 index, uint8 *dst) {
 	dst[i] = 0;
 }
 
+void DreamGenContext::commandwithob() {
+	commandwithob(al, bh, bl); 
+}
+
+void DreamGenContext::commandwithob(uint8 command, uint8 type, uint8 index) {
+	uint8 commandLine[64] = "OBJECT NAME ONE                         ";
+	deltextline();
+	uint16 commandText = kTextstart + segRef(data.word(kCommandtext)).word(command * 2);
+	uint8 textLen = data.byte(kTextlen);
+	{
+		uint16 y = data.word(kTextaddressy);
+		const uint8 *string = segRef(data.word(kCommandtext)).ptr(commandText, 0);
+		printdirect(&string, data.word(kTextaddressx), &y, textLen, (bool)(textLen & 1));
+	}
+	copyname(type, index, commandLine);
+	uint16 x = data.word(kLastxpos);
+	if (command != 0)
+		x += 5;
+	{
+		uint16 y = data.word(kTextaddressy);
+		const uint8 *string = commandLine;
+		printdirect(&string, x, &y, textLen, (bool)(textLen & 1));
+	}
+	data.byte(kNewtextline) = 1;
+}
+
 } /*namespace dreamgen */
+
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 27250b7..a6cf2c0 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -124,4 +124,6 @@
 	const uint8 *findobname(uint8 type, uint8 index);
 	void copyname();
 	void copyname(uint8 type, uint8 index, uint8 *dst);
+	void commandwithob();
+	void commandwithob(uint8 command, uint8 type, uint8 index);
 


Commit: 73d7ff3523712fee4f4121507f63dd70deb03b58
    https://github.com/scummvm/scummvm/commit/73d7ff3523712fee4f4121507f63dd70deb03b58
Author: Bertrand Augereau (bertrand_augereau at yahoo.fr)
Date: 2011-08-15T13:30:17-07:00

Commit Message:
DREAMWEB: 'showpanel' 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 2763ec5..9bc5ff7 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -110,6 +110,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'findobname',
 	'copyname',
 	'commandwithob',
+	'showpanel',
 	], skip_output = [
 	# These functions are processed but not output
 	'dreamweb',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 4dfdb7f..8b8b622 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -17445,22 +17445,6 @@ void DreamGenContext::showman() {
 	showframe();
 }
 
-void DreamGenContext::showpanel() {
-	STACK_CHECK;
-	ds = data.word(kIcons1);
-	di = 72;
-	bx = 0;
-	al = 19;
-	ah = 0;
-	showframe();
-	ds = data.word(kIcons1);
-	di = 192;
-	bx = 0;
-	al = 19;
-	ah = 0;
-	showframe();
-}
-
 void DreamGenContext::roomname() {
 	STACK_CHECK;
 	di = 88;
@@ -19763,7 +19747,6 @@ void DreamGenContext::__dispatch_call(uint16 addr) {
 		case addr_showicon: showicon(); break;
 		case addr_middlepanel: middlepanel(); break;
 		case addr_showman: showman(); break;
-		case addr_showpanel: showpanel(); break;
 		case addr_roomname: roomname(); break;
 		case addr_usecharset1: usecharset1(); break;
 		case addr_usetempcharset: usetempcharset(); break;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 8580224..16b23db 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -111,7 +111,6 @@ public:
 	static const uint16 addr_usetempcharset = 0xca7c;
 	static const uint16 addr_usecharset1 = 0xca78;
 	static const uint16 addr_roomname = 0xca74;
-	static const uint16 addr_showpanel = 0xca70;
 	static const uint16 addr_showman = 0xca6c;
 	static const uint16 addr_middlepanel = 0xca68;
 	static const uint16 addr_showicon = 0xca64;
@@ -1393,7 +1392,7 @@ public:
 	void getpersframe();
 	void doshake();
 	void resetkeyboard();
-	void showpanel();
+	//void showpanel();
 	void soundstartup();
 	void slabdoora();
 	void fadeupyellows();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index a605bbd..9130a6c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1064,5 +1064,12 @@ void DreamGenContext::commandwithob(uint8 command, uint8 type, uint8 index) {
 	data.byte(kNewtextline) = 1;
 }
 
+void DreamGenContext::showpanel() {
+	Frame *frame = (Frame *)segRef(data.word(kIcons1)).ptr(0, sizeof(Frame));
+	uint8 width, height;
+	showframe(frame, 72, 0, 19, 0, &width, &height);
+	showframe(frame, 192, 0, 19, 0, &width, &height);
+}
+
 } /*namespace dreamgen */
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index a6cf2c0..1f14faf 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -126,4 +126,6 @@
 	void copyname(uint8 type, uint8 index, uint8 *dst);
 	void commandwithob();
 	void commandwithob(uint8 command, uint8 type, uint8 index);
+	void showpanel();
+
 






More information about the Scummvm-git-logs mailing list