home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / jËzyki_programowania / amigae / e_v3.2a / modulessrc / graphics / gfxmacros.e < prev    next >
Text File  |  1977-12-31  |  2KB  |  45 lines

  1. OPT MODULE
  2. OPT EXPORT
  3.  
  4. OPT PREPROCESS
  5.  
  6. -> These need 'graphics/gfx', 'hardware/custom', 'hardware/dmabits'
  7. #define ON_DISPLAY      PutInt(CUSTOMADDR+DMACON,BITSET OR DMAF_RASTER)
  8. #define OFF_DISPLAY     PutInt(CUSTOMADDR+DMACON,BITCLR OR DMAF_RASTER)
  9. #define ON_SPRITE       PutInt(CUSTOMADDR+DMACON,BITSET OR DMAF_SPRITE)
  10. #define OFF_SPRITE      PutInt(CUSTOMADDR+DMACON,BITCLR OR DMAF_SPRITE)
  11.  
  12. -> Same, but 'hardware/intbits' instead of 'hardware/dmabits'
  13. #define ON_VBLANK       PutInt(CUSTOMADDR+INTENA,BITSET OR INTF_VERTB)
  14. #define OFF_VBLANK      PutInt(CUSTOMADDR+INTENA,BITCLR OR INTF_VERTB)
  15.  
  16. #define SetDrPt(w,p)   (PutInt((w)+RP_LINEPTRN,(p)) BUT \
  17.                        PutInt((w)+RP_FLAGS,Int((w)+RP_FLAGS) OR FRST_DOT) BUT \
  18.                        PutChar((w)+RP_LINPATCNT,15))
  19. #define SetAfPt(w,p,n) (PutLong((w)+RP_AREAPTRN,(p)) BUT \
  20.                        PutChar((w)+RP_AREAPTSZ,(n)))
  21.  
  22. #define SetOPen(w,c)   (PutChar((w)+RP_AOLPEN,(c)) BUT \
  23.                        PutInt((w)+RP_FLAGS,Int((w)+RP_FLAGS) OR AREAOUTLINE))
  24. #define SetWrMsk(w,m)  PutChar((w)+RP_MASK,(m))
  25.  
  26. #define SafeSetOutlinePen(w,c) (IF KickVersion(39) THEN SetOutlinePen((w),(c)) \
  27.                                ELSE SetOPen(w,c))
  28. #define SafeSetWriteMask(w,m)  (IF KickVersion(39) THEN SetWriteMask((w),(m)) \
  29.                                ELSE SetWrMsk(w,m))
  30.  
  31. #define GetOutlinePen(rp) GetOPen((rp))
  32.  
  33. #define BNDRYOFF(w)  PutInt((w)+RP_FLAGS,Int((w)+RP_FLAGS) AND Not(AREAOUTLINE))
  34.  
  35. #define CINIT(c,n)     UcopperListInit((c),(n))
  36. #define CMOVE(c,a,b)   (Cmove((c),{a},(b)) BUT Cbump((c)))
  37. -> CMOVE is a little hard to use due to {a}.  CMOVEA() is the same except it
  38. -> expects the address, so it may be easier to use...
  39. #define CMOVEA(c,d,b)  (Cmove((c),(d),(b)) BUT Cbump((c)))
  40. #define CWAIT(c,a,b)   (Cwait((c),(a),(b)) BUT Cbump((c)))
  41. #define CEND(c)        CWAIT((c),10000,255)
  42.  
  43. #define DrawCircle(rp,cx,cy,r)  DrawEllipse((rp),(cx),(cy),(r),(r))
  44. #define AreaCircle(rp,cx,cy,r)  AreaEllipse((rp),(cx),(cy),(r),(r))
  45.