[Scummvm-cvs-logs] scummvm master -> 66618f4e0245bb1f90cd08a1261d57483e73aaae
bluegr
md5 at scummvm.org
Thu Dec 15 23:16:08 CET 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
66618f4e02 DREAMWEB: Port 'endgameseq' to C++
Commit: 66618f4e0245bb1f90cd08a1261d57483e73aaae
https://github.com/scummvm/scummvm/commit/66618f4e0245bb1f90cd08a1261d57483e73aaae
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-12-15T14:15:04-08:00
Commit Message:
DREAMWEB: Port 'endgameseq' to C++
Changed paths:
devtools/tasmrecover/tasm-recover
engines/dreamweb/dreamgen.cpp
engines/dreamweb/dreamgen.h
engines/dreamweb/people.cpp
engines/dreamweb/stubs.h
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover
index 89a830b..83ebcad 100755
--- a/devtools/tasmrecover/tasm-recover
+++ b/devtools/tasmrecover/tasm-recover
@@ -374,6 +374,7 @@ generator = cpp(context, "DreamGen", blacklist = [
'edenscdplayer',
'enablesoundint',
'endgame',
+ 'endgameseq',
'endpaltostart',
'entercode',
'entersymbol',
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index e4a5411..804896d 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -123,69 +123,6 @@ combatover2:
data.byte(kMandead) = 2;
}
-void DreamGenContext::endGameSeq() {
- STACK_CHECK;
- checkSpeed();
- if (!flags.z())
- goto notendseq;
- ax = es.word(bx+3);
- _inc(ax);
- _cmp(ax, 51);
- if (!flags.z())
- goto gotendseq;
- _cmp(data.byte(kIntrocount), 140);
- if (flags.z())
- goto gotendseq;
- _inc(data.byte(kIntrocount));
- push(es);
- push(bx);
- textForEnd();
- bx = pop();
- es = pop();
- ax = 50;
-gotendseq:
- es.word(bx+3) = ax;
- _cmp(ax, 134);
- if (!flags.z())
- goto notfadedown;
- push(es);
- push(bx);
- push(ax);
- fadeScreenDownHalf();
- ax = pop();
- bx = pop();
- es = pop();
- goto notendseq;
-notfadedown:
- _cmp(ax, 324);
- if (!flags.z())
- goto notfadeend;
- push(es);
- push(bx);
- push(ax);
- fadeScreenDowns();
- data.byte(kVolumeto) = 7;
- data.byte(kVolumedirection) = 1;
- ax = pop();
- bx = pop();
- es = pop();
-notfadeend:
- _cmp(ax, 340);
- if (!flags.z())
- goto notendseq;
- data.byte(kGetback) = 1;
-notendseq:
- showGameReel();
- al = data.byte(kMapy);
- es.byte(bx+2) = al;
- ax = es.word(bx+3);
- _cmp(ax, 145);
- if (!flags.z())
- return /* (notendcreds) */;
- es.word(bx+3) = 146;
- rollEndCredits();
-}
-
void DreamGenContext::checkForExit() {
STACK_CHECK;
cl = data.byte(kRyanx);
diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h
index 87b769f..c47be2f 100644
--- a/engines/dreamweb/dreamgen.h
+++ b/engines/dreamweb/dreamgen.h
@@ -490,7 +490,6 @@ public:
void fadeScreenDownHalf();
void outOfOpen();
void dirCom();
- void endGameSeq();
void findFirstPath();
void startTalk();
void getAnyAd();
diff --git a/engines/dreamweb/people.cpp b/engines/dreamweb/people.cpp
index 003921b..96c9ae8 100644
--- a/engines/dreamweb/people.cpp
+++ b/engines/dreamweb/people.cpp
@@ -48,7 +48,7 @@ static void (DreamGenContext::*reelCallbacks[57])() = {
NULL, NULL,
NULL, NULL,
NULL, NULL,
- NULL, &DreamGenContext::endGameSeq,
+ NULL, NULL,
NULL, NULL,
NULL, NULL,
NULL, NULL,
@@ -80,7 +80,7 @@ static void (DreamGenContext::*reelCallbacksCPP[57])(ReelRoutine &) = {
&DreamGenContext::gates, &DreamGenContext::introMagic3,
&DreamGenContext::introMonks1, &DreamGenContext::candles,
&DreamGenContext::introMonks2, &DreamGenContext::handClap,
- &DreamGenContext::monkAndRyan, /*&DreamGenContext::endGameSeq*/NULL,
+ &DreamGenContext::monkAndRyan, &DreamGenContext::endGameSeq,
&DreamGenContext::priest, &DreamGenContext::madman,
&DreamGenContext::madmansTelly, &DreamGenContext::alleyBarkSound,
&DreamGenContext::foghornSound, &DreamGenContext::carParkDrip,
@@ -1012,4 +1012,41 @@ void DreamGenContext::businessMan(ReelRoutine &routine) {
}
}
+void DreamGenContext::endGameSeq(ReelRoutine &routine) {
+ if (checkSpeed(routine)) {
+ uint16 nextReelPointer = routine.reelPointer() + 1;
+ if (nextReelPointer == 51 && data.byte(kIntrocount) != 140) {
+ data.byte(kIntrocount)++;
+ textForEnd();
+ nextReelPointer = 50;
+ }
+
+ routine.setReelPointer(nextReelPointer);
+ if (nextReelPointer == 134) {
+ push(es);
+ push(bx);
+ push(ax);
+ fadeScreenDownHalf();
+ ax = pop();
+ bx = pop();
+ es = pop();
+ } else if (nextReelPointer == 324) {
+ fadeScreenDowns();
+ data.byte(kVolumeto) = 7;
+ data.byte(kVolumedirection) = 1;
+ }
+
+ if (nextReelPointer == 340)
+ data.byte(kGetback) = 1;
+ }
+
+ showGameReel(&routine);
+ routine.mapY = data.byte(kMapy);
+
+ if (routine.reelPointer() == 145) {
+ routine.setReelPointer(146);
+ rollEndCredits();
+ }
+}
+
} // End of namespace DreamGen
diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h
index 5b012d5..0ee4171 100644
--- a/engines/dreamweb/stubs.h
+++ b/engines/dreamweb/stubs.h
@@ -384,6 +384,7 @@
void helicopter(ReelRoutine &routine);
void mugger(ReelRoutine &routine);
void businessMan(ReelRoutine &routine);
+ void endGameSeq(ReelRoutine &routine);
void singleKey(uint8 key, uint16 x, uint16 y);
void loadSaveBox();
uint8 nextSymbol(uint8 symbol);
More information about the Scummvm-git-logs
mailing list