[Scummvm-cvs-logs] scummvm master -> 6dbc930b18c43c12138d68c34a12bc015e28354d
bluegr
md5 at scummvm.org
Sun Dec 25 18:49:36 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6dbc930b18 DREAMWEB: Remove getDestInfo() from locationPic
Commit: 6dbc930b18c43c12138d68c34a12bc015e28354d
https://github.com/scummvm/scummvm/commit/6dbc930b18c43c12138d68c34a12bc015e28354d
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-25T09:48:49-08:00
Commit Message:
DREAMWEB: Remove getDestInfo() from locationPic
This allows to move some more functions into DreamBase
Changed paths:
engines/dreamweb/dreambase.h
engines/dreamweb/newplace.cpp
engines/dreamweb/stubs.h
engines/dreamweb/use.cpp
diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h
index c14bfda..e023d97 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 027d7c1..b2456ad 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 98149f2..e447b70 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 41b338e..78dffc9 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;
More information about the Scummvm-git-logs
mailing list