From eb4ec596cdb8e541d5221263b3db185bd01b206f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 10 Jun 2010 09:18:57 +0000 Subject: Use the SELECTOR() macro for readability svn-id: r49563 --- engines/sci/graphics/animate.cpp | 4 ++-- engines/sci/graphics/compare.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/sci/graphics') diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index d4def39ebf..48715af53e 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -93,7 +93,7 @@ bool GfxAnimate::invoke(List *list, int argc, reg_t *argv) { signal = readSelectorValue(_s->_segMan, curObject, SELECTOR(signal)); if (!(signal & kSignalFrozen)) { // Call .doit method of that object - invokeSelector(_s, curObject, g_sci->getKernel()->_selectorCache.doit, kContinueOnInvalidSelector, argc, argv, 0); + invokeSelector(_s, curObject, SELECTOR(doit), argc, argv, 0); // Lookup node again, since the nodetable it was in may have been reallocated curNode = _s->_segMan->lookupNode(curAddress); } @@ -497,7 +497,7 @@ void GfxAnimate::restoreAndDelete(int argc, reg_t *argv) { if (signal & kSignalDisposeMe) { // Call .delete_ method of that object - invokeSelector(_s, curObject, g_sci->getKernel()->_selectorCache.delete_, kContinueOnInvalidSelector, argc, argv, 0); + invokeSelector(_s, curObject, SELECTOR(delete_), argc, argv, 0); } listIterator--; } diff --git a/engines/sci/graphics/compare.cpp b/engines/sci/graphics/compare.cpp index 3102edc2fa..47b4f22607 100644 --- a/engines/sci/graphics/compare.cpp +++ b/engines/sci/graphics/compare.cpp @@ -126,14 +126,14 @@ void GfxCompare::kernelSetNowSeen(reg_t objectReference) { int16 x = (int16)readSelectorValue(_segMan, objectReference, SELECTOR(x)); int16 y = (int16)readSelectorValue(_segMan, objectReference, SELECTOR(y)); int16 z = 0; - if (_kernel->_selectorCache.z > -1) + if (SELECTOR(z) > -1) z = (int16)readSelectorValue(_segMan, objectReference, SELECTOR(z)); // now get cel rectangle view = _cache->getView(viewId); view->getCelRect(loopNo, celNo, x, y, z, &celRect); - if (lookupSelector(_segMan, objectReference, _kernel->_selectorCache.nsTop, NULL, NULL) == kSelectorVariable) { + if (lookupSelector(_segMan, objectReference, SELECTOR(nsTop), NULL, NULL) == kSelectorVariable) { writeSelectorValue(_segMan, objectReference, SELECTOR(nsLeft), celRect.left); writeSelectorValue(_segMan, objectReference, SELECTOR(nsRight), celRect.right); writeSelectorValue(_segMan, objectReference, SELECTOR(nsTop), celRect.top); @@ -183,10 +183,10 @@ bool GfxCompare::kernelIsItSkip(GuiResourceId viewId, int16 loopNo, int16 celNo, } void GfxCompare::kernelBaseSetter(reg_t object) { - if (lookupSelector(_segMan, object, _kernel->_selectorCache.brLeft, NULL, NULL) == kSelectorVariable) { + if (lookupSelector(_segMan, object, SELECTOR(brLeft), NULL, NULL) == kSelectorVariable) { int16 x = readSelectorValue(_segMan, object, SELECTOR(x)); int16 y = readSelectorValue(_segMan, object, SELECTOR(y)); - int16 z = (_kernel->_selectorCache.z > -1) ? readSelectorValue(_segMan, object, SELECTOR(z)) : 0; + int16 z = (SELECTOR(z) > -1) ? readSelectorValue(_segMan, object, SELECTOR(z)) : 0; int16 yStep = readSelectorValue(_segMan, object, SELECTOR(yStep)); GuiResourceId viewId = readSelectorValue(_segMan, object, SELECTOR(view)); int16 loopNo = readSelectorValue(_segMan, object, SELECTOR(loop)); -- cgit v1.2.3