aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Kagerer2010-05-01 12:55:32 +0000
committerFlorian Kagerer2010-05-01 12:55:32 +0000
commit45debce66eff7e57e71b83f8d1c4dd2066636355 (patch)
tree38410bf180a3297c0b4ed2711347c915e0a2aace
parenteb429872d855c95d9979a76d43a2fc5d2abcfe9e (diff)
downloadscummvm-rg350-45debce66eff7e57e71b83f8d1c4dd2066636355.tar.gz
scummvm-rg350-45debce66eff7e57e71b83f8d1c4dd2066636355.tar.bz2
scummvm-rg350-45debce66eff7e57e71b83f8d1c4dd2066636355.zip
KYRA: fixed some cppcheck warnings
svn-id: r48879
-rw-r--r--engines/kyra/sequences_hof.cpp6
-rw-r--r--engines/kyra/sound_towns.cpp5
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;