aboutsummaryrefslogtreecommitdiff
path: root/engines
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
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')
-rw-r--r--engines/dreamweb/dreambase.h4
-rw-r--r--engines/dreamweb/newplace.cpp36
-rw-r--r--engines/dreamweb/stubs.h4
-rw-r--r--engines/dreamweb/use.cpp5
4 files changed, 22 insertions, 27 deletions
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index c14bfda7a1..e023d975a4 100644
--- a/engines/dreamweb/dreambase.h
+++ b/engines/dreamweb/dreambase.h
@@ -181,6 +181,9 @@ public:
void readCityPic();
void readDestIcon();
void showCity();
+ void locationPic();
+ void selectLocation();
+ void newPlace();
// from object.cpp
void obIcons();
@@ -569,6 +572,7 @@ public:
void edensCDPlayer();
void hotelBell();
void playGuitar();
+ void useElevator1();
void useElevator2();
void useElevator3();
void useElevator4();
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
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 98149f2b70..e447b705fb 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -123,7 +123,6 @@
void autoLook();
void doLook();
void enterSymbol();
- void useElevator1();
void useKey();
void useObject();
void singleKey(uint8 key, uint16 x, uint16 y);
@@ -162,7 +161,6 @@
void decide();
void showGun();
void endGame();
- void newPlace();
void monkSpeaking();
void rollEndCredits2();
void triggerMessage(uint16 index);
@@ -188,9 +186,7 @@
void inToInv();
void outOfInv();
void selectOpenOb();
- void selectLocation();
void reExFromInv();
- void locationPic();
void useOpened();
void outOfOpen();
void swapWithOpen();
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index 41b338e885..78dffc99ad 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -39,7 +39,7 @@ void DreamGenContext::useRoutine() {
static const UseListEntry kUseList[] = {
{ &DreamGenContext::useMon, "NETW" },
- { &DreamGenContext::useElevator1, "ELVA" },
+ { &DreamBase::useElevator1, "ELVA" },
{ &DreamBase::useElevator2, "ELVB" },
{ &DreamBase::useElevator3, "ELVC" },
{ &DreamBase::useElevator4, "ELVE" },
@@ -242,8 +242,7 @@ void DreamBase::playGuitar() {
putBackObStuff();
}
-// TODO: Move to DreamBase once selectLocation (in reality, getDestInfo) is moved
-void DreamGenContext::useElevator1() {
+void DreamBase::useElevator1() {
showFirstUse();
selectLocation();
data.byte(kGetback) = 1;