aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdevtools/tasmrecover/tasm-recover3
-rw-r--r--engines/dreamweb/dreamgen.cpp255
-rw-r--r--engines/dreamweb/dreamgen.h54
-rw-r--r--engines/dreamweb/stubs.cpp78
-rw-r--r--engines/dreamweb/stubs.h2
5 files changed, 182 insertions, 210 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 952e0147d0..f14cf0b52b 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -49,6 +49,8 @@ p = parser(skip_binary_data = [
# keypad.asm
'keypadlist',
'symbollist',
+ # newplace.asm
+ 'destlist',
# object.asm
'invlist1', 'invlist1continued',
'examlist',
@@ -529,6 +531,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'scrollmonitor',
'security',
'seecommandtail',
+ 'selectlocation',
'selectslot2',
'setallchanges',
'setbotleft',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 4299885347..a9fcf43749 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3850,71 +3850,6 @@ istravel:
selectLocation();
}
-void DreamGenContext::selectLocation() {
- STACK_CHECK;
- data.byte(kInmaparea) = 0;
- clearBeforeLoad();
- data.byte(kGetback) = 0;
- data.byte(kPointerframe) = 22;
- readCityPic();
- showCity();
- getRidOfTemp();
- readDestIcon();
- loadTravelText();
- showPanel();
- showMan();
- showArrows();
- showExit();
- locationPic();
- underTextLine();
- data.byte(kCommandtype) = 255;
- readMouse();
- data.byte(kPointerframe) = 0;
- showPointer();
- workToScreen();
- al = 9;
- ah = 255;
- playChannel0();
- data.byte(kNewlocation) = 255;
-select:
- _cmp(data.byte(kQuitrequested), 0);
- if (!flags.z())
- goto quittravel;
- delPointer();
- readMouse();
- showPointer();
- vSync();
- dumpPointer();
- dumpTextLine();
- _cmp(data.byte(kGetback), 1);
- if (flags.z())
- goto quittravel;
- bx = offset_destlist;
- checkCoords();
- _cmp(data.byte(kNewlocation), 255);
- if (flags.z())
- goto select;
- al = data.byte(kNewlocation);
- _cmp(al, data.byte(kLocation));
- if (flags.z())
- goto quittravel;
- getRidOfTemp();
- getRidOfTemp2();
- getRidOfTemp3();
- es = data.word(kTraveltext);
- deallocateMem();
- return;
-quittravel:
- al = data.byte(kReallocation);
- data.byte(kNewlocation) = al;
- data.byte(kGetback) = 0;
- getRidOfTemp();
- getRidOfTemp2();
- getRidOfTemp3();
- es = data.word(kTraveltext);
- deallocateMem();
-}
-
void DreamGenContext::lookAtPlace() {
STACK_CHECK;
_cmp(data.byte(kCommandtype), 224);
@@ -4063,14 +3998,14 @@ void DreamGenContext::getDestInfo() {
push(ax);
dx = data;
es = dx;
- si = 1723;
+ si = 1661;
_add(si, ax);
cl = es.byte(si);
ax = pop();
push(cx);
dx = data;
es = dx;
- si = 1739;
+ si = 1677;
_add(si, ax);
ax = pop();
}
@@ -4144,7 +4079,7 @@ clearedlocations:
bx = ax;
dx = data;
es = dx;
- _add(bx, 1723);
+ _add(bx, 1661);
es.byte(bx) = 0;
}
@@ -4242,7 +4177,7 @@ void DreamGenContext::execCommand() {
es = cs;
bx = offset_comlist;
ds = cs;
- si = 1757;
+ si = 1695;
al = ds.byte(si);
_cmp(al, 0);
if (!flags.z())
@@ -4335,7 +4270,7 @@ dirroot:
si = offset_rootdir;
_inc(si);
es = cs;
- di = 1412;
+ di = 1350;
_inc(di);
cx = 12;
_movsb(cx, true);
@@ -4437,7 +4372,7 @@ notyetassigned:
push(bx);
_add(bx, 2);
ds = cs;
- si = 1757;
+ si = 1695;
checkpass:
_lodsw();
ah = es.byte(bx);
@@ -4508,7 +4443,7 @@ void DreamGenContext::read() {
return;
okcom:
es = cs;
- di = 1412;
+ di = 1350;
ax = data.word(kTextfile1);
data.word(kMonsource) = ax;
ds = ax;
@@ -4638,7 +4573,7 @@ keyok2:
ds = cs;
si = offset_operand1+1;
es = cs;
- di = 1412+1;
+ di = 1350+1;
cx = 12;
_movsb(cx, true);
monitorLogo();
@@ -4765,7 +4700,7 @@ void DreamGenContext::parser() {
al = '=';
_stosb();
ds = cs;
- si = 1757;
+ si = 1695;
notspace1:
_lodsw();
_cmp(al, 32);
@@ -6783,7 +6718,7 @@ void DreamGenContext::getNamePos() {
_mul(cx);
dx = data;
es = dx;
- bx = 1891;
+ bx = 1829;
_add(bx, ax);
al = data.byte(kCursorpos);
ah = 0;
@@ -6937,7 +6872,7 @@ void DreamGenContext::showNames() {
STACK_CHECK;
dx = data;
es = dx;
- si = 1891+1;
+ si = 1829+1;
di = (60)+21;
bx = (52)+10;
cl = 0;
@@ -7370,7 +7305,7 @@ void DreamGenContext::clearChanges() {
di = 0;
_stosw(cx, true);
es = cs;
- di = 1723;
+ di = 1661;
al = 1;
_stosb(2);
al = 0;
@@ -8023,81 +7958,81 @@ void DreamGenContext::__start() {
//0x0460: .... @... .... ....
0x40, 0x01, 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
//0x0470: @... ..|. ..@. ....
- 0xa0, 0xca, 0xff, 0xff, 0xee, 0x00, 0x02, 0x01, 0x04, 0x00, 0x2c, 0x00, 0xc8, 0xc4, 0x68, 0x00,
- //0x0480: .... .... ..,. ..h.
- 0x7c, 0x00, 0x04, 0x00, 0x2c, 0x00, 0xcc, 0xc4, 0x18, 0x01, 0x34, 0x01, 0x04, 0x00, 0x2c, 0x00,
- //0x0490: |... ,... ..4. ..,.
- 0xb0, 0xc4, 0x68, 0x00, 0xd8, 0x00, 0x8a, 0x00, 0xc0, 0x00, 0xd0, 0xc4, 0x11, 0x01, 0x40, 0x01,
- //0x04a0: ..h. .... .... ..@.
- 0x9d, 0x00, 0xc6, 0x00, 0x7c, 0xc4, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca,
- //0x04b0: .... |... @... ....
- 0xff, 0xff, 0x45, 0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45, 0x4c, 0x50,
- //0x04c0: ..EX IT HELP
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x04d0: LI ST
- 0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f, 0x4e, 0x20,
- //0x04e0: READ LO GON
- 0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00,
- //0x04f0: KEYS ..
- 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55, 0x42, 0x4c,
- //0x0500: PUBL IC PUBL
- 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43, 0x4b, 0x44,
- //0x0510: IC . ..BL ACKD
- 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0520: RAGO N RY AN
- 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0530: ... HEND RIX
- 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x53, 0x45,
- //0x0540: LOUI S . ..SE
- 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b, 0x45, 0x54,
- //0x0550: PTIM US BE CKET
- 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0560: T ...
- 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0570: ."R OOT
- 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0580: . "
- 0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0xba, 0x00, 0xca, 0x00, 0x9d, 0x00,
- //0x0590: .00 00.0 0... ....
- 0xad, 0x00, 0x1c, 0xc8, 0xf3, 0x00, 0x03, 0x01, 0x83, 0x00, 0x93, 0x00, 0x18, 0xc8, 0x0c, 0x01,
- //0x05a0: .... .... .... ....
- 0x1c, 0x01, 0xa8, 0x00, 0xb8, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00,
- //0x05b0: .... ..P. ..@. ....
- 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x34, 0xc8, 0x46, 0x00,
- //0x05c0: .... w... R... 4.F.
- 0x89, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x44, 0x00, 0x98, 0x00,
- //0x05d0: ..>. o... .... D...
- 0x4c, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00,
- //0x05e0: L... @... .... ..w.
- 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x44, 0xc8, 0x46, 0x00, 0x8b, 0x00, 0x3e, 0x00, 0x6f, 0x00,
- //0x05f0: ..R. ..D. F... >.o.
- 0x50, 0xc8, 0xec, 0x00, 0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0x00, 0x00, 0x40, 0x01,
- //0x0600: P... ..p. ..H. ..@.
- 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x81, 0x00, 0xb8,
- //0x0610: .... .... .... $...
- 0x00, 0x52, 0x00, 0x80, 0x00, 0xc0, 0xc8, 0x50, 0x00, 0x93, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80,
- //0x0620: .R.. ...P ...> .o..
- 0xc8, 0xb7, 0x00, 0xfa, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0xc4, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00,
- //0x0630: .... .>.o .... .@..
- 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52, 0x32, 0x34,
- //0x0640: .... ...S PEEC HR24
- 0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45, 0x43, 0x54,
- //0x0650: C000 5.RA W.OB JECT
- 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0660: NAM E ON E
+ 0xa0, 0xca, 0xff, 0xff, 0x45, 0x58, 0x49, 0x54, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x48, 0x45,
+ //0x0480: .... EXIT HE
+ 0x4c, 0x50, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x53, 0x54, 0x20, 0x20, 0x20, 0x20,
+ //0x0490: LP LIST
+ 0x20, 0x20, 0x52, 0x45, 0x41, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x4f, 0x47, 0x4f,
+ //0x04a0: RE AD LOGO
+ 0x4e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x4b, 0x45, 0x59, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x04b0: N KE YS
+ 0x01, 0x00, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x55,
+ //0x04c0: ..PU BLIC PU
+ 0x42, 0x4c, 0x49, 0x43, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x42, 0x4c, 0x41, 0x43,
+ //0x04d0: BLIC ... BLAC
+ 0x4b, 0x44, 0x52, 0x41, 0x47, 0x4f, 0x4e, 0x20, 0x52, 0x59, 0x41, 0x4e, 0x20, 0x20, 0x20, 0x20,
+ //0x04e0: KDRA GON RYAN
+ 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x48, 0x45, 0x4e, 0x44, 0x52, 0x49, 0x58, 0x20, 0x20, 0x20,
+ //0x04f0: . ..HE NDRI X
+ 0x20, 0x20, 0x4c, 0x4f, 0x55, 0x49, 0x53, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00,
+ //0x0500: LO UIS ...
+ 0x53, 0x45, 0x50, 0x54, 0x49, 0x4d, 0x55, 0x53, 0x20, 0x20, 0x20, 0x20, 0x42, 0x45, 0x43, 0x4b,
+ //0x0510: SEPT IMUS BECK
+ 0x45, 0x54, 0x54, 0x20, 0x20, 0x20, 0x20, 0x00, 0xff, 0xff, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x0520: ETT . ..
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x20, 0x20,
+ //0x0530: . "ROO T
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x0540: ."
+ 0x20, 0x20, 0x20, 0x00, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30, 0x00, 0xba, 0x00, 0xca, 0x00,
+ //0x0550: . 0000 .00. ....
+ 0x9d, 0x00, 0xad, 0x00, 0x1c, 0xc8, 0xf3, 0x00, 0x03, 0x01, 0x83, 0x00, 0x93, 0x00, 0x18, 0xc8,
+ //0x0560: .... .... .... ....
+ 0x0c, 0x01, 0x1c, 0x01, 0xa8, 0x00, 0xb8, 0x00, 0x50, 0xc7, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00,
+ //0x0570: .... .... P... @...
+ 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x34, 0xc8,
+ //0x0580: .... ..w. ..R. ..4.
+ 0x46, 0x00, 0x89, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0x80, 0xc8, 0xbc, 0x00, 0xfa, 0x00, 0x44, 0x00,
+ //0x0590: F... >.o. .... ..D.
+ 0x98, 0x00, 0x4c, 0xc8, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff,
+ //0x05a0: ..L. ..@. .... ....
+ 0x77, 0x00, 0xae, 0x00, 0x52, 0x00, 0x80, 0x00, 0x44, 0xc8, 0x46, 0x00, 0x8b, 0x00, 0x3e, 0x00,
+ //0x05b0: w... R... D.F. ..>.
+ 0x6f, 0x00, 0x50, 0xc8, 0xec, 0x00, 0xfc, 0x00, 0x70, 0x00, 0x80, 0x00, 0x48, 0xc8, 0x00, 0x00,
+ //0x05c0: o.P. .... p... H...
+ 0x40, 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x0d, 0x0a, 0x0d, 0x0a, 0x24, 0x81,
+ //0x05d0: @... .... .... ..$.
+ 0x00, 0xb8, 0x00, 0x52, 0x00, 0x80, 0x00, 0xc0, 0xc8, 0x50, 0x00, 0x93, 0x00, 0x3e, 0x00, 0x6f,
+ //0x05e0: ...R .... .P.. .>.o
+ 0x00, 0x80, 0xc8, 0xb7, 0x00, 0xfa, 0x00, 0x3e, 0x00, 0x6f, 0x00, 0xc4, 0xc8, 0x00, 0x00, 0x40,
+ //0x05f0: .... ...> .o.. ...@
+ 0x01, 0x00, 0x00, 0xc8, 0x00, 0xa0, 0xca, 0xff, 0xff, 0x53, 0x50, 0x45, 0x45, 0x43, 0x48, 0x52,
+ //0x0600: .... .... .SPE ECHR
+ 0x32, 0x34, 0x43, 0x30, 0x30, 0x30, 0x35, 0x2e, 0x52, 0x41, 0x57, 0x00, 0x4f, 0x42, 0x4a, 0x45,
+ //0x0610: 24C0 005. RAW. OBJE
+ 0x43, 0x54, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x4f, 0x4e, 0x45, 0x20, 0x20, 0x20, 0x20, 0x20,
+ //0x0620: CT N AME ONE
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
- //0x0670:
- 0x20, 0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x0680: .. .... .... ....
- 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00, 0x00, 0x00,
- //0x0690: .... .... ...D :...
+ //0x0630:
+ 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x12, 0x12, 0x11, 0x10, 0x10, 0x10, 0x01, 0x01, 0x01, 0x01,
+ //0x0640: .... .... ....
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x44, 0x3a, 0x00,
+ //0x0650: .... .... .... .D:.
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ //0x0660: .... .... .... ....
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
+ //0x0670: .... .... .... ....
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03,
+ //0x0680: .... .... .... ....
+ 0x02, 0x04, 0x01, 0x0a, 0x09, 0x08, 0x06, 0x0b, 0x04, 0x07, 0x07, 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, 0x01, 0x01, 0x00, 0x01, 0x00,
+ 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, 0x05, 0x00, 0x03, 0x02, 0x04,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x06c0: .... .... .... ....
- 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, 0x00,
//0x06d0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x06e0: .... .... .... ....
@@ -8105,31 +8040,23 @@ void DreamGenContext::__start() {
//0x06f0: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0700: .... .... .... ....
- 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,
//0x0710: .... .... .... ....
- 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,
//0x0720: .... .... .... ....
- 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,
//0x0730: .... .... .... ....
- 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,
//0x0740: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
+ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
//0x0750: .... .... .... ....
- 0xff, 0xff, 0xff, 0x02, 0x00, 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, 0x01,
//0x0760: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 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,
//0x0770: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 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,
//0x0780: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x0790: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x07a0: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x07b0: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01,
- //0x07c0: .... .... .... ....
- 0x01, 0x01, 0x01, 0x01, 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 ead391d0b6..595a0884eb 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -32,23 +32,22 @@
namespace DreamGen {
-static const uint16 offset_destlist = 0x0484;
-static const uint16 offset_rootdir = 0x0576;
-static const uint16 offset_opslist = 0x05c4;
-static const uint16 offset_speechfilename = 0x0647;
-static const uint16 offset_operand1 = 0x0568;
-static const uint16 offset_money2poke = 0x0597;
+static const uint16 offset_speechfile = 0x060f;
+static const uint16 offset_operand1 = 0x052a;
+static const uint16 offset_keys = 0x04c0;
+static const uint16 offset_comlist = 0x0484;
+static const uint16 offset_speechfilename = 0x0609;
+static const uint16 offset_discopslist = 0x05b0;
+static const uint16 offset_openchangesize = 0x044c;
+static const uint16 offset_money2poke = 0x0559;
+static const uint16 offset_diarylist = 0x055c;
static const uint16 offset_quitlist = 0x046e;
-static const uint16 offset_keys = 0x04fe;
-static const uint16 offset_decidelist = 0x061d;
-static const uint16 offset_discopslist = 0x05ee;
-static const uint16 offset_diarylist = 0x059a;
-static const uint16 offset_commandline = 0x065a;
-static const uint16 offset_comlist = 0x04c2;
-static const uint16 offset_speechfile = 0x064d;
+static const uint16 offset_rootdir = 0x0538;
+static const uint16 offset_decidelist = 0x05df;
+static const uint16 offset_money1poke = 0x0554;
+static const uint16 offset_commandline = 0x061c;
+static const uint16 offset_opslist = 0x0586;
static const uint16 offset_talklist = 0x044e;
-static const uint16 offset_openchangesize = 0x044c;
-static const uint16 offset_money1poke = 0x0592;
static const uint16 kStartvars = 0;
static const uint16 kProgresspoints = 1;
static const uint16 kWatchon = 2;
@@ -432,16 +431,16 @@ static const uint16 kVolumetabname = 1048;
static const uint16 kGungraphic = 1061;
static const uint16 kMonkface = 1074;
static const uint16 kTitle7graphics = 1087;
-static const uint16 kCurrentfile = 1412;
-static const uint16 kRoomscango = 1723;
-static const uint16 kRoompics = 1739;
-static const uint16 kOplist = 1754;
-static const uint16 kInputline = 1757;
-static const uint16 kPresslist = 1885;
-static const uint16 kSavenames = 1891;
-static const uint16 kQuitrequested = 2010;
-static const uint16 kSubtitles = 2011;
-static const uint16 kForeignrelease = 2012;
+static const uint16 kCurrentfile = 1350;
+static const uint16 kRoomscango = 1661;
+static const uint16 kRoompics = 1677;
+static const uint16 kOplist = 1692;
+static const uint16 kInputline = 1695;
+static const uint16 kPresslist = 1823;
+static const uint16 kSavenames = 1829;
+static const uint16 kQuitrequested = 1948;
+static const uint16 kSubtitles = 1949;
+static const uint16 kForeignrelease = 1950;
static const uint16 kBlocktextdat = (0);
static const uint16 kPersonframes = (0);
static const uint16 kDebuglevel1 = (0);
@@ -578,6 +577,7 @@ public:
void fadeScreenDownHalf();
void mouseCall();
void fadeDownMon();
+ void printmessage2();
void bartender();
void showDiary();
void outOfOpen();
@@ -623,7 +623,6 @@ public:
void cantDrop();
void copper();
void drinker();
- void nextColon();
void placeFreeObject();
void putUnderZoom();
void vSync();
@@ -660,7 +659,7 @@ public:
void showKeys();
void setKeyboardInt();
void priest();
- void printmessage2();
+ void nextColon();
void hangOnPQ();
void findOpenPos();
void describeOb();
@@ -748,7 +747,6 @@ public:
void parser();
void setMouse();
void showLoadOps();
- void selectLocation();
void underTextLine();
void showNames();
void saveFileRead();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 6d13ed6378..add7438bbd 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -1033,10 +1033,6 @@ uint16 DreamGenContext::allocateMem(uint16 paragraphs) {
return result;
}
-void DreamGenContext::deallocateMem() {
- deallocateMem((uint16)es);
-}
-
void DreamGenContext::deallocateMem(uint16 segment) {
debug(1, "deallocating segment %04x", segment);
deallocateSegment(segment);
@@ -1798,19 +1794,6 @@ void DreamGenContext::checkCoords() {
checkCoords(quitList);
break;
}
- case offset_destlist: {
- RectWithCallback destList[] = {
- { 238,258,4,44,&DreamGenContext::nextDest },
- { 104,124,4,44,&DreamGenContext::lastDest },
- { 280,308,4,44,&DreamGenContext::lookAtPlace },
- { 104,216,138,192,&DreamGenContext::destSelect },
- { 273,320,157,198,&DreamGenContext::getBack1 },
- { 0,320,0,200,&DreamGenContext::blank },
- { 0xFFFF,0,0,0,0 }
- };
- checkCoords(destList);
- break;
- }
case offset_diarylist: {
RectWithCallback diaryList[] = {
{ kDiaryx+94,kDiaryx+110,kDiaryy+97,kDiaryy+113,&DreamGenContext::diaryKeyN },
@@ -3841,4 +3824,65 @@ void DreamGenContext::dumpZoom() {
multiDump(kZoomx + 5, kZoomy + 4, 46, 40);
}
+void DreamGenContext::selectLocation() {
+ data.byte(kInmaparea) = 0;
+ clearBeforeLoad();
+ data.byte(kGetback) = 0;
+ data.byte(kPointerframe) = 22;
+ readCityPic();
+ showCity();
+ getRidOfTemp();
+ readDestIcon();
+ loadTravelText();
+ showPanel();
+ showMan();
+ showArrows();
+ showExit();
+ locationPic();
+ underTextLine();
+ data.byte(kCommandtype) = 255;
+ readMouse();
+ data.byte(kPointerframe) = 0;
+ showPointer();
+ workToScreen();
+ playChannel0(9, 255);
+ data.byte(kNewlocation) = 255;
+
+ while (data.byte(kNewlocation) == 255) {
+ if (quitRequested())
+ break;
+
+ delPointer();
+ readMouse();
+ showPointer();
+ vSync();
+ dumpPointer();
+ dumpTextLine();
+
+ if (data.byte(kGetback) == 1)
+ break;
+
+ RectWithCallback destList[] = {
+ { 238,258,4,44,&DreamGenContext::nextDest },
+ { 104,124,4,44,&DreamGenContext::lastDest },
+ { 280,308,4,44,&DreamGenContext::lookAtPlace },
+ { 104,216,138,192,&DreamGenContext::destSelect },
+ { 273,320,157,198,&DreamGenContext::getBack1 },
+ { 0,320,0,200,&DreamGenContext::blank },
+ { 0xFFFF,0,0,0,0 }
+ };
+ checkCoords(destList);
+ }
+
+ if (quitRequested() || data.byte(kGetback) == 1 || data.byte(kNewlocation) == data.byte(kLocation)) {
+ data.byte(kNewlocation) = data.byte(kReallocation);
+ data.byte(kGetback) = 0;
+ }
+
+ getRidOfTemp();
+ getRidOfTemp2();
+ getRidOfTemp3();
+ deallocateMem(data.word(kTraveltext));
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0e9d1e74a3..c7a276770f 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -29,7 +29,6 @@
void switchRyanOn();
void switchRyanOff();
uint16 allocateMem(uint16 paragraphs);
- void deallocateMem();
void deallocateMem(uint16 segment);
uint8 *textUnder();
uint16 standardLoad(const char *fileName, uint16 *outSizeInBytes = NULL); // Returns a segment handle which needs to be freed with deallocatemem for symmetry
@@ -565,5 +564,6 @@
void dumpSymBox();
void dumpZoom();
void fadeDOS();
+ void selectLocation();
#endif