aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/video
diff options
context:
space:
mode:
authorTobia Tesan2014-11-05 19:42:17 +0100
committerTobia Tesan2014-11-05 19:42:17 +0100
commit998da18c05c159f6dffe2b25d0afe23021c8ec38 (patch)
treee923b5927d15e4429366a0dc0b67605cefb3ee6f /engines/wintermute/video
parent2f082f6e438598f9093c92482bd6f75af264d785 (diff)
downloadscummvm-rg350-998da18c05c159f6dffe2b25d0afe23021c8ec38.tar.gz
scummvm-rg350-998da18c05c159f6dffe2b25d0afe23021c8ec38.tar.bz2
scummvm-rg350-998da18c05c159f6dffe2b25d0afe23021c8ec38.zip
WINTERMUTE: Move var declarations inside loop in loadSubtitles
Diffstat (limited to 'engines/wintermute/video')
-rw-r--r--engines/wintermute/video/video_subtitler.cpp23
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' &&