[Scummvm-git-logs] scummvm master -> de13dc6364f45d03a59b2746351c998f1d2e10e1
bluegr
noreply at scummvm.org
Wed Dec 29 16:09:19 UTC 2021
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
e13a72e8f6 BURIED: Also allow skipping synchronous sounds
889070f479 BURIED: Hide mouse pointer during cutscenes - FR #13172
ae8b436f22 BURIED: Cleanup variable usage
1d991bd10d BURIED: Group GUI options
de13dc6364 BURIED: Fix fallback in the latest video and audio skipping code
Commit: e13a72e8f69a903e0e3da240d6fb630e23338a66
https://github.com/scummvm/scummvm/commit/e13a72e8f69a903e0e3da240d6fb630e23338a66
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-12-29T18:08:49+02:00
Commit Message:
BURIED: Also allow skipping synchronous sounds
Changed paths:
engines/buried/biochip_right.cpp
engines/buried/buried.cpp
engines/buried/buried.h
engines/buried/demo/demo_menu.cpp
engines/buried/environ/agent3_lair.cpp
engines/buried/environ/ai_lab.cpp
engines/buried/environ/scene_common.cpp
engines/buried/frame_window.cpp
engines/buried/gameui.cpp
engines/buried/inventory_info.cpp
engines/buried/main_menu.cpp
engines/buried/scene_view.cpp
engines/buried/sound.cpp
engines/buried/sound.h
diff --git a/engines/buried/biochip_right.cpp b/engines/buried/biochip_right.cpp
index a3fcf75e91a..45212bc0c20 100644
--- a/engines/buried/biochip_right.cpp
+++ b/engines/buried/biochip_right.cpp
@@ -260,7 +260,7 @@ void BioChipRightWindow::onLButtonUp(const Common::Point &point, uint flags) {
video->playToFrame(23);
while (!_vm->shouldQuit() && video->getMode() != VideoWindow::kModeStopped) {
- _vm->yield(video);
+ _vm->yield(video, -1);
_vm->_sound->timerCallback();
}
@@ -297,7 +297,7 @@ void BioChipRightWindow::onLButtonUp(const Common::Point &point, uint flags) {
video->playToFrame(47);
while (!_vm->shouldQuit() && video->getMode() != VideoWindow::kModeStopped) {
- _vm->yield(video);
+ _vm->yield(video, -1);
_vm->_sound->timerCallback();
}
diff --git a/engines/buried/buried.cpp b/engines/buried/buried.cpp
index 06432fdafae..a9d68badef4 100644
--- a/engines/buried/buried.cpp
+++ b/engines/buried/buried.cpp
@@ -314,8 +314,8 @@ void BuriedEngine::postMessageToWindow(Window *dest, Message *message) {
_messageQueue.push_back(msg);
}
-void BuriedEngine::processVideoSkipMessages(VideoWindow *video) {
- assert(video);
+void BuriedEngine::processAudioVideoSkipMessages(VideoWindow *video, int soundId) {
+ assert(video || soundId >= 0);
for (MessageQueue::iterator it = _messageQueue.begin(); it != _messageQueue.end();) {
MessageType messageType = it->message->getMessageType();
@@ -323,9 +323,14 @@ void BuriedEngine::processVideoSkipMessages(VideoWindow *video) {
if (messageType == kMessageTypeKeyUp) {
Common::KeyState keyState = ((KeyUpMessage *)it->message)->getKeyState();
- // Send any skip video keyup events to the video player
+ // Send any skip keyup events to the audio/video players
if (keyState.keycode == Common::KEYCODE_ESCAPE) {
- video->onKeyUp(keyState, ((KeyUpMessage *)it->message)->getFlags());
+ if (video)
+ video->onKeyUp(keyState, ((KeyUpMessage *)it->message)->getFlags());
+
+ if (soundId >= 0)
+ _sound->stopSound(soundId);
+
delete it->message;
it = _messageQueue.erase(it);
}
@@ -420,7 +425,7 @@ bool BuriedEngine::hasMessage(Window *window, int messageBegin, int messageEnd)
return false;
}
-void BuriedEngine::yield(VideoWindow *video) {
+void BuriedEngine::yield(VideoWindow *video, int soundId) {
// A cut down version of the Win16 yield function. Win32 handles this
// asynchronously, which we don't want. Only needed for internal event loops.
@@ -431,10 +436,10 @@ void BuriedEngine::yield(VideoWindow *video) {
pollForEvents();
- // We only send video skipping messages from here. Otherwise, this is the same
+ // We only send audio/video skipping messages from here. Otherwise, this is the same
// as our main loop.
- if (video && _allowVideoSkip)
- processVideoSkipMessages(video);
+ if ((video || soundId >= 0) && _allowVideoSkip)
+ processAudioVideoSkipMessages(video, soundId);
_gfx->updateScreen();
_system->delayMillis(10);
diff --git a/engines/buried/buried.h b/engines/buried/buried.h
index f1d66f76a5b..e5557ed7a49 100644
--- a/engines/buried/buried.h
+++ b/engines/buried/buried.h
@@ -124,7 +124,7 @@ public:
// Messaging
void postMessageToWindow(Window *dest, Message *message);
void sendAllMessages();
- void processVideoSkipMessages(VideoWindow *video);
+ void processAudioVideoSkipMessages(VideoWindow *video, int soundId);
void removeKeyboardMessages(Window *window);
void removeMouseMessages(Window *window);
void removeAllMessages(Window *window);
@@ -132,7 +132,7 @@ public:
bool hasMessage(Window *window, int messageBegin, int messageEnd) const;
// Miscellaneous
- void yield(VideoWindow *video);
+ void yield(VideoWindow *video, int soundId);
int getTransitionSpeed();
void setTransitionSpeed(int newSpeed);
void releaseCapture() { _captureWindow = 0; }
diff --git a/engines/buried/demo/demo_menu.cpp b/engines/buried/demo/demo_menu.cpp
index 43eb210464b..6d08213e5c3 100644
--- a/engines/buried/demo/demo_menu.cpp
+++ b/engines/buried/demo/demo_menu.cpp
@@ -87,7 +87,7 @@ void DemoMainMenuWindow::showWithSplash() {
uint32 startTime = g_system->getMillis();
while (g_system->getMillis() < (startTime + 6000) && !_vm->hasMessage(this, kMessageTypeLButtonUp, kMessageTypeLButtonUp) && !_vm->shouldQuit())
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_background->free();
delete _background;
diff --git a/engines/buried/environ/agent3_lair.cpp b/engines/buried/environ/agent3_lair.cpp
index 84bb329be78..8a3dcbdadea 100644
--- a/engines/buried/environ/agent3_lair.cpp
+++ b/engines/buried/environ/agent3_lair.cpp
@@ -67,6 +67,8 @@ LairEntry::LairEntry(BuriedEngine *vm, Window *viewWindow, const LocationStaticD
}
int LairEntry::postEnterRoom(Window *viewWindow, const Location &priorLocation) {
+ const int effectsIndexBase = 2; // same as kEffectsIndexBase in SoundManager
+
// Force enable frame cycling
((SceneViewWindow *)viewWindow)->forceEnableCycling(true);
@@ -133,7 +135,7 @@ int LairEntry::postEnterRoom(Window *viewWindow, const Location &priorLocation)
}
_vm->_sound->timerCallback();
- _vm->yield(nullptr);
+ _vm->yield(nullptr, effectsIndexBase + _currentSoundID);
}
_vm->_sound->stopSoundEffect(_currentSoundID);
@@ -162,7 +164,7 @@ int LairEntry::postEnterRoom(Window *viewWindow, const Location &priorLocation)
}
_vm->_sound->timerCallback();
- _vm->yield(nullptr);
+ _vm->yield(nullptr, effectsIndexBase + _currentSoundID);
}
_vm->_sound->stopSoundEffect(_currentSoundID);
@@ -281,6 +283,8 @@ int LairEntry::timerCallback(Window *viewWindow) {
}
int LairEntry::onCharacter(Window *viewWindow, const Common::KeyState &character) {
+ const int effectsIndexBase = 2; // same as kEffectsIndexBase in SoundManager
+
// Only accept input if we are beyond first voiceover
if (_passwordIndex <= 0)
return SC_TRUE;
@@ -336,7 +340,7 @@ int LairEntry::onCharacter(Window *viewWindow, const Common::KeyState &character
timerCallback(viewWindow);
_vm->_sound->timerCallback();
- _vm->yield(nullptr);
+ _vm->yield(nullptr, effectsIndexBase + _currentSoundID);
}
_vm->_sound->stopSoundEffect(_currentSoundID);
@@ -577,7 +581,7 @@ int TransporterControls::onCharacter(Window *viewWindow, const Common::KeyState
// Wait two seconds
uint32 startTime = g_system->getMillis();
while (!_vm->shouldQuit() && startTime + 2000 > g_system->getMillis())
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
// Move to a different depth to enter the transporter
DestinationScene newScene;
@@ -629,7 +633,7 @@ int TransporterControls::onCharacter(Window *viewWindow, const Common::KeyState
// Wait two seconds
uint32 startTime = g_system->getMillis();
while (!_vm->shouldQuit() && startTime + 2000 > g_system->getMillis())
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
// Move to a different depth to enter the transporter
DestinationScene newScene;
diff --git a/engines/buried/environ/ai_lab.cpp b/engines/buried/environ/ai_lab.cpp
index f78ddfbe52e..d81c53c8bcc 100644
--- a/engines/buried/environ/ai_lab.cpp
+++ b/engines/buried/environ/ai_lab.cpp
@@ -1850,7 +1850,7 @@ int CapacitanceToHabitatDoorClosed::mouseUp(Window *viewWindow, const Common::Po
uint32 startTime = g_system->getMillis();
while (!_vm->shouldQuit() && g_system->getMillis() < startTime + 1000) {
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_vm->_sound->timerCallback();
}
@@ -1874,7 +1874,7 @@ int CapacitanceToHabitatDoorClosed::mouseUp(Window *viewWindow, const Common::Po
uint32 startTime = g_system->getMillis();
while (!_vm->shouldQuit() && g_system->getMillis() < startTime + 1000) {
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_vm->_sound->timerCallback();
}
@@ -2455,7 +2455,7 @@ int CapacitanceDockingBayDoor::mouseUp(Window *viewWindow, const Common::Point &
// Wait a second?
uint32 startTime = g_system->getMillis();
while (!_vm->shouldQuit() && g_system->getMillis() < startTime + 1000) {
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_vm->_sound->timerCallback();
}
diff --git a/engines/buried/environ/scene_common.cpp b/engines/buried/environ/scene_common.cpp
index 6953adf162b..bf40f56f30d 100644
--- a/engines/buried/environ/scene_common.cpp
+++ b/engines/buried/environ/scene_common.cpp
@@ -1307,7 +1307,7 @@ int TrialRecallScene::postEnterRoom(Window *viewWindow, const Location &priorLoc
Cursor oldCursor = _vm->_gfx->setCursor(kCursorWait);
uint32 start = g_system->getMillis();
while (g_system->getMillis() - start < 10000)
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_vm->_gfx->setCursor(oldCursor);
// Force a recall
diff --git a/engines/buried/frame_window.cpp b/engines/buried/frame_window.cpp
index 37ba620e41f..b7bbb63bc52 100644
--- a/engines/buried/frame_window.cpp
+++ b/engines/buried/frame_window.cpp
@@ -95,7 +95,7 @@ bool FrameWindow::showTitleSequence() {
uint32 startTime = g_system->getMillis();
while (g_system->getMillis() < (startTime + 7000) && !_vm->hasMessage(this, kMessageTypeLButtonDown, kMessageTypeLButtonDown) && !_vm->shouldQuit())
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_vm->_sound->stopInterfaceSound();
invalidateWindow();
@@ -117,7 +117,7 @@ bool FrameWindow::showTitleSequence() {
_vm->removeMouseMessages(video);
while (!_vm->shouldQuit() && video->getMode() != VideoWindow::kModeStopped && !_vm->hasMessage(this, kMessageTypeLButtonDown, kMessageTypeLButtonDown))
- _vm->yield(video);
+ _vm->yield(video, -1);
delete video;
diff --git a/engines/buried/gameui.cpp b/engines/buried/gameui.cpp
index 601fdae0206..5c32be9d7cb 100644
--- a/engines/buried/gameui.cpp
+++ b/engines/buried/gameui.cpp
@@ -95,7 +95,7 @@ bool GameUIWindow::startNewGameIntro(bool walkthrough) {
video->playVideo();
while (!_vm->shouldQuit() && video->getMode() != VideoWindow::kModeStopped)
- _vm->yield(video);
+ _vm->yield(video, -1);
delete video;
@@ -173,7 +173,7 @@ bool GameUIWindow::flashWarningLight() {
uint32 startTime = g_system->getMillis();
while (!_vm->shouldQuit() && (startTime + 200) > g_system->getMillis()) {
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_vm->_sound->timerCallback();
}
@@ -188,7 +188,7 @@ bool GameUIWindow::flashWarningLight() {
startTime = g_system->getMillis();
while (!_vm->shouldQuit() && (startTime + 250) > g_system->getMillis()) {
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_vm->_sound->timerCallback();
}
@@ -201,7 +201,7 @@ bool GameUIWindow::flashWarningLight() {
startTime = g_system->getMillis();
while (!_vm->shouldQuit() && (startTime + 250) > g_system->getMillis()) {
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
_vm->_sound->timerCallback();
}
diff --git a/engines/buried/inventory_info.cpp b/engines/buried/inventory_info.cpp
index 016a87d6356..b071a036f09 100644
--- a/engines/buried/inventory_info.cpp
+++ b/engines/buried/inventory_info.cpp
@@ -210,7 +210,7 @@ void BurnedLetterViewWindow::onLButtonUp(const Common::Point &point, uint flags)
memcpy(_preBuffer->getBasePtr(0, j), newFrame->getBasePtr(0, _preBuffer->h - (i + offset) + j), newFrame->w * newFrame->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
newFrame->free();
@@ -240,7 +240,7 @@ void BurnedLetterViewWindow::onLButtonUp(const Common::Point &point, uint flags)
memcpy(_preBuffer->getBasePtr(0, newFrame->h - offset + j), newFrame->getBasePtr(0, i + j), newFrame->w * newFrame->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
newFrame->free();
diff --git a/engines/buried/main_menu.cpp b/engines/buried/main_menu.cpp
index d79512cb30e..a514332b2dd 100644
--- a/engines/buried/main_menu.cpp
+++ b/engines/buried/main_menu.cpp
@@ -213,7 +213,7 @@ void MainMenuWindow::onLButtonUp(const Common::Point &point, uint flags) {
video->playVideo();
while (!_vm->shouldQuit() && video->getMode() != VideoWindow::kModeStopped)
- _vm->yield(video);
+ _vm->yield(video, -1);
_vm->_sound->restart();
}
diff --git a/engines/buried/scene_view.cpp b/engines/buried/scene_view.cpp
index 6de6c6db1ea..25d6f1a8641 100644
--- a/engines/buried/scene_view.cpp
+++ b/engines/buried/scene_view.cpp
@@ -748,7 +748,7 @@ bool SceneViewWindow::timeSuitJump(int destination) {
jumpMovie->playToFrame(24);
while (!_vm->shouldQuit() && jumpMovie->getMode() != VideoWindow::kModeStopped && _vm->_sound->isInterfaceSoundPlaying()) {
- _vm->yield(jumpMovie.get());
+ _vm->yield(jumpMovie.get(), -1);
_vm->_sound->timerCallback();
}
@@ -795,7 +795,7 @@ bool SceneViewWindow::timeSuitJump(int destination) {
jumpMovie->playVideo();
while (!_vm->shouldQuit() && jumpMovie->getMode() != VideoWindow::kModeStopped)
- _vm->yield(jumpMovie.get());
+ _vm->yield(jumpMovie.get(), -1);
if (_vm->shouldQuit())
return true;
@@ -881,7 +881,7 @@ bool SceneViewWindow::timeSuitJump(int destination) {
jumpMovie->playToFrame(48);
while (!_vm->shouldQuit() && jumpMovie->getMode() != VideoWindow::kModeStopped && _vm->_sound->isInterfaceSoundPlaying()) {
- _vm->yield(jumpMovie.get());
+ _vm->yield(jumpMovie.get(), -1);
_vm->_sound->timerCallback();
}
@@ -1078,7 +1078,7 @@ bool SceneViewWindow::videoTransition(const Location &location, DestinationScene
animationMovie->playToFrame(destinationData.transitionStartFrame + destinationData.transitionLength - 1);
while (!_vm->shouldQuit() && animationMovie->getMode() != VideoWindow::kModeStopped) {
- _vm->yield(animationMovie.get());
+ _vm->yield(animationMovie.get(), -1);
_vm->_sound->timerCallback();
}
@@ -1145,7 +1145,7 @@ bool SceneViewWindow::walkTransition(const Location &location, const Destination
_walkMovie->playToFrame(destinationData.transitionStartFrame + destinationData.transitionLength - 1);
while (!_vm->shouldQuit() && _walkMovie->getMode() != VideoWindow::kModeStopped) {
- _vm->yield(_walkMovie);
+ _vm->yield(_walkMovie, -1);
_vm->_sound->timerCallback();
}
@@ -1186,7 +1186,7 @@ bool SceneViewWindow::pushTransition(Graphics::Surface *curBackground, Graphics:
memcpy(curBackground->getBasePtr(0, j), newBackground->getBasePtr(0, curBackground->h - (i + stripSize) + j), newBackground->w * newBackground->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 1: // Push right
@@ -1197,7 +1197,7 @@ bool SceneViewWindow::pushTransition(Graphics::Surface *curBackground, Graphics:
memcpy(curBackground->getBasePtr(0, j), newBackground->getBasePtr(newBackground->w - (i + stripSize), j), stripSize * newBackground->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 2: // Push left
@@ -1208,7 +1208,7 @@ bool SceneViewWindow::pushTransition(Graphics::Surface *curBackground, Graphics:
memcpy(curBackground->getBasePtr(curBackground->w - (int)stripSize, j), newBackground->getBasePtr(i, j), stripSize * newBackground->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 3: // Push up
@@ -1219,7 +1219,7 @@ bool SceneViewWindow::pushTransition(Graphics::Surface *curBackground, Graphics:
memcpy(curBackground->getBasePtr(0, curBackground->h - stripSize + j), newBackground->getBasePtr(0, i + j), newBackground->w * newBackground->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
}
@@ -1255,7 +1255,7 @@ bool SceneViewWindow::slideInTransition(Graphics::Surface *newBackground, int di
memcpy(_preBuffer->getBasePtr(0, j), newBackground->getBasePtr(0, DIB_FRAME_HEIGHT - j), newBackground->w * newBackground->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 1: // Push right
@@ -1264,7 +1264,7 @@ bool SceneViewWindow::slideInTransition(Graphics::Surface *newBackground, int di
memcpy(_preBuffer->getBasePtr(0, j), newBackground->getBasePtr(DIB_FRAME_WIDTH - i, j), i * newBackground->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 2: // Push left
@@ -1273,7 +1273,7 @@ bool SceneViewWindow::slideInTransition(Graphics::Surface *newBackground, int di
memcpy(_preBuffer->getBasePtr(0, DIB_FRAME_WIDTH - i), newBackground->getBasePtr(0, j), i * newBackground->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 3: // Push up
@@ -1282,7 +1282,7 @@ bool SceneViewWindow::slideInTransition(Graphics::Surface *newBackground, int di
memcpy(_preBuffer->getBasePtr(0, DIB_FRAME_HEIGHT - j), newBackground->getBasePtr(0, j), newBackground->w * newBackground->format.bytesPerPixel);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
}
@@ -1308,7 +1308,7 @@ bool SceneViewWindow::slideOutTransition(Graphics::Surface *newBackground, int d
_vm->_gfx->crossBlit(_preBuffer, 0, 0, 432, 189, newBackground, 0, 0);
_vm->_gfx->crossBlit(_preBuffer, 0, i, 432, 189 - i, &curBackground, 0, 0);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 1: // Push right
@@ -1317,7 +1317,7 @@ bool SceneViewWindow::slideOutTransition(Graphics::Surface *newBackground, int d
_vm->_gfx->crossBlit(_preBuffer, i, 0, DIB_FRAME_WIDTH - i, 189, newBackground, i, 0);
_vm->_gfx->crossBlit(_preBuffer, 0, 0, i, 189, &curBackground, DIB_FRAME_WIDTH - i, 0);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 2: // Push left
@@ -1325,7 +1325,7 @@ bool SceneViewWindow::slideOutTransition(Graphics::Surface *newBackground, int d
_vm->_gfx->crossBlit(_preBuffer, 0, 0, i, 189, newBackground, 0, 0);
_vm->_gfx->crossBlit(_preBuffer, i, 0, 432 - i, 189, &curBackground, 0, 0);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
case 3: // Push up
@@ -1333,7 +1333,7 @@ bool SceneViewWindow::slideOutTransition(Graphics::Surface *newBackground, int d
_vm->_gfx->crossBlit(_preBuffer, 0, 0, 432, 189, newBackground, 0, 0);
_vm->_gfx->crossBlit(_preBuffer, 0, 189 - i, 432, i, &curBackground, 0, 0);
invalidateWindow(false);
- _vm->yield(nullptr);
+ _vm->yield(nullptr, -1);
}
break;
}
@@ -1572,7 +1572,7 @@ bool SceneViewWindow::playSynchronousAnimation(int animationID) {
animationMovie->playToFrame(animDatabase[i].startFrame + animDatabase[i].frameCount - 1);
while (!_vm->shouldQuit() && animationMovie->getMode() != VideoWindow::kModeStopped) {
- _vm->yield(animationMovie.get());
+ _vm->yield(animationMovie.get(), -1);
_vm->_sound->timerCallback();
}
@@ -1615,7 +1615,7 @@ bool SceneViewWindow::playSynchronousAnimationExtern(int animationID) {
animationMovie->playVideo();
while (!_vm->shouldQuit() && animationMovie->getMode() != VideoWindow::kModeStopped) {
- _vm->yield(animationMovie.get());
+ _vm->yield(animationMovie.get(), -1);
_vm->_sound->timerCallback();
}
@@ -1679,7 +1679,7 @@ bool SceneViewWindow::playPlacedSynchronousAnimation(int animationID, int left,
animationMovie->playToFrame(animDatabase[i].startFrame + animDatabase[i].frameCount - 1);
while (!_vm->shouldQuit() && animationMovie->getMode() != VideoWindow::kModeStopped) {
- _vm->yield(animationMovie.get());
+ _vm->yield(animationMovie.get(), -1);
_vm->_sound->timerCallback();
}
@@ -1749,7 +1749,7 @@ bool SceneViewWindow::playClippedSynchronousAnimation(int animationID, int left,
animationMovie->playToFrame(animDatabase[i].startFrame + animDatabase[i].frameCount - 1);
while (!_vm->shouldQuit() && animationMovie->getMode() != VideoWindow::kModeStopped) {
- _vm->yield(animationMovie.get());
+ _vm->yield(animationMovie.get(), -1);
_vm->_sound->timerCallback();
}
diff --git a/engines/buried/sound.cpp b/engines/buried/sound.cpp
index 2bdd85cb04f..f7b2e15f5b1 100644
--- a/engines/buried/sound.cpp
+++ b/engines/buried/sound.cpp
@@ -352,7 +352,7 @@ bool SoundManager::playSynchronousAIComment(const Common::String &fileName) {
while (retVal && !_vm->shouldQuit() && _soundData[kAIVoiceIndex]->isPlaying()) {
timerCallback();
- _vm->yield(nullptr);
+ _vm->yield(nullptr, kAIVoiceIndex);
}
// Now that is has been played, kill it here and now
@@ -441,7 +441,7 @@ bool SoundManager::playSynchronousSoundEffect(const Common::String &fileName, in
// the sound finishes playing
do {
timerCallback();
- _vm->yield(nullptr);
+ _vm->yield(nullptr, kEffectsIndexBase + soundChannel);
} while (!_vm->shouldQuit() && isSoundEffectPlaying(soundChannel));
// One last callback check
@@ -621,6 +621,10 @@ bool SoundManager::stop() {
return true;
}
+void SoundManager::stopSound(int soundId) {
+ _soundData[soundId]->stop();
+}
+
bool SoundManager::restart() {
if (!_paused)
return true;
diff --git a/engines/buried/sound.h b/engines/buried/sound.h
index 096d5656062..ea106325612 100644
--- a/engines/buried/sound.h
+++ b/engines/buried/sound.h
@@ -49,7 +49,6 @@ public:
// AMBIENT SOUND CHANNEL FUNCTIONS
bool setAmbientSound(const Common::String &fileName = "", bool fade = false, byte finalVolumeLevel = 64);
bool adjustAmbientSoundVolume(byte newVolumeLevel, bool fade, byte steps, uint32 fadeLength);
- uint32 getAmbientPosition();
bool isAmbientSoundPlaying();
bool setSecondaryAmbientSound(const Common::String &fileName = "", bool fade = false, byte finalVolumeLevel = 64);
@@ -84,6 +83,7 @@ public:
// pause() is used for implementing pauseEngineIntern(). Since stop()/restart()
// are not re-entrant, they're not suitable for that purpose.
bool stop();
+ void stopSound(int soundId);
bool restart();
void pause(bool shouldPause);
Commit: 889070f479edf0d87237ff276b181636cd894e50
https://github.com/scummvm/scummvm/commit/889070f479edf0d87237ff276b181636cd894e50
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-12-29T18:08:50+02:00
Commit Message:
BURIED: Hide mouse pointer during cutscenes - FR #13172
This change enhances the experience. I've played through the whole
game with it, and no issues have been found
Changed paths:
engines/buried/graphics.cpp
engines/buried/graphics.h
engines/buried/video_window.cpp
diff --git a/engines/buried/graphics.cpp b/engines/buried/graphics.cpp
index 2013f488e2d..dec5587414b 100644
--- a/engines/buried/graphics.cpp
+++ b/engines/buried/graphics.cpp
@@ -132,6 +132,10 @@ Graphics::Font *GraphicsManager::createArialFont(int size, bool bold) const {
return font;
}
+void GraphicsManager::toggleCursor(bool show) {
+ CursorMan.showMouse(show);
+}
+
Cursor GraphicsManager::setCursor(Cursor newCursor) {
// Don't set the cursor again
if (newCursor == _curCursor)
diff --git a/engines/buried/graphics.h b/engines/buried/graphics.h
index 49ad0338400..ccd7bba51bd 100644
--- a/engines/buried/graphics.h
+++ b/engines/buried/graphics.h
@@ -81,6 +81,7 @@ public:
byte *getDefaultPalette() const { return _palette; }
Graphics::Font *createFont(int size, bool bold = false) const;
Cursor setCursor(Cursor newCursor);
+ void toggleCursor(bool show);
Graphics::Surface *getBitmap(uint32 bitmapID);
Graphics::Surface *getBitmap(const Common::String &fileName);
uint32 getColor(byte r, byte g, byte b);
diff --git a/engines/buried/video_window.cpp b/engines/buried/video_window.cpp
index 2a735bff6cc..54ea0c2fb3d 100644
--- a/engines/buried/video_window.cpp
+++ b/engines/buried/video_window.cpp
@@ -48,6 +48,7 @@ bool VideoWindow::playVideo() {
if (_video->isPlaying())
return true;
+ _vm->_gfx->toggleCursor(false);
_video->start();
_mode = kModePlaying;
return true;
@@ -62,6 +63,9 @@ bool VideoWindow::playToFrame(int frame) {
if (_video->isPlaying())
return true;
+ // We do not hide the mouse cursor here, as this
+ // is used to play background or asynchronous
+ // animations
_video->start();
_mode = kModePlaying;
return true;
@@ -76,6 +80,7 @@ bool VideoWindow::seekToFrame(int frame) {
void VideoWindow::stopVideo() {
if (_video) {
+ _vm->_gfx->toggleCursor(true);
_video->stop();
_mode = kModeStopped;
}
@@ -127,6 +132,7 @@ void VideoWindow::closeVideo() {
if (_video) {
delete _video;
_video = nullptr;
+ _vm->_gfx->toggleCursor(true);
_mode = kModeClosed;
_lastFrame = nullptr;
@@ -176,6 +182,7 @@ void VideoWindow::updateVideo() {
if (_video->isPlaying() && _video->endOfVideo()) {
_video->stop();
+ _vm->_gfx->toggleCursor(true);
_mode = kModeStopped;
}
}
Commit: ae8b436f220563b3d8c7241f6409aacd2ec48a5b
https://github.com/scummvm/scummvm/commit/ae8b436f220563b3d8c7241f6409aacd2ec48a5b
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-12-29T18:08:50+02:00
Commit Message:
BURIED: Cleanup variable usage
Changed paths:
engines/buried/environ/mayan.cpp
diff --git a/engines/buried/environ/mayan.cpp b/engines/buried/environ/mayan.cpp
index e1290601d44..e51cbb050b4 100644
--- a/engines/buried/environ/mayan.cpp
+++ b/engines/buried/environ/mayan.cpp
@@ -2151,8 +2151,10 @@ SetVolumeAndFlag::SetVolumeAndFlag(BuriedEngine *vm, Window *viewWindow, const L
}
bool SceneViewWindow::initializeMayanTimeZoneAndEnvironment(Window *viewWindow, int environment) {
+ GlobalFlags &flags = ((SceneViewWindow *)viewWindow)->getGlobalFlags();
+
if (environment == -1) {
- GlobalFlags &flags = ((SceneViewWindow *)viewWindow)->getGlobalFlags();
+ InventoryWindow *inventoryWindow = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow;
flags.myTPCodeWheelStatus = flags.generalWalkthroughMode;
flags.myTPCodeWheelLeftIndex = flags.generalWalkthroughMode == 1 ? 8 : 0;
@@ -2176,15 +2178,15 @@ bool SceneViewWindow::initializeMayanTimeZoneAndEnvironment(Window *viewWindow,
flags.myAGHeadCOpenedTime = 0;
flags.myAGHeadDOpenedTime = 0;
- flags.myPickedUpCeramicBowl = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemCeramicBowl) ? 1 : 0;
- flags.myMCPickedUpSkull = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemCavernSkull) ? 1 : 0;
- flags.myWGRetrievedJadeBlock = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemJadeBlock) ? 1 : 0;
- flags.myWTRetrievedLimestoneBlock = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemLimestoneBlock) ? 1 : 0;
- flags.myAGRetrievedEntrySkull = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemEntrySkull) ? 1 : 0;
- flags.myAGRetrievedSpearSkull = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemSpearSkull) ? 1 : 0;
- flags.myAGRetrievedCopperMedal = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemCopperMedallion) ? 1 : 0;
- flags.myAGRetrievedObsidianBlock = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemObsidianBlock) ? 1 : 0;
- flags.takenEnvironCart = ((GameUIWindow *)viewWindow->getParent())->_inventoryWindow->isItemInInventory(kItemEnvironCart) ? 1 : 0;
+ flags.myPickedUpCeramicBowl = inventoryWindow->isItemInInventory(kItemCeramicBowl) ? 1 : 0;
+ flags.myMCPickedUpSkull = inventoryWindow->isItemInInventory(kItemCavernSkull) ? 1 : 0;
+ flags.myWGRetrievedJadeBlock = inventoryWindow->isItemInInventory(kItemJadeBlock) ? 1 : 0;
+ flags.myWTRetrievedLimestoneBlock = inventoryWindow->isItemInInventory(kItemLimestoneBlock) ? 1 : 0;
+ flags.myAGRetrievedEntrySkull = inventoryWindow->isItemInInventory(kItemEntrySkull) ? 1 : 0;
+ flags.myAGRetrievedSpearSkull = inventoryWindow->isItemInInventory(kItemSpearSkull) ? 1 : 0;
+ flags.myAGRetrievedCopperMedal = inventoryWindow->isItemInInventory(kItemCopperMedallion) ? 1 : 0;
+ flags.myAGRetrievedObsidianBlock = inventoryWindow->isItemInInventory(kItemObsidianBlock) ? 1 : 0;
+ flags.takenEnvironCart = inventoryWindow->isItemInInventory(kItemEnvironCart) ? 1 : 0;
if (flags.generalWalkthroughMode == 1) {
flags.myMCPickedUpSkull = 1;
@@ -2192,20 +2194,20 @@ bool SceneViewWindow::initializeMayanTimeZoneAndEnvironment(Window *viewWindow,
flags.myAGRetrievedCopperMedal = 1;
}
} else if (environment == 2) {
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().scoreEnteredMainCavern = 1;
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedMainCavern = 1;
+ flags.scoreEnteredMainCavern = 1;
+ flags.myVisitedMainCavern = 1;
} else if (environment == 3) {
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedWealthGod = 1;
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedSpecRooms = 1;
+ flags.myVisitedWealthGod = 1;
+ flags.myVisitedSpecRooms = 1;
} else if (environment == 4) {
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedWaterGod = 1;
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedSpecRooms = 1;
+ flags.myVisitedWaterGod = 1;
+ flags.myVisitedSpecRooms = 1;
} else if (environment == 5) {
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedArrowGod = 1;
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedSpecRooms = 1;
+ flags.myVisitedArrowGod = 1;
+ flags.myVisitedSpecRooms = 1;
} else if (environment == 6) {
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedDeathGod = 1;
- ((SceneViewWindow *)viewWindow)->getGlobalFlags().myVisitedSpecRooms = 1;
+ flags.myVisitedDeathGod = 1;
+ flags.myVisitedSpecRooms = 1;
}
return true;
Commit: 1d991bd10df9689e00839c4cf841265e74004d4c
https://github.com/scummvm/scummvm/commit/1d991bd10df9689e00839c4cf841265e74004d4c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-12-29T18:08:50+02:00
Commit Message:
BURIED: Group GUI options
Changed paths:
engines/buried/detection_tables.h
diff --git a/engines/buried/detection_tables.h b/engines/buried/detection_tables.h
index c5725cfa52b..542aea1818d 100644
--- a/engines/buried/detection_tables.h
+++ b/engines/buried/detection_tables.h
@@ -19,10 +19,12 @@
*
*/
-#define GAMEOPTION_ALLOW_SKIP GUIO_GAMEOPTIONS1
-
namespace Buried {
+#define GAMEOPTION_ALLOW_SKIP GUIO_GAMEOPTIONS1
+#define GUIO_FULL_GAME GUIO1(GAMEOPTION_ALLOW_SKIP)
+#define GUIO_GAME_DEMO GUIO1(GUIO_NOLAUNCHLOAD)
+
static const ADGameDescription gameDescriptions[] = {
// English Windows 3.11 8BPP
// Installed
@@ -35,7 +37,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 24BPP
@@ -49,7 +51,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 8BPP
@@ -63,7 +65,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 24BPP
@@ -77,7 +79,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// Japanese Windows 3.11 8BPP
@@ -91,7 +93,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::JA_JPN,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// Japanese Windows 3.11 24BPP
@@ -105,7 +107,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::JA_JPN,
Common::kPlatformWindows,
GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 8BPP
@@ -119,7 +121,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_COMPRESSED,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 24BPP
@@ -133,7 +135,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_COMPRESSED | GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 8BPP
@@ -147,7 +149,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_COMPRESSED,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 24BPP
@@ -161,7 +163,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_COMPRESSED | GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 8BPP
@@ -175,7 +177,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 24BPP
@@ -189,7 +191,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// German Windows 3.11 8BPP
@@ -203,7 +205,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// German Windows 3.11 24BPP
@@ -217,7 +219,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::DE_DEU,
Common::kPlatformWindows,
GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// French Windows 3.11 8BPP
@@ -231,7 +233,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// French Windows 3.11 24BPP
@@ -245,7 +247,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::FR_FRA,
Common::kPlatformWindows,
GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// Italian Windows 3.11 8BPP
@@ -259,7 +261,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::IT_ITA,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// Italian Windows 3.11 24BPP
@@ -273,7 +275,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::IT_ITA,
Common::kPlatformWindows,
GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// Spanish Windows 3.11 8BPP
@@ -287,7 +289,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::ES_ESP,
Common::kPlatformWindows,
ADGF_NO_FLAGS,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// Spanish Windows 3.11 24BPP
@@ -301,7 +303,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::ES_ESP,
Common::kPlatformWindows,
GF_TRUECOLOR,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 95 8BPP
@@ -314,7 +316,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_WIN95,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 95 24BPP
@@ -327,7 +329,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
GF_TRUECOLOR | GF_WIN95,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows Demo 8BPP
@@ -338,7 +340,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO,
- GUIO1(GUIO_NOLAUNCHLOAD)
+ GUIO_GAME_DEMO
},
// English Windows Demo 24BPP
@@ -349,7 +351,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO | GF_TRUECOLOR,
- GUIO1(GUIO_NOLAUNCHLOAD)
+ GUIO_GAME_DEMO
},
// English Windows Demo 8BPP - US Gold (UK)
@@ -360,7 +362,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO,
- GUIO1(GUIO_NOLAUNCHLOAD)
+ GUIO_GAME_DEMO
},
// English Windows Demo 24BPP - US Gold (UK)
@@ -371,7 +373,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO | GF_TRUECOLOR,
- GUIO1(GUIO_NOLAUNCHLOAD)
+ GUIO_GAME_DEMO
},
// English Windows Demo 8BPP - North America
@@ -382,7 +384,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO | GF_TRUECOLOR | ADGF_TESTING,
- GUIO1(GUIO_NOLAUNCHLOAD)
+ GUIO_GAME_DEMO
},
// English Windows Demo 24BPP - North America
@@ -393,7 +395,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO | GF_TRUECOLOR | ADGF_TESTING,
- GUIO1(GUIO_NOLAUNCHLOAD)
+ GUIO_GAME_DEMO
},
// English Windows 3.11 Trial 8BPP
@@ -406,7 +408,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO | GF_TRIAL,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
// English Windows 3.11 Trial 24BPP
@@ -419,7 +421,7 @@ static const ADGameDescription gameDescriptions[] = {
Common::EN_ANY,
Common::kPlatformWindows,
ADGF_DEMO | GF_TRUECOLOR | GF_TRIAL,
- GUIO1(GAMEOPTION_ALLOW_SKIP)
+ GUIO_FULL_GAME
},
AD_TABLE_END_MARKER
Commit: de13dc6364f45d03a59b2746351c998f1d2e10e1
https://github.com/scummvm/scummvm/commit/de13dc6364f45d03a59b2746351c998f1d2e10e1
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2021-12-29T18:08:50+02:00
Commit Message:
BURIED: Fix fallback in the latest video and audio skipping code
This could result in infinite looping
Changed paths:
engines/buried/buried.cpp
diff --git a/engines/buried/buried.cpp b/engines/buried/buried.cpp
index a9d68badef4..df9031284d8 100644
--- a/engines/buried/buried.cpp
+++ b/engines/buried/buried.cpp
@@ -333,6 +333,8 @@ void BuriedEngine::processAudioVideoSkipMessages(VideoWindow *video, int soundId
delete it->message;
it = _messageQueue.erase(it);
+ } else {
+ ++it;
}
} else if (messageType == kMessageTypeKeyDown) {
Common::KeyState keyState = ((KeyDownMessage *)it->message)->getKeyState();
@@ -342,6 +344,8 @@ void BuriedEngine::processAudioVideoSkipMessages(VideoWindow *video, int soundId
if (keyState.keycode == Common::KEYCODE_ESCAPE) {
delete it->message;
it = _messageQueue.erase(it);
+ } else {
+ ++it;
}
} else {
++it;
More information about the Scummvm-git-logs
mailing list