aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-09 00:09:38 +0200
committerFilippos Karapetis2011-12-09 00:11:24 +0200
commit4fdaba7e5ece3ac9d1ac2c7848072c70c1c5c746 (patch)
tree33eb4d6f97bb8b94f6d0aa2c44dba8a8137590a8 /engines/dreamweb
parent0db0bf45046205f5a55d88896c215dbaa8a9397a (diff)
downloadscummvm-rg350-4fdaba7e5ece3ac9d1ac2c7848072c70c1c5c746.tar.gz
scummvm-rg350-4fdaba7e5ece3ac9d1ac2c7848072c70c1c5c746.tar.bz2
scummvm-rg350-4fdaba7e5ece3ac9d1ac2c7848072c70c1c5c746.zip
DREAMWEB: Port 'talk' to C++. Remove decidelist and talklist offsets
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp198
-rw-r--r--engines/dreamweb/dreamgen.h46
-rw-r--r--engines/dreamweb/stubs.cpp62
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 142 insertions, 165 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 663606e81b..5331d78fdf 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2967,60 +2967,6 @@ dogetback:
data.byte(kPickup) = 0;
}
-void DreamGenContext::talk() {
- STACK_CHECK;
- data.byte(kTalkpos) = 0;
- data.byte(kInmaparea) = 0;
- al = data.byte(kCommand);
- data.byte(kCharacter) = al;
- createPanel();
- showPanel();
- showMan();
- showExit();
- underTextLine();
- convIcons();
- startTalk();
- data.byte(kCommandtype) = 255;
- readMouse();
- showPointer();
- workToScreen();
-waittalk:
- delPointer();
- readMouse();
- animPointer();
- showPointer();
- vSync();
- dumpPointer();
- dumpTextLine();
- data.byte(kGetback) = 0;
- bx = offset_talklist;
- checkCoords();
- _cmp(data.byte(kQuitrequested), 0);
- if (!flags.z())
- goto finishtalk;
- _cmp(data.byte(kGetback), 0);
- if (flags.z())
- goto waittalk;
-finishtalk:
- bx = data.word(kPersondata);
- es = cs;
- _cmp(data.byte(kTalkpos), 4);
- if (flags.c())
- goto notnexttalk;
- al = es.byte(bx+7);
- _or(al, 128);
- es.byte(bx+7) = al;
-notnexttalk:
- redrawMainScrn();
- workToScreenM();
- _cmp(data.byte(kSpeechloaded), 1);
- if (!flags.z())
- return /* (nospeech) */;
- cancelCh1();
- data.byte(kVolumedirection) = -1;
- data.byte(kVolumeto) = 0;
-}
-
void DreamGenContext::startTalk() {
STACK_CHECK;
data.byte(kTalkmode) = 0;
@@ -3434,14 +3380,14 @@ void DreamGenContext::getDestInfo() {
push(ax);
dx = data;
es = dx;
- si = 1655;
+ si = 1581;
_add(si, ax);
cl = es.byte(si);
ax = pop();
push(cx);
dx = data;
es = dx;
- si = 1671;
+ si = 1597;
_add(si, ax);
ax = pop();
}
@@ -3493,7 +3439,7 @@ clearedlocations:
bx = ax;
dx = data;
es = dx;
- _add(bx, 1655);
+ _add(bx, 1581);
es.byte(bx) = 0;
}
@@ -3529,7 +3475,7 @@ void DreamGenContext::execCommand() {
es = cs;
bx = offset_comlist;
ds = cs;
- si = 1689;
+ si = 1615;
al = ds.byte(si);
_cmp(al, 0);
if (!flags.z())
@@ -3622,7 +3568,7 @@ dirroot:
si = offset_rootdir;
_inc(si);
es = cs;
- di = 1344;
+ di = 1312;
_inc(di);
cx = 12;
_movsb(cx, true);
@@ -3724,7 +3670,7 @@ notyetassigned:
push(bx);
_add(bx, 2);
ds = cs;
- si = 1689;
+ si = 1615;
checkpass:
_lodsw();
ah = es.byte(bx);
@@ -3795,7 +3741,7 @@ void DreamGenContext::read() {
return;
okcom:
es = cs;
- di = 1344;
+ di = 1312;
ax = data.word(kTextfile1);
data.word(kMonsource) = ax;
ds = ax;
@@ -3925,7 +3871,7 @@ keyok2:
ds = cs;
si = offset_operand1+1;
es = cs;
- di = 1344+1;
+ di = 1312+1;
cx = 12;
_movsb(cx, true);
monitorLogo();
@@ -4052,7 +3998,7 @@ void DreamGenContext::parser() {
al = '=';
_stosb();
ds = cs;
- si = 1689;
+ si = 1615;
notspace1:
_lodsw();
_cmp(al, 32);
@@ -6025,7 +5971,7 @@ void DreamGenContext::getNamePos() {
_mul(cx);
dx = data;
es = dx;
- bx = 1823;
+ bx = 1749;
_add(bx, ax);
al = data.byte(kCursorpos);
ah = 0;
@@ -6121,7 +6067,7 @@ void DreamGenContext::showNames() {
STACK_CHECK;
dx = data;
es = dx;
- si = 1823+1;
+ si = 1749+1;
di = (60)+21;
bx = (52)+10;
cl = 0;
@@ -6497,7 +6443,7 @@ void DreamGenContext::clearChanges() {
di = 0;
_stosw(cx, true);
es = cs;
- di = 1655;
+ di = 1581;
al = 1;
_stosb(2);
al = 0;
@@ -6828,111 +6774,101 @@ void DreamGenContext::__start() {
//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... ..@. ....
- 0x7c, 0xc4, 0xf0, 0x00, 0x22, 0x01, 0x02, 0x00, 0x2c, 0x00, 0x94, 0xc4, 0x00, 0x00, 0x40, 0x01,
- //0x0450: |... "... ,... ..@.
- 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x11, 0x01, 0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00,
- //0x0460: .... .... ..@. ....
0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x45, 0x58,
- //0x0470: |... @... .... ..EX
+ //0x0450: |... @... .... ..EX
0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20,
- //0x0480: IT HELP
+ //0x0460: IT HELP
0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x52, 0x45, 0x41, 0x44,
- //0x0490: LI ST READ
+ //0x0470: LI ST READ
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x04a0: LO GON
+ //0x0480: LO GON
0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c,
- //0x04b0: KEYS .. PUBL
+ //0x0490: KEYS .. PUBL
0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20,
- //0x04c0: IC PUBL IC
+ //0x04a0: IC PUBL IC
0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f,
- //0x04d0: . ..BL ACKD RAGO
+ //0x04b0: . ..BL ACKD RAGO
0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00,
- //0x04e0: N RY AN ...
+ //0x04c0: N RY AN ...
0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49,
- //0x04f0: HEND RIX LOUI
+ //0x04d0: HEND RIX LOUI
0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d,
- //0x0500: S . ..SE PTIM
+ //0x04e0: S . ..SE PTIM
0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20,
- //0x0510: US BE CKET T
+ //0x04f0: US BE CKET T
0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0520: ...
+ //0x0500: ...
0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
- //0x0530: ."R OOT .
+ //0x0510: ."R OOT .
0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x30, 0x30,
- //0x0540: " .00
+ //0x0520: " .00
0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0xba, 0x00, 0xca, 0x00, 0x9d, 0x00, 0xad, 0x00, 0x1c, 0xc8,
- //0x0550: 00.0 0... .... ....
+ //0x0530: 00.0 0... .... ....
0xf3, 0x00, 0x03, 0x01, 0x83, 0x00, 0x93, 0x00, 0x18, 0xc8, 0x0c, 0x01, 0x1c, 0x01, 0xa8, 0x00,
- //0x0560: .... .... .... ....
+ //0x0540: .... .... .... ....
0xb8, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff,
- //0x0570: ..P. ..@. .... ....
+ //0x0550: ..P. ..@. .... ....
0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x34, 0xc8, 0x46, 0x00, 0x89, 0x00, 0x3e, 0x00,
- //0x0580: w... R... 4.F. ..>.
+ //0x0560: w... R... 4.F. ..>.
0x6f, 0x00, 0x80, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x44, 0x00, 0x98, 0x00, 0x4c, 0xc8, 0x00, 0x00,
- //0x0590: o... .... D... L...
+ //0x0570: o... .... D... L...
0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00,
- //0x05a0: @... .... ..w. ..R.
+ //0x0580: @... .... ..w. ..R.
0x80, 0x00, 0x44, 0xc8, 0x46, 0x00, 0x8b, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x50, 0xc8, 0xec, 0x00,
- //0x05b0: ..D. F... >.o. P...
+ //0x0590: ..D. F... >.o. P...
0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
- //0x05c0: ..p. ..H. ..@. ....
- 0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x81, 0x00, 0xb8, 0x00, 0x52, 0x00, 0x80,
- //0x05d0: .... .... $... .R..
- 0x00, 0xc0, 0xc8, 0x50, 0x00, 0x93, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xb7, 0x00, 0xfa,
- //0x05e0: ...P ...> .o.. ....
- 0x00, 0x3e, 0x00, 0x6f, 0x00, 0xc4, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0,
- //0x05f0: .>.o .... .@.. ....
- 0xca, 0xff, 0xff, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 0x32, 0x34, 0x43, 0x30, 0x30, 0x30,
- //0x0600: ...S PEEC HR24 C000
- 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x20, 0x4e, 0x41, 0x4d,
- //0x0610: 5.RA W.OB JECT NAM
- 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0620: E ON E
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10,
- //0x0630: ..
- 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
+ //0x05a0: ..p. ..H. ..@. ....
+ 0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52,
+ //0x05b0: .... .... $SPE ECHR
+ 0x32, 0x34, 0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45,
+ //0x05c0: 24C0 005. RAW. OBJE
+ 0x43, 0x54, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x05d0: CT N AME ONE
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x05e0:
+ 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01,
+ //0x05f0: .... .... ....
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00,
+ //0x0600: .... .... .... .D:.
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ //0x0610: .... .... .... ....
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+ //0x0620: .... .... .... ....
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03,
+ //0x0630: .... .... .... ....
+ 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0640: .... .... .... ....
- 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- //0x0650: .... ...D :... ....
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ //0x0650: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0660: .... .... .... ....
- 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0670: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0680: .... .... .... ....
- 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,
//0x0690: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x06a0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x06b0: .... .... .... ....
- 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, 0x00, 0x00, 0x00, 0xff,
//0x06c0: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x06d0: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x06e0: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x06f0: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0700: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x02,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0710: .... .... .... ....
- 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01,
//0x0720: .... .... .... ....
- 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01,
//0x0730: .... .... .... ....
- 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x0740: .... .... .... ....
- 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x0750: .... .... .... ....
- 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x0760: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x0770: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x0780: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, };
+ 0x01, 0x01, 0x01, 0x01, 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 f0e4208890..f35c87d536 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -32,20 +32,19 @@
namespace DreamGen {
-static const uint16 offset_money1poke = 0x054e;
-static const uint16 offset_talklist = 0x0448;
-static const uint16 offset_discopslist = 0x05aa;
+static const uint16 offset_opslist = 0x0560;
+static const uint16 offset_operand1 = 0x0504;
+static const uint16 offset_money1poke = 0x052e;
static const uint16 offset_openchangesize = 0x0446;
-static const uint16 offset_operand1 = 0x0524;
-static const uint16 offset_speechfile = 0x0609;
-static const uint16 offset_comlist = 0x047e;
-static const uint16 offset_opslist = 0x0580;
-static const uint16 offset_diarylist = 0x0556;
-static const uint16 offset_rootdir = 0x0532;
-static const uint16 offset_money2poke = 0x0553;
-static const uint16 offset_commandline = 0x0616;
-static const uint16 offset_keys = 0x04ba;
-static const uint16 offset_quitlist = 0x0468;
+static const uint16 offset_discopslist = 0x058a;
+static const uint16 offset_commandline = 0x05cc;
+static const uint16 offset_comlist = 0x045e;
+static const uint16 offset_speechfile = 0x05bf;
+static const uint16 offset_diarylist = 0x0536;
+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 kStartvars = 0;
static const uint16 kProgresspoints = 1;
static const uint16 kWatchon = 2;
@@ -426,16 +425,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 = 1344;
-static const uint16 kRoomscango = 1655;
-static const uint16 kRoompics = 1671;
-static const uint16 kOplist = 1686;
-static const uint16 kInputline = 1689;
-static const uint16 kPresslist = 1817;
-static const uint16 kSavenames = 1823;
-static const uint16 kQuitrequested = 1942;
-static const uint16 kSubtitles = 1943;
-static const uint16 kForeignrelease = 1944;
+static const uint16 kCurrentfile = 1312;
+static const uint16 kRoomscango = 1581;
+static const uint16 kRoompics = 1597;
+static const uint16 kOplist = 1612;
+static const uint16 kInputline = 1615;
+static const uint16 kPresslist = 1743;
+static const uint16 kSavenames = 1749;
+static const uint16 kQuitrequested = 1868;
+static const uint16 kSubtitles = 1869;
+static const uint16 kForeignrelease = 1870;
static const uint16 kBlocktextdat = (0);
static const uint16 kPersonframes = (0);
static const uint16 kDebuglevel1 = (0);
@@ -575,7 +574,6 @@ public:
void usePipe();
void reminders();
void runTap();
- void talk();
void showMonk();
void checkForExit();
void lookInInterface();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index a56d63e1a5..8d7ef9340a 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1676,16 +1676,6 @@ void DreamGenContext::checkCoords() {
// FIXME: Move all these lists to the callers
switch ((uint16)bx) {
- case offset_talklist: {
- RectWithCallback talkList[] = {
- { 273,320,157,198,&DreamGenContext::getBack1 },
- { 240,290,2,44,&DreamGenContext::moreTalk },
- { 0,320,0,200,&DreamGenContext::blank },
- { 0xFFFF,0,0,0,0 }
- };
- checkCoords(talkList);
- break;
- }
case offset_quitlist: {
RectWithCallback quitList[] = {
{ 273,320,157,198,&DreamGenContext::getBack1 },
@@ -3982,4 +3972,56 @@ void DreamGenContext::decide() {
data.byte(kTextlen) = 240;
}
+void DreamGenContext::talk() {
+ data.byte(kTalkpos) = 0;
+ data.byte(kInmaparea) = 0;
+ data.byte(kCharacter) = data.byte(kCommand);
+ createPanel();
+ showPanel();
+ showMan();
+ showExit();
+ underTextLine();
+ convIcons();
+ startTalk();
+ data.byte(kCommandtype) = 255;
+ readMouse();
+ showPointer();
+ workToScreen();
+
+ RectWithCallback talkList[] = {
+ { 273,320,157,198,&DreamGenContext::getBack1 },
+ { 240,290,2,44,&DreamGenContext::moreTalk },
+ { 0,320,0,200,&DreamGenContext::blank },
+ { 0xFFFF,0,0,0,0 }
+ };
+
+ do {
+ delPointer();
+ readMouse();
+ animPointer();
+ showPointer();
+ vSync();
+ dumpPointer();
+ dumpTextLine();
+ data.byte(kGetback) = 0;
+ checkCoords(talkList);
+ if (data.byte(kQuitrequested))
+ break;
+ } while (!data.byte(kGetback));
+
+ bx = data.word(kPersondata);
+ es = cs;
+
+ if (data.byte(kTalkpos) >= 4)
+ es.byte(bx+7) |= 128;
+
+ redrawMainScrn();
+ workToScreenM();
+ if (data.byte(kSpeechloaded) == 1) {
+ cancelCh1();
+ data.byte(kVolumedirection) = -1;
+ data.byte(kVolumeto) = 0;
+ }
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index ff5585b941..ab59b973d2 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -555,5 +555,6 @@
void getUnderZoom();
void putUnderZoom();
void decide();
+ void talk();
#endif