home *** CD-ROM | disk | FTP | other *** search
/ The Best of Mecomp Multimedia 2 / MECOMP-CD-II.iso / amiga / datatypes / film_datatype / classdata.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-26  |  4.1 KB  |  156 lines

  1.  
  2.  
  3. #ifndef CLASSDATA_H
  4. #define CLASSDATA_H 1
  5.  
  6. /*
  7. **
  8. **  $VER: classdata.h 1.6 (26.8.97)
  9. **  film.datatype 1.6
  10. **
  11. **  film class data
  12. **
  13. **  Written 1996/1997 by Roland 'Gizzy' Mainz
  14. **  Original example source from David N. Junod
  15. **
  16. */
  17.  
  18. /*****************************************************************************/
  19.  
  20. /* public BOOPSI class name */
  21. #define FILMDTCLASS "film.datatype"
  22.  
  23. /*****************************************************************************/
  24.  
  25.  
  26. /* Generic IFF Chunk ID's we may encounter */
  27. #ifndef ID_ANNO
  28. #define ID_ANNO         MAKE_ID('A','N','N','O')
  29. #endif /* !ID_ANNO */
  30.  
  31. #ifndef ID_AUTH
  32. #define ID_AUTH         MAKE_ID('A','U','T','H')
  33. #endif /* !ID_AUTH */
  34.  
  35. #ifndef ID_Copyright
  36. #define ID_Copyright    MAKE_ID('(','c',')',' ')
  37. #endif /* !ID_Copyright */
  38.  
  39. #ifndef ID_FVER
  40. #define ID_FVER         MAKE_ID('F','V','E','R')
  41. #endif /* !ID_FVER */
  42.  
  43. #ifndef ID_NAME
  44. #define ID_NAME         MAKE_ID('N','A','M','E')
  45. #endif /* !ID_NAME */
  46.  
  47. /* IFF FILM identifers */
  48. #ifndef ID_FILM
  49. #define ID_FILM MAKE_ID( 'F', 'I', 'L', 'M' )
  50. #endif /* !ID_FILM */
  51.  
  52. #ifndef ID_CELL
  53. #define ID_CELL MAKE_ID( 'C', 'E', 'L', 'L' )
  54. #endif /* !ID_CELL */
  55.  
  56. /* ILBM identifers */
  57. #ifndef ID_ILBM
  58. #define ID_ILBM MAKE_ID( 'I', 'L', 'B', 'M' )
  59. #endif /* !ID_ILBM */
  60.  
  61. #ifndef ID_BMHD
  62. #define ID_BMHD MAKE_ID( 'B', 'M', 'H', 'D' )
  63. #endif /* !ID_BMHD */
  64.  
  65. #ifndef ID_CMAP
  66. #define ID_CMAP MAKE_ID( 'C', 'M', 'A', 'P' )
  67. #endif /* !ID_CMAP */
  68.  
  69. #ifndef ID_CAMG
  70. #define ID_CAMG MAKE_ID( 'C', 'A', 'M', 'G' )
  71. #endif /* !ID_CMAP */
  72.  
  73. /* 8SVX identifers */
  74. #ifndef ID_8SVX
  75. #define ID_8SVX MAKE_ID( '8', 'S', 'V', 'X' )
  76. #endif /* !ID_8SVX */
  77.  
  78. #ifndef ID_VHDR
  79. #define ID_VHDR MAKE_ID( 'V', 'H', 'D', 'R' )
  80. #endif /* !ID_VHDR */
  81.  
  82. #ifndef ID_CHAN
  83. #define CHAN_RIGHT  (4L)
  84. #define CHAN_LEFT   (2L)
  85. #define CHAN_STEREO (6L)  /* CHAN_RIGHT + CHAN_LEFT */
  86.  
  87. #define ID_CHAN MAKE_ID( 'C', 'H', 'A', 'N' )
  88. #endif /* !ID_CHAN */
  89.  
  90. /* misc */
  91. #ifndef ID_BODY
  92. #define ID_BODY MAKE_ID( 'B', 'O', 'D', 'Y' )
  93. #endif /* !ID_BODY */
  94.  
  95. /*****************************************************************************/
  96.  
  97. /* film.datatype class instance data */
  98. struct FilmInstData
  99. {
  100.     /* Misc */
  101.     struct SignalSemaphore  fid_SigSem;          /* Instance data lock                      */
  102.     UWORD                   fid_Pad0;
  103.     APTR                    fid_Pool;            /* Memory pool (for frame(-nodes) etc.)    */
  104.     struct BitMapHeader    *fid_BMH;             /* Shortcut to PDTA_BitMapHeader           */
  105.     struct BitMap          *fid_KeyBitMap;       /* Key BitMap                              */
  106.     struct MinList          fid_FrameList;       /* List of frames                          */
  107.     STRPTR                  fid_ProjectName;     /* Shortcut to DTA_Name                    */
  108.     BPTR                    fid_VerboseOutput;   /* Verbose output                          */
  109.  
  110.     /* Prefs */
  111.     ULONG                   fid_ModeID;
  112.     BOOL                    fid_LoadAll;         /* Load all frames of the animation        */
  113.     ULONG                   fid_FPS;             /* fps of stream (maybe modified by prefs) */
  114.     UWORD                   fid_Volume;          /* Sample volume                           */
  115.     ULONG                   fid_Period;          /* Sample period                           */
  116.  
  117.     /* Disk-loading section */
  118.     BPTR                    fid_FH;
  119.     LONG                    fid_CurrFilePos;
  120. };
  121.  
  122.  
  123. /* node which holds information about a single animation/movie frame */
  124. struct FrameNode
  125. {
  126.     struct MinNode   fn_Node;
  127.     
  128. /* Misc */
  129.     WORD             fn_UseCount;
  130.     UWORD            fn_Pad0;
  131.  
  132. /* Timing section */
  133.     ULONG            fn_TimeStamp;
  134.     ULONG            fn_Frame;
  135.  
  136. /* Bitmap section */
  137.     struct BitMap   *fn_BitMap;
  138.     struct ColorMap *fn_CMap;
  139.  
  140. /* BitMap loading section */
  141.     LONG             fn_BMOffset; /* File offset (0 is begin of file) */
  142.     ULONG            fn_BMSize;   /* Chunk size  */
  143.  
  144. /* Sample section */
  145.     BYTE            *fn_Sample;
  146.     ULONG            fn_SampleLength;
  147. };
  148.  
  149.  
  150. /*****************************************************************************/
  151.  
  152.  
  153. #endif /* !CLASSDATA_H */
  154.  
  155.  
  156.