diff options
author | Max Horn | 2002-12-29 19:51:27 +0000 |
---|---|---|
committer | Max Horn | 2002-12-29 19:51:27 +0000 |
commit | 4cf27c6265e6aa17ff1e4191172f712174b9c8de (patch) | |
tree | 6c8d037ba38e5c61c56afaac2ec10baa629bfc3a /scumm/string.cpp | |
parent | 974369502a444489749b94f3b621dd1d66ad4b4b (diff) | |
download | scummvm-rg350-4cf27c6265e6aa17ff1e4191172f712174b9c8de.tar.gz scummvm-rg350-4cf27c6265e6aa17ff1e4191172f712174b9c8de.tar.bz2 scummvm-rg350-4cf27c6265e6aa17ff1e4191172f712174b9c8de.zip |
fixed indentation and a warning
svn-id: r6260
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r-- | scumm/string.cpp | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp index 58efc07868..7cd4d3c335 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; - - 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 (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); + + 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) |