diff options
Diffstat (limited to 'engines/dreamweb')
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 93 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 20 | ||||
-rw-r--r-- | engines/dreamweb/sound.cpp | 5 |
3 files changed, 34 insertions, 84 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index b811322e47..aeed1c265e 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -3079,14 +3079,14 @@ void DreamGenContext::getDestInfo() { push(ax); dx = data; es = dx; - si = 1340; + si = 1321; _add(si, ax); cl = es.byte(si); ax = pop(); push(cx); dx = data; es = dx; - si = 1356; + si = 1337; _add(si, ax); ax = pop(); } @@ -3138,7 +3138,7 @@ clearedlocations: bx = ax; dx = data; es = dx; - _add(bx, 1340); + _add(bx, 1321); es.byte(bx) = 0; } @@ -3174,7 +3174,7 @@ void DreamGenContext::execCommand() { es = cs; bx = offset_comlist; ds = cs; - si = 1374; + si = 1355; al = ds.byte(si); _cmp(al, 0); if (!flags.z()) @@ -3369,7 +3369,7 @@ notyetassigned: push(bx); _add(bx, 2); ds = cs; - si = 1374; + si = 1355; checkpass: _lodsw(); ah = es.byte(bx); @@ -3697,7 +3697,7 @@ void DreamGenContext::parser() { al = '='; _stosb(); ds = cs; - si = 1374; + si = 1355; notspace1: _lodsw(); _cmp(al, 32); @@ -5400,51 +5400,6 @@ nomatchslot: goto slotloop; } -void DreamGenContext::createName() { - STACK_CHECK; - push(ax); - di = offset_speechfile; - cs.byte(di+0) = dl; - cs.byte(di+3) = cl; - al = dh; - ah = '0'-1; -findten: - _inc(ah); - _sub(al, 10); - if (!flags.c()) - goto findten; - cs.byte(di+1) = ah; - _add(al, 10+'0'); - cs.byte(di+2) = al; - ax = pop(); - cl = '0'-1; -thousandsc: - _inc(cl); - _sub(ax, 1000); - if (!flags.c()) - goto thousandsc; - _add(ax, 1000); - cs.byte(di+4) = cl; - cl = '0'-1; -hundredsc: - _inc(cl); - _sub(ax, 100); - if (!flags.c()) - goto hundredsc; - _add(ax, 100); - cs.byte(di+5) = cl; - cl = '0'-1; -tensc: - _inc(cl); - _sub(ax, 10); - if (!flags.c()) - goto tensc; - _add(ax, 10); - cs.byte(di+6) = cl; - _add(al, '0'); - cs.byte(di+7) = al; -} - void DreamGenContext::entryTexts() { STACK_CHECK; _cmp(data.byte(kLocation), 21); @@ -5710,7 +5665,7 @@ void DreamGenContext::clearChanges() { di = 0; _stosw(cx, true); es = cs; - di = 1340; + di = 1321; al = 1; _stosb(2); al = 0; @@ -6055,25 +6010,25 @@ void DreamGenContext::__start() { //0x04a0: ROOT ." 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, //0x04b0: .0 000. - 0x30, 0x30, 0x00, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 0x32, - //0x04c0: 00.. ...$ SPEE CHR2 - 0x34, 0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 0x43, - //0x04d0: 4C00 05.R AW.O BJEC - 0x54, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - //0x04e0: T NA ME O NE + 0x30, 0x30, 0x00, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, + //0x04c0: 00.. ...$ OBJE CT N + 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + //0x04d0: AME ONE 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - //0x04f0: - 0x20, 0x20, 0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, - //0x0500: . .... .... .... - 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, - //0x0510: .... .... .... D:.. + //0x04e0: + 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + //0x04f0: .... .... .... .... + 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, + //0x0500: .... .... .D:. .... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + //0x0510: .... .... .... .... + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, //0x0520: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, //0x0530: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, + 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //0x0540: .... .... .... .... - 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, 0x00, 0x00, 0x00, //0x0550: .... .... .... .... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //0x0560: .... .... .... .... @@ -6087,11 +6042,9 @@ void DreamGenContext::__start() { //0x05a0: .... .... .... .... 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //0x05b0: .... .... .... .... - 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, //0x05c0: .... .... .... .... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, - //0x05d0: .... .... .... .... - 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, }; + 0xff, 0x00, 0x00, 0x00, }; ds.assign(src, src + sizeof(src)); dreamweb(); } diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index 9c138bbd99..c6e1e2e51e 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -32,11 +32,10 @@ namespace DreamGen { +static const uint16 offset_commandline = 0x04c8; static const uint16 offset_openchangesize = 0x03e9; -static const uint16 offset_speechfile = 0x04ce; static const uint16 offset_operand1 = 0x0491; static const uint16 offset_money2poke = 0x04c0; -static const uint16 offset_commandline = 0x04db; static const uint16 offset_keys = 0x0427; static const uint16 offset_rootdir = 0x049f; static const uint16 offset_money1poke = 0x04bb; @@ -414,14 +413,14 @@ static const uint16 kReelroutines = 518; static const uint16 kBasicsample = 975; static const uint16 kVolumetabname = 988; static const uint16 kCurrentfile = 1197; -static const uint16 kRoomscango = 1340; -static const uint16 kRoompics = 1356; -static const uint16 kOplist = 1371; -static const uint16 kInputline = 1374; -static const uint16 kPresslist = 1502; -static const uint16 kQuitrequested = 1508; -static const uint16 kSubtitles = 1509; -static const uint16 kForeignrelease = 1510; +static const uint16 kRoomscango = 1321; +static const uint16 kRoompics = 1337; +static const uint16 kOplist = 1352; +static const uint16 kInputline = 1355; +static const uint16 kPresslist = 1483; +static const uint16 kQuitrequested = 1489; +static const uint16 kSubtitles = 1490; +static const uint16 kForeignrelease = 1491; static const uint16 kBlocktextdat = (0); static const uint16 kPersonframes = (0); static const uint16 kDebuglevel1 = (0); @@ -648,7 +647,6 @@ public: void useControl(); void adjustRight(); void updateSymbolTop(); - void createName(); void getPersonText(); void parser(); void emergencyPurge(); diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp index fc68a8f996..d27af52fbe 100644 --- a/engines/dreamweb/sound.cpp +++ b/engines/dreamweb/sound.cpp @@ -33,9 +33,8 @@ namespace DreamGen { void DreamGenContext::loadSpeech() { cancelCh1(); data.byte(kSpeechloaded) = 0; - createName(); - const char *name = (const char *)data.ptr(di, 13); - //warning("name = %s", name); + Common::String name = Common::String::format("%c%02d%c%04d.RAW", (uint8)dl, (uint8)dh, (uint8)cl, (uint16)ax); + //debug("name = %s", name.c_str()); if (engine->loadSpeech(name)) data.byte(kSpeechloaded) = 1; } |