From 4cf27c6265e6aa17ff1e4191172f712174b9c8de Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 29 Dec 2002 19:51:27 +0000 Subject: [PATCH] fixed indentation and a warning svn-id: r6260 --- scumm/string.cpp | 61 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/scumm/string.cpp b/scumm/string.cpp index 58efc07868b..7cd4d3c335e 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -712,29 +712,29 @@ void Scumm::addIntToStack(int var) void Scumm::addVerbToStack(int var) { - int num, i; + int num, k; num = readVar(var); if (num) { - for (i = 1; i < _maxVerbs; i++) { - if (num == _verbs[i].verbid && !_verbs[i].type && !_verbs[i].saveid) { - byte *ptr = getResourceAddress(rtVerb, i); - if ((_features & GF_AFTER_V8) && (ptr[0] == '/')) { - char pointer[20]; - int i, j; + for (k = 1; k < _maxVerbs; k++) { + if (num == _verbs[k].verbid && !_verbs[k].type && !_verbs[k].saveid) { + byte *ptr = getResourceAddress(rtVerb, k); + if ((_features & GF_AFTER_V8) && (ptr[0] == '/')) { + char pointer[20]; + int i, j; - translateText(ptr, _transText); + translateText(ptr, _transText); - for (i = 0, j = 0; (ptr[i] != '/' || j == 0) && j < 19; i++) { - if (ptr[i] != '/') - pointer[j++] = ptr[i]; - } - pointer[j] = 0; - _sound->_talkChannel = _sound->playBundleSound(pointer); - addMessageToStack(_transText); - } else { - addMessageToStack(ptr); - } + for (i = 0, j = 0; (ptr[i] != '/' || j == 0) && j < 19; i++) { + if (ptr[i] != '/') + pointer[j++] = ptr[i]; + } + pointer[j] = 0; + _sound->_talkChannel = _sound->playBundleSound(pointer); + addMessageToStack(_transText); + } else { + addMessageToStack(ptr); + } break; } } @@ -765,26 +765,25 @@ void Scumm::addStringToStack(int var) if (var) { ptr = getStringAddress(var); if (ptr) { - if ((_features & GF_AFTER_V8) && (ptr[0] == '/')) { - char pointer[20]; - int i, j; + if ((_features & GF_AFTER_V8) && (ptr[0] == '/')) { + char pointer[20]; + int i, j; - translateText(ptr, _transText); + translateText(ptr, _transText); - for (i = 0, j = 0; (ptr[i] != '/' || j == 0) && j < 19; i++) { - if (ptr[i] != '/') - pointer[j++] = ptr[i]; - } - pointer[j] = 0; + for (i = 0, j = 0; (ptr[i] != '/' || j == 0) && j < 19; i++) { + if (ptr[i] != '/') + pointer[j++] = ptr[i]; + } + pointer[j] = 0; _sound->_talkChannel = _sound->playBundleSound(pointer); addMessageToStack(_transText); - } else { + } else { addMessageToStack(ptr); } - return; } - } - addMessageToStack((byte *)""); + } else + addMessageToStack((byte *)""); } void Scumm::initCharset(int charsetno)