aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/dreamweb/dreamgen.cpp58
-rw-r--r--engines/dreamweb/dreamgen.h2
-rw-r--r--engines/dreamweb/newplace.cpp16
-rw-r--r--engines/dreamweb/object.cpp8
-rw-r--r--engines/dreamweb/stubs.cpp1
-rw-r--r--engines/dreamweb/stubs.h2
-rw-r--r--engines/dreamweb/use.cpp2
7 files changed, 27 insertions, 62 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index bca2232267..55ab3755af 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -284,16 +284,6 @@ findopen2a:
goto findopen1a;
}
-void DreamGenContext::reExFromInv() {
- STACK_CHECK;
- findInvPos();
- ax = es.word(bx);
- data.byte(kCommandtype) = ah;
- data.byte(kCommand) = al;
- data.byte(kExamagain) = 1;
- data.byte(kPointermode) = 0;
-}
-
void DreamGenContext::swapWithInv() {
STACK_CHECK;
al = data.byte(kItemframe);
@@ -881,54 +871,6 @@ cantpurge2:
goto lookforpurge2;
}
-void DreamGenContext::locationPic() {
- STACK_CHECK;
- getDestInfo();
- al = es.byte(si);
- push(es);
- push(si);
- di = 0;
- _cmp(al, 6);
- if (!flags.c())
- goto secondlot;
- ds = data.word(kTempgraphics);
- _add(al, 4);
- goto gotgraphic;
-secondlot:
- _sub(al, 6);
- ds = data.word(kTempgraphics2);
-gotgraphic:
- _add(di, 104);
- bx = 138+14;
- ah = 0;
- showFrame();
- si = pop();
- es = pop();
- al = data.byte(kDestpos);
- _cmp(al, data.byte(kReallocation));
- if (!flags.z())
- goto notinthisone;
- al = 3;
- di = 104;
- bx = 140+14;
- ds = data.word(kTempgraphics);
- ah = 0;
- showFrame();
-notinthisone:
- bl = data.byte(kDestpos);
- bh = 0;
- _add(bx, bx);
- es = data.word(kTraveltext);
- si = es.word(bx);
- _add(si, (66*2));
- di = 50;
- bx = 20;
- dl = 241;
- al = 0;
- ah = 0;
- printDirect();
-}
-
void DreamGenContext::getDestInfo() {
STACK_CHECK;
al = data.byte(kDestpos);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index db9a8c2eeb..ffefa0dd3e 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -461,7 +461,6 @@ public:
void getFreeAd();
void dirFile();
void pickupConts();
- void reExFromInv();
void transferMap();
void purgeAnItem();
void getSetAd();
@@ -471,7 +470,6 @@ public:
void fillOpen();
void getEitherAd();
void useOpened();
- void locationPic();
void swapWithOpen();
void dreamweb();
void findPathOfPoint();
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
diff --git a/engines/dreamweb/object.cpp b/engines/dreamweb/object.cpp
index dff58050a5..9d81825964 100644
--- a/engines/dreamweb/object.cpp
+++ b/engines/dreamweb/object.cpp
@@ -826,4 +826,12 @@ void DreamGenContext::selectOpenOb() {
delPointer();
}
+void DreamGenContext::reExFromInv() {
+ uint16 objectId = getSegment(data.word(kBuffers)).word(findInvPosCPP());
+ data.byte(kCommandtype) = objectId >> 8;
+ data.byte(kCommand) = objectId & 0x00FF;
+ data.byte(kExamagain) = 1;
+ data.byte(kPointermode) = 0;
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 2ad4af89b9..3a0ca79a1d 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3700,4 +3700,5 @@ void DreamBase::incRyanPage() {
delPointer();
}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 0c764a4495..a4fcbf761d 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -193,5 +193,7 @@
void outOfInv();
void selectOpenOb();
void selectLocation();
+ void reExFromInv();
+ void locationPic();
#endif
diff --git a/engines/dreamweb/use.cpp b/engines/dreamweb/use.cpp
index eeda27780c..41b338e885 100644
--- a/engines/dreamweb/use.cpp
+++ b/engines/dreamweb/use.cpp
@@ -242,7 +242,7 @@ void DreamBase::playGuitar() {
putBackObStuff();
}
-// TODO: Move to DreamBase once selectLocation (in reality, locationPic) is moved
+// TODO: Move to DreamBase once selectLocation (in reality, getDestInfo) is moved
void DreamGenContext::useElevator1() {
showFirstUse();
selectLocation();