KINGDOM: Sync with modern ScummVM

This commit is contained in:
Eugene Sandulenko 2020-05-29 00:14:13 +02:00
parent f4b43dde36
commit c828e7548b
3 changed files with 7 additions and 4 deletions

View File

@ -73,7 +73,10 @@ static const ADGameDescription gameDescriptions[] = {
class KingdomMetaEngine : public AdvancedMetaEngine {
public:
KingdomMetaEngine() : AdvancedMetaEngine(Kingdom::gameDescriptions, sizeof(ADGameDescription), kingdomGames) {
_singleId = "kingdom";
}
const char *getEngineId() const override {
return "kingdom";
}
virtual const char *getName() const {

View File

@ -716,7 +716,7 @@ void KingdomGame::restoreGame() {
loadGameState(savegameId);
}
Common::Error KingdomGame::saveGameState(int slot, const Common::String &desc) {
Common::Error KingdomGame::saveGameState(int slot, const Common::String &desc, bool isAutosave) {
Common::String savegameFile = getSavegameFilename(slot);
Common::SaveFileManager *saveMan = g_system->getSavefileManager();
Common::OutSaveFile *out = saveMan->openForSaving(savegameFile);
@ -1411,7 +1411,7 @@ int KingdomGame::getAKey() {
while (g_system->getEventManager()->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_QUIT:
case Common::EVENT_RTL:
case Common::EVENT_RETURN_TO_LAUNCHER:
_quit = true;
break;

View File

@ -236,7 +236,7 @@ namespace Kingdom {
void saveGame();
void restoreGame();
virtual Common::Error loadGameState(int slot);
virtual Common::Error saveGameState(int slot, const Common::String &desc);
virtual Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false);
Common::String getSavegameFilename(int slot);
void writeSavegameHeader(Common::OutSaveFile *out, KingdomSavegameHeader &header);
void synchronize(Common::Serializer &s);