Changes between Initial Version and Version 1 of Ticket #10814, comment 1


Ignore:
Timestamp:
Nov 21, 2018, 7:15:53 PM (6 years ago)
Author:
Vhati

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10814, comment 1

    initial v1  
    2020)
    2121}}}
     22\\
     23\\
     24[http://scicompanion.com/Documentation/Kernels/SetNowSeen.html Article]: SCI Companion - SetNowSeen (Kernel)
     25> It looks up the view object's x and y properties, as well as the view/cel/loop to determine its width and height, then sets its nsLeft, nsTop, nsRight and nsBottom properties accordingly.
     26\\
     27\\
     28[https://github.com/scummvm/scummvm/blob/c9a8ee019073a6fb0501f404d63631530716b498/engines/sci/graphics/compare.cpp#L111 Source]: engines/sci/graphics/compare.cpp - GfxCompare::kernelSetNowSeen
     29{{{
     30void GfxCompare::kernelSetNowSeen(reg_t objectReference) {
     31        GfxView *view = NULL;
     32        Common::Rect celRect(0, 0);
     33        GuiResourceId viewId = (GuiResourceId)readSelectorValue(_segMan, objectReference, SELECTOR(view));
     34        int16 loopNo = readSelectorValue(_segMan, objectReference, SELECTOR(loop));
     35        int16 celNo = readSelectorValue(_segMan, objectReference, SELECTOR(cel));
     36        int16 x = (int16)readSelectorValue(_segMan, objectReference, SELECTOR(x));
     37        int16 y = (int16)readSelectorValue(_segMan, objectReference, SELECTOR(y));
     38        int16 z = 0;
     39        if (SELECTOR(z) > -1)
     40                z = (int16)readSelectorValue(_segMan, objectReference, SELECTOR(z));
     41
     42        view = _cache->getView(viewId);
     43        view->getCelRect(loopNo, celNo, x, y, z, celRect);
     44
     45        if (lookupSelector(_segMan, objectReference, SELECTOR(nsTop), NULL, NULL) == kSelectorVariable) {
     46                setNSRect(objectReference, celRect);
     47        }
     48}
     49}}}
     50\\
     51\\
     52From context, the script might be expecting the kernel call to return 1 or 0 to indicate success. I haven't spent much time among kernel calls. That one doesn't seem to be returning anything at all?