aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNipun Garg2019-07-06 01:47:05 +0530
committerEugene Sandulenko2019-09-03 17:17:13 +0200
commit267ddc8358c8b5ddd2034cadfaaf1b7c97a83ff8 (patch)
treee5a806938c3eaa427273f3f223279e1349aae5b0 /engines
parentaed071e5a0eb15980db09d95c220d7d08ebffaad (diff)
downloadscummvm-rg350-267ddc8358c8b5ddd2034cadfaaf1b7c97a83ff8.tar.gz
scummvm-rg350-267ddc8358c8b5ddd2034cadfaaf1b7c97a83ff8.tar.bz2
scummvm-rg350-267ddc8358c8b5ddd2034cadfaaf1b7c97a83ff8.zip
HDB: Add turnOnSnow()
Diffstat (limited to 'engines')
-rw-r--r--engines/hdb/gfx.cpp11
-rw-r--r--engines/hdb/gfx.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/engines/hdb/gfx.cpp b/engines/hdb/gfx.cpp
index d4315a060c..3fdba2ed8e 100644
--- a/engines/hdb/gfx.cpp
+++ b/engines/hdb/gfx.cpp
@@ -192,6 +192,17 @@ void Gfx::updateFade() {
debug(9, "STUB: Gfx::updateFade incomplete");
}
+void Gfx::turnOnSnow() {
+ int i;
+ _snowInfo.active = true;
+ for (i = 0; i < MAX_SNOW; i++) {
+ _snowInfo.x[i] = g_hdb->_rnd->getRandomNumber(kScreenWidth);
+ _snowInfo.y[i] = g_hdb->_rnd->getRandomNumber(kScreenHeight);
+ _snowInfo.yv[i] = g_hdb->_rnd->getRandomNumber(3) + 1;
+ _snowInfo.xvindex[i] = g_hdb->_rnd->getRandomNumber(MAX_SNOW_XV);
+ }
+}
+
Picture *Gfx::loadPic(const char *picName) {
Picture *pic = new Picture;
Common::SeekableReadStream *stream = g_hdb->_fileMan->findFirstData(picName, TYPE_PIC);
diff --git a/engines/hdb/gfx.h b/engines/hdb/gfx.h
index ae7927debc..597bf7fe37 100644
--- a/engines/hdb/gfx.h
+++ b/engines/hdb/gfx.h
@@ -107,6 +107,7 @@ public:
bool isFadeActive() { return _fadeInfo.active; }
bool isFadeStaying() { return _fadeInfo.stayFaded; }
void turnOffFade() { _fadeInfo.active = _fadeInfo.stayFaded = false; }
+ void turnOnSnow();
void turnOffSnow() { _snowInfo.active = false; }
Picture *loadPic(const char *picName);