Skip to content

Commit

Permalink
MORTEVIELLE: Implemented ScummVM savegame functionality with metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster authored and Strangerke committed Apr 6, 2012
1 parent 394883a commit 86582b5
Show file tree
Hide file tree
Showing 9 changed files with 563 additions and 277 deletions.
27 changes: 26 additions & 1 deletion engines/mortevielle/detection.cpp
Expand Up @@ -25,6 +25,7 @@

#include "mortevielle/mortevielle.h"
#include "mortevielle/detection_tables.h"
#include "mortevielle/saveload.h"

namespace Mortevielle {
uint32 MortevielleEngine::getGameFlags() const { return _gameDescription->flags; }
Expand Down Expand Up @@ -52,6 +53,9 @@ class MortevielleMetaEngine : public AdvancedMetaEngine {

virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
virtual bool hasFeature(MetaEngineFeature f) const;
virtual int getMaximumSaveSlot() const;
virtual SaveStateList listSaves(const char *target) const;
virtual SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const;
};

bool MortevielleMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
Expand All @@ -62,9 +66,30 @@ bool MortevielleMetaEngine::createInstance(OSystem *syst, Engine **engine, const
}

bool MortevielleMetaEngine::hasFeature(MetaEngineFeature f) const {
return false;
switch (f) {
case kSupportsListSaves:
case kSupportsDeleteSave:
case kSupportsLoadingDuringStartup:
case kSavesSupportMetaInfo:
case kSavesSupportThumbnail:
case kSavesSupportCreationDate:
return true;
default:
return false;
}
}

int MortevielleMetaEngine::getMaximumSaveSlot() const { return 99; }

SaveStateList MortevielleMetaEngine::listSaves(const char *target) const {
return Mortevielle::SavegameManager::listSaves(target);
}

SaveStateDescriptor MortevielleMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
return Mortevielle::SavegameManager::querySaveMetaInfos(slot);
}


#if PLUGIN_ENABLED_DYNAMIC(MORTEVIELLE)
REGISTER_PLUGIN_DYNAMIC(MORTEVIELLE, PLUGIN_TYPE_ENGINE, MortevielleMetaEngine);
#else
Expand Down
157 changes: 0 additions & 157 deletions engines/mortevielle/disk.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion engines/mortevielle/module.mk
Expand Up @@ -6,7 +6,6 @@ MODULE_OBJS := \
asm.o \
boite.o \
detection.o \
disk.o \
droite.o \
graphics.o \
keyboard.o \
Expand All @@ -22,6 +21,7 @@ MODULE_OBJS := \
parole2.o \
prog.o \
ques.o \
saveload.o \
sound.o \
sprint.o \
taffich.o \
Expand Down

0 comments on commit 86582b5

Please sign in to comment.