From 54ed4255c0c7412ddcd9d259d365cb216c3c66c6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 12 Dec 2011 12:28:12 +0100 Subject: DREAMWEB: Add a FIXME --- engines/dreamweb/stubs.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines') diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp index 226c085a2b..d74477c003 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); -- cgit v1.2.3 From 864ab1b265758a89408da3fd30de25a96f031b5e Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 12 Dec 2011 12:28:29 +0100 Subject: DREAMWEB: Remove volumetabname from data blob --- engines/dreamweb/dreamgen.cpp | 112 +++++++++++++++++++++--------------------- engines/dreamweb/dreamgen.h | 35 +++++++------ 2 files changed, 72 insertions(+), 75 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 94658a164b..5b96e7cb86 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 ef45dd5a97..6642803b42 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); -- cgit v1.2.3 From 5d80fda3a4116ddb29b20b52b1a7273c436714f7 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 12 Dec 2011 12:39:06 +0100 Subject: DREAMWEB: Add Dreambase::loadSpeech method --- engines/dreamweb/dreambase.h | 1 + engines/dreamweb/sound.cpp | 15 +++++++++++---- engines/dreamweb/stubs.cpp | 23 ++--------------------- engines/dreamweb/stubs.h | 3 +++ 4 files changed, 17 insertions(+), 25 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index ad6748d021..2d5669fa8f 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 f1837f313a..0fef99ef43 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 d74477c003..7e871bd42a 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 950da21574..c73034ce5e 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(); -- cgit v1.2.3 From af85b85a8448dde352aa54aa61192e76c4d8be1b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 12 Dec 2011 13:15:04 +0100 Subject: DREAMWEB: Convert rollEndCredits/rollEndCredits2 to C++ --- engines/dreamweb/dreambase.h | 2 + engines/dreamweb/dreamgen.cpp | 98 ------------------------------------------- engines/dreamweb/dreamgen.h | 4 +- engines/dreamweb/print.cpp | 3 +- engines/dreamweb/sprite.cpp | 44 +++++++++++++++++++ engines/dreamweb/stubs.cpp | 7 ++-- engines/dreamweb/stubs.h | 2 +- engines/dreamweb/vgafades.cpp | 4 ++ 8 files changed, 57 insertions(+), 107 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index 2d5669fa8f..3d5c9ce88b 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 5b96e7cb86..8d1eb4cec9 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 6642803b42..04c5116b83 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 dc7ca8a2f7..0fd596ceac 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 f1f3ff5e48..f8f11d8df8 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 7e871bd42a..0b3daa861e 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 c73034ce5e..ed1aba957a 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 6f5af573c4..ca63b7308c 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 -- cgit v1.2.3 From b699d5e81e899003561f9d3f6dd7098297d19162 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 12 Dec 2011 13:26:22 +0100 Subject: DREAMWEB: Remove now unused DreamGenContext::playChannel0() wrapper --- engines/dreamweb/sound.cpp | 4 ---- engines/dreamweb/stubs.h | 4 ---- 2 files changed, 8 deletions(-) (limited to 'engines') diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index 0fef99ef43..d09358eaf8 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 ed1aba957a..4e9dbb8448 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); -- cgit v1.2.3