diff options
author | Sven Hesse | 2006-05-31 13:43:23 +0000 |
---|---|---|
committer | Sven Hesse | 2006-05-31 13:43:23 +0000 |
commit | 086c3dfc762d4cf6f170a6194c93d3114d83b308 (patch) | |
tree | 371a045c3f44ff57c063247283311bcd9150991a /engines | |
parent | 85da5d8157c0e0faf80f6cb7e8f39a3230ab7bc9 (diff) | |
download | scummvm-rg350-086c3dfc762d4cf6f170a6194c93d3114d83b308.tar.gz scummvm-rg350-086c3dfc762d4cf6f170a6194c93d3114d83b308.tar.bz2 scummvm-rg350-086c3dfc762d4cf6f170a6194c93d3114d83b308.zip |
Use _mapWidth/_mapHeight instead of constant
svn-id: r22801
Diffstat (limited to 'engines')
-rw-r--r-- | engines/gob/goblin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp index f3bf22ad61..29d8ed38bd 100644 --- a/engines/gob/goblin.cpp +++ b/engines/gob/goblin.cpp @@ -1026,8 +1026,8 @@ void Goblin::moveFindItem(int16 posX, int16 posY) { break; } - _pressedMapX = MIN(posX / 12, 25); - _pressedMapY = MIN(posY / 6, 27); + _pressedMapX = MIN(posX / 12, _vm->_map->_mapWidth - 1); + _pressedMapY = MIN(posY / 6, _vm->_map->_mapHeight - 1); if (_vm->_map->_itemsMap[_pressedMapY][_pressedMapX] == 0 && i < 20) { |