AVALANCHE: Add saving/loading during run time.

This commit is contained in:
uruk 2013-08-18 15:08:32 +02:00
parent c4891ace82
commit b591434940
2 changed files with 27 additions and 3 deletions

View File

@ -123,7 +123,7 @@ Common::Platform AvalancheEngine::getPlatform() const {
bool AvalancheEngine::hasFeature(EngineFeature f) const {
return false;
return (f == kSupportsSavingDuringRuntime) || (f == kSupportsLoadingDuringRuntime);
}
const char *AvalancheEngine::getCopyrightString() const {
@ -132,6 +132,24 @@ const char *AvalancheEngine::getCopyrightString() const {
bool AvalancheEngine::canSaveGameStateCurrently() {
return true;
}
Common::Error AvalancheEngine::saveGameState(int slot, const Common::String &desc) {
return Common::kNoError;
}
bool AvalancheEngine::canLoadGameStateCurrently() {
return true;
}
Common::Error AvalancheEngine::loadGameState(int slot, const Common::String &desc) {
return Common::kNoError;
}
void AvalancheEngine::updateEvents() {
Common::Event event;

View File

@ -111,10 +111,16 @@ public:
bool hasFeature(EngineFeature f) const;
const char *getCopyrightString() const;
virtual bool canSaveGameStateCurrently();
Common::Error saveGameState(int slot, const Common::String &desc);
virtual bool canLoadGameStateCurrently();
Common::Error loadGameState(int slot, const Common::String &desc);
void updateEvents();
bool getEvent(Common::Event &event); // A warpper around _eventMan->pollEvent(), se we can use it in Scrolls::normscroll() for example.
Common::Point getMousePos();
protected: