diff options
author | Strangerke | 2014-05-27 19:34:15 +0200 |
---|---|---|
committer | Strangerke | 2014-05-27 19:34:15 +0200 |
commit | de575ca897384a6d1ea3a7061d1eb6aed529fa46 (patch) | |
tree | 25a0102882ef49093fa1d32d58f1f28e2335439a /engines/mads | |
parent | 25b20a0c003d775b8f242f04b1698d3a6435ca28 (diff) | |
download | scummvm-rg350-de575ca897384a6d1ea3a7061d1eb6aed529fa46.tar.gz scummvm-rg350-de575ca897384a6d1ea3a7061d1eb6aed529fa46.tar.bz2 scummvm-rg350-de575ca897384a6d1ea3a7061d1eb6aed529fa46.zip |
MADS: Remove a couple of goto
Diffstat (limited to 'engines/mads')
-rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index 6720205e3e..d8a85d472d 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -575,15 +575,19 @@ void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align, DialogLine *line; if (_lineIndex < (int)_lines.size()) { - if (_lines.size() >= 20) - goto finish; + if (_lines.size() >= 20) { + ++_lineIndex; + return; + } _lines.push_back(msg); line = &_lines[_lines.size() - 1]; } else { line = &_lines[_lineIndex]; - if (msg.compareToIgnoreCase(msg)) - goto finish; + if (msg.compareToIgnoreCase(msg)) { + ++_lineIndex; + return; + } if (line->_textDisplayIndex >= 0) { TextDisplay &textDisplay = scene._textDisplay[line->_textDisplayIndex]; @@ -630,7 +634,6 @@ void ScreenDialog::addLine(const Common::String &msg, DialogTextAlign align, break; } -finish: ++_lineIndex; } |