From 267ddc8358c8b5ddd2034cadfaaf1b7c97a83ff8 Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Sat, 6 Jul 2019 01:47:05 +0530 Subject: HDB: Add turnOnSnow() --- engines/hdb/gfx.cpp | 11 +++++++++++ engines/hdb/gfx.h | 1 + 2 files changed, 12 insertions(+) (limited to 'engines/hdb') 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); -- cgit v1.2.3