diff options
author | Paul Gilbert | 2014-01-19 23:00:18 -0500 |
---|---|---|
committer | Paul Gilbert | 2014-01-19 23:00:18 -0500 |
commit | 0e68c9ac5985e640be1ada6ce8c11ee0b9f6c57e (patch) | |
tree | d90fdec07fbf1fa1df145c6b3026df0e100cdbd8 | |
parent | 758e35e79bf1c2a70bc0b17b06573e5a776285a2 (diff) | |
download | scummvm-rg350-0e68c9ac5985e640be1ada6ce8c11ee0b9f6c57e.tar.gz scummvm-rg350-0e68c9ac5985e640be1ada6ce8c11ee0b9f6c57e.tar.bz2 scummvm-rg350-0e68c9ac5985e640be1ada6ce8c11ee0b9f6c57e.zip |
VOYEUR: Fix for SVoy data initialization
-rw-r--r-- | engines/voyeur/data.cpp | 5 | ||||
-rw-r--r-- | engines/voyeur/data.h | 1 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/engines/voyeur/data.cpp b/engines/voyeur/data.cpp index 3227e3cd45..9104d5f560 100644 --- a/engines/voyeur/data.cpp +++ b/engines/voyeur/data.cpp @@ -38,6 +38,11 @@ void VoyeurEvent::synchronize(Common::Serializer &s) { /*------------------------------------------------------------------------*/ +SVoy::SVoy() { + // Initialise all the data fields of SVoy to empty values + Common::fill((byte *)this, (byte *)this + sizeof(SVoy), 0); +} + void SVoy::setVm(VoyeurEngine *vm) { _vm = vm; } diff --git a/engines/voyeur/data.h b/engines/voyeur/data.h index 53c6ebebbb..e33c3c7b2b 100644 --- a/engines/voyeur/data.h +++ b/engines/voyeur/data.h @@ -112,6 +112,7 @@ public: int _fadeICF0; int _policeEvent; public: + SVoy(); void setVm(VoyeurEngine *vm); /** diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index d5de47d34a..72f568ba82 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -119,7 +119,6 @@ void VoyeurEngine::globalInitBolt() { assert(_graphicsManager._fontPtr->_curFont); // Setup default flags - Common::fill((byte *)&_voy, (byte *)&_voy + sizeof(SVoy), 0); _voy._field478 = 1; _voy._field4376 = _voy._field4378 = 127; _voy._field4F2 = 9999; |