home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / GameSmith1-Hisoft-System.DMS / in.adf / GDS_System.lha / include / display / display.i < prev   
Encoding:
Text File  |  1994-08-23  |  8.2 KB  |  155 lines

  1. ;***************************************************************
  2. ; The Rectangle struct (same as Commodore's Rectangle struct)
  3. ;***************************************************************
  4.  
  5.     rsreset
  6. GSRECT_MINX rs.w  1  ;left edge of rectangle
  7. GSRECT_MINY rs.w  1  ;top edge of rectangle
  8. GSRECT_MAXX rs.w  1  ;right edge of rectangle
  9. GSRECT_MAXY rs.w  1  ;bottom edge of rectangle
  10. GSRECT_SIZEOF rs.b  0
  11.  
  12. ;***************************************************************
  13. ; The gs_viewport struct
  14. ;***************************************************************
  15.  
  16.     rsreset
  17. GSVP_NEXT      rs.l  1  ;ptr to next viewport in display
  18. GSVP_COLORTBL  rs.l  1  ;ptr to color talbe for viewport
  19. GSVP_COLORS    rs.l  1  ;number of color table entries
  20. GSVP_UCOP      rs.l  1  ;ptr to user copper list struct (or NULL if none)
  21. GSVP_HEIGHT    rs.l  1  ;height of viewport in scan lines
  22. GSVP_WIDTH     rs.l  1  ;width of viewport in pixels
  23. GSVP_DEPTH     rs.l  1  ;number of bitplanes to use for viewport
  24. GSVP_BMHEIGHT  rs.l  1  ;bitmap height (in rows) (used only if allocating bitmap)
  25. GSVP_BMWIDTH   rs.l  1  ;bitmap width (in pixels) (used only if allocating bitmap)
  26. GSVP_TOP       rs.l  1  ;viewport Y offset (in rows) from display start
  27. GSVP_LEFT      rs.l  1  ;viewport X offset (in pixels) from display start
  28. GSVP_XOFF      rs.l  1  ;X offset within bitmap (in pixels)
  29. GSVP_YOFF      rs.l  1  ;Y offset within bitmap (in pixels)
  30. GSVP_FLAGS     rs.l  1  ;flags for display routines
  31. GSVP_VPE1      rs.l  1  ;ptr to 2.xx & up ViewPortExtra struct (SYSTEM USE)
  32. GSVP_VPE2      rs.l  1  ;ptr to 2.xx & up ViewPortExtra struct (SYSTEM USE)
  33. GSVP_BITMAP1   rs.l  1  ;ptr to 1st bitmap struct
  34. GSVP_BITMAP2   rs.l  1  ;ptr to 2nd bitmap struct
  35. GSVP_EXTEND    rs.l  1  ;reserved for future expansion
  36. GSVP_DCLIP     rs.b  GSRECT_SIZEOF  ;display clip for 2.xx & up displays
  37. ; remainder is for GDS system use ONLY!!
  38. GSVP_VIEWPORT1 rs.l  1  ;ptr to system ViewPort struct for 1st display page
  39. GSVP_VIEWPORT2 rs.l  1  ;ptr to system ViewPort struct for 2nd display page
  40. GSVP_RASINFO1  rs.l  1  ;ptr to system RasInfo struct for 1st display page
  41. GSVP_RASINFO2  rs.l  1  ;ptr to system RasInfo struct for 2nd display page
  42. GSVP_LOF_BPLCON1 rs.l 1 ;offset to horizontal shift register copper instruction
  43. GSVP_LOF_BPLPTR1 rs.l 1 ;offset to 1st bitplane pointer copper instruction
  44. GSVP_SHF_BPLCON1 rs.l 1 ;offset to horizontal shift register copper instruction
  45. GSVP_SHF_BPLPTR1 rs.l 1 ;offset to 1st bitplane pointer copper instruction
  46. GSVP_LOF_BPLCON2 rs.l 1 ;offset to horizontal shift register copper instruction
  47. GSVP_LOF_BPLPTR2 rs.l 1 ;offset to 1st bitplane pointer copper instruction
  48. GSVP_SHF_BPLCON2 rs.l 1 ;offset to horizontal shift register copper instruction
  49. GSVP_SHF_BPLPTR2 rs.l 1 ;offset to 1st bitplane pointer copper instruction
  50. GSVP_pf1scroll rs.w  1  ;horizontal scroll value, playfield 1
  51. GSVP_pf2scroll rs.w  1  ;horizontal scroll value, playfield 2
  52. GSVP_XOFF2     rs.l  1  ;playfield 2 X offset within bitmap
  53. GSVP_YOFF2     rs.l  1  ;playfield 2 Y offset within bitmap
  54. GSVP_LOF_COP1  rs.w  1  ;offset to viewport copper list within display list
  55. GSVP_SHF_COP1  rs.w  1
  56. GSVP_LOF_COP2  rs.w  1
  57. GSVP_SHF_COP2  rs.w  1
  58. GSVP_LOF_USERCOP1 rs.w 1 ;offset to viewport user copper list load
  59. GSVP_SHF_USERCOP1 rs.w 1
  60. GSVP_LOF_USERCOP2 rs.w 1
  61. GSVP_SHF_USERCOP2 rs.w 1
  62. GSVP_LOF_UCOP1 rs.l    1   ;ptr to hardware user copper list for this viewport
  63. GSVP_SHF_UCOP1 rs.l    1
  64. GSVP_LOF_UCOP2 rs.l    1
  65. GSVP_SHF_UCOP2 rs.l    1
  66. GSVP_UCOPLEN   rs.l    1   ;byte length of hardware user copper list
  67. GSVP_BPLCON0   rs.w    1   ;contents of bitplane control reg 0 for this viewport
  68. GSVP_BPLCON3   rs.w    1   ;contents of bitplane control reg 3 for this viewport
  69. GSVP_LOF_PLANES1 rs.l 8 ;bitplane pointers
  70. GSVP_SHF_PLANES1 rs.l 8
  71. GSVP_LOF_PLANES2 rs.l 8
  72. GSVP_SHF_PLANES2 rs.l 8
  73. GSVP_SIZEOF    rs.l  0
  74.  
  75. ; gs_viewport flags:
  76.  
  77. GSVPF_ALLOCBM  EQU   $01   ;let the display setup routine allocate bitmap(s)
  78. GSVPF_DCLIP    EQU   $02   ;user specified display clip
  79. GSVPF_DPF      EQU   $04   ;set viewport to operate in dual playfield mode
  80. GSVPF_TOP         EQU   $08   ;(SYSTEM FLAG) tagged top of viewport copper list
  81. GSVPF_NOCOLOR  EQU   $10   ;don't set up a color palette for this viewport (in copper list)
  82. GSVPF_NOWAIT   EQU   $20   ;for 1st viewport only, don't wait for top of display (in copper list)
  83.  
  84. ;***************************************************************
  85. ; The display struct
  86. ;***************************************************************
  87.  
  88.     rsreset
  89. GSV_OLDVIEW    rs.l  1  ;ptr to previous display view
  90. GSV_VE1        rs.l  1  ;2.xx & up ViewExtra struct (ptr to)
  91. GSV_VE2        rs.l  1  ;2.xx & up ViewExtra struct (ptr to)
  92. GSV_DXOFFSET   rs.l  1  ;display X offset (in pixels) for 1.3 OS
  93. GSV_DYOFFSET   rs.l  1  ;display Y offset (in rows) for 1.3 OS
  94. GSV_MODES      rs.l  1  ;display mode ID
  95. GSV_SPRPRI_PF1 rs.b  1  ;sprite priorities relative to playfield 1 (see ref manual)
  96. GSV_SPRPRI_PF2 rs.b  1  ;sprite priorities relative to playfield 2 (0 - 4 possible)
  97. GSV_FLAGS      rs.l  1  ;flags for display routines
  98. GSV_VIEWPORT   rs.l  1  ;ptr to 1st gs_viewport in display
  99. GSV_EXTEND     rs.l  1  ;reserved for future expansion
  100. ; remainder is for GDS system use ONLY
  101. GSV_BMDIFF     rs.l  1  ;byte diff between LOF & SHF bitmap ptrs this display
  102. GSV_VIEW1      rs.l  1  ;ptr to system View struct for 1st display page
  103. GSV_VIEW2      rs.l  1  ;ptr to system View struct for 2nd display page
  104. GSV_PVP        rs.l  1  ;ptr to parallax viewport list for this display
  105. GSV_LOF_COP1   rs.l  1  ;ptr to long frame hardware copper list for view 1
  106. GSV_SHF_COP1   rs.l  1  ;ptr to short frame hardware copper list for view 1
  107. GSV_LOF_COP2   rs.l  1  ;ptr to long frame hardware copper list for view 2
  108. GSV_SHF_COP2   rs.l  1  ;ptr to short frame hardware copper list for view 2
  109. GSV_LOF_LEN1   rs.l  1  ;number of words in 1st long frame copper list
  110. GSV_SHF_LEN1   rs.l  1  ;number of words in 1st short frame copper list
  111. GSV_LOF_LEN2   rs.l  1  ;number of words in 2nd long frame copper list
  112. GSV_SHF_LEN2   rs.l  1  ;number of words in 2nd short frame copper list
  113. GSV_LOF_TOP    rs.w  1  ;1st scan line of LOF display (copper wait)
  114. GSV_SHF_TOP    rs.w  1  ;1st scan line of SHF display (copper wait)
  115. GSV_SIZEOF     rs.b  0  ;size of display struct
  116.  
  117. ; display flags:
  118.  
  119. GSVF_DOUBLE    EQU   $0001    ;double buffered display
  120. GSVF_PAGE1     EQU   $0002    ;SYSTEM FLAG: page 1 currently display
  121. GSVF_EASY      EQU   $0004    ;SYSTEM FLAG: display set up through easy call
  122. GSVF_DISPLAYED EQU   $0008    ;SYSTEM FLAG: custom display has been shown on screen
  123. GSVF_FLIP      EQU   $0010    ;set by gs_flip_display & cleared when new page shown
  124. GSVF_SCROLL1   EQU   $0020    ;SYSTEM FLAG: reload copper list with new scroll values
  125. GSVF_SCROLL2   EQU   $0040    ;SYSTEM FLAG: reload copper list with new scroll values
  126. GSVF_ECSENA    EQU   $0080    ;SYSTEM FLAG: used by AGA chipset scroll handling
  127. GSVF_BPAGEM    EQU   $0100    ;SYSTEM FLAG: (ditto)
  128. GSVF_BPL32     EQU   $0200    ;SYSTEM FLAG: (ditto)
  129. GSVF_DBLSCAN   EQU   $0400    ;SYSTEM FLAG: (ditto)
  130. GSVF_AGA_SCROLL EQU  $0800    ;SYSTEM FLAG: use enhanced AGA scrolling methods
  131. GSVF_SUPER     EQU   $1000    ;SYSTEM FLAG: used by AGA chipset scroll handling
  132. GSVF_SCROLLABLE EQU  $2000    ;allow view to be scrolled
  133. GSVF_DDFADJUST EQU   $4000    ;display system adjusted data fetch for smooth scrolling
  134. GSVF_HARDX     EQU   $8000    ;use supplied DxOffset even under 2.x+
  135. GSVF_HARDY     EQU   $010000  ;use supplied DyOffset even under 2.x+
  136. GSVF_PF2PRI    EQU   $020000  ;playfield 2 appears in front of playfield 1
  137. GSVF_BRDRBLNK  EQU   $040000  ;blank borders on AGA machines instead of showing color 0
  138.  
  139. ; return values for gs_scroll_vp:
  140.  
  141. GSVP_PF1_LEFT      EQU   $01   ;display at leftmost edge
  142. GSVP_PF1_RIGHT     EQU   $02   ;display at rightmost edge
  143. GSVP_PF1_TOP       EQU   $04   ;display at topmost edge
  144. GSVP_PF1_BOTTOM    EQU   $08   ;display at bottom most edge
  145. GSVP_PF2_LEFT      EQU   $10   ;display at leftmost edge
  146. GSVP_PF2_RIGHT     EQU   $20   ;display at rightmost edge
  147. GSVP_PF2_TOP       EQU   $40   ;display at topmost edge
  148. GSVP_PF2_BOTTOM    EQU   $80   ;display at bottom most edge
  149. GSVP_NOVP      EQU   -1    ;invalid viewport specified
  150.  
  151. ; return values from LoadRGB and SetRGB:
  152.  
  153.  
  154. GSVP_RANGE         EQU   -2    ;color register out of range
  155.