Ticket #5969: laurabow-dagger-debug-1.patch

File laurabow-dagger-debug-1.patch, 2.5 KB (added by digitall, 9 years ago)

Debugging Patch #1 - Dagger is loaded correctly...

  • engines/sci/engine/features.cpp

    diff --git a/engines/sci/engine/features.cpp b/engines/sci/engine/features.cpp
    index b3cfee8..17aec77 100644
    a b SciVersion GameFeatures::detectSetCursorType() {  
    171171                if (getSciVersion() <= SCI_VERSION_1_MIDDLE) {
    172172                        // SCI1 middle and older games never use cursor views
    173173                        _setCursorType = SCI_VERSION_0_EARLY;
     174                        debugC(1, kDebugLevelGraphics, "getSciVersion():%d", getSciVersion());
    174175                } else if (getSciVersion() >= SCI_VERSION_1_1) {
    175176                        // SCI1.1 games always use cursor views
    176177                        _setCursorType = SCI_VERSION_1_1;
  • engines/sci/engine/kgraphics.cpp

    diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
    index caae562..5297411 100644
    a b void kDirLoopWorker(reg_t object, uint16 angle, EngineState *s, int argc, reg_t  
    116116static reg_t kSetCursorSci0(EngineState *s, int argc, reg_t *argv) {
    117117        Common::Point pos;
    118118        GuiResourceId cursorId = argv[0].toSint16();
     119        debug(1, "kSetCursorSci0 cursorId:%d", cursorId);
    119120
    120121        // Set pointer position, if requested
    121122        if (argc >= 4) {
  • engines/sci/graphics/cursor.cpp

    diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp
    index a939b04..6dd9d5c 100644
    a b void GfxCursor::init(GfxCoordAdjuster *coordAdjuster, EventManager *event) {  
    7676}
    7777
    7878void GfxCursor::kernelShow() {
     79        debug(1, "GfxCursor::kernelShow()");
    7980        CursorMan.showMouse(true);
    8081        _isVisible = true;
    8182}
    8283
    8384void GfxCursor::kernelHide() {
     85        debug(1, "GfxCursor::kernelHide()");
    8486        CursorMan.showMouse(false);
    8587        _isVisible = false;
    8688}
    void GfxCursor::purgeCache() {  
    99101}
    100102
    101103void GfxCursor::kernelSetShape(GuiResourceId resourceId) {
     104        debug(1, "GfxCursor::kernelSetShape(resourceId: %d)", resourceId);
    102105        Resource *resource;
    103106        byte *resourceData;
    104107        Common::Point hotspot = Common::Point(0, 0);
    void GfxCursor::kernelSetShape(GuiResourceId resourceId) {  
    153156
    154157                for (x = 0; x < SCI_CURSOR_SCI0_HEIGHTWIDTH; x++) {
    155158                        color = (((maskA << x) & 0x8000) | (((maskB << x) >> 1) & 0x4000)) >> 14;
     159                        if (color == 2)
     160                                debugN(1, " ");
     161                        else
     162                                debugN(1, "%d", color);
    156163                        *pOut++ = colorMapping[color];
    157164                }
     165                debug(1, " ");
    158166        }
    159167
    160168        heightWidth = SCI_CURSOR_SCI0_HEIGHTWIDTH;
    161169
    162170        if (_upscaledHires) {
     171                debug(1, "_upscaledHires Cursor");
    163172                // Scale cursor by 2x - note: sierra didn't do this, but it looks much better
    164173                heightWidth *= 2;
    165174                hotspot.x *= 2;