WAGE: Support extended save states

This commit is contained in:
Eugene Sandulenko 2023-09-10 14:18:14 +02:00
parent da98116a44
commit b7b7808b37
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
2 changed files with 5 additions and 6 deletions

View File

@ -29,7 +29,7 @@
#include "wage/wage.h"
namespace Wage {
uint32 WageEngine::getFeatures() {
return _gameDescription->flags;
}
@ -55,11 +55,8 @@ public:
};
bool WageMetaEngine::hasFeature(MetaEngineFeature f) const {
return
(f == kSupportsListSaves) ||
(f == kSupportsLoadingDuringStartup) ||
(f == kSupportsDeleteSave) ||
(f == kSimpleSavesNames);
return checkExtendedSaves(f) ||
(f == kSupportsLoadingDuringStartup);
}
bool Wage::WageEngine::hasFeature(EngineFeature f) const {

View File

@ -363,6 +363,8 @@ int WageEngine::saveGame(const Common::String &fileName, const Common::String &d
// so these would be the last 4 bytes of the file
out->writeUint32BE(WAGEflag);
g_engine->getMetaEngine()->appendExtendedSave(out, g_engine->getTotalPlayTime(), description, fileName.contains("auto"));
out->finalize();
if (out->err()) {
warning("Can't write file '%s'. (Disk full?)", fileName.c_str());