aboutsummaryrefslogtreecommitdiff
path: root/engines/zvision/actions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/zvision/actions.cpp')
-rw-r--r--engines/zvision/actions.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp
index bab1a5e1a1..99fa6a646d 100644
--- a/engines/zvision/actions.cpp
+++ b/engines/zvision/actions.cpp
@@ -577,12 +577,22 @@ bool ActionStreamVideo::execute() {
return true;
}
- Common::Rect destRect;
- if ((_flags & DIFFERENT_DIMENSIONS) == DIFFERENT_DIMENSIONS) {
- destRect = Common::Rect(_x1, _y1, _x2, _y2);
- }
+ Common::Rect destRect = Common::Rect(_x1, _y1, _x2 + 1, _y2 + 1);
+
+ Common::String subname = _fileName;
+ subname.setChar('s', subname.size() - 3);
+ subname.setChar('u', subname.size() - 2);
+ subname.setChar('b', subname.size() - 1);
+
+ Subtitle *sub = NULL;
+
+ if (_engine->getSearchManager()->hasFile(subname))
+ sub = new Subtitle(_engine, subname);
+
+ _engine->playVideo(decoder, destRect, _skippable, sub);
- _engine->playVideo(decoder, destRect, _skippable);
+ if (sub)
+ delete sub;
}
return true;