diff options
author | Sven Hesse | 2009-09-01 21:08:42 +0000 |
---|---|---|
committer | Sven Hesse | 2009-09-01 21:08:42 +0000 |
commit | eaedf892e66e4f120a2c799cb776bf663d5377fe (patch) | |
tree | 607233c70f71629612850a8a2a0d4ddf3579fd19 | |
parent | aeb1c39f47052945037ad792038eaabe0f197843 (diff) | |
download | scummvm-rg350-eaedf892e66e4f120a2c799cb776bf663d5377fe.tar.gz scummvm-rg350-eaedf892e66e4f120a2c799cb776bf663d5377fe.tar.bz2 scummvm-rg350-eaedf892e66e4f120a2c799cb776bf663d5377fe.zip |
Fixing warnings and adding a warning should the ID be something yet unknown, just in case
svn-id: r43899
-rw-r--r-- | engines/gob/map_v2.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/gob/map_v2.cpp b/engines/gob/map_v2.cpp index 69227b6bf3..42565161e3 100644 --- a/engines/gob/map_v2.cpp +++ b/engines/gob/map_v2.cpp @@ -54,7 +54,6 @@ void Map_v2::loadMapObjects(const char *avjFile) { byte *variables; uint32 tmpPos; uint32 passPos; - uint16 i; var = _vm->_game->_script->readVarIndex(); variables = _vm->_inter->_variables->getAddressOff8(var); @@ -64,15 +63,15 @@ void Map_v2::loadMapObjects(const char *avjFile) { if (((uint16) id) >= 65520) { switch ((uint16) id) { case 65530: - for (i = 0; i < _mapWidth * _mapHeight; i++) + for (int i = 0; i < _mapWidth * _mapHeight; i++) _passMap[i] -= READ_VARO_UINT8(var + i); break; case 65531: - for (i = 0; i < _mapWidth * _mapHeight; i++) + for (int i = 0; i < _mapWidth * _mapHeight; i++) _passMap[i] += READ_VARO_UINT8(var + i); break; case 65532: - for (i = 0; i < _mapWidth * _mapHeight; i++) + for (int i = 0; i < _mapWidth * _mapHeight; i++) WRITE_VARO_UINT8(var + i, 0x00); break; case 65533: @@ -88,6 +87,9 @@ void Map_v2::loadMapObjects(const char *avjFile) { case 65535: _passMap = (int8 *) _vm->_inter->_variables->getAddressOff8(var); break; + default: + warning("Map_v2::loadMapObjects(): ID == %d", (uint16) id); + break; } return; } |