SCI: kDrawStatus now calls s->gui->drawStatus with NULL if no text given

svn-id: r44673
This commit is contained in:
Martin Kiewitz 2009-10-05 19:39:47 +00:00
parent 442a870123
commit e6b1a0cb4b

View File

@ -67,14 +67,17 @@ reg_t kGetMenu(EngineState *s, int argc, reg_t *argv) {
reg_t kDrawStatus(EngineState *s, int argc, reg_t *argv) {
reg_t textReference = argv[0];
Common::String text;
Common::String textCommon;
const char *text = NULL;
int16 colorPen = (argc > 1) ? argv[1].toSint16() : 0; // old code was: s->status_bar_foreground;
int16 colorBack = (argc > 2) ? argv[2].toSint16() : 255; // s->status_bar_background;
if (!textReference.isNull())
text = s->_segMan->getString(textReference);
if (!textReference.isNull()) {
textCommon = s->strSplit(s->_segMan->getString(textReference).c_str(), NULL);
text = textCommon.c_str();
}
s->gui->drawStatus(s->strSplit(text.c_str(), NULL).c_str(), colorPen, colorBack);
s->gui->drawStatus(text, colorPen, colorBack);
return s->r_acc;
}