1 #ifndef DATATYPES_ANIMATIONCLASS_H
    2 #define DATATYPES_ANIMATIONCLASS_H
    3 
    4 /*
    5 	datatypes animation-object definitions (V45)
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef UTILITY_TAGITEM_H
   11 # include <utility/tagitem.h>
   12 #endif
   13 
   14 #ifndef DATATYPES_DATATYPESCLASS_H
   15 # include <datatypes/datatypesclass.h>
   16 #endif
   17 
   18 #ifndef DATATYPES_PICTURECLASS_H
   19 # include <datatypes/pictureclass.h>
   20 #endif
   21 
   22 #ifndef DATATYPES_SOUNDCLASS_H
   23 # include <datatypes/soundclass.h>
   24 #endif
   25 
   26 #ifndef LIBRARIES_IFFPARSE_H
   27 # include <libraries/iffparse.h>
   28 #endif
   29 
   30 #pragma pack(2)
   31 
   32 
   33 #define ANIMATIONDTCLASS  "animation.datatype"
   34 
   35 
   36 /* Animation attributes */
   37 
   38 #define ADTA_Dummy              (DTA_Dummy + 600)
   39 #define ADTA_ModeID             (PDTA_ModeID)
   40 #define ADTA_KeyFrame           (PDTA_BitMap)
   41 #define ADTA_ColorRegisters     (PDTA_ColorRegisters)
   42 #define ADTA_CRegs              (PDTA_CRegs)
   43 #define ADTA_GRegs              (PDTA_GRegs)
   44 #define ADTA_ColorTable         (PDTA_ColorTable)
   45 #define ADTA_ColorTable2        (PDTA_ColorTable2)
   46 #define ADTA_Allocated          (PDTA_Allocated)
   47 #define ADTA_NumColors          (PDTA_NumColors)
   48 #define ADTA_NumAlloc           (PDTA_NumAlloc)
   49 #define ADTA_Remap              (PDTA_Remap)
   50 #define ADTA_Screen             (PDTA_Screen)
   51 #define ADTA_Width              (ADTA_Dummy + 1)
   52 #define ADTA_Height             (ADTA_Dummy + 2)
   53 #define ADTA_Depth              (ADTA_Dummy + 3)
   54 #define ADTA_Frames             (ADTA_Dummy + 4)
   55 #define ADTA_Frame              (ADTA_Dummy + 5)
   56 #define ADTA_FramesPerSecond    (ADTA_Dummy + 6)
   57 #define ADTA_FrameIncrement     (ADTA_Dummy + 7)
   58 
   59 /*** V44 ***/
   60 
   61 #define ADTA_PreloadFrameCount  (ADTA_Dummy + 8)
   62 
   63 
   64 /* Sound attributes */
   65 
   66 #define ADTA_Sample         SDTA_Sample
   67 #define ADTA_SampleLength   SDTA_SampleLength
   68 #define ADTA_Period         SDTA_Period
   69 #define ADTA_Volume         SDTA_Volume
   70 #define ADTA_Cycles         SDTA_Cycles
   71 
   72 /*** V44 ***/
   73 
   74 #define ADTA_LeftSample     SDTA_LeftSample
   75 #define ADTA_RightSample    SDTA_RightSample
   76 #define ADTA_SamplesPerSec  SDTA_SamplesPerSec
   77 
   78 
   79 #define ID_ANIM  MAKE_ID('A','N','I','M')
   80 #define ID_ANHD  MAKE_ID('A','N','H','D')
   81 #define ID_DLTA  MAKE_ID('D','L','T','A')
   82 
   83 
   84 struct AnimHeader
   85 {
   86 	UBYTE ah_Operation;
   87 	UBYTE ah_Mask;
   88 	UWORD ah_Width;
   89 	UWORD ah_Height;
   90 	WORD  ah_Left;
   91 	WORD  ah_Top;
   92 	ULONG ah_AbsTime;
   93 	ULONG ah_RelTime;
   94 	UBYTE ah_Interleave;
   95 	UBYTE ah_Pad0;
   96 	ULONG ah_Flags;
   97 	UBYTE ah_Pad[16];
   98 };
   99 
  100 
  101 #define ADTM_Dummy                 (0x700)
  102 #define ADTM_LOADFRAME             (0x701)
  103 #define ADTM_UNLOADFRAME           (0x702)
  104 #define ADTM_START                 (0x703)
  105 #define ADTM_PAUSE                 (0x704)
  106 #define ADTM_STOP                  (0x705)
  107 #define ADTM_LOCATE                (0x706)
  108 
  109 /*** V44 ***/
  110 
  111 #define ADTM_LOADNEWFORMATFRAME    (0x707)
  112 #define ADTM_UNLOADNEWFORMATFRAME  (0x708)
  113 
  114 
  115 struct adtFrame
  116 {
  117 	ULONG            MethodID;
  118 	ULONG            alf_TimeStamp;
  119 
  120 	ULONG            alf_Frame;
  121 	ULONG            alf_Duration;
  122 
  123 	struct BitMap   *alf_BitMap;
  124 	struct ColorMap *alf_CMap;
  125 
  126 	BYTE            *alf_Sample;
  127 	ULONG            alf_SampleLength;
  128 	ULONG            alf_Period;
  129 
  130 	APTR             alf_UserData;
  131 };
  132 
  133 struct adtNewFormatFrame
  134 {
  135 	ULONG            MethodID;
  136 	ULONG            alf_TimeStamp;
  137 
  138 	ULONG            alf_Frame;
  139 	ULONG            alf_Duration;
  140 
  141 	struct BitMap   *alf_BitMap;
  142 	struct ColorMap *alf_CMap;
  143 
  144 	BYTE            *alf_Sample;
  145 	ULONG            alf_SampleLength;
  146 	ULONG            alf_Period;
  147 
  148 	APTR             alf_UserData;
  149 
  150 	ULONG            alf_Size;
  151 
  152 	BYTE            *alf_LeftSample;
  153 	BYTE            *alf_RightSample;
  154 	ULONG            alf_SamplesPerSec;
  155 };
  156 
  157 struct adtStart
  158 {
  159 	ULONG MethodID;
  160 	ULONG asa_Frame;
  161 };
  162 
  163 
  164 #pragma pack()
  165 
  166 #endif /* DATATYPES_ANIMATIONCLASS_H */