1 #ifndef GRAPHICS_GELS_H
    2 #define GRAPHICS_GELS_H
    3 
    4 /*
    5 	graphics GELS definitions
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_TYPES_H
   11 # include <exec/types.h>
   12 #endif
   13 
   14 #pragma pack(2)
   15 
   16 
   17 #define SUSERFLAGS    0x00FF
   18 #define VSPRITE       0x0001
   19 #define SAVEBACK      0x0002
   20 #define OVERLAY       0x0004
   21 #define MUSTDRAW      0x0008
   22 #define BACKSAVED     0x0100
   23 #define BOBUPDATE     0x0200
   24 #define GELGONE       0x0400
   25 #define VSOVERFLOW    0x0800
   26 
   27 #define BUSERFLAGS    0x00FF
   28 #define SAVEBOB       0x0001
   29 #define BOBISCOMP     0x0002
   30 #define BWAITING      0x0100
   31 #define BDRAWN        0x0200
   32 #define BOBSAWAY      0x0400
   33 #define BOBNIX        0x0800
   34 #define SAVEPRESERVE  0x1000
   35 #define OUTSTEP       0x2000
   36 
   37 #define ANFRACSIZE   6
   38 #define ANIMHALF     0x0020
   39 #define RINGTRIGGER  0x0001
   40 
   41 
   42 #ifndef VUserStuff
   43 # define VUserStuff  WORD
   44 #endif
   45 
   46 #ifndef BUserStuff
   47 # define BUserStuff  WORD
   48 #endif
   49 
   50 #ifndef AUserStuff
   51 # define AUserStuff  WORD
   52 #endif
   53 
   54 
   55 struct VSprite
   56 {
   57 	struct VSprite *NextVSprite;
   58 	struct VSprite *PrevVSprite;
   59 
   60 	struct VSprite *DrawPath;
   61 	struct VSprite *ClearPath;
   62 
   63 	WORD            OldY, OldX;
   64 
   65 	WORD            Flags;
   66 
   67 	WORD            Y, X;
   68 
   69 	WORD            Height;
   70 	WORD            Width;
   71 	WORD            Depth;
   72 
   73 	WORD            MeMask;
   74 	WORD            HitMask;
   75 
   76 	WORD           *ImageData;
   77 
   78 	WORD           *BorderLine;
   79 	WORD           *CollMask;
   80 
   81 	WORD           *SprColors;
   82 
   83 	struct Bob     *VSBob;
   84 
   85 	BYTE            PlanePick;
   86 	BYTE            PlaneOnOff;
   87 
   88 	VUserStuff      VUserExt;
   89 };
   90 
   91 struct Bob
   92 {
   93 	WORD               Flags;
   94 
   95 	WORD              *SaveBuffer;
   96 
   97 	WORD              *ImageShadow;
   98 
   99 	struct Bob        *Before;
  100 	struct Bob        *After;
  101 
  102 	struct VSprite    *BobVSprite;
  103 
  104 	struct AnimComp   *BobComp;
  105 
  106 	struct DBufPacket *DBuffer;
  107 
  108 	BUserStuff         BUserExt;
  109 };
  110 
  111 struct AnimComp
  112 {
  113 	WORD              Flags;
  114 
  115 	WORD              Timer;
  116 	WORD              TimeSet;
  117 
  118 	struct AnimComp  *NextComp;
  119 	struct AnimComp  *PrevComp;
  120 
  121 	struct AnimComp  *NextSeq;
  122 	struct AnimComp  *PrevSeq;
  123 
  124 	WORD            (*AnimCRoutine) __CLIB_PROTOTYPE((struct AnimComp *));
  125 
  126 	WORD              YTrans;
  127 	WORD              XTrans;
  128 
  129 	struct AnimOb    *HeadOb;
  130 
  131 	struct Bob       *AnimBob;
  132 };
  133 
  134 struct AnimOb
  135 {
  136 	struct AnimOb    *NextOb, *PrevOb;
  137 
  138 	LONG              Clock;
  139 
  140 	WORD              AnOldY, AnOldX;
  141 	WORD              AnY, AnX;
  142 
  143 	WORD              YVel, XVel;
  144 	WORD              YAccel, XAccel;
  145 
  146 	WORD              RingYTrans, RingXTrans;
  147 
  148 	WORD            (*AnimORoutine) __CLIB_PROTOTYPE((struct AnimOb *));
  149 
  150 	struct AnimComp  *HeadComp;
  151 
  152 	AUserStuff        AUserExt;
  153 };
  154 
  155 struct DBufPacket
  156 {
  157 	WORD            BufY, BufX;
  158 	struct VSprite *BufPath;
  159 
  160 	WORD           *BufBuffer;
  161 };
  162 
  163 
  164 #define InitAnimate(animKey)  { *(animKey) = NULL; }
  165 #define RemBob(b)             { (b)->Flags |= BOBSAWAY; }
  166 
  167 
  168 #define B2NORM    0
  169 #define B2SWAP    1
  170 #define B2BOBBER  2
  171 
  172 
  173 struct collTable
  174 {
  175 	LONG (*collPtrs[16]) __CLIB_PROTOTYPE((struct VSprite *, struct VSprite *));
  176 };
  177 
  178 
  179 #pragma pack()
  180 
  181 #endif /* GRAPHICS_GELS_H */