diff options
author | Paul Gilbert | 2016-07-22 12:44:14 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-22 12:44:14 -0400 |
commit | 41a3c83bc6444550c9e4ea1a5918450403e0e5ee (patch) | |
tree | 48d239603882bcc3d39713dabab96db822b1c528 /engines/titanic/pet_control/pet_load_save.cpp | |
parent | 4ff421570679621db76cca59315a036bf64a6550 (diff) | |
download | scummvm-rg350-41a3c83bc6444550c9e4ea1a5918450403e0e5ee.tar.gz scummvm-rg350-41a3c83bc6444550c9e4ea1a5918450403e0e5ee.tar.bz2 scummvm-rg350-41a3c83bc6444550c9e4ea1a5918450403e0e5ee.zip |
TITANIC: Fleshing out PET RealLife Load functionality
Diffstat (limited to 'engines/titanic/pet_control/pet_load_save.cpp')
-rw-r--r-- | engines/titanic/pet_control/pet_load_save.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/engines/titanic/pet_control/pet_load_save.cpp b/engines/titanic/pet_control/pet_load_save.cpp index 17e6f5eee5..77b6126249 100644 --- a/engines/titanic/pet_control/pet_load_save.cpp +++ b/engines/titanic/pet_control/pet_load_save.cpp @@ -81,16 +81,6 @@ bool CPetLoadSave::MouseButtonDownMsg(const Point &pt) { return false; } -bool CPetLoadSave::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { - if (_btnLoadSave.MouseButtonUpMsg(msg->_mousePos)) { - execute(); - resetSlots(); - return true; - } else { - return false; - } -} - bool CPetLoadSave::KeyCharMsg(Common::KeyCode key) { switch (key) { case Common::KEYCODE_TAB: @@ -128,6 +118,7 @@ Rect CPetLoadSave::getSlotBounds(int index) { void CPetLoadSave::resetSlots() { for (int idx = 0; idx < SAVEGAME_SLOTS_COUNT; ++idx) { _slotNames[idx].setText("Empty"); + _slotInUse[idx] = false; // Try and open up the savegame for access Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading( @@ -139,16 +130,17 @@ void CPetLoadSave::resetSlots() { file.open(in); TitanicSavegameHeader header; - CProjectItem::readSavegameHeader(&file, header); + if (CProjectItem::readSavegameHeader(&file, header)) { + _slotInUse[idx] = true; + _slotNames[idx].setText(header._saveName); + } + if (header._thumbnail) { header._thumbnail->free(); delete header._thumbnail; } file.close(); - - // Set the name text - _slotNames[idx].setText(header._saveName); } } |