diff options
author | Eugene Sandulenko | 2016-05-02 15:18:43 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2016-05-02 15:19:08 +0200 |
commit | 298ea1a76ede84acff0c41fd52af063d6a51e6a8 (patch) | |
tree | 2fce88e45e9aad72e14053136206890de1000f33 /engines/made | |
parent | 62142e5add7b46c084727f00f94f9c5593db1e73 (diff) | |
download | scummvm-rg350-298ea1a76ede84acff0c41fd52af063d6a51e6a8.tar.gz scummvm-rg350-298ea1a76ede84acff0c41fd52af063d6a51e6a8.tar.bz2 scummvm-rg350-298ea1a76ede84acff0c41fd52af063d6a51e6a8.zip |
MADE: Cleanup
Diffstat (limited to 'engines/made')
-rw-r--r-- | engines/made/database.cpp | 1 | ||||
-rw-r--r-- | engines/made/pmvplayer.cpp | 5 | ||||
-rw-r--r-- | engines/made/redreader.cpp | 2 | ||||
-rw-r--r-- | engines/made/resource.cpp | 4 | ||||
-rw-r--r-- | engines/made/screen.cpp | 2 | ||||
-rw-r--r-- | engines/made/sound.cpp | 3 |
6 files changed, 15 insertions, 2 deletions
diff --git a/engines/made/database.cpp b/engines/made/database.cpp index 3eab31acc2..0020cb398c 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -40,6 +40,7 @@ namespace Made { */ Object::Object() : _objData(NULL), _freeData(false) { + _objSize = 0; } Object::~Object() { diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 453e2a4872..0beb132b93 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -223,7 +223,10 @@ bool PmvPlayer::play(const char *filename) { //delete _audioStream; delete _fd; - _surface->free(); + + if(_surface) + _surface->free(); + delete _surface; return !_aborted; diff --git a/engines/made/redreader.cpp b/engines/made/redreader.cpp index f92ffd8dd8..a0aaf7be43 100644 --- a/engines/made/redreader.cpp +++ b/engines/made/redreader.cpp @@ -102,7 +102,7 @@ int LzhDecompressor::decompress(Common::SeekableReadStream &source, byte *dest, int bufsize; byte* buffer; - buffer = (byte *) malloc(DICSIZ); + buffer = (byte *)calloc(DICSIZ, 1); _source = &source; _compSize = sourceLen; diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index f8e763e74e..a9734ed47d 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -43,6 +43,7 @@ Resource::~Resource() { PictureResource::PictureResource() : _picture(NULL), _picturePalette(NULL) { _hasPalette = false; + _paletteColorCount = 0; } PictureResource::~PictureResource() { @@ -182,6 +183,9 @@ void PictureResource::loadChunked(byte *source, int size) { /* AnimationResource */ AnimationResource::AnimationResource() { + _flags = 0; + _width = 0; + _height = 0; } AnimationResource::~AnimationResource() { diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index edccb68953..33edb3834c 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -91,6 +91,8 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _currentFontNum = 0; _fontDrawCtx.clipRect = Common::Rect(320, 200); _fontDrawCtx.destSurface = _backgroundScreen; + _outlineColor = 0; + _dropShadowColor = 0; clearChannels(); } diff --git a/engines/made/sound.cpp b/engines/made/sound.cpp index 2545273859..908d6e3b90 100644 --- a/engines/made/sound.cpp +++ b/engines/made/sound.cpp @@ -248,6 +248,9 @@ void decompressSound(byte *source, byte *dest, uint16 chunkSize, uint16 chunkCou // soundBuffer. soundBuffer[workChunkSize] = soundBuffer[workChunkSize - 1]; + for (i = 0; i < chunkSize; i++) + soundBuffer[i] = 0; + if (deltaType == 1) { for (i = 0; i < chunkSize - 1; i += 2) { l = i / 2; |