From b9a11ddb0b69910418d0ccc8cf303a2e2a181f3a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 13 Feb 2010 17:46:44 +0000 Subject: SCI: Move language related code from EngineState to SciEngine svn-id: r48052 --- engines/sci/graphics/menu.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'engines/sci/graphics/menu.cpp') diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index 69b38df2e8..581c9f6a44 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -190,8 +190,7 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t if (separatorCount == tempPos - beginPos) { itemEntry->separatorLine = true; } else { - EngineState *s = g_sci->getEngineState(); // HACK: needed for strSplit() - itemEntry->text = s->strSplit(Common::String(content.c_str() + beginPos, tempPos - beginPos).c_str()); + itemEntry->text = g_sci->strSplit(Common::String(content.c_str() + beginPos, tempPos - beginPos).c_str()); // LSL6 uses "Ctrl-" prefix string instead of ^ like all the other games do tempPtr = itemEntry->text.c_str(); @@ -250,7 +249,6 @@ GuiMenuItemEntry *GfxMenu::findItem(uint16 menuId, uint16 itemId) { } void GfxMenu::kernelSetAttribute(uint16 menuId, uint16 itemId, uint16 attributeId, reg_t value) { - EngineState *s = g_sci->getEngineState(); // HACK: needed for strSplit() GuiMenuItemEntry *itemEntry = findItem(menuId, itemId); if (!itemEntry) error("Tried to setAttribute() on non-existant menu-item %d:%d", menuId, itemId); @@ -262,7 +260,7 @@ void GfxMenu::kernelSetAttribute(uint16 menuId, uint16 itemId, uint16 attributeI itemEntry->saidVmPtr = value; break; case SCI_MENU_ATTRIBUTE_TEXT: - itemEntry->text = s->strSplit(_segMan->getString(value).c_str()); + itemEntry->text = g_sci->strSplit(_segMan->getString(value).c_str()); itemEntry->textVmPtr = value; // We assume here that no script ever creates a separatorLine dynamically break; -- cgit v1.2.3