diff options
author | Filippos Karapetis | 2012-06-18 05:21:59 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-06-18 05:24:06 +0300 |
commit | 2b50824133ced47f1d8fb6407a1e0212a7eeb41c (patch) | |
tree | 9694687f829e097a92af756e38d05b3078829636 /engines/sci/graphics/menu.cpp | |
parent | 3c04d333f2f6a423a67a8d0202ffca29d22da9db (diff) | |
download | scummvm-rg350-2b50824133ced47f1d8fb6407a1e0212a7eeb41c.tar.gz scummvm-rg350-2b50824133ced47f1d8fb6407a1e0212a7eeb41c.tar.bz2 scummvm-rg350-2b50824133ced47f1d8fb6407a1e0212a7eeb41c.zip |
SCI: Add setter/getter methods to reg_t's
No functionality change has been made with this commit. This avoids
setting and getting the reg_t members directly, and is the basis of any
future work on large SCI3 scripts (larger than 64KB)
Diffstat (limited to 'engines/sci/graphics/menu.cpp')
-rw-r--r-- | engines/sci/graphics/menu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index 47f34cf99d..bfecc296a2 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -219,7 +219,7 @@ void GfxMenu::kernelAddEntry(Common::String title, Common::String content, reg_t } } itemEntry->textVmPtr = contentVmPtr; - itemEntry->textVmPtr.offset += beginPos; + itemEntry->textVmPtr.incOffset(beginPos); if (rightAlignedPos) { rightAlignedPos++; @@ -297,13 +297,13 @@ void GfxMenu::kernelSetAttribute(uint16 menuId, uint16 itemId, uint16 attributeI // We assume here that no script ever creates a separatorLine dynamically break; case SCI_MENU_ATTRIBUTE_KEYPRESS: - itemEntry->keyPress = tolower(value.offset); + itemEntry->keyPress = tolower(value.getOffset()); itemEntry->keyModifier = 0; // TODO: Find out how modifier is handled - debug("setAttr keypress %X %X", value.segment, value.offset); + debug("setAttr keypress %X %X", value.getSegment(), value.getOffset()); break; case SCI_MENU_ATTRIBUTE_TAG: - itemEntry->tag = value.offset; + itemEntry->tag = value.getOffset(); break; default: // Happens when loading a game in LSL3 - attribute 1A |