diff options
| author | Paul Gilbert | 2014-04-04 09:35:18 -0400 |
|---|---|---|
| committer | Paul Gilbert | 2014-04-04 09:35:18 -0400 |
| commit | 4639d37609f62bae8d0bcffc5a2e64c79f2659a7 (patch) | |
| tree | 2e8e16ac1f44899b40f5e1978e0244ab612c31e3 /engines/mads/nebular/dialogs_nebular.cpp | |
| parent | 366e6ae38f9916277096f93bed393edd0cd83e45 (diff) | |
| download | scummvm-rg350-4639d37609f62bae8d0bcffc5a2e64c79f2659a7.tar.gz scummvm-rg350-4639d37609f62bae8d0bcffc5a2e64c79f2659a7.tar.bz2 scummvm-rg350-4639d37609f62bae8d0bcffc5a2e64c79f2659a7.zip | |
MADS: Fixes for properly displaying the text of a message dialog
Diffstat (limited to 'engines/mads/nebular/dialogs_nebular.cpp')
| -rw-r--r-- | engines/mads/nebular/dialogs_nebular.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/engines/mads/nebular/dialogs_nebular.cpp b/engines/mads/nebular/dialogs_nebular.cpp index 3be3db33b3..ff25696f5d 100644 --- a/engines/mads/nebular/dialogs_nebular.cpp +++ b/engines/mads/nebular/dialogs_nebular.cpp @@ -125,9 +125,9 @@ bool DialogsNebular::show(int msgId) { Common::String dialogText; bool result = true; bool centerFlag = false; - bool underlineFlag; - bool commandFlag; - bool crFlag; + bool underlineFlag = false; + bool commandFlag = false; + bool crFlag = false; TextDialog *dialog = nullptr; _dialogWidth = 17; _capitalizationMode = kUppercase; @@ -136,11 +136,6 @@ bool DialogsNebular::show(int msgId) { for (uint idx = 0; idx < msg.size(); ++idx) { Common::String srcLine = msg[idx]; const char *srcP = srcLine.c_str(); - dialogText = ""; - commandFlag = false; - underlineFlag = false; - centerFlag = false; - crFlag = false; // Loop through the text of the line while (srcP < srcLine.c_str() + srcLine.size()) { @@ -226,6 +221,13 @@ bool DialogsNebular::show(int msgId) { } else { dialog->wordWrap(dialogText); } + + // Reset line processing flags in preparation for next line + dialogText = ""; + commandFlag = false; + underlineFlag = false; + centerFlag = false; + crFlag = false; } if (!centerFlag) |
