Skip to content

Commit

Permalink
SHERLOCK: RT: Replace some constant values with _opcodes[OP_NULL]
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Jun 19, 2015
1 parent 7186eab commit 223c270
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions engines/sherlock/tattoo/widget_base.cpp
Expand Up @@ -53,7 +53,7 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA
const char *lineStartP = strP;

// Find how many characters will fit on the next line
while (width < maxWidth && *strP && (*strP < 170 || *strP == 225)) {
while (width < maxWidth && *strP && (*strP < 170 || *strP == talk._opcodes[OP_NULL])) {
width += _surface.charWidth(*strP);

// Keep track of the last space
Expand All @@ -73,7 +73,7 @@ Common::String WidgetBase::splitLines(const Common::String &str, Common::StringA
// Move the string ahead to the next line
if (*strP == ' ' || *strP == 13)
++strP;
} while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == 225));
} while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == talk._opcodes[OP_NULL]));

// Return any remaining text left over
return *strP ? Common::String(strP) : Common::String();
Expand Down
2 changes: 1 addition & 1 deletion engines/sherlock/tattoo/widget_text.cpp
Expand Up @@ -58,7 +58,7 @@ void WidgetText::load(const Common::String &str) {
width = _surface.widestChar() * 2 + 6;

const char *strP = str.c_str();
while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == 225))
while (*strP && (*strP < talk._opcodes[OP_SWITCH_SPEAKER] || *strP == talk._opcodes[OP_NULL]))
width += _surface.charWidth(*strP++);
}

Expand Down

0 comments on commit 223c270

Please sign in to comment.