home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / nduk-v37.lha / V37 / include / graphics / view.h < prev    next >
C/C++ Source or Header  |  1991-11-27  |  4KB  |  148 lines

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