diff options
-rw-r--r-- | engines/wintermute/video/video_subtitler.cpp | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/engines/wintermute/video/video_subtitler.cpp b/engines/wintermute/video/video_subtitler.cpp index 86f8f9b128..95d938574b 100644 --- a/engines/wintermute/video/video_subtitler.cpp +++ b/engines/wintermute/video/video_subtitler.cpp @@ -85,25 +85,20 @@ bool VideoSubtitler::loadSubtitles(const Common::String &filename, const Common: file->read(buffer, fileSize); - bool inToken; - char *tokenStart = 0; - int tokenLength = 0; - int tokenPos = 0; - - int pos = 0; - int lineLength = 0; /* This is where we parse .sub files. * Subtitles cards are in the form * {StartFrame}{EndFrame} FirstLine | SecondLine \n */ - while (pos < fileSize) { - int start, end; - - start = end = -1; - inToken = false; - tokenPos = -1; + int pos = 0; - lineLength = 0; + while (pos < fileSize) { + char *tokenStart = 0; + int tokenLength = 0; + int tokenPos = -1; + int lineLength = 0; + int start = -1; + int end = -1; + bool inToken = false; while (pos + lineLength < fileSize && buffer[pos + lineLength] != '\n' && |