diff -ur ScummVM-cvs20020820/scummvm/gfx.cpp ScummVM-cvs20020820+hack/scummvm/gfx.cpp
old
|
new
|
|
2627 | 2627 | |
2628 | 2628 | void Scumm::decompressDefaultCursor(int idx) |
2629 | 2629 | { |
2630 | | int i; |
| 2630 | int i, j; |
2631 | 2631 | byte color; |
2632 | 2632 | |
2633 | 2633 | memset(_grabbedCursor, 0xFF, sizeof(_grabbedCursor)); |
2634 | | _cursorWidth = 16; |
2635 | | _cursorHeight = 16; |
2636 | | _cursorHotspotX = 8; |
2637 | | _cursorHotspotY = 8; |
2638 | | |
2639 | 2634 | color = default_cursor_colors[idx]; |
2640 | 2635 | |
2641 | | for (i = 0; i < 16; i++) { |
2642 | | if ((i < 7) || (i > 9)) { |
2643 | | _grabbedCursor[16 * 8 + i] = color; |
2644 | | _grabbedCursor[16 * i + 8] = color; |
| 2636 | if (_gameId == GID_LOOM256) { |
| 2637 | // FIXME - One of the first things that happens when playing |
| 2638 | // Loom is that setCursor(1) will be called. That's currently |
| 2639 | // a no-op, but it could mean that this cursor image is to be |
| 2640 | // found somewhere in the game's resources. But Until someone |
| 2641 | // manages to figure that out, use this one instead. |
| 2642 | |
| 2643 | _cursorWidth = 8; |
| 2644 | _cursorHeight = 8; |
| 2645 | _cursorHotspotX = 0; |
| 2646 | _cursorHotspotY = 0; |
| 2647 | |
| 2648 | for (i = 0; i < 8; i++) { |
| 2649 | int w; |
| 2650 | |
| 2651 | if (i == 6) |
| 2652 | w = 4; |
| 2653 | else if (i == 7) |
| 2654 | w = 2; |
| 2655 | else |
| 2656 | w = i + 1; |
| 2657 | |
| 2658 | for (j = 0; j < w; j++) { |
| 2659 | _grabbedCursor[i * 8 + j] = color; |
| 2660 | } |
| 2661 | } |
| 2662 | } else { |
| 2663 | // Standard cross-hair cursor |
| 2664 | |
| 2665 | _cursorWidth = 16; |
| 2666 | _cursorHeight = 16; |
| 2667 | _cursorHotspotX = 7; |
| 2668 | _cursorHotspotY = 7; |
| 2669 | |
| 2670 | for (i = 0; i < 15; i++) { |
| 2671 | if ((i < 6) || (i > 8)) { |
| 2672 | _grabbedCursor[16 * 7 + i] = color; |
| 2673 | _grabbedCursor[16 * i + 7] = color; |
| 2674 | } |
2645 | 2675 | } |
2646 | 2676 | } |
2647 | 2677 | |