summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--emu/MacOSX/win.c31
-rw-r--r--include/version.h2
3 files changed, 33 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index bfda5423..8586ecbd 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+20070927
+ add working drawcursor to emu/MacOSX/win.c, based on mirtchovski's changes (but mapping general cursor images to Mac's form)
20070910
update spki(2) [change handling of hashes, add signature functions] appl/lib/spki/spki.b module/spki.m, updated for GSoC
20070906
diff --git a/emu/MacOSX/win.c b/emu/MacOSX/win.c
index 3d7cd9f3..c6db1429 100644
--- a/emu/MacOSX/win.c
+++ b/emu/MacOSX/win.c
@@ -716,8 +716,37 @@ setpointer(int x, int y)
void
drawcursor(Drawcursor* c)
{
- if(c->data == nil){
+ Cursor crsr;
+ uchar *bc, *bs, *ps, *pm;
+ int i, j, h, w, bpl;
+
+ if(c->data == nil || c->minx >= c->maxx){
InitCursor();
return;
}
+ memset(crsr.data, 0, sizeof(crsr.data));
+ memset(crsr.mask, 0, sizeof(crsr.mask));
+ ps = (uchar*)crsr.data;
+ pm = (uchar*)crsr.mask;
+ h = (c->maxy - c->miny)/2; /* bounds include both masks, strangely */
+ bpl = bytesperline(Rect(c->minx, c->miny, c->maxx, c->maxy), 1);
+ if((w = bpl) > 2)
+ w = 2;
+ bc = c->data;
+ bs = c->data + h*bpl;
+ if(h > 16)
+ h = 16;
+ for(i = 0; i < h; i++){
+ for(j = 0; j < w; j++){
+ ps[j] = bs[j];
+ pm[j] = bs[j] | bc[j];
+ }
+ bs += bpl;
+ bc += bpl;
+ ps += 2;
+ pm += 2;
+ }
+ crsr.hotSpot.h = -c->hotx;
+ crsr.hotSpot.v = -c->hoty;
+ SetCursor(&crsr);
}
diff --git a/include/version.h b/include/version.h
index 10f771c8..1ba3f341 100644
--- a/include/version.h
+++ b/include/version.h
@@ -1 +1 @@
-#define VERSION "Fourth Edition (20070910)"
+#define VERSION "Fourth Edition (20070927)"