mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-24 13:13:58 +00:00
XEEN: Implement save manager save/load methods
This commit is contained in:
parent
ac7ec1febe
commit
6160f3842c
@ -24,8 +24,10 @@
|
|||||||
#include "common/algorithm.h"
|
#include "common/algorithm.h"
|
||||||
#include "common/memstream.h"
|
#include "common/memstream.h"
|
||||||
#include "common/substream.h"
|
#include "common/substream.h"
|
||||||
|
#include "common/translation.h"
|
||||||
#include "graphics/scaler.h"
|
#include "graphics/scaler.h"
|
||||||
#include "graphics/thumbnail.h"
|
#include "graphics/thumbnail.h"
|
||||||
|
#include "gui/saveload.h"
|
||||||
#include "xeen/saves.h"
|
#include "xeen/saves.h"
|
||||||
#include "xeen/files.h"
|
#include "xeen/files.h"
|
||||||
#include "xeen/xeen.h"
|
#include "xeen/xeen.h"
|
||||||
@ -222,13 +224,32 @@ Common::String SavesManager::generateSaveName(int slot) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SavesManager::loadGame() {
|
bool SavesManager::loadGame() {
|
||||||
// TODO
|
if (!g_vm->canLoadGameStateCurrently())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Load game:"), _("Load"), false);
|
||||||
|
int slotNum = dialog->runModalWithCurrentTarget();
|
||||||
|
delete dialog;
|
||||||
|
|
||||||
|
if (slotNum != -1)
|
||||||
|
loadGameState(slotNum);
|
||||||
|
|
||||||
|
return slotNum != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SavesManager::saveGame() {
|
bool SavesManager::saveGame() {
|
||||||
// TODO
|
if (!g_vm->canSaveGameStateCurrently())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
|
||||||
|
int slotNum = dialog->runModalWithCurrentTarget();
|
||||||
|
Common::String saveName = dialog->getResultString();
|
||||||
|
delete dialog;
|
||||||
|
|
||||||
|
if (slotNum)
|
||||||
|
saveGameState(slotNum, saveName);
|
||||||
|
|
||||||
|
return slotNum != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // End of namespace Xeen
|
} // End of namespace Xeen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user