mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-07 10:21:31 +00:00
parent
4952a6fb04
commit
b57c205e30
@ -348,16 +348,15 @@ void listSavegames(Common::Array<SavegameDesc> &saves) {
|
|||||||
for (Common::StringArray::const_iterator iter = saveNames.begin(); iter != saveNames.end(); ++iter) {
|
for (Common::StringArray::const_iterator iter = saveNames.begin(); iter != saveNames.end(); ++iter) {
|
||||||
const Common::String &filename = *iter;
|
const Common::String &filename = *iter;
|
||||||
|
|
||||||
#ifdef ENABLE_SCI32
|
// exclude new game and autosave slots, except for QFG3/4,
|
||||||
// exclude new game and autosave slots, except for QFG4,
|
|
||||||
// whose autosave should appear as a normal saved game
|
// whose autosave should appear as a normal saved game
|
||||||
if (g_sci->getGameId() != GID_QFG4) {
|
if (g_sci->getGameId() != GID_QFG3 &&
|
||||||
|
g_sci->getGameId() != GID_QFG4) {
|
||||||
const int id = strtol(filename.end() - 3, NULL, 10);
|
const int id = strtol(filename.end() - 3, NULL, 10);
|
||||||
if (id == kNewGameId || id == kAutoSaveId) {
|
if (id == kNewGameId || id == kAutoSaveId) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
SavegameDesc desc;
|
SavegameDesc desc;
|
||||||
if (fillSavegameDesc(filename, desc)) {
|
if (fillSavegameDesc(filename, desc)) {
|
||||||
|
@ -403,7 +403,8 @@ void GuestAdditions::patchGameSaveRestoreSCI16() const {
|
|||||||
uint16 selectorId = patchObjectSave->getFuncSelector(methodNr);
|
uint16 selectorId = patchObjectSave->getFuncSelector(methodNr);
|
||||||
Common::String methodName = _kernel->getSelectorName(selectorId);
|
Common::String methodName = _kernel->getSelectorName(selectorId);
|
||||||
if (methodName == "save") {
|
if (methodName == "save") {
|
||||||
if (g_sci->getGameId() != GID_FAIRYTALES) { // Fairy Tales saves automatically without a dialog
|
if (g_sci->getGameId() != GID_FAIRYTALES && // Fairy Tales saves automatically without a dialog
|
||||||
|
g_sci->getGameId() != GID_QFG3) { // QFG3 does automatic saving in Glory:save
|
||||||
patchKSaveRestore(_segMan, patchObjectSave->getFunction(methodNr), kernelIdSave);
|
patchKSaveRestore(_segMan, patchObjectSave->getFunction(methodNr), kernelIdSave);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1105,6 +1105,20 @@ reg_t kSaveGame(EngineState *s, int argc, reg_t *argv) {
|
|||||||
// Jones has one save slot only
|
// Jones has one save slot only
|
||||||
savegameId = 0;
|
savegameId = 0;
|
||||||
break;
|
break;
|
||||||
|
case GID_QFG3: {
|
||||||
|
// Auto-save system used by QFG3
|
||||||
|
reg_t autoSaveNameId;
|
||||||
|
SciArray &autoSaveName = *s->_segMan->allocateArray(kArrayTypeString, kMaxSaveNameLength, &autoSaveNameId);
|
||||||
|
MessageTuple autoSaveNameTuple(0, 0, 16, 1);
|
||||||
|
s->_msgState->getMessage(0, autoSaveNameTuple, autoSaveNameId);
|
||||||
|
|
||||||
|
if (game_description == autoSaveName.toString()) {
|
||||||
|
savegameId = kAutoSaveId;
|
||||||
|
}
|
||||||
|
|
||||||
|
s->_segMan->freeArray(autoSaveNameId);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case GID_FANMADE: {
|
case GID_FANMADE: {
|
||||||
// Fanmade game, try to identify the game
|
// Fanmade game, try to identify the game
|
||||||
const char *gameName = g_sci->getGameObjectName();
|
const char *gameName = g_sci->getGameObjectName();
|
||||||
|
Loading…
Reference in New Issue
Block a user