diff options
author | Strangerke | 2015-01-28 07:47:28 +0100 |
---|---|---|
committer | Strangerke | 2015-01-28 07:47:28 +0100 |
commit | ae2ba18af360b5578eaa38ac7aacce3264f8d7bf (patch) | |
tree | 3fdb9d84c70d932e36b7be75aaac961a49d8ee11 /engines/made | |
parent | 2d93a82e8060b2c9d05438c0ba352ad4ca46f1c0 (diff) | |
download | scummvm-rg350-ae2ba18af360b5578eaa38ac7aacce3264f8d7bf.tar.gz scummvm-rg350-ae2ba18af360b5578eaa38ac7aacce3264f8d7bf.tar.bz2 scummvm-rg350-ae2ba18af360b5578eaa38ac7aacce3264f8d7bf.zip |
MADE: Initialize some variables
Diffstat (limited to 'engines/made')
-rw-r--r-- | engines/made/database.cpp | 6 | ||||
-rw-r--r-- | engines/made/pmvplayer.cpp | 15 | ||||
-rw-r--r-- | engines/made/redreader.cpp | 16 |
3 files changed, 32 insertions, 5 deletions
diff --git a/engines/made/database.cpp b/engines/made/database.cpp index a9855ba1fe..3eab31acc2 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -252,6 +252,10 @@ byte *ObjectV3::getData() { GameDatabase::GameDatabase(MadeEngine *vm) : _vm(vm) { + _gameState = nullptr; + _gameStateSize = 0; + _mainCodeObjectIndex = 0; + _isRedSource = false; } GameDatabase::~GameDatabase() { @@ -595,6 +599,8 @@ const char *GameDatabaseV2::getString(uint16 offset) { /* GameDatabaseV3 */ GameDatabaseV3::GameDatabaseV3(MadeEngine *vm) : GameDatabase(vm) { + _gameText = nullptr; + _gameStateOffs = 0; } void GameDatabaseV3::load(Common::SeekableReadStream &sourceS) { diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 3cac017e10..6ea0dc24d0 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -37,16 +37,18 @@ namespace Made { -PmvPlayer::PmvPlayer(MadeEngine *vm, Audio::Mixer *mixer) : _fd(NULL), _vm(vm), _mixer(mixer) { +PmvPlayer::PmvPlayer(MadeEngine *vm, Audio::Mixer *mixer) : _fd(nullptr), _vm(vm), _mixer(mixer) { + _audioStream = nullptr; + _surface = nullptr; + _aborted = false; } PmvPlayer::~PmvPlayer() { } bool PmvPlayer::play(const char *filename) { - _aborted = false; - _surface = NULL; + _surface = nullptr; _fd = new Common::File(); if (!_fd->open(filename)) { @@ -81,8 +83,11 @@ bool PmvPlayer::play(const char *filename) { // results to sound being choppy. Therefore, we set them to more // "common" values here (11025 instead of 11127 and 22050 instead // of 22254) - if (soundFreq == 11127) soundFreq = 11025; - if (soundFreq == 22254) soundFreq = 22050; + if (soundFreq == 11127) + soundFreq = 11025; + + if (soundFreq == 22254) + soundFreq = 22050; for (int i = 0; i < 22; i++) { int unk = _fd->readUint16LE(); diff --git a/engines/made/redreader.cpp b/engines/made/redreader.cpp index f5e6ca85b3..f92ffd8dd8 100644 --- a/engines/made/redreader.cpp +++ b/engines/made/redreader.cpp @@ -76,6 +76,22 @@ bool RedReader::seekFile(Common::File &fd, FileEntry &fileEntry, const char *fil } LzhDecompressor::LzhDecompressor() { + freq = nullptr; + len_table = nullptr; + sortptr = nullptr; + _source = nullptr; + + _compSize = 0; + _blockPos = 0; + _bitbuf = 0; + _subbitbuf = 0; + _bitcount = 0; + _blocksize = 0; + tree_n = 0; + heapsize = 0; + decode_i = 0; + decode_j = 0; + count_len_depth = 0; } LzhDecompressor::~LzhDecompressor() { |