home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BC_DICE2.DMS / in.adf / INCLUDE / clib / graphics_protos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-01-10  |  9.6 KB  |  224 lines

  1. #ifndef CLIB_GRAPHICS_PROTOS_H
  2. #define CLIB_GRAPHICS_PROTOS_H
  3. /*
  4. ** $VER: graphics_protos.h 37.0 (07.01.91)
  5. ** Includes Release 38.56
  6. **
  7. ** C prototypes. For use with 32 bit integers only.
  8. **
  9. ** (C) Copyright 1990-1992 Commodore-Amiga, Inc.
  10. ** All Rights Reserved
  11. */
  12. #ifndef GRAPHICS_GFX_H
  13. #include <graphics/gfx.h>
  14. #endif
  15. #ifndef GRAPHICS_DISPLAYINFO_H
  16. #include <graphics/displayinfo.h>
  17. #endif
  18. #ifndef GRAPHICS_GELS_H
  19. #include <graphics/gels.h>
  20. #endif
  21. #ifndef GRAPHICS_RASTPORT_H
  22. #include <graphics/rastport.h>
  23. #endif
  24. #ifndef GRAPHICS_VIEW_H
  25. #include <graphics/view.h>
  26. #endif
  27. #ifndef GRAPHICS_COPPER_H
  28. #include <graphics/copper.h>
  29. #endif
  30. #ifndef GRAPHICS_CLIP_H
  31. #include <graphics/clip.h>
  32. #endif
  33. #ifndef GRAPHICS_REGIONS_H
  34. #include <graphics/regions.h>
  35. #endif
  36. #ifndef GRAPHICS_SPRITE_H
  37. #include <graphics/sprite.h>
  38. #endif
  39. #ifndef GRAPHICS_TEXT_H
  40. #include <graphics/text.h>
  41. #endif
  42. #ifndef HARDWARE_BLIT_H
  43. #include <hardware/blit.h>
  44. #endif
  45.  
  46. LONG BltBitMap( struct BitMap *srcBitMap, long xSrc, long ySrc,
  47.  struct BitMap *destBitMap, long xDest, long yDest, long xSize,
  48.  long ySize, unsigned long minterm, unsigned long mask,
  49.  PLANEPTR tempA );
  50. void BltTemplate( PLANEPTR source, long xSrc, long srcMod,
  51.  struct RastPort *destRP, long xDest, long yDest, long xSize,
  52.  long ySize );
  53.  
  54. void ClearEOL( struct RastPort *rp );
  55. void ClearScreen( struct RastPort *rp );
  56. WORD TextLength( struct RastPort *rp, STRPTR string, unsigned long count );
  57. LONG Text( struct RastPort *rp, STRPTR string, unsigned long count );
  58. LONG SetFont( struct RastPort *rp, struct TextFont *textFont );
  59. struct TextFont *OpenFont( struct TextAttr *textAttr );
  60. void CloseFont( struct TextFont *textFont );
  61. ULONG AskSoftStyle( struct RastPort *rp );
  62. ULONG SetSoftStyle( struct RastPort *rp, unsigned long style,
  63.  unsigned long enable );
  64.  
  65. void AddBob( struct Bob *bob, struct RastPort *rp );
  66. void AddVSprite( struct VSprite *vSprite, struct RastPort *rp );
  67. void DoCollision( struct RastPort *rp );
  68. void DrawGList( struct RastPort *rp, struct ViewPort *vp );
  69. void InitGels( struct VSprite *head, struct VSprite *tail,
  70.  struct GelsInfo *gelsInfo );
  71. void InitMasks( struct VSprite *vSprite );
  72. void RemIBob( struct Bob *bob, struct RastPort *rp, struct ViewPort *vp );
  73. void RemVSprite( struct VSprite *vSprite );
  74. void SetCollision( unsigned long num,
  75.  void (*routine)(struct VSprite *vSprite, APTR),
  76.  struct GelsInfo *gelsInfo );
  77. void SortGList( struct RastPort *rp );
  78. void AddAnimOb( struct AnimOb *anOb, struct AnimOb **anKey,
  79.  struct RastPort *rp );
  80. void Animate( struct AnimOb **anKey, struct RastPort *rp );
  81. BOOL GetGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  82. void InitGMasks( struct AnimOb *anOb );
  83.  
  84. void DrawEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  85.  long b );
  86. LONG AreaEllipse( struct RastPort *rp, long xCenter, long yCenter, long a,
  87.  long b );
  88. void LoadRGB4( struct ViewPort *vp, UWORD *colors, long count );
  89. void InitRastPort( struct RastPort *rp );
  90. void InitVPort( struct ViewPort *vp );
  91. void MrgCop( struct View *view );
  92. void MakeVPort( struct View *view, struct ViewPort *vp );
  93. void LoadView( struct View *view );
  94. void WaitBlit( void );
  95. void SetRast( struct RastPort *rp, unsigned long pen );
  96. void Move( struct RastPort *rp, long x, long y );
  97. void Draw( struct RastPort *rp, long x, long y );
  98. LONG AreaMove( struct RastPort *rp, long x, long y );
  99. LONG AreaDraw( struct RastPort *rp, long x, long y );
  100. LONG AreaEnd( struct RastPort *rp );
  101. void WaitTOF( void );
  102. void QBlit( struct bltnode *blit );
  103. void InitArea( struct AreaInfo *areaInfo, APTR vectorBuffer,
  104.  long maxVectors );
  105. void SetRGB4( struct ViewPort *vp, long index, unsigned long red,
  106.  unsigned long green, unsigned long blue );
  107. void QBSBlit( struct bltnode *blit );
  108. void BltClear( PLANEPTR memBlock, unsigned long byteCount,
  109.  unsigned long flags );
  110. void RectFill( struct RastPort *rp, long xMin, long yMin, long xMax,
  111.  long yMax );
  112. void BltPattern( struct RastPort *rp, PLANEPTR mask, long xMin, long yMin,
  113.  long xMax, long yMax, unsigned long maskBPR );
  114. ULONG ReadPixel( struct RastPort *rp, long x, long y );
  115. LONG WritePixel( struct RastPort *rp, long x, long y );
  116. BOOL Flood( struct RastPort *rp, unsigned long mode, long x, long y );
  117. void PolyDraw( struct RastPort *rp, long count, WORD *polyTable );
  118. void SetAPen( struct RastPort *rp, unsigned long pen );
  119. void SetBPen( struct RastPort *rp, unsigned long pen );
  120. void SetDrMd( struct RastPort *rp, unsigned long drawMode );
  121. void InitView( struct View *view );
  122. void CBump( struct UCopList *copList );
  123. void CMove( struct UCopList *copList, APTR destination, long data );
  124. void CWait( struct UCopList *copList, long v, long h );
  125. LONG VBeamPos( void );
  126. void InitBitMap( struct BitMap *bitMap, long depth, long width, long height );
  127. void ScrollRaster( struct RastPort *rp, long dx, long dy, long xMin, long yMin,
  128.  long xMax, long yMax );
  129. void WaitBOVP( struct ViewPort *vp );
  130. WORD GetSprite( struct SimpleSprite *sprite, long num );
  131. void FreeSprite( long num );
  132. void ChangeSprite( struct ViewPort *vp, struct SimpleSprite *sprite,
  133.  PLANEPTR newData );
  134. void MoveSprite( struct ViewPort *vp, struct SimpleSprite *sprite, long x,
  135.  long y );
  136. void LockLayerRom( struct Layer *layer );
  137. void UnlockLayerRom( struct Layer *layer );
  138. void SyncSBitMap( struct Layer *layer );
  139. void CopySBitMap( struct Layer *layer );
  140. void OwnBlitter( void );
  141. void DisownBlitter( void );
  142. struct TmpRas *InitTmpRas( struct TmpRas *tmpRas, PLANEPTR buffer,
  143.  long size );
  144. void AskFont( struct RastPort *rp, struct TextAttr *textAttr );
  145. void AddFont( struct TextFont *textFont );
  146. void RemFont( struct TextFont *textFont );
  147. PLANEPTR AllocRaster( unsigned long width, unsigned long height );
  148. void FreeRaster( PLANEPTR p, unsigned long width, unsigned long height );
  149. void AndRectRegion( struct Region *region, struct Rectangle *rectangle );
  150. BOOL OrRectRegion( struct Region *region, struct Rectangle *rectangle );
  151. struct Region *NewRegion( void );
  152. BOOL ClearRectRegion( struct Region *region, struct Rectangle *rectangle );
  153. void ClearRegion( struct Region *region );
  154. void DisposeRegion( struct Region *region );
  155. void FreeVPortCopLists( struct ViewPort *vp );
  156. void FreeCopList( struct CopList *copList );
  157. void ClipBlit( struct RastPort *srcRP, long xSrc, long ySrc,
  158.  struct RastPort *destRP, long xDest, long yDest, long xSize,
  159.  long ySize, unsigned long minterm );
  160. BOOL XorRectRegion( struct Region *region, struct Rectangle *rectangle );
  161. void FreeCprList( struct cprlist *cprList );
  162. struct ColorMap *GetColorMap( long entries );
  163. void FreeColorMap( struct ColorMap *colorMap );
  164. ULONG GetRGB4( struct ColorMap *colorMap, long entry );
  165. void ScrollVPort( struct ViewPort *vp );
  166. struct CopList *UCopperListInit( struct UCopList *uCopList, long n );
  167. void FreeGBuffers( struct AnimOb *anOb, struct RastPort *rp, long flag );
  168. void BltBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  169.  struct RastPort *destRP, long xDest, long yDest, long xSize,
  170.  long ySize, unsigned long minterm );
  171. BOOL OrRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  172. BOOL XorRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  173. BOOL AndRegionRegion( struct Region *srcRegion, struct Region *destRegion );
  174. void SetRGB4CM( struct ColorMap *colorMap, long index, unsigned long red,
  175.  unsigned long green, unsigned long blue );
  176. void BltMaskBitMapRastPort( struct BitMap *srcBitMap, long xSrc, long ySrc,
  177.  struct RastPort *destRP, long xDest, long yDest, long xSize,
  178.  long ySize, unsigned long minterm, PLANEPTR bltMask );
  179. BOOL AttemptLockLayerRom( struct Layer *layer );
  180.  
  181. APTR GfxNew( unsigned long gfxNodeType );
  182. void GfxFree( APTR gfxNodePtr );
  183. void GfxAssociate( APTR associateNode, APTR gfxNodePtr );
  184. void BitMapScale( struct BitScaleArgs *bitScaleArgs );
  185. UWORD ScalerDiv( unsigned long factor, unsigned long numerator,
  186.  unsigned long denominator );
  187. WORD TextExtent( struct RastPort *rp, STRPTR string, long count,
  188.  struct TextExtent *textExtent );
  189. ULONG TextFit( struct RastPort *rp, STRPTR string, unsigned long strLen,
  190.  struct TextExtent *textExtent, struct TextExtent *constrainingExtent,
  191.  long strDirection, unsigned long constrainingBitWidth,
  192.  unsigned long constrainingBitHeight );
  193. APTR GfxLookUp( APTR associateNode );
  194. BOOL VideoControl( struct ColorMap *colorMap, struct TagItem *tagarray );
  195. struct MonitorSpec *OpenMonitor( STRPTR monitorName,
  196.  unsigned long displayID );
  197. BOOL CloseMonitor( struct MonitorSpec *monitorSpec );
  198. DisplayInfoHandle FindDisplayInfo( unsigned long displayID );
  199. ULONG NextDisplayInfo( unsigned long displayID );
  200. ULONG GetDisplayInfoData( DisplayInfoHandle handle, UBYTE *buf,
  201.  unsigned long size, unsigned long tagID, unsigned long displayID );
  202. void FontExtent( struct TextFont *font, struct TextExtent *fontExtent );
  203. LONG ReadPixelLine8( struct RastPort *rp, unsigned long xstart,
  204.  unsigned long ystart, unsigned long width, UBYTE *array,
  205.  struct RastPort *tempRP );
  206. LONG WritePixelLine8( struct RastPort *rp, unsigned long xstart,
  207.  unsigned long ystart, unsigned long width, UBYTE *array,
  208.  struct RastPort *tempRP );
  209. LONG ReadPixelArray8( struct RastPort *rp, unsigned long xstart,
  210.  unsigned long ystart, unsigned long xstop, unsigned long ystop,
  211.  UBYTE *array, struct RastPort *temprp );
  212. LONG WritePixelArray8( struct RastPort *rp, unsigned long xstart,
  213.  unsigned long ystart, unsigned long xstop, unsigned long ystop,
  214.  UBYTE *array, struct RastPort *temprp );
  215. LONG GetVPModeID( struct ViewPort *vp );
  216. LONG ModeNotAvailable( unsigned long modeID );
  217. WORD WeighTAMatch( struct TextAttr *reqTextAttr,
  218.  struct TextAttr *targetTextAttr, struct TagItem *targetTags );
  219. void EraseRect( struct RastPort *rp, long xMin, long yMin, long xMax,
  220.  long yMax );
  221. ULONG ExtendFont( struct TextFont *font, struct TagItem *fontTags );
  222. void StripFont( struct TextFont *font );
  223. #endif 
  224.