diff options
author | Paweł Kołodziejski | 2007-04-15 15:40:24 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2007-04-15 15:40:24 +0000 |
commit | ae7c6406712dcc5f3567caaab9b2f95c379c9c10 (patch) | |
tree | e0223e8113964b9dbf51198ead8dfbf850cbe1e2 /engines/gob | |
parent | ac7b134565b351d1b8d5e100e964cd35788387c9 (diff) | |
download | scummvm-rg350-ae7c6406712dcc5f3567caaab9b2f95c379c9c10.tar.gz scummvm-rg350-ae7c6406712dcc5f3567caaab9b2f95c379c9c10.tar.bz2 scummvm-rg350-ae7c6406712dcc5f3567caaab9b2f95c379c9c10.zip |
fixed warnings
svn-id: r26506
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/draw_v2.cpp | 2 | ||||
-rw-r--r-- | engines/gob/game.cpp | 2 | ||||
-rw-r--r-- | engines/gob/inter_v2.cpp | 8 | ||||
-rw-r--r-- | engines/gob/sound.cpp | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 6b7b1db0fd..56757bb106 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -558,7 +558,7 @@ void Draw_v2::spriteOperation(int16 operation) { // Some handle, but always assigned to -1 in Game::loadTotFile() int16 word_2F2D2 = -1; - deltaVeto = (bool) (operation & 0x10); + deltaVeto = (operation & 0x10) != 0; operation &= 0x0F; if (_sourceSurface >= 100) diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index f146cded6d..4bc95d78cf 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -133,7 +133,7 @@ byte *Game::loadExtData(int16 itemId, int16 *pResWidth, offset = item->offset; size = item->size; - isPacked = (bool) (item->width & 0x8000); + isPacked = (item->width & 0x8000) != 0; if (pResWidth != 0) { *pResWidth = item->width & 0x7FFF; diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 5dc5edd823..d0677757d5 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -2004,12 +2004,12 @@ void Inter_v2::o2_stopInfogrames(OpGobParams ¶ms) { } void Inter_v2::o2_handleGoblins(OpGobParams ¶ms) { - _vm->_goblin->_gob1NoTurn = (bool) VAR(load16()); - _vm->_goblin->_gob2NoTurn = (bool) VAR(load16()); + _vm->_goblin->_gob1NoTurn = VAR(load16()) != 0; + _vm->_goblin->_gob2NoTurn = VAR(load16()) != 0; _vm->_goblin->_gob1RelaxTimeVar = load16(); _vm->_goblin->_gob2RelaxTimeVar = load16(); - _vm->_goblin->_gob1Busy = (bool) VAR(load16()); - _vm->_goblin->_gob2Busy = (bool) VAR(load16()); + _vm->_goblin->_gob1Busy = VAR(load16()) != 0; + _vm->_goblin->_gob2Busy = VAR(load16()) != 0; _vm->_goblin->handleGoblins(); } diff --git a/engines/gob/sound.cpp b/engines/gob/sound.cpp index 9759ea087e..b390510768 100644 --- a/engines/gob/sound.cpp +++ b/engines/gob/sound.cpp @@ -235,7 +235,7 @@ void Snd::stopSound(int16 fadeLength, SoundDesc *sndDesc) { _fade = true; _fadeVol = 65536; _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); - _fadeVolStep = MAX(1U, 65536 / _fadeSamples); + _fadeVolStep = MAX(1UL, 65536 / _fadeSamples); _curFadeSamples = 0; } @@ -341,7 +341,7 @@ void Snd::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, _fade = true; _fadeVol = 0; _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); - _fadeVolStep = - MAX(1U, 65536 / _fadeSamples); + _fadeVolStep = - (int32)MAX(1UL, 65536 / _fadeSamples); } } @@ -404,8 +404,8 @@ int Snd::readBuffer(int16 *buffer, const int numSamples) { // Linear interpolation. See sound/rate.cpp - val = _last + (((_cur - _last) * _offsetFrac + - (1UL << (FRAC_BITS - 1))) >> FRAC_BITS) << 8; + val = _last + ((((_cur - _last) * _offsetFrac + + (1UL << (FRAC_BITS - 1))) >> FRAC_BITS) << 8); *buffer++ = (((int32) val) * _fadeVol) >> 16; oldOffset = _offset; |