mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
PINK: change pause/unpause to pause method with parameter
This commit is contained in:
parent
127e2fdf55
commit
a531381f2b
@ -42,8 +42,7 @@ public:
|
||||
|
||||
Actor *getActor() { return _actor; }
|
||||
|
||||
virtual void pause() {};
|
||||
virtual void unpause() {};
|
||||
virtual void pause(bool paused) {};
|
||||
|
||||
protected:
|
||||
Actor *_actor;
|
||||
|
@ -82,12 +82,8 @@ ActionCEL::~ActionCEL() {
|
||||
end();
|
||||
}
|
||||
|
||||
void ActionCEL::pause() {
|
||||
_decoder->pauseVideo(1);
|
||||
}
|
||||
|
||||
void ActionCEL::unpause() {
|
||||
_decoder->pauseVideo(0);
|
||||
void ActionCEL::pause(bool paused) {
|
||||
_decoder->pauseVideo(paused);
|
||||
}
|
||||
|
||||
} // End of namespace Pink
|
||||
|
@ -44,9 +44,7 @@ public:
|
||||
|
||||
virtual bool initPalette(Director *director);
|
||||
|
||||
void pause() override;
|
||||
|
||||
void unpause() override;
|
||||
void pause(bool paused) override;
|
||||
|
||||
protected:
|
||||
virtual void onStart() {};
|
||||
|
@ -85,14 +85,9 @@ void ActionSound::update() {
|
||||
_actor->endAction();
|
||||
}
|
||||
|
||||
void ActionSound::pause() {
|
||||
void ActionSound::pause(bool paused) {
|
||||
if (_sound)
|
||||
_sound->pause();
|
||||
}
|
||||
|
||||
void ActionSound::unpause() {
|
||||
if (_sound)
|
||||
_sound->resume();
|
||||
_sound->pause(paused);
|
||||
}
|
||||
|
||||
} // End of namespace Pink
|
||||
|
@ -42,8 +42,7 @@ public:
|
||||
virtual void end();
|
||||
virtual void update();
|
||||
|
||||
void pause() override;
|
||||
void unpause() override;
|
||||
void pause(bool paused) override;
|
||||
|
||||
private:
|
||||
Sound *_sound;
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
virtual void toConsole();
|
||||
|
||||
virtual void end();
|
||||
virtual void pause(bool paused) {}
|
||||
|
||||
protected:
|
||||
virtual void onStart();
|
||||
|
@ -60,16 +60,10 @@ void ActionTalk::end() {
|
||||
_sound = nullptr;
|
||||
}
|
||||
|
||||
void ActionTalk::pause() {
|
||||
ActionCEL::pause();
|
||||
void ActionTalk::pause(bool paused) {
|
||||
ActionCEL::pause(paused);
|
||||
if (_sound)
|
||||
_sound->pause();
|
||||
}
|
||||
|
||||
void ActionTalk::unpause() {
|
||||
ActionCEL::unpause();
|
||||
if (_sound)
|
||||
_sound->resume();
|
||||
_sound->pause(paused);
|
||||
}
|
||||
|
||||
} // End of namespace Pink
|
||||
|
@ -37,8 +37,7 @@ public:
|
||||
|
||||
virtual void end();
|
||||
|
||||
void pause() override;
|
||||
void unpause() override;
|
||||
void pause(bool paused) override;
|
||||
|
||||
protected:
|
||||
virtual void onStart();
|
||||
|
@ -39,7 +39,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void pause() {}
|
||||
void pause(bool paused) override {}
|
||||
};
|
||||
|
||||
} // End of namespace Pink
|
||||
|
@ -83,15 +83,9 @@ void Page::clear() {
|
||||
_resMgr.clear();
|
||||
}
|
||||
|
||||
void Page::pause() {
|
||||
void Page::pause(bool paused) {
|
||||
for (uint i = 0; i < _actors.size(); ++i) {
|
||||
_actors[i]->pause();
|
||||
}
|
||||
}
|
||||
|
||||
void Page::unpause() {
|
||||
for (uint i = 0; i < _actors.size(); ++i) {
|
||||
_actors[i]->unpause();
|
||||
_actors[i]->pause(paused);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -47,8 +47,7 @@ public:
|
||||
CelDecoder *loadCel(Common::String &fileName);
|
||||
|
||||
virtual void clear();
|
||||
void pause();
|
||||
void unpause();
|
||||
void pause(bool paused);
|
||||
|
||||
PinkEngine *getGame();
|
||||
|
||||
|
@ -34,7 +34,7 @@ Sound::Sound(Audio::Mixer *mixer, Common::SafeSeekableSubReadStream *stream)
|
||||
: _mixer(mixer), _fileStream(stream) {}
|
||||
|
||||
Sound::~Sound() {
|
||||
stop();
|
||||
_mixer->stopHandle(_handle);
|
||||
delete _fileStream;
|
||||
}
|
||||
|
||||
@ -42,16 +42,8 @@ bool Sound::isPlaying() {
|
||||
return _mixer->isSoundHandleActive(_handle);
|
||||
}
|
||||
|
||||
void Sound::pause() {
|
||||
_mixer->pauseHandle(_handle, true);
|
||||
}
|
||||
|
||||
void Sound::resume() {
|
||||
_mixer->pauseHandle(_handle, false);
|
||||
}
|
||||
|
||||
void Sound::stop() {
|
||||
_mixer->stopHandle(_handle);
|
||||
void Sound::pause(bool paused) {
|
||||
_mixer->pauseHandle(_handle, paused);
|
||||
}
|
||||
|
||||
void Sound::play(Audio::Mixer::SoundType type, int volume, bool isLoop) {
|
||||
|
@ -45,9 +45,7 @@ public:
|
||||
|
||||
bool isPlaying();
|
||||
|
||||
void pause();
|
||||
void resume();
|
||||
void stop();
|
||||
void pause(bool paused);
|
||||
|
||||
uint32 getCurrentSample();
|
||||
void setBalance(int8 balance);
|
||||
|
Loading…
Reference in New Issue
Block a user