diff options
author | Filippos Karapetis | 2019-10-05 15:49:26 +0300 |
---|---|---|
committer | Filippos Karapetis | 2019-10-05 15:49:26 +0300 |
commit | 2df38d8b2c4615ab35cee9a2607255803c1bf573 (patch) | |
tree | bd90526671dddbf247fea1fa6fd6944ff5b37fb0 /engines/sci | |
parent | a3f6b942512d332fafa6d00aa7d1f75cc7a776dd (diff) | |
download | scummvm-rg350-2df38d8b2c4615ab35cee9a2607255803c1bf573.tar.gz scummvm-rg350-2df38d8b2c4615ab35cee9a2607255803c1bf573.tar.bz2 scummvm-rg350-2df38d8b2c4615ab35cee9a2607255803c1bf573.zip |
SCI32: Handle the special Bridge save/load screens in Hoyle 5
Fixes saving/loading the Bridge hands using the ScummVM save/load
screens - bug #11174
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/guest_additions.cpp | 11 | ||||
-rw-r--r-- | engines/sci/engine/guest_additions.h | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/engines/sci/engine/guest_additions.cpp b/engines/sci/engine/guest_additions.cpp index 8cf8c0505a..cf70608acc 100644 --- a/engines/sci/engine/guest_additions.cpp +++ b/engines/sci/engine/guest_additions.cpp @@ -527,6 +527,10 @@ reg_t GuestAdditions::kScummVMSaveLoad(EngineState *s, int argc, reg_t *argv) co return promptSaveRestoreRama(s, argc, argv); } + if (g_sci->getGameId() == GID_HOYLE5) { + return promptSaveRestoreHoyle5(s, argc, argv); + } + return promptSaveRestoreDefault(s, argc, argv); } @@ -715,6 +719,13 @@ int GuestAdditions::runSaveRestore(const bool isSave, reg_t outDescription, cons return saveNo; } +reg_t GuestAdditions::promptSaveRestoreHoyle5(EngineState *s, int argc, reg_t *argv) const { + assert(argc == 2); + Common::String callerName = s->_segMan->getObjectName(s->r_acc); + const bool isSave = (callerName == "Save"); + return make_reg(0, runSaveRestore(isSave, argc > 0 ? argv[0] : NULL_REG, s->_delayedRestoreGameId)); +} + #endif #pragma mark - diff --git a/engines/sci/engine/guest_additions.h b/engines/sci/engine/guest_additions.h index b49fe9d283..b889c49ff1 100644 --- a/engines/sci/engine/guest_additions.h +++ b/engines/sci/engine/guest_additions.h @@ -257,6 +257,12 @@ private: reg_t promptSaveRestoreRama(EngineState *s, int argc, reg_t *argv) const; /** + * Prompts for a save game and returns it to game scripts using Hoyle 5's + * custom SRDialog class semantics. + */ + reg_t promptSaveRestoreHoyle5(EngineState *s, int argc, reg_t *argv) const; + + /** * Prompts the user to save or load a game. * * @param isSave If true, the prompt is for saving. |