home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: AssemPro For Development Amiga Driver / Lowe_AssemProForDevelopmentAmigaDriver.adf / Includes / graphics / gels.i < prev    next >
Encoding:
Text File  |  1978-06-06  |  11.1 KB  |  236 lines

  1.     IFND    GRAPHICS_GELS_I@
  2. GRAPHICS_GELS_I@ = 1
  3. ;********************************************************************
  4. ;               Commodore-Amiga, Inc.                               ;
  5. ;      Graphics Library : Gels Definitions                          ;
  6. ;                                                                   ;
  7. ;********************************************************************
  8.  
  9.  
  10. ;------ VS_vSflags ---------------------------------------------------
  11.  
  12. ;   ;-- user-set vSprite flags --
  13. SUSERFLAGS  EQU $00FF         ; mask of all user-settable vSprite-flags
  14. ;    BITDEF  VS,VSPRITE,0      ; set if vSprite, clear if bob
  15. VSB_VSPRITE = 0      ; set if vSpriteF_ clear if bob
  16. VS = 1<<VSPRITE,0      ; set if vSprite, clear if bob
  17. ;    BITDEF  VS,SAVEBACK,1     ; set if background is to be saved/restored
  18. VSB_SAVEBACK = 1     ; set if background is to be saved/restored
  19. VSF_SAVEBACK = 1<<1     ; set if background is to be saved/restored
  20. ;    BITDEF  VS,OVERLAY,2      ; set to mask image of bob onto background
  21. VSB_OVERLAY = 2      ; set to mask image of bob onto background
  22. VSF_OVERLAY = 1<<2      ; set to mask image of bob onto background
  23. ;    BITDEF  VS,MUSTDRAW,3     ; set if vSprite absolutely must be drawn
  24. VSB_MUSTDRAW = 3     ; set if vSprite absolutely must be drawn
  25. VSF_MUSTDRAW = 1<<3     ; set if vSprite absolutely must be drawn
  26. ;   ;-- system-set vSprite flags --
  27. ;    BITDEF  VS,BACKSAVED,8    ; this bob's background has been saved
  28. VSB_BACKSAVED = 8    ; this bob's background has been saved
  29. VSF_BACKSAVED = 1<<8    ; this bob's background has been saved
  30. ;    BITDEF  VS,BOBUPDATE,9    ; temporary flag, useless to outside world
  31. VSB_BOBUPDATE = 9    ; temporary flagF_ useless to outside world
  32. VS = 1<<BOBUPDATE,9    ; temporary flag, useless to outside world
  33. ;    BITDEF  VS,GELGONE,10     ; set if gel is completely clipped (offscreen)
  34. VSB_GELGONE = 10     ; set if gel is completely clipped (offscreen)
  35. VSF_GELGONE = 1<<10     ; set if gel is completely clipped (offscreen)
  36. ;    BITDEF  VS,VSOVERFLOW,11  ; vSprite overflow (if MUSTDRAW set we draw|)
  37. VSB_VSOVERFLOW = 11  ; vSprite overflow (if MUSTDRAW set we draw|)
  38. VSF_VSOVERFLOW = 1<<11  ; vSprite overflow (if MUSTDRAW set we draw|)
  39.  
  40.  
  41. ;------ B_flags ------------------------------------------------------
  42. ;   ;-- these are the user flag bits --
  43. BUSERFLAGS  EQU $00FF         ; mask of all user-settable bob-flags
  44. ;    BITDEF  B,SAVEBOB,0       ; set to not erase bob
  45. BB_SAVEBOB = 0       ; set to not erase bob
  46. BF_SAVEBOB = 1<<0       ; set to not erase bob
  47. ;    BITDEF  B,BOBISCOMP,1     ; set to identify bob as animComp
  48. BB_BOBISCOMP = 1     ; set to identify bob as animComp
  49. BF_BOBISCOMP = 1<<1     ; set to identify bob as animComp
  50. ;   ;-- these are the system flag bits --
  51. ;    BITDEF  B,BWAITING,8      ; set while bob is waiting on 'after'
  52. BB_BWAITING = 8      ; set while bob is waiting on 'after'
  53. BF_BWAITING = 1<<8      ; set while bob is waiting on 'after'
  54. ;    BITDEF  B,BDRAWN,9        ; set when bob is drawn this DrawG pass
  55. BB_BDRAWN = 9        ; set when bob is drawn this DrawG pass
  56. BF_BDRAWN = 1<<9        ; set when bob is drawn this DrawG pass
  57. ;    BITDEF  B,BOBSAWAY,10     ; set to initiate removal of bob
  58. BB_BOBSAWAY = 10     ; set to initiate removal of bob
  59. BF_BOBSAWAY = 1<<10     ; set to initiate removal of bob
  60. ;    BITDEF  B,BOBNIX,11       ; set when bob is completely removed
  61. BB_BOBNIX = 11       ; set when bob is completely removed
  62. BF_BOBNIX = 1<<11       ; set when bob is completely removed
  63. ;    BITDEF  B,SAVEPRESERVE,12 ; for back-restore during double-buffer
  64. BB_SAVEPRESERVE = 12 ; for back-restore during double-buffer
  65. BF_SAVEPRESERVE = 1<<12 ; for back-restore during double-buffer
  66. ;    BITDEF  B,OUTSTEP,13      ; for double-clearing if double-buffer
  67. BB_OUTSTEP = 13      ; for double-clearing if double-buffer
  68. BF_OUTSTEP = 1<<13      ; for double-clearing if double-buffer
  69.  
  70.  
  71. ;------ defines for the animation procedures -------------------------
  72.  
  73. ANFRACSIZE  EQU 6
  74. ANIMHALF    EQU $0020
  75. RINGTRIGGER EQU $0001
  76.  
  77. ;------ macros --------------------------------------------------------
  78. ; these are GEL functions that are currently simple enough to exist as a
  79. ; definition.  It should not be assumed that this will always be the case
  80.  
  81. InitAnimate MACRO   $\1  ; &animKey
  82.        CLR.L   \1
  83.        ENDM
  84.  
  85.  
  86. RemBob      MACRO   $\1  ; &b
  87.        OR.W    #BF_BOBSAWAY,b_BobFlags+\1
  88.        ENDM
  89.  
  90. ;------ VS : vSprite -------------------------------------------------
  91.  STRUCTURE  VS,0    ; vSprite
  92. ;   -- SYSTEM VARIABLES --
  93. ;   GEL linked list forward/backward pointers sorted by y,x value
  94.     APTR    vs_NextVSprite    ; struct ;vSprite
  95.     APTR    vs_PrevVSprite    ; struct ;vSprite
  96. ;   GEL draw list constructed in the order the bobs are actually drawn, then
  97. ;   list is copied to clear list
  98. ;   must be here in vSprite for system boundary detection
  99.     APTR    vs_DrawPath       ; struct ;vSprite: pointer of overlay drawing
  100.     APTR    vs_ClearPath      ; struct ;vSprite: pointer for overlay clearing
  101. ;   the vSprite positions are defined in (y,x) order to make sorting
  102. ;   sorting easier, since (y,x) as a long integer
  103.     WORD    vs_Oldy           ; previous position
  104.     WORD    vs_Oldx           ;
  105. ;   -- COMMON VARIABLES --
  106.     WORD    vs_VSFlags        ; vSprite flags
  107. ;   -- USER VARIABLES --
  108. ;    the vSprite positions are defined in (y,x) order to make sorting
  109. ;    easier, since (y,x) as a long integer
  110.     WORD    vs_Y              ; screen position
  111.     WORD    vs_X
  112.     WORD    vs_Height
  113.     WORD    vs_Width          ; number of words per row of image data
  114.     WORD    vs_Depth          ; number of planes of data
  115.     WORD    vs_MeMask         ; which types can collide with this vSprite
  116.     WORD    vs_HitMask        ; which types this vSprite can collide with
  117.     APTR    vs_ImageData      ; ;WORD pointer to vSprite image
  118. ;    borderLine is the one-dimensional logical OR of all
  119. ;    the vSprite bits, used for fast collision detection of edge
  120.     APTR    vs_BorderLine     ; ;WORD: logical OR of all vSprite bits
  121.     APTR    vs_CollMask       ; ;WORD: similar to above except this is a 
  122. ;    matrix pointer to this vSprite's color definitions (not used by bobs)
  123.     APTR    vs_SprColors      ; ;WORD
  124.     APTR    vs_VSBob          ; struct ;bob: points home if this vSprite is 
  125.                               ;  part of a bob
  126. ;    planePick flag:  set bit selects a plane from image, clear bit selects
  127. ;         use of shadow mask for that plane
  128. ;    OnOff flag: if using shadow mask to fill plane, this bit (corresponding
  129. ;         to bit in planePick) describes whether to fill with 0's or 1's
  130. ;    There are two uses for these flags:
  131. ;              - if this is the vSprite of a bob, these flags describe how 
  132. ;                the bob is to be drawn into memory
  133. ;              - if this is a simple vSprite and the user intends on setting 
  134. ;                the MUSTDRAW flag of the vSprite, these flags must be set 
  135. ;                too to describe which color registers the user wants for 
  136. ;                the image
  137.     BYTE    vs_PlanePick
  138.     BYTE    vs_PlaneOnOff
  139.     LABEL   vs_SUserExt       ; user definable
  140.     LABEL   vs_SIZEOF
  141.  
  142.  
  143. ;------ BOB : bob ------------------------------------------------------
  144.  
  145.  STRUCTURE  BOB,0     ; bob: blitter object
  146. ;   -- COMMON VARIABLES --
  147.     WORD    bob_BobFlags      ; general purpose flags (see definitions below)
  148. ;   -- USER VARIABLES --
  149.     APTR    bob_SaveBuffer    ; ;WORD pointer to the buffer for background 
  150. ;    save used by bobs for "cookie-cutting" and multi-plane masking
  151.     APTR    bob_ImageShadow   ; ;WORD
  152. ;    pointer to BOBs for sequenced drawing of bobs
  153. ;      for correct overlaying of multiple component animations
  154.     APTR    bob_Before        ; struct ;bob: draw this bob before bob pointed
  155.                               ; to by before
  156.     APTR    bob_After         ; struct ;bob: draw this bob after bob pointed
  157.                               ; to by after
  158.     APTR    bob_BobVSprite    ; struct ;vSprite: this bob's vSprite definition
  159.     APTR    bob_BobComp       ; struct ;animComp: pointer to this bob's 
  160.                               ; animComp def
  161.     APTR    bob_DBuffer       ; struct dBufPacket: pointer to this bob's 
  162.                               ; dBuf packet
  163.     LABEL   bob_BUserExt      ; bob user extension
  164.     LABEL   bob_SIZEOF
  165.  
  166. ;------ AC : animComp ------------------------------------------------
  167.  
  168.  STRUCTURE  AC,0    ; animComp
  169. ;   -- COMMON VARIABLES --
  170.     WORD    ac_CompFlags      ; animComp flags for system & user
  171. ;    timer defines how long to keep this component active:
  172. ;      if set non-zero, timer decrements to zero then switches to nextSeq
  173. ;      if set to zero, animComp never switches
  174.     WORD    ac_Timer
  175. ;   -- USER VARIABLES --
  176. ;    initial value for timer when the animComp is activated by the system
  177.     WORD    ac_TimeSet
  178. ;    pointer to next and previous components of animation object
  179.     APTR    ac_NextComp       ; struct ;animComp
  180.     APTR    ac_PrevComp       ; struct ;animComp
  181. ;    pointer to component component definition of next image in sequence
  182.     APTR    ac_NextSeq        ; struct ;animComp
  183.     APTR    ac_PrevSeq        ; struct ;animComp
  184.     APTR    ac_AnimCRoutine   ; address of special animation procedure
  185.     WORD    ac_YTrans         ; initial y translation (if this is a component)
  186.     WORD    ac_XTrans         ; initial x translation (if this is a component)
  187.     APTR    ac_HeadOb         ; struct ;animOb
  188.     APTR    ac_AnimBob        ; struct ;bob
  189.     LABEL   ac_SIZE
  190.  
  191. ;------ AO : animOb --------------------------------------------------
  192.  
  193.  STRUCTURE  AO,0    ; animOb
  194. ;   -- SYSTEM VARIABLES --
  195.     APTR    ao_NextOb         ; struct ;animOb
  196.     APTR    ao_PrevOb         ; struct ;animOb
  197. ;    number of calls to Animate this animOb has endured
  198.     LONG    ao_Clock
  199.     WORD    ao_AnOldY         ; old y,x coordinates
  200.     WORD    ao_AnOldX         ;
  201. ;   -- COMMON VARIABLES --
  202.     WORD    ao_AnY            ; y,x coordinates of the animOb
  203.     WORD    ao_AnX            ;
  204. ;   -- USER VARIABLES --
  205.     WORD    ao_YVel           ; velocities of this object
  206.     WORD    ao_XVel           ;
  207.     WORD    ao_XAccel         ; accelerations of this object
  208.     WORD    ao_YAccel         ;   ||| backwards |||
  209.     WORD    ao_RingYTrans     ; ring translation values
  210.     WORD    ao_RingXTrans     ;
  211.     APTR    ao_AnimORoutine   ; address of special animation procedure
  212.     APTR    ao_HeadComp       ; struct ;animComp: pointer to first component
  213.     LABEL   ao_AUserExt       ; animOb user extension
  214.     LABEL   ao_SIZEOF
  215.  
  216.  
  217. ;------ DBP : dBufPacket ---------------------------------------------
  218. ; dBufPacket defines the values needed to be saved across buffer to buffer
  219. ;   when in double-buffer mode
  220.  
  221.  STRUCTURE  DBP,0             ; dBufPacket
  222.     WORD    dbp_BufY          ; save the other buffers screen coordinates
  223.     WORD    dbp_BufX          ;
  224.     APTR    dbp_BufPath       ; struct ;vSprite: carry the draw path over
  225.                               ; the gap
  226. ;    these pointers must be filled in by the user
  227. ;    pointer to other buffer's background save buffer
  228.     APTR    dbp_BufBuffer     ; ;WORD
  229. ;    pointer to other buffer's background plane pointers
  230.     APTR    dbp_BufPlanes     ; ;*WORD
  231.     LABEL   dbp_SIZEOF
  232.  
  233.     ENDIF
  234.     END
  235.