aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
authorStrangerke2014-10-10 07:32:30 +0200
committerStrangerke2014-10-10 07:32:30 +0200
commit1d3e5f86f06d4171a885a64f042eebbb2fd7aae7 (patch)
treee89040e206d2a32014342ea899181342f23cbe21 /engines/mads
parent20061c101dd5687ec1a1f68379dcf54a9cea8a0b (diff)
downloadscummvm-rg350-1d3e5f86f06d4171a885a64f042eebbb2fd7aae7.tar.gz
scummvm-rg350-1d3e5f86f06d4171a885a64f042eebbb2fd7aae7.tar.bz2
scummvm-rg350-1d3e5f86f06d4171a885a64f042eebbb2fd7aae7.zip
MADS: Rex - Reduce the scope of some variables in TextView
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/nebular/menu_nebular.cpp6
1 files changed, 3 insertions, 3 deletions
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;