aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2011-12-06 15:58:20 +0200
committerFilippos Karapetis2011-12-06 15:58:20 +0200
commitb201f4f55dca062ef501fa5adead0c2408ee8e1c (patch)
treee1c539ad29e1ce23ba81fe247de1a87053ccc3b2
parentc11ff14f46cb2457a431d5e2d5604fca74794803 (diff)
downloadscummvm-rg350-b201f4f55dca062ef501fa5adead0c2408ee8e1c.tar.gz
scummvm-rg350-b201f4f55dca062ef501fa5adead0c2408ee8e1c.tar.bz2
scummvm-rg350-b201f4f55dca062ef501fa5adead0c2408ee8e1c.zip
DREAMWEB: 'clearpalette', 'deleverything', 'errormessage1', 'errormessage2', 'errormessage3', 'train' ported to C++
-rwxr-xr-xdevtools/tasmrecover/tasm-recover6
-rw-r--r--engines/dreamweb/dreamgen.cpp119
-rw-r--r--engines/dreamweb/dreamgen.h6
-rw-r--r--engines/dreamweb/people.cpp7
-rw-r--r--engines/dreamweb/stubs.cpp63
-rw-r--r--engines/dreamweb/stubs.h6
-rw-r--r--engines/dreamweb/vgafades.cpp6
7 files changed, 86 insertions, 127 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 11dea3292e..577c0c98df 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -202,6 +202,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'checkspeed',
'clearbeforeload',
'clearendpal',
+ 'clearpalette',
'clearreels',
'clearsprites',
'clearstartpal',
@@ -223,6 +224,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'delchar',
'delcurs',
'deletetaken',
+ 'deleverything',
'delpointer',
'delsprite',
'deltextline',
@@ -257,6 +259,9 @@ generator = cpp(context, "DreamGen", blacklist = [
'entersymbol',
'eraseoldobs',
'error',
+ 'errormessage1',
+ 'errormessage2',
+ 'errormessage3',
'examicon',
'examineob',
'examineobtext',
@@ -568,6 +573,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'textforend',
'textformonk',
'titles',
+ 'train',
'transferinv',
'transfertext',
'trapdoor',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index 4f8792c471..da525566d4 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -1200,32 +1200,6 @@ nocopper:
addToPeopleList();
}
-void DreamGenContext::train() {
- STACK_CHECK;
- return;
- ax = es.word(bx+3);
- _cmp(ax, 21);
- if (!flags.c())
- goto notrainyet;
- _inc(ax);
- goto gottrainframe;
-notrainyet:
- randomNumber();
- _cmp(al, 253);
- if (flags.c())
- return /* (notrainatall) */;
- _cmp(data.byte(kManspath), 5);
- if (!flags.z())
- return /* (notrainatall) */;
- _cmp(data.byte(kFinaldest), 5);
- if (!flags.z())
- return /* (notrainatall) */;
- ax = 5;
-gottrainframe:
- es.word(bx+3) = ax;
- showGameReel();
-}
-
void DreamGenContext::checkForExit() {
STACK_CHECK;
cl = data.byte(kRyanx);
@@ -1438,22 +1412,6 @@ forgotone:
setupTimedUse();
}
-void DreamGenContext::delEverything() {
- STACK_CHECK;
- al = data.byte(kMapysize);
- ah = 0;
- _add(ax, data.word(kMapoffsety));
- _cmp(ax, 182);
- if (!flags.c())
- goto bigroom;
- mapToPanel();
- return;
-bigroom:
- _sub(data.byte(kMapysize), 8);
- mapToPanel();
- _add(data.byte(kMapysize), 8);
-}
-
void DreamGenContext::transferMap() {
STACK_CHECK;
di = data.word(kExframepos);
@@ -1525,13 +1483,6 @@ void DreamGenContext::doFade() {
fadeCalculation();
}
-void DreamGenContext::clearPalette() {
- STACK_CHECK;
- data.byte(kFadedirection) = 0;
- clearStartPal();
- dumpCurrent();
-}
-
void DreamGenContext::fadeToWhite() {
STACK_CHECK;
es = data.word(kBuffers);
@@ -3181,76 +3132,6 @@ sizeok1:
delPointer();
}
-void DreamGenContext::errorMessage1() {
- STACK_CHECK;
- delPointer();
- di = 76;
- bx = 21;
- al = 58;
- dl = 240;
- printMessage();
- readMouse();
- showPointer();
- workToScreen();
- delPointer();
- cx = 50;
- hangOnP();
- showPanel();
- showMan();
- examIcon();
- readMouse();
- useOpened();
- showPointer();
- workToScreen();
- delPointer();
-}
-
-void DreamGenContext::errorMessage2() {
- STACK_CHECK;
- data.byte(kCommandtype) = 255;
- delPointer();
- di = 76;
- bx = 21;
- al = 59;
- dl = 240;
- printMessage();
- readMouse();
- showPointer();
- workToScreen();
- delPointer();
- cx = 50;
- hangOnP();
- showPanel();
- showMan();
- examIcon();
- readMouse();
- useOpened();
- showPointer();
- workToScreen();
- delPointer();
-}
-
-void DreamGenContext::errorMessage3() {
- STACK_CHECK;
- delPointer();
- di = 76;
- bx = 21;
- al = 60;
- dl = 240;
- printMessage();
- workToScreenM();
- cx = 50;
- hangOnP();
- showPanel();
- showMan();
- examIcon();
- readMouse();
- useOpened();
- showPointer();
- workToScreen();
- delPointer();
-}
-
void DreamGenContext::checkObjectSize() {
STACK_CHECK;
getOpenedSize();
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 2c870ec7a7..31e7b83b2a 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -579,7 +579,6 @@ public:
void adjustUp();
void fadeScreenDownHalf();
void mouseCall();
- void train();
void fadeDownMon();
void bartender();
void showDiary();
@@ -626,7 +625,6 @@ public:
void runIntroSeq();
void advisor();
void attendant();
- void clearPalette();
void cantDrop();
void copper();
void openHotelDoor();
@@ -652,9 +650,6 @@ public:
void fadeUpMon();
void soundEnd();
void redes();
- void errorMessage1();
- void errorMessage2();
- void errorMessage3();
void introMagic2();
void introMagic3();
void showDiaryPage();
@@ -692,7 +687,6 @@ public:
void getBack1();
void fadeFromWhite();
void rollEm();
- void delEverything();
void poolGuard();
void lookAtPlace();
void useAxe();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 93a9e91dcd..ba9e59ab4e 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -41,7 +41,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
&DreamGenContext::smallCandle, NULL,
&DreamGenContext::copper, &DreamGenContext::poolGuard,
NULL, &DreamGenContext::businessMan,
- &DreamGenContext::train, NULL,
+ NULL, NULL,
&DreamGenContext::mugger, &DreamGenContext::helicopter,
NULL, NULL,
&DreamGenContext::introMagic2, &DreamGenContext::candles2,
@@ -73,7 +73,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
/*&DreamGenContext::smallcandle*/NULL, &DreamGenContext::security,
/*&DreamGenContext::copper*/NULL, /*&DreamGenContext::poolGuard*/NULL,
&DreamGenContext::rockstar, /*&DreamGenContext::businessMan*/NULL,
- /*&DreamGenContext::train*/NULL, &DreamGenContext::genericPerson /*aide*/,
+ &DreamGenContext::train, &DreamGenContext::genericPerson /*aide*/,
/*&DreamGenContext::mugger*/NULL, /*&DreamGenContext::helicopter*/NULL,
&DreamGenContext::introMagic1, &DreamGenContext::introMusic,
/*&DreamGenContext::introMagic2*/NULL, /*&DreamGenContext::candles2*/NULL,
@@ -460,5 +460,8 @@ void DreamGenContext::foghornSound(ReelRoutine &routine) {
playChannel1(13);
}
+void DreamGenContext::train(ReelRoutine &routine) {
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.cpp b/engines/dreamweb/stubs.cpp
index 0efdd1884a..108fe2dd5d 100644
--- a/engines/dreamweb/stubs.cpp
+++ b/engines/dreamweb/stubs.cpp
@@ -3615,4 +3615,67 @@ void DreamGenContext::obsThatDoThings() {
}
}
+void DreamGenContext::delEverything() {
+ if (data.byte(kMapysize) + data.word(kMapoffsety) == 182) {
+ mapToPanel();
+ } else {
+ // Big room
+ data.byte(kMapysize) -= 8;
+ mapToPanel();
+ data.byte(kMapysize) += 8;
+ }
+}
+
+void DreamGenContext::errorMessage1() {
+ delPointer();
+ printMessage(76, 21, 58, 240, (240 & 1));
+ readMouse();
+ showPointer();
+ workToScreen();
+ delPointer();
+ hangOnP(50);
+ showPanel();
+ showMan();
+ examIcon();
+ readMouse();
+ useOpened();
+ showPointer();
+ workToScreen();
+ delPointer();
+}
+
+void DreamGenContext::errorMessage2() {
+ data.byte(kCommandtype) = 255;
+ delPointer();
+ printMessage(76, 21, 59, 240, (240 & 1));
+ readMouse();
+ showPointer();
+ workToScreen();
+ delPointer();
+ hangOnP(50);
+ showPanel();
+ showMan();
+ examIcon();
+ readMouse();
+ useOpened();
+ showPointer();
+ workToScreen();
+ delPointer();
+}
+
+void DreamGenContext::errorMessage3() {
+ delPointer();
+ printMessage(76, 21, 60, 240, (240 & 1));
+ workToScreenM();
+ hangOnP(50);
+ showPanel();
+ showMan();
+ examIcon();
+ readMouse();
+ useOpened();
+ showPointer();
+ workToScreen();
+ delPointer();
+}
+
} /*namespace dreamgen */
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 18942e505a..ee503288df 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -445,6 +445,7 @@
void handClap(ReelRoutine &routine);
void carParkDrip(ReelRoutine &routine);
void foghornSound(ReelRoutine &routine);
+ void train(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
void loadKeypad();
@@ -539,5 +540,10 @@
void obsThatDoThings();
void makeMainScreen();
void openInv();
+ void delEverything();
+ void clearPalette();
+ void errorMessage1();
+ void errorMessage2();
+ void errorMessage3();
#endif
diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp
index a4f85aad18..8e499ba0f9 100644
--- a/engines/dreamweb/vgafades.cpp
+++ b/engines/dreamweb/vgafades.cpp
@@ -154,5 +154,11 @@ void DreamGenContext::fadeScreenDowns() {
data.byte(kNumtofade) = 64;
}
+void DreamGenContext::clearPalette() {
+ data.byte(kFadedirection) = 0;
+ clearStartPal();
+ dumpCurrent();
+}
+
} /*namespace dreamgen */