| 2984 | static const uint16 default_cursor_images[4][16] = { |
| 2985 | /* cross-hair */ |
| 2986 | { 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0000, 0x7e3f, |
| 2987 | 0x0000, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0080, 0x0000 }, |
| 2988 | /* hourglass */ |
| 2989 | { 0x0000, 0x7ffe, 0x6006, 0x300c, 0x1818, 0x0c30, 0x0660, 0x03c0, |
| 2990 | 0x0660, 0x0c30, 0x1998, 0x33cc, 0x67e6, 0x7ffe, 0x0000, 0x0000 }, |
| 2991 | /* arrow */ |
| 2992 | { 0x0000, 0x4000, 0x6000, 0x7000, 0x7800, 0x7c00, 0x7e00, 0x7f00, |
| 2993 | 0x7f80, 0x78c0, 0x7c00, 0x4600, 0x0600, 0x0300, 0x0300, 0x0180 }, |
| 2994 | /* hand */ |
| 2995 | { 0x1e00, 0x1200, 0x1200, 0x1200, 0x1200, 0x13ff, 0x1249, 0x1249, |
| 2996 | 0xf249, 0x9001, 0x9001, 0x9001, 0x8001, 0x8001, 0x8001, 0xffff }, |
| 2997 | }; |
| 2998 | |
| 2999 | static const byte default_cursor_hotspots[8] = { |
| 3000 | 8, 7, 8, 7, 1, 1, 5, 0 |
| 3001 | }; |
| 3002 | |
2994 | | for (i = 0; i < 16; i++) { |
2995 | | if ((i < 7) || (i > 9)) { |
2996 | | _grabbedCursor[16 * 8 + i] = color; |
2997 | | _grabbedCursor[16 * i + 8] = color; |
| 3012 | // FIXME: None of the stock cursors are right for Loom. Why is that? |
| 3013 | |
| 3014 | if (_gameId == GID_LOOM256) { |
| 3015 | int w; |
| 3016 | |
| 3017 | _cursorWidth = 8; |
| 3018 | _cursorHeight = 8; |
| 3019 | _cursorHotspotX = 0; |
| 3020 | _cursorHotspotY = 0; |
| 3021 | |
| 3022 | for (i = 0, w = 0; i < 8; i++) { |
| 3023 | w += (i >= 6) ? -2 : 1; |
| 3024 | for (j = 0; j < w; j++) |
| 3025 | _grabbedCursor[i * 8 + j] = color; |
| 3026 | } |
| 3027 | } else { |
| 3028 | _cursorWidth = 16; |
| 3029 | _cursorHeight = 16; |
| 3030 | _cursorHotspotX = default_cursor_hotspots[2 * gdi._currentCursor]; |
| 3031 | _cursorHotspotY = default_cursor_hotspots[2 * gdi._currentCursor + 1]; |
| 3032 | |
| 3033 | for (i = 0; i < 16; i++) { |
| 3034 | for (j = 0; j < 16; j++) { |
| 3035 | if (default_cursor_images[gdi._currentCursor][i] & (1 << j)) |
| 3036 | _grabbedCursor[16 * i + 15 - j] = color; |
| 3037 | } |