aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/newplace.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-25 16:33:30 +0200
committerFilippos Karapetis2011-12-25 16:33:30 +0200
commite322d6257dae83761c86c9d5bfbc7d02c0a9988d (patch)
treecbf4ce9441c773811acc8ddff69cbdb1602814c5 /engines/dreamweb/newplace.cpp
parent3802b21183b148f1c8d43cc8d2e550afed6e9e6a (diff)
downloadscummvm-rg350-e322d6257dae83761c86c9d5bfbc7d02c0a9988d.tar.gz
scummvm-rg350-e322d6257dae83761c86c9d5bfbc7d02c0a9988d.tar.bz2
scummvm-rg350-e322d6257dae83761c86c9d5bfbc7d02c0a9988d.zip
DREAMWEB: Port 'locationpic', 'reexfrominv' to C++
Diffstat (limited to 'engines/dreamweb/newplace.cpp')
-rw-r--r--engines/dreamweb/newplace.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp
index 69e452865e..027d7c1937 100644
--- a/engines/dreamweb/newplace.cpp
+++ b/engines/dreamweb/newplace.cpp
@@ -34,7 +34,7 @@ void DreamGenContext::newPlace() {
}
}
-// TODO: Move to DreamBase once locationPic is moved
+// TODO: Move to DreamBase once getDestInfo is moved
void DreamGenContext::selectLocation() {
data.byte(kInmaparea) = 0;
clearBeforeLoad();
@@ -270,6 +270,20 @@ void DreamBase::readCityPic() {
loadIntoTemp("DREAMWEB.G04");
}
+void DreamGenContext::locationPic() {
+ getDestInfo();
+ byte destFlag = es.byte(si);
+ if (destFlag >= 6)
+ showFrame(tempGraphics2(), 104, 138 + 14, destFlag - 6, 0); // Second slot
+ else
+ showFrame(tempGraphics(), 104, 138 + 14, destFlag + 4, 0);
+
+ if (data.byte(kDestpos) == data.byte(kReallocation))
+ showFrame(tempGraphics(), 104, 140 + 14, 3, 0); // Currently in this location
+ uint16 offset = kTextstart + getSegment(data.word(kTraveltext)).word(data.byte(kDestpos) * 2);
+ const uint8 *string = getSegment(data.word(kTraveltext)).ptr(offset, 0);
+ DreamBase::printDirect(string, 50, 20, 241, 241 & 1);
+}
} // End of namespace DreamGen