diff options
author | Nipun Garg | 2019-06-18 16:58:58 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:48 +0200 |
commit | 604e7e5f6364896ca43f55faf803b6b1ca895073 (patch) | |
tree | 534af4a3afa0e2ae2369fba8fdf26984227f645c | |
parent | 70b1013f4cab07b06fc91c532b597b13c5b2899e (diff) | |
download | scummvm-rg350-604e7e5f6364896ca43f55faf803b6b1ca895073.tar.gz scummvm-rg350-604e7e5f6364896ca43f55faf803b6b1ca895073.tar.bz2 scummvm-rg350-604e7e5f6364896ca43f55faf803b6b1ca895073.zip |
HDB: Add DrawMan::setFade()
-rw-r--r-- | engines/hdb/draw-manager.cpp | 18 | ||||
-rw-r--r-- | engines/hdb/draw-manager.h | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/engines/hdb/draw-manager.cpp b/engines/hdb/draw-manager.cpp index 5130557d18..5f8fe8159d 100644 --- a/engines/hdb/draw-manager.cpp +++ b/engines/hdb/draw-manager.cpp @@ -100,6 +100,24 @@ void DrawMan::fillScreen(uint32 color) { // g_system->copyRectToScreen(_globalSurface.getBasePtr(0, 0), _globalSurface.pitch, 0, 0, _globalSurface.w, _globalSurface.h); } +void DrawMan::setFade(bool fadeIn, bool black, int steps) { + _fadeInfo.isFadeIn = fadeIn; + _fadeInfo.isBlack = black; + + if (!steps) { + steps = 1; + } + _fadeInfo.speed = steps; + + if (fadeIn) { + _fadeInfo.curStep = 0; + } else { + _fadeInfo.curStep = 255; + } + + _fadeInfo.active = true; +} + Tile *DrawMan::getTile(int index) { if (index < 0 || index > _numTiles) { diff --git a/engines/hdb/draw-manager.h b/engines/hdb/draw-manager.h index 122f96ea55..3441964c0c 100644 --- a/engines/hdb/draw-manager.h +++ b/engines/hdb/draw-manager.h @@ -59,9 +59,12 @@ public: bool init(); void fillScreen(uint32 color); + void setFade(bool fadeIn, bool black, int steps); + Tile *getTile(int index); int getTileIndex(const char *name); Picture *getPicture(const char *name); + int isSky(int skyIndex); void setSky(int skyIndex); void setup3DStars(); |