- Save games are now listed from oldest to newest in the GMM load dialog for tinsel games, like in other engines

- Added some disabled code for saving through the GMM (still incomplete)

svn-id: r35316
This commit is contained in:
Filippos Karapetis 2008-12-12 15:48:38 +00:00
parent 63ddc1ba6f
commit cbdb105d8e
8 changed files with 71 additions and 24 deletions

View file

@ -429,11 +429,15 @@ static void DoSync(Serializer &s) {
/**
* DoRestore
*/
static bool DoRestore(void) {
static bool DoRestore(bool fromGMM) {
Common::InSaveFile *f;
uint32 id;
f = _vm->getSaveFileMan()->openForLoading(savedFiles[RestoreGameNumber].name);
if (!fromGMM)
f = _vm->getSaveFileMan()->openForLoading(savedFiles[RestoreGameNumber].name);
else
f = _vm->getSaveFileMan()->openForLoading(_vm->getSavegameFilename(RestoreGameNumber).c_str());
if (f == NULL) {
return false;
}
@ -515,7 +519,8 @@ save_failure:
void ProcessSRQueue(void) {
switch (SRstate) {
case SR_DORESTORE:
if (DoRestore()) {
case SR_DORESTORE_GMM:
if (DoRestore(SRstate == SR_DORESTORE_GMM)) {
DoRestoreScene(srsd, false);
}
SRstate = SR_IDLE;
@ -542,7 +547,7 @@ void RequestSaveGame(char *name, char *desc, SAVED_DATA *sd, int *pSsCount, SAVE
SRstate = SR_DOSAVE;
}
void RequestRestoreGame(int num, SAVED_DATA *sd, int *pSsCount, SAVED_DATA *pSsData) {
void RequestRestoreGame(int num, SAVED_DATA *sd, int *pSsCount, SAVED_DATA *pSsData, bool fromGMM) {
if (TinselV2) {
if (num == -1)
return;
@ -558,7 +563,7 @@ void RequestRestoreGame(int num, SAVED_DATA *sd, int *pSsCount, SAVED_DATA *pSsD
SaveSceneSsCount = pSsCount;
SaveSceneSsData = (char *)pSsData;
srsd = sd;
SRstate = SR_DORESTORE;
SRstate = (!fromGMM) ? SR_DORESTORE : SR_DORESTORE_GMM;
}
/**