ADL: Move restartGame() into opcode

This commit is contained in:
Walter van Niftrik 2016-04-03 13:51:22 +02:00 committed by Walter van Niftrik
parent 97168fa200
commit 09146fba6e
4 changed files with 3 additions and 9 deletions

View File

@ -1070,7 +1070,9 @@ int AdlEngine::o1_restart(ScriptEnv &e) {
_isRestarting = true;
_display->clear(0x00);
_display->updateHiResScreen();
restartGame();
_display->printString(_strings.pressReturn);
initState();
_display->printAsciiString(_strings.lineFeeds);
return -1;
}

View File

@ -359,7 +359,6 @@ private:
virtual void runIntro() const { }
virtual void init() = 0;
virtual void initState() = 0;
virtual void restartGame() = 0;
virtual void drawItem(const Item &item, const Common::Point &pos) const = 0;
virtual void loadRoom(byte roomNr) = 0;
virtual void showRoom() = 0;

View File

@ -187,12 +187,6 @@ void HiRes2Engine::initState() {
}
}
void HiRes2Engine::restartGame() {
_display->printString(_strings.pressReturn);
initState();
_display->printAsciiString(_strings.lineFeeds);
}
Engine *HiRes2Engine_create(OSystem *syst, const AdlGameDescription *gd) {
return new HiRes2Engine(syst, gd);
}

View File

@ -59,7 +59,6 @@ private:
void runIntro() const;
void init();
void initState();
void restartGame();
};
} // End of namespace Adl