mirror of
https://github.com/libretro/scummvm.git
synced 2025-05-13 17:46:22 +00:00
STARK: Don't show the cursor during FMVs
This commit is contained in:
parent
ce355587ba
commit
f15f8b3996
@ -70,8 +70,9 @@ void AnimSoundTrigger::onGameLoop() {
|
|||||||
if (_subType == kAnimTriggerSound) {
|
if (_subType == kAnimTriggerSound) {
|
||||||
Location *location = StarkGlobal->getCurrent()->getLocation();
|
Location *location = StarkGlobal->getCurrent()->getLocation();
|
||||||
Sound *sound = location->findStockSound(_soundStockType);
|
Sound *sound = location->findStockSound(_soundStockType);
|
||||||
if (sound) {
|
if (sound && !StarkGlobal->isFastForward()) {
|
||||||
// TODO: If the location has a 3D layer set the source position of the sound to the item position
|
// TODO: If the location has a 3D layer set the source position of the sound to the item position
|
||||||
|
sound->stop();
|
||||||
sound->play();
|
sound->play();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -171,7 +171,9 @@ void UserInterface::render() {
|
|||||||
_currentScreen->render();
|
_currentScreen->render();
|
||||||
|
|
||||||
// The cursor depends on the UI being done.
|
// The cursor depends on the UI being done.
|
||||||
_cursor->render();
|
if (_currentScreen->getName() != Screen::kScreenFMV) {
|
||||||
|
_cursor->render();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UserInterface::isInteractive() const {
|
bool UserInterface::isInteractive() const {
|
||||||
|
@ -43,7 +43,7 @@ Cursor::Cursor(Gfx::Driver *gfx) :
|
|||||||
_gfx(gfx),
|
_gfx(gfx),
|
||||||
_cursorImage(nullptr),
|
_cursorImage(nullptr),
|
||||||
_mouseText(nullptr),
|
_mouseText(nullptr),
|
||||||
_currentCursorType(kNone),
|
_currentCursorType(kImage),
|
||||||
_fading(false),
|
_fading(false),
|
||||||
_fadeLevelIncreasing(true),
|
_fadeLevelIncreasing(true),
|
||||||
_fadeLevel(0) {
|
_fadeLevel(0) {
|
||||||
@ -55,24 +55,19 @@ Cursor::~Cursor() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Cursor::setCursorType(CursorType type) {
|
void Cursor::setCursorType(CursorType type) {
|
||||||
|
assert(type != kImage);
|
||||||
if (type == _currentCursorType) {
|
if (type == _currentCursorType) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_currentCursorType = type;
|
_currentCursorType = type;
|
||||||
if (type == kNone) {
|
|
||||||
_cursorImage = nullptr;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_cursorImage = StarkStaticProvider->getCursorImage(_currentCursorType);
|
_cursorImage = StarkStaticProvider->getCursorImage(_currentCursorType);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cursor::setCursorImage(VisualImageXMG *image) {
|
void Cursor::setCursorImage(VisualImageXMG *image) {
|
||||||
_currentCursorType = kNone;
|
_currentCursorType = kImage;
|
||||||
_cursorImage = image;
|
_cursorImage = image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Cursor::setMousePosition(const Common::Point &pos) {
|
void Cursor::setMousePosition(const Common::Point &pos) {
|
||||||
_mousePos = pos;
|
_mousePos = pos;
|
||||||
}
|
}
|
||||||
@ -100,7 +95,6 @@ void Cursor::updateFadeLevel() {
|
|||||||
void Cursor::render() {
|
void Cursor::render() {
|
||||||
updateFadeLevel();
|
updateFadeLevel();
|
||||||
|
|
||||||
|
|
||||||
if (!_gfx->isPosInScreenBounds(_mousePos)) {
|
if (!_gfx->isPosInScreenBounds(_mousePos)) {
|
||||||
setCursorType(Cursor::kPassive);
|
setCursorType(Cursor::kPassive);
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public:
|
|||||||
Common::Point getMousePosition(bool unscaled = false) const;
|
Common::Point getMousePosition(bool unscaled = false) const;
|
||||||
|
|
||||||
enum CursorType {
|
enum CursorType {
|
||||||
kNone = -1,
|
kImage = -1,
|
||||||
kDefault = 0,
|
kDefault = 0,
|
||||||
kActive = 3,
|
kActive = 3,
|
||||||
kPassive = 9,
|
kPassive = 9,
|
||||||
|
@ -40,7 +40,7 @@ FMVScreen::FMVScreen(Gfx::Driver *gfx, Cursor *cursor) :
|
|||||||
_visible = true;
|
_visible = true;
|
||||||
|
|
||||||
_decoder = new Video::BinkDecoder();
|
_decoder = new Video::BinkDecoder();
|
||||||
_decoder->setDefaultHighColorFormat(_gfx->getRGBAPixelFormat());
|
_decoder->setDefaultHighColorFormat(Gfx::Driver::getRGBAPixelFormat());
|
||||||
_decoder->setSoundType(Audio::Mixer::kSFXSoundType);
|
_decoder->setSoundType(Audio::Mixer::kSFXSoundType);
|
||||||
|
|
||||||
_texture = _gfx->createTexture();
|
_texture = _gfx->createTexture();
|
||||||
|
@ -37,7 +37,7 @@ VisualEffect::VisualEffect(VisualType type, const Common::Point &size, Gfx::Driv
|
|||||||
_timeBetweenTwoUpdates(3 * 33), // ms (frames @ 30 fps)
|
_timeBetweenTwoUpdates(3 * 33), // ms (frames @ 30 fps)
|
||||||
_timeRemainingUntilNextUpdate(0) {
|
_timeRemainingUntilNextUpdate(0) {
|
||||||
_surface = new Graphics::Surface();
|
_surface = new Graphics::Surface();
|
||||||
_surface->create(size.x, size.y, _gfx->getRGBAPixelFormat());
|
_surface->create(size.x, size.y, Gfx::Driver::getRGBAPixelFormat());
|
||||||
|
|
||||||
_texture = _gfx->createTexture(_surface);
|
_texture = _gfx->createTexture(_surface);
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ void VisualText::createTexture() {
|
|||||||
|
|
||||||
// Create a surface to render to
|
// Create a surface to render to
|
||||||
Graphics::Surface surface;
|
Graphics::Surface surface;
|
||||||
surface.create(scaledRect.width(), scaledRect.height(), _gfx->getRGBAPixelFormat());
|
surface.create(scaledRect.width(), scaledRect.height(), Gfx::Driver::getRGBAPixelFormat());
|
||||||
surface.fillRect(scaledRect, _backgroundColor);
|
surface.fillRect(scaledRect, _backgroundColor);
|
||||||
|
|
||||||
// Render the lines to the surface
|
// Render the lines to the surface
|
||||||
|
Loading…
x
Reference in New Issue
Block a user