diff options
Diffstat (limited to 'engines/sci/graphics/controls.cpp')
-rw-r--r-- | engines/sci/graphics/controls.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp index f744d6e7f1..26af9741c2 100644 --- a/engines/sci/graphics/controls.cpp +++ b/engines/sci/graphics/controls.cpp @@ -143,9 +143,9 @@ void GfxControls::texteditSetBlinkTime() { } void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) { - uint16 cursorPos = GET_SEL32V(_segMan, controlObject, SELECTOR(cursor)); - uint16 maxChars = GET_SEL32V(_segMan, controlObject, SELECTOR(max)); - reg_t textReference = GET_SEL32(_segMan, controlObject, SELECTOR(text)); + uint16 cursorPos = readSelectorValue(_segMan, controlObject, SELECTOR(cursor)); + uint16 maxChars = readSelectorValue(_segMan, controlObject, SELECTOR(max)); + reg_t textReference = readSelector(_segMan, controlObject, SELECTOR(text)); Common::String text; uint16 textSize, eventType, eventKey = 0; bool textChanged = false; @@ -158,14 +158,14 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) { if (!eventObject.isNull()) { textSize = text.size(); - eventType = GET_SEL32V(_segMan, eventObject, SELECTOR(type)); + eventType = readSelectorValue(_segMan, eventObject, SELECTOR(type)); switch (eventType) { case SCI_EVENT_MOUSE_PRESS: // TODO: Implement mouse support for cursor change break; case SCI_EVENT_KEYBOARD: - eventKey = GET_SEL32V(_segMan, eventObject, SELECTOR(message)); + eventKey = readSelectorValue(_segMan, eventObject, SELECTOR(message)); switch (eventKey) { case SCI_KEY_BACKSPACE: if (cursorPos > 0) { @@ -207,9 +207,9 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) { if (textChanged) { GuiResourceId oldFontId = _text16->GetFontId(); - GuiResourceId fontId = GET_SEL32V(_segMan, controlObject, SELECTOR(font)); - rect = Common::Rect(GET_SEL32V(_segMan, controlObject, SELECTOR(nsLeft)), GET_SEL32V(_segMan, controlObject, SELECTOR(nsTop)), - GET_SEL32V(_segMan, controlObject, SELECTOR(nsRight)), GET_SEL32V(_segMan, controlObject, SELECTOR(nsBottom))); + GuiResourceId fontId = readSelectorValue(_segMan, controlObject, SELECTOR(font)); + rect = Common::Rect(readSelectorValue(_segMan, controlObject, SELECTOR(nsLeft)), readSelectorValue(_segMan, controlObject, SELECTOR(nsTop)), + readSelectorValue(_segMan, controlObject, SELECTOR(nsRight)), readSelectorValue(_segMan, controlObject, SELECTOR(nsBottom))); _text16->SetFont(fontId); if (textAddChar) { // We check, if we are really able to add the new char @@ -241,7 +241,7 @@ void GfxControls::kernelTexteditChange(reg_t controlObject, reg_t eventObject) { } } - PUT_SEL32V(_segMan, controlObject, SELECTOR(cursor), cursorPos); + writeSelectorValue(_segMan, controlObject, SELECTOR(cursor), cursorPos); } int GfxControls::getPicNotValid() { |