mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
MYST3: Refresh the ambient sounds when running playMovieChangeNode
Fixes #1337, Fixes #1350.
This commit is contained in:
parent
aae13839c0
commit
3ec5f050ce
@ -21,6 +21,7 @@
|
||||
*/
|
||||
|
||||
#include "engines/myst3/movie.h"
|
||||
#include "engines/myst3/ambient.h"
|
||||
#include "engines/myst3/myst3.h"
|
||||
#include "engines/myst3/sound.h"
|
||||
#include "engines/myst3/state.h"
|
||||
@ -451,6 +452,11 @@ void SimpleMovie::playStartupSound() {
|
||||
}
|
||||
}
|
||||
|
||||
void SimpleMovie::refreshAmbientSounds() {
|
||||
uint32 engineFrames = _bink.getFrameCount() * 2;
|
||||
_vm->_ambient->playCurrentNode(100, engineFrames);
|
||||
}
|
||||
|
||||
SimpleMovie::~SimpleMovie() {
|
||||
}
|
||||
|
||||
|
@ -158,6 +158,7 @@ public:
|
||||
bool endOfVideo();
|
||||
|
||||
void playStartupSound();
|
||||
void refreshAmbientSounds();
|
||||
|
||||
void setSynchronized(bool b) { _synchronized = b; }
|
||||
private:
|
||||
|
@ -1126,7 +1126,7 @@ void Myst3Engine::loadMovie(uint16 id, uint16 condition, bool resetCond, bool lo
|
||||
_movies.push_back(movie);
|
||||
}
|
||||
|
||||
void Myst3Engine::playSimpleMovie(uint16 id, bool fullframe) {
|
||||
void Myst3Engine::playSimpleMovie(uint16 id, bool fullframe, bool refreshAmbientSounds) {
|
||||
SimpleMovie movie = SimpleMovie(this, id);
|
||||
|
||||
if (!movie.isVideoLoaded()) {
|
||||
@ -1165,6 +1165,10 @@ void Myst3Engine::playSimpleMovie(uint16 id, bool fullframe) {
|
||||
|
||||
movie.playStartupSound();
|
||||
|
||||
if (refreshAmbientSounds) {
|
||||
movie.refreshAmbientSounds();
|
||||
}
|
||||
|
||||
_drawables.push_back(&movie);
|
||||
|
||||
bool skip = false;
|
||||
@ -1564,7 +1568,7 @@ void Myst3Engine::playMovieGoToNode(uint16 movie, uint16 node) {
|
||||
|
||||
loadNode(node, room, age);
|
||||
|
||||
playSimpleMovie(movie, true);
|
||||
playSimpleMovie(movie, true, true);
|
||||
|
||||
_state->setLocationNextNode(0);
|
||||
_state->setLocationNextRoom(0);
|
||||
@ -1585,7 +1589,7 @@ void Myst3Engine::playMovieFullFrame(uint16 movie) {
|
||||
}
|
||||
_state->setCameraSkipAnimation(0);
|
||||
|
||||
playSimpleMovie(movie, true);
|
||||
playSimpleMovie(movie, true, false);
|
||||
|
||||
if (_state->getViewType() == kCube) {
|
||||
float endPitch, endHeading;
|
||||
|
@ -154,7 +154,7 @@ public:
|
||||
void loadMovie(uint16 id, uint16 condition, bool resetCond, bool loop);
|
||||
void playMovieGoToNode(uint16 movie, uint16 node);
|
||||
void playMovieFullFrame(uint16 movie);
|
||||
void playSimpleMovie(uint16 id, bool fullframe = false);
|
||||
void playSimpleMovie(uint16 id, bool fullframe = false, bool refreshAmbientSounds = false);
|
||||
void removeMovie(uint16 id);
|
||||
void setMovieLooping(uint16 id, bool loop);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user