home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / grafix / boards / a2410src.lha / Public / Source / gfx_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-01  |  13.9 KB  |  293 lines

  1. #ifndef  CLIB_GRAPHICS_PROTOS_H
  2. #define  CLIB_GRAPHICS_PROTOS_H
  3.  
  4. /*
  5. **    $VER: graphics_protos.h 39.31 (29.4.93)
  6. **    Includes Release 40.15
  7. **
  8. **    C prototypes. For use with 32 bit integers only.
  9. **
  10. **    (C) Copyright 1990-1993 Commodore-Amiga, Inc.
  11. **        All Rights Reserved
  12. */
  13.  
  14. #ifndef  GRAPHICS_GFX_H
  15. #include <graphics/gfx.h>
  16. #endif
  17. #ifndef  GRAPHICS_DISPLAYINFO_H
  18. #include <graphics/displayinfo.h>
  19. #endif
  20. #ifndef  GRAPHICS_GELS_H
  21. #include <graphics/gels.h>
  22. #endif
  23. #ifndef  GRAPHICS_RASTPORT_H
  24. #include <graphics/rastport.h>
  25. #endif
  26. #ifndef  GRAPHICS_VIEW_H
  27. #include <graphics/view.h>
  28. #endif
  29. #ifndef  GRAPHICS_COPPER_H
  30. #include <graphics/copper.h>
  31. #endif
  32. #ifndef  GRAPHICS_CLIP_H
  33. #include <graphics/clip.h>
  34. #endif
  35. #ifndef  GRAPHICS_REGIONS_H
  36. #include <graphics/regions.h>
  37. #endif
  38. #ifndef  GRAPHICS_SPRITE_H
  39. #include <graphics/sprite.h>
  40. #endif
  41. #ifndef  GRAPHICS_TEXT_H
  42. #include <graphics/text.h>
  43. #endif
  44. #ifndef  HARDWARE_BLIT_H
  45. #include <hardware/blit.h>
  46. #endif
  47. /*------ BitMap primitives ------*/
  48. LONG GspBltBitMap( struct BitMap *srcBitMap, long xSrc, long ySrc,
  49.     struct BitMap *destBitMap, long xDest, long yDest, long xSize,
  50.     long ySize, unsigned long minterm, unsigned long mask,
  51.     PLANEPTR tempA );
  52. void GspBltTemplate( PLANEPTR source, long xSrc, long srcMod,
  53.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  54.     long ySize );
  55. /*------ Text routines ------*/
  56. void GspClearEOL( struct RastPort *rp );
  57. void GspClearScreen( struct RastPort *rp );
  58. WORD GspTextLength( struct RastPort *rp, STRPTR string, unsigned long count );
  59. LONG GspText( struct RastPort *rp, STRPTR string, unsigned long count );
  60. LONG GspSetFont( struct RastPort *rp, struct TextFont *textFont );
  61. struct TextFont *GspOpenFont( struct TextAttr *textAttr );
  62. void GspCloseFont( struct TextFont *textFont );
  63. ULONG GspAskSoftStyle( struct RastPort *rp );
  64. ULONG GspSetSoftStyle( struct RastPort *rp, unsigned long style,
  65.     unsigned long enable );
  66. /*------    Gels routines ------*/
  67. void GspAddBob( struct Bob *bob, struct RastPort *rp );
  68. void GspAddVSprite( struct VSprite *vSprite, struct RastPort *rp );
  69. void GspDoCollision( struct RastPort *rp );
  70. void GspDrawGList( struct RastPort *rp, struct ViewPort *vp );
  71. void GspInitGels( struct VSprite *head, struct VSprite *tail,
  72.     struct GelsInfo *gelsInfo );
  73. void GspInitMasks( struct VSprite *vSprite );
  74. void GspRemIBob( struct Bob *bob, struct RastPort *rp, struct ViewPort *vp );
  75. void GspRemVSprite( struct VSprite *vSprite );
  76. void GspSetCollision( unsigned long num,
  77.     void (*routine)(struct VSprite *vSprite, APTR),
  78.     struct GelsInfo *gelsInfo );
  79. void GspSortGList( struct RastPort *rp );
  80. void GspAddAnimOb( struct AnimOb *anOb, struct AnimOb **anKey,
  81.     struct RastPort *rp );
  82. void GspAnimate( struct AnimOb **anKey, struct RastPort *rp );
  83. BOOL GspGetGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  84. void GspInitGMasks( struct AnimOb *anOb );
  85. /*------    General graphics routines ------*/
  86. void GspDrawEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  87.     long b );
  88. LONG GspAreaEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  89.     long b );
  90. void GspLoadRGB4( struct ViewPort *vp, UWORD *colors, long count );
  91. void GspInitRastPort( struct RastPort *rp );
  92. void GspInitVPort( struct ViewPort *vp );
  93. ULONG GspMrgCop( struct View *view );
  94. ULONG GspMakeVPort( struct View *view, struct ViewPort *vp );
  95. void GspLoadView( struct View *view );
  96. void GspWaitBlit( void );
  97. void GspSetRast( struct RastPort *rp, unsigned long pen );
  98. void GspMove( struct RastPort *rp, long x, long y );
  99. void GspDraw( struct RastPort *rp, long x, long y );
  100. LONG GspAreaMove( struct RastPort *rp, long x, long y );
  101. LONG GspAreaDraw( struct RastPort *rp, long x, long y );
  102. LONG GspAreaEnd( struct RastPort *rp );
  103. void GspWaitTOF( void );
  104. void GspQBlit( struct bltnode *blit );
  105. void GspInitArea( struct AreaInfo *areaInfo, APTR vectorBuffer,
  106.     long maxVectors );
  107. void GspSetRGB4( struct ViewPort *vp, long index, unsigned long red,
  108.     unsigned long green, unsigned long blue );
  109. void GspQBSBlit( struct bltnode *blit );
  110. void GspBltClear( PLANEPTR memBlock, unsigned long byteCount,
  111.     unsigned long flags );
  112. void GspRectFill( struct RastPort *rp, long xMin, long yMin, long xMax,
  113.     long yMax );
  114. void GspBltPattern( struct RastPort *rp, PLANEPTR mask, long xMin, long yMin,
  115.     long xMax, long yMax, unsigned long maskBPR );
  116. ULONG GspReadPixel( struct RastPort *rp, long x, long y );
  117. LONG GspWritePixel( struct RastPort *rp, long x, long y );
  118. BOOL GspFlood( struct RastPort *rp, unsigned long mode, long x, long y );
  119. void GspPolyDraw( struct RastPort *rp, long count, WORD *polyTable );
  120. void GspSetAPen( struct RastPort *rp, unsigned long pen );
  121. void GspSetBPen( struct RastPort *rp, unsigned long pen );
  122. void GspSetDrMd( struct RastPort *rp, unsigned long drawMode );
  123. void GspInitView( struct View *view );
  124. void GspCBump( struct UCopList *copList );
  125. void GspCMove( struct UCopList *copList, APTR destination, long data );
  126. void GspCWait( struct UCopList *copList, long v, long h );
  127. LONG GspVBeamPos( void );
  128. void GspInitBitMap( struct BitMap *bitMap, long depth, long width, long height );
  129. void GspScrollRaster( struct RastPort *rp, long dx, long dy, long xMin, long yMin,
  130.     long xMax, long yMax );
  131. void GspWaitBOVP( struct ViewPort *vp );
  132. WORD GspGetSprite( struct SimpleSprite *sprite, long num );
  133. void GspFreeSprite( long num );
  134. void GspChangeSprite( struct ViewPort *vp, struct SimpleSprite *sprite,
  135.     PLANEPTR newData );
  136. void GspMoveSprite( struct ViewPort *vp, struct SimpleSprite *sprite, long x,
  137.     long y );
  138. void GspLockLayerRom( struct Layer *layer );
  139. void GspUnlockLayerRom( struct Layer *layer );
  140. void GspSyncSBitMap( struct Layer *layer );
  141. void GspCopySBitMap( struct Layer *layer );
  142. void GspOwnBlitter( void );
  143. void GspDisownBlitter( void );
  144. struct TmpRas *GspInitTmpRas( struct TmpRas *tmpRas, PLANEPTR buffer,
  145.     long size );
  146. void GspAskFont( struct RastPort *rp, struct TextAttr *textAttr );
  147. void GspAddFont( struct TextFont *textFont );
  148. void GspRemFont( struct TextFont *textFont );
  149. PLANEPTR GspAllocRaster( unsigned long width, unsigned long height );
  150. void GspFreeRaster( PLANEPTR p, unsigned long width, unsigned long height );
  151. void GspAndRectRegion( struct Region *region, struct Rectangle *rectangle );
  152. BOOL GspOrRectRegion( struct Region *region, struct Rectangle *rectangle );
  153. struct Region *GspNewRegion( void );
  154. BOOL GspClearRectRegion( struct Region *region, struct Rectangle *rectangle );
  155. void GspClearRegion( struct Region *region );
  156. void GspDisposeRegion( struct Region *region );
  157. void GspFreeVPortCopLists( struct ViewPort *vp );
  158. void GspFreeCopList( struct CopList *copList );
  159. void GspClipBlit( struct RastPort *srcRP, long xSrc, long ySrc,
  160.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  161.     long ySize, unsigned long minterm );
  162. BOOL GspXorRectRegion( struct Region *region, struct Rectangle *rectangle );
  163. void GspFreeCprList( struct cprlist *cprList );
  164. struct ColorMap *GspGetColorMap( long entries );
  165. void GspFreeColorMap( struct ColorMap *colorMap );
  166. ULONG GspGetRGB4( struct ColorMap *colorMap, long entry );
  167. void GspScrollVPort( struct ViewPort *vp );
  168. struct CopList *GspUCopperListInit( struct UCopList *uCopList, long n );
  169. void GspFreeGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  170. void GspBltBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  171.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  172.     long ySize, unsigned long minterm );
  173. BOOL GspOrRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  174. BOOL GspXorRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  175. BOOL GspAndRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  176. void GspSetRGB4CM( struct ColorMap *colorMap, long index, unsigned long red,
  177.     unsigned long green, unsigned long blue );
  178. void GspBltMaskBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  179.     struct RastPort *destRP, long xDest, long yDest, long xSize,
  180.     long ySize, unsigned long minterm, PLANEPTR bltMask );
  181. BOOL GspAttemptLockLayerRom( struct Layer *layer );
  182. /*--- functions in V36 or higher (Release 2.0) ---*/
  183. APTR GspGfxNew( unsigned long gfxNodeType );
  184. void GspGfxFree( APTR gfxNodePtr );
  185. void GspGfxAssociate( APTR associateNode, APTR gfxNodePtr );
  186. void GspBitMapScale( struct BitScaleArgs *bitScaleArgs );
  187. UWORD GspScalerDiv( unsigned long factor, unsigned long numerator,
  188.     unsigned long denominator );
  189. WORD GspTextExtent( struct RastPort *rp, STRPTR string, long count,
  190.     struct TextExtent *textExtent );
  191. ULONG GspTextFit( struct RastPort *rp, STRPTR string, unsigned long strLen,
  192.     struct TextExtent *textExtent, struct TextExtent *constrainingExtent,
  193.     long strDirection, unsigned long constrainingBitWidth,
  194.     unsigned long constrainingBitHeight );
  195. APTR GspGfxLookUp( APTR associateNode );
  196. BOOL GspVideoControl( struct ColorMap *colorMap, struct TagItem *tagarray );
  197. BOOL GspVideoControlTags( struct ColorMap *colorMap, unsigned long tag1Type,
  198.     ... );
  199. struct MonitorSpec *GspOpenMonitor( STRPTR monitorName,
  200.     unsigned long displayID );
  201. BOOL GspCloseMonitor( struct MonitorSpec *monitorSpec );
  202. DisplayInfoHandle GspFindDisplayInfo( unsigned long displayID );
  203. ULONG GspNextDisplayInfo( unsigned long displayID );
  204. ULONG GspGetDisplayInfoData( DisplayInfoHandle handle, UBYTE *buf,
  205.     unsigned long size, unsigned long tagID, unsigned long displayID );
  206. void GspFontExtent( struct TextFont *font, struct TextExtent *fontExtent );
  207. LONG GspReadPixelLine8( struct RastPort *rp, unsigned long xstart,
  208.     unsigned long ystart, unsigned long width, UBYTE *array,
  209.     struct RastPort *tempRP );
  210. LONG GspWritePixelLine8( struct RastPort *rp, unsigned long xstart,
  211.     unsigned long ystart, unsigned long width, UBYTE *array,
  212.     struct RastPort *tempRP );
  213. LONG GspReadPixelArray8( struct RastPort *rp, unsigned long xstart,
  214.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  215.     UBYTE *array, struct RastPort *temprp );
  216. LONG GspWritePixelArray8( struct RastPort *rp, unsigned long xstart,
  217.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  218.     UBYTE *array, struct RastPort *temprp );
  219. LONG GspGetVPModeID( struct ViewPort *vp );
  220. LONG GspModeNotAvailable( unsigned long modeID );
  221. WORD GspWeighTAMatch( struct TextAttr *reqTextAttr,
  222.     struct TextAttr *targetTextAttr, struct TagItem *targetTags );
  223. WORD GspWeighTAMatchTags( struct TextAttr *reqTextAttr,
  224.     struct TextAttr *targetTextAttr, unsigned long tag1Type, ... );
  225. void GspEraseRect( struct RastPort *rp, long xMin, long yMin, long xMax,
  226.     long yMax );
  227. ULONG GspExtendFont( struct TextFont *font, struct TagItem *fontTags );
  228. ULONG GspExtendFontTags( struct TextFont *font, unsigned long tag1Type, ... );
  229. void GspStripFont( struct TextFont *font );
  230. /*--- functions in V39 or higher (Release 3) ---*/
  231. UWORD GspCalcIVG( struct View *v, struct ViewPort *vp );
  232. LONG GspAttachPalExtra( struct ColorMap *cm, struct ViewPort *vp );
  233. LONG GspObtainBestPenA( struct ColorMap *cm, unsigned long r, unsigned long g,
  234.     unsigned long b, struct TagItem *tags );
  235. LONG GspObtainBestPen( struct ColorMap *cm, unsigned long r, unsigned long g,
  236.     unsigned long b, unsigned long tag1Type, ... );
  237. void GspSetRGB32( struct ViewPort *vp, unsigned long n, unsigned long r,
  238.     unsigned long g, unsigned long b );
  239. ULONG GspGetAPen( struct RastPort *rp );
  240. ULONG GspGetBPen( struct RastPort *rp );
  241. ULONG GspGetDrMd( struct RastPort *rp );
  242. ULONG GspGetOutlinePen( struct RastPort *rp );
  243. void GspLoadRGB32( struct ViewPort *vp, ULONG *table );
  244. ULONG GspSetChipRev( unsigned long want );
  245. void GspSetABPenDrMd( struct RastPort *rp, unsigned long apen, unsigned long bpen,
  246.     unsigned long drawmode );
  247. void GspGetRGB32( struct ColorMap *cm, unsigned long firstcolor,
  248.     unsigned long ncolors, ULONG *table );
  249. struct BitMap *GspAllocBitMap( unsigned long sizex, unsigned long sizey,
  250.     unsigned long depth, unsigned long flags,
  251.     struct BitMap *friend_bitmap );
  252. void GspFreeBitMap( struct BitMap *bm );
  253. LONG GspGetExtSpriteA( struct ExtSprite *ss, struct TagItem *tags );
  254. LONG GspGetExtSprite( struct ExtSprite *ss, unsigned long tag1Type, ... );
  255. ULONG GspCoerceMode( struct ViewPort *vp, unsigned long monitorid,
  256.     unsigned long flags );
  257. void GspChangeVPBitMap( struct ViewPort *vp, struct BitMap *bm,
  258.     struct DBufInfo *db );
  259. void GspReleasePen( struct ColorMap *cm, unsigned long n );
  260. ULONG GspObtainPen( struct ColorMap *cm, unsigned long n, unsigned long r,
  261.     unsigned long g, unsigned long b, long f );
  262. ULONG GspGetBitMapAttr( struct BitMap *bm, unsigned long attrnum );
  263. struct GspDBufInfo *AllocDBufInfo( struct ViewPort *vp );
  264. void GspFreeDBufInfo( struct DBufInfo *dbi );
  265. ULONG GspSetOutlinePen( struct RastPort *rp, unsigned long pen );
  266. ULONG GspSetWriteMask( struct RastPort *rp, unsigned long msk );
  267. void GspSetMaxPen( struct RastPort *rp, unsigned long maxpen );
  268. void GspSetRGB32CM( struct ColorMap *cm, unsigned long n, unsigned long r,
  269.     unsigned long g, unsigned long b );
  270. void GspScrollRasterBF( struct RastPort *rp, long dx, long dy, long xMin,
  271.     long yMin, long xMax, long yMax );
  272. LONG GspFindColor( struct ColorMap *cm, unsigned long r, unsigned long g,
  273.     unsigned long b, long maxcolor );
  274. struct ExtSprite *GspAllocSpriteDataA( struct BitMap *bm, struct TagItem *tags );
  275. struct ExtSprite *GspAllocSpriteData( struct BitMap *bm, unsigned long tag1Type,
  276.     ... );
  277. LONG GspChangeExtSpriteA( struct ViewPort *vp, struct ExtSprite *oldsprite,
  278.     struct ExtSprite *newsprite, struct TagItem *tags );
  279. LONG GspChangeExtSprite( struct ViewPort *vp, struct ExtSprite *oldsprite,
  280.     struct ExtSprite *newsprite, unsigned long tag1Type, ... );
  281. void GspFreeSpriteData( struct ExtSprite *sp );
  282. void GspSetRPAttrsA( struct RastPort *rp, struct TagItem *tags );
  283. void GspSetRPAttrs( struct RastPort *rp, unsigned long tag1Type, ... );
  284. void GspGetRPAttrsA( struct RastPort *rp, struct TagItem *tags );
  285. void GspGetRPAttrs( struct RastPort *rp, unsigned long tag1Type, ... );
  286. ULONG GspBestModeIDA( struct TagItem *tags );
  287. ULONG GspBestModeID( unsigned long tag1Type, ... );
  288. /*--- functions in V40 or higher (Release 3.1) ---*/
  289. void GspWriteChunkyPixels( struct RastPort *rp, unsigned long xstart,
  290.     unsigned long ystart, unsigned long xstop, unsigned long ystop,
  291.     UBYTE *array, long bytesperrow );
  292. #endif     /* CLIB_GRAPHICS_PROTOS_H */
  293.