mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
GLK: QUEST: Support loading savegames from the launcher
This commit is contained in:
parent
13de2f1771
commit
f4b12285d0
@ -63,7 +63,8 @@ void draw_banner() {
|
||||
}
|
||||
|
||||
void glk_put_cstring(const char *s) {
|
||||
g_vm->glk_put_string(s);
|
||||
if (!g_vm->loadingSavegame())
|
||||
g_vm->glk_put_string(s);
|
||||
}
|
||||
|
||||
GeasResult GeasGlkInterface::print_normal(const String &s) {
|
||||
|
@ -55,7 +55,20 @@ void Quest::playGame() {
|
||||
char cur_buf[1024];
|
||||
char buf[200];
|
||||
|
||||
// Check for savegame to load immediate
|
||||
_saveSlot = ConfMan.hasKey("save_slot") ? ConfMan.getInt("save_slot") : -1;
|
||||
|
||||
// Set initial game state
|
||||
_runner->set_game(String(getFilename().c_str()));
|
||||
|
||||
if (_saveSlot != -1) {
|
||||
int saveSlot = _saveSlot;
|
||||
_saveSlot = -1;
|
||||
|
||||
if (loadGameState(saveSlot).getCode() == Common::kNoError)
|
||||
_runner->run_command("look");
|
||||
}
|
||||
|
||||
banner = _runner->get_banner();
|
||||
draw_banner();
|
||||
|
||||
|
@ -95,6 +95,11 @@ public:
|
||||
* Savegames aren't supported for Quest games
|
||||
*/
|
||||
virtual Common::Error writeGameData(Common::WriteStream *ws) override;
|
||||
|
||||
/**
|
||||
* Returns true if a savegame is being loaded directly from the ScummVM launcher
|
||||
*/
|
||||
bool loadingSavegame() const { return _saveSlot != -1; }
|
||||
};
|
||||
|
||||
extern Quest *g_vm;
|
||||
|
Loading…
x
Reference in New Issue
Block a user