From 45debce66eff7e57e71b83f8d1c4dd2066636355 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 1 May 2010 12:55:32 +0000 Subject: KYRA: fixed some cppcheck warnings svn-id: r48879 --- engines/kyra/sequences_hof.cpp | 6 ++---- engines/kyra/sound_towns.cpp | 5 +++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 26919215a0..84b6801091 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -133,8 +133,6 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { } if (cseq.flags & 1) { - int w2 = _seqWsa->width(); - int h2 = _seqWsa->height(); int x = cseq.xPos; int y = cseq.yPos; @@ -142,13 +140,13 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { if (_seqWsa) { if (x < 0) { + _seqWsa->setWidth(_seqWsa->width() + x); x = 0; - w2 = 0; } if (y < 0) { + _seqWsa->setHeight(_seqWsa->height() + y); y = 0; - h2 = 0; } if (cseq.xPos + _seqWsa->width() > 319) diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 31a7db478d..daa1ccacc0 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -153,7 +153,7 @@ public: void loadDataToCurrentPosition(uint8 *trackdata, uint32 size, bool loop = 0); void loadDataToEndOfQueue(uint8 *trackdata, uint32 size, bool loop = 0); void setPlayBackStatus(bool playing); - bool isPlaying() {return _playing; } + bool isPlaying() const {return _playing; } uint8 *trackData() {return _trackData; } bool _loop; @@ -1491,7 +1491,7 @@ public: void nextTick(int32 *buffer, uint32 bufferSize); - uint8 chanEnable() { return _chanEnable; } + uint8 chanEnable() const { return _chanEnable; } private: void updatesRegs(); @@ -2561,6 +2561,7 @@ TownsPC98_OpnSquareSineSource::TownsPC98_OpnSquareSineSource(const uint32 timerb _timer(0), _noiseGenerator(0), _chanEnable(0) { memset(_channels, 0, sizeof(_channels)); + memset(_updateRequestBuf, 0, sizeof(_updateRequestBuf)); _reg = new uint8 *[11]; _reg[0] = &_channels[0].frqL; -- cgit v1.2.3