aboutsummaryrefslogtreecommitdiff
path: root/CURSOR.C
diff options
context:
space:
mode:
authorDavid Hulsman <davidhulsmannl@gmail.com>2019-07-05 15:50:53 +0200
committerDavid Hulsman <davidhulsmannl@gmail.com>2019-07-05 15:50:53 +0200
commit5e5d78f7722fe13d596de8e9ae23c7e6db8b7b86 (patch)
treeb76c9c86bce5639471b10fd6e1c3687758848e65 /CURSOR.C
parentc7f4deb533625b9558ba787cd30cedb250ae5fc3 (diff)
downloadDeluxePaint-5e5d78f7722fe13d596de8e9ae23c7e6db8b7b86.tar.gz
DeluxePaint-5e5d78f7722fe13d596de8e9ae23c7e6db8b7b86.tar.bz2
DeluxePaint-5e5d78f7722fe13d596de8e9ae23c7e6db8b7b86.zip
moved source into separate /src/ folder; add manual book and reference
Diffstat (limited to 'CURSOR.C')
-rw-r--r--CURSOR.C73
1 files changed, 0 insertions, 73 deletions
diff --git a/CURSOR.C b/CURSOR.C
deleted file mode 100644
index aa731d0..0000000
--- a/CURSOR.C
+++ /dev/null
@@ -1,73 +0,0 @@
-/*----------------------------------------------------------------------*/
-/* */
-/* cursor.c -- Plug in different cursors */
-/* */
-/*----------------------------------------------------------------------*/
-
-#include <system.h>
-#include <prism.h>
-
-extern struct Window *mainW;
-extern BOOL inside;
-extern SHORT curpen;
-
-extern UWORD fillCurs[],crossCurs[],zzz[],size[], pick[];
-
-typedef struct { SHORT w,h,xoffs,yoffs; UWORD *bits; } CursDesc;
-
-CursDesc cursDir[] = {
- {13,17,7,16, fillCurs},
- {15,15,8,7, crossCurs},
- {16,25,8,12, zzz},
- {8,31,0,0, size},
- {11,43,1,0, pick}
- };
-
-
-static SHORT nullSprite[2] = {0};
-
-SHORT curCursor = DEFCURSOR; /* the actual cursor now showing */
-SHORT curPaintCursor = DEFCURSOR; /* the painting cursor */
-SHORT paintCursOn = YES; /* is the painting cursor showing */
-
-
-/* these ignore the Painting cursor */
-HideCursor() { SetPointer(mainW, nullSprite, 0, 0, 0, 0);}
-DefaultCursor() {ClearPointer(mainW);}
-
-JamCursor(n) int n; {
- CursDesc *cd = &cursDir[n-2];
- SetPointer(mainW, cd->bits,cd->h,cd->w,-cd->xoffs,-cd->yoffs);
- }
-
-void SetCursor(n) {
- curCursor = n;
- if (n==NOCURSOR) HideCursor();
- else if (n==DEFCURSOR) DefaultCursor(); else JamCursor(n);
- }
-
-/* this affects the Painting cursor */
-void SetPaintCursor(n) int n; {
- curPaintCursor = n;
- if (!inside) SetCursor(DEFCURSOR);
- else SetCursor((paintCursOn||!((n==DEFCURSOR)||(n==CROSSCURSOR)))? n: NOCURSOR);
- }
-
-DefaultPaintCursor() {
- SetPaintCursor( (curpen==USERBRUSH)? DEFCURSOR: CROSSCURSOR);
- }
-
-/* restore cursor to current Paint Cursor state */
-ResetCursor() {
- if ( (curPaintCursor ==DEFCURSOR) || (curPaintCursor == CROSSCURSOR))
- DefaultPaintCursor();
- else SetPaintCursor(curPaintCursor);
- }
-
-/* Change the Paint Cursor from showing to not or vice versa */
-TogCursor() { paintCursOn = !paintCursOn; ResetCursor(); }
-
-/* These must work event outside of paint window */
-
-ZZZCursor() { JamCursor(ZZZCURSOR); }
-UnZZZCursor() { SetCursor(curCursor); }