scummvm/scummvm — pull request #437 by tobiatesan (2014-02-08 00:40:30+00:00)
Title: WME Subtitles

I've ported Mnemonic's subtitle code from WME1 and tweaked it to go with our style and conventions.

This seems to work well enough with both autodetected and 'regular' subtitle files from my demo game (mov_test from my repo wme_testsuite)

However....

*plot twist*, this does not fix subtitles in the intro for Dirty Split... and after careful testing and research, I now strongly suspect this is some unrelated bug.

Here's my findings (I will probably file a bug in the tracker too if you don't point out to my error):

On line 71 of video_subtitler.cpp, it computes what I can only assume to be the correct file name for autodetected subtitles, but openFile() fails to actually open it (same with dump_file).

Such a file does not, in fact, seem to be there.
Printing a list of files from bool BaseFileManager::registerPackages() does not show ANY file with .sub or .SUB extension.

I think this either rules out that it's an autodetected subtitle, or shows that there is some bug in the file manager (note that we have a data.dcp and a english.dcp file).

But subtitleFile in base_game:1202 is an empty string, so it looks like the scripts don't pass a subtitle file.
I can't seem to find a relevant string in scenes\intro_03\scr\scene_init.script either, which is the relevant one that triggers the video\scene_01.ogg video (the one that's been reported as missing subtitles).

=====

So, TL;DR:

1. The script doesn't seem to pass a subtitle file name
2. There does not seem to be any file recognized by the file manager that ends in .sub that could be the autodetected subtitle

Ergo, I suspect the file manager is playing tricks on me and that this code is actually good (also, I really have tweaked Mnemonic's code just a little here and there where practical, and in unrelated areas).

But, at this point you tell me, I've done my best :)