mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-03 15:21:40 +00:00
DREAMWEB: Remove getDestInfo() from locationPic
This allows to move some more functions into DreamBase
This commit is contained in:
parent
95ffd7f4ce
commit
6dbc930b18
engines/dreamweb
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user