PINK: add improved pause support

This commit is contained in:
whiterandrek 2018-05-25 21:15:46 +03:00 committed by Eugene Sandulenko
parent 4f13df4828
commit 1df85834a8
4 changed files with 16 additions and 0 deletions

View File

@ -139,4 +139,10 @@ Actor *Director::getActorByPoint(Common::Point point) {
return nullptr;
}
void Director::pause(bool pause) {
for (uint i = 0; i < _sprites.size() ; ++i) {
_sprites[i]->getDecoder()->pauseVideo(pause);
}
}
}

View File

@ -51,6 +51,8 @@ public:
void clear();
void pause(bool pause);
bool showBounds;
private:

View File

@ -291,6 +291,11 @@ bool PinkEngine::hasFeature(Engine::EngineFeature f) const {
f == kSupportsSavingDuringRuntime;
}
void PinkEngine::pauseEngineIntern(bool pause) {
Engine::pauseEngineIntern(pause);
_director.pause(pause);
}
Common::String generateSaveName(int slot, const char *gameId) {
return Common::String::format("%s.s%02d", gameId, slot);
}

View File

@ -111,6 +111,9 @@ public:
void setVariable(Common::String &variable, Common::String &value);
bool checkValueOfVariable(Common::String &variable, Common::String &value);
protected:
virtual void pauseEngineIntern(bool pause);
private:
Common::Error init();
bool loadCursors();