Skip to content

Commit

Permalink
DREAMWEB: 'intro' ported to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
digitall committed Dec 5, 2011
1 parent 411892d commit c51e97c
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 51 deletions.
1 change: 1 addition & 0 deletions devtools/tasmrecover/tasm-recover
Expand Up @@ -304,6 +304,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'initman',
'initrain',
'input',
'intro',
'inventory',
'isitdescribed',
'isitright',
Expand Down
48 changes: 0 additions & 48 deletions engines/dreamweb/dreamgen.cpp
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions engines/dreamweb/dreamgen.h
Expand Up @@ -578,7 +578,6 @@ class DreamGenContext : public Context {
void introMonks1();
void resetLocation();
void introMonks2();
void advisor();
void additionalText();
void useElevator5();
void useElevator4();
Expand Down Expand Up @@ -660,7 +659,7 @@ class DreamGenContext : public Context {
void lockLightOff();
void wearWatch();
void runIntroSeq();
void nextColon();
void advisor();
void attendant();
void monks2text();
void clearPalette();
Expand All @@ -669,6 +668,7 @@ class DreamGenContext : public Context {
void openHotelDoor();
void blank();
void drinker();
void nextColon();
void placeFreeObject();
void allPalette();
void adjustRight();
Expand Down Expand Up @@ -878,7 +878,6 @@ class DreamGenContext : public Context {
void inToInv();
void parser();
void setMouse();
void intro();
void fadeScreenDowns();
void openHotelDoor2();
void selectLocation();
Expand Down
56 changes: 56 additions & 0 deletions engines/dreamweb/stubs.cpp
Expand Up @@ -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 */

1 change: 1 addition & 0 deletions engines/dreamweb/stubs.h
Expand Up @@ -453,5 +453,6 @@
void showPCX();
void bibleQuote();
void realCredits();
void intro();

#endif

0 comments on commit c51e97c

Please sign in to comment.