{$if not def GRAPHICS_GFXMACROS_H} CONST GRAPHICS_GFXMACROS_H=0; { ******************************************************************* ** KickPascal-Include-Datei "graphics/macros.h" zu Kickstart 3.0 ** ******************************************************************* } {$if not def GRAPHICS_LIB_H;incl "graphics.lib";endif} {$if not def GRAPHICS_RASTPORT_H;incl "graphics/rastport.h";endif} {$if not def GRAPHICS_GFXBASE_H;incl "graphics/gfxbase.h";endif} {$if not def HARDWARE_CUSTOM_H;incl "hardware/custom.h";endif} {$if not def HARDWARE_DMABITS_H;incl "hardware/dmabits.h";endif} {$if not def HARDWARE_INTBITS_H;incl "hardware/intbits.h";endif} procedure ON_DISPLAY; var cc:p_Custom begin cc:=ptr(Adr_Custom); cc^.dmacon:= BITSET or DMAF_RASTER; end; procedure OFF_DISPLAY; var cc:p_Custom begin cc:=ptr(Adr_Custom); cc^.dmacon:= BITCLR or DMAF_RASTER; end; procedure ON_SPRITE; var cc:p_Custom begin cc:=ptr(Adr_Custom); cc^.dmacon:= BITSET or DMAF_SPRITE; end; procedure OFF_SPRITE; var cc:p_Custom begin cc:=ptr(Adr_Custom); cc^.dmacon:= BITCLR or DMAF_SPRITE; end; procedure ON_VBLANK; var cc:p_Custom begin cc:=ptr(Adr_Custom); cc^.intena:= BITSET or INTF_VERTB; end; procedure OFF_VBLANK; var cc:p_Custom begin cc:=ptr(Adr_Custom); cc^.intena:= BITCLR or INTF_VERTB; end; procedure SetDrPt(w:p_RastPort;p:Word); begin w^.LinePtrn:=p; w^.Flags:=w^.FLags or FRST_DOT; w^.linpatcnt:=15; end; procedure SetAfPt(w:p_RastPort;p:Ptr;n:Integer); begin w^.AreaPtrn:=p; w^.AreaPtSz:=n; end; procedure SetOPen(w:p_RastPort;c:Integer); begin w^.AOlPen:=c; w^.Flags:=w^.FLags or AREAOUTLINE; end; procedure SetWrMsk(w:p_RastPort;m:Byte); begin w^.Mask:=m; end; procedure SafeSetOutlinePen(w:p_RastPort;c:Integer); var gb:p_GfxBase; void:long; begin gb:=GfxBase; if (gb^.LibNode.lib_Version<39) then SetOPen(w,c) else void:=SetOutlinePen(w,c); end; procedure SafeSetWriteMask(w:p_RastPort;m:Byte); var gb:p_GfxBase; void:long; begin gb:=GfxBase; if (gb^.LibNode.lib_Version<39) then SetWrMsk(w,m) else void:=SetWriteMask(w,m); end; procedure BNDRYOFF(w:p_RastPort); begin w^.Flags:=w^.flags and ($ffff-AREAOUTLINE); end; {$endif}