From 1d3e5f86f06d4171a885a64f042eebbb2fd7aae7 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 10 Oct 2014 07:32:30 +0200 Subject: MADS: Rex - Reduce the scope of some variables in TextView --- engines/mads/nebular/menu_nebular.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/mads/nebular/menu_nebular.cpp') diff --git a/engines/mads/nebular/menu_nebular.cpp b/engines/mads/nebular/menu_nebular.cpp index 1fbf96dcd5..a85a67d69b 100644 --- a/engines/mads/nebular/menu_nebular.cpp +++ b/engines/mads/nebular/menu_nebular.cpp @@ -619,7 +619,7 @@ int TextView::getParameter(const char **paramP) { } void TextView::processText() { - int lineWidth, xStart; + int xStart; if (!strcmp(_currentLine, "***")) { // Special signifier for end of script @@ -643,7 +643,7 @@ void TextView::processText() { strcpy(centerP, p); } else { - lineWidth = _font->getWidth(_currentLine); + int lineWidth = _font->getWidth(_currentLine); xStart = (MADS_SCREEN_WIDTH - lineWidth) / 2; } @@ -951,10 +951,10 @@ void AnimationView::processLines() { return; } - char c; while (!_script.eos()) { // Get in next line _currentLine.clear(); + char c; while (!_script.eos() && (c = _script.readByte()) != '\n') { if (c != '\r') _currentLine += c; -- cgit v1.2.3