mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
SCI: kDrawStatus now calls s->gui->drawStatus with NULL if no text given
svn-id: r44673
This commit is contained in:
parent
442a870123
commit
e6b1a0cb4b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user