home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Pascal / MAXONPASCAL2.DMS / in.adf / INCLUDE / graphics / gfxmacros.h < prev    next >
Encoding:
Text File  |  1994-07-25  |  2.1 KB  |  103 lines

  1. {$if not def GRAPHICS_GFXMACROS_H} CONST GRAPHICS_GFXMACROS_H=0;
  2.  
  3. { *******************************************************************
  4.   ** KickPascal-Include-Datei "graphics/macros.h" zu Kickstart 3.0 **
  5.   ******************************************************************* }
  6.  
  7. {$if not def GRAPHICS_LIB_H;incl "graphics.lib";endif}
  8. {$if not def GRAPHICS_RASTPORT_H;incl "graphics/rastport.h";endif}
  9. {$if not def GRAPHICS_GFXBASE_H;incl "graphics/gfxbase.h";endif}
  10. {$if not def HARDWARE_CUSTOM_H;incl "hardware/custom.h";endif}
  11. {$if not def HARDWARE_DMABITS_H;incl "hardware/dmabits.h";endif}
  12. {$if not def HARDWARE_INTBITS_H;incl "hardware/intbits.h";endif}
  13.  
  14.  
  15. procedure ON_DISPLAY;
  16. var cc:p_Custom
  17. begin
  18.  cc:=ptr(Adr_Custom);
  19.  cc^.dmacon:= BITSET or DMAF_RASTER;
  20. end;
  21.  
  22. procedure OFF_DISPLAY;
  23. var cc:p_Custom
  24. begin
  25.  cc:=ptr(Adr_Custom);
  26.  cc^.dmacon:= BITCLR or DMAF_RASTER;
  27. end;
  28.  
  29. procedure ON_SPRITE;
  30. var cc:p_Custom
  31. begin
  32.  cc:=ptr(Adr_Custom);
  33.  cc^.dmacon:= BITSET or DMAF_SPRITE;
  34. end;
  35.  
  36. procedure OFF_SPRITE;
  37. var cc:p_Custom
  38. begin
  39.  cc:=ptr(Adr_Custom);
  40.  cc^.dmacon:= BITCLR or DMAF_SPRITE;
  41. end;
  42.  
  43. procedure ON_VBLANK;
  44. var cc:p_Custom
  45. begin
  46.  cc:=ptr(Adr_Custom);
  47.  cc^.intena:= BITSET or INTF_VERTB;
  48. end;
  49.  
  50. procedure OFF_VBLANK;
  51. var cc:p_Custom
  52. begin
  53.  cc:=ptr(Adr_Custom);
  54.  cc^.intena:= BITCLR or INTF_VERTB;
  55. end;
  56.  
  57. procedure SetDrPt(w:p_RastPort;p:Word);
  58. begin
  59.  w^.LinePtrn:=p;
  60.  w^.Flags:=w^.FLags or FRST_DOT;
  61.  w^.linpatcnt:=15;
  62. end;
  63.  
  64. procedure SetAfPt(w:p_RastPort;p:Ptr;n:Integer);
  65. begin
  66.  w^.AreaPtrn:=p;
  67.  w^.AreaPtSz:=n;
  68. end;
  69.  
  70. procedure SetOPen(w:p_RastPort;c:Integer);
  71. begin
  72.  w^.AOlPen:=c;
  73.  w^.Flags:=w^.FLags or AREAOUTLINE;
  74. end;
  75.  
  76. procedure SetWrMsk(w:p_RastPort;m:Byte);
  77. begin
  78.  w^.Mask:=m;
  79. end;
  80.  
  81. procedure SafeSetOutlinePen(w:p_RastPort;c:Integer);
  82. var gb:p_GfxBase;
  83.     void:long;
  84. begin
  85.  gb:=GfxBase;
  86.  if (gb^.LibNode.lib_Version<39) then SetOPen(w,c) else void:=SetOutlinePen(w,c);
  87. end;
  88.  
  89. procedure SafeSetWriteMask(w:p_RastPort;m:Byte);
  90. var gb:p_GfxBase;
  91.     void:long;
  92. begin
  93.  gb:=GfxBase;
  94.  if (gb^.LibNode.lib_Version<39) then SetWrMsk(w,m) else void:=SetWriteMask(w,m);
  95. end;
  96.  
  97. procedure BNDRYOFF(w:p_RastPort);
  98. begin
  99.  w^.Flags:=w^.flags and ($ffff-AREAOUTLINE);
  100. end;
  101.  
  102. {$endif}
  103.