diff options
author | Vladimir Menshakov | 2011-06-10 02:18:57 +0400 |
---|---|---|
committer | Alyssa Milburn | 2011-06-15 17:33:52 +0200 |
commit | 25a937e1566974a0c920be8ab411c488201b8e53 (patch) | |
tree | eb312ed2b8c25d874979562c4ca2f5c7464ef673 | |
parent | 23736a02400c0649e50c07af87712d413cef6b83 (diff) | |
download | scummvm-rg350-25a937e1566974a0c920be8ab411c488201b8e53.tar.gz scummvm-rg350-25a937e1566974a0c920be8ab411c488201b8e53.tar.bz2 scummvm-rg350-25a937e1566974a0c920be8ab411c488201b8e53.zip |
DREAMWEB: added fadedos
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 20 | ||||
-rw-r--r-- | engines/dreamweb/dreamweb.h | 1 |
2 files changed, 20 insertions, 1 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 65cd2a0c43..fe27f4f97c 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -202,6 +202,23 @@ void DreamWebEngine::setGraphicsMode() { initGraphics(320, 200, false); } +void DreamWebEngine::fadeDos() { + static const int startpal = 0+(228*13)+32+60+(32*32)+(11*10*3); //fixme: add equ to enum too + + PaletteManager *palette = _system->getPaletteManager(); + _context.ds = _context.es = _context.data.word(dreamgen::kBuffers); + uint8 *dst = _context.es.ptr(startpal, 768); + palette->grabPalette(dst, 0, 64); + for(int fade = 0; fade < 64; ++fade) { + for(int c = 0; c < 768; ++c) { //original sources decrement 768 values -> 256 colors + if (dst[c]) { + --dst[c]; + } + } + palette->setPalette(dst, 0, 64); + waitForVSync(); + } +} } // End of namespace DreamWeb @@ -485,7 +502,8 @@ void showgroup(Context &context) { } void fadedos(Context &context) { - warning("fadedos: STUB"); + vsync(context); + engine()->fadeDos(); } void doshake(Context &context) { diff --git a/engines/dreamweb/dreamweb.h b/engines/dreamweb/dreamweb.h index d2fc447fee..ed4359f645 100644 --- a/engines/dreamweb/dreamweb.h +++ b/engines/dreamweb/dreamweb.h @@ -85,6 +85,7 @@ public: void mouseCall(); //fill mouse pos and button state void processEvents(); void setGraphicsMode(); + void fadeDos(); private: const DreamWebGameDescription *_gameDescription; |