home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / graphics / gfxmacros.h < prev    next >
C/C++ Source or Header  |  1993-10-15  |  2KB  |  54 lines

  1. #ifndef    GRAPHICS_GFXMACROS_H
  2. #define    GRAPHICS_GFXMACROS_H
  3. /*
  4. **    $VER: gfxmacros.h 39.3 (31.5.93)
  5. **    Includes Release 40.15
  6. **
  7. **
  8. **
  9. **    (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef EXEC_TYPES_H
  14. #include <exec/types.h>
  15. #endif
  16.  
  17. #ifndef  GRAPHICS_RASTPORT_H
  18. #include <graphics/rastport.h>
  19. #endif
  20.  
  21. #define ON_DISPLAY    custom.dmacon = BITSET|DMAF_RASTER;
  22. #define OFF_DISPLAY    custom.dmacon = BITCLR|DMAF_RASTER;
  23. #define ON_SPRITE    custom.dmacon = BITSET|DMAF_SPRITE;
  24. #define OFF_SPRITE    custom.dmacon = BITCLR|DMAF_SPRITE;
  25.  
  26. #define ON_VBLANK    custom.intena = BITSET|INTF_VERTB;
  27. #define OFF_VBLANK    custom.intena = BITCLR|INTF_VERTB;
  28.  
  29. #define SetDrPt(w,p)    {(w)->LinePtrn = p;(w)->Flags |= FRST_DOT;(w)->linpatcnt=15;}
  30. #define SetAfPt(w,p,n)    {(w)->AreaPtrn = p;(w)->AreaPtSz = n;}
  31.  
  32. #define SetOPen(w,c)    {(w)->AOlPen = c;(w)->Flags |= AREAOUTLINE;}
  33. #define SetWrMsk(w,m)    {(w)->Mask = m;}
  34.  
  35. /* the SafeSetxxx macros are backwards (pre V39 graphics) compatible versions */
  36. /* using these macros will make your code do the right thing under V39 AND V37 */
  37. #define SafeSetOutlinePen(w,c)      {if (GfxBase->LibNode.lib_Version<39) { (w)->AOlPen = c;(w)->Flags |= AREAOUTLINE;} else SetOutlinePen(w,c); }
  38. #define SafeSetWriteMask(w,m)    {if (GfxBase->LibNode.lib_Version<39) { (w)->Mask = (m);} else SetWriteMask(w,m); }
  39.  
  40. /* synonym for GetOPen for consistency with SetOutlinePen */
  41. #define GetOutlinePen(rp) GetOPen(rp)
  42.  
  43. #define BNDRYOFF(w)    {(w)->Flags &= ~AREAOUTLINE;}
  44.  
  45. #define CINIT(c,n)      UCopperListInit(c,n);
  46. #define CMOVE(c,a,b)    { CMove(c,&a,b);CBump(c); }
  47. #define CWAIT(c,a,b)    { CWait(c,a,b);CBump(c); }
  48. #define CEND(c)    { CWAIT(c,10000,255); }
  49.  
  50. #define DrawCircle(rp,cx,cy,r)    DrawEllipse(rp,cx,cy,r,r);
  51. #define AreaCircle(rp,cx,cy,r)    AreaEllipse(rp,cx,cy,r,r);
  52.  
  53. #endif    /* GRAPHICS_GFXMACROS_H */
  54.