aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNipun Garg2019-06-18 16:58:58 +0530
committerEugene Sandulenko2019-09-03 17:16:48 +0200
commit604e7e5f6364896ca43f55faf803b6b1ca895073 (patch)
tree534af4a3afa0e2ae2369fba8fdf26984227f645c
parent70b1013f4cab07b06fc91c532b597b13c5b2899e (diff)
downloadscummvm-rg350-604e7e5f6364896ca43f55faf803b6b1ca895073.tar.gz
scummvm-rg350-604e7e5f6364896ca43f55faf803b6b1ca895073.tar.bz2
scummvm-rg350-604e7e5f6364896ca43f55faf803b6b1ca895073.zip
HDB: Add DrawMan::setFade()
-rw-r--r--engines/hdb/draw-manager.cpp18
-rw-r--r--engines/hdb/draw-manager.h3
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();