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
This commit is contained in:
Filippos Karapetis 2014-12-16 11:08:40 +02:00
parent 1241efcbca
commit 003269dc36
2 changed files with 2 additions and 2 deletions

View File

@ -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]);

View File

@ -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();
}