revert between 56095 -> 55830 in arch
[AROS.git] / compiler / include / graphics / gfxmacros.h
blob8c873ca3431dc62ca3489968b754dac84ba2087c
1 #ifndef GRAPHICS_GFXMACROS_H
2 #define GRAPHICS_GFXMACROS_H
4 /*
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: AmigaOS include file graphics/gfxmacros.h
9 Lang: english
12 #ifndef EXEC_TYPES_H
13 # include <exec/types.h>
14 #endif
16 #ifndef GRAPHICS_RASTPORT_H
17 # include <graphics/rastport.h>
18 #endif
20 /* NOTE: The following symbol must be defined in your source
21 code if one needs the old style macros. Otherwise
22 one will get the new veresions, which are more robust */
24 #ifdef OLD_GRAPHICS_GFXMACROS_H
26 /* Some macros which should be functions... */
27 #define SetDrPt(w,p) \
28 { \
29 (w)->LinePtrn = p; \
30 (w)->Flags |= FRST_DOT|0x10; \
31 (w)->linpatcnt = 15; \
34 #define SetAfPt(w,p,n) \
35 { \
36 (w)->AreaPtrn = p; \
37 (w)->AreaPtSz = n; \
40 #define SetOPen(w,c) \
41 { \
42 (w)->AOlPen = c; \
43 (w)->Flags |= AREAOUTLINE; \
46 #define SetAOlPen(w,p) SetOutlinePen(w,p)
47 #define SetWrMsk(w,m) SetWriteMask(w,m)
48 #define BNDRYOFF(w) {(w)->Flags &= ~AREAOUTLINE;}
50 /* Some macros for copper lists */
51 #define CINIT(c,n) UCopperListInit(c,n);
52 #define CMOVE(c,a,b) { CMove(c,&a,b); CBump(c); }
53 #define CWAIT(c,a,b) { CWait(c,a,b); CBump(c); }
54 #define CEND(c) { CWAIT(c,10000,255); }
56 /* Shortcuts */
57 #define DrawCircle(rp,cx,cy,r) DrawEllipse(rp,cx,cy,r,r);
58 #define AreaCircle(rp,cx,cy,r) AreaEllipse(rp,cx,cy,r,r);
60 #else /* OLD_GRAPHICS_GFXMACROS_H */
62 /* Some macros which should be functions... */
63 #define SetDrPt(w,p) \
64 do { \
65 (w)->LinePtrn = p; \
66 (w)->Flags |= FRST_DOT|0x10; \
67 (w)->linpatcnt = 15; \
68 } while (0)
70 #define SetAfPt(w,p,n) \
71 do { \
72 (w)->AreaPtrn = p; \
73 (w)->AreaPtSz = n; \
74 } while (0)
76 #define SetOPen(w,c) \
77 do { \
78 (w)->AOlPen = c; \
79 (w)->Flags |= AREAOUTLINE; \
80 } while (0)
82 #define SetAOlPen(w,p) SetOutlinePen(w,p)
83 #define SetWrMsk(w,m) SetWriteMask(w,m)
85 #define BNDRYOFF(w) \
86 do { \
87 (w)->Flags &= ~AREAOUTLINE; \
88 } while (0)
91 /* Some macros for copper lists */
92 #define CINIT(c,n) UCopperListInit(c,n)
94 #define CMOVE(c,a,b) do { \
95 CMove(c,&a,b); \
96 CBump(c); \
97 } while (0)
99 #define CWAIT(c,a,b) do { \
100 CWait(c,a,b); \
101 CBump(c); \
102 } while (0)
104 #define CEND(c) do { \
105 CWAIT(c,10000,255); \
106 } while (0)
108 /* Shortcuts */
109 #define DrawCircle(rp,cx,cy,r) DrawEllipse(rp,cx,cy,r,r);
110 #define AreaCircle(rp,cx,cy,r) AreaEllipse(rp,cx,cy,r,r);
112 #endif /* OLD_GRAPHICS_GFXMACROS_H */
114 #endif /* GRAPHICS_GFXMACROS_H */