home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD2.1 / includes / graphics / view.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-11  |  3.5 KB  |  146 lines

  1. #ifndef GRAPHICS_VIEW_H
  2. #define GRAPHICS_VIEW_H
  3. /*
  4. **    $VER: view.h 37.0 (07.01.91)
  5. **    Includes Release 38.56
  6. **
  7. **    graphics view/viewport definintions
  8. **
  9. **    (C) Copyright 1985-1992 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #define ECS_SPECIFIC
  14.  
  15. #ifndef EXEC_TYPES_H
  16. #include <exec/types.h>
  17. #endif
  18.  
  19. #ifndef GRAPHICS_GFX_H
  20. #include <graphics/gfx.h>
  21. #endif
  22.  
  23. #ifndef GRAPHICS_COPPER_H
  24. #include <graphics/copper.h>
  25. #endif
  26.  
  27. #ifndef GRAPHICS_GFXNODES_H
  28. #include <graphics/gfxnodes.h>
  29. #endif
  30.  
  31. #ifndef GRAPHICS_MONITOR_H
  32. #include <graphics/monitor.h>
  33. #endif
  34.  
  35. #ifndef HARDWARE_CUSTOM_H
  36. #include <hardware/custom.h>
  37. #endif
  38.  
  39. struct ViewPort
  40. {
  41.    struct   ViewPort *Next;
  42.    struct   ColorMap  *ColorMap;    /* table of colors for this viewport */
  43.           /* if this is nil, MakeVPort assumes default values */
  44.    struct   CopList  *DspIns;        /* user by MakeView() */
  45.    struct   CopList  *SprIns;        /* used by sprite stuff */
  46.    struct   CopList  *ClrIns;        /* used by sprite stuff */
  47.    struct   UCopList *UCopIns;        /* User copper list */
  48.    WORD    DWidth,DHeight;
  49.    WORD    DxOffset,DyOffset;
  50.    UWORD    Modes;
  51.    UBYTE    SpritePriorities;        /* used by makevp */
  52.    UBYTE    ExtendedModes;
  53.    struct   RasInfo *RasInfo;
  54. };
  55.  
  56. struct View
  57. {
  58.    struct ViewPort *ViewPort;
  59.    struct cprlist *LOFCprList;     /* used for interlaced and noninterlaced */
  60.    struct cprlist *SHFCprList;     /* only used during interlace */
  61.    WORD DyOffset,DxOffset;   /* for complete View positioning */
  62.                   /* offsets are +- adjustments to standard #s */
  63.    UWORD   Modes;          /* such as INTERLACE, GENLOC */
  64. };
  65.  
  66. /* these structures are obtained via GfxNew */
  67. /* and disposed by GfxFree */
  68. struct ViewExtra
  69. {
  70.     struct ExtendedNode n;
  71.     struct View *View;     /* backwards link */
  72.     struct MonitorSpec *Monitor; /* monitors for this view */
  73. };
  74.  
  75. /* this structure is obtained via GfxNew */
  76. /* and disposed by GfxFree */
  77. struct ViewPortExtra
  78. {
  79.     struct ExtendedNode n;
  80.     struct ViewPort *ViewPort;    /* backwards link */
  81.     struct Rectangle DisplayClip;  /* makevp display clipping information */
  82. };
  83.  
  84. #define EXTEND_VSTRUCT    0x1000    /* unused bit in Modes field of View */
  85.  
  86. /* defines used for Modes in IVPargs */
  87.  
  88. #define GENLOCK_VIDEO    0x0002
  89. #define LACE        0x0004
  90. #define SUPERHIRES    0x0020
  91. #define PFBA        0x0040
  92. #define EXTRA_HALFBRITE 0x0080
  93. #define GENLOCK_AUDIO    0x0100
  94. #define DUALPF        0x0400
  95. #define HAM        0x0800
  96. #define EXTENDED_MODE    0x1000
  97. #define VP_HIDE    0x2000
  98. #define SPRITES    0x4000
  99. #define HIRES        0x8000
  100.  
  101. #define VPF_A2024        0x40
  102. #define VPF_AGNUS        0x20
  103. #define VPF_TENHZ        0x20
  104.  
  105. struct RasInfo    /* used by callers to and InitDspC() */
  106. {
  107.    struct   RasInfo *Next;        /* used for dualpf */
  108.    struct   BitMap *BitMap;
  109.    WORD    RxOffset,RyOffset;       /* scroll offsets in this BitMap */
  110. };
  111.  
  112. struct ColorMap
  113. {
  114.     UBYTE    Flags;
  115.     UBYTE    Type;
  116.     UWORD    Count;
  117.     APTR    ColorTable;
  118.     struct    ViewPortExtra *cm_vpe;
  119.     UWORD    *TransparencyBits;
  120.     UBYTE    TransparencyPlane;
  121.     UBYTE    reserved1;
  122.     UWORD    reserved2;
  123.     struct    ViewPort *cm_vp;
  124.     APTR    NormalDisplayInfo;
  125.     APTR    CoerceDisplayInfo;
  126.     struct    TagItem *cm_batch_items;
  127.     ULONG    VPModeID;
  128. };
  129.  
  130. /* if Type == 0 then ColorMap is V1.2/V1.3 compatible */
  131. /* if Type != 0 then ColorMap is V36       compatible */
  132.  
  133. #define COLORMAP_TYPE_V1_2    0x00
  134. #define COLORMAP_TYPE_V1_4    0x01
  135. #define COLORMAP_TYPE_V36 COLORMAP_TYPE_V1_4    /* use this definition */
  136.  
  137. /* Flags variable */
  138. #define COLORMAP_TRANSPARENCY    0x01
  139. #define COLORPLANE_TRANSPARENCY    0x02
  140. #define BORDER_BLANKING        0x04
  141. #define BORDER_NOTRANSPARENCY    0x08
  142. #define VIDEOCONTROL_BATCH    0x10
  143. #define USER_COPPER_CLIP    0x20
  144.  
  145. #endif    /* GRAPHICS_VIEW_H */
  146.