home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / GameSmith1-Hisoft-System.DMS / in.adf / GDS_System.lha / include / graphics / anim.i < prev    next >
Encoding:
Text File  |  1994-03-07  |  8.9 KB  |  192 lines

  1. ;***************************************************************
  2. ; Object-to-Background collision detection structure:
  3. ;***************************************************************
  4.  
  5.     rsreset
  6. CBGD_MASK    rs.l    1    ;collision enable mask
  7. CBGD_AREA    rs.l    1    ;collision area number
  8. CBGD_X1    rs.w    1    ;x coord to check
  9. CBGD_Y1    rs.w    1    ;y coord to check
  10. CBGD_NEXT    rs.l    1    ;ptr to next obj-to-bg collision struct
  11. CBGD_SIZEOF    rs.b    0    ;size of cbgd struct
  12.  
  13. ;***************************************************************
  14. ; Object-to-Object collision detection structure:
  15. ;***************************************************************
  16.  
  17.     rsreset
  18. COBJ_TYPE    rs.l    1    ;type of collision area
  19. COBJ_MASK    rs.l    1    ;collision enable mask
  20. COBJ_AREA    rs.l    1    ;collision area number
  21. COBJ_X1    rs.w    1    ;left edge of area
  22. COBJ_Y1    rs.w    1    ;top edge of area
  23. COBJ_X2    rs.w    1    ;right edge of area
  24. COBJ_Y2    rs.w    1    ;bottom edge of area
  25. COBJ_NEXT    rs.l    1    ;ptr to next obj-to-obj collision struct
  26. COBJ_SIZEOF    rs.b    0    ;size of cobj struct
  27.  
  28. ;******************************************************************************
  29. ; The blitter structure
  30. ;******************************************************************************
  31.  
  32.     rsreset
  33. BLIT_DATA  rs.l     1         ;Address of data image to blit
  34. BLIT_MASK  rs.l     1         ;Address of data mask
  35. BLIT_SAVE  rs.l     1         ;Address of save area for saving background.
  36. ;                             ;0 = nosave (don't use BLIT_RESTORE!)
  37. BLIT_DEPTH  rs.l    1         ;number of bit planes in image to blit to screen.
  38. BLIT_PLANES rs.l    1         ;Defines which bit planes to draw into (like a
  39. ;                             ;BOB PlanePick).  1 = draw into appropriate
  40. ;                             ;bitplane.  ex.  00000101 = use planes 0 and 2.
  41. BLIT_WIDTH  rs.l    1         ;Width of data image (in words)
  42. BLIT_HEIGHT rs.l    1         ;Height of of data image (horizontal lines)
  43. BLIT_IMG_SZ rs.l    1         ;Size (in bytes) of image (width * height)
  44. BLIT_X_OFF  rs.l    1         ;X offset from left edge of image to be added
  45. ;                             ;to the X coordinate passed to "Blit_Image".
  46. BLIT_Y_OFF  rs.l    1         ;Y offset from top edge of image to be added
  47. ;                             ;to the Y coordinate passed to "Blit_Image"
  48. BLIT_FLAGS  rs.l    1         ;Flags (see below)
  49. BLIT_COLL_BG rs.l   1         ;Pointer to collision detection list (null if no
  50. ;                             ;collision detection) for background gfx.
  51. BLIT_COLLISION rs.l 1         ;Pointer to collision detection list (null if no
  52. ;                             ;collision detection) for anim obj area detect.
  53. BLIT_PREV   rs.l    1         ;Ptr to previous image in an animation sequence
  54. BLIT_NEXT   rs.l    1         ;Ptr to next image in an animation sequence
  55. ;*    -------------- RESERVED ------------------------
  56. BLIT_ADDR      rs.l    1    ;Offset of blit from start (low byte) of screen
  57. ;            (returned).  For quick restore.
  58. BLIT_MODULO rs.w    1    ;Modulo (in bytes) for screen.  To find modulo,
  59. ;            take the number of bytes on your screen line,
  60. ;            and subtract the width (in bytes) of your image.
  61. BLIT_SHIFT  rs.w    1    ;Shift value of image.  Stored by blit_save_bg
  62. ;            so blit_image2 doesn't have to recompute it.
  63. BLIT_SIZEOF rs.b    0         ;Size of blitter struct
  64.  
  65. * ---------------------------------------------------------------------------
  66. *
  67. * The blitter flags:
  68. * -----------------
  69.  
  70. BLIT_MERGE    EQU    $01000000    ;don't clear unaffected planes
  71. BLIT_1SHOT_FORWARD    EQU    $02000000    ;anim does not repeat when played forward
  72. BLIT_1SHOT_BACKWARD    EQU    $04000000    ;anim does not repeat when played backward
  73. BLIT_DATACOPY    EQU    $08000000    ;data is a copy area, don't free (internal use)
  74. BLIT_CPUBLIT    EQU    $10000000    ;use CPU to blit image instead of blitter
  75.  
  76. ;***************************************************************
  77. ; Anim complex struct:
  78. ;***************************************************************
  79.  
  80.     rsreset
  81. CPLX_CNT    rs.w    1    ;number anim sequences in the complex
  82. CPLX_SEQ    rs.w    1    ;current anim sequence number (0 - n)
  83. CPLX_WIDTH rs.w    1    ;max width of complex (in bytes)
  84. CPLX_HEIGHT rs.w    1    ;max height of complex (scan lines)
  85. CPLX_ARRAY_NUM rs.w    1    ;array element number
  86. CPLX_LABEL rs.w    1    ;user label/ID
  87. CPLX_LIST    rs.l    1    ;ptr to list of anim sequences
  88. CPLX_ANIM    rs.l    1    ;ptr to current anim on screen
  89. CPLX_SIZEOF    rs.b    0    ;size of anim complex struct
  90.  
  91. ;***************************************************************
  92. ; Anim struct:
  93. ;***************************************************************
  94.  
  95.     rsreset
  96. ANIM_LIST    rs.l    1    ;ptr to 1st image (blitter struct) in anim sequence
  97. ANIM_IMG    rs.l    1    ;ptr to current image on screen
  98. ANIM_ATTACH rs.l    1    ;ptr to next attached anim
  99. ANIM_ARRAY_NUM rs.w    1    ;ptr to array element number
  100. ANIM_LABEL rs.w    1    ;user label/ID
  101. ANIM_COUNT rs.w    1    ;number of images in the anim sequence
  102. ANIM_X    rs.w    1    ;current x coord of image on screen
  103. ANIM_Y    rs.w    1    ;current y coord of image on screen
  104. ANIM_XA    rs.w    1    ;attached anim X offset from parent
  105. ANIM_YA    rs.w    1    ;attached anim Y offste from parent
  106. ANIM_WIDTH rs.w    1    ;max width of image (in bytes)
  107. ANIM_HEIGHT rs.w    1    ;max height of image (scan lines)
  108. ANIM_CELL    rs.w    1    ;current cell number on screen (0 - n)
  109. ANIM_PRIO    rs.w    1    ;image display priority
  110. ANIM_FLAGS rs.l    1    ;flags (see below)
  111. ; ----------- INTERNAL USE --------------------------
  112. ANIM_SHIFT1 rs.w    1    ;save area for blitter shift value
  113. ANIM_SHIFT2 rs.w    1    ;save area for blitter shift value
  114. ANIM_SAVE1 rs.l    1    ;ptr to 1st background save area
  115. ANIM_SAVE2 rs.l    1    ;ptr to 2nd background save area
  116. ANIM_OFFSET1 rs.l    1    ;screen offset for save area 1
  117. ANIM_OFFSET2 rs.l    1    ;screen offset for save area 2
  118. ANIM_SAVSIZ rs.l    1    ;size of save area (in bytes)
  119. ANIM_IMAGE1 rs.l    1    ;ptr to image displayed in bitmap 1
  120. ANIM_IMAGE2 rs.l    1    ;ptr to image displayed in bitmap 2
  121. ANIM_COLLIDE rs.l    1    ;ptr to colliding anim
  122. ANIM_PREV    rs.l    1    ;ptr to previous anim in system
  123. ANIM_NEXT    rs.l    1    ;ptr to next anim in system
  124. ANIM_CPLX_NEXT rs.l    1    ;ptr to next anim obj in complex
  125. ANIM_CPLX    rs.l    1    ;ptr to parent anim complex (if any)
  126. ANIM_SIZEOF    rs.b    0    ;size of anim struct
  127.  
  128. * ---------------------------------------------------------------------------
  129. *
  130. * The anim flags:
  131. * --------------
  132.  
  133. ANIM_SAVE_BG    EQU    $01000000    ;Save background before blitting image to screen
  134. ANIM_COLLISION    EQU    $02000000    ;Object to object collision detection enable
  135. ANIM_ACTIVE    EQU    $20000000    ;Anim is active in a display system
  136. ANIM_INVISIBLE    EQU    $40000000    ;Anim not visible on screen
  137. ANIM_ONSCREEN    EQU    $80000000    ;Anim is displayed on screen
  138. ANIM_CLEAR     EQU    $00010000    ;If NOT SAVE_BG, call blit_clear before calling
  139. ;                blit_image
  140. ANIM_COPY        EQU    $00020000    ;Use blit_copy instead of blit_image
  141. ANIM_REVERSE    EQU    $00040000    ;Anim is running in reverse
  142. ANIM_PARENT    EQU    $00080000    ;Anim is a parent with attached anims
  143. ANIM_MERGE    EQU    $00100000    ;Anim merges with existing graphics onscreen
  144. ANIM_FLICKER    EQU    $00200000    ;Image appears on bitmap 1 ONLY
  145. ANIM_COLLISION_BG EQU    $00400000    ;Object to background collision detection enable
  146. ANIM_IMGCOPY    EQU    $00800000    ;Anim is a copy, don't free it's images
  147. ANIM_BOUNDS_X1    EQU    $00000100    ;Anim obj tried to move past left edge
  148. ANIM_BOUNDS_Y1    EQU    $00000200    ;Anim obj tried to move past top edge
  149. ANIM_BOUNDS_X2    EQU    $00000400    ;Anim obj tried to move past right edge
  150. ANIM_BOUNDS_Y2    EQU    $00000800    ;Anim obj tried to move past bottom edge
  151. ANIM_CPUBLIT    EQU    $00001000    ;CPU used to blit images in this anim
  152. ANIM_VSPACE    EQU    $00002000    ;Object lies in virtual space
  153. ANIM_VCOLLIDE    EQU    $00004000    ;Allow object-to-object collisions in virtual space
  154.  
  155. ;***************************************************************
  156. ; Anim attachment array specification
  157. ;***************************************************************
  158.  
  159. ; undefined until next release
  160.  
  161. ;***************************************************************
  162. ; Anim load struct
  163. ;***************************************************************
  164.  
  165.     rsreset
  166. ALOAD_NAME    rs.l    1    ;ptr to null terminated char string of file to load
  167. ALOAD_ANIM    rs.l    1    ;ptr to anim or complex obj after load
  168. ALOAD_ATTACH    rs.l    1    ;ptr to attachment array specification (filled)
  169. ALOAD_CMAP    rs.l    1    ;ptr to color map array (filled)
  170. ALOAD_CMAP_ENTRIES    rs.l    1    ;number of color map entries (filled)
  171. ALOAD_CMAP_SIZE    rs.l    1    ;number of bits per color value (4 or 8) (user defined
  172. ALOAD_TYPE    rs.l    1    ;type 0 = anim, 1 = complex (filled)
  173. ALOAD_ELEMENTS    rs.l    1    ;size of array to create (1 - n) (user defined)
  174. ALOAD_FLAGS    rs.l    1    ;load flags.  Set ONLY user bits, some used by CITAS
  175.  
  176. * ---------------------------------------------------------------------------
  177. *
  178. * The anim load flags:
  179. * -------------------
  180.  
  181. ALOAD_NOCOLOR    EQU    $00000001    ;don't load color table if one exists in file
  182. ALOAD_FASTRAM    EQU    $00000002    ;load anim to Fast RAM if available
  183. ALOAD_NOFASTRAM    EQU    $00000004    ;don't use Fast RAM even if flagged in file
  184.  
  185. * ---------------------------------------------------------------------------
  186. *
  187. * Save area allocation flags:
  188. * --------------------------
  189.  
  190. SINGLE_BUFF  EQU 0x00  ;object will be used in a single buffered display
  191. DOUBLE_BUFF  EQU 0x01  ;object will be used in a double buffered display
  192.