From eaedf892e66e4f120a2c799cb776bf663d5377fe Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 1 Sep 2009 21:08:42 +0000 Subject: Fixing warnings and adding a warning should the ID be something yet unknown, just in case svn-id: r43899 --- engines/gob/map_v2.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engines') 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; } -- cgit v1.2.3