diff options
author | Gregory Montoir | 2006-11-12 17:39:47 +0000 |
---|---|---|
committer | Gregory Montoir | 2006-11-12 17:39:47 +0000 |
commit | f527da0953ee0887967b4154391b86880a978d9f (patch) | |
tree | 6adb517c1e73f1c689381b6b8d2d0f69b391bd4b /engines | |
parent | cc42cb83093c71f966b61abba894e5a5fe33ae42 (diff) | |
download | scummvm-rg350-f527da0953ee0887967b4154391b86880a978d9f.tar.gz scummvm-rg350-f527da0953ee0887967b4154391b86880a978d9f.tar.bz2 scummvm-rg350-f527da0953ee0887967b4154391b86880a978d9f.zip |
fixed valgrind warnings (unitialized data)
svn-id: r24692
Diffstat (limited to 'engines')
-rw-r--r-- | engines/touche/touche.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index 191a605d12..d25e5643e4 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -43,6 +43,8 @@ ToucheEngine::ToucheEngine(OSystem *system, Common::Language language) _roomAreaRect = Common::Rect(640, 352); clearDirtyRects(); + memset(_flagsTable, 0, sizeof(_flagsTable)); + _playSoundCounter = 0; _processRandomPaletteCounter = 0; @@ -106,6 +108,8 @@ int ToucheEngine::go() { } void ToucheEngine::restart() { + _midiPlayer->stop(); + _displayQuitDialog = false; memset(_flagsTable, 0, sizeof(_flagsTable)); @@ -1297,6 +1301,7 @@ void ToucheEngine::buildSpriteScalingTable(int z1, int z2) { z2 = 1; } + memset(_spriteScalingTable, 0, sizeof(_spriteScalingTable)); const int scaleInc = z1 * 256 / z2; int scaleSum = 0; for (int i = 0; i < z2; ++i) { @@ -1307,6 +1312,7 @@ void ToucheEngine::buildSpriteScalingTable(int z1, int z2) { scaleSum += scaleInc; } + memset(_spriteScalingIndex, 0, sizeof(_spriteScalingIndex)); const int16 *p = &_spriteScalingTable[500]; int16 z1_s = *p++; int16 z2_s = *p++; |