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

wjp wjp at usecode.org
Mon Dec 12 13:50:55 CET 2011


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

Summary:
54ed4255c0 DREAMWEB: Add a FIXME
864ab1b265 DREAMWEB: Remove volumetabname from data blob
5d80fda3a4 DREAMWEB: Add Dreambase::loadSpeech method
af85b85a84 DREAMWEB: Convert rollEndCredits/rollEndCredits2 to C++
b699d5e81e DREAMWEB: Remove now unused DreamGenContext::playChannel0() wrapper
a5992d9b9f Merge pull request #135 from fingolfin/dreamweb-cleanup


Commit: 54ed4255c0c7412ddcd9d259d365cb216c3c66c6
    https://github.com/scummvm/scummvm/commit/54ed4255c0c7412ddcd9d259d365cb216c3c66c6
Author: Max Horn (max at quendi.de)
Date: 2011-12-12T03:28:42-08:00

Commit Message:
DREAMWEB: Add a FIXME

Changed paths:
    engines/dreamweb/stubs.cpp



diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 226c085..d74477c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2163,6 +2163,7 @@ void DreamGenContext::readSetData() {
 	data.word(kCommandtext) = standardLoad("DREAMWEB.T84");
 	useCharset1();
 
+	// FIXME: Why is this commented out?
 	//engine->openFile("DREAMWEB.VOL");
 	//uint8 *volumeTab = getSegment(data.word(kSoundbuffer)).ptr(16384, 0);
 	//engine->readFromFile(volumeTab, 2048-256);


Commit: 864ab1b265758a89408da3fd30de25a96f031b5e
    https://github.com/scummvm/scummvm/commit/864ab1b265758a89408da3fd30de25a96f031b5e
Author: Max Horn (max at quendi.de)
Date: 2011-12-12T03:29:08-08:00

Commit Message:
DREAMWEB: Remove volumetabname from data blob

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index dac600a..edc4a60 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -47,6 +47,7 @@ p = parser(skip_binary_data = [
 	'icongraphics0',
 	'icongraphics1',
 	'savenames',
+	'volumetabname',
 	# keypad.asm
 	'keypadlist',
 	'symbollist',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 94658a1..5b96e7c 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2996,14 +2996,14 @@ void DreamGenContext::getDestInfo() {
 	push(ax);
 	dx = data;
 	es = dx;
-	si = 1287;
+	si = 1274;
 	_add(si, ax);
 	cl = es.byte(si);
 	ax = pop();
 	push(cx);
 	dx = data;
 	es = dx;
-	si = 1303;
+	si = 1290;
 	_add(si, ax);
 	ax = pop();
 }
@@ -3055,7 +3055,7 @@ clearedlocations:
 	bx = ax;
 	dx = data;
 	es = dx;
-	_add(bx, 1287);
+	_add(bx, 1274);
 	es.byte(bx) = 0;
 }
 
@@ -3091,7 +3091,7 @@ void DreamGenContext::execCommand() {
 	es = cs;
 	bx = offset_comlist;
 	ds = cs;
-	si = 1321;
+	si = 1308;
 	al = ds.byte(si);
 	_cmp(al, 0);
 	if (!flags.z())
@@ -3184,7 +3184,7 @@ dirroot:
 	si = offset_rootdir;
 	_inc(si);
 	es = cs;
-	di = 1163;
+	di = 1150;
 	_inc(di);
 	cx = 12;
 	_movsb(cx, true);
@@ -3286,7 +3286,7 @@ notyetassigned:
 	push(bx);
 	_add(bx, 2);
 	ds = cs;
-	si = 1321;
+	si = 1308;
 checkpass:
 	_lodsw();
 	ah = es.byte(bx);
@@ -3357,7 +3357,7 @@ void DreamGenContext::read() {
 	return;
 okcom:
 	es = cs;
-	di = 1163;
+	di = 1150;
 	ax = data.word(kTextfile1);
 	data.word(kMonsource) = ax;
 	ds = ax;
@@ -3487,7 +3487,7 @@ keyok2:
 	ds = cs;
 	si = offset_operand1+1;
 	es = cs;
-	di = 1163+1;
+	di = 1150+1;
 	cx = 12;
 	_movsb(cx, true);
 	monitorLogo();
@@ -3614,7 +3614,7 @@ void DreamGenContext::parser() {
 	al = '=';
 	_stosb();
 	ds = cs;
-	si = 1321;
+	si = 1308;
 notspace1:
 	_lodsw();
 	_cmp(al, 32);
@@ -5582,7 +5582,7 @@ void DreamGenContext::clearChanges() {
 	di = 0;
 	_stosw(cx, true);
 	es = cs;
-	di = 1287;
+	di = 1274;
 	al = 1;
 	_stosb(2);
 	al = 0;
@@ -5893,53 +5893,53 @@ void DreamGenContext::__start() {
 		//0x0390: .2.. .... .2.. ....
 		0x00, 0x32, 0x14, 0x00, 0x0e, 0x21, 0x28, 0x00, 0x00, 0x32, 0x14, 0x00, 0xff, 0x44, 0x52, 0x45, 
 		//0x03a0: .2.. .!(. .2.. .DRE
-		0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x39, 0x39, 0x00, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 
-		//0x03b0: AMWE B.V9 9.DR EAMW
-		0x45, 0x42, 0x2e, 0x56, 0x4f, 0x4c, 0x00, 0x00, 0x01, 0x45, 0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 
-		//0x03c0: EB.V OL.. .EXI T   
-		0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 
-		//0x03d0:    H ELP        LIS
-		0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x03e0: T       R EAD      
-		0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 
-		//0x03f0:  LOG ON      K EYS 
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 
-		//0x0400:       ..P UBLI C   
-		0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 
-		//0x0410:    P UBLI C      ..
-		0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 
-		//0x0420: .BLA CKDR AGON  RYA
-		0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 
-		//0x0430: N         ...H ENDR
-		0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 
-		//0x0440: IX      L OUIS     
-		0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 
-		//0x0450:   .. .SEP TIMU S   
-		0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 
-		//0x0460:  BEC KETT      ... 
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 
-		//0x0470:                ."RO
-		0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 
-		//0x0480: OT          ."     
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 
-		//0x0490:           .000 0.00
-		0x00, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, 0x41, 0x4d, 
-		//0x04a0: .... .$OB JECT  NAM
-		0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
-		//0x04b0: E ON E             
-		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 
-		//0x04c0:                  ..
-		0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 
-		//0x04d0: .... .... .... ....
-		0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-		//0x04e0: .... ...D :... ....
+		0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x39, 0x39, 0x00, 0x00, 0x01, 0x45, 0x58, 0x49, 0x54, 
+		//0x03b0: AMWE B.V9 9... EXIT
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x03c0:        HE LP       
+		0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 
+		//0x03d0: LIST        RE AD  
+		0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 
+		//0x03e0:      LOGO N      KE
+		0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 
+		//0x03f0: YS        ..PU BLIC
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 
+		//0x0400:        PU BLIC     
+		0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 
+		//0x0410:  ... BLAC KDRA GON 
+		0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 
+		//0x0420: RYAN         . ..HE
+		0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 
+		//0x0430: NDRI X      LO UIS 
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 
+		//0x0440:       ... SEPT IMUS
+		0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 
+		//0x0450:      BECK ETT     .
+		0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 
+		//0x0460: ..                .
+		0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 
+		//0x0470: "ROO T          ." 
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 
+		//0x0480:              . 0000
+		0x00, 0x30, 0x30, 0x00, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 
+		//0x0490: .00. .... $OBJ ECT 
+		0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x04a0: NAME  ONE          
+		0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
+		//0x04b0:                    
+		0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 
+		//0x04c0:  ... .... .... ....
+		0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 
+		//0x04d0: .... .... ..D: ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		//0x04e0: .... .... .... ....
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 
 		//0x04f0: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 
 		//0x0500: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 
+		0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0510: .... .... .... ....
-		0x06, 0x0b, 0x04, 0x07, 0x07, 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, 
 		//0x0520: .... .... .... ....
 		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
 		//0x0530: .... .... .... ....
@@ -5953,11 +5953,9 @@ void DreamGenContext::__start() {
 		//0x0570: .... .... .... ....
 		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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
 		//0x0590: .... .... .... ....
-		0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 
-		//0x05a0: .... .... .... ....
-		0x00, 0x00, };
+		0xff, 0xff, 0x00, 0x00, 0x00, };
 	ds.assign(src, src + sizeof(src));
 	dreamweb(); 
 }
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index ef45dd5..6642803 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -32,14 +32,14 @@
 
 namespace DreamGen {
 
-static const uint16 offset_money1poke = 0x0499;
-static const uint16 offset_openchangesize = 0x03c7;
-static const uint16 offset_comlist = 0x03c9;
-static const uint16 offset_money2poke = 0x049e;
-static const uint16 offset_commandline = 0x04a6;
-static const uint16 offset_rootdir = 0x047d;
-static const uint16 offset_keys = 0x0405;
-static const uint16 offset_operand1 = 0x046f;
+static const uint16 offset_keys = 0x03f8;
+static const uint16 offset_money1poke = 0x048c;
+static const uint16 offset_commandline = 0x0499;
+static const uint16 offset_rootdir = 0x0470;
+static const uint16 offset_comlist = 0x03bc;
+static const uint16 offset_openchangesize = 0x03ba;
+static const uint16 offset_operand1 = 0x0462;
+static const uint16 offset_money2poke = 0x0491;
 static const uint16 kStartvars = 0;
 static const uint16 kProgresspoints = 1;
 static const uint16 kWatchon = 2;
@@ -389,16 +389,15 @@ static const uint16 kCurrentsample = 482;
 static const uint16 kRoomssample = 483;
 static const uint16 kReelroutines = 484;
 static const uint16 kBasicsample = 941;
-static const uint16 kVolumetabname = 954;
-static const uint16 kCurrentfile = 1163;
-static const uint16 kRoomscango = 1287;
-static const uint16 kRoompics = 1303;
-static const uint16 kOplist = 1318;
-static const uint16 kInputline = 1321;
-static const uint16 kPresslist = 1449;
-static const uint16 kQuitrequested = 1455;
-static const uint16 kSubtitles = 1456;
-static const uint16 kForeignrelease = 1457;
+static const uint16 kCurrentfile = 1150;
+static const uint16 kRoomscango = 1274;
+static const uint16 kRoompics = 1290;
+static const uint16 kOplist = 1305;
+static const uint16 kInputline = 1308;
+static const uint16 kPresslist = 1436;
+static const uint16 kQuitrequested = 1442;
+static const uint16 kSubtitles = 1443;
+static const uint16 kForeignrelease = 1444;
 static const uint16 kBlocktextdat = (0);
 static const uint16 kPersonframes = (0);
 static const uint16 kDebuglevel1 = (0);


Commit: 5d80fda3a4116ddb29b20b52b1a7273c436714f7
    https://github.com/scummvm/scummvm/commit/5d80fda3a4116ddb29b20b52b1a7273c436714f7
Author: Max Horn (max at quendi.de)
Date: 2011-12-12T03:40:28-08:00

Commit Message:
DREAMWEB: Add Dreambase::loadSpeech method

Changed paths:
    engines/dreamweb/dreambase.h
    engines/dreamweb/sound.cpp
    engines/dreamweb/stubs.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index ad6748d..2d5669f 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -99,6 +99,7 @@ public:
 	void showNames();
 
 	// from sound.cpp
+	bool loadSpeech(byte type1, int idx1, byte type2, int idx2);
 	void volumeAdjust();
 	void cancelCh0();
 	void cancelCh1();
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index f1837f3..0fef99e 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -31,14 +31,21 @@
 namespace DreamGen {
 
 void DreamGenContext::loadSpeech() {
+	loadSpeech((uint8)dl, (uint8)dh, (uint8)cl, (uint16)ax);
+}
+
+bool DreamBase::loadSpeech(byte type1, int idx1, byte type2, int idx2) {
 	cancelCh1();
-	data.byte(kSpeechloaded) = 0;
-	Common::String name = Common::String::format("%c%02d%c%04d.RAW", (uint8)dl, (uint8)dh, (uint8)cl, (uint16)ax);
+
+	Common::String name = Common::String::format("%c%02d%c%04d.RAW", type1, idx1, type2, idx2);
 	//debug("name = %s", name.c_str());
-	if (engine->loadSpeech(name))
-		data.byte(kSpeechloaded) = 1;
+	bool result = engine->loadSpeech(name);
+
+	data.byte(kSpeechloaded) = result;
+	return result;
 }
 
+
 void DreamBase::volumeAdjust() {
 	if (data.byte(kVolumedirection) == 0)
 		return;
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index d74477c..7e871bd 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -888,23 +888,9 @@ void DreamGenContext::useTimedText() {
 void DreamGenContext::setupTimedTemp(uint8 textIndex, uint8 voiceIndex, uint8 x, uint8 y, uint16 countToTimed, uint16 timeCount) {
 #if 1 // if cd
 	if (voiceIndex != 0) {
-		push(ax);
-		push(bx);
-		push(cx);
-		push(dx);
-		dl = 'T';
-		dh = voiceIndex;
-		cl = 'T';
-		ah = 0;
-		al = textIndex;
-		loadSpeech();
-		if (data.byte(kSpeechloaded) == 1) {
+		if (loadSpeech('T', voiceIndex, 'T', textIndex)) {
 			playChannel1(50+12);
 		}
-		dx = pop();
-		cx = pop();
-		bx = pop();
-		ax = pop();
 
 		// FIXME: This fallthrough does not properly support subtitles+speech
 		// mode. The parameters to setuptimedtemp() are sometimes different
@@ -4239,12 +4225,7 @@ void DreamGenContext::monkSpeaking() {
 	hangOn(300);
 
 	for (int i = 40; i <= 48; i++) {
-		dl = 'T';
-		dh = 83;
-		cl = 'T';
-		ah = 0;
-		al = i;
-		loadSpeech();
+		loadSpeech('T', 83, 'T', i);
 
 		playChannel1(50 + 12);
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 950da21..c73034c 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -528,6 +528,9 @@
 	void selectLocation();
 	void showGroup();
 	void loadSpeech();
+	bool loadSpeech(byte type1, int idx1, byte type2, int idx2) {
+		return DreamBase::loadSpeech(type1, idx1, type2, idx2);
+	}
 	void getTime();
 	void set16ColPalette();
 	void examineInventory();


Commit: af85b85a8448dde352aa54aa61192e76c4d8be1b
    https://github.com/scummvm/scummvm/commit/af85b85a8448dde352aa54aa61192e76c4d8be1b
Author: Max Horn (max at quendi.de)
Date: 2011-12-12T04:26:03-08:00

Commit Message:
DREAMWEB: Convert rollEndCredits/rollEndCredits2 to C++

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



diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index edc4a60..5558a93 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -625,6 +625,8 @@ generator = cpp(context, "DreamGen", blacklist = [
 	'restoreems',
 	'restorereels',
 	'rockstar',
+	'rollendcredits',
+	'rollendcredits2',
 	'roomname',
 	'runintroseq',
 	'saveems',
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 2d5669f..3d5c9ce 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -114,6 +114,7 @@ public:
 	void showReelFrame(Reel *reel);
 	const Frame *getReelFrameAX(uint16 frame);
 	void soundOnReels(uint16 reelPointer);
+	void rollEndCredits();
 
 	// from stubs.cpp
 	void crosshair();
@@ -148,6 +149,7 @@ public:
 	void panelIcons1();
 	SetObject *getSetAd(uint8 index);
 	void *getAnyAd(uint8 *value1, uint8 *value2);
+	const uint8 *getTextInFile1(uint16 index);
 
 	// from use.cpp
 	void placeFreeObject(uint8 index);
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 5b96e7c..8d1eb4c 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -546,99 +546,6 @@ notendseq:
 	rollEndCredits();
 }
 
-void DreamGenContext::rollEndCredits() {
-	STACK_CHECK;
-	al = 16;
-	ah = 255;
-	playChannel0();
-	data.byte(kVolume) = 7;
-	data.byte(kVolumeto) = 0;
-	data.byte(kVolumedirection) = -1;
-	cl = 160;
-	ch = 160;
-	di = 75;
-	bx = 20;
-	ds = data.word(kMapstore);
-	si = 0;
-	multiGet();
-	es = data.word(kTextfile1);
-	si = 3*2;
-	ax = es.word(si);
-	si = ax;
-	_add(si, (66*2));
-	cx = 254;
-endcredits1:
-	push(cx);
-	bx = 10;
-	cx = data.word(kLinespacing);
-endcredits2:
-	push(cx);
-	push(si);
-	push(di);
-	push(es);
-	push(bx);
-	vSync();
-	cl = 160;
-	ch = 160;
-	di = 75;
-	bx = 20;
-	ds = data.word(kMapstore);
-	si = 0;
-	multiPut();
-	vSync();
-	bx = pop();
-	es = pop();
-	di = pop();
-	si = pop();
-	push(si);
-	push(di);
-	push(es);
-	push(bx);
-	cx = 18;
-onelot:
-	push(cx);
-	di = 75;
-	dx = 161;
-	ax = 0;
-	printDirect();
-	_add(bx, data.word(kLinespacing));
-	cx = pop();
-	if (--cx)
-		goto onelot;
-	vSync();
-	cl = 160;
-	ch = 160;
-	di = 75;
-	bx = 20;
-	multiDump();
-	bx = pop();
-	es = pop();
-	di = pop();
-	si = pop();
-	cx = pop();
-	_dec(bx);
-	if (--cx)
-		goto endcredits2;
-	cx = pop();
-looknext:
-	al = es.byte(si);
-	_inc(si);
-	_cmp(al, ':');
-	if (flags.z())
-		goto gotnext;
-	_cmp(al, 0);
-	if (flags.z())
-		goto gotnext;
-	goto looknext;
-gotnext:
-	if (--cx)
-		goto endcredits1;
-	cx = 100;
-	hangOn();
-	panelToMap();
-	fadeScreenUpHalf();
-}
-
 void DreamGenContext::checkForExit() {
 	STACK_CHECK;
 	cl = data.byte(kRyanx);
@@ -928,11 +835,6 @@ halfend:
 	data.byte(kNumtofade) = 32;
 }
 
-void DreamGenContext::rollEndCredits2() {
-	STACK_CHECK;
-	rollEm();
-}
-
 void DreamGenContext::rollEm() {
 	STACK_CHECK;
 	cl = 160;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 6642803..04c5116 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -546,14 +546,12 @@ public:
 	void pickupConts();
 	void nextColon();
 	void findInvPos();
-	void rollEndCredits();
 	void getKeyAndLogo();
 	void selectOb();
 	void receptionist();
 	void selectSlot();
 	void fadeUpMon();
 	void showDiaryPage();
-	void transferToEx();
 	void reExFromInv();
 	void businessMan();
 	void outOfInv();
@@ -587,7 +585,6 @@ public:
 	void drawItAll();
 	void useStereo();
 	void showDiaryKeys();
-	void rollEndCredits2();
 	void useOpened();
 	void signOn();
 	void locationPic();
@@ -620,6 +617,7 @@ public:
 	void swapWithInv();
 	void useControl();
 	void adjustRight();
+	void transferToEx();
 	void updateSymbolTop();
 	void getPersonText();
 	void parser();
diff --git a/engines/dreamweb/print.cpp b/engines/dreamweb/print.cpp
index dc7ca8a..0fd596c 100644
--- a/engines/dreamweb/print.cpp
+++ b/engines/dreamweb/print.cpp
@@ -122,11 +122,10 @@ uint8 DreamBase::printSlow(const uint8 *string, uint16 x, uint16 y, uint8 maxWid
 
 void DreamGenContext::printDirect() {
 	uint16 y = bx;
-	uint16 initialSi = si;
 	const uint8 *initialString = es.ptr(si, 0);
 	const uint8 *string = initialString;
 	al = DreamBase::printDirect(&string, di, &y, dl, (bool)(dl & 1));
-	si = initialSi + (string - initialString);
+	si += (string - initialString);
 	bx = y;
 }
 
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index f1f3ff5..f8f11d8 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -759,6 +759,50 @@ void DreamGenContext::intro3Text() {
 		setupTimedTemp(46, 82, 36, 56, 100, 1);
 }
 
+void DreamBase::rollEndCredits() {
+	playChannel0(16, 255);
+	data.byte(kVolume) = 7;
+	data.byte(kVolumeto) = 0;
+	data.byte(kVolumedirection) = -1;
+
+	multiGet(mapStore(), 75, 20, 160, 160);
+
+	const uint8 *string = getTextInFile1(3);
+	const int linespacing = data.word(kLinespacing);
+
+	for (int i = 0; i < 254; ++i) {
+		// Output the text, initially with an offset of 10 pixels,
+		// then move it up one pixel until we shifted it by a complete
+		// line of text.
+		for (int j = 0; j < linespacing; ++j) {
+			vSync();
+			multiPut(mapStore(), 75, 20, 160, 160);
+			vSync();
+
+			// Output up to 18 lines of text
+			uint16 y = 10 - j;
+			const uint8 *tmp_str = string;
+			for (int k = 0; k < 18; ++j) {
+				DreamBase::printDirect(&tmp_str, 75, &y, 160 + 1, true);
+				y += linespacing;
+			}
+
+			vSync();
+			multiDump(75, 20, 160, 160);
+		}
+
+		// Skip to the next text line
+		byte c;
+		do {
+			c = *string++;
+		} while (c != ':' && c != 0);
+	}
+	hangOn(100);
+	panelToMap();
+	fadeScreenUpHalf();
+}
+
+
 void DreamGenContext::monks2text() {
 	bool isGermanCD = isCD() && engine->getLanguage() == Common::DE_DEU;
 
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 7e871bd..0b3daa8 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -2482,9 +2482,10 @@ void DreamGenContext::setLocation() {
 	setLocation(al);
 }
 
-const uint8 *DreamGenContext::getTextInFile1(uint16 index) {
-	uint16 offset = getSegment(data.word(kTextfile1)).word(index * 2) + kTextstart;
-	const uint8 *string = getSegment(data.word(kTextfile1)).ptr(offset, 0);
+const uint8 *DreamBase::getTextInFile1(uint16 index) {
+	SegmentRef text = getSegment(data.word(kTextfile1));
+	uint16 offset = text.word(index * 2) + kTextstart;
+	const uint8 *string = text.ptr(offset, 0);
 	return string;
 }
 
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index c73034c..ed1aba9 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -369,7 +369,6 @@
 	void getLocation();
 	void setLocation(uint8 index);
 	void setLocation();
-	const uint8 *getTextInFile1(uint16 index);
 	void loadTempText();
 	void loadTempText(const char *fileName);
 	void loadTravelText();
@@ -568,5 +567,6 @@
 	void showPuzText(uint16 command, uint16 count);
 	void showPuzText();
 	void monkSpeaking();
+	void rollEndCredits2();
 
 #endif
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp
index 6f5af57..ca63b73 100644
--- a/engines/dreamweb/vgafades.cpp
+++ b/engines/dreamweb/vgafades.cpp
@@ -248,4 +248,8 @@ void DreamGenContext::showGroup() {
 	cx = 0;
 }
 
+void DreamGenContext::rollEndCredits2() {
+	rollEm();
+}
+
 } // End of namespace DreamGen


Commit: b699d5e81e899003561f9d3f6dd7098297d19162
    https://github.com/scummvm/scummvm/commit/b699d5e81e899003561f9d3f6dd7098297d19162
Author: Max Horn (max at quendi.de)
Date: 2011-12-12T04:26:22-08:00

Commit Message:
DREAMWEB: Remove now unused DreamGenContext::playChannel0() wrapper

Changed paths:
    engines/dreamweb/sound.cpp
    engines/dreamweb/stubs.h



diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index 0fef99e..d09358e 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -79,10 +79,6 @@ void DreamBase::playChannel0(uint8 index, uint8 repeat) {
 	}
 }
 
-void DreamGenContext::playChannel0() {
-	playChannel0(al, ah);
-}
-
 void DreamBase::playChannel1(uint8 index) {
 	if (data.byte(kCh1playing) == 7)
 		return;
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ed1aba9..4e9dbb8 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -275,10 +275,6 @@
 	void monMessage(uint8 index);
 	void monMessage();
 	void netError();
-	void playChannel0();
-	void playChannel0(uint8 index, uint8 repeat) {
-		DreamBase::playChannel0(index, repeat);
-	}
 	void playChannel1();
 	void playChannel1(uint8 index) {
 		DreamBase::playChannel1(index);


Commit: a5992d9b9f41fcebac02aab8597bf78226c14aed
    https://github.com/scummvm/scummvm/commit/a5992d9b9f41fcebac02aab8597bf78226c14aed
Author: Willem Jan Palenstijn (wjp at usecode.org)
Date: 2011-12-12T04:50:33-08:00

Commit Message:
Merge pull request #135 from fingolfin/dreamweb-cleanup

Dreamweb cleanup, convert DreamGenContext::rollEndCredits() to C++

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









More information about the Scummvm-git-logs mailing list