aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/newplace.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-25 19:48:49 +0200
committerFilippos Karapetis2011-12-25 19:48:49 +0200
commit6dbc930b18c43c12138d68c34a12bc015e28354d (patch)
tree38abbe92d187aa92039615cfd0914d0a5d930824 /engines/dreamweb/newplace.cpp
parent95ffd7f4ce2e0274b8adf87f03bc705b1d3a1ebd (diff)
downloadscummvm-rg350-6dbc930b18c43c12138d68c34a12bc015e28354d.tar.gz
scummvm-rg350-6dbc930b18c43c12138d68c34a12bc015e28354d.tar.bz2
scummvm-rg350-6dbc930b18c43c12138d68c34a12bc015e28354d.zip
DREAMWEB: Remove getDestInfo() from locationPic
This allows to move some more functions into DreamBase
Diffstat (limited to 'engines/dreamweb/newplace.cpp')
-rw-r--r--engines/dreamweb/newplace.cpp36
1 files changed, 16 insertions, 20 deletions
diff --git a/engines/dreamweb/newplace.cpp b/engines/dreamweb/newplace.cpp
index 027d7c1937..b2456ad2e1 100644
--- a/engines/dreamweb/newplace.cpp
+++ b/engines/dreamweb/newplace.cpp
@@ -24,7 +24,7 @@
namespace DreamGen {
-void DreamGenContext::newPlace() {
+void DreamBase::newPlace() {
if (data.byte(kNeedtotravel) == 1) {
data.byte(kNeedtotravel) = 0;
selectLocation();
@@ -34,8 +34,7 @@ void DreamGenContext::newPlace() {
}
}
-// TODO: Move to DreamBase once getDestInfo is moved
-void DreamGenContext::selectLocation() {
+void DreamBase::selectLocation() {
data.byte(kInmaparea) = 0;
clearBeforeLoad();
data.byte(kGetback) = 0;
@@ -142,7 +141,20 @@ void DreamBase::putUnderCentre() {
multiPut(mapStore(), 58, 72, 254, 110);
}
-// TODO: put Locationpic here
+void DreamBase::locationPic() {
+ byte destFlag = data.byte(553 + data.byte(kDestpos));
+ 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);
+}
// TODO: put Getdestinfo here
@@ -270,20 +282,4 @@ 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