home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / cbm / os-include.lha / os-include / graphics / gels.i < prev    next >
Text File  |  1993-10-15  |  9KB  |  209 lines

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