Permalink
Browse files
ZVISION: Show system messages when subtitles are disabled
Thanks to Marisa-Chan for spotting this
- Loading branch information
|
|
@@ -741,7 +741,7 @@ void RenderManager::processSubs(uint16 deltatime) { |
|
|
} |
|
|
} |
|
|
|
|
|
if (redraw && _engine->getScriptManager()->getStateValue(StateKey_Subtitles) == 1) { |
|
|
if (redraw) { |
|
|
_subtitleSurface.fillRect(Common::Rect(_subtitleSurface.w, _subtitleSurface.h), 0); |
|
|
|
|
|
for (SubtitleMap::iterator it = _subsList.begin(); it != _subsList.end(); it++) { |
|
|
|
|
|
@@ -137,7 +137,7 @@ bool MusicNode::process(uint32 deltaTimeInMillis) { |
|
|
if (_pantrack || _volume != _newvol) |
|
|
setVolume(_newvol); |
|
|
|
|
|
if (_sub) |
|
|
if (_sub && _engine->getScriptManager()->getStateValue(StateKey_Subtitles) == 1) |
|
|
_sub->process(_engine->_mixer->getSoundElapsedTime(_handle) / 100); |
|
|
} |
|
|
return false; |
|
|
|
|
|
@@ -76,7 +76,7 @@ bool SyncSoundNode::process(uint32 deltaTimeInMillis) { |
|
|
if (_engine->getScriptManager()->getSideFX(_syncto) == NULL) |
|
|
return stop(); |
|
|
|
|
|
if (_sub) |
|
|
if (_sub && _engine->getScriptManager()->getStateValue(StateKey_Subtitles) == 1) |
|
|
_sub->process(_engine->_mixer->getSoundElapsedTime(_handle) / 100); |
|
|
} |
|
|
return false; |
|
|
|
|
|
@@ -29,6 +29,7 @@ |
|
|
#include "zvision/zvision.h" |
|
|
#include "zvision/core/clock.h" |
|
|
#include "zvision/graphics/render_manager.h" |
|
|
#include "zvision/scripting//script_manager.h" |
|
|
#include "zvision/text/subtitles.h" |
|
|
#include "zvision/video/rlf_decoder.h" |
|
|
#include "zvision/video/zork_avi_decoder.h" |
|
|
@@ -75,6 +76,7 @@ void ZVision::playVideo(Video::VideoDecoder &vid, const Common::Rect &destRect, |
|
|
uint16 y = _workingWindow.top + dst.top; |
|
|
uint16 finalWidth = dst.width() < _workingWindow.width() ? dst.width() : _workingWindow.width(); |
|
|
uint16 finalHeight = dst.height() < _workingWindow.height() ? dst.height() : _workingWindow.height(); |
|
|
bool showSubs = (_scriptManager->getStateValue(StateKey_Subtitles) == 1); |
|
|
|
|
|
_clock.stop(); |
|
|
vid.start(); |
|
|
@@ -106,7 +108,7 @@ void ZVision::playVideo(Video::VideoDecoder &vid, const Common::Rect &destRect, |
|
|
|
|
|
if (vid.needsUpdate()) { |
|
|
const Graphics::Surface *frame = vid.decodeNextFrame(); |
|
|
if (sub) |
|
|
if (sub && showSubs) |
|
|
sub->process(vid.getCurFrame()); |
|
|
|
|
|
if (frame) { |
|
|
|