Skip to content
Permalink
Browse files

ZVISION: Fix the display of state variables, such as the high score

Common::String::format() was used incorrectly. Also, state variables
were handled incorrectly in the TTY text parser
  • Loading branch information
bluegr committed Dec 16, 2014
1 parent 1241efc commit 003269dc36288a99d15c65f44d2181ad08dc6181
Showing with 2 additions and 2 deletions.
  1. +1 −1 engines/zvision/scripting/sidefx/ttytext_node.cpp
  2. +1 −1 engines/zvision/text/text.cpp
@@ -96,7 +96,7 @@ bool ttyTextNode::process(uint32 deltaTimeInMillis) {

if (ret & TXT_RET_HASSTBOX) {
Common::String buf;
buf.format("%d", _style.statebox);
buf = Common::String::format("%d", _engine->getScriptManager()->getStateValue(_style.statebox));

for (uint8 j = 0; j < buf.size(); j++)
outchar(buf[j]);
@@ -396,7 +396,7 @@ void TextRenderer::drawTxtInOneLine(const Common::String &text, Graphics::Surfac

if (ret & TXT_RET_HASSTBOX) {
Common::String buf3;
buf3.format("%d", _engine->getScriptManager()->getStateValue(style.statebox));
buf3 = Common::String::format("%d", _engine->getScriptManager()->getStateValue(style.statebox));
buf += buf3;
textPosition += buf3.size();
}

0 comments on commit 003269d

Please sign in to comment.
You can’t perform that action at this time.