diff options
author | Max Horn | 2010-02-13 17:46:44 +0000 |
---|---|---|
committer | Max Horn | 2010-02-13 17:46:44 +0000 |
commit | b9a11ddb0b69910418d0ccc8cf303a2e2a181f3a (patch) | |
tree | 277ec4eb1546916c8695f47e9bafb357916247bb /engines/sci/graphics | |
parent | 06021f79acfb32677e68b8697d5ba63059a6893d (diff) | |
download | scummvm-rg350-b9a11ddb0b69910418d0ccc8cf303a2e2a181f3a.tar.gz scummvm-rg350-b9a11ddb0b69910418d0ccc8cf303a2e2a181f3a.tar.bz2 scummvm-rg350-b9a11ddb0b69910418d0ccc8cf303a2e2a181f3a.zip |
SCI: Move language related code from EngineState to SciEngine
svn-id: r48052
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/menu.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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; |