aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb
diff options
context:
space:
mode:
authorD G Turner2011-12-05 18:50:34 +0000
committerD G Turner2011-12-05 18:50:34 +0000
commitc51e97c51702a48b35b5ee4e226e82d65d3000cf (patch)
tree9260399d397491f677e5d585617efb16ea6c6a7e /engines/dreamweb
parent411892d848be30ef36a76aa55ec675fc809a5bf4 (diff)
downloadscummvm-rg350-c51e97c51702a48b35b5ee4e226e82d65d3000cf.tar.gz
scummvm-rg350-c51e97c51702a48b35b5ee4e226e82d65d3000cf.tar.bz2
scummvm-rg350-c51e97c51702a48b35b5ee4e226e82d65d3000cf.zip
DREAMWEB: 'intro' ported to C++
Diffstat (limited to 'engines/dreamweb')
-rw-r--r--engines/dreamweb/dreamgen.cpp48
-rw-r--r--engines/dreamweb/dreamgen.h5
-rw-r--r--engines/dreamweb/stubs.cpp56
-rw-r--r--engines/dreamweb/stubs.h1
4 files changed, 59 insertions, 51 deletions
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 3ea063adc6..635aecf782 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -2396,54 +2396,6 @@ void DreamGenContext::gettingShot() {
clearBeforeLoad();
}
-void DreamGenContext::intro() {
- STACK_CHECK;
- dx = 1035;
- loadTempText();
- loadPalFromIFF();
- setMode();
- data.byte(kNewlocation) = 50;
- clearPalette();
- loadIntroRoom();
- data.byte(kVolume) = 7;
- data.byte(kVolumedirection) = -1;
- data.byte(kVolumeto) = 4;
- al = 12;
- ah = 255;
- playChannel0();
- fadeScreenUps();
- runIntroSeq();
- _cmp(data.byte(kLasthardkey), 1);
- if (flags.z())
- goto introearly;
- clearBeforeLoad();
- data.byte(kNewlocation) = 52;
- loadIntroRoom();
- runIntroSeq();
- _cmp(data.byte(kLasthardkey), 1);
- if (flags.z())
- goto introearly;
- clearBeforeLoad();
- data.byte(kNewlocation) = 53;
- loadIntroRoom();
- runIntroSeq();
- _cmp(data.byte(kLasthardkey), 1);
- if (flags.z())
- goto introearly;
- clearBeforeLoad();
- allPalette();
- data.byte(kNewlocation) = 54;
- loadIntroRoom();
- runIntroSeq();
- _cmp(data.byte(kLasthardkey), 1);
- if (flags.z())
- goto introearly;
- getRidOfTempText();
- clearBeforeLoad();
-introearly:
- data.byte(kLasthardkey) = 0;
-}
-
void DreamGenContext::runIntroSeq() {
STACK_CHECK;
data.byte(kGetback) = 0;
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 1895d6e814..475f20a0f3 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -578,7 +578,6 @@ public:
void introMonks1();
void resetLocation();
void introMonks2();
- void advisor();
void additionalText();
void useElevator5();
void useElevator4();
@@ -660,7 +659,7 @@ public:
void lockLightOff();
void wearWatch();
void runIntroSeq();
- void nextColon();
+ void advisor();
void attendant();
void monks2text();
void clearPalette();
@@ -669,6 +668,7 @@ public:
void openHotelDoor();
void blank();
void drinker();
+ void nextColon();
void placeFreeObject();
void allPalette();
void adjustRight();
@@ -878,7 +878,6 @@ public:
void inToInv();
void parser();
void setMouse();
- void intro();
void fadeScreenDowns();
void openHotelDoor2();
void selectLocation();
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 9c879eb968..ab28503605 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3336,5 +3336,61 @@ void DreamGenContext::realCredits() {
data.byte(kLasthardkey) = 0;
}
+void DreamGenContext::intro() {
+ loadTempText("DREAMWEB.T82");
+ loadPalFromIFF();
+ setMode();
+ data.byte(kNewlocation) = 50;
+ clearPalette();
+ loadIntroRoom();
+ data.byte(kVolume) = 7;
+ data.byte(kVolumedirection) = -1;
+ data.byte(kVolumeto) = 4;
+ playChannel0(12, 255);
+ fadeScreenUps();
+ runIntroSeq();
+
+ if (data.byte(kLasthardkey) == 1) {
+ data.byte(kLasthardkey) = 0;
+ return; // "introearly"
+ }
+
+ clearBeforeLoad();
+ data.byte(kNewlocation) = 52;
+ loadIntroRoom();
+ runIntroSeq();
+
+ if (data.byte(kLasthardkey) == 1) {
+ data.byte(kLasthardkey) = 0;
+ return; // "introearly"
+ }
+
+ clearBeforeLoad();
+ data.byte(kNewlocation) = 53;
+ loadIntroRoom();
+ runIntroSeq();
+
+ if (data.byte(kLasthardkey) == 1) {
+ data.byte(kLasthardkey) = 0;
+ return; // "introearly"
+ }
+
+ clearBeforeLoad();
+ allPalette();
+ data.byte(kNewlocation) = 54;
+ loadIntroRoom();
+ runIntroSeq();
+
+ if (data.byte(kLasthardkey) == 1) {
+ data.byte(kLasthardkey) = 0;
+ return; // "introearly"
+ }
+
+ getRidOfTempText();
+ clearBeforeLoad();
+
+ data.byte(kLasthardkey) = 0;
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 36b9ca6fbc..8ee093d253 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -453,5 +453,6 @@
void showPCX();
void bibleQuote();
void realCredits();
+ void intro();
#endif