Unified · Split
| @@ -1,3 +1,5 @@ | ||
| 1 | +20070927 | |
| 2 | + add working drawcursor to emu/MacOSX/win.c, based on mirtchovski's changes (but mapping general cursor images to Mac's form) | |
| 1 | 3 | 20070910 |
| 2 | 4 | update spki(2) [change handling of hashes, add signature functions] appl/lib/spki/spki.b module/spki.m, updated for GSoC |
| 3 | 5 | 20070906 |
| @@ -716,8 +716,37 @@ setpointer(int x, int y) · 715 unmodified lines | ||
| 716 | 716 | void |
| 717 | 717 | drawcursor(Drawcursor* c) |
| 718 | 718 | { |
| 719 | − if(c->data == nil){ | |
| 719 | + Cursor crsr; | |
| 720 | + uchar *bc, *bs, *ps, *pm; | |
| 721 | + int i, j, h, w, bpl; | |
| 722 | + | |
| 723 | + if(c->data == nil || c->minx >= c->maxx){ | |
| 720 | 724 | InitCursor(); |
| 721 | 725 | return; |
| 722 | 726 | } |
| 727 | + memset(crsr.data, 0, sizeof(crsr.data)); | |
| 728 | + memset(crsr.mask, 0, sizeof(crsr.mask)); | |
| 729 | + ps = (uchar*)crsr.data; | |
| 730 | + pm = (uchar*)crsr.mask; | |
| 731 | + h = (c->maxy - c->miny)/2; /* bounds include both masks, strangely */ | |
| 732 | + bpl = bytesperline(Rect(c->minx, c->miny, c->maxx, c->maxy), 1); | |
| 733 | + if((w = bpl) > 2) | |
| 734 | + w = 2; | |
| 735 | + bc = c->data; | |
| 736 | + bs = c->data + h*bpl; | |
| 737 | + if(h > 16) | |
| 738 | + h = 16; | |
| 739 | + for(i = 0; i < h; i++){ | |
| 740 | + for(j = 0; j < w; j++){ | |
| 741 | + ps[j] = bs[j]; | |
| 742 | + pm[j] = bs[j] | bc[j]; | |
| 743 | + } | |
| 744 | + bs += bpl; | |
| 745 | + bc += bpl; | |
| 746 | + ps += 2; | |
| 747 | + pm += 2; | |
| 748 | + } | |
| 749 | + crsr.hotSpot.h = -c->hotx; | |
| 750 | + crsr.hotSpot.v = -c->hoty; | |
| 751 | + SetCursor(&crsr); | |
| 723 | 752 | } |
| @@ -1 +1 @@ | ||
| 1 | −#define VERSION "Fourth Edition (20070910)" | |
| 1 | +#define VERSION "Fourth Edition (20070927)" | |