aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp131
-rw-r--r--engines/dreamweb/dreamgen.h1
-rw-r--r--engines/dreamweb/stubs.cpp84
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 82 insertions, 135 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 76fbf92d83..f449b8f38e 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -5029,137 +5029,6 @@ nomatchslot:
goto slotloop;
}
-void DreamGenContext::entryAnims() {
- STACK_CHECK;
- data.word(kReeltowatch) = -1;
- data.byte(kWatchmode) = -1;
- _cmp(data.byte(kLocation), 33);
- if (!flags.z())
- goto notinthebeach;
- switchRyanOff();
- data.word(kWatchingtime) = 76*2;
- data.word(kReeltowatch) = 0;
- data.word(kEndwatchreel) = 76;
- data.byte(kWatchspeed) = 1;
- data.byte(kSpeedcount) = 1;
- return;
-notinthebeach:
- _cmp(data.byte(kLocation), 44);
- if (!flags.z())
- goto notsparkys;
- al = 8;
- resetLocation();
- data.word(kWatchingtime) = 50*2;
- data.word(kReeltowatch) = 247;
- data.word(kEndwatchreel) = 297;
- data.byte(kWatchspeed) = 1;
- data.byte(kSpeedcount) = 1;
- switchRyanOff();
- return;
-notsparkys:
- _cmp(data.byte(kLocation), 22);
- if (!flags.z())
- goto notinthelift;
- data.word(kWatchingtime) = 31*2;
- data.word(kReeltowatch) = 0;
- data.word(kEndwatchreel) = 30;
- data.byte(kWatchspeed) = 1;
- data.byte(kSpeedcount) = 1;
- switchRyanOff();
- return;
-notinthelift:
- _cmp(data.byte(kLocation), 26);
- if (!flags.z())
- goto notunderchurch;
- data.byte(kSymboltopnum) = 2;
- data.byte(kSymbolbotnum) = 1;
- return;
-notunderchurch:
- _cmp(data.byte(kLocation), 45);
- if (!flags.z())
- goto notenterdream;
- data.byte(kKeeperflag) = 0;
- data.word(kWatchingtime) = 296;
- data.word(kReeltowatch) = 45;
- data.word(kEndwatchreel) = 198;
- data.byte(kWatchspeed) = 1;
- data.byte(kSpeedcount) = 1;
- switchRyanOff();
- return;
-notenterdream:
- _cmp(data.byte(kReallocation), 46);
- if (!flags.z())
- goto notcrystal;
- _cmp(data.byte(kSartaindead), 1);
- if (!flags.z())
- goto notcrystal;
- al = 0;
- removeFreeObject();
- return;
-notcrystal:
- _cmp(data.byte(kLocation), 9);
- if (!flags.z())
- goto nottopchurch;
- al = 2;
- checkIfPathIsOn();
- if (flags.z())
- goto nottopchurch;
- _cmp(data.byte(kAidedead), 0);
- if (flags.z())
- goto nottopchurch;
- al = 3;
- checkIfPathIsOn();
- if (!flags.z())
- goto makedoorsopen;
- al = 2;
- turnPathOn();
-makedoorsopen:
- al = 4;
- removeSetObject();
- al = 5;
- placeSetObject();
- return;
-nottopchurch:
- _cmp(data.byte(kLocation), 47);
- if (!flags.z())
- goto notdreamcentre;
- al = 4;
- placeSetObject();
- al = 5;
- placeSetObject();
- return;
-notdreamcentre:
- _cmp(data.byte(kLocation), 38);
- if (!flags.z())
- goto notcarpark;
- data.word(kWatchingtime) = 57*2;
- data.word(kReeltowatch) = 4;
- data.word(kEndwatchreel) = 57;
- data.byte(kWatchspeed) = 1;
- data.byte(kSpeedcount) = 1;
- switchRyanOff();
- return;
-notcarpark:
- _cmp(data.byte(kLocation), 32);
- if (!flags.z())
- goto notalley;
- data.word(kWatchingtime) = 66*2;
- data.word(kReeltowatch) = 0;
- data.word(kEndwatchreel) = 66;
- data.byte(kWatchspeed) = 1;
- data.byte(kSpeedcount) = 1;
- switchRyanOff();
- return;
-notalley:
- _cmp(data.byte(kLocation), 24);
- if (!flags.z())
- return /* (notedensagain) */;
- al = 2;
- ah = data.byte(kRoomnum);
- _dec(ah);
- turnAnyPathOn();
-}
-
void DreamGenContext::clearBuffers() {
STACK_CHECK;
es = data.word(kBuffers);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index c0c7407f3f..337a33152c 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -522,7 +522,6 @@ public:
void inToInv();
void adjustLeft();
void deleteExText();
- void entryAnims();
void getFreeAd();
void removeObFromInv();
void heavy();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index e4c9a7514d..20d2b64268 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -4349,13 +4349,13 @@ void DreamBase::entryTexts() {
case 31:
setupTimedUse(30, 60, 11, 68, 64);
break;
- case 20:
+ case 20: // Sarter's 2
setupTimedUse(31, 60, 11, 68, 64);
break;
- case 24:
+ case 24: // Eden's lobby
setupTimedUse(32, 60, 3, 68, 64);
break;
- case 34:
+ case 34: // Eden 2
setupTimedUse(33, 60, 3, 68, 64);
break;
default:
@@ -4363,4 +4363,82 @@ void DreamBase::entryTexts() {
}
}
+void DreamGenContext::entryAnims() {
+ data.word(kReeltowatch) = 0xFFFF;
+ data.byte(kWatchmode) = (byte)-1;
+
+ switch (data.byte(kLocation)) {
+ case 33: // beach
+ switchRyanOff();
+ data.word(kWatchingtime) = 76 * 2;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 76;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ break;
+ case 44: // Sparky's
+ al = 8;
+ resetLocation();
+ data.word(kWatchingtime) = 50*2;
+ data.word(kReeltowatch) = 247;
+ data.word(kEndwatchreel) = 297;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchRyanOff();
+ break;
+ case 22: // lift
+ data.word(kWatchingtime) = 31 * 2;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 30;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchRyanOff();
+ break;
+ case 26: // under church
+ data.byte(kSymboltopnum) = 2;
+ data.byte(kSymbolbotnum) = 1;
+ break;
+ case 45: // entered Dreamweb
+ data.byte(kKeeperflag) = 0;
+ data.word(kWatchingtime) = 296;
+ data.word(kReeltowatch) = 45;
+ data.word(kEndwatchreel) = 198;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchRyanOff();
+ break;
+ default:
+ if (data.byte(kReallocation) == 46 && data.byte(kSartaindead) == 1) { // Crystal
+ removeFreeObject(0);
+ } else if (data.byte(kLocation) == 9 && checkIfPathIsOn(2) && data.byte(kAidedead) == 0) {
+ // Top of church
+ if (checkIfPathIsOn(3))
+ turnPathOn(2);
+
+ // Make doors open
+ removeSetObject(4);
+ placeSetObject(5);
+ } else if (data.byte(kLocation) == 47) { // Dream centre
+ placeSetObject(4);
+ placeSetObject(5);
+ } else if (data.byte(kLocation) == 38) { // Car park
+ data.word(kWatchingtime) = 57 * 2;
+ data.word(kReeltowatch) = 4;
+ data.word(kEndwatchreel) = 57;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchRyanOff();
+ } else if (data.byte(kLocation) == 32) { // Alley
+ data.word(kWatchingtime) = 66 * 2;
+ data.word(kReeltowatch) = 0;
+ data.word(kEndwatchreel) = 66;
+ data.byte(kWatchspeed) = 1;
+ data.byte(kSpeedcount) = 1;
+ switchRyanOff();
+ } else if (data.byte(kLocation) == 24) { // Eden's again
+ turnAnyPathOn(2, data.byte(kRoomnum) - 1);
+ }
+ }
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 661eba3633..ca1b68f219 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -568,5 +568,6 @@
void autoAppear();
void quitKey();
void setupTimedUse();
+ void entryAnims();
#endif