aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-25 21:00:30 +0200
committerFilippos Karapetis2011-12-25 21:00:30 +0200
commite27a5931c811681590ced5df290e0c16f52aecc4 (patch)
treeae1ddf0e2ec506cac6397172a2c4ad912af9ef2e /engines/dreamweb
parent6dbc930b18c43c12138d68c34a12bc015e28354d (diff)
downloadscummvm-rg350-e27a5931c811681590ced5df290e0c16f52aecc4.tar.gz
scummvm-rg350-e27a5931c811681590ced5df290e0c16f52aecc4.tar.bz2
scummvm-rg350-e27a5931c811681590ced5df290e0c16f52aecc4.zip
DREAMWEB: Remove getdestinfo() and access the roomPics array directly in locationPic()
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp31
-rw-r--r--engines/dreamweb/dreamgen.h14
-rw-r--r--engines/dreamweb/newplace.cpp21
3 files changed, 19 insertions, 47 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 3ab3a66f55..f71ced9057 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -475,25 +475,6 @@ void DreamGenContext::transferConToEx() {
ds.byte(si+2) = 255;
}
-void DreamGenContext::getDestInfo() {
- STACK_CHECK;
- al = data.byte(kDestpos);
- ah = 0;
- push(ax);
- dx = data;
- es = dx;
- si = 537;
- _add(si, ax);
- cl = es.byte(si);
- ax = pop();
- push(cx);
- dx = data;
- es = dx;
- si = 553;
- _add(si, ax);
- ax = pop();
-}
-
void DreamGenContext::dirCom() {
STACK_CHECK;
cx = 30;
@@ -767,7 +748,7 @@ void DreamGenContext::parser() {
al = '=';
_stosb();
ds = cs;
- si = 571;
+ si = 556;
notspace1:
_lodsw();
_cmp(al, 32);
@@ -952,9 +933,9 @@ void DreamGenContext::__start() {
//0x0200: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
//0x0210: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x02, 0x04, 0x01, 0x0a,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0220: .... .... .... ....
- 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, 0x00, 0x00,
//0x0230: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0240: .... .... .... ....
@@ -968,11 +949,9 @@ void DreamGenContext::__start() {
//0x0280: .... .... .... ....
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//0x0290: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
//0x02a0: .... .... .... ....
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff,
- //0x02b0: .... .... .... ....
- 0xff, 0x00, 0x00, 0x00, };
+ 0xff, 0xff, 0x00, 0x00, 0x00, };
ds.assign(src, src + sizeof(src));
dreamweb();
}
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index cd65c723a7..7247bedf74 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -346,13 +346,12 @@ static const uint16 kRoomssample = 420;
static const uint16 kBasicsample = 421;
static const uint16 kCurrentfile = 462;
static const uint16 kRoomscango = 537;
-static const uint16 kRoompics = 553;
-static const uint16 kOplist = 568;
-static const uint16 kInputline = 571;
-static const uint16 kPresslist = 699;
-static const uint16 kQuitrequested = 705;
-static const uint16 kSubtitles = 706;
-static const uint16 kForeignrelease = 707;
+static const uint16 kOplist = 553;
+static const uint16 kInputline = 556;
+static const uint16 kPresslist = 684;
+static const uint16 kQuitrequested = 690;
+static const uint16 kSubtitles = 691;
+static const uint16 kForeignrelease = 692;
static const uint16 kBlocktextdat = (0);
static const uint16 kPersonframes = (0);
static const uint16 kDebuglevel1 = (0);
@@ -469,7 +468,6 @@ public:
void getEitherAd();
void dreamweb();
void findPathOfPoint();
- void getDestInfo();
void read();
void searchForString();
void searchForFiles();
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp
index b2456ad2e1..e311f44ccc 100644
--- a/engines/dreamweb/newplace.cpp
+++ b/engines/dreamweb/newplace.cpp
@@ -142,11 +142,13 @@ void DreamBase::putUnderCentre() {
}
void DreamBase::locationPic() {
- byte destFlag = data.byte(553 + data.byte(kDestpos));
- if (destFlag >= 6)
- showFrame(tempGraphics2(), 104, 138 + 14, destFlag - 6, 0); // Second slot
+ const int roomPics[] = { 5, 0, 3, 2, 4, 1, 10, 9, 8, 6, 11, 4, 7, 7, 0 };
+ byte picture = roomPics[data.byte(kDestpos)];
+
+ if (picture >= 6)
+ showFrame(tempGraphics2(), 104, 138 + 14, picture - 6, 0); // Second slot
else
- showFrame(tempGraphics(), 104, 138 + 14, destFlag + 4, 0);
+ showFrame(tempGraphics(), 104, 138 + 14, picture + 4, 0);
if (data.byte(kDestpos) == data.byte(kReallocation))
showFrame(tempGraphics(), 104, 140 + 14, 3, 0); // Currently in this location
@@ -156,8 +158,6 @@ void DreamBase::locationPic() {
DreamBase::printDirect(string, 50, 20, 241, 241 & 1);
}
-// TODO: put Getdestinfo here
-
void DreamBase::showArrows() {
showFrame(tempGraphics(), 116 - 12, 16, 0, 0);
showFrame(tempGraphics(), 226 + 12, 16, 1, 0);
@@ -177,9 +177,7 @@ void DreamGenContext::nextDest() {
data.byte(kDestpos)++;
if (data.byte(kDestpos) == 15)
data.byte(kDestpos) = 0; // last destination
-
- getDestInfo();
- } while (al == 0);
+ } while (!data.byte(kRoomscango + data.byte(kDestpos)));
data.byte(kNewtextline) = 1;
delTextLine();
@@ -208,9 +206,7 @@ void DreamGenContext::lastDest() {
data.byte(kDestpos)--;
if (data.byte(kDestpos) == 0xFF)
data.byte(kDestpos) = 15; // first destination
-
- getDestInfo();
- } while (al == 0);
+ } while (!data.byte(kRoomscango + data.byte(kDestpos)));
data.byte(kNewtextline) = 1;
delTextLine();
@@ -235,7 +231,6 @@ void DreamGenContext::destSelect() {
if (!(data.word(kMousebutton) & 1) || data.word(kOldbutton) == 1)
return; // notrav
- getDestInfo();
data.byte(kNewlocation) = data.byte(kDestpos);
}