diff options
author | Paul Gilbert | 2014-05-03 13:20:29 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-05-03 13:20:29 -0400 |
commit | 800ff80c52523fd044df3aa879caddb8a617134c (patch) | |
tree | e700ab3d78e1f95fed90df29ef92fbf55dd4ac8c /engines/mads | |
parent | 84159c59efe95c682d4d727f48e93b08a93860da (diff) | |
download | scummvm-rg350-800ff80c52523fd044df3aa879caddb8a617134c.tar.gz scummvm-rg350-800ff80c52523fd044df3aa879caddb8a617134c.tar.bz2 scummvm-rg350-800ff80c52523fd044df3aa879caddb8a617134c.zip |
MADS: Default to first inventory item after loading a savegame
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/game.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/mads/game.cpp b/engines/mads/game.cpp index 862ecf9a54..65790d3c3d 100644 --- a/engines/mads/game.cpp +++ b/engines/mads/game.cpp @@ -491,12 +491,15 @@ void Game::loadGame(int slotNumber) { synchronize(s, true); // Set up section/scene and other initial states for post-load - _scene._userInterface._selectedInvIndex = -1; _currentSectionNumber = -2; _scene._currentSceneId = -2; _sectionNumber = _scene._nextSceneId / 100; _scene._frameStartTime = _vm->_events->getFrameCounter(); + // Default the selected inventory item to the first one, if the player has any + _scene._userInterface._selectedInvIndex = _objects._inventoryList.size() > 0 ? 0 : -1; + + // Set player sprites sets flags _player._spritesLoaded = false; _player._spritesChanged = true; } |