diff options
-rw-r--r-- | gui/ListWidget.cpp | 2 | ||||
-rw-r--r-- | scumm/debug.cpp | 2 | ||||
-rw-r--r-- | scumm/smush/codec47.cpp | 2 | ||||
-rw-r--r-- | scumm/smush/imuse_channel.cpp | 4 | ||||
-rw-r--r-- | scumm/smush/saud_channel.cpp | 16 | ||||
-rw-r--r-- | simon/simon.cpp | 7 |
6 files changed, 17 insertions, 16 deletions
diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index 13ce14e833..22d68c74d1 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -206,7 +206,7 @@ void ListWidget::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { switch (cmd) { case kSetPositionCmd: - if (_currentPos != data) { + if (_currentPos != (int)data) { _currentPos = data; draw(); } diff --git a/scumm/debug.cpp b/scumm/debug.cpp index 6957f13bf4..1f37e01df6 100644 --- a/scumm/debug.cpp +++ b/scumm/debug.cpp @@ -270,7 +270,7 @@ void ScummDebugger::printActors(int act) printf("|%2d|%4d|%3d %3d|%4d|%3d|%5d|%3d|%3d|%2d|%5d|%5d|%3d|%3d|$%02x|\n", a->number, a->room, a->x, a->y, a->elevation, a->costume, a->width, a->walkbox, a->moving, a->forceClip, a->frame, - a->scalex, a->speedx, a->facing, _s->_classData[a->number]); + a->scalex, a->speedx, a->facing, int(_s->_classData[a->number]&0xFF)); } } printf("+--------------------------------------------------------------+\n"); diff --git a/scumm/smush/codec47.cpp b/scumm/smush/codec47.cpp index 92c0c14d3f..16f2145ec9 100644 --- a/scumm/smush/codec47.cpp +++ b/scumm/smush/codec47.cpp @@ -28,7 +28,7 @@ DumpDecoder::~DumpDecoder() { } bool DumpDecoder::decode(Blitter & dst, Chunk & src) { - int n = 0, i = 0; + int i = 0; int seq = src.getWord(); int codec = src.getByte(); int flags = src.getByte(); diff --git a/scumm/smush/imuse_channel.cpp b/scumm/smush/imuse_channel.cpp index 43d17a60f4..94aab12519 100644 --- a/scumm/smush/imuse_channel.cpp +++ b/scumm/smush/imuse_channel.cpp @@ -193,10 +193,10 @@ void ImuseChannel::decode() { } bool ImuseChannel::handleSubTags(int & offset) { - int available_size = _tbufferSize - offset; - if(available_size >= 8) { + if(_tbufferSize - offset >= 8) { Chunk::type type = READ_BE_UINT32(_tbuffer + offset); unsigned int size = READ_BE_UINT32(_tbuffer + offset + 4); + unsigned int available_size = _tbufferSize - offset; switch(type) { case TYPE_MAP_: _inData = false; diff --git a/scumm/smush/saud_channel.cpp b/scumm/smush/saud_channel.cpp index 8e5480c3a1..36f06f2832 100644 --- a/scumm/smush/saud_channel.cpp +++ b/scumm/smush/saud_channel.cpp @@ -47,10 +47,10 @@ void SaudChannel::handleShdr(Chunk & b) { } bool SaudChannel::handleSubTags(int & offset) { - int available_size = _tbufferSize - offset; - if(available_size >= 8) { + if(_tbufferSize - offset >= 8) { Chunk::type type = READ_BE_UINT32(_tbuffer + offset); unsigned int size = READ_BE_UINT32(_tbuffer + offset + 4); + unsigned int available_size = _tbufferSize - offset; switch(type) { case TYPE_STRK: @@ -166,14 +166,14 @@ SaudChannel::SaudChannel(int track, int freq) : _track(track), _nbframes(0), _dataSize(-1), - _tbuffer(0), - _sbuffer(0), _frequency(freq), - _tbufferSize(0), - _sbufferSize(0), _inData(false), - _markReached(false) - { + _markReached(false), + _tbuffer(0), + _tbufferSize(0), + _sbuffer(0), + _sbufferSize(0) +{ } SaudChannel::~SaudChannel() { diff --git a/simon/simon.cpp b/simon/simon.cpp index 2e24facc48..da4b0ad0d1 100644 --- a/simon/simon.cpp +++ b/simon/simon.cpp @@ -4127,7 +4127,7 @@ void SimonState::openGameFile() resfile_read(_game_offsets_ptr, 0, gss->NUM_GAME_OFFSETS * sizeof(uint32)); #if defined(SCUMM_BIG_ENDIAN) - for (int r = 0; r < gss->NUM_GAME_OFFSETS; r++) + for (uint r = 0; r < gss->NUM_GAME_OFFSETS; r++) _game_offsets_ptr[r] = READ_LE_UINT32(&_game_offsets_ptr[r]); #endif } @@ -4716,11 +4716,12 @@ void SimonState::initSound() } #if defined(SCUMM_BIG_ENDIAN) - for (int r = 0; r < gss->NUM_VOICE_RESOURCES; r++) + uint r; + for (r = 0; r < gss->NUM_VOICE_RESOURCES; r++) _voice_offsets[r] = READ_LE_UINT32(&_voice_offsets[r]); if (_effects_offsets) - for (int r = 0; r < gss->NUM_EFFECTS_RESOURCES; r++) + for (r = 0; r < gss->NUM_EFFECTS_RESOURCES; r++) _effects_offsets[r] = READ_LE_UINT32(&_effects_offsets[r]); #endif } |