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

bluegr md5 at scummvm.org
Fri Dec 9 00:54:26 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:
db340ed9b8 DREAMWEB: Convert 'hangonpq' to C++ and remove quitlist from the blob


Commit: db340ed9b863b60aef88bd78d6ac8b4f39fcb4aa
    https://github.com/scummvm/scummvm/commit/db340ed9b863b60aef88bd78d6ac8b4f39fcb4aa
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-08T15:53:20-08:00

Commit Message:
DREAMWEB: Convert 'hangonpq' to C++ and remove quitlist from the blob

This is the last place where checkCoords() was called without parameters

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 90bd9ca..3057042 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -88,6 +88,7 @@ p = parser(skip_binary_data = [
 	'r45','r46','r47','r52','r53','r55',
 	#talk.asm
 	'talklist',
+	'quitlist',
 	# titles.asm
 	'introtextname',
 	'title0graphics',
@@ -381,6 +382,7 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'hangoncurs',
 	'hangone',
 	'hangonp',
+	'hangonpq',
 	'hangonw',
 	'hotelbell',
 	'hotelcontrol',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 95dd6f4..531d882 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3160,59 +3160,6 @@ endheartalk:
 	data.byte(kPointermode) = 0;
 }
 
-void DreamGenContext::hangOnPQ() {
-	STACK_CHECK;
-	data.byte(kGetback) = 0;
-	bx = 0;
-hangloopq:
-	push(cx);
-	push(bx);
-	delPointer();
-	readMouse();
-	animPointer();
-	showPointer();
-	vSync();
-	dumpPointer();
-	dumpTextLine();
-	bx = offset_quitlist;
-	checkCoords();
-	bx = pop();
-	cx = pop();
-	_cmp(data.byte(kGetback), 1);
-	if (flags.z())
-		goto quitconv;
-	_cmp(data.byte(kQuitrequested),  0);
-	if (!flags.z())
-		goto quitconv;
-	_cmp(data.byte(kSpeechloaded), 1);
-	if (!flags.z())
-		goto notspeaking;
-	_cmp(data.byte(kCh1playing), 255);
-	if (!flags.z())
-		goto notspeaking;
-	_inc(bx);
-	_cmp(bx, 40);
-	if (flags.z())
-		goto finishconv;
-notspeaking:
-	_cmp(data.word(kMousebutton), 0);
-	if (flags.z())
-		goto hangloopq;
-	_cmp(data.word(kOldbutton), 0);
-	if (!flags.z())
-		goto hangloopq;
-finishconv:
-	delPointer();
-	data.byte(kPointermode) = 0;
-	flags._c = false;
- 	return;
-quitconv:
-	delPointer();
-	data.byte(kPointermode) = 0;
-	cancelCh1();
-	flags._c = true;
- }
-
 void DreamGenContext::newPlace() {
 	STACK_CHECK;
 	_cmp(data.byte(kNeedtotravel), 1);
@@ -3380,14 +3327,14 @@ void DreamGenContext::getDestInfo() {
 	push(ax);
 	dx = data;
 	es = dx;
-	si = 1455;
+	si = 1433;
 	_add(si, ax);
 	cl = es.byte(si);
 	ax = pop();
 	push(cx);
 	dx = data;
 	es = dx;
-	si = 1471;
+	si = 1449;
 	_add(si, ax);
 	ax = pop();
 }
@@ -3439,7 +3386,7 @@ clearedlocations:
 	bx = ax;
 	dx = data;
 	es = dx;
-	_add(bx, 1455);
+	_add(bx, 1433);
 	es.byte(bx) = 0;
 }
 
@@ -3475,7 +3422,7 @@ void DreamGenContext::execCommand() {
 	es = cs;
 	bx = offset_comlist;
 	ds = cs;
-	si = 1489;
+	si = 1467;
 	al = ds.byte(si);
 	_cmp(al, 0);
 	if (!flags.z())
@@ -3568,7 +3515,7 @@ dirroot:
 	si = offset_rootdir;
 	_inc(si);
 	es = cs;
-	di = 1312;
+	di = 1290;
 	_inc(di);
 	cx = 12;
 	_movsb(cx, true);
@@ -3670,7 +3617,7 @@ notyetassigned:
 	push(bx);
 	_add(bx, 2);
 	ds = cs;
-	si = 1489;
+	si = 1467;
 checkpass:
 	_lodsw();
 	ah = es.byte(bx);
@@ -3741,7 +3688,7 @@ void DreamGenContext::read() {
 	return;
 okcom:
 	es = cs;
-	di = 1312;
+	di = 1290;
 	ax = data.word(kTextfile1);
 	data.word(kMonsource) = ax;
 	ds = ax;
@@ -3871,7 +3818,7 @@ keyok2:
 	ds = cs;
 	si = offset_operand1+1;
 	es = cs;
-	di = 1312+1;
+	di = 1290+1;
 	cx = 12;
 	_movsb(cx, true);
 	monitorLogo();
@@ -3998,7 +3945,7 @@ void DreamGenContext::parser() {
 	al = '=';
 	_stosb();
 	ds = cs;
-	si = 1489;
+	si = 1467;
 notspace1:
 	_lodsw();
 	_cmp(al, 32);
@@ -5832,7 +5779,7 @@ void DreamGenContext::getNamePos() {
 	_mul(cx);
 	dx = data;
 	es = dx;
-	bx = 1623;
+	bx = 1601;
 	_add(bx, ax);
 	al = data.byte(kCursorpos);
 	ah = 0;
@@ -5928,7 +5875,7 @@ void DreamGenContext::showNames() {
 	STACK_CHECK;
 	dx = data;
 	es = dx;
-	si = 1623+1;
+	si = 1601+1;
 	di = (60)+21;
 	bx = (52)+10;
 	cl = 0;
@@ -6304,7 +6251,7 @@ void DreamGenContext::clearChanges() {
 	di = 0;
 	_stosw(cx, true);
 	es = cs;
-	di = 1455;
+	di = 1433;
 	al = 1;
 	_stosb(2);
 	al = 0;
@@ -6633,55 +6580,55 @@ void DreamGenContext::__start() {
 		//0x0420: REAM WEB. G13. DREA
 		0x4d, 0x57, 0x45, 0x42, 0x2e, 0x47, 0x31, 0x35, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 
 		//0x0430: MWEB .G15 .DRE AMWE
-		0x42, 0x2e, 0x49, 0x30, 0x37, 0x00, 0x00, 0x01, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 
-		//0x0440: B.I0 7... .. at . ....
-		0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x45, 0x58, 
-		//0x0450: |... @... .... ..EX
-		0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 
-		//0x0460: IT        HELP     
-		0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 
-		//0x0470:   LI ST        READ
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x0480:        LO GON      
-		0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 
-		//0x0490: KEYS        .. PUBL
-		0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 
-		//0x04a0: IC        PUBL IC  
-		0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 
-		//0x04b0:    . ..BL ACKD RAGO
-		0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 
-		//0x04c0: N RY AN         ...
-		0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 
-		//0x04d0: HEND RIX       LOUI
-		0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 
-		//0x04e0: S       . ..SE PTIM
-		0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 
-		//0x04f0: US     BE CKET T   
-		0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x0500:  ...               
-		0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 
-		//0x0510:  ."R OOT          .
-		0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 
-		//0x0520: "               .00
-		0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x53, 0x50, 0x45, 0x45, 0x43, 
-		//0x0530: 00.0 0... ..$S PEEC
-		0x48, 0x52, 0x32, 0x34, 0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 
-		//0x0540: HR24 C000 5.RA W.OB
-		0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 
-		//0x0550: JECT  NAM E ON E   
+		0x42, 0x2e, 0x49, 0x30, 0x37, 0x00, 0x00, 0x01, 0x45, 0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 
+		//0x0440: B.I0 7... EXIT     
+		0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 
+		//0x0450:   HE LP        LIST
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x0460:        RE AD       
+		0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 
+		//0x0470: LOGO N      KE YS  
+		0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 
+		//0x0480:      ..PU BLIC     
+		0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 
+		//0x0490:   PU BLIC       ...
+		0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 
+		//0x04a0: BLAC KDRA GON  RYAN
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 
+		//0x04b0:         . ..HE NDRI
+		0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x04c0: X      LO UIS      
+		0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 
+		//0x04d0:  ... SEPT IMUS     
+		0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 
+		//0x04e0: BECK ETT     . ..  
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 
+		//0x04f0:              . "ROO
+		0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x0500: T          ."      
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 
+		//0x0510:         . 0000 .00.
+		0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 0x32, 0x34, 0x43, 0x30, 
+		//0x0520: .... $SPE ECHR 24C0
+		0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, 
+		//0x0530: 005. RAW. OBJE CT N
+		0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x0540: AME  ONE           
 		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x0560:                    
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 
-		//0x0570:        .. .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 
-		//0x0580: .... .... .... ...D
-		0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-		//0x0590: :... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
+		//0x0550:                    
+		0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		//0x0560: .... .... .... ....
+		0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		//0x0570: .... .... .D:. ....
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		//0x0580: .... .... .... ....
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 
+		//0x0590: .... .... .... ....
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 
 		//0x05a0: .... .... .... ....
-		0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 
+		0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x05b0: .... .... .... ....
-		0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 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, 
 		//0x05c0: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x05d0: .... .... .... ....
@@ -6695,27 +6642,23 @@ void DreamGenContext::__start() {
 		//0x0610: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0620: .... .... .... ....
-		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, 0xff, 
 		//0x0630: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0640: .... .... .... ....
-		0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0650: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0660: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0670: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0680: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 
+		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x0690: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 
+		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
 		//0x06a0: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 
-		//0x06b0: .... .... .... ....
-		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 
-		//0x06c0: .... .... .... ....
-		0x00, };
+		0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, };
 	ds.assign(src, src + sizeof(src));
 	dreamweb(); 
 }
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index ebc1aec..7147330 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -32,16 +32,15 @@
 
 namespace DreamGen {
 
-static const uint16 offset_money1poke = 0x052e;
-static const uint16 offset_speechfile = 0x0541;
+static const uint16 offset_money1poke = 0x0518;
+static const uint16 offset_comlist = 0x0448;
 static const uint16 offset_openchangesize = 0x0446;
-static const uint16 offset_operand1 = 0x0504;
-static const uint16 offset_comlist = 0x045e;
-static const uint16 offset_commandline = 0x054e;
-static const uint16 offset_rootdir = 0x0512;
-static const uint16 offset_money2poke = 0x0533;
-static const uint16 offset_keys = 0x049a;
-static const uint16 offset_quitlist = 0x0448;
+static const uint16 offset_operand1 = 0x04ee;
+static const uint16 offset_commandline = 0x0538;
+static const uint16 offset_money2poke = 0x051d;
+static const uint16 offset_speechfile = 0x052b;
+static const uint16 offset_rootdir = 0x04fc;
+static const uint16 offset_keys = 0x0484;
 static const uint16 kStartvars = 0;
 static const uint16 kProgresspoints = 1;
 static const uint16 kWatchon = 2;
@@ -422,16 +421,16 @@ static const uint16 kVolumetabname = 1042;
 static const uint16 kGungraphic = 1055;
 static const uint16 kMonkface = 1068;
 static const uint16 kTitle7graphics = 1081;
-static const uint16 kCurrentfile = 1312;
-static const uint16 kRoomscango = 1455;
-static const uint16 kRoompics = 1471;
-static const uint16 kOplist = 1486;
-static const uint16 kInputline = 1489;
-static const uint16 kPresslist = 1617;
-static const uint16 kSavenames = 1623;
-static const uint16 kQuitrequested = 1742;
-static const uint16 kSubtitles = 1743;
-static const uint16 kForeignrelease = 1744;
+static const uint16 kCurrentfile = 1290;
+static const uint16 kRoomscango = 1433;
+static const uint16 kRoompics = 1449;
+static const uint16 kOplist = 1464;
+static const uint16 kInputline = 1467;
+static const uint16 kPresslist = 1595;
+static const uint16 kSavenames = 1601;
+static const uint16 kQuitrequested = 1720;
+static const uint16 kSubtitles = 1721;
+static const uint16 kForeignrelease = 1722;
 static const uint16 kBlocktextdat = (0);
 static const uint16 kPersonframes = (0);
 static const uint16 kDebuglevel1 = (0);
@@ -611,7 +610,6 @@ public:
 	void getUnderCentre();
 	void showKeys();
 	void printmessage2();
-	void hangOnPQ();
 	void findOpenPos();
 	void describeOb();
 	void deleteExFrame();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 0e67677..d2bf523 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1671,25 +1671,6 @@ void DreamBase::dumpPointer() {
 		multiDump(data.word(kOldpointerx), data.word(kOldpointery), data.byte(kPointerxs), data.byte(kPointerys));
 }
 
-void DreamGenContext::checkCoords() {
-
-	// FIXME: Move all these lists to the callers
-
-	switch ((uint16)bx) {
-	case offset_quitlist: {
-		RectWithCallback quitList[] = {
-			{ 273,320,157,198,&DreamGenContext::getBack1 },
-			{ 0,320,0,200,&DreamGenContext::blank },
-			{ 0xFFFF,0,0,0,0 }
-		};
-		checkCoords(quitList);
-		break;
-	}
-	default:
-		::error("Unimplemented checkcoords() call");
-	}
-}
-
 void DreamGenContext::checkCoords(const RectWithCallback *rectWithCallbacks) {
 	if (data.byte(kNewlocation) != 0xff)
 		return;
@@ -4095,4 +4076,45 @@ void DreamGenContext::doSaveLoad() {
 	data.byte(kManisoffscreen) = 0;
 }
 
+void DreamGenContext::hangOnPQ() {
+	data.byte(kGetback) = 0;
+
+	RectWithCallback quitList[] = {
+		{ 273,320,157,198,&DreamGenContext::getBack1 },
+		{ 0,320,0,200,&DreamGenContext::blank },
+		{ 0xFFFF,0,0,0,0 }
+	};
+
+	uint16 speechFlag = 0;
+
+	do {
+		delPointer();
+		readMouse();
+		animPointer();
+		showPointer();
+		vSync();
+		dumpPointer();
+		dumpTextLine();
+		checkCoords(quitList);
+
+		if (data.byte(kGetback) == 1 || !data.byte(kQuitrequested)) {
+			// Quit conversation
+			delPointer();
+			data.byte(kPointermode) = 0;
+			cancelCh1();
+			flags._c = true;
+		}
+
+		if (data.byte(kSpeechloaded) == 1 && data.byte(kCh1playing) == 255) {
+			speechFlag++;
+			if (speechFlag == 40)
+				break;
+		}
+	} while (!data.word(kMousebutton) || data.word(kOldbutton));
+
+	delPointer();
+	data.byte(kPointermode) = 0;
+	flags._c = false;
+ }
+
 } // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 68f3d6f..c66e705 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -193,7 +193,6 @@
 	void obName();
 	void obName(uint8 command, uint8 commandType);
 	void animPointer();
-	void checkCoords();
 	void checkCoords(const RectWithCallback *rectWithCallbacks);
 	void drawFlags();
 	void addToPeopleList();
@@ -559,5 +558,6 @@
 	void discOps();
 	void doSaveLoad();
 	void useDiary();
+	void hangOnPQ();
 
 #endif






More information about the Scummvm-git-logs mailing list