diff options
| author | Johannes Schickel | 2011-11-13 20:54:13 +0100 | 
|---|---|---|
| committer | Johannes Schickel | 2011-11-13 20:57:41 +0100 | 
| commit | 7600751525441a1f68ebe89ec5d3756b55a17c3f (patch) | |
| tree | 548d7c7fcb0db0a2de3a724dc78a42b080b25c2c | |
| parent | c6c9620ff2a0ef8c7c7b074445a3886660f02bba (diff) | |
| download | scummvm-rg350-7600751525441a1f68ebe89ec5d3756b55a17c3f.tar.gz scummvm-rg350-7600751525441a1f68ebe89ec5d3756b55a17c3f.tar.bz2 scummvm-rg350-7600751525441a1f68ebe89ec5d3756b55a17c3f.zip | |
DRASCULA: Allow faster quit when in the mid of a conversation.
This allows quitting ScummVM in only a minimal time when a converstion is
running instead of waiting for it to finish. It is still not instant but much
better.
| -rw-r--r-- | engines/drascula/converse.cpp | 2 | ||||
| -rw-r--r-- | engines/drascula/drascula.cpp | 2 | ||||
| -rw-r--r-- | engines/drascula/talk.cpp | 5 | 
3 files changed, 7 insertions, 2 deletions
| diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp index 6f028e6e12..7abbb3214b 100644 --- a/engines/drascula/converse.cpp +++ b/engines/drascula/converse.cpp @@ -197,7 +197,7 @@ void DrasculaEngine::converse(int index) {  	// from 1(top) to 31  	color_abc(kColorLightGreen); -	while (breakOut == 0) { +	while (breakOut == 0 && !shouldQuit()) {  		updateRoom();  		if (musicStatus() == 0 && roomMusic != 0) { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 5f4e5c5ca9..1b3c4038f0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -789,7 +789,7 @@ void DrasculaEngine::delay(int ms) {  		_system->delayMillis(10);  		updateEvents();  		_system->updateScreen(); -	} while (_system->getMillis() < end); +	} while (_system->getMillis() < end && !shouldQuit());  }  void DrasculaEngine::pause(int duration) { diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 6d1509fe3c..c97191fc0a 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -34,6 +34,11 @@ void DrasculaEngine::talkInit(const char *filename) {  }  bool DrasculaEngine::isTalkFinished() { +	if (shouldQuit()) { +		stopSound(); +		return true; +	} +  	if (getScan() != 0)  		stopSound();  	if (soundIsActive()) | 
