diff options
-rwxr-xr-x | devtools/tasmrecover/tasm-recover | 1 | ||||
-rw-r--r-- | engines/dreamweb/dreambase.h | 2 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.cpp | 30 | ||||
-rw-r--r-- | engines/dreamweb/dreamgen.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/stubs.h | 1 | ||||
-rw-r--r-- | engines/dreamweb/vgafades.cpp | 23 |
6 files changed, 25 insertions, 33 deletions
diff --git a/devtools/tasmrecover/tasm-recover b/devtools/tasmrecover/tasm-recover index 9c39455e48..254e45c35e 100755 --- a/devtools/tasmrecover/tasm-recover +++ b/devtools/tasmrecover/tasm-recover @@ -399,6 +399,7 @@ generator = cpp(context, "DreamGen", blacklist = [ 'fadescreenuphalf', 'fadescreendown', 'fadescreendowns', + 'fadescreendownhalf', 'fadetowhite', 'fadeupmonfirst', 'fadeupyellows', diff --git a/engines/dreamweb/dreambase.h b/engines/dreamweb/dreambase.h index d6b94e013b..a6c1abc9cd 100644 --- a/engines/dreamweb/dreambase.h +++ b/engines/dreamweb/dreambase.h @@ -356,6 +356,8 @@ public: void fadeScreenUpHalf(); void fadeScreenDown(); void fadeScreenDowns(); + void fadeScreenDownHalf(); + void clearPalette(); void greyscaleSum(); void allPalette(); void dumpCurrent(); diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp index 906ce3adc3..ea731fcb21 100644 --- a/engines/dreamweb/dreamgen.cpp +++ b/engines/dreamweb/dreamgen.cpp @@ -285,36 +285,6 @@ void DreamGenContext::transferMap() { _add(data.word(kExframepos), cx); } -void DreamGenContext::fadeScreenDownHalf() { - STACK_CHECK; - palToStartPal(); - palToEndPal(); - cx = 768; - es = data.word(kBuffers); - bx = (0+(228*13)+32+60+(32*32)+(11*10*3)+768); -halfend: - al = es.byte(bx); - _shr(al, 1); - es.byte(bx) = al; - _inc(bx); - if (--cx) - goto halfend; - ds = data.word(kBuffers); - es = data.word(kBuffers); - si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(56*3); - di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(56*3); - cx = 3*5; - _movsb(cx, true); - si = (0+(228*13)+32+60+(32*32)+(11*10*3))+(77*3); - di = (0+(228*13)+32+60+(32*32)+(11*10*3)+768)+(77*3); - cx = 3*2; - _movsb(cx, true); - data.byte(kFadedirection) = 1; - data.byte(kFadecount) = 31; - data.byte(kColourpos) = 0; - data.byte(kNumtofade) = 32; -} - void DreamGenContext::rollEm() { STACK_CHECK; cl = 160; diff --git a/engines/dreamweb/dreamgen.h b/engines/dreamweb/dreamgen.h index ddccd5eaad..f22461ef0f 100644 --- a/engines/dreamweb/dreamgen.h +++ b/engines/dreamweb/dreamgen.h @@ -487,7 +487,6 @@ public: void doSomeTalk(); void resetLocation(); void adjustUp(); - void fadeScreenDownHalf(); void outOfOpen(); void dirCom(); void findFirstPath(); diff --git a/engines/dreamweb/stubs.h b/engines/dreamweb/stubs.h index df55f0579c..79b2244e9c 100644 --- a/engines/dreamweb/stubs.h +++ b/engines/dreamweb/stubs.h @@ -382,7 +382,6 @@ void obsThatDoThings(); void makeMainScreen(); void delEverything(); - void clearPalette(); void errorMessage1(); void errorMessage2(); void errorMessage3(); diff --git a/engines/dreamweb/vgafades.cpp b/engines/dreamweb/vgafades.cpp index ca63b7308c..6766d56424 100644 --- a/engines/dreamweb/vgafades.cpp +++ b/engines/dreamweb/vgafades.cpp @@ -184,7 +184,28 @@ void DreamBase::fadeScreenDowns() { data.byte(kNumtofade) = 64; } -void DreamGenContext::clearPalette() { +void DreamBase::fadeScreenDownHalf() { + palToStartPal(); + palToEndPal(); + + const uint8 *startPal = startPalette(); + uint8 *endPal = endPalette(); + for (int i = 0; i < 256 * 3; ++i) { + *endPal >>= 1; + endPal++; + } + + memcpy(endPal + (56*3), startPal + (56*3), 3*5); + memcpy(endPal + (77*3), startPal + (77*3), 3*2); + + data.byte(kFadedirection) = 1; + data.byte(kFadecount) = 31; + data.byte(kColourpos) = 0; + data.byte(kNumtofade) = 32; +} + + +void DreamBase::clearPalette() { data.byte(kFadedirection) = 0; clearStartPal(); dumpCurrent(); |