diff options
author | Johannes Schickel | 2008-04-20 10:39:39 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-04-20 10:39:39 +0000 |
commit | a329be773e976a70a4b092542dcde024d40d0106 (patch) | |
tree | aa27e34f97a5fd838ffcfab675c27626cfaf8b9a /engines/kyra | |
parent | 8cbd185731b1b378c80126c28d6f8e5f7c75b78b (diff) | |
download | scummvm-rg350-a329be773e976a70a4b092542dcde024d40d0106.tar.gz scummvm-rg350-a329be773e976a70a4b092542dcde024d40d0106.tar.bz2 scummvm-rg350-a329be773e976a70a4b092542dcde024d40d0106.zip |
- Fixed some valgrind warnings.
- Little bugfix for scene shape loading.
svn-id: r31591
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra_v3.cpp | 2 | ||||
-rw-r--r-- | engines/kyra/scene_v3.cpp | 1 | ||||
-rw-r--r-- | engines/kyra/text_v3.cpp | 3 |
3 files changed, 4 insertions, 2 deletions
diff --git a/engines/kyra/kyra_v3.cpp b/engines/kyra/kyra_v3.cpp index b87cd8b9a2..9bca12cdb9 100644 --- a/engines/kyra/kyra_v3.cpp +++ b/engines/kyra/kyra_v3.cpp @@ -131,7 +131,7 @@ KyraEngine_v3::~KyraEngine_v3() { delete [] _sceneAnims; for (uint i = 0; i < ARRAYSIZE(_sceneShapes); ++i) - delete _sceneShapes[i]; + delete [] _sceneShapes[i]; for (uint i = 0; i < ARRAYSIZE(_sceneAnimMovie); ++i) delete _sceneAnimMovie[i]; diff --git a/engines/kyra/scene_v3.cpp b/engines/kyra/scene_v3.cpp index e08b3e2bf6..e849493307 100644 --- a/engines/kyra/scene_v3.cpp +++ b/engines/kyra/scene_v3.cpp @@ -410,6 +410,7 @@ void KyraEngine_v3::initSceneScript(int unk1) { int16 y = stream->readSint16LE(); int16 w = stream->readSint16LE(); int16 h = stream->readSint16LE(); + stream->seek(4, SEEK_CUR); _sceneShapes[i] = _screen->encodeShape(x, y, w, h, 0); assert(_sceneShapes[i]); musicUpdate(0); diff --git a/engines/kyra/text_v3.cpp b/engines/kyra/text_v3.cpp index 980d6a9ee1..0c252397d2 100644 --- a/engines/kyra/text_v3.cpp +++ b/engines/kyra/text_v3.cpp @@ -35,7 +35,8 @@ TextDisplayer_v3::TextDisplayer_v3(KyraEngine_v3 *vm, Screen_v3 *screen) char *TextDisplayer_v3::preprocessString(const char *str) { debugC(9, kDebugLevelMain, "TextDisplayer_v3::preprocessString('%s')", str); - strcpy(_talkBuffer, str); + if (_talkBuffer != str) + strcpy(_talkBuffer, str); char *p = _talkBuffer; while (*p) { |