[Scummvm-cvs-logs] SF.net SVN: scummvm: [24692] scummvm/trunk/engines/touche/touche.cpp
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Sun Nov 12 18:39:52 CET 2006
Revision: 24692
http://svn.sourceforge.net/scummvm/?rev=24692&view=rev
Author: cyx
Date: 2006-11-12 09:39:47 -0800 (Sun, 12 Nov 2006)
Log Message:
-----------
fixed valgrind warnings (unitialized data)
Modified Paths:
--------------
scummvm/trunk/engines/touche/touche.cpp
Modified: scummvm/trunk/engines/touche/touche.cpp
===================================================================
--- scummvm/trunk/engines/touche/touche.cpp 2006-11-12 11:47:43 UTC (rev 24691)
+++ scummvm/trunk/engines/touche/touche.cpp 2006-11-12 17:39:47 UTC (rev 24692)
@@ -43,6 +43,8 @@
_roomAreaRect = Common::Rect(640, 352);
clearDirtyRects();
+ memset(_flagsTable, 0, sizeof(_flagsTable));
+
_playSoundCounter = 0;
_processRandomPaletteCounter = 0;
@@ -106,6 +108,8 @@
}
void ToucheEngine::restart() {
+ _midiPlayer->stop();
+
_displayQuitDialog = false;
memset(_flagsTable, 0, sizeof(_flagsTable));
@@ -1297,6 +1301,7 @@
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 @@
scaleSum += scaleInc;
}
+ memset(_spriteScalingIndex, 0, sizeof(_spriteScalingIndex));
const int16 *p = &_spriteScalingTable[500];
int16 z1_s = *p++;
int16 z2_s = *p++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list