home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -seriously_amiga- / programming / c / asap / viewport.h < prev    next >
C/C++ Source or Header  |  1998-04-23  |  5KB  |  121 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * AViewPort wrapper class                                                   *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_AViewPort_H
  12. #define ASAP_AViewPort_H
  13.  
  14. extern "C"
  15. {
  16.  #include <Proto/Graphics.h>
  17. }
  18.  
  19. class AViewPort : public ViewPort
  20. {
  21.  public:
  22.  inline LONG ChangeExtSprite(ExtSprite * oldsprite, ExtSprite * newsprite, unsigned long tag1Type,  ...);
  23.  inline LONG ChangeExtSpriteA(ExtSprite * oldsprite, ExtSprite * newsprite, TagItem * tags);
  24.  inline void ChangeSprite(SimpleSprite * sprite, PLANEPTR newData);
  25.  inline void ChangeVPBitMap(BitMap * bm, DBufInfo * db);
  26.  inline ULONG CoerceMode(unsigned long monitorid, unsigned long flags);
  27.  inline void FreeVPortCopLists();
  28.  inline LONG GetVPModeID();
  29.  inline void InitVPort();
  30.  inline void LoadRGB32(ULONG * table);
  31.  inline void LoadRGB4(UWORD * colors, long count);
  32.  inline ULONG MakeVPort(View * view);
  33.  inline void MoveSprite(SimpleSprite * sprite, long x, long y);
  34.  inline void ScrollVPort();
  35.  inline void SetRGB32(unsigned long n, unsigned long r, unsigned long g, unsigned long b);
  36.  inline void SetRGB4(long index, unsigned long red, unsigned long green, unsigned long blue);
  37.  inline void WaitBOVP();
  38. };
  39. //----------------------------------------------------------------------------
  40. LONG AViewPort::ChangeExtSprite (ExtSprite * oldsprite, ExtSprite * newsprite, unsigned long tag1Type,  ...)
  41. {
  42.  return AViewPort::ChangeExtSpriteA(oldsprite, newsprite, (TagItem *) &tag1Type);
  43. }
  44. //----------------------------------------------------------------------------
  45. LONG AViewPort::ChangeExtSpriteA (ExtSprite * oldsprite, ExtSprite * newsprite, TagItem * tags)
  46. {
  47.  return ::ChangeExtSpriteA(this, oldsprite, newsprite, tags);
  48. }
  49. //----------------------------------------------------------------------------
  50. void AViewPort::ChangeSprite (SimpleSprite * sprite, PLANEPTR newData)
  51. {
  52.  ::ChangeSprite(this, sprite, newData);
  53. }
  54. //----------------------------------------------------------------------------
  55. void AViewPort::ChangeVPBitMap (BitMap * bm, DBufInfo * db)
  56. {
  57.  ::ChangeVPBitMap(this, bm, db);
  58. }
  59. //----------------------------------------------------------------------------
  60. ULONG AViewPort::CoerceMode (unsigned long monitorid, unsigned long flags)
  61. {
  62.  return ::CoerceMode(this, monitorid, flags);
  63. }
  64. //----------------------------------------------------------------------------
  65. void AViewPort::FreeVPortCopLists ()
  66. {
  67.  ::FreeVPortCopLists(this);
  68. }
  69. //----------------------------------------------------------------------------
  70. LONG AViewPort::GetVPModeID ()
  71. {
  72.  return ::GetVPModeID(this);
  73. }
  74. //----------------------------------------------------------------------------
  75. void AViewPort::InitVPort ()
  76. {
  77.  ::InitVPort(this);
  78. }
  79. //----------------------------------------------------------------------------
  80. void AViewPort::LoadRGB32 (ULONG * table)
  81. {
  82.  ::LoadRGB32(this, table);
  83. }
  84. //----------------------------------------------------------------------------
  85. void AViewPort::LoadRGB4 (UWORD * colors, long count)
  86. {
  87.  ::LoadRGB4(this, colors, count);
  88. }
  89. //----------------------------------------------------------------------------
  90. ULONG AViewPort::MakeVPort (View * view)
  91. {
  92.  return ::MakeVPort(view, this);
  93. }
  94. //----------------------------------------------------------------------------
  95. void AViewPort::MoveSprite (SimpleSprite * sprite, long x, long y)
  96. {
  97.  ::MoveSprite(this, sprite, x, y);
  98. }
  99. //----------------------------------------------------------------------------
  100. void AViewPort::ScrollVPort ()
  101. {
  102.  ::ScrollVPort(this);
  103. }
  104. //----------------------------------------------------------------------------
  105. void AViewPort::SetRGB32 (unsigned long n, unsigned long r, unsigned long g, unsigned long b)
  106. {
  107.  ::SetRGB32(this, n, r, g, b);
  108. }
  109. //----------------------------------------------------------------------------
  110. void AViewPort::SetRGB4 (long index, unsigned long red, unsigned long green, unsigned long blue)
  111. {
  112.  ::SetRGB4(this, index, red, green, blue);
  113. }
  114. //----------------------------------------------------------------------------
  115. void AViewPort::WaitBOVP ()
  116. {
  117.  ::WaitBOVP(this);
  118. }
  119.  
  120. #endif
  121.