aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-18 21:07:27 +0200
committerFilippos Karapetis2011-12-18 21:07:27 +0200
commit0cd53d5d3e6324869adf145047c65d2ef93e8b7f (patch)
tree6c823a143d14f34c67f32b9ffb707d117def7704 /engines/dreamweb
parent5843fc11579150313b90ead919a8805081839f06 (diff)
downloadscummvm-rg350-0cd53d5d3e6324869adf145047c65d2ef93e8b7f.tar.gz
scummvm-rg350-0cd53d5d3e6324869adf145047c65d2ef93e8b7f.tar.bz2
scummvm-rg350-0cd53d5d3e6324869adf145047c65d2ef93e8b7f.zip
DREAMWEB: Port 'lookatplace' to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp71
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/stubs.cpp32
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 33 insertions, 72 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index f97eba4166..be1bfa6d96 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -1647,77 +1647,6 @@ endheartalk:
data.byte(kPointermode) = 0;
}
-void DreamGenContext::lookAtPlace() {
- STACK_CHECK;
- _cmp(data.byte(kCommandtype), 224);
- if (flags.z())
- goto alreadyinfo;
- data.byte(kCommandtype) = 224;
- al = 27;
- commandOnly();
-alreadyinfo:
- ax = data.word(kMousebutton);
- _and(ax, 1);
- if (flags.z())
- return /* (noinfo) */;
- _cmp(ax, data.word(kOldbutton));
- if (flags.z())
- return /* (noinfo) */;
- bl = data.byte(kDestpos);
- _cmp(bl, 15);
- if (!flags.c())
- return /* (noinfo) */;
- push(bx);
- delPointer();
- delTextLine();
- getUnderCentre();
- ds = data.word(kTempgraphics3);
- al = 0;
- ah = 0;
- di = 60;
- bx = 72;
- showFrame();
- al = 4;
- ah = 0;
- di = 60;
- bx = 72+55;
- showFrame();
- _cmp(data.byte(kForeignrelease), 0);
- if (flags.z())
- goto _tmp1;
- al = 4;
- ah = 0;
- di = 60;
- bx = 72+55+21;
- showFrame();
-_tmp1:
- bx = pop();
- bh = 0;
- _add(bx, bx);
- es = data.word(kTraveltext);
- si = es.word(bx);
- _add(si, (66*2));
- findNextColon();
- di = 63;
- bx = 84;
- _cmp(data.byte(kForeignrelease), 0);
- if (flags.z())
- goto _tmp2;
- bx = 84+4;
-_tmp2:
- dl = 191;
- al = 0;
- ah = 0;
- printDirect();
- workToScreenM();
- cx = 500;
- hangOnP();
- data.byte(kPointermode) = 0;
- data.byte(kPointerframe) = 0;
- putUnderCentre();
- workToScreenM();
-}
-
void DreamGenContext::locationPic() {
STACK_CHECK;
getDestInfo();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index fb965156f3..77e3abdcc9 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -491,7 +491,6 @@ public:
void findOpenPos();
void searchForSame();
void rollEm();
- void lookAtPlace();
void findAllOpen();
void fillOpen();
void getEitherAd();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 98d961ef2b..6989a57a93 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4584,4 +4584,36 @@ void DreamGenContext::showDiaryKeys() {
showDiaryPage();
}
+void DreamGenContext::lookAtPlace() {
+ if (data.byte(kCommandtype) != 224) {
+ data.byte(kCommandtype) = 224;
+ commandOnly(27);
+ }
+
+ if (!(data.word(kMousebutton) & 1) ||
+ data.word(kMousebutton) == data.word(kOldbutton) ||
+ data.byte(kDestpos) >= 15)
+ return; // noinfo
+
+ delPointer();
+ delTextLine();
+ getUnderCentre();
+ showFrame(tempGraphics3(), 60, 72, 0, 0);
+ showFrame(tempGraphics3(), 60, 72 + 55, 4, 0);
+ if (data.byte(kForeignrelease))
+ showFrame(tempGraphics3(), 60, 72+55+21, 4, 0);
+
+ uint16 offset = kTextstart + getSegment(data.word(kTraveltext)).word(data.byte(kDestpos) * 2);
+ const uint8 *string = getSegment(data.word(kTraveltext)).ptr(offset, 0);
+ findNextColon(&string);
+ uint16 y = (data.byte(kForeignrelease)) ? 84 + 4 : 84;
+ printDirect(&string, 63, &y, 191, 191 & 1);
+ workToScreenM();
+ hangOnP(500);
+ data.byte(kPointermode) = 0;
+ data.byte(kPointerframe) = 0;
+ putUnderCentre();
+ workToScreenM();
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index bb86175b0d..3ab7cfbb11 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -374,5 +374,6 @@
DreamBase::deleteExText(textNum);
}
void signOn();
+ void lookAtPlace();
#endif