void CPetSave::execute() { CPetControl *pet = getPetControl(); if (_savegameSlotNum >= 0) { highlightSlot(-1); CProjectItem *project = pet ? pet->getRoot() : nullptr; if (project) { project->saveGame(_savegameSlotNum, _slotNames[_savegameSlotNum].getText()); pet->displayMessage(BLANK); } } else if (pet) { pet->displayMessage(SELECT_GAME_TO_SAVE); } }
void CPetLoad::execute() { CPetControl *pet = getPetControl(); if (_savegameSlotNum >= 0 && _slotInUse[_savegameSlotNum]) { CMainGameWindow *window = g_vm->_window; // WORKAROUND: Schedule the savegame to be loaded after frame rendering ends window->loadGame(_savegameSlotNum); } else if (pet) { pet->displayMessage(SELECT_GAME_TO_LOAD); } }