aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2011-12-14 17:19:14 +0100
committerWillem Jan Palenstijn2011-12-17 19:19:08 +0100
commit6dd09b8935495d211c51a45652fc59b4da1b0442 (patch)
tree2e7fc4a638dc068623d53606475614c951b5f850
parentf8bfe84c44edd9969cad6c9e011c43f92127a23d (diff)
downloadscummvm-rg350-6dd09b8935495d211c51a45652fc59b4da1b0442.tar.gz
scummvm-rg350-6dd09b8935495d211c51a45652fc59b4da1b0442.tar.bz2
scummvm-rg350-6dd09b8935495d211c51a45652fc59b4da1b0442.zip
DREAMWEB: Convert checkForExit
-rwxr-xr-xdevtools/tasmrecover/tasm-recover8
-rw-r--r--engines/dreamweb/dreambase.h2
-rw-r--r--engines/dreamweb/dreamgen.cpp371
-rw-r--r--engines/dreamweb/dreamgen.h442
-rw-r--r--engines/dreamweb/sprite.cpp61
-rw-r--r--engines/dreamweb/stubs.cpp3
-rw-r--r--engines/dreamweb/stubs.h4
7 files changed, 396 insertions, 495 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 8d5eb11b63..cbc0001b43 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -164,6 +164,9 @@ p = parser(skip_binary_data = [
'liftsoundcount',
'playblock',
'gotfrom',
+ 'flagx',
+ 'flagy',
+ 'lastflagex',
# vgagrafx.asm
'cityname',
'extragraphics1',
@@ -224,7 +227,11 @@ generator = cpp(context, "DreamGen", blacklist = [
'addlength',
'addtopeoplelist',
'addtopresslist',
+ 'adjustdown',
+ 'adjustleft',
'adjustlen',
+ 'adjustright',
+ 'adjustup',
'advisor',
'afterintroroom',
'afternewroom',
@@ -284,6 +291,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'checkcoords',
'checkdest',
'checkforemm',
+ 'checkforexit',
'checkforshake',
'checkifex',
'checkiffree',
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index 20cafcb203..7c86696568 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -263,6 +263,7 @@ public:
void clearReels();
void getRidOfReels();
void liftNoise(uint8 index);
+ void checkForExit(Sprite *sprite);
// from stubs.cpp
bool isCD();
@@ -388,6 +389,7 @@ public:
void dumpTimedText();
void getTime();
void doChange(uint8 index, uint8 value, uint8 type);
+ bool isRyanHolding(const char *id);
// from use.cpp
void placeFreeObject(uint8 index);
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index ff91eb678f..ea4d8e5b05 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -26,165 +26,6 @@
namespace DreamGen {
-void DreamGenContext::checkForExit() {
- STACK_CHECK;
- cl = data.byte(kRyanx);
- _add(cl, 12);
- ch = data.byte(kRyany);
- _add(ch, 12);
- checkOne();
- data.byte(kLastflag) = cl;
- data.byte(kLastflagex) = ch;
- data.byte(kFlagx) = dl;
- data.byte(kFlagy) = dh;
- al = data.byte(kLastflag);
- _test(al, 64);
- if (flags.z())
- goto notnewdirect;
- al = data.byte(kLastflagex);
- data.byte(kAutolocation) = al;
- return;
-notnewdirect:
- _test(al, 32);
- if (flags.z())
- goto notleave;
- push(es);
- push(bx);
- _cmp(data.byte(kReallocation), 2);
- if (!flags.z())
- goto notlouis;
- bl = 0;
- push(bx);
- al = 'W';
- ah = 'E';
- cl = 'T';
- ch = 'A';
- isRyanHolding();
- bx = pop();
- if (flags.z())
- goto noshoe1;
- _inc(bl);
-noshoe1:
- push(bx);
- al = 'W';
- ah = 'E';
- cl = 'T';
- ch = 'B';
- isRyanHolding();
- bx = pop();
- if (flags.z())
- goto noshoe2;
- _inc(bl);
-noshoe2:
- _cmp(bl, 2);
- if (flags.z())
- goto notlouis;
- al = 42;
- _cmp(bl, 0);
- if (flags.z())
- goto notravmessage;
- _inc(al);
-notravmessage:
- cx = 80;
- dx = 10;
- bl = 68;
- bh = 64;
- setupTimedUse();
- al = data.byte(kFacing);
- _add(al, 4);
- _and(al, 7);
- data.byte(kTurntoface) = al;
- bx = pop();
- es = pop();
- return;
-notlouis:
- bx = pop();
- es = pop();
- data.byte(kNeedtotravel) = 1;
- return;
-notleave:
- _test(al, 4);
- if (flags.z())
- goto notaleft;
- adjustLeft();
- return;
-notaleft:
- _test(al, 2);
- if (flags.z())
- goto notaright;
- adjustRight();
- return;
-notaright:
- _test(al, 8);
- if (flags.z())
- goto notadown;
- adjustDown();
- return;
-notadown:
- _test(al, 16);
- if (flags.z())
- return /* (notanup) */;
- adjustUp();
-}
-
-void DreamGenContext::adjustDown() {
- STACK_CHECK;
- push(es);
- push(bx);
- _add(data.byte(kMapy), 10);
- al = data.byte(kLastflagex);
- cl = 16;
- _mul(cl);
- es.byte(bx+11) = al;
- data.byte(kNowinnewroom) = 1;
- bx = pop();
- es = pop();
-}
-
-void DreamGenContext::adjustUp() {
- STACK_CHECK;
- push(es);
- push(bx);
- _sub(data.byte(kMapy), 10);
- al = data.byte(kLastflagex);
- cl = 16;
- _mul(cl);
- es.byte(bx+11) = al;
- data.byte(kNowinnewroom) = 1;
- bx = pop();
- es = pop();
-}
-
-void DreamGenContext::adjustLeft() {
- STACK_CHECK;
- push(es);
- push(bx);
- data.byte(kLastflag) = 0;
- _sub(data.byte(kMapx), 11);
- al = data.byte(kLastflagex);
- cl = 16;
- _mul(cl);
- es.byte(bx+10) = al;
- data.byte(kNowinnewroom) = 1;
- bx = pop();
- es = pop();
-}
-
-void DreamGenContext::adjustRight() {
- STACK_CHECK;
- push(es);
- push(bx);
- _add(data.byte(kMapx), 11);
- al = data.byte(kLastflagex);
- cl = 16;
- _mul(cl);
- _sub(al, 2);
- es.byte(bx+10) = al;
- data.byte(kNowinnewroom) = 1;
- bx = pop();
- es = pop();
-}
-
void DreamGenContext::reminders() {
STACK_CHECK;
_cmp(data.byte(kReallocation), 24);
@@ -2140,14 +1981,14 @@ void DreamGenContext::getDestInfo() {
push(ax);
dx = data;
es = dx;
- si = 1123;
+ si = 1120;
_add(si, ax);
cl = es.byte(si);
ax = pop();
push(cx);
dx = data;
es = dx;
- si = 1139;
+ si = 1136;
_add(si, ax);
ax = pop();
}
@@ -2199,7 +2040,7 @@ clearedlocations:
bx = ax;
dx = data;
es = dx;
- _add(bx, 1123);
+ _add(bx, 1120);
es.byte(bx) = 0;
}
@@ -2238,7 +2079,7 @@ dirroot:
si = offset_rootdir;
_inc(si);
es = cs;
- di = 1048;
+ di = 1045;
_inc(di);
cx = 12;
_movsb(cx, true);
@@ -2340,7 +2181,7 @@ notyetassigned:
push(bx);
_add(bx, 2);
ds = cs;
- si = 1157;
+ si = 1154;
checkpass:
_lodsw();
ah = es.byte(bx);
@@ -2411,7 +2252,7 @@ void DreamGenContext::read() {
return;
okcom:
es = cs;
- di = 1048;
+ di = 1045;
ax = data.word(kTextfile1);
data.word(kMonsource) = ax;
ds = ax;
@@ -2541,7 +2382,7 @@ keyok2:
ds = cs;
si = offset_operand1+1;
es = cs;
- di = 1048+1;
+ di = 1045+1;
cx = 12;
_movsb(cx, true);
monitorLogo();
@@ -2668,7 +2509,7 @@ void DreamGenContext::parser() {
al = '=';
_stosb();
ds = cs;
- si = 1157;
+ si = 1154;
notspace1:
_lodsw();
_cmp(al, 32);
@@ -2755,7 +2596,7 @@ gotkeyp:
void DreamGenContext::clearBuffers() {
STACK_CHECK;
es = data.word(kBuffers);
- cx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+901-444+68-0)/2;
+ cx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+898-441+68-0)/2;
ax = 0;
di = 0;
_stosw(cx, true);
@@ -2767,11 +2608,11 @@ void DreamGenContext::clearBuffers() {
es = data.word(kBuffers);
di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
ds = cs;
- si = 444;
- cx = (901-444);
+ si = 441;
+ cx = (898-441);
_movsb(cx, true);
es = data.word(kBuffers);
- di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+901-444);
+ di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+898-441);
ds = cs;
si = 0;
cx = (68-0);
@@ -2789,11 +2630,11 @@ void DreamGenContext::clearChanges() {
ds = data.word(kBuffers);
si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
es = cs;
- di = 444;
- cx = (901-444);
+ di = 441;
+ cx = (898-441);
_movsb(cx, true);
ds = data.word(kBuffers);
- si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+901-444);
+ si = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+898-441);
es = cs;
di = 0;
cx = (68-0);
@@ -2807,7 +2648,7 @@ void DreamGenContext::clearChanges() {
di = 0;
_stosw(cx, true);
es = cs;
- di = 1123;
+ di = 1120;
al = 1;
_stosb(2);
al = 0;
@@ -2930,14 +2771,14 @@ void DreamGenContext::__start() {
//0x0090: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00a0: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00b0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00c0: .... .... .... ....
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00,
+ //0x00d0: .... .... .... . .
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- //0x00d0: .... .... .... ....
- 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- //0x00e0: .. .... .... ....
+ //0x00e0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x00f0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -2954,105 +2795,105 @@ void DreamGenContext::__start() {
//0x0150: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0160: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
//0x0170: .... .... .... ....
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
//0x0180: .... .... .... ....
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00,
//0x0190: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x01a0: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x01, 0x2c, 0x00, 0x14,
- //0x01b0: .... .... .... .,..
- 0x00, 0x02, 0x00, 0x01, 0x01, 0x37, 0x00, 0x00, 0x00, 0x32, 0x14, 0x00, 0x18, 0x16, 0x00, 0x4a,
- //0x01c0: .... .7.. .2.. ...J
- 0x00, 0x01, 0x00, 0x00, 0x18, 0x21, 0x0a, 0x4b, 0x00, 0x01, 0x00, 0x01, 0x01, 0x2c, 0x00, 0x1b,
- //0x01d0: .... .!.K .... .,..
- 0x00, 0x02, 0x00, 0x02, 0x01, 0x2c, 0x00, 0x60, 0x00, 0x03, 0x00, 0x04, 0x01, 0x2c, 0x00, 0x76,
- //0x01e0: .... .,.` .... .,.v
- 0x00, 0x02, 0x00, 0x05, 0x01, 0x2c, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x16, 0x14, 0x35,
- //0x01f0: .... .,.. .... ...5
- 0x00, 0x03, 0x00, 0x00, 0x05, 0x16, 0x14, 0x28, 0x00, 0x01, 0x00, 0x02, 0x05, 0x16, 0x14, 0x32,
- //0x0200: .... ...( .... ...2
- 0x00, 0x01, 0x00, 0x03, 0x02, 0x0b, 0x0a, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x02, 0x0b, 0x0a, 0xb6,
+ 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x01, 0x2c, 0x00, 0x14, 0x00, 0x02, 0x00,
+ //0x01b0: .... .... ..,. ....
+ 0x01, 0x01, 0x37, 0x00, 0x00, 0x00, 0x32, 0x14, 0x00, 0x18, 0x16, 0x00, 0x4a, 0x00, 0x01, 0x00,
+ //0x01c0: ..7. ..2. .... J...
+ 0x00, 0x18, 0x21, 0x0a, 0x4b, 0x00, 0x01, 0x00, 0x01, 0x01, 0x2c, 0x00, 0x1b, 0x00, 0x02, 0x00,
+ //0x01d0: ..!. K... ..,. ....
+ 0x02, 0x01, 0x2c, 0x00, 0x60, 0x00, 0x03, 0x00, 0x04, 0x01, 0x2c, 0x00, 0x76, 0x00, 0x02, 0x00,
+ //0x01e0: ..,. `... ..,. v...
+ 0x05, 0x01, 0x2c, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x05, 0x16, 0x14, 0x35, 0x00, 0x03, 0x00,
+ //0x01f0: ..,. .... .... 5...
+ 0x00, 0x05, 0x16, 0x14, 0x28, 0x00, 0x01, 0x00, 0x02, 0x05, 0x16, 0x14, 0x32, 0x00, 0x01, 0x00,
+ //0x0200: .... (... .... 2...
+ 0x03, 0x02, 0x0b, 0x0a, 0xc0, 0x00, 0x01, 0x00, 0x00, 0x02, 0x0b, 0x0a, 0xb6, 0x00, 0x02, 0x00,
//0x0210: .... .... .... ....
- 0x00, 0x02, 0x00, 0x01, 0x08, 0x0b, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x17, 0x00, 0x32, 0x00,
- //0x0220: .... .... .... ..2.
- 0x00, 0x03, 0x00, 0x00, 0x1c, 0x0b, 0x14, 0xfa, 0x00, 0x04, 0x00, 0x00, 0x17, 0x00, 0x32, 0x2b,
- //0x0230: .... .... .... ..2+
- 0x00, 0x02, 0x00, 0x08, 0x17, 0x0b, 0x28, 0x82, 0x00, 0x02, 0x00, 0x01, 0x17, 0x16, 0x28, 0x7a,
- //0x0240: .... ..(. .... ..(z
- 0x00, 0x02, 0x00, 0x02, 0x17, 0x16, 0x28, 0x69, 0x00, 0x02, 0x00, 0x03, 0x17, 0x16, 0x28, 0x51,
- //0x0250: .... ..(i .... ..(Q
- 0x00, 0x02, 0x00, 0x04, 0x17, 0x0b, 0x28, 0x87, 0x00, 0x02, 0x00, 0x05, 0x17, 0x16, 0x28, 0x91,
- //0x0260: .... ..(. .... ..(.
- 0x00, 0x02, 0x00, 0x06, 0x04, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 0x1e, 0xc8,
- //0x0270: .... .... .... -...
- 0x00, 0x00, 0x00, 0x14, 0x2d, 0x16, 0x1e, 0x27, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 0x1e, 0x19,
- //0x0280: .... -..' .... -...
- 0x00, 0x02, 0x00, 0x00, 0x08, 0x16, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x07, 0x0b, 0x14, 0x40,
- //0x0290: .... ..( .... ...@
- 0x00, 0x02, 0x00, 0x00, 0x16, 0x16, 0x14, 0x52, 0x00, 0x02, 0x00, 0x00, 0x1b, 0x0b, 0x1e, 0x00,
- //0x02a0: .... ...R .... ....
- 0x00, 0x02, 0x00, 0x00, 0x14, 0x00, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x21, 0x28, 0x15,
- //0x02b0: .... .... .... .!(.
- 0x00, 0x01, 0x00, 0x00, 0x1d, 0x0b, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x16, 0x00, 0x02,
+ 0x01, 0x08, 0x0b, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x01, 0x17, 0x00, 0x32, 0x00, 0x00, 0x03, 0x00,
+ //0x0220: .... .... ...2 ....
+ 0x00, 0x1c, 0x0b, 0x14, 0xfa, 0x00, 0x04, 0x00, 0x00, 0x17, 0x00, 0x32, 0x2b, 0x00, 0x02, 0x00,
+ //0x0230: .... .... ...2 +...
+ 0x08, 0x17, 0x0b, 0x28, 0x82, 0x00, 0x02, 0x00, 0x01, 0x17, 0x16, 0x28, 0x7a, 0x00, 0x02, 0x00,
+ //0x0240: ...( .... ...( z...
+ 0x02, 0x17, 0x16, 0x28, 0x69, 0x00, 0x02, 0x00, 0x03, 0x17, 0x16, 0x28, 0x51, 0x00, 0x02, 0x00,
+ //0x0250: ...( i... ...( Q...
+ 0x04, 0x17, 0x0b, 0x28, 0x87, 0x00, 0x02, 0x00, 0x05, 0x17, 0x16, 0x28, 0x91, 0x00, 0x02, 0x00,
+ //0x0260: ...( .... ...( ....
+ 0x06, 0x04, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 0x1e, 0xc8, 0x00, 0x00, 0x00,
+ //0x0270: .... .... .-.. ....
+ 0x14, 0x2d, 0x16, 0x1e, 0x27, 0x00, 0x02, 0x00, 0x00, 0x2d, 0x16, 0x1e, 0x19, 0x00, 0x02, 0x00,
+ //0x0280: .-.. '... .-.. ....
+ 0x00, 0x08, 0x16, 0x28, 0x20, 0x00, 0x02, 0x00, 0x00, 0x07, 0x0b, 0x14, 0x40, 0x00, 0x02, 0x00,
+ //0x0290: ...( ... .... @...
+ 0x00, 0x16, 0x16, 0x14, 0x52, 0x00, 0x02, 0x00, 0x00, 0x1b, 0x0b, 0x1e, 0x00, 0x00, 0x02, 0x00,
+ //0x02a0: .... R... .... ....
+ 0x00, 0x14, 0x00, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x21, 0x28, 0x15, 0x00, 0x01, 0x00,
+ //0x02b0: .... .... ..!( ....
+ 0x00, 0x1d, 0x0b, 0x0a, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x16, 0x00, 0x02, 0x00, 0x02, 0x00,
//0x02c0: .... .... .... ....
- 0x00, 0x02, 0x00, 0x00, 0x19, 0x00, 0x32, 0x04, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x1e, 0x79,
- //0x02d0: .... ..2. .... 2..y
- 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x1e, 0x00, 0x00, 0x14, 0x00, 0x00, 0x34, 0x16, 0x1e, 0xc0,
- //0x02e0: .... 2... .... 4...
- 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0xe9, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x28, 0x68,
- //0x02f0: .... 4... .... 2.(h
- 0x00, 0x37, 0x00, 0x00, 0x35, 0x21, 0x00, 0x63, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x28, 0x00,
- //0x0300: .7.. 5!.c .... 2.(.
- 0x00, 0x03, 0x00, 0x00, 0x32, 0x16, 0x1e, 0xa2, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0x39,
- //0x0310: .... 2... .... 4..9
- 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x36, 0x00, 0x00, 0x48,
- //0x0320: .... 4... .... 6..H
- 0x00, 0x03, 0x00, 0x00, 0x37, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00,
- //0x0330: .... 7,.. .... ....
- 0x00, 0x1c, 0x00, 0x00, 0x0e, 0x16, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x16, 0x00, 0x2c,
- //0x0340: .... .... .... ...,
- 0x01, 0x01, 0x00, 0x00, 0x0a, 0x16, 0x1e, 0xae, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x16, 0x14, 0x00,
+ 0x00, 0x19, 0x00, 0x32, 0x04, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x1e, 0x79, 0x00, 0x02, 0x00,
+ //0x02d0: ...2 .... .2.. y...
+ 0x00, 0x32, 0x16, 0x1e, 0x00, 0x00, 0x14, 0x00, 0x00, 0x34, 0x16, 0x1e, 0xc0, 0x00, 0x02, 0x00,
+ //0x02e0: .2.. .... .4.. ....
+ 0x00, 0x34, 0x16, 0x1e, 0xe9, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x28, 0x68, 0x00, 0x37, 0x00,
+ //0x02f0: .4.. .... .2.( h.7.
+ 0x00, 0x35, 0x21, 0x00, 0x63, 0x00, 0x02, 0x00, 0x00, 0x32, 0x16, 0x28, 0x00, 0x00, 0x03, 0x00,
+ //0x0300: .5!. c... .2.( ....
+ 0x00, 0x32, 0x16, 0x1e, 0xa2, 0x00, 0x02, 0x00, 0x00, 0x34, 0x16, 0x1e, 0x39, 0x00, 0x02, 0x00,
+ //0x0310: .2.. .... .4.. 9...
+ 0x00, 0x34, 0x16, 0x1e, 0x00, 0x00, 0x02, 0x00, 0x00, 0x36, 0x00, 0x00, 0x48, 0x00, 0x03, 0x00,
+ //0x0320: .4.. .... .6.. H...
+ 0x00, 0x37, 0x2c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00,
+ //0x0330: .7,. .... .... ....
+ 0x00, 0x0e, 0x16, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x16, 0x00, 0x2c, 0x01, 0x01, 0x00,
+ //0x0340: .... .... .... ,...
+ 0x00, 0x0a, 0x16, 0x1e, 0xae, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x16, 0x14, 0x00, 0x00, 0x01, 0x00,
//0x0350: .... .... .... ....
- 0x00, 0x01, 0x00, 0x00, 0x0b, 0x0b, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x0b, 0x1e, 0x00,
- //0x0360: .... .... .2.. ....
- 0x00, 0x32, 0x14, 0x00, 0x0b, 0x16, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0e, 0x21, 0x28, 0x00,
- //0x0370: .2.. .... .2.. .!(.
- 0x00, 0x32, 0x14, 0x00, 0xff, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x39,
- //0x0380: .2.. .DRE AMWE B.V9
- 0x39, 0x00, 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0390: 9... PUBL IC
- 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c,
- //0x03a0: PUBL IC . ..BL
- 0x41, 0x43, 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20,
- //0x03b0: ACKD RAGO N RY AN
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20,
- //0x03c0: ... HEND RIX
- 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00,
- //0x03d0: LOUI S .
- 0x00, 0x00, 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45,
- //0x03e0: ..SE PTIM US BE
- 0x43, 0x4b, 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20,
- //0x03f0: CKET T ...
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20,
- //0x0400: ."R OOT
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0410: . "
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x10, 0x12, 0x12, 0x11, 0x10,
- //0x0420: ... ..$. ....
- 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02,
+ 0x00, 0x0b, 0x0b, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0b, 0x0b, 0x1e, 0x00, 0x00, 0x32, 0x14,
+ //0x0360: .... ..2. .... ..2.
+ 0x00, 0x0b, 0x16, 0x14, 0x00, 0x00, 0x32, 0x14, 0x00, 0x0e, 0x21, 0x28, 0x00, 0x00, 0x32, 0x14,
+ //0x0370: .... ..2. ..!( ..2.
+ 0x00, 0xff, 0x44, 0x52, 0x45, 0x41, 0x4d, 0x57, 0x45, 0x42, 0x2e, 0x56, 0x39, 0x39, 0x00, 0x01,
+ //0x0380: ..DR EAMW EB.V 99..
+ 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42,
+ //0x0390: .PUB LIC PUB
+ 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b,
+ //0x03a0: LIC ...B LACK
+ 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x03b0: DRAG ON R YAN
+ 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20,
+ //0x03c0: .. .HEN DRIX
+ 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53,
+ //0x03d0: LOU IS ...S
+ 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45,
+ //0x03e0: EPTI MUS B ECKE
+ 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x03f0: TT .. .
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20,
+ //0x0400: ." ROOT
+ 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x0410: ."
+ 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01,
+ //0x0420: .. ...$ .... ....
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
//0x0430: .... .... .... ....
- 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- //0x0440: ...D :... .... ....
+ 0x44, 0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ //0x0440: D:.. .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0450: .... .... .... ....
- 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0460: .... .... .... ....
- 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07,
+ 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 0x00, 0x00,
//0x0470: .... .... .... ....
- 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, 0x00, 0x00, 0x00, 0x00,
//0x0480: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0490: .... .... .... ....
@@ -3068,7 +2909,7 @@ void DreamGenContext::__start() {
//0x04e0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x04f0: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, };
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 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 139253cdb8..f6100557c1 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -32,9 +32,9 @@
namespace DreamGen {
-static const uint16 offset_operand1 = 0x03fc;
-static const uint16 offset_keys = 0x0392;
-static const uint16 offset_rootdir = 0x040a;
+static const uint16 offset_rootdir = 0x0407;
+static const uint16 offset_operand1 = 0x03f9;
+static const uint16 offset_keys = 0x038f;
static const uint16 kStartvars = 0;
static const uint16 kProgresspoints = 1;
static const uint16 kWatchon = 2;
@@ -157,220 +157,217 @@ static const uint16 kNewscreen = 149;
static const uint16 kRyanx = 150;
static const uint16 kRyany = 151;
static const uint16 kLastflag = 152;
-static const uint16 kLastflagex = 153;
-static const uint16 kFlagx = 154;
-static const uint16 kFlagy = 155;
-static const uint16 kCurrentex = 156;
-static const uint16 kCurrentfree = 157;
-static const uint16 kFramesad = 158;
-static const uint16 kDataad = 160;
-static const uint16 kFrsegment = 162;
-static const uint16 kObjectx = 164;
-static const uint16 kObjecty = 166;
-static const uint16 kOffsetx = 168;
-static const uint16 kOffsety = 170;
-static const uint16 kSavesize = 172;
-static const uint16 kSavesource = 174;
-static const uint16 kSavex = 176;
-static const uint16 kSavey = 177;
-static const uint16 kCurrentob = 178;
-static const uint16 kPrioritydep = 179;
-static const uint16 kDestpos = 180;
-static const uint16 kReallocation = 181;
-static const uint16 kRoomnum = 182;
-static const uint16 kNowinnewroom = 183;
-static const uint16 kResetmanxy = 184;
-static const uint16 kNewlocation = 185;
-static const uint16 kAutolocation = 186;
-static const uint16 kMustload = 187;
-static const uint16 kAnswered = 188;
-static const uint16 kSaidno = 189;
-static const uint16 kDoorcheck1 = 190;
-static const uint16 kDoorcheck2 = 191;
-static const uint16 kDoorcheck3 = 192;
-static const uint16 kDoorcheck4 = 193;
-static const uint16 kMousex = 194;
-static const uint16 kMousey = 196;
-static const uint16 kMousebutton = 198;
-static const uint16 kMousebutton1 = 200;
-static const uint16 kMousebutton2 = 202;
-static const uint16 kMousebutton3 = 204;
-static const uint16 kMousebutton4 = 206;
-static const uint16 kOldbutton = 208;
-static const uint16 kOldx = 210;
-static const uint16 kOldy = 212;
-static const uint16 kLastbutton = 214;
-static const uint16 kOldpointerx = 216;
-static const uint16 kOldpointery = 218;
-static const uint16 kDelherex = 220;
-static const uint16 kDelherey = 222;
-static const uint16 kPointerxs = 224;
-static const uint16 kPointerys = 225;
-static const uint16 kDelxs = 226;
-static const uint16 kDelys = 227;
-static const uint16 kPointerframe = 228;
-static const uint16 kPointerpower = 229;
-static const uint16 kAuxpointerframe = 230;
-static const uint16 kPointermode = 231;
-static const uint16 kPointerspeed = 232;
-static const uint16 kPointercount = 233;
-static const uint16 kInmaparea = 234;
-static const uint16 kSlotdata = 235;
-static const uint16 kThisslot = 236;
-static const uint16 kSlotflags = 237;
-static const uint16 kTalkmode = 238;
-static const uint16 kTalkpos = 239;
-static const uint16 kCharacter = 240;
-static const uint16 kPersondata = 241;
-static const uint16 kTalknum = 243;
-static const uint16 kNumberinroom = 244;
-static const uint16 kCurrentcel = 245;
-static const uint16 kOldselection = 246;
-static const uint16 kStopwalking = 247;
-static const uint16 kMouseon = 248;
-static const uint16 kPlayed = 249;
-static const uint16 kTimer1 = 251;
-static const uint16 kTimer2 = 252;
-static const uint16 kTimer3 = 253;
-static const uint16 kWholetimer = 254;
-static const uint16 kTimer1to = 256;
-static const uint16 kTimer2to = 257;
-static const uint16 kTimer3to = 258;
-static const uint16 kWatchdump = 259;
-static const uint16 kLogonum = 260;
-static const uint16 kOldlogonum = 261;
-static const uint16 kNewlogonum = 262;
-static const uint16 kNetseg = 263;
-static const uint16 kNetpoint = 265;
-static const uint16 kKeynum = 267;
-static const uint16 kCursorstate = 268;
-static const uint16 kPressed = 269;
-static const uint16 kPresspointer = 270;
-static const uint16 kGraphicpress = 272;
-static const uint16 kPresscount = 273;
-static const uint16 kLightcount = 274;
-static const uint16 kFolderpage = 275;
-static const uint16 kDiarypage = 276;
-static const uint16 kMenucount = 277;
-static const uint16 kSymboltopx = 278;
-static const uint16 kSymboltopnum = 279;
-static const uint16 kSymboltopdir = 280;
-static const uint16 kSymbolbotx = 281;
-static const uint16 kSymbolbotnum = 282;
-static const uint16 kSymbolbotdir = 283;
-static const uint16 kSymboltolight = 284;
-static const uint16 kSymbol1 = 285;
-static const uint16 kSymbol2 = 286;
-static const uint16 kSymbol3 = 287;
-static const uint16 kSymbolnum = 288;
-static const uint16 kDumpx = 289;
-static const uint16 kDumpy = 291;
-static const uint16 kWalkandexam = 293;
-static const uint16 kWalkexamtype = 294;
-static const uint16 kWalkexamnum = 295;
-static const uint16 kCurslocx = 296;
-static const uint16 kCurslocy = 298;
-static const uint16 kCurpos = 300;
-static const uint16 kMonadx = 302;
-static const uint16 kMonady = 304;
-static const uint16 kMonsource = 306;
-static const uint16 kNumtodo = 308;
-static const uint16 kTimecount = 310;
-static const uint16 kCounttotimed = 312;
-static const uint16 kTimedseg = 314;
-static const uint16 kTimedoffset = 316;
-static const uint16 kTimedy = 318;
-static const uint16 kTimedx = 319;
-static const uint16 kNeedtodumptimed = 320;
-static const uint16 kLoadingorsave = 321;
-static const uint16 kCurrentslot = 322;
-static const uint16 kCursorpos = 323;
-static const uint16 kColourpos = 324;
-static const uint16 kFadedirection = 325;
-static const uint16 kNumtofade = 326;
-static const uint16 kFadecount = 327;
-static const uint16 kAddtogreen = 328;
-static const uint16 kAddtored = 329;
-static const uint16 kAddtoblue = 330;
-static const uint16 kLastsoundreel = 331;
-static const uint16 kSpeechloaded = 333;
-static const uint16 kSpeechlength = 334;
-static const uint16 kVolume = 336;
-static const uint16 kVolumeto = 337;
-static const uint16 kVolumedirection = 338;
-static const uint16 kVolumecount = 339;
-static const uint16 kWongame = 340;
-static const uint16 kLasthardkey = 341;
-static const uint16 kBufferin = 342;
-static const uint16 kBufferout = 344;
-static const uint16 kExtras = 346;
-static const uint16 kWorkspace = 348;
-static const uint16 kMapstore = 350;
-static const uint16 kCharset1 = 352;
-static const uint16 kBuffers = 354;
-static const uint16 kMainsprites = 356;
-static const uint16 kBackdrop = 358;
-static const uint16 kMapdata = 360;
-static const uint16 kSounddata = 362;
-static const uint16 kSounddata2 = 364;
-static const uint16 kRecordspace = 366;
-static const uint16 kFreedat = 368;
-static const uint16 kSetdat = 370;
-static const uint16 kReel1 = 372;
-static const uint16 kReel2 = 374;
-static const uint16 kReel3 = 376;
-static const uint16 kRoomdesc = 378;
-static const uint16 kFreedesc = 380;
-static const uint16 kSetdesc = 382;
-static const uint16 kBlockdesc = 384;
-static const uint16 kSetframes = 386;
-static const uint16 kFreeframes = 388;
-static const uint16 kPeople = 390;
-static const uint16 kReels = 392;
-static const uint16 kCommandtext = 394;
-static const uint16 kPuzzletext = 396;
-static const uint16 kTraveltext = 398;
-static const uint16 kTempgraphics = 400;
-static const uint16 kTempgraphics2 = 402;
-static const uint16 kTempgraphics3 = 404;
-static const uint16 kTempsprites = 406;
-static const uint16 kTextfile1 = 408;
-static const uint16 kTextfile2 = 410;
-static const uint16 kTextfile3 = 412;
-static const uint16 kBlinkframe = 414;
-static const uint16 kBlinkcount = 415;
-static const uint16 kReasseschanges = 416;
-static const uint16 kPointerspath = 417;
-static const uint16 kManspath = 418;
-static const uint16 kPointerfirstpath = 419;
-static const uint16 kFinaldest = 420;
-static const uint16 kDestination = 421;
-static const uint16 kLinestartx = 422;
-static const uint16 kLinestarty = 424;
-static const uint16 kLineendx = 426;
-static const uint16 kLineendy = 428;
-static const uint16 kLinepointer = 430;
-static const uint16 kLinedirection = 431;
-static const uint16 kLinelength = 432;
-static const uint16 kCh0blockstocopy = 433;
-static const uint16 kCh0playing = 435;
-static const uint16 kCh0repeat = 436;
-static const uint16 kCh1playing = 437;
-static const uint16 kCh1blockstocopy = 438;
-static const uint16 kSoundbufferwrite = 440;
-static const uint16 kCurrentsample = 442;
-static const uint16 kRoomssample = 443;
-static const uint16 kReelroutines = 444;
-static const uint16 kBasicsample = 901;
-static const uint16 kCurrentfile = 1048;
-static const uint16 kRoomscango = 1123;
-static const uint16 kRoompics = 1139;
-static const uint16 kOplist = 1154;
-static const uint16 kInputline = 1157;
-static const uint16 kPresslist = 1285;
-static const uint16 kQuitrequested = 1291;
-static const uint16 kSubtitles = 1292;
-static const uint16 kForeignrelease = 1293;
+static const uint16 kCurrentex = 153;
+static const uint16 kCurrentfree = 154;
+static const uint16 kFramesad = 155;
+static const uint16 kDataad = 157;
+static const uint16 kFrsegment = 159;
+static const uint16 kObjectx = 161;
+static const uint16 kObjecty = 163;
+static const uint16 kOffsetx = 165;
+static const uint16 kOffsety = 167;
+static const uint16 kSavesize = 169;
+static const uint16 kSavesource = 171;
+static const uint16 kSavex = 173;
+static const uint16 kSavey = 174;
+static const uint16 kCurrentob = 175;
+static const uint16 kPrioritydep = 176;
+static const uint16 kDestpos = 177;
+static const uint16 kReallocation = 178;
+static const uint16 kRoomnum = 179;
+static const uint16 kNowinnewroom = 180;
+static const uint16 kResetmanxy = 181;
+static const uint16 kNewlocation = 182;
+static const uint16 kAutolocation = 183;
+static const uint16 kMustload = 184;
+static const uint16 kAnswered = 185;
+static const uint16 kSaidno = 186;
+static const uint16 kDoorcheck1 = 187;
+static const uint16 kDoorcheck2 = 188;
+static const uint16 kDoorcheck3 = 189;
+static const uint16 kDoorcheck4 = 190;
+static const uint16 kMousex = 191;
+static const uint16 kMousey = 193;
+static const uint16 kMousebutton = 195;
+static const uint16 kMousebutton1 = 197;
+static const uint16 kMousebutton2 = 199;
+static const uint16 kMousebutton3 = 201;
+static const uint16 kMousebutton4 = 203;
+static const uint16 kOldbutton = 205;
+static const uint16 kOldx = 207;
+static const uint16 kOldy = 209;
+static const uint16 kLastbutton = 211;
+static const uint16 kOldpointerx = 213;
+static const uint16 kOldpointery = 215;
+static const uint16 kDelherex = 217;
+static const uint16 kDelherey = 219;
+static const uint16 kPointerxs = 221;
+static const uint16 kPointerys = 222;
+static const uint16 kDelxs = 223;
+static const uint16 kDelys = 224;
+static const uint16 kPointerframe = 225;
+static const uint16 kPointerpower = 226;
+static const uint16 kAuxpointerframe = 227;
+static const uint16 kPointermode = 228;
+static const uint16 kPointerspeed = 229;
+static const uint16 kPointercount = 230;
+static const uint16 kInmaparea = 231;
+static const uint16 kSlotdata = 232;
+static const uint16 kThisslot = 233;
+static const uint16 kSlotflags = 234;
+static const uint16 kTalkmode = 235;
+static const uint16 kTalkpos = 236;
+static const uint16 kCharacter = 237;
+static const uint16 kPersondata = 238;
+static const uint16 kTalknum = 240;
+static const uint16 kNumberinroom = 241;
+static const uint16 kCurrentcel = 242;
+static const uint16 kOldselection = 243;
+static const uint16 kStopwalking = 244;
+static const uint16 kMouseon = 245;
+static const uint16 kPlayed = 246;
+static const uint16 kTimer1 = 248;
+static const uint16 kTimer2 = 249;
+static const uint16 kTimer3 = 250;
+static const uint16 kWholetimer = 251;
+static const uint16 kTimer1to = 253;
+static const uint16 kTimer2to = 254;
+static const uint16 kTimer3to = 255;
+static const uint16 kWatchdump = 256;
+static const uint16 kLogonum = 257;
+static const uint16 kOldlogonum = 258;
+static const uint16 kNewlogonum = 259;
+static const uint16 kNetseg = 260;
+static const uint16 kNetpoint = 262;
+static const uint16 kKeynum = 264;
+static const uint16 kCursorstate = 265;
+static const uint16 kPressed = 266;
+static const uint16 kPresspointer = 267;
+static const uint16 kGraphicpress = 269;
+static const uint16 kPresscount = 270;
+static const uint16 kLightcount = 271;
+static const uint16 kFolderpage = 272;
+static const uint16 kDiarypage = 273;
+static const uint16 kMenucount = 274;
+static const uint16 kSymboltopx = 275;
+static const uint16 kSymboltopnum = 276;
+static const uint16 kSymboltopdir = 277;
+static const uint16 kSymbolbotx = 278;
+static const uint16 kSymbolbotnum = 279;
+static const uint16 kSymbolbotdir = 280;
+static const uint16 kSymboltolight = 281;
+static const uint16 kSymbol1 = 282;
+static const uint16 kSymbol2 = 283;
+static const uint16 kSymbol3 = 284;
+static const uint16 kSymbolnum = 285;
+static const uint16 kDumpx = 286;
+static const uint16 kDumpy = 288;
+static const uint16 kWalkandexam = 290;
+static const uint16 kWalkexamtype = 291;
+static const uint16 kWalkexamnum = 292;
+static const uint16 kCurslocx = 293;
+static const uint16 kCurslocy = 295;
+static const uint16 kCurpos = 297;
+static const uint16 kMonadx = 299;
+static const uint16 kMonady = 301;
+static const uint16 kMonsource = 303;
+static const uint16 kNumtodo = 305;
+static const uint16 kTimecount = 307;
+static const uint16 kCounttotimed = 309;
+static const uint16 kTimedseg = 311;
+static const uint16 kTimedoffset = 313;
+static const uint16 kTimedy = 315;
+static const uint16 kTimedx = 316;
+static const uint16 kNeedtodumptimed = 317;
+static const uint16 kLoadingorsave = 318;
+static const uint16 kCurrentslot = 319;
+static const uint16 kCursorpos = 320;
+static const uint16 kColourpos = 321;
+static const uint16 kFadedirection = 322;
+static const uint16 kNumtofade = 323;
+static const uint16 kFadecount = 324;
+static const uint16 kAddtogreen = 325;
+static const uint16 kAddtored = 326;
+static const uint16 kAddtoblue = 327;
+static const uint16 kLastsoundreel = 328;
+static const uint16 kSpeechloaded = 330;
+static const uint16 kSpeechlength = 331;
+static const uint16 kVolume = 333;
+static const uint16 kVolumeto = 334;
+static const uint16 kVolumedirection = 335;
+static const uint16 kVolumecount = 336;
+static const uint16 kWongame = 337;
+static const uint16 kLasthardkey = 338;
+static const uint16 kBufferin = 339;
+static const uint16 kBufferout = 341;
+static const uint16 kExtras = 343;
+static const uint16 kWorkspace = 345;
+static const uint16 kMapstore = 347;
+static const uint16 kCharset1 = 349;
+static const uint16 kBuffers = 351;
+static const uint16 kMainsprites = 353;
+static const uint16 kBackdrop = 355;
+static const uint16 kMapdata = 357;
+static const uint16 kSounddata = 359;
+static const uint16 kSounddata2 = 361;
+static const uint16 kRecordspace = 363;
+static const uint16 kFreedat = 365;
+static const uint16 kSetdat = 367;
+static const uint16 kReel1 = 369;
+static const uint16 kReel2 = 371;
+static const uint16 kReel3 = 373;
+static const uint16 kRoomdesc = 375;
+static const uint16 kFreedesc = 377;
+static const uint16 kSetdesc = 379;
+static const uint16 kBlockdesc = 381;
+static const uint16 kSetframes = 383;
+static const uint16 kFreeframes = 385;
+static const uint16 kPeople = 387;
+static const uint16 kReels = 389;
+static const uint16 kCommandtext = 391;
+static const uint16 kPuzzletext = 393;
+static const uint16 kTraveltext = 395;
+static const uint16 kTempgraphics = 397;
+static const uint16 kTempgraphics2 = 399;
+static const uint16 kTempgraphics3 = 401;
+static const uint16 kTempsprites = 403;
+static const uint16 kTextfile1 = 405;
+static const uint16 kTextfile2 = 407;
+static const uint16 kTextfile3 = 409;
+static const uint16 kBlinkframe = 411;
+static const uint16 kBlinkcount = 412;
+static const uint16 kReasseschanges = 413;
+static const uint16 kPointerspath = 414;
+static const uint16 kManspath = 415;
+static const uint16 kPointerfirstpath = 416;
+static const uint16 kFinaldest = 417;
+static const uint16 kDestination = 418;
+static const uint16 kLinestartx = 419;
+static const uint16 kLinestarty = 421;
+static const uint16 kLineendx = 423;
+static const uint16 kLineendy = 425;
+static const uint16 kLinepointer = 427;
+static const uint16 kLinedirection = 428;
+static const uint16 kLinelength = 429;
+static const uint16 kCh0blockstocopy = 430;
+static const uint16 kCh0playing = 432;
+static const uint16 kCh0repeat = 433;
+static const uint16 kCh1playing = 434;
+static const uint16 kCh1blockstocopy = 435;
+static const uint16 kSoundbufferwrite = 437;
+static const uint16 kCurrentsample = 439;
+static const uint16 kRoomssample = 440;
+static const uint16 kReelroutines = 441;
+static const uint16 kBasicsample = 898;
+static const uint16 kCurrentfile = 1045;
+static const uint16 kRoomscango = 1120;
+static const uint16 kRoompics = 1136;
+static const uint16 kOplist = 1151;
+static const uint16 kInputline = 1154;
+static const uint16 kPresslist = 1282;
+static const uint16 kQuitrequested = 1288;
+static const uint16 kSubtitles = 1289;
+static const uint16 kForeignrelease = 1290;
static const uint16 kBlocktextdat = (0);
static const uint16 kPersonframes = (0);
static const uint16 kDebuglevel1 = (0);
@@ -409,8 +406,8 @@ static const uint16 kListofchanges = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768
static const uint16 kUndertimedtext = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4));
static const uint16 kRainlist = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30));
static const uint16 kInitialreelrouts = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64));
-static const uint16 kInitialvars = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+901-444);
-static const uint16 kLengthofbuffer = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+901-444+68-0);
+static const uint16 kInitialvars = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+898-441);
+static const uint16 kLengthofbuffer = (0+(228*13)+32+60+(32*32)+(11*10*3)+768+768+768+(32*32)+(128*5)+(80*5)+(100*5)+(12*5)+(46*40)+(5*80)+(250*4)+(256*30)+(6*64)+898-441+68-0);
static const uint16 kReellist = (0+(36*144));
static const uint16 kIntext = (0+(38*2));
static const uint16 kLengthofmap = (0+(66*60));
@@ -461,7 +458,7 @@ static const uint16 kKeypady = (72);
static const uint16 kZoomx = (8);
static const uint16 kInventx = (80);
static const uint16 kMenux = (80+40);
-static const uint16 kLenofreelrouts = (901-444);
+static const uint16 kLenofreelrouts = (898-441);
static const uint16 kHeaderlen = (96);
@@ -480,17 +477,14 @@ public:
void fillOpen();
void doSomeTalk();
void resetLocation();
- void adjustUp();
void outOfOpen();
void dirCom();
void findFirstPath();
void startTalk();
void getAnyAd();
void reminders();
- void checkForExit();
void lookInInterface();
void inToInv();
- void adjustLeft();
void deleteExText();
void getFreeAd();
void removeObFromInv();
@@ -533,12 +527,10 @@ public:
void getExAd();
void initialMonCols();
void swapWithInv();
- void adjustRight();
void transferToEx();
void parser();
void emergencyPurge();
void transferConToEx();
- void adjustDown();
};
} // End of namespace DreamGen
diff --git a/engines/dreamweb/sprite.cpp b/engines/dreamweb/sprite.cpp
index cfa204ec23..1e980de015 100644
--- a/engines/dreamweb/sprite.cpp
+++ b/engines/dreamweb/sprite.cpp
@@ -148,7 +148,7 @@ void DreamGenContext::mainMan(Sprite *sprite) {
if ((data.byte(kTurndirection) != 0) && (data.byte(kLinepointer) == 254)) {
data.byte(kReasseschanges) = 1;
if (data.byte(kFacing) == data.byte(kLeavedirection))
- checkForExit();
+ checkForExit(sprite);
}
data.byte(kTurndirection) = 0;
if (data.byte(kLinepointer) == 254) {
@@ -168,7 +168,7 @@ void DreamGenContext::mainMan(Sprite *sprite) {
if (data.byte(kTurntoface) == data.byte(kFacing)) {
data.byte(kReasseschanges) = 1;
if (data.byte(kFacing) == data.byte(kLeavedirection))
- checkForExit();
+ checkForExit(sprite);
}
}
}
@@ -1215,4 +1215,61 @@ void DreamBase::liftNoise(uint8 index) {
playChannel1(index);
}
+void DreamBase::checkForExit(Sprite *sprite) {
+ uint8 flag, flagEx, type, flagX, flagY;
+ checkOne(data.byte(kRyanx) + 12, data.byte(kRyany) + 12, &flag, &flagEx, &type, &flagX, &flagY);
+ data.byte(kLastflag) = flag;
+
+ if (flag & 64) {
+ data.byte(kAutolocation) = flagEx;
+ return;
+ }
+
+ if (!(flag & 32)) {
+ if (flag & 4) {
+ // adjust left
+ data.byte(kLastflag) = 0;
+ data.byte(kMapx) -= 11;
+ sprite->x = 16 * flagEx;
+ data.byte(kNowinnewroom) = 1;
+ } else if (flag & 2) {
+ // adjust right
+ data.byte(kMapx) += 11;
+ sprite->x = 16 * flagEx - 2;
+ data.byte(kNowinnewroom) = 1;
+ } else if (flag & 8) {
+ // adjust down
+ data.byte(kMapy) += 10;
+ sprite->y = 16 * flagEx;
+ data.byte(kNowinnewroom) = 1;
+ } else if (flag & 16) {
+ // adjust up
+ data.byte(kMapy) -= 10;
+ sprite->y = 16 * flagEx;
+ data.byte(kNowinnewroom) = 1;
+ }
+
+ return;
+ }
+
+ if (data.byte(kReallocation) == 2) {
+ // Can't leave Louis' until you found shoes
+
+ int shoeCount = 0;
+ if (isRyanHolding("WETA")) shoeCount++;
+ if (isRyanHolding("WETB")) shoeCount++;
+
+ if (shoeCount < 2) {
+ uint8 text = shoeCount ? 43 : 42;
+ setupTimedUse(text, 80, 10, 68, 64);
+
+ data.byte(kTurntoface) = (data.byte(kFacing) + 4) & 7;
+ return;
+ }
+
+ }
+
+ data.byte(kNeedtotravel) = 1;
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index a1d08b35d1..21d1038f3c 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1454,7 +1454,6 @@ void DreamBase::getFlagUnderP(uint8 *flag, uint8 *flagEx) {
uint8 type, flagX, flagY;
checkOne(data.word(kMousex) - data.word(kMapadx), data.word(kMousey) - data.word(kMapady), flag, flagEx, &type, &flagX, &flagY);
data.byte(kLastflag) = *flag;
- data.byte(kLastflagex) = *flagEx;
}
void DreamGenContext::walkAndExamine() {
@@ -1784,7 +1783,7 @@ void DreamGenContext::isRyanHolding() {
flags._z = !isRyanHolding(id);
}
-bool DreamGenContext::isRyanHolding(const char *id) {
+bool DreamBase::isRyanHolding(const char *id) {
for (uint16 index = 0; index < kNumexobjects; index++) {
DynObject *object = getExAd(index);
if (object->mapad[0] == 4 && objectMatches(object, id))
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index d9823fb2c0..2305b93d53 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -384,7 +384,9 @@
void findExObject();
uint16 findExObject(const char *id);
void isRyanHolding();
- bool isRyanHolding(const char *id);
+ bool isRyanHolding(const char *id) {
+ return DreamBase::isRyanHolding(id);
+ }
void describeOb();
void getOpenedSize();
byte getOpenedSizeCPP();